Skip to content

Commit ec831f1

Browse files
authored
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.
1 parent ff9d32d commit ec831f1

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

tests/consensus_spec/test_fixture_light_client_data_collection.nim

+1-3
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,8 @@ proc loadSteps(
130130
proc runTest(suiteName, path: string, consensusFork: static ConsensusFork) =
131131
let relativePathComponent = path.relativeTestPathComponent()
132132
test "Light client - Data collection - " & relativePathComponent:
133-
let (cfg, unknowns) = readRuntimeConfig(path/"config.yaml")
134-
doAssert unknowns.len == 0
135-
136133
let
134+
(cfg, _) = readRuntimeConfig(path/"config.yaml")
137135
initial_state = loadForkedState(
138136
path/"initial_state.ssz_snappy", consensusFork)
139137
db = BeaconChainDB.new("", cfg = cfg, inMemory = true)

tests/consensus_spec/test_fixture_light_client_sync.nim

-5
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,6 @@ proc runTest(suiteName, path: string) =
134134
Exception, IOError, PresetFileError, PresetIncompatibleError].} =
135135
let (cfg, _) = readRuntimeConfig(path/"config.yaml")
136136

137-
when false:
138-
# TODO evaluate whether this is useful and if so, fix it
139-
# 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]
140-
doAssert unknowns.len == 0, "Unknown config constants: " & $unknowns
141-
142137
type TestMetaYaml {.sparse.} = object
143138
genesis_validators_root: string
144139
trusted_block_root: string

0 commit comments

Comments
 (0)