Skip to content

Commit 537bc33

Browse files
authored
Merge pull request IntersectMBO#5400 from james-iohk/jamesbro/cardano-testnet-costing-fix
Fix plutus script costing in cardano-testnet
2 parents 6f1dd12 + e69a95e commit 537bc33

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

cardano-testnet/src/Testnet/Defaults.hs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ defaultAlonzoGenesis :: Either AlonzoGenesisError AlonzoGenesis
5454
defaultAlonzoGenesis = do
5555
es <- checkBoundedRational priceExecStepsRat
5656
ms <- checkBoundedRational priceMemStepsRat
57-
let execPrices = Prices es ms
57+
let execPrices = Prices ms es
5858
costModels <- first AlonzoGenErrCostModels
5959
$ Api.toAlonzoCostModels apiCostModels
6060
return $ AlonzoGenesis
@@ -79,13 +79,13 @@ defaultAlonzoGenesis = do
7979

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

0 commit comments

Comments
 (0)