Raúl Kripalani
d87f89314c
Consolidate abstractions and core types into go-libp2p-core ( #601 )
6 years ago
vyzo
70c4f155e7
advertise for relay services every 30min
6 years ago
vyzo
0a221500fd
update use of discovery.FindPeers for new interface
6 years ago
Steven Allen
1b9cf3e2cb
test: disable flaky autorelay test in CI
This keeps breaking travis.
6 years ago
vyzo
ba00011d34
avoid intermediate allocation in relayAddrs
now that we have the lock for the duration of the method, we don't need the intermediate
relays array. This removes it, and also extends the pre-allocation of the result array
by 2 so that it can cover two localhost and two private address bindings.
6 years ago
vyzo
97f1e71e86
cache relayAddrs for a short period of time
6 years ago
vyzo
abfb4c8901
fix bug in findRelaysOnce: it connects to all relays
6 years ago
Steven Allen
776a53a370
autorelay: break findRelays into multiple functions and avoid the goto
(@stebalien is picky and opinionated...)
6 years ago
vyzo
8d073cec9e
kill the parallel query logic in selectRelays; let it be random
the presence of stashed query results from discovery in the peerstore _biases_ the
selection towards fully DHT nodes, which penalizes dedicated relays.
6 years ago
vyzo
35e805dc41
add ignore list to account for connection failures
6 years ago
vyzo
4629431a12
some tweaks
- select 25 of 50 relays instead of 20
- increase connect timeout to 30s
6 years ago
vyzo
f9e182f747
gate max number of retries in findRelays
6 years ago
vyzo
1a8111970b
reduce scope of the lock, pre-allocate result slice in relayAddrs
6 years ago
vyzo
5c9299a45c
pacify the race detector
6 years ago
vyzo
4727d5b849
don't preallocate result array, we don't know how long it will be
6 years ago
vyzo
c09717275b
compute relay address set dynamically
6 years ago
vyzo
f4f924e1d4
don't track relay addrs, use the peerstore
6 years ago
vyzo
bd22c49b0d
remove redundant private addr check when constructing our relay address set
findRelays cleans up address sets now for addrsplosion, and this removes private
addrs as well.
6 years ago
vyzo
9b2731e5bb
used named constants for dns address protocols
6 years ago
vyzo
a8d14f9b02
use addresses from the peerstore if available
6 years ago
vyzo
ff4b98a6fc
some more addrsplosion tests
6 years ago
vyzo
21c4e1d298
test for privately bound port first when cleaning up addrsplosion
6 years ago
vyzo
528c473840
filter relay addrs in address set cleanup
6 years ago
vyzo
9d7f6b83e5
rewrite isDNSAddr to use ma.SplitFirst
6 years ago
vyzo
e82eabe130
cover the case where we can't select a default port in addrsplosion clean up
6 years ago
vyzo
a331f99b65
addrsplosion test
6 years ago
vyzo
433a0c0908
extract cleanupAddrSet and implement better heuristic
6 years ago
vyzo
4a4b14819a
add comment about eliding the lock on addrs read
6 years ago
vyzo
27f465ee35
some better logging
6 years ago
vyzo
0830634938
limit number of FindPeer queries in relay selection
6 years ago
vyzo
0c69da9409
move the address invalidation check outside the lock
6 years ago
vyzo
8d5c11c072
fix private->public->private transition issues with address set
6 years ago
vyzo
e8e2ab1930
limit relay selection to 20
6 years ago
vyzo
c8b8014fd0
gate retry wait with the context
6 years ago
vyzo
376379b5b8
retry to find relays if we fail to connect to any
6 years ago
vyzo
4a6e767da2
log and ignore relay peers with empty address sets
6 years ago
vyzo
081bb0f7ed
small tweak in autorelay test
6 years ago
vyzo
8c7da83b55
also check private addresses when looking for 4001
6 years ago
vyzo
da65fd74a6
fix and reinstate autorelay test
6 years ago
vyzo
45d2888617
don't drop ephemeral ports in address set clean up
6 years ago
vyzo
c9f627e221
increase FindPeer timeout to 30s
6 years ago
vyzo
31dfaf6029
increase relay advertising boot delay to 15min
6 years ago
vyzo
1138fb6040
only determine default port if it is in a public addr
6 years ago
vyzo
becb89a245
shuffle relay set before queries
6 years ago
vyzo
39f2b7ad45
fix selectRelays to return promptly when there are query errors
6 years ago
vyzo
765ed0e1a6
select 50 relays
6 years ago
vyzo
9863e22d4a
rework relay selection logic
6 years ago
vyzo
aa03a9b839
clean up relay address sets to curtail addrsplosion
6 years ago
vyzo
a1ebc4d852
reduce relay find peer and connect timeout to 30s
6 years ago
vyzo
ffd4981247
increase autorelay discovery limit to 1k
6 years ago