2. Today
• First you connect to boot nodes (ping and pong)
• You keep asking for neighbors
• You fill 16 buckets of 16 nodes (Kademlia)
• And you connect to them over RLPx wire protocol
3. Today - RLPx
• You have exchanged public keys
• You create a handshake using a shared secret
• You exchange HELLO messages
• If you both speak ETH, you exchange STATUS messages
• Then you find out if the node is actually useful
4. Problem for LES or SHH
• It’s hard to find nodes that speak LES or SSH
• Most clients speak ETH anyway, and that’s the main use
case
5. Chain pruning
• If not all nodes have all the history of the chain, it starts
becoming harder to find peers with the right data
6. Discovering capabilities
• Adding more information at the discovery level
• Subprotocols supported
• With chain pruning: range of blocks supported
7. Careful not to create islands
Images courtesy of musteka.la project
9. A possible fix
• Two new types of messages for devp2p discovery (0x05 and
0x06)
• OR adding to ping and pong packets
• Exchanged after kademlia routing happened
• Allowing to list capabilities, up to each subprotocol
• ETH example: chain id, range of blocks stored
• Would need to be called on a regular basis to provide
updated capabilities
10. V5 Ping packet
packet-data = [version, from, to, expiration]
version = 5
from = [sender-ip, sender-udp-port, sender-tcp-port]
to = [recipient-ip, recipient-udp-port, 0]
Capacities = [
eth = [blockRange = [1,10000],…]
les = [protocolVersion, 2, txRelay, false, serveChainSince, 5000,…]
]
11. More
• We could allow custom keywords added to capabilities
• #myspecialnode
• Add other nodes in the capabilities?