From 03579412b4a52d7b6e6f32fac6187c85c07b3626 Mon Sep 17 00:00:00 2001 From: Mateusz Galazyn Date: Mon, 16 Mar 2026 22:59:50 +0100 Subject: [PATCH 1/5] Add chainpoint check to gRPC test --- .../plutus-scripts-bench.cabal | 2 +- bench/tx-generator/tx-generator.cabal | 2 +- cardano-node/cardano-node.cabal | 2 +- cardano-submit-api/cardano-submit-api.cabal | 2 +- cardano-testnet/cardano-testnet.cabal | 2 +- .../Cardano/Testnet/Test/Rpc/Query.hs | 22 +++++++++++++++++-- 6 files changed, 25 insertions(+), 7 deletions(-) diff --git a/bench/plutus-scripts-bench/plutus-scripts-bench.cabal b/bench/plutus-scripts-bench/plutus-scripts-bench.cabal index b0812288828..f9978979ae7 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 ^>=11.0 + , cardano-api ^>=11.1 , plutus-ledger-api ^>=1.63 , plutus-tx ^>=1.63 , plutus-tx-plugin ^>=1.63 diff --git a/bench/tx-generator/tx-generator.cabal b/bench/tx-generator/tx-generator.cabal index ef230e3e003..a7774d8112e 100644 --- a/bench/tx-generator/tx-generator.cabal +++ b/bench/tx-generator/tx-generator.cabal @@ -109,7 +109,7 @@ library , attoparsec-aeson , base16-bytestring , bytestring - , cardano-api ^>= 11.0 + , cardano-api ^>= 11.1 , cardano-binary , cardano-cli ^>= 11.0 , cardano-crypto-class diff --git a/cardano-node/cardano-node.cabal b/cardano-node/cardano-node.cabal index da3d9cc7b07..66424db9e0f 100644 --- a/cardano-node/cardano-node.cabal +++ b/cardano-node/cardano-node.cabal @@ -138,7 +138,7 @@ library , async , base16-bytestring , bytestring - , cardano-api ^>= 11.0 + , cardano-api ^>= 11.1 , cardano-data , cardano-crypto-class ^>=2.3 , cardano-crypto-wrapper diff --git a/cardano-submit-api/cardano-submit-api.cabal b/cardano-submit-api/cardano-submit-api.cabal index 6ef4ff984f7..b92b792d0c5 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 ^>= 11.0 + , cardano-api ^>= 11.1 , cardano-binary , cardano-cli ^>= 11.0 , cardano-crypto-class ^>=2.3 diff --git a/cardano-testnet/cardano-testnet.cabal b/cardano-testnet/cardano-testnet.cabal index 3d24101a0ad..dd40bcdefef 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 ^>= 11.0 + , cardano-api ^>= 11.1 , cardano-cli:{cardano-cli, cardano-cli-test-lib} ^>= 11.0 , cardano-crypto-class ^>=2.3 , cardano-crypto-wrapper diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/Query.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/Query.hs index 417f0a35e2e..3029ff10363 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/Query.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/Query.hs @@ -28,15 +28,19 @@ import Cardano.Testnet import Prelude import Control.Exception +import Control.Monad import qualified Data.ByteString.Short as SBS import Data.Default.Class import qualified Data.Map.Strict as M +import Data.Time.Clock.POSIX (utcTimeToPOSIXSeconds) +import Data.Word (Word64) import Lens.Micro import Testnet.Components.Query import Testnet.Process.Run import Testnet.Property.Util (integrationRetryWorkspace) import Testnet.Start.Types +import Testnet.Types (nodeConnectionInfo) import Hedgehog import qualified Hedgehog as H @@ -56,7 +60,7 @@ hprop_rpc_query_pparams = integrationRetryWorkspace 2 "rpc-query-pparams" $ \tem creationOptions = def{creationEra = AnyShelleyBasedEra sbe} runtimeOptions = def{runtimeEnableRpc = RpcEnabled} - TestnetRuntime + tr@TestnetRuntime { testnetMagic , configurationFile , testnetNodes = node0@TestnetNode{nodeSprocket} : _ @@ -79,6 +83,20 @@ hprop_rpc_query_pparams = integrationRetryWorkspace 2 "rpc-query-pparams" $ \tem ChainTipAtGenesis -> H.failure -- impossible ChainTip (SlotNo slot) (HeaderHash hash) (BlockNo blockNo) -> pure (slot, SBS.fromShort hash, blockNo) + ----------------------------------- + -- Compute expected tip timestamp + ----------------------------------- + connectionInfo <- nodeConnectionInfo tr 0 + (systemStart, eraHistory) <- + (H.leftFail <=< H.leftFailM) . H.evalIO $ + executeLocalStateQueryExpr connectionInfo VolatileTip $ do + ss <- querySystemStart + eh <- queryEraHistory + pure $ (,) <$> ss <*> eh + expectedTimestamp :: Word64 <- H.leftFail $ do + utcTime <- slotToUTCTime systemStart eraHistory (SlotNo slot) + pure (round $ utcTimeToPOSIXSeconds utcTime * 1000) + -------------- -- RPC queries -------------- @@ -99,7 +117,7 @@ hprop_rpc_query_pparams = integrationRetryWorkspace 2 "rpc-query-pparams" $ \tem pparamsResponse ^. U5c.ledgerTip . U5c.slot === slot pparamsResponse ^. U5c.ledgerTip . U5c.hash === blockHash pparamsResponse ^. U5c.ledgerTip . U5c.height === blockNo - pparamsResponse ^. U5c.ledgerTip . U5c.timestamp === 0 -- not possible to implement at this moment + pparamsResponse ^. U5c.ledgerTip . U5c.timestamp === expectedTimestamp -- https://docs.cardano.org/about-cardano/explore-more/parameter-guide let chainParams = pparamsResponse ^. U5c.values . U5c.cardano From 6820b8f9fa20e1f8e3c943c4d96707686991547c Mon Sep 17 00:00:00 2001 From: Mateusz Galazyn Date: Thu, 21 May 2026 08:21:21 +0200 Subject: [PATCH 2/5] Add SRPs for cardano-api & cardano-cli --- .../plutus-scripts-bench.cabal | 2 +- bench/tx-generator/tx-generator.cabal | 2 +- cabal.project | 17 +++++++++++++++++ cardano-node/cardano-node.cabal | 2 +- cardano-submit-api/cardano-submit-api.cabal | 2 +- cardano-testnet/cardano-testnet.cabal | 2 +- 6 files changed, 22 insertions(+), 5 deletions(-) diff --git a/bench/plutus-scripts-bench/plutus-scripts-bench.cabal b/bench/plutus-scripts-bench/plutus-scripts-bench.cabal index f9978979ae7..b644864f1df 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 ^>=11.1 + , cardano-api ^>=11.2 , plutus-ledger-api ^>=1.63 , plutus-tx ^>=1.63 , plutus-tx-plugin ^>=1.63 diff --git a/bench/tx-generator/tx-generator.cabal b/bench/tx-generator/tx-generator.cabal index a7774d8112e..ada35ea008c 100644 --- a/bench/tx-generator/tx-generator.cabal +++ b/bench/tx-generator/tx-generator.cabal @@ -109,7 +109,7 @@ library , attoparsec-aeson , base16-bytestring , bytestring - , cardano-api ^>= 11.1 + , cardano-api ^>= 11.2 , cardano-binary , cardano-cli ^>= 11.0 , cardano-crypto-class diff --git a/cabal.project b/cabal.project index 7d699e8d362..5eed2b4b155 100644 --- a/cabal.project +++ b/cabal.project @@ -91,3 +91,20 @@ allow-newer: -- 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/input-output-hk/cardano-api + tag: fb5e86c8f12f8fe94c0ab46fbaf40b9ceec0306c + --sha256: sha256-PLACEHOLDER + subdir: + cardano-api + cardano-rpc + +source-repository-package + type: git + location: https://github.com/input-output-hk/cardano-cli + tag: db5a030114ea7de8db9b8c7b322b242a75678008 + --sha256: sha256-PLACEHOLDER + subdir: + cardano-cli + diff --git a/cardano-node/cardano-node.cabal b/cardano-node/cardano-node.cabal index 66424db9e0f..e84cad0e956 100644 --- a/cardano-node/cardano-node.cabal +++ b/cardano-node/cardano-node.cabal @@ -138,7 +138,7 @@ library , async , base16-bytestring , bytestring - , cardano-api ^>= 11.1 + , cardano-api ^>= 11.2 , cardano-data , cardano-crypto-class ^>=2.3 , cardano-crypto-wrapper diff --git a/cardano-submit-api/cardano-submit-api.cabal b/cardano-submit-api/cardano-submit-api.cabal index b92b792d0c5..15db9809b05 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 ^>= 11.1 + , cardano-api ^>= 11.2 , cardano-binary , cardano-cli ^>= 11.0 , cardano-crypto-class ^>=2.3 diff --git a/cardano-testnet/cardano-testnet.cabal b/cardano-testnet/cardano-testnet.cabal index dd40bcdefef..6142ff6a885 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 ^>= 11.1 + , cardano-api ^>= 11.2 , cardano-cli:{cardano-cli, cardano-cli-test-lib} ^>= 11.0 , cardano-crypto-class ^>=2.3 , cardano-crypto-wrapper From b1dce7a5b4a05e962f2a192a87f96c72fd54919a Mon Sep 17 00:00:00 2001 From: Mateusz Galazyn Date: Thu, 21 May 2026 08:26:19 +0200 Subject: [PATCH 3/5] squash: chainpoint --- .../src/Cardano/Node/Protocol/Shelley.hs | 1 + cardano-testnet/src/Testnet/Process/Cli/SPO.hs | 1 + cardano-testnet/src/Testnet/Property/Assert.hs | 1 + .../Cardano/Testnet/Test/Rpc/Query.hs | 17 +++++++++++------ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/cardano-node/src/Cardano/Node/Protocol/Shelley.hs b/cardano-node/src/Cardano/Node/Protocol/Shelley.hs index c80f15a9363..5f63b9b3a99 100644 --- a/cardano-node/src/Cardano/Node/Protocol/Shelley.hs +++ b/cardano-node/src/Cardano/Node/Protocol/Shelley.hs @@ -26,6 +26,7 @@ module Cardano.Node.Protocol.Shelley import Cardano.Api hiding (FileError) import qualified Cardano.Api as Api +import Cardano.Api.Experimental.Certificate (OperationalCertificate (..), getHotKey) import qualified Cardano.Crypto.Hash.Class as Crypto import Cardano.Ledger.BaseTypes (ProtVer (..), natVersion) diff --git a/cardano-testnet/src/Testnet/Process/Cli/SPO.hs b/cardano-testnet/src/Testnet/Process/Cli/SPO.hs index 703ff345b65..6b976ff5a17 100644 --- a/cardano-testnet/src/Testnet/Process/Cli/SPO.hs +++ b/cardano-testnet/src/Testnet/Process/Cli/SPO.hs @@ -16,6 +16,7 @@ module Testnet.Process.Cli.SPO ) where import Cardano.Api hiding (cardanoEra) +import Cardano.Api.Experimental.Certificate (PoolId) import qualified Cardano.Api.Ledger as L import qualified Cardano.Ledger.Shelley.LedgerState as L diff --git a/cardano-testnet/src/Testnet/Property/Assert.hs b/cardano-testnet/src/Testnet/Property/Assert.hs index 2c0e6a0afd1..2e610847b86 100644 --- a/cardano-testnet/src/Testnet/Property/Assert.hs +++ b/cardano-testnet/src/Testnet/Property/Assert.hs @@ -16,6 +16,7 @@ module Testnet.Property.Assert import Cardano.Api hiding (Value) +import Cardano.Api.Experimental.Certificate (PoolId) import Prelude hiding (lines) diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/Query.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/Query.hs index 3029ff10363..68936373112 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/Query.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/Query.hs @@ -34,6 +34,7 @@ import Data.Default.Class import qualified Data.Map.Strict as M import Data.Time.Clock.POSIX (utcTimeToPOSIXSeconds) import Data.Word (Word64) +import GHC.Exts (toList) import Lens.Micro import Testnet.Components.Query @@ -93,9 +94,9 @@ hprop_rpc_query_pparams = integrationRetryWorkspace 2 "rpc-query-pparams" $ \tem ss <- querySystemStart eh <- queryEraHistory pure $ (,) <$> ss <*> eh - expectedTimestamp :: Word64 <- H.leftFail $ do + expectedTimestampMs :: Word64 <- H.leftFail $ do utcTime <- slotToUTCTime systemStart eraHistory (SlotNo slot) - pure (round $ utcTimeToPOSIXSeconds utcTime * 1000) + pure . round $ utcTimeToPOSIXSeconds utcTime * 1000 -------------- -- RPC queries @@ -107,7 +108,10 @@ hprop_rpc_query_pparams = integrationRetryWorkspace 2 "rpc-query-pparams" $ \tem Rpc.nonStreaming conn (Rpc.rpc @(Rpc.Protobuf U5c.QueryService "readParams")) req utxos' <- do - let req = Rpc.defMessage + let req = Rpc.defMessage & U5c.keys .~ + [ def & U5c.hash .~ serialiseToRawBytes tid & U5c.index .~ fromIntegral tix + | (TxIn tid (TxIx tix), _) <- toList utxos + ] Rpc.nonStreaming conn (Rpc.rpc @(Rpc.Protobuf U5c.QueryService "readUtxos")) req pure (pparams', utxos') @@ -117,7 +121,7 @@ hprop_rpc_query_pparams = integrationRetryWorkspace 2 "rpc-query-pparams" $ \tem pparamsResponse ^. U5c.ledgerTip . U5c.slot === slot pparamsResponse ^. U5c.ledgerTip . U5c.hash === blockHash pparamsResponse ^. U5c.ledgerTip . U5c.height === blockNo - pparamsResponse ^. U5c.ledgerTip . U5c.timestamp === expectedTimestamp + H.assertWithinTolerance (pparamsResponse ^. U5c.ledgerTip . U5c.timestamp) expectedTimestampMs 1000 -- https://docs.cardano.org/about-cardano/explore-more/parameter-guide let chainParams = pparamsResponse ^. U5c.values . U5c.cardano @@ -125,9 +129,10 @@ hprop_rpc_query_pparams = integrationRetryWorkspace 2 "rpc-query-pparams" $ \tem pparams ^. L.ppCoinsPerUTxOByteL . to L.unCoinPerByte . to L.fromCompact . to L.unCoin ===^ chainParams ^. U5c.coinsPerUtxoByte . to utxoRpcBigIntToInteger pparams ^. L.ppMaxTxSizeL === chainParams ^. U5c.maxTxSize . to fromIntegral - pparams ^. L.ppTxFeeFixedL ===^ chainParams ^. U5c.minFeeCoefficient . to (fmap L.Coin . utxoRpcBigIntToInteger) - pparams ^. L.ppTxFeePerByteL . to L.unCoinPerByte . to L.fromCompact . to L.unCoin + pparams ^. L.ppTxFeeFixedL . to L.unCoin ===^ chainParams ^. U5c.minFeeConstant . to utxoRpcBigIntToInteger + pparams ^. L.ppTxFeePerByteL . to L.unCoinPerByte . to L.fromCompact . to L.unCoin + ===^ chainParams ^. U5c.minFeeCoefficient . to utxoRpcBigIntToInteger pparams ^. L.ppMaxBBSizeL === chainParams ^. U5c.maxBlockBodySize . to fromIntegral pparams ^. L.ppMaxBHSizeL === chainParams ^. U5c.maxBlockHeaderSize . to fromIntegral pparams ^. L.ppKeyDepositL ===^ chainParams ^. U5c.stakeKeyDeposit . to (fmap L.Coin . utxoRpcBigIntToInteger) From f3422b64bdc429d41e6d0745d7d37da5bd1578b2 Mon Sep 17 00:00:00 2001 From: Mateusz Galazyn Date: Thu, 21 May 2026 08:27:30 +0200 Subject: [PATCH 4/5] Fix ProposeNewConstitution flaky test --- .../Test/Gov/ProposeNewConstitution.hs | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) 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 0e8df21398f..27f65ced962 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 @@ -261,16 +261,7 @@ hprop_ledger_events_propose_new_constitution = integrationRetryWorkspace 2 "prop length (filter ((== L.Abstain) . snd) votes) === 2 length votes === fromIntegral numVotes - -- We check that constitution was successfully ratified - void . H.leftFailM . H.evalIO . runExceptT $ - foldEpochState - configurationFile - socketPath - FullValidation - (EpochNo 10) - () - (\epochState _ _ -> foldBlocksCheckConstitutionWasRatified constitutionHash constitutionScriptHash epochState) - + -- Query proposals via CLI before ratification - the proposal may be removed after ratification proposalsJSON :: Aeson.Value <- execCliStdoutToJson execConfig [ eraName, "query", "proposals", "--governance-action-tx-id", prettyShow txId , "--governance-action-index", "0" @@ -338,6 +329,16 @@ hprop_ledger_events_propose_new_constitution = integrationRetryWorkspace 2 "prop proposalsStakePoolVotes <- H.evalMaybe $ proposal ^? Aeson.key "stakePoolVotes" . Aeson._Object proposalsStakePoolVotes === mempty + -- We check that constitution was successfully ratified + void . H.leftFailM . H.evalIO . runExceptT $ + foldEpochState + configurationFile + socketPath + FullValidation + (EpochNo 10) + () + (\epochState _ _ -> foldBlocksCheckConstitutionWasRatified constitutionHash constitutionScriptHash epochState) + foldBlocksCheckConstitutionWasRatified :: String -- submitted constitution hash -> String -- submitted guard rail script hash From ef4eceebe53b9b2cd44f13ca9069695d5a24bcaa Mon Sep 17 00:00:00 2001 From: Mateusz Galazyn Date: Thu, 21 May 2026 08:28:14 +0200 Subject: [PATCH 5/5] Use searchutxos for transaction test --- .../Cardano/Testnet/Test/Rpc/Transaction.hs | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/Transaction.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/Transaction.hs index e01cedeafd4..a5477e5ed3c 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/Transaction.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/Transaction.hs @@ -17,7 +17,7 @@ import qualified Cardano.Api.Ledger as L import Cardano.Rpc.Client (Proto) import qualified Cardano.Rpc.Client as Rpc -import qualified Cardano.Rpc.Proto.Api.UtxoRpc.Query as U5c hiding (cardano, items, tx) +import qualified Cardano.Rpc.Proto.Api.UtxoRpc.Query as U5c hiding (cardano) import qualified Cardano.Rpc.Proto.Api.UtxoRpc.Query as UtxoRpc import qualified Cardano.Rpc.Proto.Api.UtxoRpc.Submit as U5c import qualified Cardano.Rpc.Proto.Api.UtxoRpc.Submit as UtxoRpc @@ -90,8 +90,8 @@ hprop_rpc_transaction = integrationRetryWorkspace 2 "rpc-tx" $ \tempAbsBasePath' Rpc.nonStreaming conn (Rpc.rpc @(Rpc.Protobuf UtxoRpc.QueryService "readParams")) req utxos' <- do - let req = def -- & # U5c.keys .~ [T.encodeUtf8 addrTxt0] - Rpc.nonStreaming conn (Rpc.rpc @(Rpc.Protobuf UtxoRpc.QueryService "readUtxos")) req + let req = def & U5c.predicate .~ mkAddrPredicate addr0 + Rpc.nonStreaming conn (Rpc.rpc @(Rpc.Protobuf UtxoRpc.QueryService "searchUtxos")) req pure (pparams', utxos') pparams <- H.leftFail $ utxoRpcPParamsToProtocolParams (convert ceo) $ pparamsResponse ^. U5c.values . U5c.cardano @@ -131,14 +131,12 @@ hprop_rpc_transaction = integrationRetryWorkspace 2 "rpc-tx" $ \tempAbsBasePath' H.note_ "Ensure that submitTx returns the same transaction ID as the locally computed signed transaction ID" txId' === submittedTxId - -- TODO use searchUtxos when available H.note_ $ "Ensure that there are 2 UTXOs in the address " <> show addrTxt1 utxosForAddress <- retryUntilM epochStateView (WaitForBlocks 10) - (do utxos <- H.evalIO $ - Rpc.nonStreaming conn (Rpc.rpc @(Rpc.Protobuf UtxoRpc.QueryService "readUtxos")) def - flip filterM (utxos ^. U5c.items) $ \utxo -> do - utxoAddress <- deserialiseAddressBs addrInEra $ utxo ^. U5c.cardano . U5c.address - pure $ addr1 == utxoAddress + (do let req = def & U5c.predicate .~ mkAddrPredicate addr1 + utxos <- H.evalIO $ + Rpc.nonStreaming conn (Rpc.rpc @(Rpc.Protobuf UtxoRpc.QueryService "searchUtxos")) req + pure $ utxos ^. U5c.items ) (\xs -> length xs == 2) @@ -146,6 +144,15 @@ hprop_rpc_transaction = integrationRetryWorkspace 2 "rpc-tx" $ \tempAbsBasePath' H.note_ $ "Ensure that the output sent is one of the utxos for the address " <> show addrTxt1 H.assertWith outputsAmounts $ elem (inject amount) +mkAddrPredicate :: SerialiseAsRawBytes addr => addr -> Proto UtxoRpc.UtxoPredicate +mkAddrPredicate addr = + def + & U5c.match + .~ ( def + & U5c.cardano + .~ (def & U5c.address .~ (def & U5c.exactAddress .~ serialiseToRawBytes addr)) + ) + txoRefToTxIn :: (HasCallStack, MonadTest m) => Proto UtxoRpc.TxoRef -> m TxIn txoRefToTxIn r = withFrozenCallStack $ do txId' <- H.leftFail $ deserialiseFromRawBytes AsTxId $ r ^. U5c.hash