Skip to content

*: add cluster definition v1.11#4291

Open
DiogoSantoss wants to merge 9 commits into
mainfrom
diogo/variable-size-signatures
Open

*: add cluster definition v1.11#4291
DiogoSantoss wants to merge 9 commits into
mainfrom
diogo/variable-size-signatures

Conversation

@DiogoSantoss
Copy link
Copy Markdown
Contributor

New cluster definition v1.11 to support variable-sized signatures.

category: feature
ticket: #4265

@DiogoSantoss DiogoSantoss self-assigned this Feb 6, 2026
@DiogoSantoss DiogoSantoss added the do not merge Indicate to bulldozer bot that this PR should not be merged label Feb 6, 2026
Copy link
Copy Markdown
Contributor

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 introduces cluster definition v1.11.0 as the new default schema version, aiming to support variable-sized signatures (e.g., Safe multisig) and address DKG failures caused by signature length assumptions during hash verification (#4265).

Changes:

  • Add and enable v1.11.0 as the default/supported cluster definition version.
  • Introduce v1.11 SSZ hashing + JSON marshal/unmarshal paths, including support for signature byte-lists.
  • Add new v1.11 golden testdata for definition + lock encoding.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
cluster/version.go Sets v1.11.0 as default and adds it to supported versions.
cluster/ssz.go Adds v1.11 SSZ hashing and increases signature flexibility via ByteList hashing.
cluster/operator.go Updates operator signature SSZ tags to reflect variable-sized signatures.
cluster/lock.go Enables v1.11 for lock marshal/unmarshal routing.
cluster/definition.go Adds signature length validation + v1.11 JSON marshal/unmarshal routing.
cluster/cluster_test.go Updates encode test expectations for v1.11 behavior.
cluster/testdata/cluster_definition_v1_11_0.json New v1.11 definition golden file.
cluster/testdata/cluster_lock_v1_11_0.json New v1.11 lock golden file.
app/monitoringapi.go Whitespace-only change in error-handling branches.
Comments suppressed due to low confidence (1)

cluster/definition.go:267

  • For v1.11 Safe/multisig signatures, o.ConfigSignature / o.ENRSignature may be longer than 65 bytes. In that case verifySig (ECDSA recover) will return an error, and the current code returns immediately without attempting the ERC-1271 (VerifySmartContractBasedSignature) fallback. To support variable-length contract signatures, treat non-65-byte signatures (or recover errors) as a non-match and fall back to ERC-1271 instead of returning the error.
		// Check that we have a valid config signature for each operator.
		if ok, err := verifySig(o.Address, operatorConfigHashDigest, o.ConfigSignature); err != nil {
			return err
		} else if !ok {
			// Check ERC-1271 signature

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

Comment thread cluster/ssz.go Outdated
Comment thread cluster/definition.go Outdated
Comment thread cluster/definition.go
Comment thread cluster/ssz.go
Comment thread cluster/ssz.go Outdated
Comment thread cluster/definition.go Outdated
Comment thread cluster/definition.go Outdated
Comment thread cluster/definition.go Outdated
Comment thread cluster/operator.go Outdated
Comment thread cluster/operator.go Outdated
Comment thread cluster/ssz.go
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 9, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
4 Security Hotspots

See analysis details on SonarQube Cloud

@KaloyanTanev KaloyanTanev force-pushed the diogo/variable-size-signatures branch from 1896ebf to e89b766 Compare June 2, 2026 08:16
@KaloyanTanev KaloyanTanev removed the do not merge Indicate to bulldozer bot that this PR should not be merged label Jun 2, 2026
@KaloyanTanev KaloyanTanev requested a review from Copilot June 2, 2026 08:17
@KaloyanTanev KaloyanTanev changed the title add cluster definition v1.11 *: add cluster definition v1.11 Jun 2, 2026
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

cluster/definition.go:1002

  • Deposit amount validation is currently checking the named return value def (still zero-value at this point) instead of the parsed JSON values in defJSON, so invalid/unsupported deposit amounts could slip through unmarshalling.
	if len(defJSON.ValidatorAddresses) != defJSON.NumValidators {
		return Definition{}, errors.New("num_validators not matching validators length")
	}

	if err := deposit.VerifyDepositAmounts(def.DepositAmounts, def.Compounding); err != nil {
		return Definition{}, errors.Wrap(err, "invalid deposit amounts")
	}

Comment thread cluster/helpers.go
Comment thread cluster/definition.go Outdated
Comment thread cluster/definition.go Outdated
KaloyanTanev and others added 3 commits June 2, 2026 10:29
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: kalo <24719519+KaloyanTanev@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

❌ Patch coverage is 63.76147% with 79 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.04%. Comparing base (941729d) to head (d725fc5).

Files with missing lines Patch % Lines
cluster/ssz.go 53.62% 16 Missing and 16 partials ⚠️
cluster/definition.go 74.07% 7 Missing and 7 partials ⚠️
app/eth1wrap/runner.go 70.00% 5 Missing and 1 partial ⚠️
cmd/createcluster.go 37.50% 2 Missing and 3 partials ⚠️
cluster/helpers.go 84.61% 2 Missing and 2 partials ⚠️
cluster/load.go 0.00% 4 Missing ⚠️
dkg/protocol.go 0.00% 2 Missing and 2 partials ⚠️
dkg/dkg.go 0.00% 1 Missing and 2 partials ⚠️
app/app.go 0.00% 2 Missing ⚠️
cmd/combine/combine.go 0.00% 1 Missing and 1 partial ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4291      +/-   ##
==========================================
+ Coverage   57.02%   57.04%   +0.01%     
==========================================
  Files         245      245              
  Lines       33150    33315     +165     
==========================================
+ Hits        18905    19005     +100     
- Misses      11856    11888      +32     
- Partials     2389     2422      +33     

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

Copy link
Copy Markdown
Collaborator

@pinebit pinebit left a comment

Choose a reason for hiding this comment

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

Added couple of comments observed with GPT

Comment thread cluster/helpers.go
Comment thread cluster/definition.go
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 3, 2026

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.

4 participants