mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 23:48:06 -05:00
* handlers * blinded block handlers and protos * revert SSZ and register endpoints * remove vars * e2e * handler for v1 endpoint * tests * register GetBlock * disable security linter * remove unused structs * more review comments
112 lines
4.7 KiB
Protocol Buffer
112 lines
4.7 KiB
Protocol Buffer
// 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/beacon_block.proto";
|
|
import "proto/eth/v1/beacon_chain.proto";
|
|
|
|
option csharp_namespace = "Ethereum.Eth.Service";
|
|
option go_package = "github.com/prysmaticlabs/prysm/v4/proto/eth/service";
|
|
option java_multiple_files = true;
|
|
option java_outer_classname = "BeaconChainServiceProto";
|
|
option java_package = "org.ethereum.eth.service";
|
|
option php_namespace = "Ethereum\\Eth\\Service";
|
|
|
|
// Beacon Chain API
|
|
//
|
|
// The config API endpoints can be used to query the beacon chain state and information. Such as spec, current fork,
|
|
// blocks, and the validator spec.
|
|
//
|
|
// This service is defined in the upstream Ethereum consensus APIs repository (beacon-apis/apis/).
|
|
service BeaconChain {
|
|
// Beacon state API related endpoints.
|
|
|
|
// GetWeakSubjectivity is a new proposed endpoint to retrieve the details necessary to download
|
|
// the ssz data needed to start a beacon node - checkpoint(epoch + block_root) and state_root
|
|
// DEPRECATED: GetWeakSubjectivity endpoint will no longer be supported
|
|
rpc GetWeakSubjectivity(google.protobuf.Empty) returns (v1.WeakSubjectivityResponse) {
|
|
option deprecated = true;
|
|
option (google.api.http) = {get: "/internal/eth/v1/beacon/weak_subjectivity"};
|
|
}
|
|
|
|
// Beacon pools API related endpoints.
|
|
|
|
// ListPoolAttesterSlashings retrieves attester slashings known by the node but
|
|
// not necessarily incorporated into any block.
|
|
//
|
|
// Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.3.0#/Beacon/getPoolAttesterSlashings
|
|
rpc ListPoolAttesterSlashings(google.protobuf.Empty) returns (v1.AttesterSlashingsPoolResponse) {
|
|
option (google.api.http) = {
|
|
get: "/internal/eth/v1/beacon/pool/attester_slashings"
|
|
};
|
|
}
|
|
|
|
// SubmitAttesterSlashing submits AttesterSlashing object to node's pool and
|
|
// if passes validation node MUST broadcast it to network.
|
|
//
|
|
// Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.3.0#/Beacon/submitPoolAttesterSlashings
|
|
rpc SubmitAttesterSlashing(v1.AttesterSlashing) returns (google.protobuf.Empty) {
|
|
option (google.api.http) = {
|
|
post: "/internal/eth/v1/beacon/pool/attester_slashings"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
// ListPoolProposerSlashings retrieves proposer slashings known by the node
|
|
// but not necessarily incorporated into any block.
|
|
//
|
|
// Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.3.0#/Beacon/getPoolProposerSlashings
|
|
rpc ListPoolProposerSlashings(google.protobuf.Empty) returns (v1.ProposerSlashingPoolResponse) {
|
|
option (google.api.http) = {
|
|
get: "/internal/eth/v1/beacon/pool/proposer_slashings"
|
|
};
|
|
}
|
|
|
|
// SubmitProposerSlashing submits AttesterSlashing object to node's pool and if
|
|
// passes validation node MUST broadcast it to network.
|
|
//
|
|
// Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.3.0#/Beacon/submitPoolProposerSlashings
|
|
rpc SubmitProposerSlashing(v1.ProposerSlashing) returns (google.protobuf.Empty) {
|
|
option (google.api.http) = {
|
|
post: "/internal/eth/v1/beacon/pool/proposer_slashings"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
// Beacon config API related endpoints.
|
|
|
|
// GetForkSchedule retrieve all scheduled upcoming forks this node is aware of.
|
|
//
|
|
// Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.3.0#/Config/getForkSchedule
|
|
rpc GetForkSchedule(google.protobuf.Empty) returns (v1.ForkScheduleResponse) {
|
|
option (google.api.http) = {get: "/internal/eth/v1/config/fork_schedule"};
|
|
}
|
|
|
|
// Spec retrieves specification configuration (without Phase 1 params) used on this node. Specification params list
|
|
// Values are returned with following format:
|
|
// - any value starting with 0x in the spec is returned as a hex string
|
|
// - all other values are returned as number
|
|
//
|
|
// Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.3.0#/Config/getSpec
|
|
rpc GetSpec(google.protobuf.Empty) returns (v1.SpecResponse) {
|
|
option (google.api.http) = {get: "/internal/eth/v1/config/spec"};
|
|
}
|
|
}
|