Skip to content

Conversation

@Onyinyechi46
Copy link

Motivation
The encoder for AlonzoScript uses tag 4 for Plutus V4, but the decoder did not handle tag 4, which can cause valid Plutus V4 scripts to be rejected when decoding.
Description
Add 4 -> decodeAnnPlutus SPlutusV4 to the decodeScript function in eras/alonzo/impl/src/Cardano/Ledger/Alonzo/Scripts.hs so decoding matches the encoder's tags.
Testing
No automated tests were run for this trivial decoder fix.

@Onyinyechi46 Onyinyechi46 requested a review from a team as a code owner February 9, 2026 12:45
@teodanciu
Copy link
Contributor

Could you please also update the non-Annotator version of the decoder? https://github.com/IntersectMBO/cardano-ledger/blob/master/eras/alonzo/impl/testlib/Test/Cardano/Ledger/Alonzo/Binary/Annotator.hs#L300

Also, it would be good to have a more descriptive commit message like
"Add PlutusV4 to AlonzoScript decoder".

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.

2 participants