Skip to content

Commit

Permalink
Use non-zero costmodels in Imp tests
Browse files Browse the repository at this point in the history
  • Loading branch information
teodanciu committed Dec 2, 2024
1 parent 2ee063b commit e6b1b38
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,7 @@ instance
pure
AlonzoGenesis
{ agCoinsPerUTxOWord = CoinPerWord (Coin 34482)
, -- TODO: Replace with correct cost model.
agCostModels = testingCostModels [PlutusV1]
, agCostModels = testingCostModels [PlutusV1]
, agPrices =
Prices
{ prMem = 577 %! 10_000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,7 @@ instance
, ucppDRepDeposit = Coin 70_000_000
, ucppDRepActivity = EpochInterval 100
, ucppMinFeeRefScriptCostPerByte = 15 %! 1
, -- TODO: Replace with correct cost model.
ucppPlutusV3CostModel = testingCostModel PlutusV3
, ucppPlutusV3CostModel = testingCostModel PlutusV3
}
, cgConstitution = Constitution constitutionAnchor (SJust guardrailScriptHash)
, cgCommittee = committee
Expand Down
15 changes: 3 additions & 12 deletions libs/cardano-ledger-core/testlib/Test/Cardano/Ledger/Plutus.hs
Original file line number Diff line number Diff line change
Expand Up @@ -106,22 +106,13 @@ testingCostModel = \case
PlutusV3 -> testingCostModelV3

testingCostModelV1 :: HasCallStack => CostModel
testingCostModelV1 =
if True
then zeroTestingCostModelV1
else mkCostModel' PlutusV1 $ snd <$> PV1.costModelParamsForTesting
testingCostModelV1 = mkCostModel' PlutusV1 $ snd <$> PV1.costModelParamsForTesting

testingCostModelV2 :: HasCallStack => CostModel
testingCostModelV2 =
if True
then zeroTestingCostModelV2
else mkCostModel' PlutusV2 $ snd <$> PV2.costModelParamsForTesting
testingCostModelV2 = mkCostModel' PlutusV2 $ snd <$> PV2.costModelParamsForTesting

testingCostModelV3 :: HasCallStack => CostModel
testingCostModelV3 =
if True
then zeroTestingCostModelV3
else mkCostModel' PlutusV3 $ snd <$> PV3.costModelParamsForTesting
testingCostModelV3 = mkCostModel' PlutusV3 $ snd <$> PV3.costModelParamsForTesting

testingEvaluationContext :: Language -> PV1.EvaluationContext
testingEvaluationContext = getCostModelEvaluationContext . testingCostModel
Expand Down

0 comments on commit e6b1b38

Please sign in to comment.