Skip to content

Commit 074b5ce

Browse files
committed
[Benchmark] Include 'mkTermToEvaluate' in 'benchmark-decode'
1 parent 5eb80f3 commit 074b5ce

File tree

2 files changed

+9
-2
lines changed
  • plutus-benchmark/validation/bench
  • plutus-ledger-api/src/PlutusLedgerApi/Common

2 files changed

+9
-2
lines changed

plutus-benchmark/validation/bench/BenchDec.hs

+7-2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ main = benchWith mkDecBM
3939
!(benchScript :: SerialisedScript) =
4040
force (serialiseUPLC $ UPLC.Program () v unsaturated)
4141

42+
-- The validation benchmarks were all created from PlutusV1 scripts
43+
ll = PlutusV1
44+
pv = ledgerLanguageIntroducedIn ll
45+
4246
-- Deserialize using 'FakeNamedDeBruijn' to get the fake names added
43-
in whnf (either throw id . void . deserialiseScript futurePV
44-
) benchScript
47+
in flip whnf benchScript $ \scriptBytes ->
48+
let scriptForEval = either throw id $ deserialiseScript pv scriptBytes
49+
in either throw id . void $ mkTermToEvaluate ll pv scriptForEval []

plutus-ledger-api/src/PlutusLedgerApi/Common/Eval.hs

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ data EvaluationError =
5757
deriving stock (Show, Eq)
5858
makeClassyPrisms ''EvaluationError
5959

60+
instance Exception EvaluationError
61+
6062
instance AsScriptDecodeError EvaluationError where
6163
_ScriptDecodeError = _CodecError
6264

0 commit comments

Comments
 (0)