-
Notifications
You must be signed in to change notification settings - Fork 236
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: synchronizer and relayer share BlocksInflight #919
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
@quake is assigned as the chief reviewer |
keroro520
commented
May 30, 2019
quake
requested changes
May 30, 2019
147b965
to
83ad041
Compare
quake
reviewed
May 30, 2019
quake
approved these changes
May 30, 2019
driftluo
approved these changes
May 31, 2019
@nervos-bot-user try integration |
1801159
to
f016329
Compare
Currently, we discard the new arriving compact blocks if we had already received a same one, via `RelayState::compact_block_filter`. The purpose is avoiding re-processing/re-requesting the same compact blocks. But the problem is, if we failed to reconstruct a compact block, we cannot process this compact block any more, before receiving the corresponding transactions from peer1. That's terrible if peer1's inventory was lost on the way. Here I remove `RelayState::compact_block_filter`, and insteadly use `Peers::blocks_inflight` to avoid re-requesting to same peers.
f016329
to
f196dc1
Compare
This was referenced Jun 3, 2019
Closed
Merged
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.
test: Add test for losing BlockTXN messages
fix: Remove relayer's compact_block_filter, filter duplicated compact blocks via BlocksInFlight
Currently, we discard the new arriving compact blocks if we had already received the same one, via
RelayState::compact_block_filter
. The purpose is avoiding re-processing/re-requesting the same compact blocks. But the problem is, if we failed to reconstruct a compact block, we cannot process this compact block anymore, before receiving the corresponding transactions from peer1. That's terrible if peer1's inventory was lost on the way.Here I remove
RelayState::compact_block_filter
, and insteadly usePeers::blocks_inflight
to avoid re-requesting to same peers.fix: Cache pending compact block at peer-level, but not global-level