good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 6ef3a168 authored by Péter Szilágyi's avatar Péter Szilágyi Committed by GitHub
Browse files

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: default avatarFelix Lange <fjl@twurst.com>
parent 794c6133
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment