-
Notifications
You must be signed in to change notification settings - Fork 220
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
feat: fix mempool sync start early #6767
Merged
SWvheerden
merged 4 commits into
tari-project:development
from
hansieodendaal:ho_mempool_sync_start_early
Jan 29, 2025
Merged
feat: fix mempool sync start early #6767
SWvheerden
merged 4 commits into
tari-project:development
from
hansieodendaal:ho_mempool_sync_start_early
Jan 29, 2025
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
Test Results (CI) 3 files 129 suites 37m 13s ⏱️ Results for commit 45212cc. ♻️ This comment has been updated with latest results. |
Test Results (Integration tests)36 tests 36 ✅ 22m 52s ⏱️ Results for commit 17a6d70. ♻️ This comment has been updated with latest results. |
hansieodendaal
force-pushed
the
ho_mempool_sync_start_early
branch
from
January 28, 2025 10:06
137f4ca
to
b26a8b0
Compare
Mempool sync can only start when `is_synced` is set to `true`. - An edge case was witnessed whereby mempool sync can start early if the entire network is generally slow to respond to pings. The `ChainMetadataEvent::NetworkSilence` event is transmitted if 3x consecutive ping cycles were started without corresponding pongs received, which sets `is_synced` to `true`. The moment that peer metadata is then received, block sync and mempool sync will occur at the same time. For the time being the consecutive ping cycle threshold was increased to 4x and a warning message was added to let the user know this may be the case. - Additional debug logs were added to track all events that can set the `is_synced` to `true`. - Removed 'log-mdc' form the dependencies as the relevant code is not used
hansieodendaal
force-pushed
the
ho_mempool_sync_start_early
branch
from
January 28, 2025 10:13
b26a8b0
to
e8a2911
Compare
SWvheerden
previously approved these changes
Jan 29, 2025
base_layer/core/src/base_node/state_machine_service/states/listening.rs
Outdated
Show resolved
Hide resolved
base_layer/core/src/base_node/state_machine_service/states/listening.rs
Outdated
Show resolved
Hide resolved
base_layer/core/src/base_node/state_machine_service/states/listening.rs
Outdated
Show resolved
Hide resolved
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.
Description
Mempool sync can only start when
is_synced
is set totrue
.slow to respond to pings. The
ChainMetadataEvent::NetworkSilence
event is transmitted if 3xconsecutive ping cycles were started without corresponding pongs received, which sets
is_synced
totrue
. The moment that peer metadata is then received, block sync and mempool syncwill occur at the same time.
Starting
state. At startup, the first successful metadata message received from a peer will signal the transition toListening
, otherwiseListening
will be notified of the network silence, which can act accordingly.is_synced
totrue
.log-mdc
from the dependencies as the relevant code is not used.The edge case warning message must be monitored to see if it is a real issue:
Fixes #6766
Motivation and Context
Mempool sync "started" before block sync was achieved.
How Has This Been Tested?
System-level testing
What process can a PR reviewer use to test or verify this change?
Code review
System-level testing
Breaking Changes