-
Notifications
You must be signed in to change notification settings - Fork 482
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
Refactor conditions to add a contact to the routing table #1211
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
jackrobison
force-pushed
the
fix-dht-contact
branch
2 times, most recently
from
May 23, 2018 22:40
9dbe19a
to
05c96e4
Compare
@jackrobison you are reviewing this with @lyoshenka correct? |
jackrobison
changed the title
Refactor conditions to add a contact to the routing table (WIP)
Refactor conditions to add a contact to the routing table
May 29, 2018
jackrobison
force-pushed
the
fix-dht-contact
branch
4 times, most recently
from
June 4, 2018 12:30
f0f3958
to
745631c
Compare
jackrobison
force-pushed
the
fix-dht-contact
branch
3 times, most recently
from
June 7, 2018 18:31
c7c8af7
to
e3c14d4
Compare
-to be re-done when the datastore uses sqlite
-add looping call helpers which use the same clock as the Node
-add cached `token` to Contact objects to minimize findValue requests -remove self_store, always store to remote contacts even if we're the closest known node to the hash -move the store call and error handling from announceHaveBlob to a smaller function of its own
-lower rpc timeout to what it originally was
-fire the first iteration right away
this fixes an incorrectly raised mapping conflict error which the router raises when there is a redirect for the same internal port and a different lan address.
jackrobison
force-pushed
the
fix-dht-contact
branch
from
June 7, 2018 19:03
e3c14d4
to
665c73c
Compare
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.
changed the bucket splitting condition in the dht routing table to be more aggressive (https://stackoverflow.com/a/32187456)
ping dht nodes who have stored to us periodically to determine whether we should include them as an active peer for the hash when we are queried. Nodes that are known to be not reachable by the node storing the record are no longer returned as peers by the storing node.
temporarily disabled data price negotiation, treat all data as free
changed dht bootstrap join process to better populate the routing table initially
cache dht node tokens used during announcement to minimize the number of requests that are needed
implement BEP0005 dht rules to classify nodes as good, bad, or unknown and for when to add them to the routing table (http://www.bittorrent.org/beps/bep_0005.html)
refactored internal dht contact class to track failure counts/times, the time the contact last replied to us, and the time the node last requested something fom us
refactored dht iterativeFind
sort dht contacts returned by
findCloseNodes
in the routing tabledisabled Cryptonator price feed
added functional tests for bootstrapping the dht, announcing and expiring hashes, finding and pinging nodes, protocol version 0/1 backwards/forwards compatibility, and rejoining the network
added protocol version to dht requests and to the response from
findValue
added
port
field to contacts returned byrouting_table_get