Skip to content

fix(consensus): bind the BLS proof-of-possession to the chain and registrant - #1506

Merged
sebastijankuzner merged 13 commits into
developfrom
fix/consensus/bls-pop-binding
Sep 30, 2026
Merged

sebastijankuzner merged 13 commits into
developfrom
fix/consensus/bls-pop-binding

Conversation

@oXtxNt9U

Copy link
Copy Markdown
Contributor

Summary

registerValidator / updateValidator accept any (blsPublicKey, proofOfPossession) pair from any sender. The PoP proves someone holds the key, but not who is registering it or on which chain.

So anyone can copy a pair from the mempool or another network and submit it first. Their registration wins, the key is burned permanently (BlsKeyAlreadyRegistered) and the real validator's transaction reverts.

The fix:

The PoP now signs chainId ‖ registrantAddress ‖ blsPublicKey, so it is only valid for the address that created it, on one chain:

  • ConsensusV1 passes msg.sender and block.chainid into the PoP precompile.
  • buildProofOfPossession(privateKey, { chainId, registrantAddress }) builds the matching message.

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@oXtxNt9U
oXtxNt9U added this pull request to stack #1507 September 29, 2026 05:59
@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.09%. Comparing base (dbf6db6) to head (127bfd7).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1506      +/-   ##
===========================================
+ Coverage    79.74%   80.09%   +0.35%     
===========================================
  Files          954      965      +11     
  Lines        17089    17567     +478     
  Branches      2530     2606      +76     
===========================================
+ Hits         13627    14070     +443     
- Misses        3457     3489      +32     
- Partials         5        8       +3     
Flag Coverage Δ
contracts 91.95% <ø> (?)
packages 79.79% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@oXtxNt9U
oXtxNt9U force-pushed the fix/consensus/bls-pop-binding branch from 554587e to b217253 Compare September 29, 2026 09:25
Base automatically changed from fix/evm/chainid to develop September 29, 2026 09:51
@sebastijankuzner
sebastijankuzner force-pushed the fix/consensus/bls-pop-binding branch from b217253 to 19bb58e Compare September 29, 2026 09:51
@sebastijankuzner
sebastijankuzner merged commit 99fb93e into develop Sep 30, 2026
26 checks passed
@sebastijankuzner
sebastijankuzner deleted the fix/consensus/bls-pop-binding branch September 30, 2026 09:20
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.

2 participants