2022-10-09 11:41:15 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package lightrpc;
|
|
|
|
|
2022-10-11 21:44:02 +00:00
|
|
|
message EmptyRequest {}
|
2022-10-09 11:41:15 +00:00
|
|
|
|
2022-10-09 15:49:27 +00:00
|
|
|
enum GossipType {
|
|
|
|
// Lightclient gossip
|
|
|
|
LightClientFinalityUpdateGossipType = 0;
|
|
|
|
LightClientOptimisticUpdateGossipType = 1;
|
|
|
|
// Legacy gossip
|
|
|
|
BeaconBlockGossipType = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GossipData {
|
|
|
|
bytes data = 1; // SSZ encoded data
|
|
|
|
GossipType type = 2;
|
|
|
|
}
|
|
|
|
|
2022-10-11 21:44:02 +00:00
|
|
|
message PeerCount {
|
|
|
|
uint64 amount = 1;
|
|
|
|
}
|
|
|
|
|
2022-10-10 13:58:31 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2022-10-09 11:41:15 +00:00
|
|
|
service Sentinel {
|
2022-10-11 21:44:02 +00:00
|
|
|
rpc SubscribeGossip(EmptyRequest) returns (stream GossipData);
|
2022-10-10 13:58:31 +00:00
|
|
|
rpc SendRequest(RequestData) returns (ResponseData);
|
2022-10-11 21:44:02 +00:00
|
|
|
rpc GetPeers(EmptyRequest) returns (PeerCount);
|
2022-10-09 11:41:15 +00:00
|
|
|
}
|