mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Debug HTTP endpoints (#13164)
* Debug HTTP endpoints * register endpoints * tests * small fixes * config test fix
This commit is contained in:
@@ -8,7 +8,6 @@ proto_library(
|
||||
name = "proto",
|
||||
srcs = [
|
||||
"beacon_chain_service.proto",
|
||||
"beacon_debug_service.proto",
|
||||
"events_service.proto",
|
||||
"validator_service.proto",
|
||||
],
|
||||
|
||||
234
proto/eth/service/beacon_debug_service.pb.go
generated
234
proto/eth/service/beacon_debug_service.pb.go
generated
@@ -1,234 +0,0 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.23.3
|
||||
// source: proto/eth/service/beacon_debug_service.proto
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
v1 "github.com/prysmaticlabs/prysm/v4/proto/eth/v1"
|
||||
v2 "github.com/prysmaticlabs/prysm/v4/proto/eth/v2"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
_ "google.golang.org/protobuf/types/descriptorpb"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
var File_proto_eth_service_beacon_debug_service_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_proto_eth_service_beacon_debug_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x62, 0x75, 0x67,
|
||||
0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14,
|
||||
0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x1a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f,
|
||||
0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x1a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x32,
|
||||
0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x32, 0x8c, 0x02, 0x0a, 0x0b, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x44, 0x65,
|
||||
0x62, 0x75, 0x67, 0x12, 0x86, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x6b,
|
||||
0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x73, 0x56, 0x32, 0x12, 0x16, 0x2e,
|
||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
|
||||
0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d,
|
||||
0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69,
|
||||
0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
|
||||
0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2f,
|
||||
0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x73, 0x12, 0x74, 0x0a, 0x0d,
|
||||
0x47, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x16, 0x2e,
|
||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
|
||||
0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d,
|
||||
0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69,
|
||||
0x63, 0x65, 0x44, 0x75, 0x6d, 0x70, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22,
|
||||
0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31,
|
||||
0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2f, 0x66, 0x6f, 0x72, 0x6b, 0x5f, 0x63, 0x68, 0x6f, 0x69,
|
||||
0x63, 0x65, 0x42, 0x98, 0x01, 0x0a, 0x18, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72,
|
||||
0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42,
|
||||
0x17, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x53, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68,
|
||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63,
|
||||
0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xaa,
|
||||
0x02, 0x14, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xca, 0x02, 0x14, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75,
|
||||
0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var file_proto_eth_service_beacon_debug_service_proto_goTypes = []interface{}{
|
||||
(*emptypb.Empty)(nil), // 0: google.protobuf.Empty
|
||||
(*v2.ForkChoiceHeadsResponse)(nil), // 1: ethereum.eth.v2.ForkChoiceHeadsResponse
|
||||
(*v1.ForkChoiceDump)(nil), // 2: ethereum.eth.v1.ForkChoiceDump
|
||||
}
|
||||
var file_proto_eth_service_beacon_debug_service_proto_depIdxs = []int32{
|
||||
0, // 0: ethereum.eth.service.BeaconDebug.ListForkChoiceHeadsV2:input_type -> google.protobuf.Empty
|
||||
0, // 1: ethereum.eth.service.BeaconDebug.GetForkChoice:input_type -> google.protobuf.Empty
|
||||
1, // 2: ethereum.eth.service.BeaconDebug.ListForkChoiceHeadsV2:output_type -> ethereum.eth.v2.ForkChoiceHeadsResponse
|
||||
2, // 3: ethereum.eth.service.BeaconDebug.GetForkChoice:output_type -> ethereum.eth.v1.ForkChoiceDump
|
||||
2, // [2:4] is the sub-list for method output_type
|
||||
0, // [0:2] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_proto_eth_service_beacon_debug_service_proto_init() }
|
||||
func file_proto_eth_service_beacon_debug_service_proto_init() {
|
||||
if File_proto_eth_service_beacon_debug_service_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_proto_eth_service_beacon_debug_service_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_proto_eth_service_beacon_debug_service_proto_goTypes,
|
||||
DependencyIndexes: file_proto_eth_service_beacon_debug_service_proto_depIdxs,
|
||||
}.Build()
|
||||
File_proto_eth_service_beacon_debug_service_proto = out.File
|
||||
file_proto_eth_service_beacon_debug_service_proto_rawDesc = nil
|
||||
file_proto_eth_service_beacon_debug_service_proto_goTypes = nil
|
||||
file_proto_eth_service_beacon_debug_service_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// BeaconDebugClient is the client API for BeaconDebug service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type BeaconDebugClient interface {
|
||||
ListForkChoiceHeadsV2(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v2.ForkChoiceHeadsResponse, error)
|
||||
GetForkChoice(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v1.ForkChoiceDump, error)
|
||||
}
|
||||
|
||||
type beaconDebugClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewBeaconDebugClient(cc grpc.ClientConnInterface) BeaconDebugClient {
|
||||
return &beaconDebugClient{cc}
|
||||
}
|
||||
|
||||
func (c *beaconDebugClient) ListForkChoiceHeadsV2(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v2.ForkChoiceHeadsResponse, error) {
|
||||
out := new(v2.ForkChoiceHeadsResponse)
|
||||
err := c.cc.Invoke(ctx, "/ethereum.eth.service.BeaconDebug/ListForkChoiceHeadsV2", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *beaconDebugClient) GetForkChoice(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v1.ForkChoiceDump, error) {
|
||||
out := new(v1.ForkChoiceDump)
|
||||
err := c.cc.Invoke(ctx, "/ethereum.eth.service.BeaconDebug/GetForkChoice", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// BeaconDebugServer is the server API for BeaconDebug service.
|
||||
type BeaconDebugServer interface {
|
||||
ListForkChoiceHeadsV2(context.Context, *emptypb.Empty) (*v2.ForkChoiceHeadsResponse, error)
|
||||
GetForkChoice(context.Context, *emptypb.Empty) (*v1.ForkChoiceDump, error)
|
||||
}
|
||||
|
||||
// UnimplementedBeaconDebugServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedBeaconDebugServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedBeaconDebugServer) ListForkChoiceHeadsV2(context.Context, *emptypb.Empty) (*v2.ForkChoiceHeadsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListForkChoiceHeadsV2 not implemented")
|
||||
}
|
||||
func (*UnimplementedBeaconDebugServer) GetForkChoice(context.Context, *emptypb.Empty) (*v1.ForkChoiceDump, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetForkChoice not implemented")
|
||||
}
|
||||
|
||||
func RegisterBeaconDebugServer(s *grpc.Server, srv BeaconDebugServer) {
|
||||
s.RegisterService(&_BeaconDebug_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _BeaconDebug_ListForkChoiceHeadsV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(emptypb.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BeaconDebugServer).ListForkChoiceHeadsV2(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/ethereum.eth.service.BeaconDebug/ListForkChoiceHeadsV2",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BeaconDebugServer).ListForkChoiceHeadsV2(ctx, req.(*emptypb.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BeaconDebug_GetForkChoice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(emptypb.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BeaconDebugServer).GetForkChoice(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/ethereum.eth.service.BeaconDebug/GetForkChoice",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BeaconDebugServer).GetForkChoice(ctx, req.(*emptypb.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _BeaconDebug_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "ethereum.eth.service.BeaconDebug",
|
||||
HandlerType: (*BeaconDebugServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListForkChoiceHeadsV2",
|
||||
Handler: _BeaconDebug_ListForkChoiceHeadsV2_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetForkChoice",
|
||||
Handler: _BeaconDebug_GetForkChoice_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "proto/eth/service/beacon_debug_service.proto",
|
||||
}
|
||||
@@ -1,220 +0,0 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: proto/eth/service/beacon_debug_service.proto
|
||||
|
||||
/*
|
||||
Package service is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
|
||||
github_com_prysmaticlabs_prysm_v4_consensus_types_primitives "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// Suppress "imported and not used" errors
|
||||
var _ codes.Code
|
||||
var _ io.Reader
|
||||
var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = metadata.Join
|
||||
var _ = github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch(0)
|
||||
var _ = emptypb.Empty{}
|
||||
|
||||
func request_BeaconDebug_ListForkChoiceHeadsV2_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconDebugClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq emptypb.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := client.ListForkChoiceHeadsV2(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_BeaconDebug_ListForkChoiceHeadsV2_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconDebugServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq emptypb.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := server.ListForkChoiceHeadsV2(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_BeaconDebug_GetForkChoice_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconDebugClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq emptypb.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := client.GetForkChoice(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_BeaconDebug_GetForkChoice_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconDebugServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq emptypb.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := server.GetForkChoice(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterBeaconDebugHandlerServer registers the http handlers for service BeaconDebug to "mux".
|
||||
// UnaryRPC :call BeaconDebugServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBeaconDebugHandlerFromEndpoint instead.
|
||||
func RegisterBeaconDebugHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BeaconDebugServer) error {
|
||||
|
||||
mux.Handle("GET", pattern_BeaconDebug_ListForkChoiceHeadsV2_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.service.BeaconDebug/ListForkChoiceHeadsV2")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_BeaconDebug_ListForkChoiceHeadsV2_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_BeaconDebug_ListForkChoiceHeadsV2_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_BeaconDebug_GetForkChoice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.service.BeaconDebug/GetForkChoice")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_BeaconDebug_GetForkChoice_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_BeaconDebug_GetForkChoice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RegisterBeaconDebugHandlerFromEndpoint is same as RegisterBeaconDebugHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterBeaconDebugHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||
conn, err := grpc.Dial(endpoint, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
|
||||
return RegisterBeaconDebugHandler(ctx, mux, conn)
|
||||
}
|
||||
|
||||
// RegisterBeaconDebugHandler registers the http handlers for service BeaconDebug to "mux".
|
||||
// The handlers forward requests to the grpc endpoint over "conn".
|
||||
func RegisterBeaconDebugHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
||||
return RegisterBeaconDebugHandlerClient(ctx, mux, NewBeaconDebugClient(conn))
|
||||
}
|
||||
|
||||
// RegisterBeaconDebugHandlerClient registers the http handlers for service BeaconDebug
|
||||
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BeaconDebugClient".
|
||||
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BeaconDebugClient"
|
||||
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||
// "BeaconDebugClient" to call the correct interceptors.
|
||||
func RegisterBeaconDebugHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BeaconDebugClient) error {
|
||||
|
||||
mux.Handle("GET", pattern_BeaconDebug_ListForkChoiceHeadsV2_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.service.BeaconDebug/ListForkChoiceHeadsV2")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_BeaconDebug_ListForkChoiceHeadsV2_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_BeaconDebug_ListForkChoiceHeadsV2_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_BeaconDebug_GetForkChoice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.service.BeaconDebug/GetForkChoice")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_BeaconDebug_GetForkChoice_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_BeaconDebug_GetForkChoice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_BeaconDebug_ListForkChoiceHeadsV2_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"internal", "eth", "v2", "debug", "beacon", "heads"}, ""))
|
||||
|
||||
pattern_BeaconDebug_GetForkChoice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"internal", "eth", "v1", "debug", "fork_choice"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_BeaconDebug_ListForkChoiceHeadsV2_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_BeaconDebug_GetForkChoice_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
@@ -1,55 +0,0 @@
|
||||
// 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_chain.proto";
|
||||
import "proto/eth/v2/beacon_state.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 = "BeaconDebugServiceProto";
|
||||
option java_package = "org.ethereum.eth.service";
|
||||
option php_namespace = "Ethereum\\Eth\\Service";
|
||||
|
||||
// Beacon chain debug API
|
||||
//
|
||||
// The beacon chain debug API is a set of endpoints to debug chain and shouldn't be exposed publicly.
|
||||
//
|
||||
// This service is defined in the upstream Ethereum consensus APIs repository (beacon-apis/apis/debug).
|
||||
service BeaconDebug {
|
||||
// ListForkChoiceHeadsV2 retrieves all possible chain heads (leaves of fork choice tree).
|
||||
//
|
||||
// Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.3.0#/Debug/getDebugChainHeadsV2
|
||||
rpc ListForkChoiceHeadsV2(google.protobuf.Empty) returns (v2.ForkChoiceHeadsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/internal/eth/v2/debug/beacon/heads"
|
||||
};
|
||||
}
|
||||
|
||||
// GetForkChoice returns a dump fork choice store.
|
||||
//
|
||||
// This function is not a part of the official Beacon APIs.
|
||||
rpc GetForkChoice(google.protobuf.Empty) returns (v1.ForkChoiceDump) {
|
||||
option (google.api.http) = {
|
||||
get: "/internal/eth/v1/debug/fork_choice"
|
||||
};
|
||||
}
|
||||
}
|
||||
508
proto/eth/v1/beacon_chain.pb.go
generated
508
proto/eth/v1/beacon_chain.pb.go
generated
@@ -10,7 +10,6 @@ import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
github_com_prysmaticlabs_prysm_v4_consensus_types_primitives "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives"
|
||||
_ "github.com/prysmaticlabs/prysm/v4/proto/eth/ext"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
@@ -24,55 +23,6 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type ForkChoiceNodeValidity int32
|
||||
|
||||
const (
|
||||
ForkChoiceNodeValidity_VALID ForkChoiceNodeValidity = 0
|
||||
ForkChoiceNodeValidity_INVALID ForkChoiceNodeValidity = 1
|
||||
ForkChoiceNodeValidity_OPTIMISTIC ForkChoiceNodeValidity = 2
|
||||
)
|
||||
|
||||
// Enum value maps for ForkChoiceNodeValidity.
|
||||
var (
|
||||
ForkChoiceNodeValidity_name = map[int32]string{
|
||||
0: "VALID",
|
||||
1: "INVALID",
|
||||
2: "OPTIMISTIC",
|
||||
}
|
||||
ForkChoiceNodeValidity_value = map[string]int32{
|
||||
"VALID": 0,
|
||||
"INVALID": 1,
|
||||
"OPTIMISTIC": 2,
|
||||
}
|
||||
)
|
||||
|
||||
func (x ForkChoiceNodeValidity) Enum() *ForkChoiceNodeValidity {
|
||||
p := new(ForkChoiceNodeValidity)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x ForkChoiceNodeValidity) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (ForkChoiceNodeValidity) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_proto_eth_v1_beacon_chain_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (ForkChoiceNodeValidity) Type() protoreflect.EnumType {
|
||||
return &file_proto_eth_v1_beacon_chain_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x ForkChoiceNodeValidity) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ForkChoiceNodeValidity.Descriptor instead.
|
||||
func (ForkChoiceNodeValidity) EnumDescriptor() ([]byte, []int) {
|
||||
return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type StateRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -514,252 +464,6 @@ func (x *WeakSubjectivityData) GetStateRoot() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
type ForkChoiceDump struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
JustifiedCheckpoint *Checkpoint `protobuf:"bytes,1,opt,name=justified_checkpoint,json=justifiedCheckpoint,proto3" json:"justified_checkpoint,omitempty"`
|
||||
FinalizedCheckpoint *Checkpoint `protobuf:"bytes,2,opt,name=finalized_checkpoint,json=finalizedCheckpoint,proto3" json:"finalized_checkpoint,omitempty"`
|
||||
UnrealizedJustifiedCheckpoint *Checkpoint `protobuf:"bytes,4,opt,name=unrealized_justified_checkpoint,json=unrealizedJustifiedCheckpoint,proto3" json:"unrealized_justified_checkpoint,omitempty"`
|
||||
UnrealizedFinalizedCheckpoint *Checkpoint `protobuf:"bytes,5,opt,name=unrealized_finalized_checkpoint,json=unrealizedFinalizedCheckpoint,proto3" json:"unrealized_finalized_checkpoint,omitempty"`
|
||||
ProposerBoostRoot []byte `protobuf:"bytes,6,opt,name=proposer_boost_root,json=proposerBoostRoot,proto3" json:"proposer_boost_root,omitempty" ssz-size:"32"`
|
||||
PreviousProposerBoostRoot []byte `protobuf:"bytes,7,opt,name=previous_proposer_boost_root,json=previousProposerBoostRoot,proto3" json:"previous_proposer_boost_root,omitempty" ssz-size:"32"`
|
||||
HeadRoot []byte `protobuf:"bytes,8,opt,name=head_root,json=headRoot,proto3" json:"head_root,omitempty" ssz-size:"32"`
|
||||
ForkChoiceNodes []*ForkChoiceNode `protobuf:"bytes,9,rep,name=fork_choice_nodes,json=forkChoiceNodes,proto3" json:"fork_choice_nodes,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ForkChoiceDump) Reset() {
|
||||
*x = ForkChoiceDump{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ForkChoiceDump) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ForkChoiceDump) ProtoMessage() {}
|
||||
|
||||
func (x *ForkChoiceDump) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ForkChoiceDump.ProtoReflect.Descriptor instead.
|
||||
func (*ForkChoiceDump) Descriptor() ([]byte, []int) {
|
||||
return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *ForkChoiceDump) GetJustifiedCheckpoint() *Checkpoint {
|
||||
if x != nil {
|
||||
return x.JustifiedCheckpoint
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ForkChoiceDump) GetFinalizedCheckpoint() *Checkpoint {
|
||||
if x != nil {
|
||||
return x.FinalizedCheckpoint
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ForkChoiceDump) GetUnrealizedJustifiedCheckpoint() *Checkpoint {
|
||||
if x != nil {
|
||||
return x.UnrealizedJustifiedCheckpoint
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ForkChoiceDump) GetUnrealizedFinalizedCheckpoint() *Checkpoint {
|
||||
if x != nil {
|
||||
return x.UnrealizedFinalizedCheckpoint
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ForkChoiceDump) GetProposerBoostRoot() []byte {
|
||||
if x != nil {
|
||||
return x.ProposerBoostRoot
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ForkChoiceDump) GetPreviousProposerBoostRoot() []byte {
|
||||
if x != nil {
|
||||
return x.PreviousProposerBoostRoot
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ForkChoiceDump) GetHeadRoot() []byte {
|
||||
if x != nil {
|
||||
return x.HeadRoot
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ForkChoiceDump) GetForkChoiceNodes() []*ForkChoiceNode {
|
||||
if x != nil {
|
||||
return x.ForkChoiceNodes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ForkChoiceNode struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Slot github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Slot `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.Slot"`
|
||||
BlockRoot []byte `protobuf:"bytes,2,opt,name=block_root,json=blockRoot,proto3" json:"block_root,omitempty" ssz-size:"32"`
|
||||
ParentRoot []byte `protobuf:"bytes,3,opt,name=parent_root,json=parentRoot,proto3" json:"parent_root,omitempty" ssz-size:"32"`
|
||||
JustifiedEpoch github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch `protobuf:"varint,4,opt,name=justified_epoch,json=justifiedEpoch,proto3" json:"justified_epoch,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.Epoch"`
|
||||
FinalizedEpoch github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch `protobuf:"varint,5,opt,name=finalized_epoch,json=finalizedEpoch,proto3" json:"finalized_epoch,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.Epoch"`
|
||||
UnrealizedJustifiedEpoch github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch `protobuf:"varint,6,opt,name=unrealized_justified_epoch,json=unrealizedJustifiedEpoch,proto3" json:"unrealized_justified_epoch,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.Epoch"`
|
||||
UnrealizedFinalizedEpoch github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch `protobuf:"varint,7,opt,name=unrealized_finalized_epoch,json=unrealizedFinalizedEpoch,proto3" json:"unrealized_finalized_epoch,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.Epoch"`
|
||||
Balance uint64 `protobuf:"varint,8,opt,name=balance,proto3" json:"balance,omitempty"`
|
||||
Weight uint64 `protobuf:"varint,9,opt,name=weight,proto3" json:"weight,omitempty"`
|
||||
ExecutionOptimistic bool `protobuf:"varint,10,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"`
|
||||
ExecutionBlockHash []byte `protobuf:"bytes,11,opt,name=execution_block_hash,json=executionBlockHash,proto3" json:"execution_block_hash,omitempty" ssz-size:"32"`
|
||||
Timestamp uint64 `protobuf:"varint,12,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
||||
Validity ForkChoiceNodeValidity `protobuf:"varint,13,opt,name=validity,proto3,enum=ethereum.eth.v1.ForkChoiceNodeValidity" json:"validity,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ForkChoiceNode) Reset() {
|
||||
*x = ForkChoiceNode{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ForkChoiceNode) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ForkChoiceNode) ProtoMessage() {}
|
||||
|
||||
func (x *ForkChoiceNode) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ForkChoiceNode.ProtoReflect.Descriptor instead.
|
||||
func (*ForkChoiceNode) Descriptor() ([]byte, []int) {
|
||||
return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *ForkChoiceNode) GetSlot() github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Slot {
|
||||
if x != nil {
|
||||
return x.Slot
|
||||
}
|
||||
return github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Slot(0)
|
||||
}
|
||||
|
||||
func (x *ForkChoiceNode) GetBlockRoot() []byte {
|
||||
if x != nil {
|
||||
return x.BlockRoot
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ForkChoiceNode) GetParentRoot() []byte {
|
||||
if x != nil {
|
||||
return x.ParentRoot
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ForkChoiceNode) GetJustifiedEpoch() github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch {
|
||||
if x != nil {
|
||||
return x.JustifiedEpoch
|
||||
}
|
||||
return github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch(0)
|
||||
}
|
||||
|
||||
func (x *ForkChoiceNode) GetFinalizedEpoch() github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch {
|
||||
if x != nil {
|
||||
return x.FinalizedEpoch
|
||||
}
|
||||
return github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch(0)
|
||||
}
|
||||
|
||||
func (x *ForkChoiceNode) GetUnrealizedJustifiedEpoch() github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch {
|
||||
if x != nil {
|
||||
return x.UnrealizedJustifiedEpoch
|
||||
}
|
||||
return github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch(0)
|
||||
}
|
||||
|
||||
func (x *ForkChoiceNode) GetUnrealizedFinalizedEpoch() github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch {
|
||||
if x != nil {
|
||||
return x.UnrealizedFinalizedEpoch
|
||||
}
|
||||
return github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch(0)
|
||||
}
|
||||
|
||||
func (x *ForkChoiceNode) GetBalance() uint64 {
|
||||
if x != nil {
|
||||
return x.Balance
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ForkChoiceNode) GetWeight() uint64 {
|
||||
if x != nil {
|
||||
return x.Weight
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ForkChoiceNode) GetExecutionOptimistic() bool {
|
||||
if x != nil {
|
||||
return x.ExecutionOptimistic
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *ForkChoiceNode) GetExecutionBlockHash() []byte {
|
||||
if x != nil {
|
||||
return x.ExecutionBlockHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ForkChoiceNode) GetTimestamp() uint64 {
|
||||
if x != nil {
|
||||
return x.Timestamp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ForkChoiceNode) GetValidity() ForkChoiceNodeValidity {
|
||||
if x != nil {
|
||||
return x.Validity
|
||||
}
|
||||
return ForkChoiceNodeValidity_VALID
|
||||
}
|
||||
|
||||
var File_proto_eth_v1_beacon_chain_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_proto_eth_v1_beacon_chain_proto_rawDesc = []byte{
|
||||
@@ -825,118 +529,15 @@ var file_proto_eth_v1_beacon_chain_proto_rawDesc = []byte{
|
||||
0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0c, 0x77, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b,
|
||||
0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72,
|
||||
0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65,
|
||||
0x52, 0x6f, 0x6f, 0x74, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xf3, 0x04, 0x0a, 0x0e, 0x46, 0x6f, 0x72,
|
||||
0x6b, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x4e, 0x0a, 0x14, 0x6a,
|
||||
0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f,
|
||||
0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65,
|
||||
0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63,
|
||||
0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x13, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65,
|
||||
0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x14, 0x66,
|
||||
0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f,
|
||||
0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65,
|
||||
0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63,
|
||||
0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65,
|
||||
0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x63, 0x0a, 0x1f, 0x75,
|
||||
0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66,
|
||||
0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
|
||||
0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e,
|
||||
0x74, 0x52, 0x1d, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4a, 0x75, 0x73,
|
||||
0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74,
|
||||
0x12, 0x63, 0x0a, 0x1f, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x66,
|
||||
0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f,
|
||||
0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65,
|
||||
0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63,
|
||||
0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1d, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x7a,
|
||||
0x65, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b,
|
||||
0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x13, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65,
|
||||
0x72, 0x5f, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70,
|
||||
0x6f, 0x73, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x47, 0x0a,
|
||||
0x1c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73,
|
||||
0x65, 0x72, 0x5f, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x07, 0x20,
|
||||
0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x19, 0x70, 0x72, 0x65,
|
||||
0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x42, 0x6f, 0x6f,
|
||||
0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x72,
|
||||
0x6f, 0x6f, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33,
|
||||
0x32, 0x52, 0x08, 0x68, 0x65, 0x61, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x4b, 0x0a, 0x11, 0x66,
|
||||
0x6f, 0x72, 0x6b, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73,
|
||||
0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75,
|
||||
0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f,
|
||||
0x69, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0f, 0x66, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f,
|
||||
0x69, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0xad,
|
||||
0x07, 0x0a, 0x0e, 0x46, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42,
|
||||
0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x52, 0x6f, 0x6f, 0x74, 0x3a, 0x02, 0x18, 0x01, 0x42, 0x7d, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e,
|
||||
0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42,
|
||||
0x10, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72,
|
||||
0x79, 0x73, 0x6d, 0x2f, 0x76, 0x34, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73,
|
||||
0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65,
|
||||
0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a,
|
||||
0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
|
||||
0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x52,
|
||||
0x6f, 0x6f, 0x74, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f,
|
||||
0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32,
|
||||
0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x6f, 0x0a, 0x0f,
|
||||
0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75,
|
||||
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c,
|
||||
0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x34, 0x2f, 0x63, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69,
|
||||
0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x0e, 0x6a,
|
||||
0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x6f, 0x0a,
|
||||
0x0f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, 0x67, 0x69, 0x74, 0x68,
|
||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63,
|
||||
0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x34, 0x2f, 0x63, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72,
|
||||
0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x0e,
|
||||
0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x84,
|
||||
0x01, 0x0a, 0x1a, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x6a, 0x75,
|
||||
0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x06, 0x20,
|
||||
0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62,
|
||||
0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x34, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69,
|
||||
0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x18, 0x75, 0x6e, 0x72,
|
||||
0x65, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64,
|
||||
0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x84, 0x01, 0x0a, 0x1a, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c,
|
||||
0x69, 0x7a, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x65,
|
||||
0x70, 0x6f, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42,
|
||||
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d,
|
||||
0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76,
|
||||
0x34, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65,
|
||||
0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f,
|
||||
0x63, 0x68, 0x52, 0x18, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x46, 0x69,
|
||||
0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x62,
|
||||
0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74,
|
||||
0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x31,
|
||||
0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69,
|
||||
0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78,
|
||||
0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69,
|
||||
0x63, 0x12, 0x38, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x42,
|
||||
0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x43, 0x0a, 0x08, 0x76, 0x61, 0x6c,
|
||||
0x69, 0x64, 0x69, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x65, 0x74,
|
||||
0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f,
|
||||
0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x69,
|
||||
0x64, 0x69, 0x74, 0x79, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x2a, 0x40,
|
||||
0x0a, 0x16, 0x46, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x56, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x41, 0x4c, 0x49,
|
||||
0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x01,
|
||||
0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x54, 0x49, 0x4d, 0x49, 0x53, 0x54, 0x49, 0x43, 0x10, 0x02,
|
||||
0x42, 0x7d, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d,
|
||||
0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43,
|
||||
0x68, 0x61, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74,
|
||||
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69,
|
||||
0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x34, 0x2f, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0xaa, 0x02, 0x0f, 0x45, 0x74,
|
||||
0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f,
|
||||
0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x79, 0x73, 0x6d, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68,
|
||||
0x2f, 0x76, 0x31, 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45,
|
||||
0x74, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d,
|
||||
0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -951,46 +552,36 @@ func file_proto_eth_v1_beacon_chain_proto_rawDescGZIP() []byte {
|
||||
return file_proto_eth_v1_beacon_chain_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_proto_eth_v1_beacon_chain_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_proto_eth_v1_beacon_chain_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||
var file_proto_eth_v1_beacon_chain_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||
var file_proto_eth_v1_beacon_chain_proto_goTypes = []interface{}{
|
||||
(ForkChoiceNodeValidity)(0), // 0: ethereum.eth.v1.ForkChoiceNodeValidity
|
||||
(*StateRequest)(nil), // 1: ethereum.eth.v1.StateRequest
|
||||
(*AttesterSlashingsPoolResponse)(nil), // 2: ethereum.eth.v1.AttesterSlashingsPoolResponse
|
||||
(*ProposerSlashingPoolResponse)(nil), // 3: ethereum.eth.v1.ProposerSlashingPoolResponse
|
||||
(*ForkScheduleResponse)(nil), // 4: ethereum.eth.v1.ForkScheduleResponse
|
||||
(*SpecResponse)(nil), // 5: ethereum.eth.v1.SpecResponse
|
||||
(*DepositContractResponse)(nil), // 6: ethereum.eth.v1.DepositContractResponse
|
||||
(*DepositContract)(nil), // 7: ethereum.eth.v1.DepositContract
|
||||
(*WeakSubjectivityResponse)(nil), // 8: ethereum.eth.v1.WeakSubjectivityResponse
|
||||
(*WeakSubjectivityData)(nil), // 9: ethereum.eth.v1.WeakSubjectivityData
|
||||
(*ForkChoiceDump)(nil), // 10: ethereum.eth.v1.ForkChoiceDump
|
||||
(*ForkChoiceNode)(nil), // 11: ethereum.eth.v1.ForkChoiceNode
|
||||
nil, // 12: ethereum.eth.v1.SpecResponse.DataEntry
|
||||
(*AttesterSlashing)(nil), // 13: ethereum.eth.v1.AttesterSlashing
|
||||
(*ProposerSlashing)(nil), // 14: ethereum.eth.v1.ProposerSlashing
|
||||
(*Fork)(nil), // 15: ethereum.eth.v1.Fork
|
||||
(*Checkpoint)(nil), // 16: ethereum.eth.v1.Checkpoint
|
||||
(*StateRequest)(nil), // 0: ethereum.eth.v1.StateRequest
|
||||
(*AttesterSlashingsPoolResponse)(nil), // 1: ethereum.eth.v1.AttesterSlashingsPoolResponse
|
||||
(*ProposerSlashingPoolResponse)(nil), // 2: ethereum.eth.v1.ProposerSlashingPoolResponse
|
||||
(*ForkScheduleResponse)(nil), // 3: ethereum.eth.v1.ForkScheduleResponse
|
||||
(*SpecResponse)(nil), // 4: ethereum.eth.v1.SpecResponse
|
||||
(*DepositContractResponse)(nil), // 5: ethereum.eth.v1.DepositContractResponse
|
||||
(*DepositContract)(nil), // 6: ethereum.eth.v1.DepositContract
|
||||
(*WeakSubjectivityResponse)(nil), // 7: ethereum.eth.v1.WeakSubjectivityResponse
|
||||
(*WeakSubjectivityData)(nil), // 8: ethereum.eth.v1.WeakSubjectivityData
|
||||
nil, // 9: ethereum.eth.v1.SpecResponse.DataEntry
|
||||
(*AttesterSlashing)(nil), // 10: ethereum.eth.v1.AttesterSlashing
|
||||
(*ProposerSlashing)(nil), // 11: ethereum.eth.v1.ProposerSlashing
|
||||
(*Fork)(nil), // 12: ethereum.eth.v1.Fork
|
||||
(*Checkpoint)(nil), // 13: ethereum.eth.v1.Checkpoint
|
||||
}
|
||||
var file_proto_eth_v1_beacon_chain_proto_depIdxs = []int32{
|
||||
13, // 0: ethereum.eth.v1.AttesterSlashingsPoolResponse.data:type_name -> ethereum.eth.v1.AttesterSlashing
|
||||
14, // 1: ethereum.eth.v1.ProposerSlashingPoolResponse.data:type_name -> ethereum.eth.v1.ProposerSlashing
|
||||
15, // 2: ethereum.eth.v1.ForkScheduleResponse.data:type_name -> ethereum.eth.v1.Fork
|
||||
12, // 3: ethereum.eth.v1.SpecResponse.data:type_name -> ethereum.eth.v1.SpecResponse.DataEntry
|
||||
7, // 4: ethereum.eth.v1.DepositContractResponse.data:type_name -> ethereum.eth.v1.DepositContract
|
||||
9, // 5: ethereum.eth.v1.WeakSubjectivityResponse.data:type_name -> ethereum.eth.v1.WeakSubjectivityData
|
||||
16, // 6: ethereum.eth.v1.WeakSubjectivityData.ws_checkpoint:type_name -> ethereum.eth.v1.Checkpoint
|
||||
16, // 7: ethereum.eth.v1.ForkChoiceDump.justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint
|
||||
16, // 8: ethereum.eth.v1.ForkChoiceDump.finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint
|
||||
16, // 9: ethereum.eth.v1.ForkChoiceDump.unrealized_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint
|
||||
16, // 10: ethereum.eth.v1.ForkChoiceDump.unrealized_finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint
|
||||
11, // 11: ethereum.eth.v1.ForkChoiceDump.fork_choice_nodes:type_name -> ethereum.eth.v1.ForkChoiceNode
|
||||
0, // 12: ethereum.eth.v1.ForkChoiceNode.validity:type_name -> ethereum.eth.v1.ForkChoiceNodeValidity
|
||||
13, // [13:13] is the sub-list for method output_type
|
||||
13, // [13:13] is the sub-list for method input_type
|
||||
13, // [13:13] is the sub-list for extension type_name
|
||||
13, // [13:13] is the sub-list for extension extendee
|
||||
0, // [0:13] is the sub-list for field type_name
|
||||
10, // 0: ethereum.eth.v1.AttesterSlashingsPoolResponse.data:type_name -> ethereum.eth.v1.AttesterSlashing
|
||||
11, // 1: ethereum.eth.v1.ProposerSlashingPoolResponse.data:type_name -> ethereum.eth.v1.ProposerSlashing
|
||||
12, // 2: ethereum.eth.v1.ForkScheduleResponse.data:type_name -> ethereum.eth.v1.Fork
|
||||
9, // 3: ethereum.eth.v1.SpecResponse.data:type_name -> ethereum.eth.v1.SpecResponse.DataEntry
|
||||
6, // 4: ethereum.eth.v1.DepositContractResponse.data:type_name -> ethereum.eth.v1.DepositContract
|
||||
8, // 5: ethereum.eth.v1.WeakSubjectivityResponse.data:type_name -> ethereum.eth.v1.WeakSubjectivityData
|
||||
13, // 6: ethereum.eth.v1.WeakSubjectivityData.ws_checkpoint:type_name -> ethereum.eth.v1.Checkpoint
|
||||
7, // [7:7] is the sub-list for method output_type
|
||||
7, // [7:7] is the sub-list for method input_type
|
||||
7, // [7:7] is the sub-list for extension type_name
|
||||
7, // [7:7] is the sub-list for extension extendee
|
||||
0, // [0:7] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_proto_eth_v1_beacon_chain_proto_init() }
|
||||
@@ -1110,44 +701,19 @@ func file_proto_eth_v1_beacon_chain_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_eth_v1_beacon_chain_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ForkChoiceDump); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_eth_v1_beacon_chain_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ForkChoiceNode); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_proto_eth_v1_beacon_chain_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 12,
|
||||
NumEnums: 0,
|
||||
NumMessages: 10,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_proto_eth_v1_beacon_chain_proto_goTypes,
|
||||
DependencyIndexes: file_proto_eth_v1_beacon_chain_proto_depIdxs,
|
||||
EnumInfos: file_proto_eth_v1_beacon_chain_proto_enumTypes,
|
||||
MessageInfos: file_proto_eth_v1_beacon_chain_proto_msgTypes,
|
||||
}.Build()
|
||||
File_proto_eth_v1_beacon_chain_proto = out.File
|
||||
|
||||
@@ -86,59 +86,3 @@ message WeakSubjectivityData {
|
||||
ethereum.eth.v1.Checkpoint ws_checkpoint = 1;
|
||||
bytes state_root = 2;
|
||||
}
|
||||
|
||||
message ForkChoiceDump {
|
||||
reserved 3;
|
||||
// Latest justified checkpoint in forkchoice store.
|
||||
Checkpoint justified_checkpoint = 1;
|
||||
// Latest finalized checkpoint in forkchoice store.
|
||||
Checkpoint finalized_checkpoint = 2;
|
||||
// Unrealized justified checkpoint in forkchoice store.
|
||||
Checkpoint unrealized_justified_checkpoint = 4;
|
||||
// Unrealized finalized checkpoint in forkchoice store.
|
||||
Checkpoint unrealized_finalized_checkpoint = 5;
|
||||
// Proposer Boost Root in forkchoice store.
|
||||
bytes proposer_boost_root = 6 [(ethereum.eth.ext.ssz_size) = "32"];
|
||||
// Previous proposer Boost Root in forkchoice store.
|
||||
bytes previous_proposer_boost_root = 7 [(ethereum.eth.ext.ssz_size) = "32"];
|
||||
// Head root in forkchoice store.
|
||||
bytes head_root = 8 [(ethereum.eth.ext.ssz_size) = "32"];
|
||||
|
||||
// The list of the forkchoice nodes in store.
|
||||
repeated ForkChoiceNode fork_choice_nodes = 9;
|
||||
}
|
||||
|
||||
message ForkChoiceNode {
|
||||
// Slot of the forkchoice node.
|
||||
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.Slot"];
|
||||
// Root of the forkchoice node.
|
||||
bytes block_root = 2 [(ethereum.eth.ext.ssz_size) = "32"];
|
||||
// Parent root of the forkchoice node.
|
||||
bytes parent_root = 3 [(ethereum.eth.ext.ssz_size) = "32"];
|
||||
// Justified epoch of the current forkchoice node.
|
||||
uint64 justified_epoch = 4 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.Epoch"];
|
||||
// finalized epoch of the current forkchoice node.
|
||||
uint64 finalized_epoch = 5 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.Epoch"];
|
||||
// Unrealized justified epoch of the current forkchoice node.
|
||||
uint64 unrealized_justified_epoch = 6 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.Epoch"];
|
||||
// Unrealized finalized epoch of the current forkchoice node.
|
||||
uint64 unrealized_finalized_epoch = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.Epoch"];
|
||||
// Current balance of the current forkchoice node.
|
||||
uint64 balance = 8;
|
||||
// Current weight of the current forkchoice node.
|
||||
uint64 weight = 9;
|
||||
// Optimistic status of the current forkchoice node.
|
||||
bool execution_optimistic = 10;
|
||||
// Execution payload block hash of the current forkchoice node.
|
||||
bytes execution_block_hash = 11 [(ethereum.eth.ext.ssz_size) = "32"];
|
||||
// Timestamp when the node was inserted
|
||||
uint64 timestamp = 12;
|
||||
// Validity status of the node.
|
||||
ForkChoiceNodeValidity validity = 13;
|
||||
}
|
||||
|
||||
enum ForkChoiceNodeValidity {
|
||||
VALID = 0;
|
||||
INVALID = 1;
|
||||
OPTIMISTIC = 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user