Skip to content

cluster: verify lock deposit data and registrations - #4819

Open
OisinKyne wants to merge 1 commit into
oisin/strict-lock-verificationfrom
oisin/lock-content-checks
Open

OisinKyne wants to merge 1 commit into
oisin/strict-lock-verificationfrom
oisin/lock-content-checks

Conversation

@OisinKyne

@OisinKyne OisinKyne commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Adds Lock.VerifyContents. It checks that deposit data matches the DV pubkey, the definition withdrawal credentials and the deposit amounts, and has a valid BLS signature. It checks that builder registrations match the DV pubkey and the definition fee recipient, and that addresses are valid (Definition.VerifyAddresses).

  • Enforced where charon creates a lock from scratch (create cluster, fresh DKG) and on DKG definitions (bypassable with --no-verify).
  • Warn only when loading an existing lock (run, exits, deposit and feerecipient commands), so a running node never fails to restart. Also warn only in the edit protocols and DKG append mode, since their output inherits the old lock's contents.

Make it an error in a later release.

category: feature
ticket: none

@github-actions github-actions Bot added the branch-invalid PR raised against invalid branch. Not a main or release branch. label Nov 4, 2026
@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.24528% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.89%. Comparing base (35bce88) to head (09a67de).

Files with missing lines Patch % Lines
cluster/lock.go 80.00% 14 Missing ⚠️
cluster/definition.go 78.94% 4 Missing ⚠️
dkg/disk.go 50.00% 2 Missing ⚠️
cmd/createcluster.go 50.00% 1 Missing ⚠️
dkg/dkg.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@                        Coverage Diff                         @@
##           oisin/strict-lock-verification    #4819      +/-   ##
==================================================================
+ Coverage                           67.81%   67.89%   +0.07%     
==================================================================
  Files                                 255      255              
  Lines                               33808    33914     +106     
==================================================================
+ Hits                                22928    23026      +98     
- Misses                              10879    10887       +8     
  Partials                                1        1              

☔ 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.

Comment thread cluster/lock.go Resolved
Adds Lock.VerifyContents: deposit data must match the distributed validator pubkey,
the definition withdrawal credentials and deposit amounts, and carry a valid BLS
signature; builder registrations must match the distributed validator pubkey and the
definition fee recipient; addresses must be valid (Definition.VerifyAddresses).

Only enforced where charon creates a lock from scratch (create cluster and a fresh
DKG), plus address checks on DKG definitions. Loading an existing lock (run, exits,
other commands), the edit protocols and appending validators don't check contents,
so startup isn't slowed by BLS verifying every deposit signature.

category: feature
ticket: none
@OisinKyne
OisinKyne force-pushed the oisin/lock-content-checks branch from 3081c4d to 09a67de Compare November 4, 2026 17:13
@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch-invalid PR raised against invalid branch. Not a main or release branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants