Skip to content

Commit

Permalink
Merge pull request #5400 from james-iohk/jamesbro/cardano-testnet-cos…
Browse files Browse the repository at this point in the history
…ting-fix

Fix plutus script costing in cardano-testnet
  • Loading branch information
Jimbo4350 authored Jul 19, 2023
2 parents 6f1dd12 + e69a95e commit 537bc33
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions cardano-testnet/src/Testnet/Defaults.hs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ defaultAlonzoGenesis :: Either AlonzoGenesisError AlonzoGenesis
defaultAlonzoGenesis = do
es <- checkBoundedRational priceExecStepsRat
ms <- checkBoundedRational priceMemStepsRat
let execPrices = Prices es ms
let execPrices = Prices ms es
costModels <- first AlonzoGenErrCostModels
$ Api.toAlonzoCostModels apiCostModels
return $ AlonzoGenesis
Expand All @@ -79,13 +79,13 @@ defaultAlonzoGenesis = do

maxTxExUnits = Api.toAlonzoExUnits
$ Api.ExecutionUnits
{ Api.executionSteps = 16000000
, Api.executionMemory = 10000000000
{ Api.executionSteps = 10000000000
, Api.executionMemory = 14000000
}
maxBlockExUnits = Api.toAlonzoExUnits
$ Api.ExecutionUnits
{ Api.executionSteps = 40000000000
, Api.executionMemory = 80000000
{ Api.executionSteps = 20000000000
, Api.executionMemory = 62000000
}
apiCostModels =
let pv1 = Api.AnyPlutusScriptVersion Api.PlutusScriptV1
Expand All @@ -94,17 +94,17 @@ defaultAlonzoGenesis = do
, Map.singleton pv2 defaultV2CostModel
]
defaultV1CostModel = Api.CostModel
[ 4, 1000, 100, 103599, 1, 621, 29175, 150000, 1000, 150000, 61516, 100, 150000, 150000
, 150000, 32, 150000, 29773, 150000, 0, 150000, 0, 1, 118, 150000, 150000, 32, 136542
, 82363, 5000, 150000, 179690, 150000, 0, 118, 1, 150000, 145276, 1, 32, 32, 150000, 1
, 1, 0, 4, 32, 32, 150000, 32, 1, 32, 248, 0, 100, 0, 32, 118, 29773, 1, 29773, 29175
, 1, 1, 1, 150000, 150000, 29773, 150000, 1, 1000, 1, 1366, 32, 0, 150000, 1, 32, 32
, 197209, 8, 150000, 150000, 150000, 148000, 1, 100, 150000, 150000, 1326, 100, 197209
, 425507, 0, 100, 2477736, 148000, 150000, 150000, 1000, 1, 11218, 396231, 248, 1, 0
, 10000, 0, 150000, 150000, 1, 29773, 1, 3345831, 32, 32, 1, 4, 1, 32, 247, 150000, 118
, 100, 1, 1, 100, 0, 2477736, 425507, 1, 32, 150000, 150000, 32, 4, 32, 32, 29773, 1
, 103599, 1000, 1, 32, 148000, 29773, 8, 425507, 32, 1000, 148000, 1, 32, 0, 150000, 0
, 32, 112536, 1, 497, 425507, 1, 0, 1, 100, 150000
[ 205665, 812, 1, 1, 1000, 571, 0, 1, 1000, 24177, 4, 1, 1000, 32, 117366, 10475, 4
, 23000, 100, 23000, 100, 23000, 100, 23000, 100, 23000, 100, 23000, 100, 100, 100
, 23000, 100, 19537, 32, 175354, 32, 46417, 4, 221973, 511, 0, 1, 89141, 32, 497525
, 14068, 4, 2, 196500, 453240, 220, 0, 1, 1, 1000, 28662, 4, 2, 245000, 216773, 62
, 1, 1060367, 12586, 1, 208512, 421, 1, 187000, 1000, 52998, 1, 80436, 32, 43249, 32
, 1000, 32, 80556, 1, 57667, 4, 1000, 10, 197145, 156, 1, 197145, 156, 1, 204924, 473
, 1, 208896, 511, 1, 52467, 32, 64832, 32, 65493, 32, 22558, 32, 16563, 32, 76511, 32
, 196500, 453240, 220, 0, 1, 1, 69522, 11687, 0, 1, 60091, 32, 196500, 453240, 220, 0
, 1, 1, 196500, 453240, 220, 0, 1, 1, 806990, 30482, 4, 1927926, 82523, 4, 265318, 0
, 4, 0, 85931, 32, 205665, 812, 1, 1, 41182, 32, 212342, 32, 31220, 32, 32696, 32, 43357
, 32, 32247, 32, 38314, 32, 57996947, 18975, 10
]
defaultV2CostModel = Api.CostModel
[ 205665, 812, 1, 1, 1000, 571, 0, 1, 1000, 24177, 4, 1, 1000, 32, 117366, 10475, 4
Expand Down

0 comments on commit 537bc33

Please sign in to comment.