Consolidate protocol versions in `cardano-tools`
Currently, the Cardano protocol versions are defined twice in ouroboros-consensus-cardano-tools:
-
For db-analyser in
Cardano.Tools.DBAnalyser.Block.CardanoHere, e.g.
alonzoProtVeris correctly set to7since 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.CardanoHere, e.g.
alonzoProtVeris 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.
We chatted and initially think the ouroboros-consensus-cardano package would be a natural place for this consolidated value to be exported.
Related to #275
Note that this will be superseded by https://github.com/IntersectMBO/ouroboros-consensus/issues/324