mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 15:46:43 +00:00
* bad block tracing * Add debug env framework * add implementation of custom block tracing * add few comments * use tar name fn * wip: add unit tests for block tracing * complete test for block tracer * fix: close grpc server * refactor cli tests * fix: change condition for parsing args * Fix port binding for test server * add helper for creating and closing mock server for tests * consume mock server in tests * fixes due to geth merge * fix: handle port selection for http server * update help and markdown for debug command * update docs * update debug synopsis * fix: use chunked encoder to handle large data over grpc * fix prints * lint * rm unused function, rename fn to TraceBorBlock Co-authored-by: Ferran Borreguero <ferranbt@protonmail.com>
158 lines
2.7 KiB
Protocol Buffer
158 lines
2.7 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package proto;
|
|
|
|
import "google/protobuf/empty.proto";
|
|
|
|
option go_package = "/internal/cli/server/proto";
|
|
|
|
service Bor {
|
|
rpc PeersAdd(PeersAddRequest) returns (PeersAddResponse);
|
|
|
|
rpc PeersRemove(PeersRemoveRequest) returns (PeersRemoveResponse);
|
|
|
|
rpc PeersList(PeersListRequest) returns (PeersListResponse);
|
|
|
|
rpc PeersStatus(PeersStatusRequest) returns (PeersStatusResponse);
|
|
|
|
rpc ChainSetHead(ChainSetHeadRequest) returns (ChainSetHeadResponse);
|
|
|
|
rpc Status(google.protobuf.Empty) returns (StatusResponse);
|
|
|
|
rpc ChainWatch(ChainWatchRequest) returns (stream ChainWatchResponse);
|
|
|
|
rpc DebugPprof(DebugPprofRequest) returns (stream DebugFileResponse);
|
|
|
|
rpc DebugBlock(DebugBlockRequest) returns (stream DebugFileResponse);
|
|
}
|
|
|
|
message TraceRequest {
|
|
int64 number = 1;
|
|
}
|
|
|
|
message TraceResponse {
|
|
|
|
}
|
|
|
|
message ChainWatchRequest {
|
|
|
|
}
|
|
|
|
message ChainWatchResponse {
|
|
repeated BlockStub oldchain = 1;
|
|
repeated BlockStub newchain = 2;
|
|
string type = 3;
|
|
}
|
|
|
|
message BlockStub {
|
|
string hash = 1;
|
|
uint64 number = 2;
|
|
}
|
|
|
|
message PeersAddRequest {
|
|
string enode = 1;
|
|
bool trusted = 2;
|
|
}
|
|
|
|
message PeersAddResponse {
|
|
}
|
|
|
|
message PeersRemoveRequest {
|
|
string enode = 1;
|
|
bool trusted = 2;
|
|
}
|
|
|
|
message PeersRemoveResponse {
|
|
}
|
|
|
|
message PeersListRequest {
|
|
}
|
|
|
|
message PeersListResponse {
|
|
repeated Peer peers = 1;
|
|
}
|
|
|
|
message PeersStatusRequest {
|
|
string enode = 1;
|
|
}
|
|
|
|
message PeersStatusResponse {
|
|
Peer peer = 1;
|
|
}
|
|
|
|
message Peer {
|
|
string id = 1;
|
|
string enode = 2;
|
|
string enr = 3;
|
|
repeated string caps = 4;
|
|
string name = 5;
|
|
bool trusted = 6;
|
|
bool static = 7;
|
|
}
|
|
|
|
message ChainSetHeadRequest {
|
|
uint64 number = 1;
|
|
}
|
|
|
|
message ChainSetHeadResponse {
|
|
}
|
|
|
|
message StatusResponse {
|
|
Header currentBlock = 1;
|
|
Header currentHeader = 2;
|
|
int64 numPeers = 3;
|
|
string syncMode = 4;
|
|
Syncing syncing = 5;
|
|
repeated Fork forks = 6;
|
|
|
|
message Fork {
|
|
string name = 1;
|
|
int64 block = 2;
|
|
bool disabled = 3;
|
|
}
|
|
|
|
message Syncing {
|
|
int64 startingBlock = 1;
|
|
int64 highestBlock = 2;
|
|
int64 currentBlock = 3;
|
|
}
|
|
}
|
|
|
|
message Header {
|
|
string hash = 1;
|
|
uint64 number = 2;
|
|
}
|
|
|
|
message DebugPprofRequest {
|
|
Type type = 1;
|
|
|
|
string profile = 2;
|
|
|
|
int64 seconds = 3;
|
|
|
|
enum Type {
|
|
LOOKUP = 0;
|
|
CPU = 1;
|
|
TRACE = 2;
|
|
}
|
|
}
|
|
|
|
message DebugBlockRequest {
|
|
int64 number = 1;
|
|
}
|
|
|
|
message DebugFileResponse {
|
|
oneof event {
|
|
Open open = 1;
|
|
Input input = 2;
|
|
google.protobuf.Empty eof = 3;
|
|
}
|
|
|
|
message Open {
|
|
map<string, string> headers = 1;
|
|
}
|
|
|
|
message Input {
|
|
bytes data = 1;
|
|
}
|
|
}
|