erigon-pulse/cmd/lightclient/rpc/proto/sentinel.proto
Mike Neuder 4b5880e8d3
Adding VoluntaryExit, ProposerSlashing, and AttesterSlashing topics to pubsub service (#5851)
This is a follow on PR in support of
https://github.com/ledgerwatch/erigon/issues/5824. See
https://github.com/ledgerwatch/erigon/pull/5841 for the
`beacon_aggregate_and_proof` topic.

This PR adds support for the `voluntary_exit, proposer_slashing, and
attester_slashing` topics as defined in the phase 0 spec
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#global-topics.

The CL types were already defined so this just adds the listening to the
pub sub service.
2022-10-24 17:52:49 +02:00

47 lines
1023 B
Protocol Buffer

syntax = "proto3";
package lightrpc;
option go_package = "../lightrpc";
message EmptyRequest {}
enum GossipType {
// Lightclient gossip
LightClientFinalityUpdateGossipType = 0;
LightClientOptimisticUpdateGossipType = 1;
// Legacy gossip
BeaconBlockGossipType = 2;
// Global gossip topics.
AggregateAndProofGossipType = 3;
VoluntaryExitGossipType = 4;
ProposerSlashingGossipType = 5;
AttesterSlashingGossipType = 6;
}
message GossipData {
bytes data = 1; // SSZ encoded data
GossipType type = 2;
}
message PeerCount {
uint64 amount = 1;
}
message RequestData {
bytes data = 1; // SSZ encoded data
string topic = 2;
}
message ResponseData {
bytes data = 1; // prefix-stripped SSZ encoded data
bool error = 2; // did the peer encounter an error
}
service Sentinel {
rpc SubscribeGossip(EmptyRequest) returns (stream GossipData);
rpc SendRequest(RequestData) returns (ResponseData);
rpc GetPeers(EmptyRequest) returns (PeerCount);
}