* Update stageloop.go
* Print
* Consider snapshot headers as parlia checkpoints
* Not fail after not loading snapshot
* Lazy snapshots
* Print number of validators
* More printing
* Use epoch instead of checkpoint interval
* Reduce logging
* Fix compilation
* Remove trace jump dest
* Fix lint
* Not store snapshots every epoch
* Separate snapshot for verification and finalisation
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
* exchange RLPx Hello even when maxpeers limit is reached
* bump MaxPendingPeers to increase the default handshake queue
(and the likelyhood of Hello exchange)
The test was flaky, because of the "endpoint prediction".
The test starts 5 nodes one by one.
Node 0 is used as a bootstrap node for nodes 1-4.
When it is about to add, say, node 3, nodes 0 and 1 might already have had a chance to communicate,
and updateEndpoints() deletes the node 0 UDP port, because fallbackUDP port was not configured.
In this case node 3 would get a bootstrap node 0 without a port and lead to an error:
v5_udp_test.go:110: bad bootstrap node "enr:...": missing UDP port
The problem was reproducible by this command:
go test ./p2p/discover -run TestUDPv5_lookupE2E -count 500
* use semaphore instead of a chan struct{}
* move MaxPendingPeers default value to DefaultConfig.P2P
* log Error if Accept fails
* replace quit channel with context
The test was slow, because it was trying to find
predefined nodeIDs (lookupTestnet) by generating random keys
and trying to find their neighbours
until it hits all nodes of the lookupTestnet.
In addition each FindNode response was waited for 0.5 sec (respTimeout).
This could take up to 30 sec and fail the test suite.
A fake random key generator is now used during the test.
It issues the expected keys, and the lookup converges quickly.
The reply timeout is reduced for the test.
Now it normally takes less than.1 sec.
* Place finishHandlingForkChoice after startHandlingForkChoice
* forkChoiceMessage -> forkChoice
* Check that safe & finalized blocks are canonical for no-op forkChoice
This changes the definitions of Ping and Pong, adding an optional field
for the sequence number. This field was previously encoded/decoded using
the "tail" struct tag, but using "optional" is much nicer.
see https://github.com/ethereum/go-ethereum/pull/22842
Co-authored-by: Felix Lange <fjl@twurst.com>
This adds support for a new struct tag "optional". Using this tag, structs used
for RLP encoding/decoding can be extended in a backwards-compatible way,
by adding new fields at the end.
see geth commit 700df1442d
Co-authored-by: Felix Lange <fjl@twurst.com>