IntersectMBO / IntersectMBO/ouroboros-consensus
Enrich ChainDB state machine model with ledger snapshots
- Dominant language
- Haskell
- Stars
- 67
- Forks
- 43
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 43
Description
At the moment:
- the `UpdateLedgerSnapshots` command does not have any effect on the model, and
- we do not validate the correctness of the ledger-state snapshot taking functionality in the state machine tests
This also introduces an asymmetry in the way `UpdateLedgerSnapshots` is dealt with in the system under test (SUT) and in the model.
Thus, to bring consistency back and to test the ledger-state snapshot taking functionality we need to enrich the model with information about the ledger snapshots.
# Suggested next actions
- Represent snapshots in the model
- Change [`runPure`](https://github.com/input-output-hk/ouroboros-network/blob/f0dcd6620dcea1f344e77c9d3fe1ecf40c361d43/ouroboros-consensus-test/test-storage/Test/Ouroboros/Storage/ChainDB/StateMachine.hs#L600) so that `UpdateLedgerSnapshots` updates the model accordingly
- Change the equality checking between model and SUT so that the ledger snapshots (or some abstraction of them, like slot numbers of snapshots) are compared.
Contributor guide
Assessment
This issue has not been assessed yet.