[Leios] BLS voting primitives in the core crypto structure - #1304
Open
williamdemeo wants to merge 3 commits into
Open
[Leios] BLS voting primitives in the core crypto structure#1304williamdemeo wants to merge 3 commits into
williamdemeo wants to merge 3 commits into
Conversation
CIP-164's voting scheme needs BLS12-381 keys with proofs of possession and aggregate signature verification, abstracted here like the existing PKKScheme. The strict total order on key hashes is the committee tie-break (byte-wise ascending pool id). BlsKeyMaxAgeᶜ joins the genesis constants: a registered voting key is honoured for that many epochs, mirroring the KES rotation cadence (recommendation: 20). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit 17cdefc)
Open
4 tasks
Open
4 tasks
Open
4 tasks
Open
4 tasks
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The interface additions are consistently propagated to the foreign and test implementations with no unresolved correctness issues.
Pull request overview
Adds foundational Leios BLS voting abstractions and voting-key lifetime configuration to the core ledger specification.
Changes:
- Extends
CryptoStructurewith BLS types, verification predicates, and ordered key hashes. - Adds
BlsKeyMaxAgeᶜto global constants. - Updates foreign and test implementations accordingly.
File summaries
| File | Description |
|---|---|
CHANGELOG.md |
Records the new Leios primitives. |
src/Ledger/Core/Specification/Crypto.lagda.md |
Defines BLS abstractions and key-hash ordering. |
src/Ledger/Core/Specification/Epoch.lagda.md |
Defines voting-key maximum age. |
src/Ledger/Core/Foreign/Crypto/Structure.agda |
Implements the new crypto fields. |
src/Ledger/Core/Foreign/Epoch.agda |
Supplies the foreign expiry constant. |
formal-ledger-test/src/Test/LedgerImplementation.lagda.md |
Supplies test implementations for the new fields. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
carlostome
reviewed
Sep 8, 2026
| -- BLS12-381 signature scheme used for Leios voting (CIP-0164). | ||
| field BlsVKey BlsSig BlsPoP : Type | ||
| isValidPoP : BlsVKey → BlsPoP → Type | ||
| isSignedByAggregate : List BlsVKey → Ser → BlsSig → Type |
Collaborator
There was a problem hiding this comment.
Does the order of BlsVKeys matter? (Maybe this should be a set?)
Member
Author
There was a problem hiding this comment.
I prefer List type to Set, but we can discuss.
| Quorum : ℕ | ||
| NetworkId : Network | ||
| -- Epochs a registered Leios voting key is honoured before it must be re-registered (CIP-0164). | ||
| BlsKeyMaxAgeᶜ : ℕ |
Collaborator
There was a problem hiding this comment.
Is this a constant or a pparam?
williamdemeo
force-pushed
the
leios-bls-primitives
branch
from
September 10, 2026 05:55
aa2aee4 to
547e2c6
Compare
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.
Splits the first commit out of #1300, as agreed with @ch1bo on Slack, with his authorship on the commit: the abstract BLS carriers and verification predicates (
BlsVKey,BlsSig,BlsPoP,isValidPoP,isSignedByAggregateoverSer) and the strict total order on key hashes that serves as the Leios committee tie-break, added toLedger.Core.Specification.Crypto'sCryptoStructureand mirrored in theForeigninstance and the test implementation, plus theBlsKeyMaxAgeᶜvoting-key time-to-live in the genesis constants.This part of #1300 is stable under both answers to the open key-registration question (the pool-registration field of CIP-164's current text, or the dedicated certificate with expiry of cardano-scaling/CIPs#38), and both [LLF1-2] (#1298) and [LLF1-3] (#1301) build on it, so it lands first; #1300 rebases on top once the registration mechanism is settled.
Refs #1295, #1298.