From 320a1e5cf364c6d9c48cbd2f8b92992cc194cc23 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Wed, 11 Dec 2024 06:59:28 -0800 Subject: [PATCH] Fix tests --- beacon-chain/rpc/eth/config/handlers_test.go | 4 ++-- config/params/loader_test.go | 6 ++++++ config/params/testnet_holesky_config_test.go | 3 +++ config/params/testnet_sepolia_config_test.go | 3 +++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/beacon-chain/rpc/eth/config/handlers_test.go b/beacon-chain/rpc/eth/config/handlers_test.go index 30bddfd24c76..098b250874eb 100644 --- a/beacon-chain/rpc/eth/config/handlers_test.go +++ b/beacon-chain/rpc/eth/config/handlers_test.go @@ -470,9 +470,9 @@ func TestGetSpec(t *testing.T) { case "MIN_EPOCHS_FOR_BLOCK_REQUESTS": assert.Equal(t, "33024", v) case "GOSSIP_MAX_SIZE": - assert.Equal(t, "10485760", v) + assert.Equal(t, "15728640", v) case "MAX_CHUNK_SIZE": - assert.Equal(t, "10485760", v) + assert.Equal(t, "15728640", v) case "ATTESTATION_SUBNET_COUNT": assert.Equal(t, "64", v) case "MAXIMUM_GOSSIP_CLOCK_DISPARITY": diff --git a/config/params/loader_test.go b/config/params/loader_test.go index eca6bde1e299..de75c5687e19 100644 --- a/config/params/loader_test.go +++ b/config/params/loader_test.go @@ -194,6 +194,9 @@ func TestLoadConfigFile(t *testing.T) { mnf, err := params.UnmarshalConfigFile(mainnetConfigFile, nil) require.NoError(t, err) fields := fieldsFromYamls(t, append(mainnetPresetsFiles, mainnetConfigFile)) + // TODO(#14714): remove hard coded sizes once spec is updated + mnf.MaxChunkSize = 15728640 + mnf.GossipMaxSize = 15728640 assertEqualConfigs(t, "mainnet", fields, mn, mnf) }) @@ -212,6 +215,9 @@ func TestLoadConfigFile(t *testing.T) { minf, err := params.UnmarshalConfigFile(minimalConfigFile, nil) require.NoError(t, err) fields := fieldsFromYamls(t, append(minimalPresetsFiles, minimalConfigFile)) + // TODO(#14714): remove hard coded sizes once spec is updated + minf.MaxChunkSize = 15728640 + minf.GossipMaxSize = 15728640 assertEqualConfigs(t, "minimal", fields, min, minf) }) diff --git a/config/params/testnet_holesky_config_test.go b/config/params/testnet_holesky_config_test.go index 0c64ff2ab6ac..d0062f41f0b0 100644 --- a/config/params/testnet_holesky_config_test.go +++ b/config/params/testnet_holesky_config_test.go @@ -24,5 +24,8 @@ func TestHoleskyConfigMatchesUpstreamYaml(t *testing.T) { pcfg, err := params.UnmarshalConfigFile(configFP, nil) require.NoError(t, err) fields := fieldsFromYamls(t, append(presetFPs, configFP)) + // TODO(#14714): remove hard coded sizes once spec is updated + pcfg.MaxChunkSize = 15728640 + pcfg.GossipMaxSize = 15728640 assertYamlFieldsMatch(t, "holesky", fields, pcfg, params.HoleskyConfig()) } diff --git a/config/params/testnet_sepolia_config_test.go b/config/params/testnet_sepolia_config_test.go index 6b87f3385cc3..15f5ef5bbf0f 100644 --- a/config/params/testnet_sepolia_config_test.go +++ b/config/params/testnet_sepolia_config_test.go @@ -24,5 +24,8 @@ func TestSepoliaConfigMatchesUpstreamYaml(t *testing.T) { pcfg, err := params.UnmarshalConfigFile(configFP, nil) require.NoError(t, err) fields := fieldsFromYamls(t, append(presetFPs, configFP)) + // TODO(#14714): remove hard coded sizes once spec is updated + pcfg.MaxChunkSize = 15728640 + pcfg.GossipMaxSize = 15728640 assertYamlFieldsMatch(t, "sepolia", fields, pcfg, params.SepoliaConfig()) }