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

Return syncing on HTTP when sync is stalled #6129

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

michaelsproul
Copy link
Member

Issue Addressed

Closes #6121:

Proposed Changes

The syncing field of /eth/v1/node/syncing would be false when sync is stalled (e.g. due to 0 peers). I think the intention of the API is to show syncing: false only when the node is fully synced, so it is better if we return syncing: true for a stall.

In terms of liveness (e.g. a network where all BNs are stalled), the validator client will try requests even if its BN indicates that it is stalled. It might just try those BNs less preferentially.

Additional Info

Related liveness risk:

@michaelsproul
Copy link
Member Author

I will add a test if we agree this approach is OK.

@pawanjay176
Copy link
Member

Agree this approach makes more sense. In favor 👍

@michaelsproul michaelsproul changed the title Return syncing even when sync is stalled Return syncing on HTTP when sync is stalled Jul 19, 2024
@michaelsproul michaelsproul added ready-for-review The code is ready for review v5.3.0 Q3 2024 release with database changes! and removed RFC Request for comment labels Jul 19, 2024
@michaelsproul
Copy link
Member Author

Added a test. Ready for review

Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Also agree it's clearer.

@jimmygchen jimmygchen added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Jul 19, 2024
@michaelsproul
Copy link
Member Author

@mergify queue

Copy link

mergify bot commented Jul 19, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 54e36f6

mergify bot added a commit that referenced this pull request Jul 19, 2024
mergify bot added a commit that referenced this pull request Jul 19, 2024
@mergify mergify bot merged commit 54e36f6 into sigp:unstable Jul 19, 2024
28 checks passed
@michaelsproul michaelsproul deleted the sync-stalled-is-syncing branch July 19, 2024 08:11
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HTTP-API Networking ready-for-merge This PR is ready to merge. v5.3.0 Q3 2024 release with database changes!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants