From 269a6de4edbb5cb9a27136f8aadbdc0d3927f4fe Mon Sep 17 00:00:00 2001
From: Jordan Millar <jordan.millar@iohk.io>
Date: Wed, 26 Jun 2024 14:04:15 +0200
Subject: [PATCH 1/5] Update npcExperimentalHardForksEnabled modification on
 Conway era: If this flag is not present in the node's configuration, the node
 declates it understand protocol version 9 (bootstrap era).

If the flag is present the node declares it understand protocol version
10 (useful to keep testing simpler).

(cherry picked from commit 908478e230d85bb7648399724396ef5fd722ed19)
---
 cardano-node/src/Cardano/Node/Protocol/Cardano.hs | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/cardano-node/src/Cardano/Node/Protocol/Cardano.hs b/cardano-node/src/Cardano/Node/Protocol/Cardano.hs
index eb954339fa6..68e801dd983 100644
--- a/cardano-node/src/Cardano/Node/Protocol/Cardano.hs
+++ b/cardano-node/src/Cardano/Node/Protocol/Cardano.hs
@@ -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
         }
@@ -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
         }

From 86f3f7afa88d015c0ab051c261f1b8c32025472e Mon Sep 17 00:00:00 2001
From: Carlos LopezDeLara <carlos.lopezdelara@iohk.io>
Date: Mon, 1 Jul 2024 15:37:59 -0600
Subject: [PATCH 2/5] Integrate node v9.0.0

---
 .../plutus-scripts-bench.cabal                |  2 +-
 bench/tx-generator/tx-generator.cabal         |  4 +--
 cabal.project                                 |  4 +--
 .../cardano-node-chairman.cabal               |  2 +-
 cardano-node/cardano-node.cabal               |  6 ++---
 .../src/Cardano/Node/Tracing/Era/Shelley.hs   | 26 +++++++++++++++++--
 .../Tracing/OrphanInstances/Shelley.hs        | 22 ++++++++++++++++
 cardano-submit-api/cardano-submit-api.cabal   |  4 +--
 cardano-testnet/cardano-testnet.cabal         |  4 +--
 flake.lock                                    | 12 ++++-----
 10 files changed, 65 insertions(+), 21 deletions(-)

diff --git a/bench/plutus-scripts-bench/plutus-scripts-bench.cabal b/bench/plutus-scripts-bench/plutus-scripts-bench.cabal
index 6f8fa798df0..ea93a4a9a24 100644
--- a/bench/plutus-scripts-bench/plutus-scripts-bench.cabal
+++ b/bench/plutus-scripts-bench/plutus-scripts-bench.cabal
@@ -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
diff --git a/bench/tx-generator/tx-generator.cabal b/bench/tx-generator/tx-generator.cabal
index ca3f7d1b400..139b2ecca83 100644
--- a/bench/tx-generator/tx-generator.cabal
+++ b/bench/tx-generator/tx-generator.cabal
@@ -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
diff --git a/cabal.project b/cabal.project
index 91ce8adc373..cf13cd4ad94 100644
--- a/cabal.project
+++ b/cabal.project
@@ -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
diff --git a/cardano-node-chairman/cardano-node-chairman.cabal b/cardano-node-chairman/cardano-node-chairman.cabal
index 735183efd4a..97148aa4781 100644
--- a/cardano-node-chairman/cardano-node-chairman.cabal
+++ b/cardano-node-chairman/cardano-node-chairman.cabal
@@ -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
diff --git a/cardano-node/cardano-node.cabal b/cardano-node/cardano-node.cabal
index 90b5f3787a8..faba9507b75 100644
--- a/cardano-node/cardano-node.cabal
+++ b/cardano-node/cardano-node.cabal
@@ -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
@@ -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
diff --git a/cardano-node/src/Cardano/Node/Tracing/Era/Shelley.hs b/cardano-node/src/Cardano/Node/Tracing/Era/Shelley.hs
index 2643f60f4fc..4dd0725e8f8 100644
--- a/cardano-node/src/Cardano/Node/Tracing/Era/Shelley.hs
+++ b/cardano-node/src/Cardano/Node/Tracing/Era/Shelley.hs
@@ -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
@@ -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))
@@ -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
@@ -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
diff --git a/cardano-node/src/Cardano/Tracing/OrphanInstances/Shelley.hs b/cardano-node/src/Cardano/Tracing/OrphanInstances/Shelley.hs
index 27059c75f1b..2fc41ecfe63 100644
--- a/cardano-node/src/Cardano/Tracing/OrphanInstances/Shelley.hs
+++ b/cardano-node/src/Cardano/Tracing/OrphanInstances/Shelley.hs
@@ -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)
@@ -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
@@ -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
@@ -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
diff --git a/cardano-submit-api/cardano-submit-api.cabal b/cardano-submit-api/cardano-submit-api.cabal
index bd904d2c815..3e9432c8a42 100644
--- a/cardano-submit-api/cardano-submit-api.cabal
+++ b/cardano-submit-api/cardano-submit-api.cabal
@@ -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
diff --git a/cardano-testnet/cardano-testnet.cabal b/cardano-testnet/cardano-testnet.cabal
index a87c80bf840..90793126fd1 100644
--- a/cardano-testnet/cardano-testnet.cabal
+++ b/cardano-testnet/cardano-testnet.cabal
@@ -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
diff --git a/flake.lock b/flake.lock
index 2717c33fe54..b588a14e981 100644
--- a/flake.lock
+++ b/flake.lock
@@ -3,11 +3,11 @@
     "CHaP": {
       "flake": false,
       "locked": {
-        "lastModified": 1719609872,
-        "narHash": "sha256-a6M9mYbJh4ctk4aOpkyztmFOt0H72GK1Gg4BbV8atTU=",
+        "lastModified": 1719971647,
+        "narHash": "sha256-Q/u1ZklzmymTSSY6/F48rGsWewVYf108torqR9+nFJU=",
         "owner": "intersectmbo",
         "repo": "cardano-haskell-packages",
-        "rev": "9ad99f2c3fb290ceab85c98b4761622cd9e2d97c",
+        "rev": "bfd6987c14410757c6cde47e6c45621e9664347f",
         "type": "github"
       },
       "original": {
@@ -544,11 +544,11 @@
     "hackageNix": {
       "flake": false,
       "locked": {
-        "lastModified": 1718757495,
-        "narHash": "sha256-xviuxucDjsQ2HbqzfwVyB4ZmDIyzOnf2oDbVtwBHIco=",
+        "lastModified": 1719794527,
+        "narHash": "sha256-qHo/KumtwAzPkfLWODu/6EFY/LeK+C7iPJyAUdT8tGA=",
         "owner": "input-output-hk",
         "repo": "hackage.nix",
-        "rev": "0bb764772a383a926e3f945397a0e59ab3c64d6d",
+        "rev": "da2a3bc9bd1b3dd41bb147279529c471c615fd3e",
         "type": "github"
       },
       "original": {

From 7b910f9c0a71623b4b53dea453a5a56eab28e63d Mon Sep 17 00:00:00 2001
From: Mateusz Galazyn <mateusz.galazyn@iohk.io>
Date: Wed, 3 Jul 2024 12:17:50 +0200
Subject: [PATCH 3/5] Fix tx-generator error handling for new cardano-api

---
 .../src/Cardano/Benchmarking/Script/Core.hs   | 26 ++++++++-----------
 1 file changed, 11 insertions(+), 15 deletions(-)

diff --git a/bench/tx-generator/src/Cardano/Benchmarking/Script/Core.hs b/bench/tx-generator/src/Cardano/Benchmarking/Script/Core.hs
index 7860d2e30d2..f0dc04d4c30 100644
--- a/bench/tx-generator/src/Cardano/Benchmarking/Script/Core.hs
+++ b/bench/tx-generator/src/Cardano/Benchmarking/Script/Core.hs
@@ -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
@@ -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

From cdb8e1cc49c05697dff75a53b1cc5f82c06b987e Mon Sep 17 00:00:00 2001
From: Mateusz Galazyn <mateusz.galazyn@iohk.io>
Date: Wed, 3 Jul 2024 13:05:31 +0200
Subject: [PATCH 4/5] Use cardano-cli era-independent hash command

---
 cardano-testnet/src/Testnet/Process/Cli/DRep.hs             | 3 +--
 .../Cardano/Testnet/Test/Gov/CommitteeAddNew.hs             | 2 +-
 .../Cardano/Testnet/Test/Gov/InfoAction.hs                  | 3 +--
 .../Cardano/Testnet/Test/Gov/NoConfidence.hs                | 3 +--
 .../Cardano/Testnet/Test/Gov/PredefinedAbstainDRep.hs       | 3 +--
 .../Cardano/Testnet/Test/Gov/ProposeNewConstitution.hs      | 6 ++----
 .../Cardano/Testnet/Test/Gov/ProposeNewConstitutionSPO.hs   | 6 ++----
 .../Cardano/Testnet/Test/Gov/TreasuryWithdrawal.hs          | 3 +--
 8 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/cardano-testnet/src/Testnet/Process/Cli/DRep.hs b/cardano-testnet/src/Testnet/Process/Cli/DRep.hs
index 4793f60e41c..0181cdcaf31 100644
--- a/cardano-testnet/src/Testnet/Process/Cli/DRep.hs
+++ b/cardano-testnet/src/Testnet/Process/Cli/DRep.hs
@@ -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
diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/CommitteeAddNew.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/CommitteeAddNew.hs
index ec9ef77c4ce..36c2e3b6ac9 100644
--- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/CommitteeAddNew.hs
+++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/CommitteeAddNew.hs
@@ -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
     ]
 
diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/InfoAction.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/InfoAction.hs
index 2f1cf2d0b03..891fdadafa7 100644
--- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/InfoAction.hs
+++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/InfoAction.hs
@@ -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"
diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/NoConfidence.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/NoConfidence.hs
index 47049cdb6f5..da81f6efba0 100644
--- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/NoConfidence.hs
+++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/NoConfidence.hs
@@ -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
     ]
 
 
diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/PredefinedAbstainDRep.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/PredefinedAbstainDRep.hs
index e1d65971fcd..25c27074c31 100644
--- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/PredefinedAbstainDRep.hs
+++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/PredefinedAbstainDRep.hs
@@ -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
diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/ProposeNewConstitution.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/ProposeNewConstitution.hs
index ff0051e413c..1cc4369423d 100644
--- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/ProposeNewConstitution.hs
+++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/ProposeNewConstitution.hs
@@ -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"
diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/ProposeNewConstitutionSPO.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/ProposeNewConstitutionSPO.hs
index 2a13855f00a..17eaa4579da 100644
--- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/ProposeNewConstitutionSPO.hs
+++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/ProposeNewConstitutionSPO.hs
@@ -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"
diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/TreasuryWithdrawal.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/TreasuryWithdrawal.hs
index 67577d433a2..45b5a819faa 100644
--- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/TreasuryWithdrawal.hs
+++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/TreasuryWithdrawal.hs
@@ -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

From 115344c95ba21bef4d795ceac517b45884be1dec Mon Sep 17 00:00:00 2001
From: Samuel Leathers <samuel.leathers@iohk.io>
Date: Wed, 3 Jul 2024 13:17:14 -0400
Subject: [PATCH 5/5] bump node/submit-api versions to 9.0

---
 cardano-node-chairman/cardano-node-chairman.cabal | 4 ++--
 cardano-node/cardano-node.cabal                   | 2 +-
 cardano-submit-api/cardano-submit-api.cabal       | 2 +-
 cardano-testnet/cardano-testnet.cabal             | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/cardano-node-chairman/cardano-node-chairman.cabal b/cardano-node-chairman/cardano-node-chairman.cabal
index 97148aa4781..5fc39fa96b1 100644
--- a/cardano-node-chairman/cardano-node-chairman.cabal
+++ b/cardano-node-chairman/cardano-node-chairman.cabal
@@ -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,
@@ -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
diff --git a/cardano-node/cardano-node.cabal b/cardano-node/cardano-node.cabal
index faba9507b75..cf91dfcaa1b 100644
--- a/cardano-node/cardano-node.cabal
+++ b/cardano-node/cardano-node.cabal
@@ -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,
diff --git a/cardano-submit-api/cardano-submit-api.cabal b/cardano-submit-api/cardano-submit-api.cabal
index 3e9432c8a42..add55d96e2e 100644
--- a/cardano-submit-api/cardano-submit-api.cabal
+++ b/cardano-submit-api/cardano-submit-api.cabal
@@ -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
diff --git a/cardano-testnet/cardano-testnet.cabal b/cardano-testnet/cardano-testnet.cabal
index 90793126fd1..84542744d8b 100644
--- a/cardano-testnet/cardano-testnet.cabal
+++ b/cardano-testnet/cardano-testnet.cabal
@@ -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.