Skip to content

Add Plutus V4 support in the Dijkstra era - #1359

Draft
carbolymer wants to merge 1 commit into
mgalazyn/fix/unsupported-plutus-language-errorfrom
mgalazyn/fix/plutus-v4-script-support
Draft

carbolymer wants to merge 1 commit into
mgalazyn/fix/unsupported-plutus-language-errorfrom
mgalazyn/fix/plutus-v4-script-support

Conversation

@carbolymer

@carbolymer carbolymer commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

scriptLanguageSupportedInEra and toScriptInEra now accept Plutus V4 in the Dijkstra era.
Plutus V4 scripts can be used as reference scripts in transaction outputs and as auxiliary scripts; hashing, JSON encoding and ledger conversion already handled V4.

This PR is stacked on the one that makes cardano-api fail instead of dropping unsupported scripts, and only the Dijkstra commit is reviewed here:

Context

Found while adding Plutus V4 support to cardano-cli:

Blocked on the ledger adding a Plutus V4 field to the Dijkstra transaction witness set:

How to trust this PR

A new property checks that createTransactionBody accepts a Plutus V4 reference script on a Dijkstra output and keeps it on the ledger output.

Known limitation: six Dijkstra round-trip tests fail, two in Test.Cardano.Api.Experimental and four in Test.Cardano.Api.CBOR.
The generators now produce Plutus V4 witness scripts, and the ledger's witness set has no field for them yet, so the encoder drops them.
Restricting the generators would hide the same problem for library users, so the tests stay red and this PR stays in draft until the ledger fix lands.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff
  • Changelog fragment added in .changes/

@carbolymer carbolymer self-assigned this Sep 25, 2026
@carbolymer
carbolymer force-pushed the mgalazyn/fix/plutus-v4-script-support branch from 3de5574 to c17c005 Compare September 25, 2026 09:28
@carbolymer carbolymer changed the title Add Plutus V4 support Reject unsupported inline Plutus scripts, add V4 in Dijkstra Sep 25, 2026
@carbolymer
carbolymer force-pushed the mgalazyn/fix/plutus-v4-script-support branch 2 times, most recently from 8d4d187 to 052dd93 Compare September 28, 2026 15:57
@carbolymer carbolymer changed the title Reject unsupported inline Plutus scripts, add V4 in Dijkstra Add Plutus V4 in Dijkstra and reject Plutus scripts unsupported by the era Sep 30, 2026
@carbolymer
carbolymer force-pushed the mgalazyn/fix/plutus-v4-script-support branch from 052dd93 to e5b02f2 Compare September 30, 2026 09:49
@carbolymer
carbolymer changed the base branch from master to mgalazyn/fix/unsupported-plutus-language-error September 30, 2026 13:48
@carbolymer
carbolymer added this pull request to stack #1364 September 30, 2026 13:48
@carbolymer carbolymer changed the title Add Plutus V4 in Dijkstra and reject Plutus scripts unsupported by the era Add Plutus V4 support in the Dijkstra era Sep 30, 2026
@carbolymer
carbolymer force-pushed the mgalazyn/fix/plutus-v4-script-support branch from e5b02f2 to 2ac0c0b Compare September 30, 2026 13:58
@carbolymer
carbolymer force-pushed the mgalazyn/fix/plutus-v4-script-support branch from 2ac0c0b to accd0e8 Compare October 1, 2026 19:25
@carbolymer
carbolymer force-pushed the mgalazyn/fix/plutus-v4-script-support branch from accd0e8 to 0b94a99 Compare October 1, 2026 20:13
scriptLanguageSupportedInEra and toScriptInEra accept Plutus V4 in Dijkstra, which lets V4 scripts be attached as reference and auxiliary scripts.
The round-trip properties for Dijkstra fail until the ledger adds a Plutus V4 field to the transaction witness set.
IntersectMBO/cardano-ledger#5403
@carbolymer
carbolymer force-pushed the mgalazyn/fix/plutus-v4-script-support branch from 0b94a99 to 058cd93 Compare October 7, 2026 07:19

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