erigon-pulse/cmd/headers/proto/control.proto

39 lines
797 B
Protocol Buffer
Raw Normal View History

syntax = "proto3";
import "google/protobuf/empty.proto";
package proto;
option go_package = "./proto;proto";
option java_multiple_files = true;
option java_package = "io.turbo-geth.p2p";
option java_outer_classname = "P2pControl";
enum InboundMessageId {
NewBlockHashes = 0; BlockHeaders = 1; BlockBodies = 2; NewBlock = 3;
}
message InboundMessage {
InboundMessageId id = 1;
bytes data = 2;
bytes peer_id = 3;
}
message Forks {
bytes genesis = 1;
repeated uint64 passed = 2;
uint64 next = 3;
}
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);
}