IntersectMBO / IntersectMBO/ouroboros-consensus

Enforce that only a suffix of the HFC eras can be disabled

Open
#587 0 comments 0 reactions 0 assignees View on GitHub
technical debt
Dominant language
Haskell
Stars
67
Forks
43
Avg merge
5d 13h
Merged PRs (30d)
43

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.