Skip to content

Commit

Permalink
ncli_db: use fork from runtimeconfig when verifying era file (#4689)
Browse files Browse the repository at this point in the history
Sepolia in particular goes through two hard forks during era 1, meaning
the phase0 fork is no longer part of the state, even though blocks that
belong to it still are phase0.
  • Loading branch information
arnetheduck authored Mar 3, 2023
1 parent ea060de commit 65aee9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beacon_chain/era_db.nim
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ proc verify*(f: EraFile, cfg: RuntimeConfig): Result[Eth2Digest, string] =

# Batch-verification more than doubles total verification speed
sigs.add block_signature_set(
getStateField(state[], fork),
cfg.forkAtEpoch(slot.epoch),
getStateField(state[], genesis_validators_root), slot,
blck[].root, cooked.get(), sig.get())

Expand Down

0 comments on commit 65aee9c

Please sign in to comment.