IntersectMBO / IntersectMBO/ouroboros-consensus

Re-enable the `GetLedgerDB` action in the `ChainDB` QSM tests

Open
#1,339 0 comments 0 reactions 0 assignees View on GitHub
UTxO-HD
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.