From 611c0de929bfb8b76d96ab404d7f316d7e88c5e8 Mon Sep 17 00:00:00 2001 From: Mateusz Galazyn Date: Thu, 10 Apr 2025 17:11:21 +0200 Subject: [PATCH] cardano-testnet | Add test for providing reference input datums --- cardano-testnet/cardano-testnet.cabal | 3 +- .../src/Testnet/Components/Query.hs | 24 +- cardano-testnet/src/Testnet/Types.hs | 28 +- .../Testnet/Test/Api/TxReferenceInputDatum.hs | 313 ++++++++++++++++++ .../Testnet/Test/Cli/QuerySlotNumber.hs | 3 +- .../cardano-testnet-test.hs | 7 +- 6 files changed, 363 insertions(+), 15 deletions(-) create mode 100644 cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Api/TxReferenceInputDatum.hs diff --git a/cardano-testnet/cardano-testnet.cabal b/cardano-testnet/cardano-testnet.cabal index c1c3bcb1d2a..697faead518 100644 --- a/cardano-testnet/cardano-testnet.cabal +++ b/cardano-testnet/cardano-testnet.cabal @@ -185,7 +185,8 @@ test-suite cardano-testnet-test main-is: cardano-testnet-test.hs - other-modules: Cardano.Testnet.Test.Cli.Conway.StakeSnapshot + other-modules: Cardano.Testnet.Test.Api.TxReferenceInputDatum + Cardano.Testnet.Test.Cli.Conway.StakeSnapshot Cardano.Testnet.Test.Cli.KesPeriodInfo Cardano.Testnet.Test.Cli.LeadershipSchedule Cardano.Testnet.Test.Cli.Query diff --git a/cardano-testnet/src/Testnet/Components/Query.hs b/cardano-testnet/src/Testnet/Components/Query.hs index 4ebcfd4bf1d..24b26efbaa2 100644 --- a/cardano-testnet/src/Testnet/Components/Query.hs +++ b/cardano-testnet/src/Testnet/Components/Query.hs @@ -36,6 +36,7 @@ module Testnet.Components.Query , checkDRepsNumber , checkDRepState , assertNewEpochState + , getProtocolParams , getGovActionLifetime , getKeyDeposit , getDelegationState @@ -44,8 +45,9 @@ module Testnet.Components.Query import Cardano.Api as Api import Cardano.Api.Ledger (Credential, DRepState, EpochInterval (..), KeyRole (DRepRole)) -import Cardano.Api.Shelley (ShelleyLedgerEra) import qualified Cardano.Api.Ledger as L +import Cardano.Api.Shelley (LedgerProtocolParameters (..), ShelleyLedgerEra) +import qualified Cardano.Api.Tx.UTxO as Utxo import Cardano.Crypto.Hash (hashToStringAsHex) import Cardano.Ledger.Api (ConwayGovState) @@ -65,7 +67,6 @@ import Data.IORef import Data.List (sortOn) import qualified Data.Map as Map import Data.Map.Strict (Map) -import qualified Data.Map.Strict as M import Data.Maybe import Data.Ord (Down (..)) import Data.Text (Text) @@ -301,11 +302,11 @@ findAllUtxos => MonadTest m => EpochStateView -> ShelleyBasedEra era - -> m (Map TxIn (TxOut CtxUTxO era)) + -> m (UTxO era) findAllUtxos epochStateView sbe = withFrozenCallStack $ do AnyNewEpochState sbe' _ tbs <- getEpochState epochStateView Refl <- H.leftFail $ assertErasEqual sbe sbe' - pure $ getLedgerTablesUTxOValues sbe' tbs + pure . UTxO $ getLedgerTablesUTxOValues sbe' tbs -- | Retrieve utxos from the epoch state view for an address. findUtxosWithAddress @@ -316,7 +317,7 @@ findUtxosWithAddress => EpochStateView -> ShelleyBasedEra era -> Text -- ^ Address - -> m (Map TxIn (TxOut CtxUTxO era)) + -> m (UTxO era) findUtxosWithAddress epochStateView sbe address = withFrozenCallStack $ do utxos <- findAllUtxos epochStateView sbe H.note_ $ "Finding UTxOs for " <> T.unpack address @@ -327,7 +328,7 @@ findUtxosWithAddress epochStateView sbe address = withFrozenCallStack $ do maybeToEither ("Could not deserialize address: " <> T.unpack address) (deserialiseAddress AsAddressAny address) - let utxos' = M.filter (\(TxOut txAddr _ _ _) -> txAddr == address') utxos + let utxos' = Utxo.filter (\(TxOut txAddr _ _ _) -> txAddr == address') utxos H.note_ $ unlines (map show $ toList utxos') pure utxos' where @@ -344,7 +345,7 @@ findLargestUtxoWithAddress -> Text -- ^ Address -> m (Maybe (TxIn, TxOut CtxUTxO era)) findLargestUtxoWithAddress epochStateView sbe address = withFrozenCallStack $ do - utxos <- M.assocs <$> findUtxosWithAddress epochStateView sbe address + utxos <- toList <$> findUtxosWithAddress epochStateView sbe address pure . listToMaybe $ sortOn (\(_, TxOut _ txOutValue _ _) -> Down $ txOutValueToLovelace txOutValue) utxos @@ -558,6 +559,15 @@ assertNewEpochState epochStateView sbe maxWait lens expected = withFrozenCallSta Refl <- H.leftFail $ assertErasEqual sbe actualEra pure $ newEpochState ^. lens +-- | Return current protocol parameters from the governance state +getProtocolParams :: (H.MonadAssertion m, MonadTest m, MonadIO m) + => EpochStateView + -> ConwayEraOnwards era + -> m (LedgerProtocolParameters era) +getProtocolParams epochStateView ceo = conwayEraOnwardsConstraints ceo $ do + govState :: ConwayGovState era <- getGovState epochStateView ceo + pure . LedgerProtocolParameters $ govState ^. L.cgsCurPParamsL + -- | Obtains the @govActionLifetime@ from the protocol parameters. -- The @govActionLifetime@ or governance action maximum lifetime in epochs is diff --git a/cardano-testnet/src/Testnet/Types.hs b/cardano-testnet/src/Testnet/Types.hs index 8c17af6e04e..7f621fdec65 100644 --- a/cardano-testnet/src/Testnet/Types.hs +++ b/cardano-testnet/src/Testnet/Types.hs @@ -21,6 +21,7 @@ module Testnet.Types , testnetSprockets , TestnetNode(..) , nodeSocketPath + , nodeConnectionInfo , isTestnetNodeSpo , SpoNodeKeys(..) , Delegator(..) @@ -62,18 +63,20 @@ import Data.List (intercalate) import Data.Maybe import Data.MonoTraversable (Element, MonoFunctor (..)) import Data.Text (Text) -import Data.Time.Clock (UTCTime) import GHC.Exts (IsString (..)) import GHC.Generics (Generic) import qualified GHC.IO.Handle as IO import GHC.Stack +import Lens.Micro (ix, (^?)) import Network.Socket (HostAddress, PortNumber, hostAddressToTuple, tupleToHostAddress) import System.FilePath import qualified System.Process as IO import Testnet.Start.Types +import Hedgehog (MonadTest) import qualified Hedgehog as H +import qualified Hedgehog.Extras as H import qualified Hedgehog.Extras.Stock as H import Hedgehog.Extras.Stock.IO.Network.Sprocket (Sprocket (..)) @@ -115,7 +118,7 @@ data SKey k data TestnetRuntime = TestnetRuntime { configurationFile :: !(NodeConfigFile In) , shelleyGenesisFile :: !FilePath - , testnetMagic :: !Int + , testnetMagic :: !Int -- TODO change to Word32 , testnetNodes :: ![TestnetNode] , wallets :: ![PaymentKeyInfo] , delegators :: ![Delegator] @@ -148,6 +151,23 @@ isTestnetNodeSpo = isJust . poolKeys nodeSocketPath :: TestnetNode -> SocketPath nodeSocketPath = File . H.sprocketSystemName . nodeSprocket +-- | Connection data for a node in the testnet +nodeConnectionInfo :: MonadTest m + => TestnetRuntime + -> Int -- ^ node index, starting from 0 + -> m LocalNodeConnectInfo -- ^ fails when there's no node with requested index +nodeConnectionInfo TestnetRuntime{testnetMagic, testnetNodes} index = + case testnetNodes ^? ix index of + Nothing -> do + H.note_ $ "There is no node in the testnet with index: " <> show index <> ". Number of nodes: " <> show (length testnetNodes) + H.failure + Just node -> + pure LocalNodeConnectInfo + { localNodeSocketPath= nodeSocketPath node + , localNodeNetworkId=Testnet (NetworkMagic $ fromIntegral testnetMagic) + , localConsensusModeParams=CardanoModeParams $ EpochSlots 21600} + + data SpoNodeKeys = SpoNodeKeys { poolNodeKeysCold :: KeyPair StakePoolKey , poolNodeKeysVrf :: KeyPair VrfKey @@ -187,14 +207,14 @@ getStartTime => HasCallStack => FilePath -> TestnetRuntime - -> m UTCTime + -> m SystemStart getStartTime tempRootPath TestnetRuntime{configurationFile} = withFrozenCallStack $ H.evalEither <=< H.evalIO . runExceptT $ do byronGenesisFile <- decodeNodeConfiguration configurationFile >>= \case NodeProtocolConfigurationCardano NodeByronProtocolConfiguration{npcByronGenesisFile} _ _ _ _ _ -> pure $ unGenesisFile npcByronGenesisFile let byronGenesisFilePath = tempRootPath byronGenesisFile - G.gdStartTime . G.configGenesisData <$> decodeGenesisFile byronGenesisFilePath + SystemStart . G.gdStartTime . G.configGenesisData <$> decodeGenesisFile byronGenesisFilePath where decodeNodeConfiguration :: File NodeConfig In -> ExceptT String IO NodeProtocolConfiguration decodeNodeConfiguration (File file) = do diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Api/TxReferenceInputDatum.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Api/TxReferenceInputDatum.hs new file mode 100644 index 00000000000..7882db9fc1e --- /dev/null +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Api/TxReferenceInputDatum.hs @@ -0,0 +1,313 @@ +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE NumericUnderscores #-} +{-# LANGUAGE OverloadedLists #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE ScopedTypeVariables #-} + +module Cardano.Testnet.Test.Api.TxReferenceInputDatum + ( hprop_tx_refin_datum + ) +where + +import Cardano.Api +import qualified Cardano.Api.Ledger as L +import qualified Cardano.Api.Network as Net +import qualified Cardano.Api.Network as Net.Tx +import Cardano.Api.Shelley +import qualified Cardano.Api.Tx.UTxO as Utxo + +import Cardano.Testnet + +import Prelude + +import Control.Monad +import Data.Default.Class +import Data.List (isInfixOf) +import qualified Data.Map.Strict as M +import Data.Maybe +import Data.Proxy +import Data.Set (Set) +import GHC.Exts (IsList (..)) +import GHC.Stack +import Lens.Micro + +import Testnet.Components.Query +import Testnet.Property.Util (integrationRetryWorkspace) +import Testnet.Types + +import Hedgehog +import qualified Hedgehog as H +import qualified Hedgehog.Extras.Test.Base as H +import qualified Hedgehog.Extras.Test.TestWatchdog as H + + +-- | Test providing public key resolved datum for reference inputs. +-- +-- One can specify reference inputs which are pointing to UTXOs with just datum hashes. To use those datum in the +-- script, it's necessary to provide an actual datum value. One way to provide such datums is to just put it explicitly +-- in the 'TxBodyContent`, alongside the reference inputs in 'TxInsReference' value. +-- +-- Reference inputs are the only way to supply additional datum to scripts from UTXO. +-- +-- This test tests that such datums are made available to the script. +hprop_tx_refin_datum :: Property +hprop_tx_refin_datum = integrationRetryWorkspace 2 "api-tx-refin-dat" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do + conf@Conf{tempAbsPath} <- mkConf tempAbsBasePath' + let tempAbsPath' = unTmpAbsPath tempAbsPath + + let ceo = ConwayEraOnwardsConway + beo = convert ceo + sbe = convert ceo + eraProxy = proxyToAsType Proxy + options = def{cardanoNodeEra = AnyShelleyBasedEra sbe} + + tr@TestnetRuntime + { configurationFile + , testnetNodes = node0 : _ + , wallets = wallet0@(PaymentKeyInfo _ addrTxt0) : wallet1 : _ + } <- + cardanoTestnetDefault options def conf + + systemStart <- H.noteShowM $ getStartTime tempAbsPath' tr + epochStateView <- getEpochStateView configurationFile (nodeSocketPath node0) + connectionInfo <- nodeConnectionInfo tr 0 + pparams <- getProtocolParams epochStateView ceo + + -- prepare tx inputs and output address + H.noteShow_ addrTxt0 + addr0 <- H.nothingFail $ deserialiseAddress (AsAddressInEra eraProxy) addrTxt0 + + let (PaymentKeyInfo _ addrTxt1) = wallet1 + H.noteShow_ addrTxt1 + addr1 <- H.nothingFail $ deserialiseAddress (AsAddressInEra eraProxy) addrTxt1 + + -- read key witnesses + [wit0, wit1] :: [ShelleyWitnessSigningKey] <- + forM [wallet0, wallet1] $ \wallet -> + H.leftFailM . H.evalIO $ + readFileTextEnvelopeAnyOf + [FromSomeType asType WitnessGenesisUTxOKey] + (signingKey $ paymentKeyInfoPair wallet) + + -- query node for era history + epochInfo <- + (H.leftFail <=< H.leftFailM) . H.evalIO $ + executeLocalStateQueryExpr connectionInfo Net.VolatileTip $ + fmap toLedgerEpochInfo <$> queryEraHistory + + let scriptData1 = unsafeHashableScriptData $ ScriptDataBytes "HASH_1" + scriptData2 = unsafeHashableScriptData $ ScriptDataBytes "INLINE_1" + scriptData3 = unsafeHashableScriptData $ ScriptDataBytes "SUPPLEMENTAL_1" + -- 4e62677c3b9f3b247502efe39a85aadcc2f2d3a32aec544d62175ed86c57fe9b + H.noteShow_ $ hashScriptDataBytes scriptData1 + -- c93bae5c7cb737e16eb224d1884e7fbe14dc038caf1b511e34a43e67d3eb9f63 + H.noteShow_ $ hashScriptDataBytes scriptData2 + -- 74ea77567269646d49e072bd83e701ff7e43574522ad90833bcfa554658c65bb + H.noteShow_ $ hashScriptDataBytes scriptData3 + let txDatum1 = + TxOutDatumHash + (convert beo) + (hashScriptDataBytes scriptData1) + txDatum2 = TxOutDatumInline beo scriptData2 + txDatum3 = TxOutSupplementalDatum (convert beo) scriptData3 + + -- first transaction inserting txouts to UTXO set with datum in the outputs + tx1Utxo <- do + txIn <- findLargestUtxoForPaymentKey epochStateView sbe wallet0 + + -- prepare txout + let txOutValue = lovelaceToTxOutValue sbe 100_000_000 + txOuts = + [ TxOut addr1 txOutValue txDatum1 ReferenceScriptNone + , TxOut addr1 txOutValue txDatum2 ReferenceScriptNone + , TxOut addr1 txOutValue txDatum3 ReferenceScriptNone + ] + + -- build a transaction + content = + defaultTxBodyContent sbe + & setTxIns [(txIn, pure $ KeyWitness KeyWitnessForSpending)] + & setTxOuts txOuts + & setTxProtocolParams (pure $ pure pparams) + + utxo <- findAllUtxos epochStateView sbe + + BalancedTxBody _ txBody@(ShelleyTxBody _ lbody _ (TxBodyScriptData _ (L.TxDats' datums) _) _ _) _ fee <- + H.leftFail $ + makeTransactionBodyAutoBalance + sbe + systemStart + epochInfo + pparams + mempty + mempty + mempty + utxo + content + addr0 + Nothing -- keys override + H.noteShow_ fee + + H.noteShowPretty_ lbody + + -- sanity check that the integrity hash was calculated + lbody ^. L.scriptIntegrityHashTxBodyL /== L.SNothing + + let bodyScriptData = fromList . map fromAlonzoData $ M.elems datums :: Set HashableScriptData + + -- Only supplemental datums are included here + [ scriptData3 ] === bodyScriptData + + let tx = signShelleyTransaction sbe txBody [wit0] + txId <- H.noteShow . getTxId $ getTxBody tx + + H.noteShowPretty_ tx + + expectTxSubmissionSuccess =<< submitTx sbe connectionInfo tx + + -- wait till transaction gets included in the block + _ <- waitForBlocks epochStateView 1 + + -- test if it's in UTxO set + utxo1 <- findAllUtxos epochStateView sbe + let txUtxo = Utxo.filterWithKey (\(TxIn txId' _) _ -> txId == txId') utxo1 + (length txOuts + 1) === length (toList txUtxo) + + let chainTxOuts = + reverse + . drop 1 + . reverse + . map snd + . toList + $ Utxo.filterWithKey (\(TxIn txId' _) _ -> txId == txId') utxo1 + + -- check that the transaction's outputs are the same as we've submitted them + -- i.e. check the datums + (toCtxUTxOTxOut <$> txOuts) === chainTxOuts + + pure txUtxo + + -- the second transaction using the outputs from the first one + tx2Utxo <- do + let txDatum3' = TxOutDatumHash (convert beo) (hashScriptDataBytes scriptData3) + [(txIn1, _)] <- H.noteShowPretty $ filter (\(_, TxOut _ _ datum _) -> datum == txDatum1) $ toList tx1Utxo -- hash + [(txIn2, _)] <- H.noteShowPretty $ filter (\(_, TxOut _ _ datum _) -> datum == txDatum2) $ toList tx1Utxo -- inline + [(txIn3, _)] <- H.noteShowPretty $ filter (\(_, TxOut _ _ datum _) -> datum == txDatum3') $ toList tx1Utxo -- hash of supplemental + + let scriptData4 = unsafeHashableScriptData $ ScriptDataBytes "SUPPLEMENTAL_2" + txDatum = TxOutSupplementalDatum (convert beo) scriptData4 + txFee = 500 + -- manually balance + txOutValue = lovelaceToTxOutValue sbe (100_000_000 - txFee) + txOut = TxOut addr0 txOutValue txDatum ReferenceScriptNone + -- add actual datum values for the two reference inputs + txInsReference = TxInsReference beo [txIn1, txIn3] $ pure [scriptData1, scriptData3] + + let content = + defaultTxBodyContent sbe + & setTxIns [(txIn2, pure $ KeyWitness KeyWitnessForSpending)] + & setTxInsReference txInsReference + & setTxFee (TxFeeExplicit sbe txFee) + & setTxOuts [txOut] + & setTxProtocolParams (pure $ pure pparams) + + txBody@(ShelleyTxBody _ lbody _ (TxBodyScriptData _ (L.TxDats' datums) _) _ _) <- + H.leftFail $ createTransactionBody sbe content + + let bodyScriptData = fromList . map fromAlonzoData $ M.elems datums :: Set HashableScriptData + -- only hashes (1 & 3) and supplemental (4) are present here + [scriptData1, scriptData3, scriptData4] === bodyScriptData + + H.noteShowPretty_ txBody + + -- make sure that the script integrity hash was calculated + lbody ^. L.scriptIntegrityHashTxBodyL /== L.SNothing + + let tx = signShelleyTransaction sbe txBody [wit1] + txId <- H.noteShow . getTxId $ getTxBody tx + + expectTxSubmissionSuccess =<< submitTx sbe connectionInfo tx + + -- wait till transaction gets included in the block + _ <- waitForBlocks epochStateView 1 + + -- test if the transaction is visible in UTxO set + utxo1 <- findAllUtxos epochStateView sbe + let txUtxo = Utxo.filterWithKey (\(TxIn txId' _) _ -> txId == txId') utxo1 + [toCtxUTxOTxOut txOut] === (snd <$> toList txUtxo) + pure txUtxo + + -- the third transaction using the unspent output from the second one and reference inputs from the first one + -- tries to add actual datum not present in the reference input and fails on submission + do + [(txIn1, _)] <- H.noteShowPretty $ filter (\(_, TxOut _ _ datum _) -> datum == txDatum1) $ toList tx1Utxo -- hash + (tx2In1, _) <- H.noteShowPrettyM . H.nothingFail . listToMaybe $ toList tx2Utxo + + let txFee = 500 + -- manually balance + txOutValue = lovelaceToTxOutValue sbe (99_999_500 - txFee) + txOut = TxOut addr0 txOutValue TxOutDatumNone ReferenceScriptNone + -- add one reference input with datum hash and its datum, and one superfluous datum + txInsReference = TxInsReference beo [txIn1] $ pure [scriptData1, scriptData3] + + let content = + defaultTxBodyContent sbe + & setTxIns [(tx2In1, pure $ KeyWitness KeyWitnessForSpending)] + & setTxInsReference txInsReference + & setTxFee (TxFeeExplicit sbe txFee) + & setTxOuts [txOut] + & setTxProtocolParams (pure $ pure pparams) + + txBody@(ShelleyTxBody _ lbody _ (TxBodyScriptData _ (L.TxDats' datums) _) _ _) <- + H.leftFail $ createTransactionBody sbe content + + let bodyScriptData = fromList . map fromAlonzoData $ M.elems datums :: Set HashableScriptData + -- all hashes of datums supplied to reference inputs (1 & 3) are present here + [scriptData1, scriptData3] === bodyScriptData + + H.noteShowPretty_ txBody + + -- make sure that the script integrity hash was calculated + lbody ^. L.scriptIntegrityHashTxBodyL /== L.SNothing + + let tx = signShelleyTransaction sbe txBody [wit0] + -- H.noteShowPretty_ tx + H.noteShow_ . getTxId $ getTxBody tx + + -- transaction contains not allowed supplemental datum, submission has to fail + submitTx sbe connectionInfo tx >>= \case + Right () -> do + H.note_ "Transaction submission succeeded, but it should fail!" + H.failure + Left err + | "NotAllowedSupplementalDatums" `isInfixOf` show err -> + H.success + | otherwise -> do + H.note_ "Unexpected failure" + H.noteShowPretty_ err + H.failure + + +submitTx + :: MonadTest m + => MonadIO m + => HasCallStack + => ShelleyBasedEra era + -> LocalNodeConnectInfo + -> Tx era + -> m (Either TxValidationErrorInCardanoMode ()) -- ^ 'Left' on ledger error, 'Right' on success +submitTx sbe connectionInfo tx = + withFrozenCallStack $ + H.evalIO (submitTxToNodeLocal connectionInfo (TxInMode sbe tx)) >>= \case + Net.Tx.SubmitFail reason -> pure . Left $ reason + Net.Tx.SubmitSuccess -> pure $ Right () + + +expectTxSubmissionSuccess :: HasCallStack + => MonadTest m + => Either TxValidationErrorInCardanoMode () + -> m () +expectTxSubmissionSuccess = withFrozenCallStack $ \case + Left err -> H.noteShowPretty_ err >> H.failure + Right () -> H.success diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/QuerySlotNumber.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/QuerySlotNumber.hs index d7903e05c0f..bcd31bd142e 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/QuerySlotNumber.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/QuerySlotNumber.hs @@ -14,6 +14,7 @@ module Cardano.Testnet.Test.Cli.QuerySlotNumber import Cardano.Ledger.Shelley.Genesis (fromNominalDiffTimeMicro) import Cardano.Slotting.Slot +import Cardano.Slotting.Time (SystemStart (..)) import Cardano.Testnet import Prelude @@ -47,7 +48,7 @@ hprop_querySlotNumber = integrationRetryWorkspace 2 "query-slot-number" $ \tempA , testnetNodes } <- cardanoTestnetDefault def def conf ShelleyGenesis{sgSlotLength, sgEpochLength} <- H.noteShowM $ shelleyGenesis tr - startTime <- H.noteShowM $ getStartTime tempAbsBasePath' tr + SystemStart startTime <- H.noteShowM $ getStartTime tempAbsBasePath' tr let slotLength = fromNominalDiffTimeMicro sgSlotLength -- how many slots can the checked value differ from diff --git a/cardano-testnet/test/cardano-testnet-test/cardano-testnet-test.hs b/cardano-testnet/test/cardano-testnet-test/cardano-testnet-test.hs index 96b53a18fb3..f2997b373a5 100644 --- a/cardano-testnet/test/cardano-testnet-test/cardano-testnet-test.hs +++ b/cardano-testnet/test/cardano-testnet-test/cardano-testnet-test.hs @@ -5,11 +5,12 @@ module Main ) where import qualified Cardano.Crypto.Init as Crypto +import qualified Cardano.Testnet.Test.Api.TxReferenceInputDatum import qualified Cardano.Testnet.Test.Cli.KesPeriodInfo +import qualified Cardano.Testnet.Test.Cli.Plutus.CostCalculation +import qualified Cardano.Testnet.Test.Cli.Plutus.Scripts import qualified Cardano.Testnet.Test.Cli.Query import qualified Cardano.Testnet.Test.Cli.QuerySlotNumber -import qualified Cardano.Testnet.Test.Cli.Plutus.Scripts -import qualified Cardano.Testnet.Test.Cli.Plutus.CostCalculation import qualified Cardano.Testnet.Test.Cli.StakeSnapshot import qualified Cardano.Testnet.Test.Cli.Transaction import qualified Cardano.Testnet.Test.Cli.Transaction.RegisterDeregisterStakeAddress @@ -82,6 +83,8 @@ tests = do ] ] ] + , T.testGroup "API" + [ignoreOnWindows "actual datum for transaction datum hashes in ref inputs" Cardano.Testnet.Test.Api.TxReferenceInputDatum.hprop_tx_refin_datum] , T.testGroup "CLI" [ ignoreOnWindows "Shutdown" Cardano.Testnet.Test.Node.Shutdown.hprop_shutdown -- ShutdownOnSigint fails on Mac with