From 222b360c66c23b0c723509f0b989b1b791282261 Mon Sep 17 00:00:00 2001 From: Preston Van Loon Date: Thu, 12 Sep 2024 21:00:41 -0500 Subject: [PATCH] Electra: Remove signing domain for consolidations (#14437) * Electra: Remove signing domain for consolidations. See https://github.com/ethereum/consensus-specs/pull/3915 * Update changelog --- CHANGELOG.md | 2 ++ beacon-chain/rpc/eth/config/handlers_test.go | 8 +------- config/params/config.go | 1 - config/params/mainnet_config.go | 1 - 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e29f3254800..0184b8e22988 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,8 +42,10 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve - `--enable-experimental-state` flag is deprecated. This feature is now on by default. Opt-out with `--disable-experimental-state`. ### Removed + - removed gRPC Gateway - Removed unused blobs bundle cache +- Removed consolidation signing domain from params. The Electra design changed such that EL handles consolidation signature verification. ### Fixed diff --git a/beacon-chain/rpc/eth/config/handlers_test.go b/beacon-chain/rpc/eth/config/handlers_test.go index b7bec05faada..f273f948133e 100644 --- a/beacon-chain/rpc/eth/config/handlers_test.go +++ b/beacon-chain/rpc/eth/config/handlers_test.go @@ -175,10 +175,6 @@ func TestGetSpec(t *testing.T) { var dam [4]byte copy(dam[:], []byte{'1', '0', '0', '0'}) config.DomainApplicationMask = dam - var dc [4]byte - copy(dc[:], []byte{'1', '1', '0', '0'}) - config.DomainConsolidation = dc - params.OverrideBeaconConfig(config) request := httptest.NewRequest(http.MethodGet, "http://example.com/eth/v1/config/spec", nil) @@ -192,7 +188,7 @@ func TestGetSpec(t *testing.T) { data, ok := resp.Data.(map[string]interface{}) require.Equal(t, true, ok) - assert.Equal(t, 155, len(data)) + assert.Equal(t, 154, len(data)) for k, v := range data { t.Run(k, func(t *testing.T) { switch k { @@ -515,8 +511,6 @@ func TestGetSpec(t *testing.T) { assert.Equal(t, "86", v) case "MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD": assert.Equal(t, "87", v) - case "DOMAIN_CONSOLIDATION": - assert.Equal(t, "0x31313030", v) case "MAX_ATTESTER_SLASHINGS_ELECTRA": assert.Equal(t, "88", v) case "MAX_ATTESTATIONS_ELECTRA": diff --git a/config/params/config.go b/config/params/config.go index 5f9e37f0df34..7ed09964a168 100644 --- a/config/params/config.go +++ b/config/params/config.go @@ -125,7 +125,6 @@ type BeaconChainConfig struct { DomainApplicationMask [4]byte `yaml:"DOMAIN_APPLICATION_MASK" spec:"true"` // DomainApplicationMask defines the BLS signature domain for application mask. DomainApplicationBuilder [4]byte `yaml:"DOMAIN_APPLICATION_BUILDER" spec:"true"` // DomainApplicationBuilder defines the BLS signature domain for application builder. DomainBLSToExecutionChange [4]byte `yaml:"DOMAIN_BLS_TO_EXECUTION_CHANGE" spec:"true"` // DomainBLSToExecutionChange defines the BLS signature domain to change withdrawal addresses to ETH1 prefix - DomainConsolidation [4]byte `yaml:"DOMAIN_CONSOLIDATION" spec:"true"` // Prysm constants. GenesisValidatorsRoot [32]byte // GenesisValidatorsRoot is the root hash of the genesis validators. diff --git a/config/params/mainnet_config.go b/config/params/mainnet_config.go index 334aec572c74..012a98f8d592 100644 --- a/config/params/mainnet_config.go +++ b/config/params/mainnet_config.go @@ -171,7 +171,6 @@ var mainnetBeaconConfig = &BeaconChainConfig{ DomainApplicationMask: bytesutil.Uint32ToBytes4(0x00000001), DomainApplicationBuilder: bytesutil.Uint32ToBytes4(0x00000001), DomainBLSToExecutionChange: bytesutil.Uint32ToBytes4(0x0A000000), - DomainConsolidation: bytesutil.Uint32ToBytes4(0x0B000000), // Prysm constants. GenesisValidatorsRoot: [32]byte{75, 54, 61, 185, 78, 40, 97, 32, 215, 110, 185, 5, 52, 15, 221, 78, 84, 191, 233, 240, 107, 243, 63, 246, 207, 90, 210, 127, 81, 27, 254, 149},