-
Notifications
You must be signed in to change notification settings - Fork 11
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
P2P: Block propagation optimization #1099
Merged
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
b54eea7
GH-1091 Initial implementation of block_nack with block_nack_message …
heifner 167ecb4
GH-1091 Call send_block_nack on correct strand
heifner 5094f92
GH-1091 Handle repeated block_notice with request for blocks
heifner 2afb174
GH-1091 Use correct req_blocks.mode
heifner 1d18678
GH-1091 Use normal req_blocks.mode since need to start with provided …
heifner dd0417b
GH-1091 Add back sync_write_queue for sync blocks
heifner f5be27b
GH-1091 Check if peer has block before sending either block or block_…
heifner 85bbf2b
GH-1091 Fix compile error
heifner 84db166
GH-1091 Handle on_fork with normal request_message correctly
heifner 843e3d3
GH-1091 Test threshold of 0
heifner cf44653
GH-1091 Wait for 7 empty blocks before starting perf run. The bios no…
heifner 7ff8ebf
GH-1091 Always send block_nack when a block is received the node alre…
heifner 65431db
GH-1091 Call blk_send_branch directly with requested blocks instead o…
heifner 5c0e192
GH-1091 Better output on failure
heifner 121fadc
GH-1091 Always broadcast blocks we produce
heifner 35d3118
GH-1091 Only send block_notice if in sync.
heifner efd95f6
GH-1091 Optimize blk_send_branch for when branch send already in prog…
heifner ddcf5df
GH-1091 Optimize blk_send_branch for when branch send already in prog…
heifner 3627f4c
GH-1091 Do not request blocks if already requested on a different con…
heifner 6fcd36a
GH-1091 Remove is_in_sync check for block notice send. This degrades …
heifner e0cc48b
GH-1091 Add p2p-disable-block-nack option
heifner f4f32eb
Merge branch 'main' into GH-1091-block-nack
heifner d2ffa9f
GH-1091 Use contains instead of count
heifner f414b80
GH-1091 Remove unneeded code
heifner 4e5acfa
GH-1091 Use an enum instead of a bool for to_sync_queue
heifner 2cb2f47
GH-1091 Updated comment
heifner 9db544e
GH-1091 Simplified if by using the calculated _write_queue_size
heifner 9361c85
GH-1091 Fix log of received block nack to be clearer
heifner 1a07ac2
GH-1091 Update log messages
heifner 06dad7d
Merge branch 'main' into GH-1091-block-nack
heifner a1bebf2
GH-1091 Use debug level log instead of info
heifner 2c1cd11
GH-1101 Add previous to block_notice_message which allows for immedia…
heifner 6fbf7b2
Merge branch 'main' into GH-1091-block-nack
heifner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
GH-1101 Add previous to block_notice_message which allows for immedia…
…te determination if a block request is needed. Also include in the block request_message the peer head. The peer head allows the node to determine if on a fork and send from LIB instead. Also create block_on_fork function to remove duplicate code.
- Loading branch information
commit 2c1cd11781cfc72f597419db55e013ad4160b80a
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
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.
I think this could be as low as
0
.0
worked fine in all my tests and I don't think a large value is useful here.Also this PR, only doesn't block nack one connection. If we wanted to keep 2 or more peers sending us blocks the PR could be updated with that functionality. I don't personally think it is needed. And I think best to keep this as simple as possible. If we find this feature doesn't work it can be disabled via
p2p-disable-block-nack
and we can address any issues we find.