-
Notifications
You must be signed in to change notification settings - Fork 10
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
[1.0.2] P2P: Allow irreversible mode syncing to continue when LIB is paused #777
Merged
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
Closed
linh2931
reviewed
Sep 13, 2024
…ersible mode the chain_head will still be moving and not cause net_plugin to stop syncing. Only consider if LIB not moving when the span is greater than sync_fetch_span. Otherwise normal operation will cause net_plugin to sync ahead when fork db is just up to date.
…sync when the peer reported even slightly less than sync_known_lib_num which is a very normal condition. For example sync_known_lib_num: 373330666, while peer_fhead: 373330647 when trying to sync block 129728.
linh2931
reviewed
Sep 13, 2024
linh2931
approved these changes
Sep 14, 2024
linh2931
approved these changes
Sep 17, 2024
greg7mdp
reviewed
Sep 17, 2024
Note:start |
greg7mdp
requested changes
Sep 18, 2024
greg7mdp
approved these changes
Sep 18, 2024
greg7mdp
reviewed
Sep 18, 2024
plugins/net_plugin/net_plugin.cpp
Outdated
Comment on lines
2185
to
2188
if (blk_num < head_num) { // avoid underflow on blk_num - head_num | ||
return true; | ||
} | ||
block_num_type num_blocks_not_applied = blk_num - head_num; |
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.
Suggested change
if (blk_num < head_num) { // avoid underflow on blk_num - head_num | |
return true; | |
} | |
block_num_type num_blocks_not_applied = blk_num - head_num; | |
block_num_type num_blocks_not_applied = blk_num > head_num ? blk_num - head_num : 0; |
greg7mdp
approved these changes
Sep 18, 2024
linh2931
approved these changes
Sep 19, 2024
This was referenced Sep 19, 2024
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.
irreversible
mode as thechain_head
does not advance until LIB advances.sync-fetch-span
of head because LIB is paused.Tested syncing Kylin past the large LIB pause.
Resolves #773