Commit 438fb65
authored
Avoid serving validator endpoints while the node is far behind syncing head (sigp#7962)
A performance issue was discovered when devnet-3 was under non-finality - some of the lighthouse nodes are "stuck" with syncing because of handling proposer duties HTTP requests.
These validator requests are higher priority than Status processing, and if they are taking a long time to process, the node won't be able to progress. What's worse is - under long period of non finality, the proposer duties calculation function tries to do state advance for a large number of [slots](https://github.com/sigp/lighthouse/blob/d545ddcbc7d97b24b5c15012d1a5f9a1dae90b2a/beacon_node/beacon_chain/src/beacon_proposer_cache.rs#L183) here, causing the node to spend all its CPU time on a task that doesn't really help, e.g. the computed duties aren't useful if the node is 20000 slots behind.
To solve this issue, we use the `not_while_syncing` filter to prevent serving these requests, until the node is synced. This should allow the node to focus on sync under non-finality situations.1 parent a134d43 commit 438fb65
1 file changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
460 | | - | |
| 460 | + | |
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
482 | | - | |
483 | | - | |
484 | | - | |
| 482 | + | |
485 | 483 | | |
486 | 484 | | |
487 | 485 | | |
| |||
0 commit comments