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 generic error handling and retry for temporary network failures #354

Closed
corverroos opened this issue Apr 5, 2022 · 0 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@corverroos
Copy link
Contributor

Problem to be solved

Infura's beacon API is flaky, it returns a lot of temporary errors like timeouts and "Cannot create attestation for future slot".

Charon doesn't handle these temporary at all, which results in duties not being performed.

Proposed solution

  • Add a "async function executor" that supports retries.
  • Implement it in a new package app/retry
  • Create new async root context, but continue from parent span.
  • Retry until a duty has elapsed.
  • Wire the retryer as wrapper to networking components.

Out of Scope

We should wrap each "broadcast to peer" in parsigex and leadercast in a similar retryer.DoAsync.

@corverroos corverroos added the enhancement New feature or request label Apr 5, 2022
@corverroos corverroos self-assigned this Apr 5, 2022
corverroos added a commit that referenced this issue Apr 5, 2022
Package retry provides a generic async slot function executor with retries for robustness against network failures.
Functions are linked to a slot, executed asynchronously and network or context errors retried with backoff
until duties related to a slot have elapsed (5 slots later).

category: feature
ticket: #354
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

No branches or pull requests

1 participant