IntersectMBO / IntersectMBO/ouroboros-consensus

Add Shelley-forward mode

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

Description

Currently, we have three consensus modes: https://github.com/input-output-hk/ouroboros-network/blob/72a3c0dd8ce8a12aa65030f7e18221f342b7ab5b/ouroboros-consensus-cardano/src/Ouroboros/Consensus/Cardano.hs#L84-L115

I.e., `ProtocolByron`, `ProtocolShelley`, `ProtocolCardano`.

Since recently, it is possible to skip a prefix of the eras in `ProtocolCardano`, e.g., hard fork immediately from Byron to Shelley, Allegra, or Mary. This is useful for the benchmarking team. This means we no longer need a separate Allegra-only or Mary-only mode. This simplifies the integration in the node, e.g., the CLI modes.

However, a Byron genesis still needs to be passed to `ProtocolCardano`, even when the Byron era is skipped. It would be more convenient for the benchmarking team to not have to do this. We can add a separate *Shelley-forward* mode, which is Cardano mode minus Byron. This same Shelley-forward mode can be used for Shelley-based testnets.

This, however, means `CardanoBlock` and the other pattern synonyms in [`Ouroboros.Consensus.Cardano.Block`](https://github.com/input-output-hk/ouroboros-network/blob/master/ouroboros-consensus-cardano/src/Ouroboros/Consensus/Cardano/Block.hs
) cannot be used for this mode. I'm not sure we should create similar pattern synonyms for *Shelley-forward* mode, though.

After adding `ProtocolShelleyForward` (or whatever it's going to be called), we can delete `ProtocolByron` and `ProtocolShelley`. In the future, a `ProtocolVoltaire` (for decentralised voting) will likely be needed.

Multiple credentials, which are needed for benchmarking, are allowed in `ProtocolCardano`, but only for testnets, not for mainnet. This is checked at run-time. We could make this a compile-time check again by restricting `ProtocolCardano` to a `Maybe` and `ProtocolShelleyForward` to a list.

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.