Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logic for using backup beacon nodes #56

Merged
merged 10 commits into from
Sep 25, 2023
Merged

Conversation

TobiWo
Copy link
Owner

@TobiWo TobiWo commented Sep 14, 2023

Summary

This PR adds functionality to use backup beacon nodes if provided. The underlying logic checks for the beacon node healthiness and uses the first healthy beacon node of the provided list.

In Detail this PR adds/changes:

  • change flag --beacon-node to --beacon-nodes
    • this flag accepts a comma separated list of beacon node connection strings or a single connection string (see default)
  • Adds logic to use a beacon node connection in round robin manner based on a connection failure
    • e.g. if the provided list looks like this node1,node2,node3:
      • node1 will be used as long as there is no connection error to this particular node
      • if there is an error node2 will be used until there is a connection error to this particular node
      • etc.

Note

Documentation will be updated in a separate PR since the next release will include multiple PRs

Closed issues

closes #27

@TobiWo TobiWo added the enhancement New feature or request label Sep 14, 2023
@TobiWo TobiWo self-assigned this Sep 14, 2023
@TobiWo TobiWo force-pushed the feature/add-backup-beacon-node branch from 28aabed to 1dca486 Compare September 14, 2023 14:29
@TobiWo TobiWo mentioned this pull request Sep 15, 2023
@TobiWo TobiWo marked this pull request as ready for review September 15, 2023 11:35
duties/cli/arguments.py Show resolved Hide resolved
@TobiWo TobiWo force-pushed the feature/add-backup-beacon-node branch 2 times, most recently from 47d930d to 8da1fdf Compare September 21, 2023 07:58
* Add beacon api healt endpoint
* Add program constants for logging connection issues
* Update logging messages
* Add logging messages for beacon node connection issues
* Add new method for rest calls
* Add beacon node connection logic
* Add no beacon node connection dto
* Add max wait time for fetching duties
* Add 503 response if wait time is exceeded
@TobiWo TobiWo force-pushed the feature/add-backup-beacon-node branch from 8da1fdf to 2c20351 Compare September 21, 2023 08:33
@LuisNaldo7 LuisNaldo7 self-requested a review September 24, 2023 15:22
@TobiWo TobiWo merged commit f339fa3 into main Sep 25, 2023
@TobiWo TobiWo deleted the feature/add-backup-beacon-node branch September 25, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add possibility to add multiple beacon nodes as backup
2 participants