*: add cluster definition v1.11#4291
Conversation
There was a problem hiding this comment.
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.ENRSignaturemay be longer than 65 bytes. In that caseverifySig(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.
|
1896ebf to
e89b766
Compare
There was a problem hiding this comment.
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 indefJSON, 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")
}
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 Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
pinebit
left a comment
There was a problem hiding this comment.
Added couple of comments observed with GPT
|





New cluster definition
v1.11to support variable-sized signatures.category: feature
ticket: #4265