erigon-pulse/cmd/lightclient/rpc/proto/sentinel.proto
Giulio rebuffo 327abb3c13
fixed lightclient finality/optimistic updates (#5706)
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-10-11 23:44:02 +02:00

39 lines
811 B
Protocol Buffer

syntax = "proto3";
package lightrpc;
message EmptyRequest {}
enum GossipType {
// Lightclient gossip
LightClientFinalityUpdateGossipType = 0;
LightClientOptimisticUpdateGossipType = 1;
// Legacy gossip
BeaconBlockGossipType = 2;
}
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);
}