Skip to content

feat(scalus-uplc): move to Scalus 1.3.0 and drop the CBOR map builder - #615

Open
nau wants to merge 1 commit into
IntersectMBO:mainfrom
nau:feat/scalus-1.3.0
Open

nau wants to merge 1 commit into
IntersectMBO:mainfrom
nau:feat/scalus-1.3.0

Conversation

@nau

@nau nau commented Oct 9, 2026

Copy link
Copy Markdown

Moves @evolution-sdk/scalus-uplc from scalus@^0.17.0 to ^1.3.0. Evaluator.ts goes from 157
lines to 97. createScalusEvaluator is unchanged for callers.

Scalus reads a UTxO set as CIP-30 [input, output] pairs, so the evaluator passes them straight
through instead of assembling a CBOR map with its own map-header writer. Evaluation goes through
evaluator.evaluateTx rather than the deprecated Scalus.evalPlutusScripts, at protocol version
11.

Fixes that come with it:

  • Transaction budget. context.maxTxExMem and context.maxTxExSteps were ignored. They are now
    one budget for all the transaction's scripts, as the ledger applies them, so a transaction whose
    scripts do not fit fails at build time rather than on submission.
  • Unknown redeemer tags. tagMap[r.tag] || "spend" relabelled an unknown tag as a spend, which
    mis-prices another script. It now raises.
  • The "zero execution units means failure" check is gone: a failing script raises an evaluation
    error.

Tests

scalus-uplc       lint, type-check, build
evolution-devnet  TxBuilder.Scripts.test.ts  19 passed (includes the Scalus evaluator build)

#407 (the Scalus emulator provider, against the scalus branch) is separate from this.

Scalus reads a UTxO set as CIP-30 [input, output] pairs, so the evaluator
passes them straight through instead of assembling a CBOR map with its own
map-header writer and byte comparator.

Evaluation goes through evaluator.evaluateTx rather than the deprecated
Scalus.evalPlutusScripts, at protocol version 11. The transaction's
maxTxExMem and maxTxExSteps are now passed as one budget for all its
scripts, as the ledger applies them. An unknown redeemer tag raises
instead of falling back to "spend" and mis-pricing another script.
@nau
nau requested a review from solidsnakedev as a code owner October 9, 2026 12:26

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant