ouroboros-consensus icon indicating copy to clipboard operation
ouroboros-consensus copied to clipboard

Consolidate protocol versions in `cardano-tools`

Open amesgen opened this issue 2 years ago • 3 comments

Currently, the Cardano protocol versions are defined twice in ouroboros-consensus-cardano-tools:

  • For db-analyser in Cardano.Tools.DBAnalyser.Block.Cardano

    Here, e.g. alonzoProtVer is correctly set to 7 since input-output-hk/ouroboros-network#4377 (note that, somewhat confusingly, this is not the Alonzo protocol version, see this comment): https://github.com/IntersectMBO/ouroboros-consensus/blob/eddc225de3cb7a5e803ccf83e32242fa3e131e55/ouroboros-consensus-cardano-tools/src/Cardano/Tools/DBAnalyser/Block/Cardano.hs#L329

  • For db-synthesizer in Cardano.Node.Protocol.Cardano

    Here, e.g. alonzoProtVer is incorrect: https://github.com/IntersectMBO/ouroboros-consensus/blob/eddc225de3cb7a5e803ccf83e32242fa3e131e55/ouroboros-consensus-cardano-tools/src/Cardano/Node/Protocol/Cardano.hs#L210

The goal of this ticket is to correct these discrepancies by consolidating them. This can serve as the baseline to extract this into a library that can also be reused in the node here, cf. input-output-hk/ouroboros-network#3925.


For your convenience: See this table from CIP-0059 for an overview of the different protocol versions.

amesgen avatar Apr 14 '23 17:04 amesgen

We chatted and initially think the ouroboros-consensus-cardano package would be a natural place for this consolidated value to be exported.

nfrisby avatar Aug 03 '23 14:08 nfrisby

Related to #275

nfrisby avatar Aug 03 '23 14:08 nfrisby

Note that this will be superseded by https://github.com/IntersectMBO/ouroboros-consensus/issues/324

dnadales avatar Aug 13 '24 12:08 dnadales