Skip to content

Conversation

@pinebit
Copy link
Collaborator

@pinebit pinebit commented Nov 27, 2025

This PR removes the entire cluster/manifest package and its associated protobuf definitions (cluster/manifestpb/v1), eliminating over 3,200 lines of code.

Key changes:

  • Deleted cluster/manifest/ package including cluster management, mutations (add validators, node approval, legacy lock), and all helper functions
  • P2P client sets new HTTP header Cluster-Uuid that will be used in future for relays load balancing instead of Lock Hash. This is because edit commands modify lock hash.
  • Deprecated --manifest-file string CLI flag.

category: refactor
ticket: none

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the cluster/manifest package and cluster/manifestpb/v1 protobuf definitions, eliminating over 3,200 lines of code related to cluster manifest management. The codebase now exclusively uses the cluster.Lock structure instead of the protobuf-based manifestpb.Cluster.

Key changes:

  • Replaced manifest-based cluster loading with direct cluster.Lock usage throughout the codebase
  • Added Charon-UUID HTTP header to P2P relay connections for future load balancing
  • Deprecated --manifest-file CLI flag with backward compatibility note

Reviewed changes

Copilot reviewed 56 out of 56 changed files in this pull request and generated no comments.

Show a summary per file
File Description
p2p/bootnode.go Added uuid parameter to relay functions and new Charon-Uuid HTTP header
cluster/load.go New file implementing cluster lock loading and verification
app/disk.go Simplified to use new cluster.LoadClusterLock function
app/app.go Migrated from manifestpb.Cluster to cluster.Lock throughout
eth2util/keystore/keystore.go Updated to use cluster.Lock instead of manifestpb.Cluster
cmd/*.go Updated all commands to use cluster.LoadClusterLockAndVerify
cmd/combine/combine.go Removed manifest loading support, now lock-only
docs/configuration.md Marked --manifest-file flag as deprecated

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


// LoadClusterLockAndVerify loads and verifies the cluster lock. Suitable for cmd tools.
func LoadClusterLockAndVerify(ctx context.Context, lockFilePath string) (*Lock, error) {
eth1Cl := eth1wrap.NewDefaultEthClientRunner("")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this meant to be empty ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shall not be, but most of the commands that load cluster-lock do not have Execution layer address params in their flags, and therefore we cannot instantiate this client...
This may be another follow up change to go over ALL the commands and add EL address flags, then this won't be empty.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's worse, the previous code passed nil instead of eth1 client to VerifySignatures.

@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

❌ Patch coverage is 51.36986% with 71 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.02%. Comparing base (1cf3d3a) to head (76bf08b).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
app/app.go 0.00% 45 Missing ⚠️
cluster/load.go 31.81% 9 Missing and 6 partials ⚠️
p2p/bootnode.go 0.00% 5 Missing ⚠️
cmd/depositsign.go 71.42% 0 Missing and 2 partials ⚠️
app/disk.go 66.66% 1 Missing ⚠️
cmd/combine/combine.go 92.85% 0 Missing and 1 partial ⚠️
cmd/exit_sign.go 80.00% 0 Missing and 1 partial ⚠️
eth2util/keystore/keystore.go 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4130      +/-   ##
==========================================
+ Coverage   56.43%   57.02%   +0.58%     
==========================================
  Files         245      235      -10     
  Lines       31175    30346     -829     
==========================================
- Hits        17595    17306     -289     
+ Misses      11272    10834     -438     
+ Partials     2308     2206     -102     

☔ View full report in Codecov by Sentry.
📢 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.

@sonarqubecloud
Copy link

@KaloyanTanev KaloyanTanev added the do not merge Indicate to bulldozer bot that this PR should not be merged label Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Indicate to bulldozer bot that this PR should not be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants