From 6abb35588cc9ab6e39daadbe294a036bc09f2e37 Mon Sep 17 00:00:00 2001 From: teodanciu Date: Tue, 15 Oct 2024 15:14:20 +0100 Subject: [PATCH] Set `maxTxSize` relative to generated tx in Utxo conformance tests in order to avoid UTXO conformance test failure --- .../Cardano/Ledger/Conformance/ExecSpecRule/Conway/Base.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/ExecSpecRule/Conway/Base.hs b/libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/ExecSpecRule/Conway/Base.hs index d2b0e76826a..03f716c3ca9 100644 --- a/libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/ExecSpecRule/Conway/Base.hs +++ b/libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/ExecSpecRule/Conway/Base.hs @@ -47,7 +47,7 @@ import Cardano.Ledger.CertState ( ) import Cardano.Ledger.Coin (Coin (..), CompactForm (..)) import Cardano.Ledger.Conway (Conway) -import Cardano.Ledger.Conway.Core (Era (..), EraPParams (..), PParams, ppMaxTxSizeL) +import Cardano.Ledger.Conway.Core (Era (..), EraPParams (..), PParams, ppMaxTxSizeL, sizeTxF) import Cardano.Ledger.Conway.Governance ( Committee (..), EnactState (..), @@ -162,10 +162,11 @@ instance runGenRS proof genSize $ genAlonzoTx proof ueSlot ueCertState <- arbitrary + let txSize = uecTx ^. sizeTxF let uePParams = gePParams (gsGenEnv gs) - & ppMaxTxSizeL .~ 3000 + & ppMaxTxSizeL .~ fromIntegral txSize & ppProtocolVersionL .~ ProtVer (natVersion @10) 0 uecUtxoEnv = UtxoEnv {..} pure UtxoExecContext {..}