Enable Dijkstra Twiddling tests, relax some decoders in PV12 - #5862
Merged
Conversation
Soupstraw
force-pushed
the
jj/dijkstra-twiddling
branch
2 times, most recently
from
May 28, 2026 11:26
99a8140 to
13391db
Compare
lehins
reviewed
May 29, 2026
Soupstraw
force-pushed
the
jj/dijkstra-twiddling
branch
12 times, most recently
from
May 29, 2026 12:29
5b706a6 to
4d865f8
Compare
Soupstraw
force-pushed
the
jj/dijkstra-twiddling
branch
from
June 16, 2026 12:12
13dde78 to
1093b1c
Compare
neilmayhew
previously approved these changes
Jun 17, 2026
Soupstraw
force-pushed
the
jj/dijkstra-twiddling
branch
2 times, most recently
from
June 17, 2026 13:53
9edcad0 to
5ada1eb
Compare
Soupstraw
force-pushed
the
jj/dijkstra-twiddling
branch
3 times, most recently
from
July 8, 2026 14:11
1fccce3 to
a119896
Compare
Soupstraw
force-pushed
the
jj/dijkstra-twiddling
branch
from
July 10, 2026 13:08
a119896 to
68510d1
Compare
Soupstraw
force-pushed
the
jj/dijkstra-twiddling
branch
5 times, most recently
from
August 3, 2026 15:15
a2f3f87 to
9b0cd64
Compare
Soupstraw
force-pushed
the
jj/dijkstra-twiddling
branch
5 times, most recently
from
August 4, 2026 10:58
a8f1c09 to
ec954a7
Compare
Soupstraw
marked this pull request as ready for review
August 4, 2026 10:59
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates CBOR decoding behavior for protocol version 12 (PV12) by adding helpers for indefinite-length encodings, relaxing some DecCBOR instances to accept indefinite-length forms, and tightening metadata bytes decoding to require definite-length chunks within indefinite-length bytestrings. It also enables Dijkstra “twiddling” in the era CDDL/Huddle tests and bumps cardano-ledger-binary to 1.10.0.0 with corresponding dependency-bound updates.
Changes:
- Add/adjust CBOR decoders in
cardano-ledger-binary(incl. new indefinite-length helpers, relaxedTextand tuple decoding for PV12, and moving IPv4/IPv6 decoders intoDecCBOR). - Update
decodeMetadatumto enforce definite-length chunks inside indefinite-length bytestrings (and bumpcardano-ledger-core’scardano-ledger-binarybound accordingly). - Enable twiddling in Dijkstra CDDL tests and update cabal dependencies/bounds across affected packages.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| libs/cardano-ledger-repl-environment/cardano-ledger-repl-environment.cabal | Add testlib sublibrary deps for Alonzo/Dijkstra to support REPL environment usage. |
| libs/cardano-ledger-core/src/Cardano/Ledger/Metadata.hs | Tighten metadata decoding for indefinite-length bytestrings via new bytearray indefinite helper. |
| libs/cardano-ledger-core/CHANGELOG.md | Document the decodeMetadatum behavior change. |
| libs/cardano-ledger-core/cardano-ledger-core.cabal | Bump cardano-ledger-binary bound to ^>=1.10. |
| libs/cardano-ledger-binary/src/Cardano/Ledger/Binary/Decoding/Decoder.hs | Add reusable *IndefLen / *DefOrIndef helpers; remove IPv4/IPv6 from this module. |
| libs/cardano-ledger-binary/src/Cardano/Ledger/Binary/Decoding/DecCBOR.hs | Host IPv4/IPv6 decoders; relax tuple and Text DecCBOR instances for PV12. |
| libs/cardano-ledger-binary/CHANGELOG.md | Record new API/behavior changes and module move for IP decoders. |
| libs/cardano-ledger-binary/cardano-ledger-binary.cabal | Bump package version to 1.10.0.0. |
| eras/shelley/impl/cardano-ledger-shelley.cabal | Update cardano-ledger-binary bound to ^>=1.10. |
| eras/dijkstra/impl/test/Test/Cardano/Ledger/Dijkstra/Binary/CddlSpec.hs | Enable twiddling by removing noTwiddle. |
| eras/dijkstra/impl/cardano-ledger-dijkstra.cabal | Update cardano-ledger-binary bound to ^>=1.10. |
| eras/conway/impl/cardano-ledger-conway.cabal | Update cardano-ledger-binary bound to ^>=1.10. |
| eras/alonzo/impl/cardano-ledger-alonzo.cabal | Update cardano-ledger-binary bound to ^>=1.10. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Soupstraw
force-pushed
the
jj/dijkstra-twiddling
branch
from
August 4, 2026 11:10
ec954a7 to
416151f
Compare
Soupstraw
force-pushed
the
jj/dijkstra-twiddling
branch
8 times, most recently
from
August 13, 2026 10:59
1180d74 to
b600acb
Compare
Test Failures
|
| Test | Compiler | Seed |
|---|---|---|
| /Dijkstra/Era-specific spec/CDDL/Huddle/CertRB/block_body: DijkstraBlockBody DijkstraEra/Generate bytestring from CDDL and decode (annotator) -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/CertRB/block_body: DijkstraBlockBody DijkstraEra/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/Generate bytestring from CDDL and decode -> encode/header: MemoBytes (HeaderRaw StandardCrypto)/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/Generate bytestring from CDDL and decode -> encode/header_body: HeaderBody StandardCrypto/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/TxsRB/block_body: DijkstraBlockBody DijkstraEra/Generate bytestring from CDDL and decode (annotator) -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/TxsRB/block_body: DijkstraBlockBody DijkstraEra/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/account_balance_intervals: Map AccountId (AccountBalanceInterval DijkstraEra)/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/auxiliary_data: MemoBytes (AlonzoTxAuxDataRaw DijkstraEra)/Generate bytestring from CDDL and decode (annotator) -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/auxiliary_data: MemoBytes (AlonzoTxAuxDataRaw DijkstraEra)/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/certificate: DijkstraTxCert DijkstraEra/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/certificates: OSet (DijkstraTxCert DijkstraEra)/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/datum_option: Datum DijkstraEra/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/eb_announcement: EbAnnouncement/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/gov_action: GovAction DijkstraEra/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/header: Annotator (MemoBytes (HeaderRaw StandardCrypto))/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/native_script: DijkstraNativeScript DijkstraEra/Generate bytestring from CDDL and decode (annotator) -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/native_script: DijkstraNativeScript DijkstraEra/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/proposal_procedure: ProposalProcedure DijkstraEra/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/proposal_procedures: OSet (ProposalProcedure DijkstraEra)/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/script: AlonzoScript DijkstraEra/Generate bytestring from CDDL and decode (annotator) -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/script: AlonzoScript DijkstraEra/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/sub_transaction_body: MemoBytes (DijkstraTxBodyRaw SubTx DijkstraEra)/Generate bytestring from CDDL and decode (annotator) -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/sub_transaction_body: MemoBytes (DijkstraTxBodyRaw SubTx DijkstraEra)/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/transaction: DijkstraTx TopTx DijkstraEra/Generate bytestring from CDDL and decode (annotator) -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/transaction: DijkstraTx TopTx DijkstraEra/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/transaction_body: MemoBytes (DijkstraTxBodyRaw TopTx DijkstraEra)/Generate bytestring from CDDL and decode (annotator) -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/transaction_body: MemoBytes (DijkstraTxBodyRaw TopTx DijkstraEra)/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/transaction_output: BabbageTxOut DijkstraEra/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/transaction_witness_set: MemoBytes (AlonzoTxWitsRaw DijkstraEra)/Generate bytestring from CDDL and decode (annotator) -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/transaction_witness_set: MemoBytes (AlonzoTxWitsRaw DijkstraEra)/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/value: MaryValue/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/voting_procedure: VotingProcedure DijkstraEra/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
| /Dijkstra/Era-specific spec/CDDL/Huddle/voting_procedures: VotingProcedures DijkstraEra/Generate bytestring from CDDL and decode -> encode/ | 9.6.7 | 1601918239 |
Soupstraw
force-pushed
the
jj/dijkstra-twiddling
branch
from
August 13, 2026 14:25
b600acb to
46a6280
Compare
Soupstraw
enabled auto-merge
August 13, 2026 14:25
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.
Description
This PR enables twiddle testing in Dijkstra and fixes some decoders to accept indefinite encodings starting with protocol version 12.
Resolves #5513
Checklist
CHANGELOG.mdfiles updated for packages with externally visible changes.NOTE: New section is never added with the code changes. (See RELEASING.md).
.cabalandCHANGELOG.mdfiles when necessary, according to theversioning process.
.cabalfiles updated when necessary.NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
scripts/fourmolize.sh).scripts/cabal-format.sh).scripts/gen-cddl.sh)hie.yamlupdated (usescripts/gen-hie.sh).