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
Reconsider ledgerTipPoint #1559
Comments
Something related I've been thinking about: I wonder if we do that whether we could perhaps leave the semantics of the underlying |
Last week (?) @edsko and I discussed a similar concern with the Mock ledger state that my WIP branch for Issue #1297 revealed. Synchronicity has struck: @mrBliss hypothesized something similar to explain Issue 1505 (hence this Issue) while @nc6 recently noticed similar issues with We all had a call just now. @edsko is fixing the bug (with a better fix than he and I originally came up with). I expect that the tests on my Issue 1297 branch will pass once I rebase it to include that fix. I will continue to debug Issue 1505 to determine if this Issue 1559 is indeed the underlying cause -- simply cherry-picking Edsko's fix might merely mask the repro since it depends on a race condition/subtle timing, so I want to understand its mechanics better. Also, I should be able to rebase my PR for Issue 1489 onto this fix; Issue 1505 is the only remaining failure I've seen on that branch. Progress! |
and leave the tip of the underlying ledger unchanged. I modified the Byron ledger and spec to do this; the mock ledgers were also leaving the tip unchanged, but without the additional SlotNo in TickedLedgerState this was causing trouble (as in a bug that @nrisby found when looking at Closes #1559.
and leave the tip of the underlying ledger unchanged. I modified the Byron ledger and spec to do this; the mock ledgers were also leaving the tip unchanged, but without the additional SlotNo in TickedLedgerState this was causing trouble (as in a bug that @nrisby found when looking at issue #1297). Closes #1559.
1562: Add `SlotNo` to `TickedLedgerState` r=edsko a=edsko and leave the tip of the underlying ledger unchanged. I modified the Byron ledger and spec to do this; the mock ledgers were also leaving the tip unchanged, but without the additional `SlotNo` in `TickedLedgerState` this was causing trouble (as in a bug that @nfrisby found when looking at #1297). Closes #1559. Co-authored-by: Edsko de Vries <edsko@well-typed.com>
Quoting from #1505 (comment):
Also, I think that the idea of
ledgerStatePoint
is not correct. Say we have an empty ledger state with no applied blocks, so the last hash isGenesisHash
. When we now "tick" it using aSlotNo
s, whichPoint
would we return? We can't returnGenesisPoint
, but we can't returnBlockPoint
either, because we don't have a hash.A simple fix would be to return
(WithOrigin SlotNo, ChainHash blk)
instead ofPoint blk
, but that would allow for(Origin, BlockHash h)
, which is an invalid combination. A new type would be better, e.g.:The text was updated successfully, but these errors were encountered: