docs: BLS12-381 migration plan#35
Open
simonzg wants to merge 2 commits into
Open
Conversation
5-PR plan to replace the PBC/libgmp CGo BLS implementation with BLS12-381 (blst), matching the Ethereum beacon chain signature scheme. Covers interface design, dual-key staking registration, fork-gated block verification, key migration tooling, and testnet activation timeline. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
After cross-referencing the full codebase, the original plan missed 14 files and several important concerns: - Added missing files: qc_vote_manager.go, tc_vote_manager.go, pacemaker_assist.go, reactor_assist.go, reactor_bootstrap_committee.go, key_loader.go, utils.go, cmd/mdb/main.go - TC (timeout certificate) signing path needs same fork-gate as QC - QCVoteManager/TCVoteManager hold bls.System directly; must accept BLSCommon interface instead - ComputeDoubleSigner in stats_tx.go calls bls.Verify directly and needs a fork-height branch for pre-fork evidence - comboPubKey/SplitPubKey format is implementation-specific - Delegate.BlsPubKey has a misleading JSON tag (never actually marshalled) - Keystore format change spec (bls12381_public_key, bls12381_private_key) - Pre-fork quorum check location (PrepareEnvForPacemaker) - api/node CsPubKey length change affects external consumers - candidateUpdate handler also needs BlsPubKey2 parsing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
Adds a detailed engineering plan for migrating Meter's BLS implementation from PBC (libgmp/libpbc CGo) to BLS12-381 (blst), aligning with the Ethereum beacon chain signature scheme.
Document covers
VerifyQCthat handles both old and new blocks during historical syncmeter keygen-bls12381CLI tool design (HKDF-derived from ECDSA key)PR dependency chain
PRs 1–2 are additive with no consensus risk. PRs 3–5 require validator coordination before merging to mainnet.
🤖 Generated with Claude Code