Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework the arguments for the DBs #1059

Merged
merged 1 commit into from
Apr 18, 2024
Merged

Rework the arguments for the DBs #1059

merged 1 commit into from
Apr 18, 2024

Conversation

jasagredo
Copy link
Contributor

@jasagredo jasagredo commented Apr 12, 2024

  • Tweak the ChainDB arguments:
    • Remove unused fields in CDB:
      • cdbTraceLedger this was always set to nullTracer, furthermore it would trace the whole LedgerDB.
      • cdbChunkInfo was never accessed from the ChainDB.
      • cdbCheckIntegrity was never accessed from the ChainDB.
    • Transform ChainDbArgs into an isomorphic product of the different arguments of the inner databases.
    • Define most common operations on ChainDbArgs as separate functions: ensureValidateAll, updateTracer and updateDiskPolicyArgs
  • Tweak the LgrDB arguments:
    • LgrDB.cfg and LgrDbArgs.lgrConfig are now LedgerDbCfg (ExtLedgerState blk) instead of TopLevelConfig blk.
    • defaultArgs no longer expects a filesystem.
  • Tweak the ImmutableDB arguments:
    • defaultArgs no longer expects a filesystem.
  • Tweak the VolatileDB arguments:
    • defaultArgs no longer expects a filesystem.
  • Hide the Identity/Defaults types in Ouroboros.Consensus.Util.Args in favor of Complete/Incomplete.
  • Expose noDefault to replace NoDefault.

@jasagredo jasagredo requested a review from a team as a code owner April 12, 2024 15:52
@jasagredo jasagredo self-assigned this Apr 12, 2024
@jasagredo jasagredo force-pushed the js/chain-db-args branch 2 times, most recently from ba7a94c to dde1bef Compare April 15, 2024 10:36
@jasagredo
Copy link
Contributor Author

I would argue that this also can close #630

Base automatically changed from js/port-some-utxo-hd to main April 16, 2024 14:27
@jasagredo jasagredo force-pushed the js/chain-db-args branch 5 times, most recently from 5cb8bb9 to ec0fa2d Compare April 18, 2024 09:15
- Tweak the ChainDB arguments:
  - Remove unused fields in `CDB`:
    - `cdbTraceLedger` this was *always* set to nullTracer, furthermore it would trace the whole LedgerDB.
    - `cdbChunkInfo` was never accessed from the ChainDB.
    - `cdbCheckIntegrity` was never accessed from the ChainDB.
  - Transform `ChainDbArgs` into an isomorphic product of the different arguments of the inner databases.
  - Define most common operations on `ChainDbArgs` as separate functions: `ensureValidateAll`, `updateTracer` and `updateDiskPolicyArgs`
- Tweak the LgrDB arguments:
  - `LgrDB.cfg` and `LgrDbArgs.lgrConfig` are now `LedgerDbCfg (ExtLedgerState blk)` instead of `TopLevelConfig blk`.
  - `defaultArgs` no longer expects a filesystem.
- Tweak the ImmutableDB arguments:
  - `defaultArgs` no longer expects a filesystem.
- Tweak the VolatileDB arguments:
  - `defaultArgs` no longer expects a filesystem.
- Hide the `Identity`/`Defaults` types in `Ouroboros.Consensus.Util.Args` in favor of `Complete`/`Incomplete`.
- Expose `noDefault` to replace `NoDefault`.
@jasagredo jasagredo added this pull request to the merge queue Apr 18, 2024
Merged via the queue into main with commit 39f1775 Apr 18, 2024
15 checks passed
@jasagredo jasagredo deleted the js/chain-db-args branch April 18, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants