erigon-pulse/p2p/enode
Felix Lange f0c6f92140
p2p/discover, p2p/enode: rework endpoint proof handling, packet logging (#18963)
This change resolves multiple issues around handling of endpoint proofs.
The proof is now done separately for each IP and completing the proof
requires a matching ping hash.

Also remove waitping because it's equivalent to sleep. waitping was
slightly more efficient, but that may cause issues with findnode if
packets are reordered and the remote end sees findnode before pong.

Logging of received packets was hitherto done after handling the packet,
which meant that sent replies were logged before the packet that
generated them. This change splits up packet handling into 'preverify'
and 'handle'. The error from 'preverify' is logged, but 'handle' happens
after the message is logged. This fixes the order. Packet logs now
contain the node ID.
2019-01-29 17:39:20 +01:00
..
idscheme_test.go all: new p2p node representation (#17643) 2018-09-25 00:59:00 +02:00
idscheme.go vendor, crypto, swarm: switch over to upstream sha3 package 2019-01-04 09:26:07 +02:00
localnode_test.go p2p, p2p/discover: add signed ENR generation (#17753) 2018-10-12 11:47:24 +02:00
localnode.go p2p, p2p/discover: add signed ENR generation (#17753) 2018-10-12 11:47:24 +02:00
node_test.go all: new p2p node representation (#17643) 2018-09-25 00:59:00 +02:00
node.go p2p, p2p/discover: add signed ENR generation (#17753) 2018-10-12 11:47:24 +02:00
nodedb_test.go p2p/discover, p2p/enode: rework endpoint proof handling, packet logging (#18963) 2019-01-29 17:39:20 +01:00
nodedb.go p2p/discover, p2p/enode: rework endpoint proof handling, packet logging (#18963) 2019-01-29 17:39:20 +01:00
urlv4_test.go all: new p2p node representation (#17643) 2018-09-25 00:59:00 +02:00
urlv4.go all: new p2p node representation (#17643) 2018-09-25 00:59:00 +02:00