mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 22:08:30 +00:00
Run per-slot fork choice at a further distance from the head (#3487)
## Issue Addressed NA ## Proposed Changes Run fork choice when the head is 256 slots from the wall-clock slot, rather than 4. The reason we don't *always* run FC is so that it doesn't slow us down during sync. As the comments state, setting the value to 256 means that we'd only have one interrupting fork-choice call if we were syncing at 20 slots/sec. ## Additional Info NA
This commit is contained in:
@@ -38,7 +38,11 @@ use types::{AttestationShufflingId, EthSpec, Hash256, RelativeEpoch, Slot};
|
||||
const MAX_ADVANCE_DISTANCE: u64 = 4;
|
||||
|
||||
/// Similarly for fork choice: avoid the fork choice lookahead during sync.
|
||||
const MAX_FORK_CHOICE_DISTANCE: u64 = 4;
|
||||
///
|
||||
/// The value is set to 256 since this would be just over one slot (12.8s) when syncing at
|
||||
/// 20 slots/second. Having a single fork-choice run interrupt syncing would have very little
|
||||
/// impact whilst having 8 epochs without a block is a comfortable grace period.
|
||||
const MAX_FORK_CHOICE_DISTANCE: u64 = 256;
|
||||
|
||||
#[derive(Debug)]
|
||||
enum Error {
|
||||
|
||||
Reference in New Issue
Block a user