2020-10-25 22:05:37 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
import "google/protobuf/empty.proto";
|
|
|
|
|
2020-10-29 16:38:46 +00:00
|
|
|
package control;
|
2020-10-25 22:05:37 +00:00
|
|
|
|
2020-10-29 16:38:46 +00:00
|
|
|
option go_package = "./core;core";
|
2020-10-25 22:05:37 +00:00
|
|
|
|
|
|
|
enum InboundMessageId {
|
|
|
|
NewBlockHashes = 0; BlockHeaders = 1; BlockBodies = 2; NewBlock = 3;
|
2020-10-29 16:38:46 +00:00
|
|
|
NodeData = 4;
|
2020-10-25 22:05:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message InboundMessage {
|
|
|
|
InboundMessageId id = 1;
|
|
|
|
bytes data = 2;
|
|
|
|
bytes peer_id = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Forks {
|
|
|
|
bytes genesis = 1;
|
2020-10-29 16:38:46 +00:00
|
|
|
repeated uint64 forks = 2;
|
2020-10-25 22:05:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message StatusData {
|
|
|
|
uint64 network_id = 1;
|
|
|
|
bytes total_difficulty = 2;
|
|
|
|
bytes best_hash = 3;
|
|
|
|
Forks fork_data = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
service Control {
|
|
|
|
rpc ForwardInboundMessage(InboundMessage) returns(google.protobuf.Empty);
|
|
|
|
rpc GetStatus(google.protobuf.Empty) returns(StatusData);
|
2020-10-29 16:38:46 +00:00
|
|
|
}
|