prysm-pulse/proto/eth/service/node_service.proto

93 lines
3.7 KiB
Protocol Buffer
Raw Normal View History

// Copyright 2020 Prysmatic Labs.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package ethereum.eth.service;
import "google/api/annotations.proto";
import "google/protobuf/descriptor.proto";
import "google/protobuf/empty.proto";
import "proto/eth/v1/node.proto";
option csharp_namespace = "Ethereum.Eth.Service";
option go_package = "github.com/prysmaticlabs/prysm/v3/proto/eth/service";
option java_multiple_files = true;
option java_outer_classname = "NodeServiceProto";
option java_package = "org.ethereum.eth.service";
option php_namespace = "Ethereum\\Eth\\Service";
// Beacon chain node API
//
// The beacon chain node API is a set of endpoints to query node information.
service BeaconNode {
// GetIdentity retrieves data about the node's network presence.
2022-06-21 14:29:44 +00:00
//
// Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.3.0#/Node/getNetworkIdentity
rpc GetIdentity(google.protobuf.Empty) returns (v1.IdentityResponse) {
option (google.api.http) = {get: "/internal/eth/v1/node/identity"};
}
// ListPeers retrieves data about the node's network peers.
2022-06-21 14:29:44 +00:00
//
// Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.3.0#/Node/getPeers
rpc ListPeers(v1.PeersRequest) returns (v1.PeersResponse) {
option (google.api.http) = {get: "/internal/eth/v1/node/peers"};
}
// GetPeer retrieves data about the given peer.
2022-06-21 14:29:44 +00:00
//
// Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.3.0#/Node/getPeer
rpc GetPeer(v1.PeerRequest) returns (v1.PeerResponse) {
option (google.api.http) = {get: "/internal/eth/v1/node/peers/{peer_id}"};
}
// PeerCount retrieves number of known peers.
2022-06-21 14:29:44 +00:00
//
// Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.3.0#/Node/getPeerCount
rpc PeerCount(google.protobuf.Empty) returns (v1.PeerCountResponse) {
option (google.api.http) = {get: "/internal/eth/v1/node/peer_count"};
}
// GetSyncStatus requests the beacon node to describe if it's currently syncing or not, and
// if it is, what block it is up to.
2022-06-21 14:29:44 +00:00
//
// Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.3.0#/Node/getSyncingStatus
rpc GetSyncStatus(google.protobuf.Empty) returns (v1.SyncingResponse) {
option (google.api.http) = {get: "/internal/eth/v1/node/syncing"};
}
// GetVersion requests that the beacon node identify information about its implementation in a
// format similar to a HTTP User-Agent field.
2022-06-21 14:29:44 +00:00
//
// Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.3.0#/Node/getNodeVersion
rpc GetVersion(google.protobuf.Empty) returns (v1.VersionResponse) {
option (google.api.http) = {get: "/internal/eth/v1/node/version"};
}
// GetHealth returns node health status in http status codes. Useful for load balancers.
// Response Usage:
// "200":
// description: Node is ready
// "206":
// description: Node is syncing but can serve incomplete data
// "503":
// description: Node not initialized or having issues
2022-06-21 14:29:44 +00:00
//
// Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.3.0#/Node/getHealth
rpc GetHealth(google.protobuf.Empty) returns (google.protobuf.Empty) {
option (google.api.http) = {get: "/internal/eth/v1/node/health"};
}
}