always wait for 2/3 into slot for aggregate attestations (#2158)

This commit is contained in:
tersec 2020-12-07 20:32:34 +01:00 committed by GitHub
parent 81c25ca4cd
commit 72d00e33b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -23,6 +23,7 @@ import
conf, time, validator_pool,
attestation_pool, exit_pool, block_pools/[spec_cache, chain_dag, clearance],
eth2_network, keystore_management, beacon_node_common, beacon_node_types,
nimbus_binary_common,
eth1_monitor, version, ssz/merkleization,
attestation_aggregation, sync_manager, sszdump,
validator_slashing_protection
@ -679,8 +680,8 @@ proc handleValidatorDuties*(node: BeaconNode, lastSlot, slot: Slot) {.async.} =
# through the slot-that is, SECONDS_PER_SLOT * 2 / 3 seconds after the start
# of slot.
if slot > 2:
sleepToSlotOffsetWithHeadUpdate(
seconds(int64(SECONDS_PER_SLOT * 2) div 3),
discard await node.beaconClock.sleepToSlotOffset(
seconds(int64(SECONDS_PER_SLOT * 2) div 3), slot,
"Waiting to aggregate attestations")
let aggregationHead = get_ancestor(head, slot)