clean up config loading in light client tests (#6574)

The consensus-spec-tests routinely add random experimental features
to their config.yaml which can be ignored.
This commit is contained in:
Etan Kissling 2024-09-21 14:54:27 +02:00 committed by GitHub
parent ff9d32d30d
commit ec831f1c99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 8 deletions

View File

@ -130,10 +130,8 @@ proc loadSteps(
proc runTest(suiteName, path: string, consensusFork: static ConsensusFork) = proc runTest(suiteName, path: string, consensusFork: static ConsensusFork) =
let relativePathComponent = path.relativeTestPathComponent() let relativePathComponent = path.relativeTestPathComponent()
test "Light client - Data collection - " & relativePathComponent: test "Light client - Data collection - " & relativePathComponent:
let (cfg, unknowns) = readRuntimeConfig(path/"config.yaml")
doAssert unknowns.len == 0
let let
(cfg, _) = readRuntimeConfig(path/"config.yaml")
initial_state = loadForkedState( initial_state = loadForkedState(
path/"initial_state.ssz_snappy", consensusFork) path/"initial_state.ssz_snappy", consensusFork)
db = BeaconChainDB.new("", cfg = cfg, inMemory = true) db = BeaconChainDB.new("", cfg = cfg, inMemory = true)

View File

@ -134,11 +134,6 @@ proc runTest(suiteName, path: string) =
Exception, IOError, PresetFileError, PresetIncompatibleError].} = Exception, IOError, PresetFileError, PresetIncompatibleError].} =
let (cfg, _) = readRuntimeConfig(path/"config.yaml") let (cfg, _) = readRuntimeConfig(path/"config.yaml")
when false:
# TODO evaluate whether this is useful and if so, fix it
# Unhandled defect: nimbus-eth2/tests/consensus_spec/test_fixture_light_client_sync.nim(131, 16) `unknowns.len == 0` Unknown config constants: @["MAXIMUM_GOSSIP_CLOCK_DISPARITY", "ATTESTATION_PROPAGATION_SLOT_RANGE", "MAX_REQUEST_BLOCKS", "SUBNETS_PER_NODE", "TTFB_TIMEOUT", "MIN_EPOCHS_FOR_BLOCK_REQUESTS", "MESSAGE_DOMAIN_VALID_SNAPPY", "ATTESTATION_SUBNET_EXTRA_BITS", "MAX_CHUNK_SIZE", "EPOCHS_PER_SUBNET_SUBSCRIPTION", "GOSSIP_MAX_SIZE", "ATTESTATION_SUBNET_PREFIX_BITS", "MESSAGE_DOMAIN_INVALID_SNAPPY", "RESP_TIMEOUT"] [AssertionDefect]
doAssert unknowns.len == 0, "Unknown config constants: " & $unknowns
type TestMetaYaml {.sparse.} = object type TestMetaYaml {.sparse.} = object
genesis_validators_root: string genesis_validators_root: string
trusted_block_root: string trusted_block_root: string