-
Notifications
You must be signed in to change notification settings - Fork 20
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
Move ticked LedgerView out of ticked ChainDepState #354
Conversation
The first commit is the core change and everything necessary so that |
The key benefit is that the Ticked ChainDepState types no longer need to carry the LedgerView. The one downside is that this introduces an error case in the HardForkCombinator, since PreparedChainDepState will hold a Ticked LedgerView and a Ticked ChainDepState side-by-side there, and its only guaranteed that those be in the same era (ie the same summand in the telescope) by the invariant on PreparedChainDepState. We consider the resulting exactness of the Ticked ChainDepState to be worth the impossible alternative in distribPreparedChainDepState. In particular, it will unblock another refinement we're working on related to ticking ChainDepStates across era transitions. P.S. - This is effectively reverting 16d61bf.
06b7e9d
to
6c0b232
Compare
The GHC 9.6 warnings in |
I think this PR is Ready for Review---except I'm having second thoughts about the These are our
The ticked ledger views are somewhat suspicious, since The ticked chain-dependent states and ticked ledger states could similarly be redefined as Thus there'd be no more The last remaining motivation for this PR would be for
|
Summary from my PoV: I think there are a few possible motivations for this PR:
This is true, but also not a super important point IMO. Indeed, if we would get rid of
This was the original motivation to consider this change, but there are alternatives for this purposes, namely the last two bullet points in #354 (comment).
This point is unaffected by whether or not we remove |
We don't think this is important enough to warrent working on it ATM. |
While reviewing PR #340, we realized the following change might make the
ConsensusProtocol
class (and how the HFC depends on it) clearer.The key idea: let
Ticked ChainDepState
be exactly a tickedChainDepState
and nothing beyond that. This requires also introducingPreparedChainDepState
(and sadlyPreparedHeaderState
) to bear the burden that was formerly onTicked ChainDepState
. While we're at it, we also fold the other "determined" argument (SlotNo
) into thePrepared*
types, so make theConsensusProtocol
methods even simpler.