*: fix lock share binding validation#4514
Conversation
Enforce that threshold public shares reconstruct each validator distributed public key during lock signature verification to prevent inconsistent lock key material. Co-authored-by: Cursor <cursoragent@cursor.com>
Fail lock signature verification when validator public shares contain duplicates to enforce one distinct share per operator. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4514 +/- ##
==========================================
+ Coverage 56.48% 57.15% +0.66%
==========================================
Files 244 245 +1
Lines 32550 33020 +470
==========================================
+ Hits 18386 18871 +485
+ Misses 11819 11775 -44
- Partials 2345 2374 +29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The polynomial check already catches identity shares in any position. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR strengthens cluster.Lock.VerifySignatures by validating that each distributed validator’s PubShares are well-formed and actually bind to (reconstruct) the declared distributed validator public key, preventing malformed or inconsistent lock files from being accepted.
Changes:
- Add validation for duplicate distributed validator pubkeys, share count mismatches, duplicate shares, and share-to-DV-key reconstruction.
- Validate that “extra” shares (beyond threshold) are consistent with the distributed key polynomial.
- Add unit tests covering the new rejection cases.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
cluster/lock.go |
Adds share-binding validation during lock signature verification, including reconstruction checks and duplicate detection. |
cluster/lock_test.go |
Adds tests to ensure malformed share bindings are rejected with expected errors. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|



This PR hardens cluster lock validation to close a reported vulnerability where malformed validator entries could pass per-validator checks.
What changed
thresholdshares.tbls.RecoverPubkeypath (Herumi-backed) and improve error context.Why
Previously, duplicated/malformed lock entries could satisfy local checks while still being structurally unsafe.
These checks ensure each validator’s shares are globally consistent with its distributed key and prevent duplicate-key lock entries from being accepted.
Compatibility / behavior
obol-sdk(fix/lock-share-binding-validation).category: bug
ticket: none