diff --git a/cardano-api/src/Cardano/Api/LedgerState.hs b/cardano-api/src/Cardano/Api/LedgerState.hs index d0348a03bcf..8ae6db7362c 100644 --- a/cardano-api/src/Cardano/Api/LedgerState.hs +++ b/cardano-api/src/Cardano/Api/LedgerState.hs @@ -854,9 +854,14 @@ instance FromJSON NodeConfig where parseConwayHardForkEpoch o = asum [ Consensus.TriggerHardForkAtEpoch <$> o .: "TestConwayHardForkAtEpoch" - , pure $ Consensus.TriggerHardForkAtVersion 8 -- Mainnet default + , pure $ Consensus.TriggerHardForkAtVersion 9 -- Mainnet default ] + ---------------------------------------------------------------------- + -- WARNING When adding new entries above, be aware that if there is an + -- intra-era fork, then the numbering is not consecutive. + ---------------------------------------------------------------------- + parseNodeConfig :: ByteString -> Either Text NodeConfig parseNodeConfig bs = case Yaml.decodeEither' bs of diff --git a/cardano-node/src/Cardano/Node/Protocol/Cardano.hs b/cardano-node/src/Cardano/Node/Protocol/Cardano.hs index 5f672e5cf5f..5bfd87c8b57 100644 --- a/cardano-node/src/Cardano/Node/Protocol/Cardano.hs +++ b/cardano-node/src/Cardano/Node/Protocol/Cardano.hs @@ -90,7 +90,7 @@ mkSomeConsensusProtocolCardano NodeByronProtocolConfiguration { npcConwayGenesisFileHash } NodeHardForkProtocolConfiguration { - -- npcTestEnableDevelopmentHardForkEras, + npcTestEnableDevelopmentHardForkEras, -- During testing of the Alonzo era, we conditionally declared that we -- knew about the Alonzo era. We do so only when a config option for -- testing development/unstable eras is used. This lets us include @@ -233,7 +233,10 @@ mkSomeConsensusProtocolCardano NodeByronProtocolConfiguration { -- version that this node will declare that it understands, when it -- is in the Babbage era. Since Babbage is currently the last known -- protocol version then this is also the Babbage protocol version. - Praos.conwayProtVer = ProtVer 9 0, + Praos.conwayProtVer = + if npcTestEnableDevelopmentHardForkEras + then ProtVer 9 0 + else ProtVer 8 0, Praos.conwayMaxTxCapacityOverrides = TxLimits.mkOverrides TxLimits.noOverridesMeasure } @@ -257,6 +260,8 @@ mkSomeConsensusProtocolCardano NodeByronProtocolConfiguration { -- Version 5 is Alonzo -- Version 6 is Alonzo (intra era hardfork) -- Version 7 is Babbage + -- Version 8 is Babbage (intra era hardfork) + -- Version 9 is Conway -- -- But we also provide an override to allow for simpler test setups -- such as triggering at the 0 -> 1 transition . @@ -311,11 +316,16 @@ mkSomeConsensusProtocolCardano NodeByronProtocolConfiguration { transitionTrigger = case npcTestConwayHardForkAtEpoch of Nothing -> Consensus.TriggerHardForkAtVersion - (maybe 8 fromIntegral npcTestConwayHardForkAtVersion) + (maybe 9 fromIntegral npcTestConwayHardForkAtVersion) Just epochNo -> Consensus.TriggerHardForkAtEpoch epochNo } + ---------------------------------------------------------------------- + -- WARNING When adding new entries above, be aware that if there is an + -- intra-era fork, then the numbering is not consecutive. + ---------------------------------------------------------------------- + ------------------------------------------------------------------------------ -- Errors --