mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-01 07:51:21 +00:00
0c3586a8ea
* Add proto array fork choice object to RPC * Add pb * Add pb * Expose proto array store object * Test * Merge branch 'forkchoice-endpoint' of github.com:prysmaticlabs/prysm into forkchoice-endpoint * s/Nodes/nodes * Remove proto from gitignore * More implementations of GetProtoArrayForkChoice * Comments * Use hex * Gazelle * GetForkChoice Test * Remove pb.go * Merge branch 'master' into forkchoice-endpoint * Typo, thanks Raul! * Merge branch 'forkchoice-endpoint' of github.com:prysmaticlabs/prysm into forkchoice-endpoint
101 lines
3.1 KiB
Protocol Buffer
101 lines
3.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package ethereum.beacon.rpc.v1;
|
|
|
|
import "proto/beacon/p2p/v1/types.proto";
|
|
import "google/api/annotations.proto";
|
|
import "google/protobuf/empty.proto";
|
|
|
|
// Debug service API
|
|
//
|
|
// The debug service in Prysm provides API access to various utilities
|
|
// for debugging the beacon node's functionality at runtime, such as being able
|
|
// to retrieve the beacon state by block root or state root from the node directly.
|
|
service Debug {
|
|
// Returns a beacon state by filter criteria from the beacon node.
|
|
rpc GetBeaconState(BeaconStateRequest) returns (SSZResponse) {
|
|
option (google.api.http) = {
|
|
get: "/eth/v1alpha1/debug/state"
|
|
};
|
|
}
|
|
// Returns a beacon state by filter criteria from the beacon node.
|
|
rpc GetBlock(BlockRequest) returns (SSZResponse) {
|
|
option (google.api.http) = {
|
|
get: "/eth/v1alpha1/debug/block"
|
|
};
|
|
}
|
|
// SetLoggingLevel sets the log-level of the beacon node programmatically.
|
|
rpc SetLoggingLevel(LoggingLevelRequest) returns (google.protobuf.Empty) {
|
|
option (google.api.http) = {
|
|
post: "/eth/v1alpha1/debug/logging"
|
|
};
|
|
}
|
|
// Returns a proto array fork choice object from the beacon node.
|
|
rpc GetProtoArrayForkChoice(google.protobuf.Empty) returns (ProtoArrayForkChoiceResponse) {
|
|
option (google.api.http) = {
|
|
get: "/eth/v1alpha1/debug/forkchoice"
|
|
};
|
|
}
|
|
}
|
|
|
|
message BeaconStateRequest {
|
|
oneof query_filter {
|
|
// The slot corresponding to a desired beacon state.
|
|
uint64 slot = 1;
|
|
|
|
// The block root corresponding to a desired beacon state.
|
|
bytes block_root = 2;
|
|
}
|
|
}
|
|
|
|
message BlockRequest {
|
|
bytes block_root = 1;
|
|
}
|
|
|
|
message SSZResponse {
|
|
// Returns an ssz-encoded byte slice as a response.
|
|
bytes encoded = 1;
|
|
}
|
|
|
|
message LoggingLevelRequest {
|
|
// The logging levels available in Prysm as an enum.
|
|
enum Level {
|
|
INFO = 0;
|
|
DEBUG = 1;
|
|
TRACE = 2;
|
|
}
|
|
Level level = 1;
|
|
}
|
|
|
|
message ProtoArrayForkChoiceResponse {
|
|
// The prune threshold of how many nodes allowed in proto array store.
|
|
uint64 prune_threshold = 1;
|
|
// Latest justified epoch in proto array store.
|
|
uint64 justified_epoch = 2;
|
|
// Latest finalized epoch in proto array store.
|
|
uint64 finalized_epoch = 3;
|
|
// The list of the proto array nodes in store.
|
|
repeated ProtoArrayNode proto_array_nodes = 4;
|
|
// Root to indices mapping of the proto array nodes in store.
|
|
map<string, uint64> indices = 5;
|
|
}
|
|
|
|
message ProtoArrayNode {
|
|
// Slot of the proto array node.
|
|
uint64 slot = 1;
|
|
// Root of the proto array node.
|
|
bytes root = 2;
|
|
// Parent of the proto array node.
|
|
uint64 parent = 3;
|
|
// Justified epoch of the current proto array node.
|
|
uint64 justified_epoch = 4;
|
|
// finalized epoch of the current proto array node.
|
|
uint64 finalized_epoch = 5;
|
|
// Current weight of the current proto array node.
|
|
uint64 weight = 6;
|
|
// Best child of the current proto array node.
|
|
uint64 best_child = 7;
|
|
// Best descendant of the proto array node.
|
|
uint64 best_descendant = 8;
|
|
}
|