You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, the protocol parameters (ProtocolParamsByron, ProtocolParamsShelley, etc.) for different eras are unrelated data types. The goal of this ticket is to introduce a type/data family abstracting over these, and make use of it where appropriate.
# Description
Closes#275.
This PR adds a new `ProtocolParams` data family, with instances for all
Byron and Shelley blocks, and an instance for the Cardano block. This
simplies `protocolInfoCardano` because per-era protocol parameter
arguments are now bundled in the Cardano `ProtocolParams` type.
Tip: hiding whitespace should make the reviewable diff smaller.
See
#282 (review),
which discusses possible follow-up issues for other improvements to
`protocolInfoCardano`.
Right now, the protocol parameters (
ProtocolParamsByron
,ProtocolParamsShelley
, etc.) for different eras are unrelated data types. The goal of this ticket is to introduce a type/data family abstracting over these, and make use of it where appropriate.As a concrete example, consider the type signature of
protocolInfoCardano
:https://github.com/input-output-hk/ouroboros-network/blob/0aff5cf05f09bb56d4ac40f0090c636d5893dfb2/ouroboros-consensus-cardano/src/Ouroboros/Consensus/Cardano/Node.hs#L503-L517
After this change, this function would take sth like
NP ProtocolParamsFamily (CardanoEras c)
instead of the individualProtocolParams*
arguments.A concrete benefit of this change would be that we could automatically extract the latest protocol version from this
NP
, making the approach of IntersectMBO/ouroboros-network#4111 even more robust (also see IntersectMBO/ouroboros-network#4111 (comment)).The text was updated successfully, but these errors were encountered: