Publish subscriptions to all beacon nodes (#3529)

## Issue Addressed

Resolves #3516 

## Proposed Changes

Adds a beacon fallback function for running a beacon node http query on all available fallbacks instead of returning on a first successful result. Uses the new `run_on_all` method for attestation and sync committee subscriptions. 

## Additional Info

Please provide any additional information. For example, future considerations
or information useful for reviewers.
This commit is contained in:
Pawan Dhananjay
2022-09-28 19:53:35 +00:00
parent abcebf276f
commit 6779912fe4
9 changed files with 198 additions and 16 deletions

View File

@@ -570,12 +570,12 @@ async fn poll_beacon_attesters<T: SlotClock + 'static, E: EthSpec>(
});
}
// If there are any subscriptions, push them out to the beacon node.
// If there are any subscriptions, push them out to beacon nodes
if !subscriptions.is_empty() {
let subscriptions_ref = &subscriptions;
if let Err(e) = duties_service
.beacon_nodes
.first_success(
.run(
duties_service.require_synced,
OfflineOnFailure::Yes,
|beacon_node| async move {