plugeth/p2p
Felix Lange 9123eceb0f p2p, p2p/discover: misc connectivity improvements (#16069)
* p2p: add DialRatio for configuration of inbound vs. dialed connections

* p2p: add connection flags to PeerInfo

* p2p/netutil: add SameNet, DistinctNetSet

* p2p/discover: improve revalidation and seeding

This changes node revalidation to be periodic instead of on-demand. This
should prevent issues where dead nodes get stuck in closer buckets
because no other node will ever come along to replace them.

Every 5 seconds (on average), the last node in a random bucket is
checked and moved to the front of the bucket if it is still responding.
If revalidation fails, the last node is replaced by an entry of the
'replacement list' containing recently-seen nodes.

Most close buckets are removed because it's very unlikely we'll ever
encounter a node that would fall into any of those buckets.

Table seeding is also improved: we now require a few minutes of table
membership before considering a node as a potential seed node. This
should make it less likely to store short-lived nodes as potential
seeds.

* p2p/discover: fix nits in UDP transport

We would skip sending neighbors replies if there were fewer than
maxNeighbors results and CheckRelayIP returned an error for the last
one. While here, also resolve a TODO about pong reply tokens.
2018-02-12 14:36:09 +02:00
..
discover p2p, p2p/discover: misc connectivity improvements (#16069) 2018-02-12 14:36:09 +02:00
discv5 p2p/discv5: fix multiple discovery issues (#16036) 2018-02-08 19:06:31 +02:00
enr p2p/enr: initial implementation (#15585) 2017-12-29 21:18:51 +01:00
nat p2p/nat: delete port mapping before adding (#15222) 2017-10-06 13:39:47 +02:00
netutil p2p, p2p/discover: misc connectivity improvements (#16069) 2018-02-12 14:36:09 +02:00
simulations p2p/simulations: fix gosimple nit (#15661) 2017-12-13 03:15:27 +01:00
dial_test.go p2p: add network simulation framework (#14982) 2017-09-25 10:08:07 +02:00
dial.go p2p, swarm/network/kademlia: use IsZero to check for zero time (#15603) 2017-12-04 11:07:10 +01:00
message_test.go all: fix go vet warnings 2016-04-15 11:17:27 +02:00
message.go p2p: add network simulation framework (#14982) 2017-09-25 10:08:07 +02:00
metrics.go eth, metrics, p2p: prepare metrics and net packets to eth/62 2015-08-21 10:30:57 +03:00
peer_error.go p2p, p2p/discover, p2p/nat: rework logging using context keys 2017-02-28 10:20:29 +01:00
peer_test.go p2p, p2p/discover, p2p/nat: rework logging using context keys 2017-02-28 10:20:29 +01:00
peer.go p2p, p2p/discover: misc connectivity improvements (#16069) 2018-02-12 14:36:09 +02:00
protocol.go eth, p2p, rpc/api: polish protocol info gathering 2015-10-28 12:44:15 +02:00
rlpx_test.go all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}() 2016-02-21 22:34:34 +00:00
rlpx.go p2p: snappy encoding for devp2p (version bump to 5) (#15106) 2017-09-26 16:54:49 +03:00
server_test.go p2p/simulations: various stability fixes (#15198) 2017-12-01 12:49:04 +01:00
server.go p2p, p2p/discover: misc connectivity improvements (#16069) 2018-02-12 14:36:09 +02:00