Skip to content

Commit

Permalink
fix(LC nim): Check correct fork version in update validation
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilIvanichkovv committed Mar 9, 2023
1 parent 245e20b commit ac1ea1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion beacon-light-client/nim/light_client.nim
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ proc validate_light_client_update*(
participant_pubkeys[i] = sync_committee.pubkeys[idx]
inc i
let
fork_version = forkVersionAtEpoch(update.signature_slot.epoch)
fork_version_slot = max(update.signature_slot, 1.Slot) - 1
fork_version = forkVersionAtEpoch(fork_version_slot.epoch)
domain = compute_domain(
DOMAIN_SYNC_COMMITTEE, fork_version, genesis_validators_root)
signing_root = compute_signing_root(update.attested_header, domain)
Expand Down

0 comments on commit ac1ea1f

Please sign in to comment.