Skip to content

Commit

Permalink
Merge pull request #5895 from IntersectMBO/cl/integrate-9.0
Browse files Browse the repository at this point in the history
Cl/integrate 9.0
  • Loading branch information
disassembler authored Jul 3, 2024
2 parents 6fa77a9 + 115344c commit 2820a63
Show file tree
Hide file tree
Showing 20 changed files with 93 additions and 65 deletions.
2 changes: 1 addition & 1 deletion bench/plutus-scripts-bench/plutus-scripts-bench.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ library
-- IOG dependencies
--------------------------
build-depends:
, cardano-api ^>=8.48.0.1
, cardano-api ^>=9.0
, plutus-ledger-api ^>=1.30
, plutus-tx ^>=1.30
, plutus-tx-plugin ^>=1.30
Expand Down
26 changes: 11 additions & 15 deletions bench/tx-generator/src/Cardano/Benchmarking/Script/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,10 @@ getLocalConnectInfo = makeLocalConnectInfo <$> getEnvNetworkId <*> getEnvSocketP
queryEra :: ActionM AnyCardanoEra
queryEra = do
localNodeConnectInfo <- getLocalConnectInfo
chainTip <- liftIO $ getLocalChainTip localNodeConnectInfo
ret <- liftIO $ queryNodeLocalState localNodeConnectInfo (SpecificPoint $ chainTipToChainPoint chainTip) QueryCurrentEra
case ret of
Right era -> return era
Left err -> liftTxGenError $ TxGenError $ show err
chainTip <- getLocalChainTip localNodeConnectInfo
mapExceptT liftIO .
modifyError (Env.TxGenError . TxGenError . show) $
queryNodeLocalState localNodeConnectInfo (SpecificPoint $ chainTipToChainPoint chainTip) QueryCurrentEra

queryRemoteProtocolParameters :: ActionM ProtocolParameters
queryRemoteProtocolParameters = do
Expand All @@ -181,16 +180,13 @@ queryRemoteProtocolParameters = do
QueryInEra era (Ledger.PParams (ShelleyLedgerEra era))
-> ActionM ProtocolParameters
callQuery query@(QueryInShelleyBasedEra shelleyEra _) = do
res <- liftIO $ queryNodeLocalState localNodeConnectInfo (SpecificPoint $ chainTipToChainPoint chainTip) (QueryInEra query)
case res of
Right (Right pp) -> do
let pp' = fromLedgerPParams shelleyEra pp
pparamsFile = "protocol-parameters-queried.json"
liftIO $ BSL.writeFile pparamsFile $ prettyPrintOrdered pp'
traceDebug $ "queryRemoteProtocolParameters : query result saved in: " ++ pparamsFile
return pp'
Right (Left err) -> liftTxGenError $ TxGenError $ show err
Left err -> liftTxGenError $ TxGenError $ show err
pp <- liftEither . first (Env.TxGenError . TxGenError . show) =<< mapExceptT liftIO (modifyError (Env.TxGenError . TxGenError . show) $
queryNodeLocalState localNodeConnectInfo (SpecificPoint $ chainTipToChainPoint chainTip) (QueryInEra query))
let pp' = fromLedgerPParams shelleyEra pp
pparamsFile = "protocol-parameters-queried.json"
liftIO $ BSL.writeFile pparamsFile $ prettyPrintOrdered pp'
traceDebug $ "queryRemoteProtocolParameters : query result saved in: " ++ pparamsFile
return pp'
case era of
AnyCardanoEra ByronEra -> liftTxGenError $ TxGenError "queryRemoteProtocolParameters Byron not supported"
AnyCardanoEra ShelleyEra -> callQuery $ QueryInShelleyBasedEra ShelleyBasedEraShelley QueryProtocolParameters
Expand Down
4 changes: 2 additions & 2 deletions bench/tx-generator/tx-generator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ library
, attoparsec-aeson
, base16-bytestring
, bytestring
, cardano-api ^>= 8.48.0.1
, cardano-api ^>= 9.0
, cardano-binary
, cardano-cli ^>= 8.24
, cardano-cli ^>= 9.0
, cardano-crypto-class
, cardano-crypto-wrapper
, cardano-data
Expand Down
4 changes: 2 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ repository cardano-haskell-packages
-- See CONTRIBUTING for information about these, including some Nix commands
-- you need to run if you change them
index-state:
, hackage.haskell.org 2024-06-13T08:49:27Z
, cardano-haskell-packages 2024-06-28T18:16:58Z
, hackage.haskell.org 2024-06-23T23:01:13Z
, cardano-haskell-packages 2024-07-03T01:26:49Z

packages:
cardano-node
Expand Down
6 changes: 3 additions & 3 deletions cardano-node-chairman/cardano-node-chairman.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 3.0

name: cardano-node-chairman
version: 8.12.0
version: 9.0.0
synopsis: The cardano full node
description: The cardano full node.
category: Cardano,
Expand Down 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 ^>= 8.12
, cardano-node ^>= 9.0
, cardano-prelude
, containers
, contra-tracer
Expand Down Expand Up @@ -88,5 +88,5 @@ test-suite chairman-tests
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -T"

build-tool-depends: cardano-node:cardano-node
, cardano-cli:cardano-cli ^>= 8.24.0.0
, cardano-cli:cardano-cli ^>= 9.0.0.0
, cardano-node-chairman:cardano-node-chairman
8 changes: 4 additions & 4 deletions 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: 8.12.2
version: 9.0.0
synopsis: The cardano full node
description: The cardano full node.
category: Cardano,
Expand Down Expand Up @@ -145,7 +145,7 @@ library
, async
, base16-bytestring
, bytestring
, cardano-api ^>= 8.48.0.1
, cardano-api ^>= 9.0
, cardano-crypto-class
, cardano-crypto-wrapper
, cardano-git-rev ^>=0.2.2
Expand Down Expand Up @@ -186,8 +186,8 @@ library
, network-mux >= 0.4
, nothunks
, optparse-applicative-fork >= 0.18.1
, ouroboros-consensus ^>= 0.19
, ouroboros-consensus-cardano ^>= 0.17
, ouroboros-consensus ^>= 0.20
, ouroboros-consensus-cardano ^>= 0.18
, ouroboros-consensus-diffusion ^>= 0.17
, ouroboros-consensus-protocol
, ouroboros-network-api ^>= 0.7.3
Expand Down
7 changes: 2 additions & 5 deletions cardano-node/src/Cardano/Node/Protocol/Cardano.hs
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,7 @@ 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 =
if npcExperimentalHardForksEnabled
then ProtVer (natVersion @10) 0
else ProtVer (natVersion @8) 0,
Praos.babbageProtVer = ProtVer (natVersion @9) 0,
Praos.babbageMaxTxCapacityOverrides =
TxLimits.mkOverrides TxLimits.noOverridesMeasure
}
Expand All @@ -245,7 +242,7 @@ mkSomeConsensusProtocolCardano NodeByronProtocolConfiguration {
then ProtVer (natVersion @8) 0
else if npcExperimentalHardForksEnabled
then ProtVer (natVersion @10) 0
else ProtVer (natVersion @8) 0,
else ProtVer (natVersion @9) 0,
Praos.conwayMaxTxCapacityOverrides =
TxLimits.mkOverrides TxLimits.noOverridesMeasure
}
Expand Down
26 changes: 24 additions & 2 deletions cardano-node/src/Cardano/Node/Tracing/Era/Shelley.hs
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,16 @@ instance LogFormatting (Conway.ConwayGovCertPredFailure era) where
, "expectedCoin" .= expectedCoin
, "error" .= String "DRep delegation has incorrect deposit"
]
Conway.ConwayCommitteeHasPreviouslyResigned kHash ->
Conway.ConwayCommitteeHasPreviouslyResigned coldCred ->
[ "kind" .= String "ConwayCommitteeHasPreviouslyResigned"
, "credential" .= String (textShow kHash)
, "credential" .= String (textShow coldCred)
, "error" .= String "Committee has resigned"
]
Conway.ConwayCommitteeIsUnknown coldCred ->
[ "kind" .= String "ConwayCommitteeIsUnknown"
, "credential" .= String (textShow coldCred)
, "error" .= String "Committee is Unknown"
]
Conway.ConwayDRepIncorrectRefund givenRefund expectedRefund ->
[ "kind" .= String "ConwayDRepIncorrectRefund"
, "givenRefund" .= givenRefund
Expand Down Expand Up @@ -1080,6 +1085,14 @@ instance
-- Conway related
--------------------------------------------------------------------------------

instance
( Ledger.Era era
, Show (PredicateFailure (Ledger.EraRule "LEDGERS" era))
) => LogFormatting (Conway.ConwayBbodyPredFailure era) where
forMachine _ err = mconcat [ "kind" .= String "ConwayBbodyPredFail"
, "error" .= String (textShow err)
]

instance
( Consensus.ShelleyBasedEra era
, LogFormatting (PredicateFailure (Ledger.EraRule "UTXOW" era))
Expand All @@ -1088,6 +1101,11 @@ instance
, LogFormatting (Set (Credential 'Staking (Ledger.EraCrypto era)))
) => LogFormatting (Conway.ConwayLedgerPredFailure era) where
forMachine v (Conway.ConwayUtxowFailure f) = forMachine v f
forMachine _ (Conway.ConwayTxRefScriptsSizeTooBig actual limit) =
mconcat [ "kind" .= String "ConwayTxRefScriptsSizeTooBig"
, "actual" .= actual
, "limit" .= limit
]
forMachine v (Conway.ConwayCertsFailure f) = forMachine v f
forMachine v (Conway.ConwayGovFailure f) = forMachine v f
forMachine v (Conway.ConwayWdrlNotDelegatedToDRep f) = forMachine v f
Expand Down Expand Up @@ -1127,6 +1145,10 @@ instance
mconcat [ "kind" .= String "DisallowedVoters"
, "govActionIdToVoter" .= NonEmpty.toList govActionIdToVoter
]
forMachine _ (Conway.VotersDoNotExist creds) =
mconcat [ "kind" .= String "VotersDoNotExist"
, "credentials" .= creds
]
forMachine _ (Conway.ConflictingCommitteeUpdate creds) =
mconcat [ "kind" .= String "ConflictingCommitteeUpdate"
, "credentials" .= creds
Expand Down
22 changes: 22 additions & 0 deletions cardano-node/src/Cardano/Tracing/OrphanInstances/Shelley.hs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ instance ToObject (Conway.ConwayGovCertPredFailure era) where
, "credential" .= String (textShow kHash)
, "error" .= String "Committee has resigned"
]
Conway.ConwayCommitteeIsUnknown kHash ->
[ "kind" .= String "ConwayCommitteeIsUnknown"
, "credential" .= String (textShow kHash)
, "error" .= String "Committee is Unknown"
]
Conway.ConwayDRepIncorrectRefund givenRefund expectedRefund ->
[ "kind" .= String "ConwayDRepIncorrectRefund"
, "givenRefund" .= String (textShow givenRefund)
Expand Down Expand Up @@ -311,6 +316,11 @@ instance
, ToObject (Set (Credential 'Staking (Consensus.EraCrypto ledgerera)))
) => ToObject (Conway.ConwayLedgerPredFailure ledgerera) where
toObject verb (Conway.ConwayUtxowFailure f) = toObject verb f
toObject _ (Conway.ConwayTxRefScriptsSizeTooBig actual limit) =
mconcat [ "kind" .= String "ConwayTxRefScriptsSizeTooBig"
, "actual" .= actual
, "limit" .= limit
]
toObject verb (Conway.ConwayCertsFailure f) = toObject verb f
toObject verb (Conway.ConwayGovFailure f) = toObject verb f
toObject verb (Conway.ConwayWdrlNotDelegatedToDRep f) = toObject verb f
Expand Down Expand Up @@ -349,6 +359,10 @@ instance Ledger.EraPParams era => ToObject (Conway.ConwayGovPredFailure era) whe
mconcat [ "kind" .= String "DisallowedVoters"
, "govActionIdToVoter" .= NonEmpty.toList govActionIdToVoter
]
toObject _ (Conway.VotersDoNotExist creds) =
mconcat [ "kind" .= String "VotersDoNotExist"
, "credentials" .= creds
]
toObject _ (Conway.ConflictingCommitteeUpdate creds) =
mconcat [ "kind" .= String "ConflictingCommitteeUpdate"
, "credentials" .= creds
Expand Down Expand Up @@ -1318,6 +1332,14 @@ instance Ledger.Crypto c => ToObject (PraosChainSelectView c) where
-- Conway related
--------------------------------------------------------------------------------

instance
( Ledger.Era ledgerera
, Show (PredicateFailure (Ledger.EraRule "LEDGERS" ledgerera))
) => ToObject (Conway.ConwayBbodyPredFailure ledgerera) where
toObject _ err = mconcat [ "kind" .= String "ConwayBbodyPredFail"
, "error" .= String (textShow err)
]

instance
( ToJSON (Alonzo.CollectError ledgerera)
) => ToObject (ConwayUtxosPredFailure ledgerera) where
Expand Down
6 changes: 3 additions & 3 deletions cardano-submit-api/cardano-submit-api.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 3.0

name: cardano-submit-api
version: 8.12.0
version: 9.0.0
synopsis: A web server that allows transactions to be POSTed to the cardano chain
description: A web server that allows transactions to be POSTed to the cardano chain.
homepage: https://github.com/intersectmbo/cardano-node
Expand Down Expand Up @@ -39,9 +39,9 @@ library
, aeson
, async
, bytestring
, cardano-api ^>= 8.48.0.1
, cardano-api ^>= 9.0
, cardano-binary
, cardano-cli ^>= 8.24
, cardano-cli ^>= 9.0
, cardano-crypto-class ^>= 2.1.2
, http-media
, iohk-monitoring
Expand Down
6 changes: 3 additions & 3 deletions cardano-testnet/cardano-testnet.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 3.0

name: cardano-testnet
version: 8.12.0
version: 9.0.0
synopsis: The cardano full node
description: The cardano full node.
copyright: 2021-2023 Input Output Global Inc (IOG), 2023-2024 Intersect.
Expand Down Expand Up @@ -35,8 +35,8 @@ library
, aeson-pretty
, ansi-terminal
, bytestring
, cardano-api ^>= 8.48.0.1
, cardano-cli ^>= 8.24
, cardano-api ^>= 9.0
, cardano-cli ^>= 9.0
, cardano-crypto-class
, cardano-crypto-wrapper
, cardano-git-rev ^>= 0.2.2
Expand Down
3 changes: 1 addition & 2 deletions cardano-testnet/src/Testnet/Process/Cli/DRep.hs
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,7 @@ makeActivityChangeProposal execConfig epochStateView ceo work prefix
H.writeFile proposalAnchorFile "dummy anchor data"

proposalAnchorDataHash <- execCli' execConfig
[ "conway", "governance"
, "hash", "anchor-data", "--file-text", proposalAnchorFile
[ "hash", "anchor-data", "--file-text", proposalAnchorFile
]

minDRepDeposit <- getMinDRepDeposit epochStateView ceo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ hprop_constitutional_committee_add_new = integrationWorkspace "constitutional-co
H.writeFile proposalDataFp "dummy proposal data"

proposalAnchorDataHash <- execCli' execConfig
[ eraName, "governance" , "hash", "anchor-data"
[ "hash", "anchor-data"
, "--file-text", proposalAnchorFp
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ hprop_ledger_events_info_action = integrationRetryWorkspace 0 "info-hash" $ \tem
H.writeFile proposalAnchorFile "dummy anchor data"

proposalAnchorDataHash <- execCli' execConfig
[ "conway", "governance"
, "hash", "anchor-data", "--file-text", proposalAnchorFile
[ "hash", "anchor-data", "--file-text", proposalAnchorFile
]

let stakeVkeyFp = gov </> "stake.vkey"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ hprop_gov_no_confidence = integrationWorkspace "no-confidence" $ \tempAbsBasePat
H.writeFile proposalAnchorFile "dummy anchor data"

proposalAnchorDataHash <- H.execCli' execConfig
[ eraToString era, "governance"
, "hash", "anchor-data", "--file-text", proposalAnchorFile
[ "hash", "anchor-data", "--file-text", proposalAnchorFile
]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,7 @@ makeDesiredPoolNumberChangeProposal execConfig epochStateView ceo work prefix
H.writeFile proposalAnchorFile "dummy anchor data"

proposalAnchorDataHash <- H.execCli' execConfig
[ "conway", "governance"
, "hash", "anchor-data", "--file-text", proposalAnchorFile
[ "hash", "anchor-data", "--file-text", proposalAnchorFile
]

minDRepDeposit <- getMinDRepDeposit epochStateView ceo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,11 @@ hprop_ledger_events_propose_new_constitution = integrationWorkspace "propose-new
H.writeFile proposalAnchorFile "dummy anchor data"
H.writeFile consitutionFile "dummy constitution data"
constitutionHash <- execCli' execConfig
[ "conway", "governance"
, "hash", "anchor-data", "--file-text", consitutionFile
[ "hash", "anchor-data", "--file-text", consitutionFile
]

proposalAnchorDataHash <- execCli' execConfig
[ "conway", "governance"
, "hash", "anchor-data", "--file-text", proposalAnchorFile
[ "hash", "anchor-data", "--file-text", proposalAnchorFile
]

let stakeVkeyFp = gov </> "stake.vkey"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,11 @@ hprop_ledger_events_propose_new_constitution_spo = integrationWorkspace "propose
H.writeFile proposalAnchorFile "dummy anchor data"
H.writeFile constitutionFile "dummy constitution data"
constitutionHash <- execCli' execConfig
[ "conway", "governance"
, "hash", "anchor-data", "--file-text", constitutionFile
[ "hash", "anchor-data", "--file-text", constitutionFile
]

proposalAnchorDataHash <- execCli' execConfig
[ "conway", "governance"
, "hash", "anchor-data", "--file-text", proposalAnchorFile
[ "hash", "anchor-data", "--file-text", proposalAnchorFile
]

let stakeVkeyFp = gov </> "stake.vkey"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ hprop_ledger_events_treasury_withdrawal = integrationRetryWorkspace 1 "treasury
H.writeFile proposalAnchorFile "dummy anchor data"

proposalAnchorDataHash <- execCli' execConfig
[ eraName, "governance"
, "hash", "anchor-data", "--file-text", proposalAnchorFile
[ "hash", "anchor-data", "--file-text", proposalAnchorFile
]

txin2 <- findLargestUtxoForPaymentKey epochStateView sbe wallet1
Expand Down
Loading

0 comments on commit 2820a63

Please sign in to comment.