erigon-pulse/cmd/lightclient/sentinel
Mike Neuder 29ff8daa92
req/resp heartbeat handler modifications (#5859)
addressing some aspects of the req/resp portion of the CL spec:
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#reqresp-interaction.

this PR does a few things: 
1. moves `blocksByRangeHandler` and `beaconBlocksByRootHandler` handlers
to a different file in the `handlers` package. these are going to be the
more complicated handlers so they will be better in their own files.
2. makes `pingHandler` a method on the `*ConsensusHandlers` receiver and
starts returning the sequence number instead of the request. (see
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#ping
`Peers request and respond with their local metadata sequence number`).
3. adds a `goodbyeHandler` to respond with a status message of 1. (see
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#goodbye).
4. makes `statusHandler` a method on the `*ConsensusHandlers` receiver.
(the rest of this handler is still not implemented.
5. refactored the `heartbeats_test` into a table driven test. this makes
the test much more readable:
https://dave.cheney.net/2019/05/07/prefer-table-driven-tests.
2022-10-25 19:30:11 +02:00
..
communication Tests for lightclient/sentinel (#5772) 2022-10-20 15:41:28 +02:00
handlers req/resp heartbeat handler modifications (#5859) 2022-10-25 19:30:11 +02:00
peers lowered the amount of max peers (#5828) 2022-10-22 02:10:00 +02:00
service Adding VoluntaryExit, ProposerSlashing, and AttesterSlashing topics to pubsub service (#5851) 2022-10-24 17:52:49 +02:00
config_test.go Tests for lightclient/sentinel (#5772) 2022-10-20 15:41:28 +02:00
config.go fixed messaage id (more efficient gossip, reduction in bandwidth). (#5770) 2022-10-17 19:13:23 +02:00
discovery.go Added tests for config functions and further refactoring (#5646) 2022-10-06 18:23:46 +02:00
gossip.go Licensing new files in cmd/lightclient (#5672) 2022-10-08 16:15:44 +02:00
pubsub_test.go Tests for lightclient/sentinel (#5772) 2022-10-20 15:41:28 +02:00
pubsub.go Adding VoluntaryExit, ProposerSlashing, and AttesterSlashing topics to pubsub service (#5851) 2022-10-24 17:52:49 +02:00
request.go Lightclient Checkpoint Sync (#5738) 2022-10-13 18:26:29 +02:00
sentinel.go got rid of time.Sleep (#5840) 2022-10-22 17:38:29 +01:00
utils_test.go Tests for lightclient/sentinel (#5772) 2022-10-20 15:41:28 +02:00
utils.go Lightclient Checkpoint Sync (#5738) 2022-10-13 18:26:29 +02:00