Skip to content

Commit 2820a63

Browse files
authored
Merge pull request #5895 from IntersectMBO/cl/integrate-9.0
Cl/integrate 9.0
2 parents 6fa77a9 + 115344c commit 2820a63

File tree

20 files changed

+93
-65
lines changed

20 files changed

+93
-65
lines changed

bench/plutus-scripts-bench/plutus-scripts-bench.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ library
8080
-- IOG dependencies
8181
--------------------------
8282
build-depends:
83-
, cardano-api ^>=8.48.0.1
83+
, cardano-api ^>=9.0
8484
, plutus-ledger-api ^>=1.30
8585
, plutus-tx ^>=1.30
8686
, plutus-tx-plugin ^>=1.30

bench/tx-generator/src/Cardano/Benchmarking/Script/Core.hs

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,10 @@ getLocalConnectInfo = makeLocalConnectInfo <$> getEnvNetworkId <*> getEnvSocketP
165165
queryEra :: ActionM AnyCardanoEra
166166
queryEra = do
167167
localNodeConnectInfo <- getLocalConnectInfo
168-
chainTip <- liftIO $ getLocalChainTip localNodeConnectInfo
169-
ret <- liftIO $ queryNodeLocalState localNodeConnectInfo (SpecificPoint $ chainTipToChainPoint chainTip) QueryCurrentEra
170-
case ret of
171-
Right era -> return era
172-
Left err -> liftTxGenError $ TxGenError $ show err
168+
chainTip <- getLocalChainTip localNodeConnectInfo
169+
mapExceptT liftIO .
170+
modifyError (Env.TxGenError . TxGenError . show) $
171+
queryNodeLocalState localNodeConnectInfo (SpecificPoint $ chainTipToChainPoint chainTip) QueryCurrentEra
173172

174173
queryRemoteProtocolParameters :: ActionM ProtocolParameters
175174
queryRemoteProtocolParameters = do
@@ -181,16 +180,13 @@ queryRemoteProtocolParameters = do
181180
QueryInEra era (Ledger.PParams (ShelleyLedgerEra era))
182181
-> ActionM ProtocolParameters
183182
callQuery query@(QueryInShelleyBasedEra shelleyEra _) = do
184-
res <- liftIO $ queryNodeLocalState localNodeConnectInfo (SpecificPoint $ chainTipToChainPoint chainTip) (QueryInEra query)
185-
case res of
186-
Right (Right pp) -> do
187-
let pp' = fromLedgerPParams shelleyEra pp
188-
pparamsFile = "protocol-parameters-queried.json"
189-
liftIO $ BSL.writeFile pparamsFile $ prettyPrintOrdered pp'
190-
traceDebug $ "queryRemoteProtocolParameters : query result saved in: " ++ pparamsFile
191-
return pp'
192-
Right (Left err) -> liftTxGenError $ TxGenError $ show err
193-
Left err -> liftTxGenError $ TxGenError $ show err
183+
pp <- liftEither . first (Env.TxGenError . TxGenError . show) =<< mapExceptT liftIO (modifyError (Env.TxGenError . TxGenError . show) $
184+
queryNodeLocalState localNodeConnectInfo (SpecificPoint $ chainTipToChainPoint chainTip) (QueryInEra query))
185+
let pp' = fromLedgerPParams shelleyEra pp
186+
pparamsFile = "protocol-parameters-queried.json"
187+
liftIO $ BSL.writeFile pparamsFile $ prettyPrintOrdered pp'
188+
traceDebug $ "queryRemoteProtocolParameters : query result saved in: " ++ pparamsFile
189+
return pp'
194190
case era of
195191
AnyCardanoEra ByronEra -> liftTxGenError $ TxGenError "queryRemoteProtocolParameters Byron not supported"
196192
AnyCardanoEra ShelleyEra -> callQuery $ QueryInShelleyBasedEra ShelleyBasedEraShelley QueryProtocolParameters

bench/tx-generator/tx-generator.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ library
106106
, attoparsec-aeson
107107
, base16-bytestring
108108
, bytestring
109-
, cardano-api ^>= 8.48.0.1
109+
, cardano-api ^>= 9.0
110110
, cardano-binary
111-
, cardano-cli ^>= 8.24
111+
, cardano-cli ^>= 9.0
112112
, cardano-crypto-class
113113
, cardano-crypto-wrapper
114114
, cardano-data

cabal.project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ repository cardano-haskell-packages
1313
-- See CONTRIBUTING for information about these, including some Nix commands
1414
-- you need to run if you change them
1515
index-state:
16-
, hackage.haskell.org 2024-06-13T08:49:27Z
17-
, cardano-haskell-packages 2024-06-28T18:16:58Z
16+
, hackage.haskell.org 2024-06-23T23:01:13Z
17+
, cardano-haskell-packages 2024-07-03T01:26:49Z
1818

1919
packages:
2020
cardano-node

cardano-node-chairman/cardano-node-chairman.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cabal-version: 3.0
22

33
name: cardano-node-chairman
4-
version: 8.12.0
4+
version: 9.0.0
55
synopsis: The cardano full node
66
description: The cardano full node.
77
category: Cardano,
@@ -44,7 +44,7 @@ executable cardano-node-chairman
4444
build-depends: cardano-api
4545
, cardano-crypto-class
4646
, cardano-git-rev ^>=0.2.2
47-
, cardano-node ^>= 8.12
47+
, cardano-node ^>= 9.0
4848
, cardano-prelude
4949
, containers
5050
, contra-tracer
@@ -88,5 +88,5 @@ test-suite chairman-tests
8888
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -T"
8989

9090
build-tool-depends: cardano-node:cardano-node
91-
, cardano-cli:cardano-cli ^>= 8.24.0.0
91+
, cardano-cli:cardano-cli ^>= 9.0.0.0
9292
, cardano-node-chairman:cardano-node-chairman

cardano-node/cardano-node.cabal

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cabal-version: 3.0
22

33
name: cardano-node
4-
version: 8.12.2
4+
version: 9.0.0
55
synopsis: The cardano full node
66
description: The cardano full node.
77
category: Cardano,
@@ -145,7 +145,7 @@ library
145145
, async
146146
, base16-bytestring
147147
, bytestring
148-
, cardano-api ^>= 8.48.0.1
148+
, cardano-api ^>= 9.0
149149
, cardano-crypto-class
150150
, cardano-crypto-wrapper
151151
, cardano-git-rev ^>=0.2.2
@@ -186,8 +186,8 @@ library
186186
, network-mux >= 0.4
187187
, nothunks
188188
, optparse-applicative-fork >= 0.18.1
189-
, ouroboros-consensus ^>= 0.19
190-
, ouroboros-consensus-cardano ^>= 0.17
189+
, ouroboros-consensus ^>= 0.20
190+
, ouroboros-consensus-cardano ^>= 0.18
191191
, ouroboros-consensus-diffusion ^>= 0.17
192192
, ouroboros-consensus-protocol
193193
, ouroboros-network-api ^>= 0.7.3

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,7 @@ mkSomeConsensusProtocolCardano NodeByronProtocolConfiguration {
228228
-- version. It is the protocol version that this node will declare
229229
-- that it understands during the Babbage era. That is, it is the
230230
-- version of protocol /after/ Babbage, i.e. Conway.
231-
Praos.babbageProtVer =
232-
if npcExperimentalHardForksEnabled
233-
then ProtVer (natVersion @10) 0
234-
else ProtVer (natVersion @8) 0,
231+
Praos.babbageProtVer = ProtVer (natVersion @9) 0,
235232
Praos.babbageMaxTxCapacityOverrides =
236233
TxLimits.mkOverrides TxLimits.noOverridesMeasure
237234
}
@@ -245,7 +242,7 @@ mkSomeConsensusProtocolCardano NodeByronProtocolConfiguration {
245242
then ProtVer (natVersion @8) 0
246243
else if npcExperimentalHardForksEnabled
247244
then ProtVer (natVersion @10) 0
248-
else ProtVer (natVersion @8) 0,
245+
else ProtVer (natVersion @9) 0,
249246
Praos.conwayMaxTxCapacityOverrides =
250247
TxLimits.mkOverrides TxLimits.noOverridesMeasure
251248
}

cardano-node/src/Cardano/Node/Tracing/Era/Shelley.hs

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,16 @@ instance LogFormatting (Conway.ConwayGovCertPredFailure era) where
131131
, "expectedCoin" .= expectedCoin
132132
, "error" .= String "DRep delegation has incorrect deposit"
133133
]
134-
Conway.ConwayCommitteeHasPreviouslyResigned kHash ->
134+
Conway.ConwayCommitteeHasPreviouslyResigned coldCred ->
135135
[ "kind" .= String "ConwayCommitteeHasPreviouslyResigned"
136-
, "credential" .= String (textShow kHash)
136+
, "credential" .= String (textShow coldCred)
137137
, "error" .= String "Committee has resigned"
138138
]
139+
Conway.ConwayCommitteeIsUnknown coldCred ->
140+
[ "kind" .= String "ConwayCommitteeIsUnknown"
141+
, "credential" .= String (textShow coldCred)
142+
, "error" .= String "Committee is Unknown"
143+
]
139144
Conway.ConwayDRepIncorrectRefund givenRefund expectedRefund ->
140145
[ "kind" .= String "ConwayDRepIncorrectRefund"
141146
, "givenRefund" .= givenRefund
@@ -1080,6 +1085,14 @@ instance
10801085
-- Conway related
10811086
--------------------------------------------------------------------------------
10821087

1088+
instance
1089+
( Ledger.Era era
1090+
, Show (PredicateFailure (Ledger.EraRule "LEDGERS" era))
1091+
) => LogFormatting (Conway.ConwayBbodyPredFailure era) where
1092+
forMachine _ err = mconcat [ "kind" .= String "ConwayBbodyPredFail"
1093+
, "error" .= String (textShow err)
1094+
]
1095+
10831096
instance
10841097
( Consensus.ShelleyBasedEra era
10851098
, LogFormatting (PredicateFailure (Ledger.EraRule "UTXOW" era))
@@ -1088,6 +1101,11 @@ instance
10881101
, LogFormatting (Set (Credential 'Staking (Ledger.EraCrypto era)))
10891102
) => LogFormatting (Conway.ConwayLedgerPredFailure era) where
10901103
forMachine v (Conway.ConwayUtxowFailure f) = forMachine v f
1104+
forMachine _ (Conway.ConwayTxRefScriptsSizeTooBig actual limit) =
1105+
mconcat [ "kind" .= String "ConwayTxRefScriptsSizeTooBig"
1106+
, "actual" .= actual
1107+
, "limit" .= limit
1108+
]
10911109
forMachine v (Conway.ConwayCertsFailure f) = forMachine v f
10921110
forMachine v (Conway.ConwayGovFailure f) = forMachine v f
10931111
forMachine v (Conway.ConwayWdrlNotDelegatedToDRep f) = forMachine v f
@@ -1127,6 +1145,10 @@ instance
11271145
mconcat [ "kind" .= String "DisallowedVoters"
11281146
, "govActionIdToVoter" .= NonEmpty.toList govActionIdToVoter
11291147
]
1148+
forMachine _ (Conway.VotersDoNotExist creds) =
1149+
mconcat [ "kind" .= String "VotersDoNotExist"
1150+
, "credentials" .= creds
1151+
]
11301152
forMachine _ (Conway.ConflictingCommitteeUpdate creds) =
11311153
mconcat [ "kind" .= String "ConflictingCommitteeUpdate"
11321154
, "credentials" .= creds

cardano-node/src/Cardano/Tracing/OrphanInstances/Shelley.hs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ instance ToObject (Conway.ConwayGovCertPredFailure era) where
181181
, "credential" .= String (textShow kHash)
182182
, "error" .= String "Committee has resigned"
183183
]
184+
Conway.ConwayCommitteeIsUnknown kHash ->
185+
[ "kind" .= String "ConwayCommitteeIsUnknown"
186+
, "credential" .= String (textShow kHash)
187+
, "error" .= String "Committee is Unknown"
188+
]
184189
Conway.ConwayDRepIncorrectRefund givenRefund expectedRefund ->
185190
[ "kind" .= String "ConwayDRepIncorrectRefund"
186191
, "givenRefund" .= String (textShow givenRefund)
@@ -311,6 +316,11 @@ instance
311316
, ToObject (Set (Credential 'Staking (Consensus.EraCrypto ledgerera)))
312317
) => ToObject (Conway.ConwayLedgerPredFailure ledgerera) where
313318
toObject verb (Conway.ConwayUtxowFailure f) = toObject verb f
319+
toObject _ (Conway.ConwayTxRefScriptsSizeTooBig actual limit) =
320+
mconcat [ "kind" .= String "ConwayTxRefScriptsSizeTooBig"
321+
, "actual" .= actual
322+
, "limit" .= limit
323+
]
314324
toObject verb (Conway.ConwayCertsFailure f) = toObject verb f
315325
toObject verb (Conway.ConwayGovFailure f) = toObject verb f
316326
toObject verb (Conway.ConwayWdrlNotDelegatedToDRep f) = toObject verb f
@@ -349,6 +359,10 @@ instance Ledger.EraPParams era => ToObject (Conway.ConwayGovPredFailure era) whe
349359
mconcat [ "kind" .= String "DisallowedVoters"
350360
, "govActionIdToVoter" .= NonEmpty.toList govActionIdToVoter
351361
]
362+
toObject _ (Conway.VotersDoNotExist creds) =
363+
mconcat [ "kind" .= String "VotersDoNotExist"
364+
, "credentials" .= creds
365+
]
352366
toObject _ (Conway.ConflictingCommitteeUpdate creds) =
353367
mconcat [ "kind" .= String "ConflictingCommitteeUpdate"
354368
, "credentials" .= creds
@@ -1318,6 +1332,14 @@ instance Ledger.Crypto c => ToObject (PraosChainSelectView c) where
13181332
-- Conway related
13191333
--------------------------------------------------------------------------------
13201334

1335+
instance
1336+
( Ledger.Era ledgerera
1337+
, Show (PredicateFailure (Ledger.EraRule "LEDGERS" ledgerera))
1338+
) => ToObject (Conway.ConwayBbodyPredFailure ledgerera) where
1339+
toObject _ err = mconcat [ "kind" .= String "ConwayBbodyPredFail"
1340+
, "error" .= String (textShow err)
1341+
]
1342+
13211343
instance
13221344
( ToJSON (Alonzo.CollectError ledgerera)
13231345
) => ToObject (ConwayUtxosPredFailure ledgerera) where

cardano-submit-api/cardano-submit-api.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cabal-version: 3.0
22

33
name: cardano-submit-api
4-
version: 8.12.0
4+
version: 9.0.0
55
synopsis: A web server that allows transactions to be POSTed to the cardano chain
66
description: A web server that allows transactions to be POSTed to the cardano chain.
77
homepage: https://github.com/intersectmbo/cardano-node
@@ -39,9 +39,9 @@ library
3939
, aeson
4040
, async
4141
, bytestring
42-
, cardano-api ^>= 8.48.0.1
42+
, cardano-api ^>= 9.0
4343
, cardano-binary
44-
, cardano-cli ^>= 8.24
44+
, cardano-cli ^>= 9.0
4545
, cardano-crypto-class ^>= 2.1.2
4646
, http-media
4747
, iohk-monitoring

0 commit comments

Comments
 (0)