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

Enable and disable gossip based on optimistic sync state. #4914

Merged
merged 7 commits into from
Jan 31, 2022

Conversation

ajsutton
Copy link
Contributor

PR Description

Moves away from the network periodically polling recentChainData to decide when to enable gossip to explicitly notifying it of sync state changes.
This allows gossip to be reduced to just blocks when optimistic sync is enabled and also allows unsubscribing from gossip when the node falls too far behind (such as when a laptop wakes from sleep).

Fixed Issue(s)

#4784

Documentation

  • I thought about documentation and added the documentation label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Moves away from the network periodically polling recentChainData to decide when to enable gossip to explicitly notifying it of sync state changes.
This allows gossip to be reduced to just blocks when optimistic sync is enabled and also allows unsubscribing from gossip when the node falls too far behind (such as when a laptop wakes from sleep).
@ajsutton ajsutton marked this pull request as ready for review January 31, 2022 03:39
Copy link
Contributor

@rolfyone rolfyone left a comment

Choose a reason for hiding this comment

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

LGTM

@ajsutton ajsutton enabled auto-merge (squash) January 31, 2022 22:41
@ajsutton ajsutton merged commit 77521fb into Consensys:master Jan 31, 2022
@ajsutton ajsutton deleted the optimistic-gossip branch January 31, 2022 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants