github.com/prysmaticlabs/prysm@v1.4.4/proto/eth/v1/beacon_debug_service.proto (about) 1 // Copyright 2020 Prysmatic Labs. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 syntax = "proto3"; 15 16 package ethereum.eth.v1; 17 18 import "google/api/annotations.proto"; 19 import "google/protobuf/descriptor.proto"; 20 import "google/protobuf/empty.proto"; 21 22 import "proto/eth/ext/options.proto"; 23 import "proto/eth/v1/beacon_state.proto"; 24 import "proto/eth/v1/beacon_chain_service.proto"; 25 26 option csharp_namespace = "Ethereum.Eth.v1"; 27 option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1"; 28 option java_multiple_files = true; 29 option java_outer_classname = "BeaconDebugProto"; 30 option java_package = "org.ethereum.eth.v1"; 31 option php_namespace = "Ethereum\\Eth\\v1"; 32 33 // Beacon chain debug API 34 // 35 // The beacon chain debug API is a set of endpoints to debug chain and shouldn't be exposed publicly. 36 // 37 // This service is defined in the upstream Ethereum consensus APIs repository (eth2.0-APIs/apis/debug). 38 service BeaconDebug { 39 // GetBeaconState returns full BeaconState object for given stateId. 40 rpc GetBeaconState(StateRequest) returns (BeaconStateResponse) { 41 option (google.api.http) = { 42 get: "/eth/v1/debug/beacon/states/{state_id}" 43 }; 44 } 45 46 // GetBeaconStateSSZ returns the SSZ-serialized version of the full BeaconState object for given stateId. 47 rpc GetBeaconStateSSZ(StateRequest) returns (BeaconStateSSZResponse) { 48 option (google.api.http) = { 49 get: "/eth/v1/debug/beacon/states/{state_id}/ssz" 50 }; 51 } 52 53 // ListForkChoiceHeads retrieves all possible chain heads (leaves of fork choice tree). 54 rpc ListForkChoiceHeads(google.protobuf.Empty) returns (ForkChoiceHeadsResponse) { 55 option (google.api.http) = { 56 get: "/eth/v1/debug/beacon/heads" 57 }; 58 } 59 } 60 61 message ForkChoiceHeadsResponse { 62 repeated ForkChoiceHead data = 1; 63 } 64 65 message ForkChoiceHead { 66 bytes root = 1 [(ethereum.eth.ext.ssz_size) = "32"]; 67 uint64 slot = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"]; 68 } 69 70 message BeaconStateResponse { 71 BeaconState data = 1; 72 } 73 74 message BeaconStateSSZResponse { 75 bytes data = 1; 76 }