check correct fork version in LC sync protocol (#4703)

Tests updated: https://github.com/ethereum/consensus-specs/pull/3284
This commit is contained in:
Etan Kissling 2023-03-08 19:59:21 +01:00 committed by GitHub
parent e499c709f4
commit 879f8ab5e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,7 +145,8 @@ proc validate_light_client_update*(
if bit:
participant_pubkeys.add(sync_committee.pubkeys.data[idx])
let
fork_version = cfg.forkVersionAtEpoch(update.signature_slot.epoch)
fork_version_slot = max(update.signature_slot, 1.Slot) - 1
fork_version = cfg.forkVersionAtEpoch(fork_version_slot.epoch)
domain = compute_domain(
DOMAIN_SYNC_COMMITTEE, fork_version, genesis_validators_root)
signing_root = compute_signing_root(update.attested_header.beacon, domain)