Skip to content

Commit

Permalink
Update sync-protocol.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vbuterin authored Nov 26, 2021
1 parent 25f2efa commit 013e814
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions specs/altair/sync-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,8 @@ def validate_light_client_update(snapshot: LightClientSnapshot,

# Verify update header root is the finalized root of the finality header, if specified
if update.finality_header == BeaconBlockHeader():
signed_header = update.header
assert update.finality_branch == [Bytes32() for _ in range(floorlog2(FINALIZED_ROOT_INDEX))]
else:
signed_header = update.finality_header
assert is_valid_merkle_branch(
leaf=hash_tree_root(update.header),
branch=update.finality_branch,
Expand Down Expand Up @@ -188,7 +186,7 @@ def validate_light_client_update(snapshot: LightClientSnapshot,
# Verify sync committee aggregate signature
participant_pubkeys = [pubkey for (bit, pubkey) in zip(update.sync_committee_bits, sync_committee.pubkeys) if bit]
domain = compute_domain(DOMAIN_SYNC_COMMITTEE, update.fork_version, genesis_validators_root)
signing_root = compute_signing_root(signed_header, domain)
signing_root = compute_signing_root(get_signed_header(update), domain)
assert bls.FastAggregateVerify(participant_pubkeys, signing_root, update.sync_committee_signature)
```

Expand Down

0 comments on commit 013e814

Please sign in to comment.