-
Notifications
You must be signed in to change notification settings - Fork 12
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
Sync error handling #133
Sync error handling #133
Conversation
I retested it locally. Could not get it to crash now. Nice! But I noticed that right now, this error condition does not properly apply any backoff: Lines 413 to 414 in b5ffff4
This got me thinking once more about the approach. How do you feel about, instead of having to apply |
@dknopik Threw together a quick POC. I think I that approach works very nice. Take a look when you have a sec and if thats along the lines of what you were thinking ill clean it up and make sure it works. |
yea, seems good! This is what I meant. :) |
Something seems a bit funky still, when disconnecting during live sync, backoff works great, but when reconnecting, we enter a weird state where we loop like this without backoff:
|
@dknopik should be fixed now, was matching against wrong error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. if you consider it ready, feel free to merge
Issue Addressed
#119
Proposed Changes
This PR introduces a way to handle rpc errors and signal if sync is stalled.
If a websocket goes down or an rpc endpoint is having issues,
OPERATIONAL_STATUS
is set to false. The rest of the application can be conditioned on this value to determine if the execution layer is having sync issues.If there is an rpc error, there is nothing we can do until the endpoint is operational again. The simplest way to test this is just to continuously poll for a block number with exponential backoffs. There is no longer a set number of retries. It just keeps retrying until it is valid again.