diff --git a/beacon-chain/rpc/eth/beacon/config_test.go b/beacon-chain/rpc/eth/beacon/config_test.go index edc3091727..2d88c69842 100644 --- a/beacon-chain/rpc/eth/beacon/config_test.go +++ b/beacon-chain/rpc/eth/beacon/config_test.go @@ -50,8 +50,6 @@ func TestGetSpec(t *testing.T) { config.AltairForkEpoch = 100 config.BellatrixForkVersion = []byte("BellatrixForkVersion") config.BellatrixForkEpoch = 101 - config.ShardingForkVersion = []byte("ShardingForkVersion") - config.ShardingForkEpoch = 102 config.CapellaForkVersion = []byte("CapellaForkVersion") config.CapellaForkEpoch = 103 config.BLSWithdrawalPrefixByte = byte('b') @@ -139,7 +137,7 @@ func TestGetSpec(t *testing.T) { resp, err := server.GetSpec(context.Background(), &emptypb.Empty{}) require.NoError(t, err) - assert.Equal(t, 105, len(resp.Data)) + assert.Equal(t, 103, len(resp.Data)) for k, v := range resp.Data { switch k { case "CONFIG_NAME": @@ -204,10 +202,6 @@ func TestGetSpec(t *testing.T) { assert.Equal(t, "0x"+hex.EncodeToString([]byte("BellatrixForkVersion")), v) case "BELLATRIX_FORK_EPOCH": assert.Equal(t, "101", v) - case "SHARDING_FORK_VERSION": - assert.Equal(t, "0x"+hex.EncodeToString([]byte("ShardingForkVersion")), v) - case "SHARDING_FORK_EPOCH": - assert.Equal(t, "102", v) case "CAPELLA_FORK_VERSION": assert.Equal(t, "0x"+hex.EncodeToString([]byte("CapellaForkVersion")), v) case "CAPELLA_FORK_EPOCH": diff --git a/config/params/config.go b/config/params/config.go index 7df9e7e26f..b97b32a701 100644 --- a/config/params/config.go +++ b/config/params/config.go @@ -149,8 +149,6 @@ type BeaconChainConfig struct { AltairForkEpoch types.Epoch `yaml:"ALTAIR_FORK_EPOCH" spec:"true"` // AltairForkEpoch is used to represent the assigned fork epoch for altair. BellatrixForkVersion []byte `yaml:"BELLATRIX_FORK_VERSION" spec:"true"` // BellatrixForkVersion is used to represent the fork version for bellatrix. BellatrixForkEpoch types.Epoch `yaml:"BELLATRIX_FORK_EPOCH" spec:"true"` // BellatrixForkEpoch is used to represent the assigned fork epoch for bellatrix. - ShardingForkVersion []byte `yaml:"SHARDING_FORK_VERSION" spec:"true"` // ShardingForkVersion is used to represent the fork version for sharding. - ShardingForkEpoch types.Epoch `yaml:"SHARDING_FORK_EPOCH" spec:"true"` // ShardingForkEpoch is used to represent the assigned fork epoch for sharding. CapellaForkVersion []byte `yaml:"CAPELLA_FORK_VERSION" spec:"true"` // CapellaForkVersion is used to represent the fork version for capella. CapellaForkEpoch types.Epoch `yaml:"CAPELLA_FORK_EPOCH" spec:"true"` // CapellaForkEpoch is used to represent the assigned fork epoch for capella. diff --git a/config/params/configset_test.go b/config/params/configset_test.go index 45020c613f..57a423a7da 100644 --- a/config/params/configset_test.go +++ b/config/params/configset_test.go @@ -170,8 +170,6 @@ func compareConfigs(t *testing.T, expected, actual *BeaconChainConfig) { require.DeepEqual(t, expected.AltairForkEpoch, actual.AltairForkEpoch) require.DeepEqual(t, expected.BellatrixForkVersion, actual.BellatrixForkVersion) require.DeepEqual(t, expected.BellatrixForkEpoch, actual.BellatrixForkEpoch) - require.DeepEqual(t, expected.ShardingForkVersion, actual.ShardingForkVersion) - require.DeepEqual(t, expected.ShardingForkEpoch, actual.ShardingForkEpoch) require.DeepEqual(t, expected.ForkVersionSchedule, actual.ForkVersionSchedule) require.DeepEqual(t, expected.SafetyDecay, actual.SafetyDecay) require.DeepEqual(t, expected.TimelySourceFlagIndex, actual.TimelySourceFlagIndex) diff --git a/config/params/interop.go b/config/params/interop.go index e3f49e307d..16114449b4 100644 --- a/config/params/interop.go +++ b/config/params/interop.go @@ -10,7 +10,6 @@ func InteropConfig() *BeaconChainConfig { c.AltairForkVersion = []byte{1, 0, 0, 235} c.BellatrixForkVersion = []byte{2, 0, 0, 235} c.CapellaForkVersion = []byte{3, 0, 0, 235} - c.ShardingForkVersion = []byte{4, 0, 0, 235} c.InitializeForkSchedule() return c diff --git a/config/params/loader.go b/config/params/loader.go index b75180db84..9ba8902993 100644 --- a/config/params/loader.go +++ b/config/params/loader.go @@ -199,8 +199,6 @@ func ConfigToYaml(cfg *BeaconChainConfig) []byte { fmt.Sprintf("CAPELLA_FORK_VERSION: %#x", cfg.CapellaForkVersion), fmt.Sprintf("BELLATRIX_FORK_EPOCH: %d", cfg.BellatrixForkEpoch), fmt.Sprintf("BELLATRIX_FORK_VERSION: %#x", cfg.BellatrixForkVersion), - fmt.Sprintf("SHARDING_FORK_EPOCH: %d", cfg.ShardingForkEpoch), - fmt.Sprintf("SHARDING_FORK_VERSION: %#x", cfg.ShardingForkVersion), fmt.Sprintf("INACTIVITY_SCORE_BIAS: %d", cfg.InactivityScoreBias), fmt.Sprintf("INACTIVITY_SCORE_RECOVERY_RATE: %d", cfg.InactivityScoreRecoveryRate), fmt.Sprintf("TERMINAL_TOTAL_DIFFICULTY: %s", cfg.TerminalTotalDifficulty), diff --git a/config/params/loader_test.go b/config/params/loader_test.go index 76d0eb42df..bc8dd12d17 100644 --- a/config/params/loader_test.go +++ b/config/params/loader_test.go @@ -326,6 +326,9 @@ func fieldsFromYamls(t *testing.T, fps []string) []string { require.NoError(t, yaml.Unmarshal(yamlFile, &m)) for k := range m { + if k == "SHARDING_FORK_VERSION" || k == "SHARDING_FORK_EPOCH" { + continue + } keys = append(keys, k) } diff --git a/config/params/mainnet_config.go b/config/params/mainnet_config.go index e85f846eae..2d898ea21d 100644 --- a/config/params/mainnet_config.go +++ b/config/params/mainnet_config.go @@ -210,8 +210,6 @@ var mainnetBeaconConfig = &BeaconChainConfig{ BellatrixForkEpoch: mainnetBellatrixForkEpoch, CapellaForkVersion: []byte{3, 0, 0, 0}, CapellaForkEpoch: math.MaxUint64, - ShardingForkVersion: []byte{4, 0, 0, 0}, - ShardingForkEpoch: math.MaxUint64, // New values introduced in Altair hard fork 1. // Participation flag indices. @@ -280,17 +278,14 @@ func FillTestVersions(c *BeaconChainConfig, b byte) { c.AltairForkVersion = make([]byte, fieldparams.VersionLength) c.BellatrixForkVersion = make([]byte, fieldparams.VersionLength) c.CapellaForkVersion = make([]byte, fieldparams.VersionLength) - c.ShardingForkVersion = make([]byte, fieldparams.VersionLength) c.GenesisForkVersion[fieldparams.VersionLength-1] = b c.AltairForkVersion[fieldparams.VersionLength-1] = b c.BellatrixForkVersion[fieldparams.VersionLength-1] = b c.CapellaForkVersion[fieldparams.VersionLength-1] = b - c.ShardingForkVersion[fieldparams.VersionLength-1] = b c.GenesisForkVersion[0] = 0 c.AltairForkVersion[0] = 1 c.BellatrixForkVersion[0] = 2 c.CapellaForkVersion[0] = 3 - c.ShardingForkVersion[0] = 4 } diff --git a/config/params/minimal_config.go b/config/params/minimal_config.go index 41679dcc3a..facf82540b 100644 --- a/config/params/minimal_config.go +++ b/config/params/minimal_config.go @@ -89,8 +89,6 @@ func MinimalSpecConfig() *BeaconChainConfig { minimalConfig.BellatrixForkEpoch = math.MaxUint64 minimalConfig.CapellaForkVersion = []byte{3, 0, 0, 1} minimalConfig.CapellaForkEpoch = math.MaxUint64 - minimalConfig.ShardingForkVersion = []byte{4, 0, 0, 1} - minimalConfig.ShardingForkEpoch = math.MaxUint64 minimalConfig.SyncCommitteeSize = 32 minimalConfig.InactivityScoreBias = 4 diff --git a/config/params/testdata/e2e_config.yaml b/config/params/testdata/e2e_config.yaml index 36c5c72a22..2df566d808 100644 --- a/config/params/testdata/e2e_config.yaml +++ b/config/params/testdata/e2e_config.yaml @@ -41,9 +41,6 @@ BELLATRIX_FORK_EPOCH: 8 # Capella CAPELLA_FORK_VERSION: 0x030000fd CAPELLA_FORK_EPOCH: 18446744073709551615 -# Sharding -SHARDING_FORK_VERSION: 0x040000fd -SHARDING_FORK_EPOCH: 18446744073709551615 # Time parameters diff --git a/config/params/testnet_config_test.go b/config/params/testnet_config_test.go index 7078688305..788f344577 100644 --- a/config/params/testnet_config_test.go +++ b/config/params/testnet_config_test.go @@ -135,8 +135,6 @@ func compareConfigs(t *testing.T, expected, actual *params.BeaconChainConfig) { require.DeepEqual(t, expected.AltairForkEpoch, actual.AltairForkEpoch) require.DeepEqual(t, expected.BellatrixForkVersion, actual.BellatrixForkVersion) require.DeepEqual(t, expected.BellatrixForkEpoch, actual.BellatrixForkEpoch) - require.DeepEqual(t, expected.ShardingForkVersion, actual.ShardingForkVersion) - require.DeepEqual(t, expected.ShardingForkEpoch, actual.ShardingForkEpoch) require.DeepEqual(t, expected.ForkVersionSchedule, actual.ForkVersionSchedule) require.DeepEqual(t, expected.SafetyDecay, actual.SafetyDecay) require.DeepEqual(t, expected.TimelySourceFlagIndex, actual.TimelySourceFlagIndex) diff --git a/config/params/testnet_e2e_config.go b/config/params/testnet_e2e_config.go index d8d3d50bd9..b6d51fb4dd 100644 --- a/config/params/testnet_e2e_config.go +++ b/config/params/testnet_e2e_config.go @@ -44,7 +44,6 @@ func E2ETestConfig() *BeaconChainConfig { e2eConfig.AltairForkVersion = []byte{1, 0, 0, 253} e2eConfig.BellatrixForkVersion = []byte{2, 0, 0, 253} e2eConfig.CapellaForkVersion = []byte{3, 0, 0, 253} - e2eConfig.ShardingForkVersion = []byte{4, 0, 0, 253} e2eConfig.InitializeForkSchedule() return e2eConfig @@ -83,7 +82,6 @@ func E2EMainnetTestConfig() *BeaconChainConfig { e2eConfig.AltairForkVersion = []byte{1, 0, 0, 254} e2eConfig.BellatrixForkVersion = []byte{2, 0, 0, 254} e2eConfig.CapellaForkVersion = []byte{3, 0, 0, 254} - e2eConfig.ShardingForkVersion = []byte{4, 0, 0, 254} e2eConfig.InitializeForkSchedule() return e2eConfig diff --git a/config/params/testnet_prater_config.go b/config/params/testnet_prater_config.go index ddb30d692b..0d7fcab4f2 100644 --- a/config/params/testnet_prater_config.go +++ b/config/params/testnet_prater_config.go @@ -37,7 +37,6 @@ func PraterConfig() *BeaconChainConfig { cfg.AltairForkEpoch = 36660 cfg.AltairForkVersion = []byte{0x1, 0x0, 0x10, 0x20} cfg.CapellaForkVersion = []byte{0x3, 0x0, 0x10, 0x20} - cfg.ShardingForkVersion = []byte{0x4, 0x0, 0x10, 0x20} cfg.BellatrixForkEpoch = 112260 cfg.BellatrixForkVersion = []byte{0x2, 0x0, 0x10, 0x20} cfg.TerminalTotalDifficulty = "10790000" diff --git a/network/forks/fork_test.go b/network/forks/fork_test.go index f59ebf2fac..5788e38a05 100644 --- a/network/forks/fork_test.go +++ b/network/forks/fork_test.go @@ -185,8 +185,6 @@ func TestRetrieveForkDataFromDigest(t *testing.T) { cfg.AltairForkEpoch = 10 cfg.BellatrixForkVersion = []byte{'A', 'B', 'C', 'Z'} cfg.BellatrixForkEpoch = 100 - cfg.ShardingForkVersion = []byte{'A', 'B', 'C', 'Y'} - cfg.ShardingForkEpoch = 1000 cfg.InitializeForkSchedule() params.OverrideBeaconConfig(cfg) genValRoot := [32]byte{'A', 'B', 'C', 'D'}