-
Notifications
You must be signed in to change notification settings - Fork 231
ar_data_sync skip local peer verification
#650
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
Open
shizzard
wants to merge
16
commits into
release/performance-2.8
Choose a base branch
from
ar_data_sync-sjup-local-peer-verification
base: release/performance-2.8
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3fe8b47
Skip unpacking if the chunk was downloaded from the local peer
shizzard 9b8a178
Check for packing correctness when skipping the chunk verification
shizzard 9d4f815
Reimplement verification skip by reusing the `process_valid_fetched_c…
shizzard 2550673
Only serve packed chunks for local peers
shizzard b4781c4
Fix packing served chunks filtering with matching the peer address only
shizzard 2b7ad31
Change the way autotests (CI) are run
shizzard 2a1e4e0
Fixup data sync tests
shizzard 3c05276
Fix packing-on-demand server-side handling
shizzard db96e93
Fix the data sync test
shizzard 46f63d0
Tests fixes
shizzard bca0739
fix: get ar_tx_blacklist_tests to pass
JamesPiechota 5de91fd
Change the behavior of `pack_served_chunks` option and `local_peers` …
shizzard 1bc997f
Revert local_peers setting for the `ar_test_node`
shizzard 5f5d75c
Fix reviewers comments
shizzard d2d363c
Address reviewers comments
shizzard a39fde2
Merge branch 'release/performance-2.8' into ar_data_sync-sjup-local-p…
shizzard 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
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
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.
Should this be
andalso? I forget where we landedLike I could see it working like this:
pack_served_chunks, in which case it only repacks chunks for members of itslocal_peersrequest_packed_chunksandsync_from_local_peers_onlyin which case it requests packed chunks from itslocal_peersand does not validate it them before storing.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.
We decided that we pack served chunks for local peers even when the option is not set.
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 we should always require the option to be set. Unless you and Lev discussed otherwise?
i.e. there are a lot of scenarios where local_peers are set for other reasons (e.g. reduce rate limiting between CM cluster peers) and in those cases we probably don't want to also pack served chunks unless it's desired (e.g. we wouldn't want a CM Exit Node to get bogged down repacking accidentally)
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.
We discussed this few times:
Uh oh!
There was an error while loading. Please reload this page.
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 honestly don't remember wha we discussed. But I think we should require
enable pack_served_chunksto be set. My understanding is that we uselocal_peersas a filter on top of that so that nodes don't end up packing for peers they don't want to. But we still needenable pack_served_chunksThe client can trust all data it receives from one of its
local_peersthough. That makes sense.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.
Just chatted on slack. Current approach as implemented works! clients will only request packed chunks if they have
fetch_packed_chunksset, but if they do request a packed chunk, the local_peer will repack.