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 |
|
Giulio rebuffo
|
f09084f45d
|
Refactored and got rid of ton of useless code (#5690)
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
|
2022-10-10 20:14:07 +02:00 |
|
Giulio rebuffo
|
e1dedf4220
|
Added Finalty/Optimistic requests (#5688)
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
|
2022-10-10 15:58:31 +02:00 |
|
Giulio rebuffo
|
6193d02543
|
fixed no handlers responses (MetadataV1/MetadataV2) (#5679)
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
|
2022-10-09 20:28:49 +02:00 |
|
Giulio rebuffo
|
067ad9a59b
|
Licensing new files in cmd/lightclient (#5672)
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
|
2022-10-08 16:15:44 +02:00 |
|
Giulio rebuffo
|
5493ce864d
|
Removed code duplications for ping handlers (#5668)
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
|
2022-10-08 01:02:56 +02:00 |
|