IntersectMBO / IntersectMBO/ouroboros-consensus
Re-enable the `GetLedgerDB` action in the `ChainDB` QSM tests
- Dominant language
- Haskell
- Stars
- 67
- Forks
- 43
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 43
Description
Hmm, unfortunately changing the tests to work with the new `LedgerDB` went under the radar :P
When designing the `LedgerDB` API, the `getLedgerDB` function was removed from the `ChainDB` API, because `LedgerDB` was no longer a pure datastructure. It was replaced by more concrete functions, amongst which: `getCurrentLedger`, `getImmutableLedger`, `getPastLedger`, `getHeaderStateHistory`, `getReadOnlyForkerAtPoint`, `getLedgerTablesAtFor`, `getStatistics`.
Options I can think of for how to restore testing:
* Test (a subset of) the concrete functions by creating a command for each.
* Don't test the concrete functions, but use `TestInternals` to output some pure information about the `LedgerDB`. Maybe we could reconstruct a pure sequence of ledger states from the concrete `LedgerDB` impls (reading tables from disk too), and compare those against the model?
And no, there is no issue for it, but there probably should be
_Originally posted by @jorisdral in https://github.com/IntersectMBO/ouroboros-consensus/pull/1267#discussion_r1856294476_
The following comment is also relevant: https://github.com/IntersectMBO/ouroboros-consensus/pull/1267#discussion_r1856300299
Contributor guide
Assessment
This issue has not been assessed yet.