Constrain the size of leios_certificate signers - #5888
Merged
Merged
Conversation
ch1bo
marked this pull request as draft
June 30, 2026 06:00
10 tasks
ch1bo
force-pushed
the
ch1bo/constrain-leios-cert-signers
branch
from
June 30, 2026 09:41
8618cd2 to
4ae4181
Compare
ch1bo
force-pushed
the
ch1bo/constrain-leios-cert-signers
branch
from
July 3, 2026 07:21
4ae4181 to
a68f977
Compare
ch1bo
force-pushed
the
ch1bo/constrain-leios-cert-signers
branch
2 times, most recently
from
July 5, 2026 16:55
eef6599 to
e099c92
Compare
koslambrou
force-pushed
the
leios-prototype
branch
2 times, most recently
from
July 16, 2026 21:08
f0b2085 to
9edd1c6
Compare
lehins
approved these changes
Aug 3, 2026
lehins
left a comment
Collaborator
There was a problem hiding this comment.
It seems to me that we can merge this PR.
lehins
reviewed
Aug 3, 2026
ch1bo
force-pushed
the
ch1bo/constrain-leios-cert-signers
branch
from
August 27, 2026 19:19
e099c92 to
d514faa
Compare
6 tasks
ch1bo
force-pushed
the
ch1bo/constrain-leios-cert-signers
branch
2 times, most recently
from
August 28, 2026 12:19
c8407af to
c10bb7f
Compare
ch1bo
marked this pull request as ready for review
August 28, 2026 12:22
ch1bo
force-pushed
the
ch1bo/constrain-leios-cert-signers
branch
from
August 28, 2026 12:25
c10bb7f to
2f008af
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces an upper bound on the decoded size of Leios certificate signer bitfields, aligning the ledger’s CBOR decoding and Dijkstra-era CDDL/spec generation with the maximum addressable Leios committee size.
Changes:
- Add
maxLeiosCertSignersBytesand enforce it in theDecCBORinstance forLeiosCert(reject oversized signer bitfields). - Update Dijkstra CDDL/Huddle spec to constrain
leios_certificate.signersbyte size and rename the signature field tosignature. - Update Dijkstra’s
cardano-crypto-leioslower bound and pincardano-baseviacabal.projectfor the required dependency state.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/cardano-ledger-binary/src/Cardano/Ledger/Binary/Decoding/DecCBOR.hs | Adds max signer-size constant and rejects oversized LeiosCert signer bitfields during decoding. |
| libs/cardano-ledger-binary/CHANGELOG.md | Documents the new LeiosCert decoding constraint. |
| eras/dijkstra/impl/cddl/lib/Cardano/Ledger/Dijkstra/HuddleSpec.hs | Constrains signers bytes in generated spec; renames cert signature field to signature. |
| eras/dijkstra/impl/cddl/data/dijkstra.cddl | Reflects signer size bound (0..8192) and signature field rename in the published CDDL. |
| eras/dijkstra/impl/cardano-ledger-dijkstra.cabal | Bumps cardano-crypto-leios lower bound to >=0.3. |
| cabal.project | Pins cardano-base to a specific git tag needed by upcoming dependencies. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ch1bo
force-pushed
the
ch1bo/constrain-leios-cert-signers
branch
2 times, most recently
from
August 28, 2026 13:02
c946442 to
953ea4b
Compare
The maximum length is determined by the maximum LeiosSeatId and now exported by cardano-crypto-leios
ch1bo
force-pushed
the
ch1bo/constrain-leios-cert-signers
branch
from
August 31, 2026 08:31
953ea4b to
02bef48
Compare
ch1bo
enabled auto-merge
August 31, 2026 08:32
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.
The maximum length is determined by the maximum LeiosVoterId. As this is a Word16, the max number of entries is 65535 bits = 8192 bytes
This is now based on the upcoming
cardano-crypto-leios 0.3and requires IntersectMBO/cardano-base#697Checklist
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).