Fix lint and presets

This commit is contained in:
Hsiao-Wei Wang 2021-12-14 21:38:58 +08:00
parent 916193bd69
commit 2f618f7b48
No known key found for this signature in database
GPG Key ID: 1111A8A81778319E
3 changed files with 4 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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)