mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Ignore blocks that skip a large distance from their parent (#1530)
## Proposed Changes To mitigate the impact of minority forks on RAM and disk usage, this change rejects blocks whose parent lies more than 320 slots (10 epochs, ~1 hour) in the past. The behaviour is configurable via `lighthouse bn --max-skip-slots N`, and can be turned off entirely using `--max-skip-slots none`. Co-authored-by: Paul Hauner <paul@paulhauner.com>
This commit is contained in:
@@ -249,4 +249,17 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.value_name("GRAFFITI")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("max-skip-slots")
|
||||
.long("max-skip-slots")
|
||||
.help(
|
||||
"Refuse to skip more than this many slots when processing a block or attestation. \
|
||||
This prevents nodes on minority forks from wasting our time and RAM, \
|
||||
but might need to be raised or set to 'none' in times of extreme network \
|
||||
outage."
|
||||
)
|
||||
.value_name("NUM_SLOTS")
|
||||
.takes_value(true)
|
||||
.default_value("320")
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user