fix(leios): voting mechanics to match musashi#2823
Conversation
|
Warning Review limit reached
Next review available in: 9 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (25)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
1 issue found across 17 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="ledger/leios/bls.go">
<violation number="1" location="ledger/leios/bls.go:28">
P3: Musashi compatibility is not exercised: round-trip tests share `LeiosVoteDST`, so an incorrect ciphersuite string still passes locally while peers reject votes. Add a fixed Musashi signature/vector test covering `PrototypeVoteMessageBytes` and verification.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| const LeiosVoteDST = "CIP-0164-LEIOS-VOTE-BLS12381G1_XMD:SHA-256_SSWU_RO_" | ||
| // LeiosVoteDST is the proof-of-possession ciphersuite used by | ||
| // cardano-crypto-leios' minSigPoPDST. | ||
| const LeiosVoteDST = "BLS_SIG_BLS12381G1_XMD:SHA-256_SSWU_RO_POP_" |
There was a problem hiding this comment.
P3: Musashi compatibility is not exercised: round-trip tests share LeiosVoteDST, so an incorrect ciphersuite string still passes locally while peers reject votes. Add a fixed Musashi signature/vector test covering PrototypeVoteMessageBytes and verification.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At ledger/leios/bls.go, line 28:
<comment>Musashi compatibility is not exercised: round-trip tests share `LeiosVoteDST`, so an incorrect ciphersuite string still passes locally while peers reject votes. Add a fixed Musashi signature/vector test covering `PrototypeVoteMessageBytes` and verification.</comment>
<file context>
@@ -23,11 +23,9 @@ import (
-const LeiosVoteDST = "CIP-0164-LEIOS-VOTE-BLS12381G1_XMD:SHA-256_SSWU_RO_"
+// LeiosVoteDST is the proof-of-possession ciphersuite used by
+// cardano-crypto-leios' minSigPoPDST.
+const LeiosVoteDST = "BLS_SIG_BLS12381G1_XMD:SHA-256_SSWU_RO_POP_"
// Vote signatures follow the BLS MinSig variant on BLS12-381: signatures
</file context>
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
25f37cd to
8608f21
Compare
There was a problem hiding this comment.
All reported issues were addressed across 26 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
Closes #2821
Summary by cubic
Aligns Leios voting with the Musashi prototype: everyone-votes committee, BLS POP ciphersuite, votes sign the announcing ranking-block hash, and local prototype votes are diffused with the correct RB context end-to-end.
New Features
DerivePrototypeVoteSigningKey, and signatures are verified against the derived G2 public key; addedValidatePrototypeEbCertificate.leios.vote_emittedevent);leios.eb_quorumnow includes the announcing RB hash for certificate context.ParentLeiosAnnouncementnow returns both RB and EB hashes; the node enables PrototypeMode and routesleios.vote_emittedto LeiosNotify; LeiosVotes handler addsHandlePrototypeVoteandObserveAnnouncement; LeiosNotify can enqueue/send/receive 3-field prototype votes and handles per-connection delivery. Deps: bumpgithub.qkg1.top/blinklabs-io/gouroborostov0.188.0.Migration
leiosVoteSigningKeyFileis set, it must match the derived key or startup will fail—remove or replace it.Written for commit c025947. Summary will update on new commits.