Repository navigation
Add Plutus V4 support in the Dijkstra era - #1359
Merged
Merged
Conversation
carbolymer
force-pushed
the
mgalazyn/fix/plutus-v4-script-support
branch
from
September 25, 2026 09:28
3de5574 to
c17c005
Compare
This was referenced Sep 25, 2026
carbolymer
force-pushed
the
mgalazyn/fix/plutus-v4-script-support
branch
2 times, most recently
from
September 28, 2026 15:57
8d4d187 to
052dd93
Compare
carbolymer
force-pushed
the
mgalazyn/fix/plutus-v4-script-support
branch
from
September 30, 2026 09:49
052dd93 to
e5b02f2
Compare
carbolymer
changed the base branch from
master
to
mgalazyn/fix/unsupported-plutus-language-error
September 30, 2026 13:48
carbolymer
added this pull request to stack #1364
September 30, 2026 13:48
4 tasks done
carbolymer
force-pushed
the
mgalazyn/fix/plutus-v4-script-support
branch
from
September 30, 2026 13:58
e5b02f2 to
2ac0c0b
Compare
carbolymer
force-pushed
the
mgalazyn/fix/plutus-v4-script-support
branch
from
October 1, 2026 19:25
2ac0c0b to
accd0e8
Compare
carbolymer
force-pushed
the
mgalazyn/fix/plutus-v4-script-support
branch
from
October 1, 2026 20:13
accd0e8 to
0b94a99
Compare
carbolymer
force-pushed
the
mgalazyn/fix/plutus-v4-script-support
branch
from
October 7, 2026 07:19
0b94a99 to
058cd93
Compare
carbolymer
force-pushed
the
mgalazyn/fix/plutus-v4-script-support
branch
from
October 7, 2026 13:33
058cd93 to
38a5bcd
Compare
carbolymer
force-pushed
the
mgalazyn/fix/plutus-v4-script-support
branch
from
October 8, 2026 08:12
38a5bcd to
6d175e1
Compare
carbolymer
force-pushed
the
mgalazyn/fix/plutus-v4-script-support
branch
from
October 8, 2026 08:38
6d175e1 to
3658340
Compare
carbolymer
force-pushed
the
mgalazyn/fix/plutus-v4-script-support
branch
from
October 8, 2026 13:53
3658340 to
f8cb900
Compare
carbolymer
force-pushed
the
mgalazyn/fix/plutus-v4-script-support
branch
from
October 9, 2026 06:29
f8cb900 to
81d1c23
Compare
Base automatically changed from
mgalazyn/fix/unsupported-plutus-language-error
to
master
October 9, 2026 07:13
carbolymer
force-pushed
the
mgalazyn/fix/plutus-v4-script-support
branch
3 times, most recently
from
October 9, 2026 09:55
1d52c96 to
2fed823
Compare
scriptLanguageSupportedInEra and toScriptInEra accept Plutus V4 in Dijkstra, so V4 scripts can be used as witnesses, reference scripts and auxiliary scripts. cardano-ledger-dijkstra 0.4.0.0 carries the Plutus V4 field of the transaction witness set, so the Dijkstra round-trip properties pass. It still reads auxiliary scripts back only up to Plutus V3, so a V4 auxiliary script is dropped on read-back until a ledger release with the eraMaxLanguage bump. IntersectMBO/cardano-ledger#6109
carbolymer
force-pushed
the
mgalazyn/fix/plutus-v4-script-support
branch
from
October 9, 2026 09:57
2fed823 to
aaaad09
Compare
carbolymer
marked this pull request as ready for review
October 9, 2026 10:02
carbolymer
requested review from
CarlosLopezDeLara,
Jimbo4350,
disassembler,
erikd and
palas
as code owners
October 9, 2026 10:02
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The changelog should disclose the known V4 auxiliary-script read-back limitation.
1 open finding
What changed in this PR
Adds legacy API support for Plutus V4 scripts in the Dijkstra era.
Changes:
- Enables Plutus V4 in
scriptLanguageSupportedInEra. - Adds reference-script transaction-body coverage.
- Adds a compatible-feature changelog fragment.
| File | Description |
|---|---|
cardano-api/src/Cardano/Api/Plutus/Internal/Script.hs |
Enables the Dijkstra/V4 language pairing. |
cardano-api/test/cardano-api-test/Test/Cardano/Api/Transaction/Body/Plutus/Scripts.hs |
Tests preservation of a V4 reference script. |
.changes/plutus-v4-dijkstra-script-language-in-era.yml |
Documents the feature. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| - compatible | ||
| description: | | ||
| `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. |
Jimbo4350
approved these changes
Oct 9, 2026
| Just PlutusScriptV2InDijkstra | ||
| (ShelleyBasedEraDijkstra, PlutusScriptLanguage PlutusScriptV3) -> | ||
| Just PlutusScriptV3InDijkstra | ||
| (ShelleyBasedEraDijkstra, PlutusScriptLanguage PlutusScriptV4) -> |
Contributor
There was a problem hiding this comment.
We gotta kill this module after we release V12.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

scriptLanguageSupportedInEraandtoScriptInEranow accept Plutus V4 in the Dijkstra era.Plutus V4 scripts can be used as witnesses, reference scripts and auxiliary scripts; hashing, JSON encoding and ledger conversion already handled V4.
Known gap: cardano-ledger-dijkstra 0.4.0.0 reads auxiliary scripts back only up to Plutus V3, so a Plutus V4 auxiliary script in Dijkstra is dropped on read-back until cardano-api picks up a ledger release with the fix:
eraMaxLanguagetoPlutusV4, fix tests cardano-ledger#6109This PR builds on the merged change that makes cardano-api fail instead of dropping unsupported scripts:
Context
Found while adding Plutus V4 support to cardano-cli:
The ledger added the Plutus V4 field of the Dijkstra transaction witness set, released in cardano-ledger-dijkstra 0.4.0.0:
PlutusV4scripts totransaction_witness_setCDDL cardano-ledger#5403How to trust this PR
A property checks that
createTransactionBodyaccepts a Plutus V4 reference script on a Dijkstra output and keeps it on the ledger output.The Dijkstra round-trip properties generate Plutus V4 witness scripts and pass against cardano-ledger-dijkstra 0.4.0.0.
Checklist