From d004d34d951d3ba6d39c2953678aa0f6c8a56fb6 Mon Sep 17 00:00:00 2001 From: Jordan Millar Date: Fri, 19 Dec 2025 16:10:34 -0400 Subject: [PATCH 1/2] No certificate was in tx! --- .../plutus-scripts-bench.cabal | 2 +- bench/tx-generator/tx-generator.cabal | 2 +- cabal.project | 20 ++++++++++++++++ cardano-node/cardano-node.cabal | 2 +- cardano-submit-api/cardano-submit-api.cabal | 2 +- cardano-testnet/cardano-testnet.cabal | 2 +- .../Testnet/Test/Gov/CommitteeAddNew.hs | 23 ++++++++++++++++++- 7 files changed, 47 insertions(+), 6 deletions(-) diff --git a/bench/plutus-scripts-bench/plutus-scripts-bench.cabal b/bench/plutus-scripts-bench/plutus-scripts-bench.cabal index f01eb46d08e..a9d22c097a5 100644 --- a/bench/plutus-scripts-bench/plutus-scripts-bench.cabal +++ b/bench/plutus-scripts-bench/plutus-scripts-bench.cabal @@ -82,7 +82,7 @@ library -- IOG dependencies -------------------------- build-depends: - , cardano-api ^>=10.19 + , cardano-api ^>=10.20 , plutus-ledger-api ^>=1.53 , plutus-tx ^>=1.53 , plutus-tx-plugin ^>=1.53 diff --git a/bench/tx-generator/tx-generator.cabal b/bench/tx-generator/tx-generator.cabal index 5beffe64a9d..cae0f4170cb 100644 --- a/bench/tx-generator/tx-generator.cabal +++ b/bench/tx-generator/tx-generator.cabal @@ -111,7 +111,7 @@ library , attoparsec-aeson , base16-bytestring , bytestring - , cardano-api ^>= 10.19 + , cardano-api ^>= 10.20 , cardano-binary , cardano-cli ^>= 10.13 , cardano-crypto-class diff --git a/cabal.project b/cabal.project index 3ef2447a9db..6502f5bbf68 100644 --- a/cabal.project +++ b/cabal.project @@ -72,3 +72,23 @@ if impl (ghc >= 9.12) -- IMPORTANT -- Do NOT add more source-repository-package stanzas here unless they are strictly -- temporary! Please read the section in CONTRIBUTING about updating dependencies. + + + +source-repository-package + type: git + location: https://github.com/IntersectMBO/cardano-api.git + tag: 597d4717fc51595305b5ba6fbf7ec39427214d12 + --sha256: sha256-klUKFbN5x25q72okX6yUpZ1zRS64KnvKlbq/Btw3ilw= + subdir: cardano-api + + + + + +source-repository-package + type: git + location: https://github.com/IntersectMBO/cardano-cli.git + tag: 9460503d94187455bda7fbf8669021974a80d3aa + --sha256: sha256-klUKFbN5x25q72okX6yUpZ1zRS64KnvKlbq/Btw3ilw= + subdir: cardano-cli \ No newline at end of file diff --git a/cardano-node/cardano-node.cabal b/cardano-node/cardano-node.cabal index 8eac42d6384..f8c5f253987 100644 --- a/cardano-node/cardano-node.cabal +++ b/cardano-node/cardano-node.cabal @@ -138,7 +138,7 @@ library , async , base16-bytestring , bytestring - , cardano-api ^>= 10.19 + , cardano-api ^>= 10.20 , cardano-crypto-class ^>=2.2.3.2 , cardano-crypto-wrapper , cardano-git-rev ^>=0.2.2 diff --git a/cardano-submit-api/cardano-submit-api.cabal b/cardano-submit-api/cardano-submit-api.cabal index 9e9cc03aba1..e7c590794df 100644 --- a/cardano-submit-api/cardano-submit-api.cabal +++ b/cardano-submit-api/cardano-submit-api.cabal @@ -39,7 +39,7 @@ library , aeson , async , bytestring - , cardano-api ^>= 10.19 + , cardano-api ^>= 10.20 , cardano-binary , cardano-cli ^>= 10.13 , cardano-crypto-class ^>=2.2.3.2 diff --git a/cardano-testnet/cardano-testnet.cabal b/cardano-testnet/cardano-testnet.cabal index c7238d39b58..6a20206b928 100644 --- a/cardano-testnet/cardano-testnet.cabal +++ b/cardano-testnet/cardano-testnet.cabal @@ -41,7 +41,7 @@ library , annotated-exception , ansi-terminal , bytestring - , cardano-api ^>= 10.19 + , cardano-api ^>= 10.20 , cardano-cli:{cardano-cli, cardano-cli-test-lib} ^>= 10.13 , cardano-crypto-class ^>=2.2.3.2 , cardano-crypto-wrapper 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 6b7ed5028c2..81e598f859a 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 @@ -131,6 +131,7 @@ hprop_constitutional_committee_add_new = integrationWorkspace "constitutional-co createStakeKeyRegistrationCertificate tempAbsPath (AnyShelleyBasedEra sbe) (verificationKey stakeKeys) keyDeposit stakeCertFp + stakeCertTxBodyFp <- H.note $ work "stake.registration.txbody" stakeCertTxSignedFp <- H.note $ work "stake.registration.tx" @@ -153,14 +154,20 @@ hprop_constitutional_committee_add_new = integrationWorkspace "constitutional-co , "--signing-key-file", signingKeyFp stakeKeys , "--out-file", stakeCertTxSignedFp ] + -- TODO: Left off here. No certificate was in transaction! + stakeCertTx <- execCli' execConfig + ["debug", "transaction" + , "view", "--output-json", "--tx-file", stakeCertTxSignedFp + ] + H.note_ $ "Stake registration transaction: " <> stakeCertTx void $ execCli' execConfig [ eraName, "transaction", "submit" , "--tx-file", stakeCertTxSignedFp ] -- make sure that stake registration cert gets into a block - _ <- waitForBlocks epochStateView 1 + _ <- waitForBlocks epochStateView 15 minGovActDeposit <- getMinGovActionDeposit epochStateView ceo @@ -187,6 +194,20 @@ hprop_constitutional_committee_add_new = integrationWorkspace "constitutional-co txbodyFp <- H.note $ work "tx.body" txin1' <- findLargestUtxoForPaymentKey epochStateView sbe wallet0 + + + void $ execCli' execConfig + [ eraName, "stake-address", "key-hash" + , "--stake-verification-key-file", verificationKeyFp stakeKeys + , "--out-file", gov "stake-hash.addr" + ] + + stakeKeyHash <- H.readFile $ gov "stake-hash.addr" + + H.note_ $ "Stake key hash:" <> stakeKeyHash + + + -- Create temporary HTTP server with files required by the call to `cardano-cli` -- In this case, the server emulates an IPFS gateway serveFilesWhile From 043f68436db75eaf8eac25dd9ddc9f22637e9799 Mon Sep 17 00:00:00 2001 From: Jordan Millar Date: Tue, 23 Dec 2025 10:20:35 -0400 Subject: [PATCH 2/2] Bump api and cli Use always succeeds instead --- cabal.project | 8 ++++---- .../Cardano/Testnet/Test/Cli/Plutus/Scripts.hs | 13 ++++++++----- .../Cardano/Testnet/Test/Gov/CommitteeAddNew.hs | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/cabal.project b/cabal.project index 6502f5bbf68..26974e46c32 100644 --- a/cabal.project +++ b/cabal.project @@ -78,8 +78,8 @@ if impl (ghc >= 9.12) source-repository-package type: git location: https://github.com/IntersectMBO/cardano-api.git - tag: 597d4717fc51595305b5ba6fbf7ec39427214d12 - --sha256: sha256-klUKFbN5x25q72okX6yUpZ1zRS64KnvKlbq/Btw3ilw= + tag: 32310d48b17daa6f2942dff63372389987812f58 + --sha256: sha256-Kl/nUvzQ+O0LjIGECpd5AS5GnMuXIpDp1hH5Kz1irsc= subdir: cardano-api @@ -89,6 +89,6 @@ source-repository-package source-repository-package type: git location: https://github.com/IntersectMBO/cardano-cli.git - tag: 9460503d94187455bda7fbf8669021974a80d3aa - --sha256: sha256-klUKFbN5x25q72okX6yUpZ1zRS64KnvKlbq/Btw3ilw= + tag: de2b268e656e64c5ef211a2a8607043e311ba2a2 + --sha256: sha256-bCPtVGFxqvM/ihkdKjXp39AHMo1yd04kwTujMLJ1fMo= subdir: cardano-cli \ No newline at end of file diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Plutus/Scripts.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Plutus/Scripts.hs index 04af096fb13..9ac1a32eebc 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Plutus/Scripts.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Plutus/Scripts.hs @@ -44,7 +44,7 @@ import qualified Hedgehog.Extras as H -- Voting NO -- Proposing NO -- Execute me with: --- @DISABLE_RETRIES=1 cabal run cardano-testnet-test -- -p "/Spec.hs.Spec.Ledger Events.Plutus.Scripts/"@ +-- @DISABLE_RETRIES=1 cabal run cardano-testnet-test -- -p "/PlutusV3 purposes/"@ hprop_plutus_purposes_v3 :: Property hprop_plutus_purposes_v3 = integrationWorkspace "all-plutus-script-purposes" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath' @@ -190,11 +190,12 @@ hprop_plutus_purposes_v3 = integrationWorkspace "all-plutus-script-purposes" $ \ ] H.success - +-- TODO: Left off here. The transaction has a v3 script but you are reading a v2 script! +-- The hash is also different inside the transaction! -- | -- Execute me with: --- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/PlutusV2 Create transaction with two script certs/"'@ +-- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/PlutusV2 transaction with two script certs/"'@ hprop_tx_two_script_certs_v2 :: Property hprop_tx_two_script_certs_v2 = integrationWorkspace "tx-2-script-certs" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath' @@ -229,7 +230,7 @@ hprop_tx_two_script_certs_v2 = integrationWorkspace "tx-2-script-certs" $ \tempA txin <- T.unpack . renderTxIn <$> findLargestUtxoForPaymentKey epochStateView sbe wallet0 plutusScript <- H.note $ work "always-succeeds-script.plutusV2" - H.writeFile plutusScript $ T.unpack plutusV2StakeScript + H.writeFile plutusScript $ T.unpack plutusV3Script scriptStakeRegistrationCertificate <- H.note $ work "script-stake-registration-certificate" @@ -257,7 +258,9 @@ hprop_tx_two_script_certs_v2 = integrationWorkspace "tx-2-script-certs" $ \tempA let txbody = work "two-certs-tx-body" tx = work "two-certs-tx" txout = mconcat [ utxoAddr, "+", show @Int 2_000_000 ] - + + s <- execCli' execConfig [anyEraToString anyEra, "transaction", "policyid", "--script-file", plutusScript] + H.note_ $ "Script hash: " <> s let txBuildArgs = [ anyEraToString anyEra, "transaction", "build" , "--change-address", T.unpack $ paymentKeyInfoAddr wallet0 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 81e598f859a..2ee101ed924 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 @@ -157,7 +157,7 @@ hprop_constitutional_committee_add_new = integrationWorkspace "constitutional-co -- TODO: Left off here. No certificate was in transaction! stakeCertTx <- execCli' execConfig ["debug", "transaction" - , "view", "--output-json", "--tx-file", stakeCertTxSignedFp + , "view", "--output-json", "--tx-body-file", stakeCertTxBodyFp ] H.note_ $ "Stake registration transaction: " <> stakeCertTx