ouroboros-consensus
ouroboros-consensus copied to clipboard
Enforce that only a suffix of the HFC eras can be disabled
This constructor https://github.com/IntersectMBO/ouroboros-consensus/blob/437d7160079c83c4632fe0a42c596e5105c59a4d/ouroboros-consensus/src/Ouroboros/Consensus/HardFork/Combinator/Serialisation/Common.hs#L184-L190
and this data type
https://github.com/IntersectMBO/ouroboros-consensus/blob/437d7160079c83c4632fe0a42c596e5105c59a4d/ouroboros-consensus/src/Ouroboros/Consensus/HardFork/Combinator/Serialisation/Common.hs#L196-L198
can currently together express a situation in which any of the HFC eras can be disabled.
Similar to NodeToNode
. (Edit: but PR #913 removes this expressiveness in the NTN case.)
As of writing this, I'm not expecting a scenario in which a disabled era is ever followed by an enabled era. I think it should be a non-empty prefix of enabled eras followed by a possibly-empty suffix of disabled eras.
This Issue is to double-check that expectation and -- if it sounds right -- to consider using more precise types to enforce it. In particular, a Telescope
might be a nice option.