github.com/prysmaticlabs/prysm@v1.4.4/proto/beacon/rpc/v1/debug.proto (about) 1 syntax = "proto3"; 2 3 package ethereum.beacon.rpc.v1; 4 5 import "proto/eth/ext/options.proto"; 6 import "proto/eth/v1alpha1/node.proto"; 7 import "proto/beacon/p2p/v1/messages.proto"; 8 import "google/api/annotations.proto"; 9 import "google/protobuf/empty.proto"; 10 11 // Debug service API 12 // 13 // The debug service in Prysm provides API access to various utilities 14 // for debugging the beacon node's functionality at runtime, such as being able 15 // to retrieve the beacon state by block root or state root from the node directly. 16 service Debug { 17 // Returns a beacon state by filter criteria from the beacon node. 18 rpc GetBeaconState(BeaconStateRequest) returns (SSZResponse) { 19 option (google.api.http) = { 20 get: "/eth/v1alpha1/debug/state" 21 }; 22 } 23 // Returns a beacon state by filter criteria from the beacon node. 24 rpc GetBlock(BlockRequest) returns (SSZResponse) { 25 option (google.api.http) = { 26 get: "/eth/v1alpha1/debug/block" 27 }; 28 } 29 // SetLoggingLevel sets the log-level of the beacon node programmatically. 30 rpc SetLoggingLevel(LoggingLevelRequest) returns (google.protobuf.Empty) { 31 option (google.api.http) = { 32 post: "/eth/v1alpha1/debug/logging" 33 }; 34 } 35 // Returns a proto array fork choice object from the beacon node. 36 rpc GetProtoArrayForkChoice(google.protobuf.Empty) returns (ProtoArrayForkChoiceResponse) { 37 option (google.api.http) = { 38 get: "/eth/v1alpha1/debug/forkchoice" 39 }; 40 } 41 // Returns all the related data for every peer tracked by the host node. 42 rpc ListPeers(google.protobuf.Empty) returns (DebugPeerResponses){ 43 option (google.api.http) = { 44 get: "/eth/v1alpha1/debug/peers" 45 }; 46 } 47 // Returns requested peer with specified peer id if it exists. 48 rpc GetPeer(ethereum.eth.v1alpha1.PeerRequest) returns (DebugPeerResponse) { 49 option (google.api.http) = { 50 get: "/eth/v1alpha1/debug/peer" 51 }; 52 } 53 // Returns the inclusion slot of a given attester id and slot. 54 rpc GetInclusionSlot(InclusionSlotRequest) returns (InclusionSlotResponse) { 55 option (google.api.http) = { 56 get: "/eth/v1alpha1/debug/inclusion" 57 }; 58 } 59 } 60 61 message InclusionSlotRequest { 62 uint64 id = 1; 63 uint64 slot = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"]; 64 } 65 66 message InclusionSlotResponse { 67 uint64 slot = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"]; 68 } 69 70 message BeaconStateRequest { 71 oneof query_filter { 72 // The slot corresponding to a desired beacon state. 73 uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"]; 74 75 // The block root corresponding to a desired beacon state. 76 bytes block_root = 2; 77 } 78 } 79 80 message BlockRequest { 81 bytes block_root = 1; 82 } 83 84 message SSZResponse { 85 // Returns an ssz-encoded byte slice as a response. 86 bytes encoded = 1; 87 } 88 89 message LoggingLevelRequest { 90 // The logging levels available in Prysm as an enum. 91 enum Level { 92 INFO = 0; 93 DEBUG = 1; 94 TRACE = 2; 95 } 96 Level level = 1; 97 } 98 99 message ProtoArrayForkChoiceResponse { 100 // The prune threshold of how many nodes allowed in proto array store. 101 uint64 prune_threshold = 1; 102 // Latest justified epoch in proto array store. 103 uint64 justified_epoch = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"]; 104 // Latest finalized epoch in proto array store. 105 uint64 finalized_epoch = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"]; 106 // The list of the proto array nodes in store. 107 repeated ProtoArrayNode proto_array_nodes = 4; 108 // Root to indices mapping of the proto array nodes in store. 109 map<string, uint64> indices = 5; 110 } 111 112 message ProtoArrayNode { 113 // Slot of the proto array node. 114 uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"]; 115 // Root of the proto array node. 116 bytes root = 2; 117 // Parent of the proto array node. 118 uint64 parent = 3; 119 // Justified epoch of the current proto array node. 120 uint64 justified_epoch = 4 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"]; 121 // finalized epoch of the current proto array node. 122 uint64 finalized_epoch = 5 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"]; 123 // Current weight of the current proto array node. 124 uint64 weight = 6; 125 // Best child of the current proto array node. 126 uint64 best_child = 7; 127 // Best descendant of the proto array node. 128 uint64 best_descendant = 8; 129 } 130 131 message DebugPeerResponses { 132 repeated DebugPeerResponse responses = 1; 133 } 134 135 message DebugPeerResponse { 136 // Peer related metadata that is useful for debugging. 137 message PeerInfo { 138 // Metadata of the peer, containing their bitfield 139 // and sequence number. 140 ethereum.beacon.p2p.v1.MetaDataV0 metadataV0 = 1; 141 ethereum.beacon.p2p.v1.MetaDataV1 metadataV1 = 2; 142 // List of protocols the peer supports. 143 repeated string protocols = 3; 144 // Number of times peer has been penalised. 145 uint64 fault_count = 4; 146 // Protocol Version peer is running. 147 string protocol_version = 5; 148 // Agent Version peer is running. 149 string agent_version = 6; 150 // Latency of responses from peer(in ms). 151 uint64 peer_latency = 7; 152 } 153 // Listening addresses know of the peer. 154 repeated string listening_addresses = 1; 155 // Direction of current connection. 156 ethereum.eth.v1alpha1.PeerDirection direction = 2; 157 // Current connection between host and peer. 158 ethereum.eth.v1alpha1.ConnectionState connection_state = 3; 159 // Peer ID of peer. 160 string peer_id = 4; 161 // ENR of peer at the current moment. 162 string enr = 5; 163 // Peer Info of the peer containing all relevant metadata. 164 PeerInfo peer_info = 6; 165 // Peer Status of the peer. 166 ethereum.beacon.p2p.v1.Status peer_status = 7; 167 // Last know update time for peer status. 168 uint64 last_updated = 8; 169 // Score Info of the peer. 170 ScoreInfo score_info = 9; 171 } 172 173 // The Scoring related information of the particular peer. 174 message ScoreInfo { 175 float overall_score = 1; 176 // Amount of processed blocks provided by 177 // the peer. 178 uint64 processed_blocks = 2; 179 // Related block provider score. 180 float block_provider_score = 3; 181 // Relevant scores by particular topic. 182 map<string,TopicScoreSnapshot> topic_scores = 4; 183 // Gossip Score for peer. 184 float gossip_score = 5; 185 // Behaviour penalty of peer. 186 float behaviour_penalty = 6; 187 // Returns the current validation error(if it exists). 188 string validation_error = 7; 189 } 190 191 message TopicScoreSnapshot { 192 // Time a peer has spent in the gossip mesh. 193 uint64 time_in_mesh = 1; 194 // This is the number of first message deliveries in the topic. 195 float first_message_deliveries = 2; 196 // This is the number of message deliveries in the mesh, within the MeshMessageDeliveriesWindow of 197 // message validation.It effectively tracks first and near-first 198 // deliveries, ie a message seen from a mesh peer before we have forwarded it to them. 199 float mesh_message_deliveries = 3; 200 // This is the number of invalid messages in the topic from the peer. 201 float invalid_message_deliveries = 4; 202 }