openethereum/util/network-devp2p/src
Jim Posen 01f825b0e1 Multiple improvements to discovery ping handling (#8771)
* discovery: Only add nodes to routing table after receiving pong.

Previously the discovery algorithm would add nodes to the routing table
before confirming that the endpoint is participating in the protocol. This
now tracks in-flight pings and adds to the routing table only after receiving
a response.

* discovery: Refactor packet creation into its own function.

This function is useful inside unit tests.

* discovery: Additional testing for new add_node behavior.

* discovery: Track expiration of pings to non-yet-in-bucket nodes.

Now that we may ping nodes before adding to a k-bucket, the timeout tracking
must be separate from BucketEntry.

* discovery: Verify echo hash on pong packets.

Stores packet hash with in-flight requests and matches with pong response.

* discovery: Track timeouts on FIND_NODE requests.

* discovery: Retry failed pings with exponential backoff.

UDP packets may get dropped, so instead of immediately booting nodes that fail
to respond to a ping, retry 4 times with exponential backoff.

* !fixup Use slice instead of Vec for request_backoff.
2018-07-11 21:22:06 +02:00
..
connection.rs Delete crates from parity-ethereum and fetch them from parity-common instead (#9083) 2018-07-10 14:59:19 +02:00
discovery.rs Multiple improvements to discovery ping handling (#8771) 2018-07-11 21:22:06 +02:00
handshake.rs Delete crates from parity-ethereum and fetch them from parity-common instead (#9083) 2018-07-10 14:59:19 +02:00
host.rs Multiple improvements to discovery ping handling (#8771) 2018-07-11 21:22:06 +02:00
ip_utils.rs Eliminate some more transmute() (#8879) 2018-06-22 12:51:53 +01:00
lib.rs Delete crates from parity-ethereum and fetch them from parity-common instead (#9083) 2018-07-10 14:59:19 +02:00
node_table.rs Multiple improvements to discovery ping handling (#8771) 2018-07-11 21:22:06 +02:00
service.rs Update license header and scripts (#8666) 2018-06-04 10:19:50 +02:00
session.rs Update license header and scripts (#8666) 2018-06-04 10:19:50 +02:00