Skip to content
  1. Jul 25, 2018
  2. Jul 24, 2018
  3. Jul 23, 2018
  4. Jul 20, 2018
  5. Jul 19, 2018
  6. Jul 18, 2018
  7. Jul 17, 2018
  8. Jul 16, 2018
  9. Jul 15, 2018
  10. Jul 14, 2018
  11. Jul 13, 2018
  12. Jul 12, 2018
  13. Jul 11, 2018
    • Jim Posen's avatar
      Multiple improvements to discovery ping handling (#8771) · 01f825b0
      Jim Posen authored
      * 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.
      01f825b0