Skip to content

Commit

Permalink
Merge pull request #5910 from IntersectMBO/jordan/revert-non-failure-…
Browse files Browse the repository at this point in the history
…if-conway-genesis-missing

Cardano-node 9.1.0 release
  • Loading branch information
disassembler authored Jul 24, 2024
2 parents ac76baa + ad7286d commit 176f99e
Show file tree
Hide file tree
Showing 12 changed files with 324 additions and 22 deletions.
2 changes: 1 addition & 1 deletion cardano-node-chairman/cardano-node-chairman.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ executable cardano-node-chairman
build-depends: cardano-api
, cardano-crypto-class
, cardano-git-rev ^>=0.2.2
, cardano-node ^>= 9.0
, cardano-node ^>= 9.1
, cardano-prelude
, containers
, contra-tracer
Expand Down
2 changes: 1 addition & 1 deletion cardano-node/cardano-node.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 3.0

name: cardano-node
version: 9.0.0
version: 9.1.0
synopsis: The cardano full node
description: The cardano full node.
category: Cardano,
Expand Down
2 changes: 1 addition & 1 deletion cardano-node/src/Cardano/Node/Configuration/POM.hs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ instance FromJSON PartialNodeConfiguration where
}

parseConwayProtocol v = do
npcConwayGenesisFile <- v .:? "ConwayGenesisFile"
npcConwayGenesisFile <- v .: "ConwayGenesisFile"
npcConwayGenesisFileHash <- v .:? "ConwayGenesisHash"
pure NodeConwayProtocolConfiguration {
npcConwayGenesisFile
Expand Down
19 changes: 7 additions & 12 deletions cardano-node/src/Cardano/Node/Protocol/Cardano.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ import qualified Ouroboros.Consensus.Shelley.Node.Praos as Praos

import Prelude

import Data.Maybe

------------------------------------------------------------------------------
-- Real Cardano protocol
--
Expand Down Expand Up @@ -137,7 +135,7 @@ mkSomeConsensusProtocolCardano NodeByronProtocolConfiguration {

(conwayGenesis, _conwayGenesisHash) <-
firstExceptT CardanoProtocolInstantiationConwayGenesisReadError $
Conway.readGenesisMaybe npcConwayGenesisFile
Conway.readGenesis npcConwayGenesisFile
npcConwayGenesisFileHash

shelleyLeaderCredentials <-
Expand Down Expand Up @@ -235,21 +233,18 @@ mkSomeConsensusProtocolCardano NodeByronProtocolConfiguration {
-- version. It is the protocol version that this node will declare
-- that it understands during the Babbage era. That is, it is the
-- version of protocol /after/ Babbage, i.e. Conway.
Praos.babbageProtVer = ProtVer (natVersion @9) 0,
Praos.babbageProtVer = ProtVer (natVersion @9) 1,
Praos.babbageMaxTxCapacityOverrides =
TxLimits.mkOverrides TxLimits.noOverridesMeasure
}
, paramsConway =
Praos.ProtocolParamsConway {
-- If Conway is not enabled, this is the Babbage protocol version.
--
-- If Conway is enabled, this is the Conway protocol version.
-- ProtVer 9 corresponds to the Conway bootstrap era.
-- ProtVer 10 corresponds to the Conway post bootstrap era.
Praos.conwayProtVer =
if isNothing npcConwayGenesisFile
then ProtVer (natVersion @8) 0
else if npcExperimentalHardForksEnabled
then ProtVer (natVersion @10) 0
else ProtVer (natVersion @9) 0,
if npcExperimentalHardForksEnabled
then ProtVer (natVersion @10) 0
else ProtVer (natVersion @9) 1,
Praos.conwayMaxTxCapacityOverrides =
TxLimits.mkOverrides TxLimits.noOverridesMeasure
}
Expand Down
2 changes: 1 addition & 1 deletion cardano-node/src/Cardano/Node/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ data NodeAlonzoProtocolConfiguration =

data NodeConwayProtocolConfiguration =
NodeConwayProtocolConfiguration {
npcConwayGenesisFile :: !(Maybe GenesisFile)
npcConwayGenesisFile :: !GenesisFile
-- ^ If no conway genesis file is provided, we want
-- to enforce a maximum protocol version of 8 to avoid
-- a permanent hard fork.
Expand Down
2 changes: 1 addition & 1 deletion cardano-node/test/Test/Cardano/Node/POM.hs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ testNodeAlonzoProtocolConfiguration =
testNodeConwayProtocolConfiguration :: NodeConwayProtocolConfiguration
testNodeConwayProtocolConfiguration =
NodeConwayProtocolConfiguration
{ npcConwayGenesisFile = Just $ GenesisFile "dummmy-genesis-file"
{ npcConwayGenesisFile = GenesisFile "dummmy-genesis-file"
, npcConwayGenesisFileHash = Nothing
}

Expand Down
2 changes: 2 additions & 0 deletions configuration/cardano/mainnet-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",
"ByronGenesisFile": "mainnet-byron-genesis.json",
"ByronGenesisHash": "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb",
"ConwayGenesisFile": "mainnet-conway-genesis.json",
"ConwayGenesisHash": "15a199f895e461ec0ffc6dd4e4028af28a492ab4e806d39cb674c88f7643ef62",
"EnableP2P": true,
"LastKnownBlockVersion-Alt": 0,
"LastKnownBlockVersion-Major": 3,
Expand Down
2 changes: 2 additions & 0 deletions configuration/cardano/mainnet-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ AlonzoGenesisFile: mainnet-alonzo-genesis.json
AlonzoGenesisHash: 7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874
ByronGenesisFile: mainnet-byron-genesis.json
ByronGenesisHash: 5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb
ConwayGenesisFile: mainnet-conway-genesis.json
ConwayGenesisHash: 15a199f895e461ec0ffc6dd4e4028af28a492ab4e806d39cb674c88f7643ef62
ShelleyGenesisFile: mainnet-shelley-genesis.json
ShelleyGenesisHash: 1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81

Expand Down
Loading

0 comments on commit 176f99e

Please sign in to comment.