erigon-pulse/cmd/lightclient/sentinel
Mike Neuder db1c2d2d82
Adding the AggregateAndProof global topic to the sentinel pubsub service (#5841)
This is the first PR in support of
https://github.com/ledgerwatch/erigon/issues/5824.

The phase 0 sepc
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#global-topics
specifies 6 global pubsub topics that CL nodes need to handle.

This PR implements the `beacob_aggregate_and_proof` topic: 

https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#beacon_aggregate_and_proof.

The `AggregateAndProof` and `SignedAggregateAndProof` types are defined
here:
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/validator.md#aggregateandproof.

I followed the implementation of `SignedBeaconBlockBellatrix`, which has
the following references:

1. cmd/lightclient/cltypes/types.go‎: defines the struct with relevant
SSZ annotations on the fields.
2. cmd/lightclient/cltypes/clone.go: this just returns a reference to an
empty object, so not super clear to me if it is necessary:
3. cmd/lightclient/rpc/common.go: this decodes gossip data, switching on
the type of gossip message that is received.
4. ‎cmd/lightclient/sentinel/service/service.go: this listens on the
pubsub channel and notifies when a packet of the relevant type comes in.
5. cmd/lightclient/sentinel/pubsub.go: this defines the gossip topic
struct.
6. cmd/lightclient/lightclient/subscriber.go: this is the lightclient
interface for the incoming messages that come from the sentinel.
2022-10-23 20:22:33 +02:00
..
communication Tests for lightclient/sentinel (#5772) 2022-10-20 15:41:28 +02:00
handlers fixed messaage id (more efficient gossip, reduction in bandwidth). (#5770) 2022-10-17 19:13:23 +02:00
peers lowered the amount of max peers (#5828) 2022-10-22 02:10:00 +02:00
service Adding the AggregateAndProof global topic to the sentinel pubsub service (#5841) 2022-10-23 20:22:33 +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 the AggregateAndProof global topic to the sentinel pubsub service (#5841) 2022-10-23 20:22:33 +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