Skip to content

feat(cbor): add PLUTUS_DATA_OPTIONS and use it for UPLC parameters - #606

Merged
solidsnakedev merged 4 commits into
mainfrom
fix/plutus-data-presets-v2
Oct 7, 2026
Merged

solidsnakedev merged 4 commits into
mainfrom
fix/plutus-data-presets-v2

Conversation

@solidsnakedev

Copy link
Copy Markdown
Collaborator

AIKEN_DEFAULT_OPTIONS wrote a map as a list of pairs, which is a different value. It was the default for UPLC.applyParamsToScript and UPLC.dataConstant, so a validator with a map parameter got a different script hash than aiken blueprint apply gives. CARDANO_NODE_DATA_OPTIONS wrote lists definite, which the node does not do, and no preset matched the layout the node, cardano-cli and Aiken write.

The new PLUTUS_DATA_OPTIONS writes that layout: non-empty lists and constructor fields indefinite, maps definite, empties definite. applyParamsToScript and dataConstant now use it by default, and the output is byte-identical to aiken blueprint apply for a map parameter. AIKEN_DEFAULT_OPTIONS now equals it. The new CML_DATA_DEFINITE_OPTIONS keeps the old CARDANO_NODE_DATA_OPTIONS bytes. Both old names are deprecated. The general Data default and transaction encoding are unchanged. Switching the default waits for the witness set to write datums in the same layout it hashes them, which is a separate issue.

The evidence is in #598: cardano-cli and Aiken v1.1.24 vectors, and the applied script hash.

Closes #598

@solidsnakedev
solidsnakedev merged commit b1770ea into main Oct 7, 2026
10 checks passed
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.

CBOR: Plutus data presets don't match the node; the Aiken preset turns maps into lists

1 participant