From 2f618f7b483310303525dfe592d176f3fc91f087 Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Tue, 14 Dec 2021 21:38:58 +0800 Subject: [PATCH] Fix lint and presets --- presets/mainnet/altair.yaml | 2 -- presets/minimal/altair.yaml | 2 -- specs/altair/sync-protocol.md | 5 ++++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/presets/mainnet/altair.yaml b/presets/mainnet/altair.yaml index 21e3cc328..813ef7212 100644 --- a/presets/mainnet/altair.yaml +++ b/presets/mainnet/altair.yaml @@ -24,5 +24,3 @@ EPOCHS_PER_SYNC_COMMITTEE_PERIOD: 256 MIN_SYNC_COMMITTEE_PARTICIPANTS: 1 # SLOTS_PER_EPOCH * EPOCHS_PER_SYNC_COMMITTEE_PERIOD (= 32 * 256) UPDATE_TIMEOUT: 8192 -# SLOTS_PER_EPOCH * EPOCHS_PER_SYNC_COMMITTEE_PERIOD // 2 (= 32 * 256 // 2) -SAFETY_THRESHOLD_PERIOD: 4096 diff --git a/presets/minimal/altair.yaml b/presets/minimal/altair.yaml index 7cdbd58ea..5e472c49c 100644 --- a/presets/minimal/altair.yaml +++ b/presets/minimal/altair.yaml @@ -24,5 +24,3 @@ EPOCHS_PER_SYNC_COMMITTEE_PERIOD: 8 MIN_SYNC_COMMITTEE_PARTICIPANTS: 1 # SLOTS_PER_EPOCH * EPOCHS_PER_SYNC_COMMITTEE_PERIOD (= 8 * 8) UPDATE_TIMEOUT: 64 -# SLOTS_PER_EPOCH * EPOCHS_PER_SYNC_COMMITTEE_PERIOD // 2 (= 8 * 8 // 2) -SAFETY_THRESHOLD_PERIOD: 32 diff --git a/specs/altair/sync-protocol.md b/specs/altair/sync-protocol.md index a36bf782b..6dae145b9 100644 --- a/specs/altair/sync-protocol.md +++ b/specs/altair/sync-protocol.md @@ -195,7 +195,10 @@ def validate_light_client_update(store: LightClientStore, assert sum(sync_aggregate.sync_committee_bits) >= MIN_SYNC_COMMITTEE_PARTICIPANTS # Verify sync committee aggregate signature - participant_pubkeys = [pubkey for (bit, pubkey) in zip(sync_aggregate.sync_committee_bits, sync_committee.pubkeys) if bit] + participant_pubkeys = [ + pubkey for (bit, pubkey) in zip(sync_aggregate.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(update.attested_header, domain) assert bls.FastAggregateVerify(participant_pubkeys, signing_root, sync_aggregate.sync_committee_signature)