Commit graph

177 commits

Author SHA1 Message Date
Jack Robison
c506fc5c75
lower peer finder timeout message to debug from warning 2018-07-18 15:32:45 -04:00
Jack Robison
d29f103910
pylint 2018-07-17 17:38:19 -04:00
Jack Robison
ec51333b56
allow node udp interface to be configured 2018-07-17 17:13:33 -04:00
Victor Shyba
562d23df11 remove nodes that went ignored during iteration 2018-07-16 17:22:46 -03:00
Victor Shyba
5c7d279104 prune failures during is_ignored calls 2018-07-12 18:24:59 -03:00
Victor Shyba
cfe8e17223 filter out the bad node in results instead of punishing the node we trusted to contact 2018-07-12 18:24:18 -03:00
Victor Shyba
1cc7ce69ab set the peer search timeout as configured and raise it to 30s 2018-07-03 13:47:00 -03:00
Victor Shyba
7e0784d8e0 log a warning when peer search times out for real 2018-07-03 12:20:33 -03:00
Victor Shyba
56613a71d5 let find value run until it finds a value 2018-07-03 11:51:39 -03:00
Jack Robison
929a0cc5af
exclude self and querying node from closest contacts 2018-07-02 14:54:03 -04:00
Jack Robison
b6289d101d
fix improper sorting when getting the closest peers to a hash 2018-07-02 14:54:03 -04:00
Jack Robison
7fe92d2df0
load all finished blobs into the node datastore 2018-07-02 14:31:09 -04:00
Jack Robison
03769b94b8
accept invalid store tokens for the first expire-time after startup
this is to better handle nodes storing to us after we've restarted our node
2018-07-02 13:26:38 -04:00
Jack Robison
e6df378e9e
fix token validation error when the dht node has just been started (https://github.com/lbryio/lbry/issues/1248) 2018-06-14 15:07:10 -04:00
Jack Robison
7f3ead67bf
disable forced bucket refresh during join 2018-06-07 15:02:47 -04:00
Jack Robison
b0e4fc4faa
fix iterative find lockup 2018-06-07 15:02:47 -04:00
Jack Robison
ae631f05c3
fix teardown error 2018-06-07 15:02:47 -04:00
Jack Robison
bc0da5e2d1
only use seeds in iterative bootstrap if no contacts are known yet 2018-06-07 15:02:47 -04:00
Jack Robison
44644673d7
add profiler 2018-06-07 15:02:47 -04:00
Jack Robison
e8b402f998
remove deferredLock from iterativeFind
-fire the first iteration right away
2018-06-07 15:02:47 -04:00
Jack Robison
4fbaaac3f3
default new contacts to protocol version 0 2018-06-07 15:02:47 -04:00
Jack Robison
db06191c33
reduce default concurrent announcers to 10
-lower rpc timeout to what it originally was
2018-06-07 15:02:47 -04:00
Jack Robison
b0a741b1f4
fix hash announcer semaphore 2018-06-07 15:02:47 -04:00
Jack Robison
537df6c8ad
log socket errors 2018-06-07 15:02:47 -04:00
Jack Robison
42eb172638
refactor announceHaveBlob
-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
2018-06-07 15:02:47 -04:00
Jack Robison
9a63db4ec6
add protocol version to the dht and migrate old arg format for store 2018-06-07 15:02:47 -04:00
Jack Robison
7d21cc5822
pylint and more tests 2018-06-07 15:02:47 -04:00
Jack Robison
cce3c8c7b5
increase kademlia rpc timeout to 8 seconds 2018-06-07 15:02:47 -04:00
Jack Robison
0e80123615
use 12 minutes instead of 15 as delay in contact_is_good 2018-06-07 15:02:47 -04:00
Jack Robison
659632b66c
fix and update tests 2018-06-07 15:02:47 -04:00
Jack Robison
9582b7fcf5
use maybe_ping for refreshing stale buckets and storing peers
-move store refresh to its own looping call
2018-06-07 15:02:47 -04:00
Jack Robison
945da5985e
fix age used in datastore to determine if a value is expired 2018-06-07 15:02:47 -04:00
Jack Robison
921ee3c4c1
use refreshTimeout in getRefreshList 2018-06-07 15:02:47 -04:00
Jack Robison
8efede6ad6
maybe_ping bad and unknown contacts instead of only unknown 2018-06-07 15:02:47 -04:00
Jack Robison
fb3aac15fa
add optional delay argument to enqueue_maybe_ping, fix default value 2018-06-07 15:02:47 -04:00
Jack Robison
73e813f9ec
verify key size in Distance 2018-06-07 15:02:47 -04:00
Jack Robison
0d23c68797
raise attribute error for non-rpc functions in Contact 2018-06-07 15:02:47 -04:00
Jack Robison
ec1b6b2387
comments, cleaner key_bits constant 2018-06-07 15:02:47 -04:00
Jack Robison
29d5750371
pylint 2018-06-07 15:02:47 -04:00
Jack Robison
07f92014d7
omit bad contacts from getPeersForBlob
-refresh stored contacts to detect when they go offline or come back
2018-06-07 15:02:47 -04:00
Jack Robison
c521120b17
update and fix hash announcer test 2018-06-07 15:02:47 -04:00
Jack Robison
d02ed29e50
add kademlia store and expiration test 2018-06-07 15:02:47 -04:00
Jack Robison
877da78505
ping contacts right away during refresh instead of using PingQueue
-fixes contact expiration test
2018-06-07 15:02:47 -04:00
Jack Robison
a952d2d2c8
reset _listeningPort and _listening Deferred on teardown 2018-06-07 15:02:47 -04:00
Jack Robison
3dfc6bd2cc
update CallLaterManager to be an object 2018-06-07 15:02:47 -04:00
Jack Robison
760417ff3a
pylint 2018-06-07 15:02:47 -04:00
Jack Robison
4f72098cad
use PingQueue to try refresh all contacts 2018-06-07 15:02:47 -04:00
Jack Robison
9920ff59d4
force KBucket refreshes 2018-06-07 15:02:47 -04:00
Jack Robison
aee7a3aa38
simplify announceHaveBlob, remove unused getPeersForBlob 2018-06-07 15:02:47 -04:00
Jack Robison
372fb45e06
refactor dht bootstrap
after finding the closest nodes try to populate the buckets out by looking up random ids in their key ranges
2018-06-07 15:02:47 -04:00