* port kad * feat: port kad bucket * feat: add discv4 * chore: rustfmt * cargo update * just reuse discv5 table * test: add rlp tests * message encoding * feat: impl codec roundtrip testing * more work in message handling * implement ping * feat: impl commands * cleanup * more cleanup * trim config * more docs * feat: implement recursive lookup * docs * cleanup config * feat: implement update stream * chore: config cleanup * docs: add crate docs * feat: more testing * fix deny * clarify ring * docs: more docs * use discv5 master * docs: address review and add comments * update readme * rustmft * chore(clippy): make clippy happy
1.1 KiB
discv4
This is a rust implementation of the Discovery v4 peer discovery protocol.
For comparison to Discovery v5, see discv5#comparison-with-node-discovery-v4
This is inspired by the discv5 crate and reuses its kademlia implementation.
Finding peers
The discovery service continuously attempts to connect to other nodes on the network until it has found enough peers. If UPnP (Universal Plug and Play) is supported by the router the service is running on, it will also accept connections from external nodes. In the discovery protocol, nodes exchange information about where the node can be reached to eventually establish RLPx sessions.
Trouble Shooting
The discv4 protocol depends on the local system clock. If the clock is not accurate it can cause connectivity issues because the expiration timestamps might be wrong.