IntersectMBO / IntersectMBO/ouroboros-consensus
Test the Byron anachronistic ledger view (or "ledger view forecast")
- Dominant language
- Haskell
- Stars
- 67
- Forks
- 43
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 43
Description
As discussed in input-output-hk/ouroboros-network#1933, the current implementation of `anachronisticLedgerView` for Byron is wrong; indeed, the concept itself is wrong. This is not currently caught by our tests; the consensus tests could eventually find it if we generate sufficient forks and edge cases, but it would be good to test it more directly.
The property we should test is that "given the ledger state at point `X`, can we validate a header for some block `Y` on a potentially different fork, under the condition that `Y` is within a certain range from the intersection point `A` of `X` and `Y`. We should test this as follows:
1. Generate a "Byron tree" of blocks that include delegation changes
2. Take the ledger state at some point `X`, use it to validate a block `Y`, and compare that to what would have happened if we used `Y`'s own ledger state.
These two things should match; if they don't, it's a bug. Setting this up would be time consuming though; probably a first step (0) should be to parameterize `Byron` over a choice of crypto `c`.
Contributor guide
Assessment
This issue has not been assessed yet.