Skip to content

[Leios] LLF1-2: single-vote BLS verification and voting-crypto prose (#1298) - #1305

Open
williamdemeo wants to merge 2 commits into
leios-bls-primitivesfrom
1298-llf1-2-leios-bls-verification
Open

[Leios] LLF1-2: single-vote BLS verification and voting-crypto prose (#1298)#1305
williamdemeo wants to merge 2 commits into
leios-bls-primitivesfrom
1298-llf1-2-leios-bls-verification

Conversation

@williamdemeo

@williamdemeo williamdemeo commented Sep 2, 2026

Copy link
Copy Markdown
Member

Ports the surviving scope of the fork trial's abstract voting-crypto interface onto the core placement of #1304, per the re-scoped issue.

isSignedBy : BlsVKey → Ser → BlsSig → Type joins the crypto structure with a decidability instance: validateVote in the proposed consensus↔ledger interface needs the ledger-side meaning of one properly signed vote, and aggregate verification does not subsume the singleton case, since the specification fixes no relation between the two abstract predicates. The Foreign instance and the test implementation mirror the field.

The voting-crypto block also leaves the hidden literate region: the rendered page now shows the fields, with prose for the BLS12-381 MinSig instantiation (96-byte verification keys, 48-byte signatures and proofs of possession), the rogue-key rationale for mandatory proofs of possession, the verification-only discipline (the ledger never creates votes or certificates), and the committee tie-break order on key hashes. Decidability instances stay hidden, as elsewhere in the module.

Stacked on #1304 (base leios-bls-primitives); re-targets leios-main when #1304 merges. The fork module this replaces is closed with pointers (williamdemeo#16); the remaining carriers (EBHash, TxRefHash, hashEBRefs) land with [LLF1-3] (#1301).

Both the Ledger.Dijkstra and Ledger import closures type-check locally at this head.

Closes #1298.

🤖 AI-assisted development: Claude Fable 5 (Anthropic)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The documented proof-of-possession size conflicts with the linked CIP’s CDDL schema.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds singleton BLS vote verification to the shared crypto abstraction and documents Leios voting cryptography.

Changes:

  • Adds decidable isSignedBy.
  • Implements foreign and test predicates.
  • Exposes voting-crypto documentation.
File summaries
File Description
src/Ledger/Core/Specification/Crypto.lagda.md Extends and documents the crypto interface.
src/Ledger/Core/Foreign/Crypto/Structure.agda Implements foreign singleton verification.
formal-ledger-test/src/Test/LedgerImplementation.lagda.md Supplies the test implementation.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +93 to +94
instantiates it with BLS12-381 MinSig, 96-byte verification keys with 48-byte
signatures and proofs of possession. It lives here, beside the payment
@williamdemeo
williamdemeo force-pushed the 1298-llf1-2-leios-bls-verification branch from 3a80fc2 to 4509457 Compare September 10, 2026 05:47
isSignedBy verifies one vote under one key: validateVote in the
proposed consensus↔ledger interface needs the ledger-side meaning, and
aggregate verification does not subsume the singleton case, since the
spec fixes no relation between the two.  The Foreign instance and the
test implementation mirror the field.

The voting-crypto block also moves out of the hidden region: the
rendered page now carries the fields, with prose for the MinSig
instantiation, the rogue-key rationale for proofs of possession, the
verification-only discipline, and the committee tie-break order; the
Peras-sharing intent of the core placement is recorded where it
applies.  Decidability instances stay hidden, as elsewhere in the
module.

AI-assisted development: Claude Fable 5 (Anthropic)
@williamdemeo
williamdemeo force-pushed the 1298-llf1-2-leios-bls-verification branch from 4509457 to eb83dbc Compare September 10, 2026 06:13
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.

[LLF1-2] Leios voting crypto: port the abstract-interface polish onto the core BLS primitives

2 participants