forked from libp2p/go-libp2p-kad-dht
-
Notifications
You must be signed in to change notification settings - Fork 3
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
prefix lookup implementation #2
Open
noot
wants to merge
41
commits into
noot/double-hash
Choose a base branch
from
noot/prefix-lookup
base: noot/double-hash
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 21 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
cc4e42b
wip on prefix lookup
noot a8900f4
merge
noot 648fd4e
wip
noot f528622
merge, fix kbucket dependency, start impl
noot 1fc0b02
modify providers manager to return full keys for prefix lookup
noot 681dd33
update pb.Message_Peer to have provides keys for prefix lookup
noot adda234
discard peers that don't provide desired content
noot 8bba3ce
cleanup comments, update fullrt for prefix lookup
noot a0577de
cleanup
noot 6c648f1
cleanup
noot 063e99e
Merge branch 'noot/double-hash' of github.com:ChainSafe/go-libp2p-kad…
noot 88d68c7
don't cache for prefix lookups
noot a9ce60b
update go-datastore dep
noot 5c1eda5
add prefixLength check
noot 675dfaa
slice lookup key by bits instead of bytes
noot 32b9a49
add SetPrefixLength
noot e2434a9
update prefix lookup to be by bits
noot 2dcb661
update protobuf message
noot bf1f5b4
use map of keys to list of peers for prefix lookups
noot 780e8b7
fixes and cleanups, unit tests ok
noot af92e26
merge, fix lint errors
noot 8abd351
cleanup
noot 3129f21
update pb.Message.Key to have prefixBitLength; use this to check if q…
noot d8b4570
merge
noot ca5e8ca
small cleanups
noot 6a48f02
cleanup
noot 3708392
update pb not to use map for provider peers, appears to fix prefix lo…
noot 6884c30
fix various prefix lookup bugs; change key encoding in db to hex
noot 236de05
prefix testing
noot 3c81d7f
finally fix routing issue
noot 24e8f3b
cleanup, add unit tests
noot 9a733d2
fix db check
noot af9c81c
add concurrency safety for dht.prefixLength
noot 2415ab3
cleanup
noot 96cedef
update Sha256Multihas to return extra length
noot bd3535e
cleanup
noot 19a3d31
prefixLength 0 set to 256
noot 3b82cf8
cleanup
noot 30979a1
update comment
noot 0feb15d
remove chainsafe/go-datastore usage
noot 74ff325
log cleanup
noot 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 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
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
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.
Is
SetPrefixLength
called somewhere ingo-libp2p-kad-dht
? Or is this function meant to be called bykubo
orgo-libp2p
to configure the DHT settings?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.
no, it's meant to be called externally. I needed this for testing, but thought it could be useful for users of the library also, since the only other way to set the prefix length is at DHT initialization.