-
Notifications
You must be signed in to change notification settings - Fork 480
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
When downloading blobs with the BackgroundDownloaderComponent
check that the candidate prefix has an overlapping first byte with us
#3571
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
shyba
added
area: blobs/files
type: improvement
Existing (or partially existing) functionality needs to be changed
labels
Feb 11, 2022
jackrobison
reviewed
Feb 16, 2022
lbry/extras/daemon/components.py
Outdated
@@ -413,7 +413,8 @@ async def download_blobs_in_background(self): | |||
self.space_available = await self.space_manager.get_free_space_mb(True) | |||
if not self.is_busy and self.space_available > 10: | |||
blob_hash = next((key.hex() for key in self.dht_node.stored_blob_hashes if | |||
key.hex() not in self.blob_manager.completed_blob_hashes), None) | |||
key[0] == self.dht_node.protocol.node_id[0] |
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 there should be a constant to determine how many bits are matching
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.
extracted to MIN_PREFIX_COLLIDING_BITS
shyba
force-pushed
the
only_download_close_values
branch
from
February 19, 2022 06:09
23a78b2
to
a6b7817
Compare
shyba
force-pushed
the
only_download_close_values
branch
from
February 21, 2022 01:25
a6b7817
to
5004127
Compare
shyba
force-pushed
the
only_download_close_values
branch
from
February 21, 2022 01:35
5004127
to
d1bc981
Compare
shyba
force-pushed
the
only_download_close_values
branch
from
February 22, 2022 17:26
a9e5a36
to
2a1e1d5
Compare
shyba
force-pushed
the
only_download_close_values
branch
from
February 23, 2022 01:38
9c095e7
to
f68ea01
Compare
jackrobison
changed the title
Seed mode: check that the candidate blob is at least 1 prefix byte close to peer id
When downloading blobs with the Mar 4, 2022
BackgroundDownloaderComponent
check that the candidate prefix has an overlapping first byte with us
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: blobs/files
type: improvement
Existing (or partially existing) functionality needs to be changed
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.
No description provided.