Skip to content

Commit b63c325

Browse files
authored
Merge pull request #4988 from input-output-hk/newhoggy/conway-hardforks-on-prot-ver-9
Conway hard forks on prot-ver 9
2 parents 26125a0 + 3d50f70 commit b63c325

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

cardano-api/src/Cardano/Api/LedgerState.hs

+6-1
Original file line numberDiff line numberDiff line change
@@ -854,9 +854,14 @@ instance FromJSON NodeConfig where
854854
parseConwayHardForkEpoch o =
855855
asum
856856
[ Consensus.TriggerHardForkAtEpoch <$> o .: "TestConwayHardForkAtEpoch"
857-
, pure $ Consensus.TriggerHardForkAtVersion 8 -- Mainnet default
857+
, pure $ Consensus.TriggerHardForkAtVersion 9 -- Mainnet default
858858
]
859859

860+
----------------------------------------------------------------------
861+
-- WARNING When adding new entries above, be aware that if there is an
862+
-- intra-era fork, then the numbering is not consecutive.
863+
----------------------------------------------------------------------
864+
860865
parseNodeConfig :: ByteString -> Either Text NodeConfig
861866
parseNodeConfig bs =
862867
case Yaml.decodeEither' bs of

cardano-node/src/Cardano/Node/Protocol/Cardano.hs

+13-3
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ mkSomeConsensusProtocolCardano NodeByronProtocolConfiguration {
9090
npcConwayGenesisFileHash
9191
}
9292
NodeHardForkProtocolConfiguration {
93-
-- npcTestEnableDevelopmentHardForkEras,
93+
npcTestEnableDevelopmentHardForkEras,
9494
-- During testing of the Alonzo era, we conditionally declared that we
9595
-- knew about the Alonzo era. We do so only when a config option for
9696
-- testing development/unstable eras is used. This lets us include
@@ -233,7 +233,10 @@ mkSomeConsensusProtocolCardano NodeByronProtocolConfiguration {
233233
-- version that this node will declare that it understands, when it
234234
-- is in the Babbage era. Since Babbage is currently the last known
235235
-- protocol version then this is also the Babbage protocol version.
236-
Praos.conwayProtVer = ProtVer 9 0,
236+
Praos.conwayProtVer =
237+
if npcTestEnableDevelopmentHardForkEras
238+
then ProtVer 9 0
239+
else ProtVer 8 0,
237240
Praos.conwayMaxTxCapacityOverrides =
238241
TxLimits.mkOverrides TxLimits.noOverridesMeasure
239242
}
@@ -257,6 +260,8 @@ mkSomeConsensusProtocolCardano NodeByronProtocolConfiguration {
257260
-- Version 5 is Alonzo
258261
-- Version 6 is Alonzo (intra era hardfork)
259262
-- Version 7 is Babbage
263+
-- Version 8 is Babbage (intra era hardfork)
264+
-- Version 9 is Conway
260265
--
261266
-- But we also provide an override to allow for simpler test setups
262267
-- such as triggering at the 0 -> 1 transition .
@@ -311,11 +316,16 @@ mkSomeConsensusProtocolCardano NodeByronProtocolConfiguration {
311316
transitionTrigger =
312317
case npcTestConwayHardForkAtEpoch of
313318
Nothing -> Consensus.TriggerHardForkAtVersion
314-
(maybe 8 fromIntegral npcTestConwayHardForkAtVersion)
319+
(maybe 9 fromIntegral npcTestConwayHardForkAtVersion)
315320
Just epochNo -> Consensus.TriggerHardForkAtEpoch epochNo
316321

317322
}
318323

324+
----------------------------------------------------------------------
325+
-- WARNING When adding new entries above, be aware that if there is an
326+
-- intra-era fork, then the numbering is not consecutive.
327+
----------------------------------------------------------------------
328+
319329
------------------------------------------------------------------------------
320330
-- Errors
321331
--

0 commit comments

Comments
 (0)