Reduce frequency of polling unknown validators to avoid overwhelming the Beacon Node (#5628)

* Reduce frequency of polling unknown validators.

* Move slot calculation into for loop.

* Simplify logic.

Co-authored-by: Michael Sproul <micsproul@gmail.com>

* Fix formatting
This commit is contained in:
Jimmy Chen
2024-05-22 10:52:40 +10:00
committed by GitHub
parent 2a87016d94
commit 52e31121df
2 changed files with 34 additions and 0 deletions

View File

@@ -476,6 +476,7 @@ impl<E: EthSpec> ProductionValidatorClient<E> {
slot_clock: slot_clock.clone(),
beacon_nodes: beacon_nodes.clone(),
validator_store: validator_store.clone(),
unknown_validator_next_poll_slots: <_>::default(),
spec: context.eth2_config.spec.clone(),
context: duties_context,
enable_high_validator_count_metrics: config.enable_high_validator_count_metrics,