Skip to content

Commit 8017c7a

Browse files
macladsonWoodpile37
authored andcommitted
Remove legacy max-skip-slots checks (sigp#4403)
Remove `max-skip-slots` checks when processing blocks. This was legacy code which was previously used in the Medalla testnet to sync to the correct fork. With the addition of checkpoint sync which allows us to sync to any arbitrary fork, this is no longer a necessary feature, so it has been removed for simplicity. The CLI flag and checks for attestation processing have been retained as it still may have uses in DoS protection.
1 parent 67377f8 commit 8017c7a

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

beacon_node/beacon_chain/src/chain_config.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ pub const FORK_CHOICE_LOOKAHEAD_FACTOR: u32 = 24;
1717

1818
#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
1919
pub struct ChainConfig {
20-
/// Maximum number of slots to skip when importing a consensus message (e.g., block,
21-
/// attestation, etc).
20+
/// Maximum number of slots to skip when importing an attestation.
2221
///
2322
/// If `None`, there is no limit.
2423
pub import_max_skip_slots: Option<u64>,

beacon_node/network/src/beacon_processor/worker/gossip_methods.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,6 @@ impl<T: BeaconChainTypes> Worker<T> {
830830
| Err(e @ BlockError::NonLinearParentRoots)
831831
| Err(e @ BlockError::BlockIsNotLaterThanParent { .. })
832832
| Err(e @ BlockError::InvalidSignature)
833-
| Err(e @ BlockError::TooManySkippedSlots { .. })
834833
| Err(e @ BlockError::WeakSubjectivityConflict)
835834
| Err(e @ BlockError::InconsistentFork(_))
836835
| Err(e @ BlockError::ExecutionPayloadError(_))

beacon_node/src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
727727
Arg::with_name("max-skip-slots")
728728
.long("max-skip-slots")
729729
.help(
730-
"Refuse to skip more than this many slots when processing a block or attestation. \
730+
"Refuse to skip more than this many slots when processing an attestation. \
731731
This prevents nodes on minority forks from wasting our time and disk space, \
732732
but could also cause unnecessary consensus failures, so is disabled by default."
733733
)

0 commit comments

Comments
 (0)