plugeth/p2p/enode
Péter Szilágyi 6ef3a16869
p2p/enode: use unix timestamp as base ENR sequence number (#19903)
This PR ensures that wiping all data associated with a node (apart from its nodekey)
will not generate already used sequence number for the ENRs, since all remote nodes
would reject them until they out-number the previously published largest one.

The big complication with this scheme is that every local update to the ENR can
potentially bump the sequence number by one. In order to ensure that local updates
do not outrun the clock, the sequence number is a millisecond-precision timestamp,
and updates are throttled to occur at most once per millisecond.

Co-authored-by: Felix Lange <fjl@twurst.com>
2021-09-07 12:36:48 +02: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
iter_test.go p2p, p2p/enode: fix data races (#23434) 2021-08-24 12:22:56 +02:00
iter.go p2p/enode: remove data race in sliceIter (#20421) 2019-12-05 22:16:35 +01:00
localnode_test.go p2p/enode: use unix timestamp as base ENR sequence number (#19903) 2021-09-07 12:36:48 +02:00
localnode.go p2p/enode: use unix timestamp as base ENR sequence number (#19903) 2021-09-07 12:36:48 +02:00
node_test.go p2p/enode: improve IPv6 support, add ENR text representation (#19663) 2019-06-07 15:31:00 +02:00
node.go p2p/enode: fix method doc (#23115) 2021-06-28 10:48:17 +03:00
nodedb_test.go p2p/discover: add initial discovery v5 implementation (#20750) 2020-04-08 09:57:23 +02:00
nodedb.go p2p/enode: use unix timestamp as base ENR sequence number (#19903) 2021-09-07 12:36:48 +02:00
urlv4_test.go p2p/enode: mock DNS resolver in URL parsing test (#20252) 2019-11-07 16:40:37 +01:00
urlv4.go p2p/enode: update code comment (#20972) 2020-04-24 16:50:03 +02:00