-
Notifications
You must be signed in to change notification settings - Fork 107
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
Only enable the mempool crawler after synchronization reaches the chain tip #2667
Merged
teor2345
merged 5 commits into
ZcashFoundation:main
from
jvff:only-enable-mempool-crawler-after-synchronization
Aug 31, 2021
Merged
Only enable the mempool crawler after synchronization reaches the chain tip #2667
teor2345
merged 5 commits into
ZcashFoundation:main
from
jvff:only-enable-mempool-crawler-after-synchronization
Aug 31, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
teor2345
reviewed
Aug 25, 2021
The helper type will make it easier to determine if the crawler is enabled or not.
jvff
force-pushed
the
only-enable-mempool-crawler-after-synchronization
branch
from
August 30, 2021 10:43
5a5641c
to
416b571
Compare
Implement waiting until the mempool becomes enabled, so that the crawler does not run while the mempool is disabled. If the `MempoolStatus` helper is unable to determine if the mempool is enabled, stop the crawler task entirely.
jvff
force-pushed
the
only-enable-mempool-crawler-after-synchronization
branch
from
August 30, 2021 10:49
416b571
to
8a1c810
Compare
Change the mempool crawler test so that it's a proptest that tests different chain sync. lengths. This leads to different scenarios with the crawler pausing and resuming.
I updated the original mempool crawler test to now be a proptest so that it can consider scenarios where the crawler pauses and resumes. |
teor2345
approved these changes
Aug 30, 2021
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.
This seems fine for now, let's merge!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The mempool crawler should only run after the chain is synchronized.
Solution
Update the
mempool::Crawler
to use theSyncStatus
helper type so that the crawler only runs if the synchronizer is likely at the chain tip (i.e., it has finished catching up to the current network status).Review
@teor2345 has been following the development of the crawler.
Reviewer Checklist
Follow Up Work