Checkin Generated Protobufs and Proto Files for EthereumAPIs (#8973)

* generated

* add ignore

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
Raul Jordan
2021-06-02 15:20:11 -05:00
committed by GitHub
parent 2b6c7e7b37
commit 1d2fc60ba7
59 changed files with 43484 additions and 0 deletions

201
proto/eth/LICENSE Normal file
View File

@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@@ -0,0 +1 @@
# gazelle:ignore

147
proto/eth/ext/options.pb.go generated Executable file
View File

@@ -0,0 +1,147 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.15.8
// source: proto/eth/ext/options.proto
package ext
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
)
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)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
var file_proto_eth_ext_options_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*string)(nil),
Field: 50000,
Name: "ethereum.eth.ext.cast_type",
Tag: "bytes,50000,opt,name=cast_type",
Filename: "proto/eth/ext/options.proto",
},
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*string)(nil),
Field: 50001,
Name: "ethereum.eth.ext.ssz_size",
Tag: "bytes,50001,opt,name=ssz_size",
Filename: "proto/eth/ext/options.proto",
},
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*string)(nil),
Field: 50002,
Name: "ethereum.eth.ext.ssz_max",
Tag: "bytes,50002,opt,name=ssz_max",
Filename: "proto/eth/ext/options.proto",
},
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*string)(nil),
Field: 50003,
Name: "ethereum.eth.ext.spec_name",
Tag: "bytes,50003,opt,name=spec_name",
Filename: "proto/eth/ext/options.proto",
},
}
// Extension fields to descriptorpb.FieldOptions.
var (
// optional string cast_type = 50000;
E_CastType = &file_proto_eth_ext_options_proto_extTypes[0]
// optional string ssz_size = 50001;
E_SszSize = &file_proto_eth_ext_options_proto_extTypes[1]
// optional string ssz_max = 50002;
E_SszMax = &file_proto_eth_ext_options_proto_extTypes[2]
// optional string spec_name = 50003;
E_SpecName = &file_proto_eth_ext_options_proto_extTypes[3]
)
var File_proto_eth_ext_options_proto protoreflect.FileDescriptor
var file_proto_eth_ext_options_proto_rawDesc = []byte{
0x0a, 0x1b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x65, 0x78, 0x74, 0x2f,
0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x65,
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x78, 0x74, 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, 0x3a, 0x3c, 0x0a, 0x09, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd0, 0x86,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x3a,
0x3a, 0x0a, 0x08, 0x73, 0x73, 0x7a, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69,
0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd1, 0x86, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x73, 0x73, 0x7a, 0x53, 0x69, 0x7a, 0x65, 0x3a, 0x38, 0x0a, 0x07, 0x73,
0x73, 0x7a, 0x5f, 0x6d, 0x61, 0x78, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd2, 0x86, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73,
0x73, 0x7a, 0x4d, 0x61, 0x78, 0x3a, 0x3c, 0x0a, 0x09, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x18, 0xd3, 0x86, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x70, 0x65, 0x63, 0x4e,
0x61, 0x6d, 0x65, 0x42, 0x7b, 0x0a, 0x14, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72,
0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x78, 0x74, 0x42, 0x0c, 0x4f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 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, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x61, 0x70,
0x69, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x65, 0x78, 0x74, 0xaa, 0x02, 0x10, 0x45, 0x74, 0x68,
0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x65, 0x78, 0x74, 0xca, 0x02, 0x10,
0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x65, 0x78, 0x74,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var file_proto_eth_ext_options_proto_goTypes = []interface{}{
(*descriptorpb.FieldOptions)(nil), // 0: google.protobuf.FieldOptions
}
var file_proto_eth_ext_options_proto_depIdxs = []int32{
0, // 0: ethereum.eth.ext.cast_type:extendee -> google.protobuf.FieldOptions
0, // 1: ethereum.eth.ext.ssz_size:extendee -> google.protobuf.FieldOptions
0, // 2: ethereum.eth.ext.ssz_max:extendee -> google.protobuf.FieldOptions
0, // 3: ethereum.eth.ext.spec_name:extendee -> google.protobuf.FieldOptions
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
0, // [0:4] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_proto_eth_ext_options_proto_init() }
func file_proto_eth_ext_options_proto_init() {
if File_proto_eth_ext_options_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_proto_eth_ext_options_proto_rawDesc,
NumEnums: 0,
NumMessages: 0,
NumExtensions: 4,
NumServices: 0,
},
GoTypes: file_proto_eth_ext_options_proto_goTypes,
DependencyIndexes: file_proto_eth_ext_options_proto_depIdxs,
ExtensionInfos: file_proto_eth_ext_options_proto_extTypes,
}.Build()
File_proto_eth_ext_options_proto = out.File
file_proto_eth_ext_options_proto_rawDesc = nil
file_proto_eth_ext_options_proto_goTypes = nil
file_proto_eth_ext_options_proto_depIdxs = nil
}

View File

@@ -0,0 +1,32 @@
// 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.ext;
import "google/protobuf/descriptor.proto";
option csharp_namespace = "Ethereum.Eth.ext";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/ext";
option java_multiple_files = true;
option java_outer_classname = "OptionsProto";
option java_package = "org.ethereum.eth.ext";
option php_namespace = "Ethereum\\Eth\\ext";
extend google.protobuf.FieldOptions {
string cast_type = 50000;
string ssz_size = 50001;
string ssz_max = 50002;
string spec_name = 50003;
}

1
proto/eth/v1/BUILD.bazel Normal file
View File

@@ -0,0 +1 @@
# gazelle:ignore

4
proto/eth/v1/README.md Normal file
View File

@@ -0,0 +1,4 @@
# gRPC Gateway
This package is contains generated files for applications that wish to use eth/v1alpha as a
[gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway).

550
proto/eth/v1/attestation.pb.go generated Executable file
View File

@@ -0,0 +1,550 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.15.8
// source: proto/eth/v1/attestation.proto
package v1
import (
proto "github.com/golang/protobuf/proto"
_ "github.com/golang/protobuf/protoc-gen-go/descriptor"
github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
github_com_prysmaticlabs_go_bitfield "github.com/prysmaticlabs/go-bitfield"
_ "github.com/prysmaticlabs/prysm/proto/eth/ext"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
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)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type Attestation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AggregationBits github_com_prysmaticlabs_go_bitfield.Bitlist `protobuf:"bytes,1,opt,name=aggregation_bits,json=aggregationBits,proto3" json:"aggregation_bits,omitempty" cast-type:"github.com/prysmaticlabs/go-bitfield.Bitlist" ssz-max:"2048"`
Data *AttestationData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"`
}
func (x *Attestation) Reset() {
*x = Attestation{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1_attestation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Attestation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Attestation) ProtoMessage() {}
func (x *Attestation) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1_attestation_proto_msgTypes[0]
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 Attestation.ProtoReflect.Descriptor instead.
func (*Attestation) Descriptor() ([]byte, []int) {
return file_proto_eth_v1_attestation_proto_rawDescGZIP(), []int{0}
}
func (x *Attestation) GetAggregationBits() github_com_prysmaticlabs_go_bitfield.Bitlist {
if x != nil {
return x.AggregationBits
}
return github_com_prysmaticlabs_go_bitfield.Bitlist(nil)
}
func (x *Attestation) GetData() *AttestationData {
if x != nil {
return x.Data
}
return nil
}
func (x *Attestation) GetSignature() []byte {
if x != nil {
return x.Signature
}
return nil
}
type AggregateAttestationAndProof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AggregatorIndex github_com_prysmaticlabs_eth2_types.ValidatorIndex `protobuf:"varint,1,opt,name=aggregator_index,json=aggregatorIndex,proto3" json:"aggregator_index,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.ValidatorIndex"`
Aggregate *Attestation `protobuf:"bytes,3,opt,name=aggregate,proto3" json:"aggregate,omitempty"`
SelectionProof []byte `protobuf:"bytes,2,opt,name=selection_proof,json=selectionProof,proto3" json:"selection_proof,omitempty" ssz-size:"96"`
}
func (x *AggregateAttestationAndProof) Reset() {
*x = AggregateAttestationAndProof{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1_attestation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AggregateAttestationAndProof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AggregateAttestationAndProof) ProtoMessage() {}
func (x *AggregateAttestationAndProof) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1_attestation_proto_msgTypes[1]
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 AggregateAttestationAndProof.ProtoReflect.Descriptor instead.
func (*AggregateAttestationAndProof) Descriptor() ([]byte, []int) {
return file_proto_eth_v1_attestation_proto_rawDescGZIP(), []int{1}
}
func (x *AggregateAttestationAndProof) GetAggregatorIndex() github_com_prysmaticlabs_eth2_types.ValidatorIndex {
if x != nil {
return x.AggregatorIndex
}
return github_com_prysmaticlabs_eth2_types.ValidatorIndex(0)
}
func (x *AggregateAttestationAndProof) GetAggregate() *Attestation {
if x != nil {
return x.Aggregate
}
return nil
}
func (x *AggregateAttestationAndProof) GetSelectionProof() []byte {
if x != nil {
return x.SelectionProof
}
return nil
}
type SignedAggregateAttestationAndProof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Message *AggregateAttestationAndProof `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"`
}
func (x *SignedAggregateAttestationAndProof) Reset() {
*x = SignedAggregateAttestationAndProof{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1_attestation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SignedAggregateAttestationAndProof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SignedAggregateAttestationAndProof) ProtoMessage() {}
func (x *SignedAggregateAttestationAndProof) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1_attestation_proto_msgTypes[2]
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 SignedAggregateAttestationAndProof.ProtoReflect.Descriptor instead.
func (*SignedAggregateAttestationAndProof) Descriptor() ([]byte, []int) {
return file_proto_eth_v1_attestation_proto_rawDescGZIP(), []int{2}
}
func (x *SignedAggregateAttestationAndProof) GetMessage() *AggregateAttestationAndProof {
if x != nil {
return x.Message
}
return nil
}
func (x *SignedAggregateAttestationAndProof) GetSignature() []byte {
if x != nil {
return x.Signature
}
return nil
}
type AttestationData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Slot github_com_prysmaticlabs_eth2_types.Slot `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Slot"`
Index github_com_prysmaticlabs_eth2_types.CommitteeIndex `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.CommitteeIndex"`
BeaconBlockRoot []byte `protobuf:"bytes,3,opt,name=beacon_block_root,json=beaconBlockRoot,proto3" json:"beacon_block_root,omitempty" ssz-size:"32"`
Source *Checkpoint `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"`
Target *Checkpoint `protobuf:"bytes,5,opt,name=target,proto3" json:"target,omitempty"`
}
func (x *AttestationData) Reset() {
*x = AttestationData{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1_attestation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AttestationData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AttestationData) ProtoMessage() {}
func (x *AttestationData) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1_attestation_proto_msgTypes[3]
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 AttestationData.ProtoReflect.Descriptor instead.
func (*AttestationData) Descriptor() ([]byte, []int) {
return file_proto_eth_v1_attestation_proto_rawDescGZIP(), []int{3}
}
func (x *AttestationData) GetSlot() github_com_prysmaticlabs_eth2_types.Slot {
if x != nil {
return x.Slot
}
return github_com_prysmaticlabs_eth2_types.Slot(0)
}
func (x *AttestationData) GetIndex() github_com_prysmaticlabs_eth2_types.CommitteeIndex {
if x != nil {
return x.Index
}
return github_com_prysmaticlabs_eth2_types.CommitteeIndex(0)
}
func (x *AttestationData) GetBeaconBlockRoot() []byte {
if x != nil {
return x.BeaconBlockRoot
}
return nil
}
func (x *AttestationData) GetSource() *Checkpoint {
if x != nil {
return x.Source
}
return nil
}
func (x *AttestationData) GetTarget() *Checkpoint {
if x != nil {
return x.Target
}
return nil
}
type Checkpoint struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Epoch github_com_prysmaticlabs_eth2_types.Epoch `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Epoch"`
Root []byte `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty" ssz-size:"32"`
}
func (x *Checkpoint) Reset() {
*x = Checkpoint{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1_attestation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Checkpoint) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Checkpoint) ProtoMessage() {}
func (x *Checkpoint) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1_attestation_proto_msgTypes[4]
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 Checkpoint.ProtoReflect.Descriptor instead.
func (*Checkpoint) Descriptor() ([]byte, []int) {
return file_proto_eth_v1_attestation_proto_rawDescGZIP(), []int{4}
}
func (x *Checkpoint) GetEpoch() github_com_prysmaticlabs_eth2_types.Epoch {
if x != nil {
return x.Epoch
}
return github_com_prysmaticlabs_eth2_types.Epoch(0)
}
func (x *Checkpoint) GetRoot() []byte {
if x != nil {
return x.Root
}
return nil
}
var File_proto_eth_v1_attestation_proto protoreflect.FileDescriptor
var file_proto_eth_v1_attestation_proto_rawDesc = []byte{
0x0a, 0x1e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x61,
0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76,
0x31, 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, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x65,
0x78, 0x74, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0xce, 0x01, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x63, 0x0a, 0x10, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
0x62, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x38, 0x92, 0xb5, 0x18, 0x04,
0x32, 0x30, 0x34, 0x38, 0x82, 0xb5, 0x18, 0x2c, 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, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74,
0x6c, 0x69, 0x73, 0x74, 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x42, 0x69, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65,
0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x09, 0x73,
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06,
0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
0x65, 0x22, 0xee, 0x01, 0x0a, 0x1c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41,
0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f,
0x6f, 0x66, 0x12, 0x61, 0x0a, 0x10, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72,
0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5,
0x18, 0x32, 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, 0x65, 0x74, 0x68, 0x32, 0x2d,
0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49,
0x6e, 0x64, 0x65, 0x78, 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72,
0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x3a, 0x0a, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61,
0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72,
0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74,
0x65, 0x12, 0x2f, 0x0a, 0x0f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70,
0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02,
0x39, 0x36, 0x52, 0x0e, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f,
0x6f, 0x66, 0x22, 0x93, 0x01, 0x0a, 0x22, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x41, 0x67, 0x67,
0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x47, 0x0a, 0x07, 0x6d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x74, 0x68,
0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67,
0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73,
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xbf, 0x02, 0x0a, 0x0f, 0x41, 0x74, 0x74,
0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x04,
0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28,
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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79,
0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x4c,
0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82,
0xb5, 0x18, 0x32, 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, 0x65, 0x74, 0x68, 0x32,
0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65,
0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x32, 0x0a, 0x11,
0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52,
0x0f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74,
0x12, 0x33, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 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, 0x06, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 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, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x6d, 0x0a, 0x0a, 0x43, 0x68,
0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63,
0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2d, 0x82, 0xb5, 0x18, 0x29, 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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73,
0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x1a, 0x0a,
0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18,
0x02, 0x33, 0x32, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x42, 0x7b, 0x0a, 0x13, 0x6f, 0x72, 0x67,
0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31,
0x42, 0x10, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f,
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 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, 0x65,
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x2f,
0x76, 0x31, 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74,
0x68, 0x2e, 0x76, 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 (
file_proto_eth_v1_attestation_proto_rawDescOnce sync.Once
file_proto_eth_v1_attestation_proto_rawDescData = file_proto_eth_v1_attestation_proto_rawDesc
)
func file_proto_eth_v1_attestation_proto_rawDescGZIP() []byte {
file_proto_eth_v1_attestation_proto_rawDescOnce.Do(func() {
file_proto_eth_v1_attestation_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_eth_v1_attestation_proto_rawDescData)
})
return file_proto_eth_v1_attestation_proto_rawDescData
}
var file_proto_eth_v1_attestation_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_proto_eth_v1_attestation_proto_goTypes = []interface{}{
(*Attestation)(nil), // 0: ethereum.eth.v1.Attestation
(*AggregateAttestationAndProof)(nil), // 1: ethereum.eth.v1.AggregateAttestationAndProof
(*SignedAggregateAttestationAndProof)(nil), // 2: ethereum.eth.v1.SignedAggregateAttestationAndProof
(*AttestationData)(nil), // 3: ethereum.eth.v1.AttestationData
(*Checkpoint)(nil), // 4: ethereum.eth.v1.Checkpoint
}
var file_proto_eth_v1_attestation_proto_depIdxs = []int32{
3, // 0: ethereum.eth.v1.Attestation.data:type_name -> ethereum.eth.v1.AttestationData
0, // 1: ethereum.eth.v1.AggregateAttestationAndProof.aggregate:type_name -> ethereum.eth.v1.Attestation
1, // 2: ethereum.eth.v1.SignedAggregateAttestationAndProof.message:type_name -> ethereum.eth.v1.AggregateAttestationAndProof
4, // 3: ethereum.eth.v1.AttestationData.source:type_name -> ethereum.eth.v1.Checkpoint
4, // 4: ethereum.eth.v1.AttestationData.target:type_name -> ethereum.eth.v1.Checkpoint
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_proto_eth_v1_attestation_proto_init() }
func file_proto_eth_v1_attestation_proto_init() {
if File_proto_eth_v1_attestation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_proto_eth_v1_attestation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Attestation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1_attestation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AggregateAttestationAndProof); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1_attestation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SignedAggregateAttestationAndProof); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1_attestation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AttestationData); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1_attestation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Checkpoint); 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_attestation_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_proto_eth_v1_attestation_proto_goTypes,
DependencyIndexes: file_proto_eth_v1_attestation_proto_depIdxs,
MessageInfos: file_proto_eth_v1_attestation_proto_msgTypes,
}.Build()
File_proto_eth_v1_attestation_proto = out.File
file_proto_eth_v1_attestation_proto_rawDesc = nil
file_proto_eth_v1_attestation_proto_goTypes = nil
file_proto_eth_v1_attestation_proto_depIdxs = nil
}

View File

@@ -0,0 +1,3 @@
// +build ignore
package ignore

View File

@@ -0,0 +1,87 @@
// 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.v1;
import "google/protobuf/descriptor.proto";
import "proto/eth/ext/options.proto";
option csharp_namespace = "Ethereum.Eth.v1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1";
option java_multiple_files = true;
option java_outer_classname = "AttestationProto";
option java_package = "org.ethereum.eth.v1";
option php_namespace = "Ethereum\\Eth\\v1";
message Attestation {
// A bitfield representation of validator indices that have voted exactly
// the same vote and have been aggregated into this attestation.
bytes aggregation_bits = 1 [(ethereum.eth.ext.ssz_max) = "2048", (ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/go-bitfield.Bitlist"];
AttestationData data = 2;
// 96 byte BLS aggregate signature.
bytes signature = 3 [(ethereum.eth.ext.ssz_size) = "96"];
}
message AggregateAttestationAndProof {
// The aggregator index that submitted this aggregated attestation and proof.
uint64 aggregator_index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// The aggregated attestation that was submitted.
Attestation aggregate = 3;
// 96 byte selection proof signed by the aggregator, which is the signature of the slot to aggregate.
bytes selection_proof = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}
message SignedAggregateAttestationAndProof {
// The aggregated attestation and selection proof itself.
AggregateAttestationAndProof message = 1;
// 96 byte BLS aggregate signature signed by the aggregator over the message.
bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}
message AttestationData {
// Attestation data includes information on Casper the Friendly Finality Gadget's votes
// See: https://arxiv.org/pdf/1710.09437.pdf
// Slot of the attestation attesting for.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// The committee index that submitted this attestation.
uint64 index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.CommitteeIndex"];
// 32 byte root of the LMD GHOST block vote.
bytes beacon_block_root = 3 [(ethereum.eth.ext.ssz_size) = "32"];
// The most recent justified checkpoint in the beacon state
Checkpoint source = 4;
// The checkpoint attempting to be justified for the current epoch and its epoch boundary block
Checkpoint target = 5;
}
message Checkpoint {
// A checkpoint is every epoch's first slot. The goal of Casper FFG
// is to link the check points together for justification and finalization.
// Epoch the checkpoint references.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Block root of the checkpoint references.
bytes root = 2 [(ethereum.eth.ext.ssz_size) = "32"];
}

1672
proto/eth/v1/beacon_block.pb.go generated Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
// +build ignore
package ignore

View File

@@ -0,0 +1,266 @@
// Copyright 2021 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.v1;
import "google/protobuf/descriptor.proto";
import "proto/eth/ext/options.proto";
import "proto/eth/v1/attestation.proto";
option csharp_namespace = "Ethereum.Eth.v1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1";
option java_multiple_files = true;
option java_outer_classname = "BeaconBlockProto";
option java_package = "org.ethereum.eth.v1";
option php_namespace = "Ethereum\\Eth\\v1";
// The Ethereum 2.0 beacon block. The message does not contain a validator signature.
message BeaconBlock {
// Beacon chain slot that this block represents.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// Validator index of the validator that proposed the block header.
uint64 proposer_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// 32 byte root of the parent block.
bytes parent_root = 3 [(ethereum.eth.ext.ssz_size) = "32"];
// 32 byte root of the resulting state after processing this block.
bytes state_root = 4 [(ethereum.eth.ext.ssz_size) = "32"];
// The block body itself.
BeaconBlockBody body = 5;
}
// The Ethereum 2.0 beacon block for Hard Fork 1. The message does not contain a validator signature.
message BeaconBlockV1 {
// Beacon chain slot that this block represents.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// Validator index of the validator that proposed the block header.
uint64 proposer_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// 32 byte root of the parent block.
bytes parent_root = 3 [(ethereum.eth.ext.ssz_size) = "32"];
// 32 byte root of the resulting state after processing this block.
bytes state_root = 4 [(ethereum.eth.ext.ssz_size) = "32"];
// The Hard Fork 1 block body itself.
BeaconBlockBodyV1 body = 5;
}
// The signed version of beacon block.
message SignedBeaconBlock {
// The unsigned beacon block itself.
BeaconBlock block = 1;
// 96 byte BLS signature from the validator that produced this block.
bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}
// The signed version of Hard Fork 1 beacon block.
message SignedBeaconBlockV1 {
// The unsigned beacon block itself.
BeaconBlockV1 block = 1;
// 96 byte BLS signature from the validator that produced this block.
bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}
// The block body of an Ethereum 2.0 beacon block.
message BeaconBlockBody {
// The validators RANDAO reveal 96 byte value.
bytes randao_reveal = 1 [(ethereum.eth.ext.ssz_size) = "96"];
// A reference to the Ethereum 1.x chain.
Eth1Data eth1_data = 2;
// 32 byte field of arbitrary data. This field may contain any data and
// is not used for anything other than a fun message.
bytes graffiti = 3 [(ethereum.eth.ext.ssz_size) = "32"];
// Block operations
// Refer to spec constants at https://github.com/ethereum/eth2.0-specs/blob/dev/specs/core/0_beacon-chain.md#max-operations-per-block
// At most MAX_PROPOSER_SLASHINGS.
repeated ProposerSlashing proposer_slashings = 4 [(ethereum.eth.ext.ssz_max) = "16"];
// At most MAX_ATTESTER_SLASHINGS.
repeated AttesterSlashing attester_slashings = 5 [(ethereum.eth.ext.ssz_max) = "2"];
// At most MAX_ATTESTATIONS.
repeated Attestation attestations = 6 [(ethereum.eth.ext.ssz_max) = "128"];
// At most MAX_DEPOSITS.
repeated Deposit deposits = 7 [(ethereum.eth.ext.ssz_max) = "16"];
// At most MAX_VOLUNTARY_EXITS.
repeated SignedVoluntaryExit voluntary_exits = 8 [(ethereum.eth.ext.ssz_max) = "16"];
}
// The block body of an Ethereum 2.0 beacon block for Hard Fork 1.
message BeaconBlockBodyV1 {
// The validators RANDAO reveal 96 byte value.
bytes randao_reveal = 1 [(ethereum.eth.ext.ssz_size) = "96"];
// A reference to the Ethereum 1.x chain.
Eth1Data eth1_data = 2;
// 32 byte field of arbitrary data. This field may contain any data and
// is not used for anything other than a fun message.
bytes graffiti = 3 [(ethereum.eth.ext.ssz_size) = "32"];
// Block operations
// Refer to spec constants at https://github.com/ethereum/eth2.0-specs/blob/dev/specs/core/0_beacon-chain.md#max-operations-per-block
// At most MAX_PROPOSER_SLASHINGS.
repeated ProposerSlashing proposer_slashings = 4 [(ethereum.eth.ext.ssz_max) = "16"];
// At most MAX_ATTESTER_SLASHINGS.
repeated AttesterSlashing attester_slashings = 5 [(ethereum.eth.ext.ssz_max) = "2"];
// At most MAX_ATTESTATIONS.
repeated Attestation attestations = 6 [(ethereum.eth.ext.ssz_max) = "128"];
// At most MAX_DEPOSITS.
repeated Deposit deposits = 7 [(ethereum.eth.ext.ssz_max) = "16"];
// At most MAX_VOLUNTARY_EXITS.
repeated SignedVoluntaryExit voluntary_exits = 8 [(ethereum.eth.ext.ssz_max) = "16"];
// Bitvector used to track sync committee voting bits.
bytes sync_committee_bits = 10 [(ethereum.eth.ext.ssz_size) = "64", (ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/go-bitfield.Bitvector512"];
// BLS aggregated signature of the sync committee for the ones that voted.
bytes sync_committee_signature = 11 [(ethereum.eth.ext.ssz_size) = "96"];
}
// Proposer slashings are proofs that a slashable offense has been committed by
// proposing two conflicting blocks from the same validator.
message ProposerSlashing {
// First conflicting signed block header.
SignedBeaconBlockHeader signed_header_1 = 2;
// Second conflicting signed block header.
SignedBeaconBlockHeader signed_header_2 = 3;
}
// Attestor slashings are proofs that a slashable offense has been committed by
// attestating to two conflicting pieces of information by the same validator.
message AttesterSlashing {
// First conflicting attestation.
IndexedAttestation attestation_1 = 1;
// Second conflicting attestation.
IndexedAttestation attestation_2 = 2;
}
// Deposit into the Ethereum 2.0 from the Ethereum 1.x deposit contract.
message Deposit {
message Data {
// 48 byte BLS public key of the validator.
bytes pubkey = 1 [(ethereum.eth.ext.ssz_size) = "48", (ethereum.eth.ext.spec_name) = "pubkey"];
// A 32 byte hash of the withdrawal address public key.
bytes withdrawal_credentials = 2 [(ethereum.eth.ext.ssz_size) = "32"];
// Deposit amount in gwei.
uint64 amount = 3;
// 96 byte signature from the validators public key.
bytes signature = 4 [(ethereum.eth.ext.ssz_size) = "96"];
}
// 32 byte roots in the deposit tree branch.
repeated bytes proof = 1 [(ethereum.eth.ext.ssz_size) = "33,32"];
Data data = 2;
}
// A message that represents a validator signaling that they want to voluntarily
// withdraw from the active validator set. The message does not contain a
// validator signature.
message VoluntaryExit {
// The epoch on when exit request becomes valid.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Index of the exiting validator.
uint64 validator_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
// The signed version of voluntary exit.
message SignedVoluntaryExit {
// The unsigned voluntary exit itself.
VoluntaryExit message = 1;
// Validator's 96 byte signature
bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}
// Eth1Data represents references to the Ethereum 1.x deposit contract.
message Eth1Data {
// The 32 byte deposit tree root for the last deposit included in this
// block.
bytes deposit_root = 1 [(ethereum.eth.ext.ssz_size) = "32"];
// The total number of deposits included in the beacon chain since genesis
// including the deposits in this block.
uint64 deposit_count = 2;
// The 32 byte block hash of the Ethereum 1.x block considered for deposit
// inclusion.
bytes block_hash = 3 [(ethereum.eth.ext.ssz_size) = "32"];
}
// A beacon block header is essentially a beacon block with only a reference to
// the beacon body as a 32 byte merkle tree root. This type of message is more
// lightweight than a full beacon block. The message does not contain
// a validator signature.
message BeaconBlockHeader {
// Beacon chain slot that this block represents.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// Validator index of the validator that proposed the block header.
uint64 proposer_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// 32 byte merkle tree root of the parent ssz encoded block.
bytes parent_root = 3 [(ethereum.eth.ext.ssz_size) = "32"];
// 32 byte merkle tree root of the resulting ssz encoded state after processing this block.
bytes state_root = 4 [(ethereum.eth.ext.ssz_size) = "32"];
// 32 byte merkle tree root of the ssz encoded block body.
bytes body_root = 5 [(ethereum.eth.ext.ssz_size) = "32"];
}
message SignedBeaconBlockHeader {
// The unsigned beacon block header itself.
BeaconBlockHeader message = 1;
// 96 byte BLS signature from the validator that produced this block header.
bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}
message IndexedAttestation {
repeated uint64 attesting_indices = 1 [(ethereum.eth.ext.ssz_max) = "2048"];
AttestationData data = 2;
// 96 bytes aggregate signature.
bytes signature = 3 [(ethereum.eth.ext.ssz_size) = "96"];
}

4063
proto/eth/v1/beacon_chain_service.pb.go generated Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,481 @@
// 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.v1;
import "google/api/annotations.proto";
import "google/protobuf/descriptor.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
import "proto/eth/ext/options.proto";
import "proto/eth/v1/attestation.proto";
import "proto/eth/v1/beacon_block.proto";
import "proto/eth/v1/beacon_state.proto";
import "proto/eth/v1/validator.proto";
option csharp_namespace = "Ethereum.Eth.v1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1";
option java_multiple_files = true;
option java_outer_classname = "BeaconChainProto";
option java_package = "org.ethereum.eth.v1";
option php_namespace = "Ethereum\\Eth\\v1";
// 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 eth2.0-apis repository (eth2.0-APIs/apis/).
service BeaconChain {
// Beacon state API related endpoints.
// GetGenesis retrieves details of the chain's genesis which can be used to identify chain.
rpc GetGenesis(google.protobuf.Empty) returns (GenesisResponse) {
option (google.api.http) = { get: "/eth/v1/beacon/genesis" };
}
// GetStateRoot calculates HashTreeRoot for state with given 'stateId'. If stateId is root, same value will be returned.
rpc GetStateRoot(StateRequest) returns (StateRootResponse) {
option (google.api.http) = {
get: "/eth/v1/beacon/states/{state_id}/root"
};
}
// GetStateFork returns Fork object for state with given 'stateId'.
rpc GetStateFork(StateRequest) returns (StateForkResponse) {
option (google.api.http) = {
get: "/eth/v1/beacon/states/{state_id}/fork"
};
}
// GetFinalityCheckpoints returns finality checkpoints for state with given 'stateId'. In case finality is
// not yet achieved, checkpoint should return epoch 0 and ZERO_HASH as root.
rpc GetFinalityCheckpoints(StateRequest) returns (StateFinalityCheckpointResponse) {
option (google.api.http) = {
get: "/eth/v1/beacon/states/{state_id}/finality_checkpoints"
};
}
// ListValidators returns a filterable list of validators with their balance, status and index.
rpc ListValidators(StateValidatorsRequest) returns (StateValidatorsResponse) {
option (google.api.http) = {
get: "/eth/v1/beacon/states/{state_id}/validators"
};
}
// GetValidator returns a validator specified by state and id or public key along with status and balance.
rpc GetValidator(StateValidatorRequest) returns (StateValidatorResponse) {
option (google.api.http) = {
get: "/eth/v1/beacon/states/{state_id}/validators/{validator_id}"
};
}
// ListValidators returns a filterable list of validator balances.
rpc ListValidatorBalances(ValidatorBalancesRequest) returns (ValidatorBalancesResponse) {
option (google.api.http) = {
get: "/eth/v1/beacon/states/{state_id}/validator_balances"
};
}
// ListCommittees retrieves the committees for the given state at the given epoch.
rpc ListCommittees(StateCommitteesRequest) returns (StateCommitteesResponse) {
option (google.api.http) = {
get: "/eth/v1/beacon/states/{state_id}/committees"
};
}
// Beacon blocks API related endpoints.
// ListBlockHeaders retrieves block headers matching given query. By default it will fetch current head slot blocks.
rpc ListBlockHeaders(BlockHeadersRequest) returns (BlockHeadersResponse) {
option (google.api.http) = {
get: "/eth/v1/beacon/headers"
};
}
// GetBlockHeader retrieves block header for given block id.
rpc GetBlockHeader(BlockRequest) returns (BlockHeaderResponse) {
option (google.api.http) = {
get: "/eth/v1/beacon/headers/{block_id}"
};
}
// SubmitBlock instructs the beacon node to broadcast a newly signed beacon block to the beacon network, to be
// included in the beacon chain. The beacon node is not required to validate the signed BeaconBlock, and a successful
// response (20X) only indicates that the broadcast has been successful. The beacon node is expected to integrate the
// new block into its state, and therefore validate the block internally, however blocks which fail the validation are
// still broadcast but a different status code is returned (202).
rpc SubmitBlock(BeaconBlockContainer) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/eth/v1/beacon/blocks"
body: "*"
};
}
// GetBlock retrieves block details for given block id.
rpc GetBlock(BlockRequest) returns (BlockResponse) {
option (google.api.http) = {
get: "/eth/v1/beacon/blocks/{block_id}"
};
}
// GetBlockRoot retrieves hashTreeRoot of BeaconBlock/BeaconBlockHeader.
rpc GetBlockRoot(BlockRequest) returns (BlockRootResponse) {
option (google.api.http) = {
get: "/eth/v1/beacon/blocks/{block_id}/root"
};
}
// ListBlockAttestations retrieves attestation included in requested block.
rpc ListBlockAttestations(BlockRequest) returns (BlockAttestationsResponse) {
option (google.api.http) = {
get: "/eth/v1/beacon/blocks/{block_id}/attestations"
};
}
// Beacon pools API related endpoints.
// ListPoolAttestations retrieves attestations known by the node but
// not necessarily incorporated into any block.
rpc ListPoolAttestations(AttestationsPoolRequest) returns (AttestationsPoolResponse) {
option (google.api.http) = {
get: "/eth/v1/beacon/pool/attestations"
};
}
// SubmitAttestations submits Attestation objects to node. If attestation passes all validation
// constraints, node MUST publish attestation on appropriate subnet.
rpc SubmitAttestations(SubmitAttestationsRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/eth/v1/beacon/pool/attestations"
body: "*"
};
}
// ListPoolAttesterSlashings retrieves attester slashings known by the node but
// not necessarily incorporated into any block.
rpc ListPoolAttesterSlashings(google.protobuf.Empty) returns (AttesterSlashingsPoolResponse) {
option (google.api.http) = {
get: "/eth/v1/beacon/pool/attester_slashings"
};
}
// SubmitAttesterSlashing submits AttesterSlashing object to node's pool and
// if passes validation node MUST broadcast it to network.
rpc SubmitAttesterSlashing(AttesterSlashing) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/eth/v1/beacon/pool/attester_slashings"
body: "*"
};
}
// ListPoolProposerSlashings retrieves proposer slashings known by the node
// but not necessarily incorporated into any block.
rpc ListPoolProposerSlashings(google.protobuf.Empty) returns (ProposerSlashingPoolResponse) {
option (google.api.http) = {
get: "/eth/v1/beacon/pool/proposer_slashings"
};
}
// SubmitProposerSlashing submits AttesterSlashing object to node's pool and if
// passes validation node MUST broadcast it to network.
rpc SubmitProposerSlashing(ProposerSlashing) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/eth/v1/beacon/pool/proposer_slashings"
body: "*"
};
}
// ListPoolVoluntaryExits retrieves voluntary exits known by the node but
// not necessarily incorporated into any block.
rpc ListPoolVoluntaryExits(google.protobuf.Empty) returns (VoluntaryExitsPoolResponse) {
option (google.api.http) = {
get: "/eth/v1/beacon/pool/voluntary_exits"
};
}
// SubmitVoluntaryExit submits SignedVoluntaryExit object to node's pool
// and if passes validation node MUST broadcast it to network.
rpc SubmitVoluntaryExit(SignedVoluntaryExit) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/eth/v1/beacon/pool/voluntary_exits"
body: "*"
};
}
// Beacon config API related endpoints.
// GetForkSchedule retrieve all scheduled upcoming forks this node is aware of.
rpc GetForkSchedule(google.protobuf.Empty) returns (ForkScheduleResponse) {
option (google.api.http) = {get: "/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
rpc GetSpec(google.protobuf.Empty) returns (SpecResponse) {
option (google.api.http) = {get: "/eth/v1/config/spec"};
}
// GetDepositContract retrieves deposit contract address and genesis fork version.
rpc GetDepositContract(google.protobuf.Empty) returns (DepositContractResponse) {
option (google.api.http) = {get: "/eth/v1/config/deposit_contract"};
}
}
// Beacon State API related messages.
message GenesisResponse {
Genesis data = 1;
message Genesis {
// UTC time specified in the chain start event in the deposit contract.
google.protobuf.Timestamp genesis_time = 1;
// 32 byte hash tree root of the genesis validator set.
bytes genesis_validators_root = 2 [(ethereum.eth.ext.ssz_size) = "32"];
// 4 byte genesis fork version.
bytes genesis_fork_version = 3 [(ethereum.eth.ext.ssz_size) = "4"];
}
}
message StateRequest {
// The state id which can be any of: "head" (canonical head in node's view),
// "genesis", "finalized", "justified", <slot>, <hex encoded stateRoot with 0x prefix>.
// Uses the provided state_id for the request.
bytes state_id = 1; // TODO: Duck type handling.
}
message StateRootResponse {
StateRoot data = 1;
message StateRoot {
// SSZ encoded state root for the requested state.
bytes root = 1 [(ethereum.eth.ext.ssz_size) = "32"];
}
}
message StateForkResponse {
Fork data = 1;
}
message StateFinalityCheckpointResponse {
StateFinalityCheckpoint data = 1;
message StateFinalityCheckpoint {
Checkpoint previous_justified = 1;
Checkpoint current_justified = 2;
Checkpoint finalized = 3;
}
}
message StateValidatorsRequest {
// The state id which can be any of: "head" (canonical head in node's view),
// "genesis", "finalized", "justified", <slot>, <hex encoded stateRoot with 0x prefix>.
// Uses the provided state_id for the request.
bytes state_id = 1; // TODO: Duck type handling.
// An array of either hex encoded public keys (with 0x prefix) or validator indexes.
repeated bytes id = 2; // TODO: Duck type handling.
// The status to query validators for, can be one of: pending_initialized, pending_queued, active_ongoing,
// active_exiting, active_slashed, exited_unslashed, exited_slashed, withdrawal_possible,
// withdrawal_done, active, pending, exited, withdrawal
repeated ValidatorStatus status = 3;
}
message ValidatorBalancesRequest {
// The state id which can be any of: "head" (canonical head in node's view),
// "genesis", "finalized", "justified", <slot>, <hex encoded stateRoot with 0x prefix>.
// Uses the provided state_id for the request.
bytes state_id = 1; // TODO: Duck type handling.
// An array of either hex encoded public keys (with 0x prefix) or validator indexes.
repeated bytes id = 2; // TODO: Duck type handling.
}
message StateValidatorsResponse {
repeated ValidatorContainer data = 1;
}
message ValidatorBalancesResponse {
repeated ValidatorBalance data = 1;
}
message ValidatorBalance {
// The index of the validator the retrieved balance is for.
uint64 index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// The balance of the requested validator.
uint64 balance = 2;
}
message StateValidatorRequest {
// The state id which can be any of: "head" (canonical head in node's view),
// "genesis", "finalized", "justified", <slot>, <hex encoded stateRoot with 0x prefix>.
// Uses the provided state_id for the request.
bytes state_id = 1; // TODO: Duck type handling.
// The public key or index for the validator to retrieve information for.
bytes validator_id = 2;
}
message StateValidatorResponse {
ValidatorContainer data = 1;
}
message StateCommitteesRequest {
// The state id which can be any of: "head" (canonical head in node's view),
// "genesis", "finalized", "justified", <slot>, <hex encoded stateRoot with 0x prefix>.
// Uses the provided state_id for the request.
bytes state_id = 1; // TODO: Duck type handling.
// The epoch to retrieve the committees of.
optional uint64 epoch = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Committee index requested.
optional uint64 index = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.CommitteeIndex"];
// Committee slot requested.
optional uint64 slot = 4 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
}
message StateCommitteesResponse {
repeated Committee data = 1;
}
// Beacon Block API related messages.
message BlockAttestationsResponse {
repeated Attestation data = 1;
}
message BlockRootContainer {
// 32 byte merkle tree root of the ssz encoded block.
bytes root = 1 [(ethereum.eth.ext.ssz_size) = "32"];
}
message BlockRootResponse {
BlockRootContainer data = 1;
}
message BlockHeadersRequest {
// Beacon chain slot of the requested block.
optional uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// 32 byte merkle tree root of the ssz encoded parent block.
optional bytes parent_root = 2 [(ethereum.eth.ext.ssz_size) = "32"];
}
message BlockHeadersResponse {
repeated BlockHeaderContainer data = 1;
}
message BlockRequest {
// The block identifier. Can be one of: "head" (canonical head in node's view), "genesis",
// "finalized", <slot>, <hex encoded blockRoot with 0x prefix>.
bytes block_id = 1;
}
message BlockHeaderResponse {
BlockHeaderContainer data = 1;
}
message BlockHeaderContainer {
// 32 byte merkle tree root of the ssz encoded block.
bytes root = 1 [(ethereum.eth.ext.ssz_size) = "32"];
// Boolean indicating whether the block is canonical.
bool canonical = 2;
// Container for a signed beacon block header.
BeaconBlockHeaderContainer header = 3;
}
message BeaconBlockHeaderContainer {
// The unsigned beacon block header.
BeaconBlockHeader message = 1;
// 96 byte BLS signature from the validator that produced this block header.
bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}
message BlockResponse {
BeaconBlockContainer data = 1;
}
message BeaconBlockContainer {
// The unsigned beacon block.
BeaconBlock message = 1;
// 96 byte BLS signature from the validator that produced this block.
bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}
// Beacon Pool related API service.
message AttestationsPoolRequest {
optional uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
optional uint64 committee_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.CommitteeIndex"];
}
message SubmitAttestationsRequest {
repeated Attestation data = 1;
}
message AttestationsPoolResponse {
repeated Attestation data = 1;
}
message AttesterSlashingsPoolResponse {
repeated AttesterSlashing data = 1;
}
message ProposerSlashingPoolResponse {
repeated ProposerSlashing data = 1;
}
message VoluntaryExitsPoolResponse {
repeated SignedVoluntaryExit data = 1;
}
// Beacon Config API related messages.
message ForkScheduleResponse {
// The fork data used for beacon chain versioning.
repeated Fork data = 1;
}
// Spec response is a generic flat map of key values.
// 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 string-number
message SpecResponse {
map<string, string> data = 1;
}
message DepositContractResponse {
DepositContract data = 1;
}
message DepositContract {
// The chain_id of the network.
uint64 chain_id = 1;
// The address of the deployed deposit contract in use.
string address = 2;
}

574
proto/eth/v1/beacon_debug_service.pb.go generated Executable file
View File

@@ -0,0 +1,574 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.15.8
// source: proto/eth/v1/beacon_debug_service.proto
package v1
import (
context "context"
proto "github.com/golang/protobuf/proto"
_ "github.com/golang/protobuf/protoc-gen-go/descriptor"
empty "github.com/golang/protobuf/ptypes/empty"
github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
_ "github.com/prysmaticlabs/prysm/proto/eth/ext"
_ "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"
reflect "reflect"
sync "sync"
)
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)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type ForkChoiceHeadsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data []*ForkChoiceHead `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
}
func (x *ForkChoiceHeadsResponse) Reset() {
*x = ForkChoiceHeadsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1_beacon_debug_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ForkChoiceHeadsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ForkChoiceHeadsResponse) ProtoMessage() {}
func (x *ForkChoiceHeadsResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1_beacon_debug_service_proto_msgTypes[0]
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 ForkChoiceHeadsResponse.ProtoReflect.Descriptor instead.
func (*ForkChoiceHeadsResponse) Descriptor() ([]byte, []int) {
return file_proto_eth_v1_beacon_debug_service_proto_rawDescGZIP(), []int{0}
}
func (x *ForkChoiceHeadsResponse) GetData() []*ForkChoiceHead {
if x != nil {
return x.Data
}
return nil
}
type ForkChoiceHead struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Root []byte `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty" ssz-size:"32"`
Slot github_com_prysmaticlabs_eth2_types.Slot `protobuf:"varint,2,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Slot"`
}
func (x *ForkChoiceHead) Reset() {
*x = ForkChoiceHead{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1_beacon_debug_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ForkChoiceHead) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ForkChoiceHead) ProtoMessage() {}
func (x *ForkChoiceHead) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1_beacon_debug_service_proto_msgTypes[1]
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 ForkChoiceHead.ProtoReflect.Descriptor instead.
func (*ForkChoiceHead) Descriptor() ([]byte, []int) {
return file_proto_eth_v1_beacon_debug_service_proto_rawDescGZIP(), []int{1}
}
func (x *ForkChoiceHead) GetRoot() []byte {
if x != nil {
return x.Root
}
return nil
}
func (x *ForkChoiceHead) GetSlot() github_com_prysmaticlabs_eth2_types.Slot {
if x != nil {
return x.Slot
}
return github_com_prysmaticlabs_eth2_types.Slot(0)
}
type BeaconStateResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data *BeaconState `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}
func (x *BeaconStateResponse) Reset() {
*x = BeaconStateResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1_beacon_debug_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BeaconStateResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BeaconStateResponse) ProtoMessage() {}
func (x *BeaconStateResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1_beacon_debug_service_proto_msgTypes[2]
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 BeaconStateResponse.ProtoReflect.Descriptor instead.
func (*BeaconStateResponse) Descriptor() ([]byte, []int) {
return file_proto_eth_v1_beacon_debug_service_proto_rawDescGZIP(), []int{2}
}
func (x *BeaconStateResponse) GetData() *BeaconState {
if x != nil {
return x.Data
}
return nil
}
type BeaconStateSszResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}
func (x *BeaconStateSszResponse) Reset() {
*x = BeaconStateSszResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1_beacon_debug_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BeaconStateSszResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BeaconStateSszResponse) ProtoMessage() {}
func (x *BeaconStateSszResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1_beacon_debug_service_proto_msgTypes[3]
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 BeaconStateSszResponse.ProtoReflect.Descriptor instead.
func (*BeaconStateSszResponse) Descriptor() ([]byte, []int) {
return file_proto_eth_v1_beacon_debug_service_proto_rawDescGZIP(), []int{3}
}
func (x *BeaconStateSszResponse) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
var File_proto_eth_v1_beacon_debug_service_proto protoreflect.FileDescriptor
var file_proto_eth_v1_beacon_debug_service_proto_rawDesc = []byte{
0x0a, 0x27, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 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, 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72,
0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 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, 0x1b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65,
0x74, 0x68, 0x2f, 0x65, 0x78, 0x74, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 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,
0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e,
0x0a, 0x17, 0x46, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74,
0x61, 0x18, 0x01, 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, 0x48, 0x65, 0x61, 0x64, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x6e,
0x0a, 0x0e, 0x46, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64,
0x12, 0x1a, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06,
0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x12, 0x40, 0x0a, 0x04,
0x73, 0x6c, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28,
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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79,
0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x22, 0x47,
0x0a, 0x13, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65,
0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74,
0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2c, 0x0a, 0x16, 0x42, 0x65, 0x61, 0x63, 0x6f,
0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x73, 0x7a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0xa4, 0x03, 0x0a, 0x0b, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e,
0x44, 0x65, 0x62, 0x75, 0x67, 0x12, 0x85, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x65, 0x61,
0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72,
0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e,
0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x64,
0x65, 0x62, 0x75, 0x67, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x73, 0x74, 0x61, 0x74,
0x65, 0x73, 0x2f, 0x7b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x8f, 0x01,
0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65,
0x53, 0x73, 0x7a, 0x12, 0x1d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65,
0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74,
0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65,
0x53, 0x73, 0x7a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4,
0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62,
0x75, 0x67, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73,
0x2f, 0x7b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x73, 0x7a, 0x12,
0x7b, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69, 0x63,
0x65, 0x48, 0x65, 0x61, 0x64, 0x73, 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, 0x31,
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, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c,
0x12, 0x1a, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2f,
0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x73, 0x42, 0x7b, 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, 0x44, 0x65, 0x62, 0x75, 0x67,
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 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, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65,
0x74, 0x68, 0x2f, 0x76, 0x31, 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d,
0x2e, 0x45, 0x74, 0x68, 0x2e, 0x76, 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 (
file_proto_eth_v1_beacon_debug_service_proto_rawDescOnce sync.Once
file_proto_eth_v1_beacon_debug_service_proto_rawDescData = file_proto_eth_v1_beacon_debug_service_proto_rawDesc
)
func file_proto_eth_v1_beacon_debug_service_proto_rawDescGZIP() []byte {
file_proto_eth_v1_beacon_debug_service_proto_rawDescOnce.Do(func() {
file_proto_eth_v1_beacon_debug_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_eth_v1_beacon_debug_service_proto_rawDescData)
})
return file_proto_eth_v1_beacon_debug_service_proto_rawDescData
}
var file_proto_eth_v1_beacon_debug_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_proto_eth_v1_beacon_debug_service_proto_goTypes = []interface{}{
(*ForkChoiceHeadsResponse)(nil), // 0: ethereum.eth.v1.ForkChoiceHeadsResponse
(*ForkChoiceHead)(nil), // 1: ethereum.eth.v1.ForkChoiceHead
(*BeaconStateResponse)(nil), // 2: ethereum.eth.v1.BeaconStateResponse
(*BeaconStateSszResponse)(nil), // 3: ethereum.eth.v1.BeaconStateSszResponse
(*BeaconState)(nil), // 4: ethereum.eth.v1.BeaconState
(*StateRequest)(nil), // 5: ethereum.eth.v1.StateRequest
(*empty.Empty)(nil), // 6: google.protobuf.Empty
}
var file_proto_eth_v1_beacon_debug_service_proto_depIdxs = []int32{
1, // 0: ethereum.eth.v1.ForkChoiceHeadsResponse.data:type_name -> ethereum.eth.v1.ForkChoiceHead
4, // 1: ethereum.eth.v1.BeaconStateResponse.data:type_name -> ethereum.eth.v1.BeaconState
5, // 2: ethereum.eth.v1.BeaconDebug.GetBeaconState:input_type -> ethereum.eth.v1.StateRequest
5, // 3: ethereum.eth.v1.BeaconDebug.GetBeaconStateSsz:input_type -> ethereum.eth.v1.StateRequest
6, // 4: ethereum.eth.v1.BeaconDebug.ListForkChoiceHeads:input_type -> google.protobuf.Empty
2, // 5: ethereum.eth.v1.BeaconDebug.GetBeaconState:output_type -> ethereum.eth.v1.BeaconStateResponse
3, // 6: ethereum.eth.v1.BeaconDebug.GetBeaconStateSsz:output_type -> ethereum.eth.v1.BeaconStateSszResponse
0, // 7: ethereum.eth.v1.BeaconDebug.ListForkChoiceHeads:output_type -> ethereum.eth.v1.ForkChoiceHeadsResponse
5, // [5:8] is the sub-list for method output_type
2, // [2:5] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_proto_eth_v1_beacon_debug_service_proto_init() }
func file_proto_eth_v1_beacon_debug_service_proto_init() {
if File_proto_eth_v1_beacon_debug_service_proto != nil {
return
}
file_proto_eth_v1_beacon_state_proto_init()
file_proto_eth_v1_beacon_chain_service_proto_init()
if !protoimpl.UnsafeEnabled {
file_proto_eth_v1_beacon_debug_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ForkChoiceHeadsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1_beacon_debug_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ForkChoiceHead); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1_beacon_debug_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BeaconStateResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1_beacon_debug_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BeaconStateSszResponse); 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_debug_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_proto_eth_v1_beacon_debug_service_proto_goTypes,
DependencyIndexes: file_proto_eth_v1_beacon_debug_service_proto_depIdxs,
MessageInfos: file_proto_eth_v1_beacon_debug_service_proto_msgTypes,
}.Build()
File_proto_eth_v1_beacon_debug_service_proto = out.File
file_proto_eth_v1_beacon_debug_service_proto_rawDesc = nil
file_proto_eth_v1_beacon_debug_service_proto_goTypes = nil
file_proto_eth_v1_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 {
GetBeaconState(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*BeaconStateResponse, error)
GetBeaconStateSsz(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*BeaconStateSszResponse, error)
ListForkChoiceHeads(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ForkChoiceHeadsResponse, error)
}
type beaconDebugClient struct {
cc grpc.ClientConnInterface
}
func NewBeaconDebugClient(cc grpc.ClientConnInterface) BeaconDebugClient {
return &beaconDebugClient{cc}
}
func (c *beaconDebugClient) GetBeaconState(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*BeaconStateResponse, error) {
out := new(BeaconStateResponse)
err := c.cc.Invoke(ctx, "/ethereum.eth.v1.BeaconDebug/GetBeaconState", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *beaconDebugClient) GetBeaconStateSsz(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*BeaconStateSszResponse, error) {
out := new(BeaconStateSszResponse)
err := c.cc.Invoke(ctx, "/ethereum.eth.v1.BeaconDebug/GetBeaconStateSsz", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *beaconDebugClient) ListForkChoiceHeads(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ForkChoiceHeadsResponse, error) {
out := new(ForkChoiceHeadsResponse)
err := c.cc.Invoke(ctx, "/ethereum.eth.v1.BeaconDebug/ListForkChoiceHeads", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// BeaconDebugServer is the server API for BeaconDebug service.
type BeaconDebugServer interface {
GetBeaconState(context.Context, *StateRequest) (*BeaconStateResponse, error)
GetBeaconStateSsz(context.Context, *StateRequest) (*BeaconStateSszResponse, error)
ListForkChoiceHeads(context.Context, *empty.Empty) (*ForkChoiceHeadsResponse, error)
}
// UnimplementedBeaconDebugServer can be embedded to have forward compatible implementations.
type UnimplementedBeaconDebugServer struct {
}
func (*UnimplementedBeaconDebugServer) GetBeaconState(context.Context, *StateRequest) (*BeaconStateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetBeaconState not implemented")
}
func (*UnimplementedBeaconDebugServer) GetBeaconStateSsz(context.Context, *StateRequest) (*BeaconStateSszResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetBeaconStateSsz not implemented")
}
func (*UnimplementedBeaconDebugServer) ListForkChoiceHeads(context.Context, *empty.Empty) (*ForkChoiceHeadsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListForkChoiceHeads not implemented")
}
func RegisterBeaconDebugServer(s *grpc.Server, srv BeaconDebugServer) {
s.RegisterService(&_BeaconDebug_serviceDesc, srv)
}
func _BeaconDebug_GetBeaconState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BeaconDebugServer).GetBeaconState(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ethereum.eth.v1.BeaconDebug/GetBeaconState",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BeaconDebugServer).GetBeaconState(ctx, req.(*StateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BeaconDebug_GetBeaconStateSsz_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BeaconDebugServer).GetBeaconStateSsz(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ethereum.eth.v1.BeaconDebug/GetBeaconStateSsz",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BeaconDebugServer).GetBeaconStateSsz(ctx, req.(*StateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BeaconDebug_ListForkChoiceHeads_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BeaconDebugServer).ListForkChoiceHeads(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ethereum.eth.v1.BeaconDebug/ListForkChoiceHeads",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BeaconDebugServer).ListForkChoiceHeads(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _BeaconDebug_serviceDesc = grpc.ServiceDesc{
ServiceName: "ethereum.eth.v1.BeaconDebug",
HandlerType: (*BeaconDebugServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetBeaconState",
Handler: _BeaconDebug_GetBeaconState_Handler,
},
{
MethodName: "GetBeaconStateSsz",
Handler: _BeaconDebug_GetBeaconStateSsz_Handler,
},
{
MethodName: "ListForkChoiceHeads",
Handler: _BeaconDebug_ListForkChoiceHeads_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "proto/eth/v1/beacon_debug_service.proto",
}

View File

@@ -0,0 +1,358 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: proto/eth/v1/beacon_debug_service.proto
/*
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package v1
import (
"context"
"github.com/golang/protobuf/ptypes/empty"
emptypb "github.com/golang/protobuf/ptypes/empty"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
"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"
"io"
"net/http"
)
// 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_eth2_types.Epoch(0)
var _ = emptypb.Empty{}
var _ = empty.Empty{}
func request_BeaconDebug_GetBeaconState_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconDebugClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq StateRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["state_id"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "state_id")
}
state_id, err := runtime.Bytes(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "state_id", err)
}
protoReq.StateId = (state_id)
msg, err := client.GetBeaconState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconDebug_GetBeaconState_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconDebugServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq StateRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["state_id"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "state_id")
}
state_id, err := runtime.Bytes(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "state_id", err)
}
protoReq.StateId = (state_id)
msg, err := server.GetBeaconState(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconDebug_GetBeaconStateSsz_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconDebugClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq StateRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["state_id"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "state_id")
}
state_id, err := runtime.Bytes(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "state_id", err)
}
protoReq.StateId = (state_id)
msg, err := client.GetBeaconStateSsz(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconDebug_GetBeaconStateSsz_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconDebugServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq StateRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["state_id"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "state_id")
}
state_id, err := runtime.Bytes(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "state_id", err)
}
protoReq.StateId = (state_id)
msg, err := server.GetBeaconStateSsz(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconDebug_ListForkChoiceHeads_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.ListForkChoiceHeads(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconDebug_ListForkChoiceHeads_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.ListForkChoiceHeads(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_GetBeaconState_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.v1.BeaconDebug/GetBeaconState")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconDebug_GetBeaconState_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_GetBeaconState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconDebug_GetBeaconStateSsz_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.v1.BeaconDebug/GetBeaconStateSsz")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconDebug_GetBeaconStateSsz_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_GetBeaconStateSsz_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconDebug_ListForkChoiceHeads_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.v1.BeaconDebug/ListForkChoiceHeads")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconDebug_ListForkChoiceHeads_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_ListForkChoiceHeads_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_GetBeaconState_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.v1.BeaconDebug/GetBeaconState")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconDebug_GetBeaconState_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_GetBeaconState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconDebug_GetBeaconStateSsz_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.v1.BeaconDebug/GetBeaconStateSsz")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconDebug_GetBeaconStateSsz_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_GetBeaconStateSsz_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconDebug_ListForkChoiceHeads_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.v1.BeaconDebug/ListForkChoiceHeads")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconDebug_ListForkChoiceHeads_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_ListForkChoiceHeads_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_BeaconDebug_GetBeaconState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"eth", "v1", "debug", "beacon", "states", "state_id"}, ""))
pattern_BeaconDebug_GetBeaconStateSsz_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"eth", "v1", "debug", "beacon", "states", "state_id", "ssz"}, ""))
pattern_BeaconDebug_ListForkChoiceHeads_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"eth", "v1", "debug", "beacon", "heads"}, ""))
)
var (
forward_BeaconDebug_GetBeaconState_0 = runtime.ForwardResponseMessage
forward_BeaconDebug_GetBeaconStateSsz_0 = runtime.ForwardResponseMessage
forward_BeaconDebug_ListForkChoiceHeads_0 = runtime.ForwardResponseMessage
)

View File

@@ -0,0 +1,76 @@
// 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.v1;
import "google/api/annotations.proto";
import "google/protobuf/descriptor.proto";
import "google/protobuf/empty.proto";
import "proto/eth/ext/options.proto";
import "proto/eth/v1/beacon_state.proto";
import "proto/eth/v1/beacon_chain_service.proto";
option csharp_namespace = "Ethereum.Eth.v1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1";
option java_multiple_files = true;
option java_outer_classname = "BeaconDebugProto";
option java_package = "org.ethereum.eth.v1";
option php_namespace = "Ethereum\\Eth\\v1";
// 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 eth2.0-apis repository (eth2.0-APIs/apis/debug).
service BeaconDebug {
// GetBeaconState returns full BeaconState object for given stateId.
rpc GetBeaconState(StateRequest) returns (BeaconStateResponse) {
option (google.api.http) = {
get: "/eth/v1/debug/beacon/states/{state_id}"
};
}
// GetBeaconStateSsz returns the SSZ-serialized version of the full BeaconState object for given stateId.
rpc GetBeaconStateSsz(StateRequest) returns (BeaconStateSszResponse) {
option (google.api.http) = {
get: "/eth/v1/debug/beacon/states/{state_id}/ssz"
};
}
// ListForkChoiceHeads retrieves all possible chain heads (leaves of fork choice tree).
rpc ListForkChoiceHeads(google.protobuf.Empty) returns (ForkChoiceHeadsResponse) {
option (google.api.http) = {
get: "/eth/v1/debug/beacon/heads"
};
}
}
message ForkChoiceHeadsResponse {
repeated ForkChoiceHead data = 1;
}
message ForkChoiceHead {
bytes root = 1 [(ethereum.eth.ext.ssz_size) = "32"];
uint64 slot = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
}
message BeaconStateResponse {
BeaconState data = 1;
}
message BeaconStateSszResponse {
bytes data = 1;
}

721
proto/eth/v1/beacon_state.pb.go generated Executable file
View File

@@ -0,0 +1,721 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.15.8
// source: proto/eth/v1/beacon_state.proto
package v1
import (
proto "github.com/golang/protobuf/proto"
_ "github.com/golang/protobuf/protoc-gen-go/descriptor"
github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
github_com_prysmaticlabs_go_bitfield "github.com/prysmaticlabs/go-bitfield"
_ "github.com/prysmaticlabs/prysm/proto/eth/ext"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
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)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type BeaconState struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GenesisTime uint64 `protobuf:"varint,1,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"`
GenesisValidatorsRoot []byte `protobuf:"bytes,2,opt,name=genesis_validators_root,json=genesisValidatorsRoot,proto3" json:"genesis_validators_root,omitempty" ssz-size:"32"`
Slot github_com_prysmaticlabs_eth2_types.Slot `protobuf:"varint,3,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Slot"`
Fork *Fork `protobuf:"bytes,4,opt,name=fork,proto3" json:"fork,omitempty"`
LatestBlockHeader *BeaconBlockHeader `protobuf:"bytes,5,opt,name=latest_block_header,json=latestBlockHeader,proto3" json:"latest_block_header,omitempty"`
BlockRoots [][]byte `protobuf:"bytes,6,rep,name=block_roots,json=blockRoots,proto3" json:"block_roots,omitempty" ssz-size:"8192"`
StateRoots [][]byte `protobuf:"bytes,7,rep,name=state_roots,json=stateRoots,proto3" json:"state_roots,omitempty" ssz-size:"8192"`
HistoricalRoots [][]byte `protobuf:"bytes,8,rep,name=historical_roots,json=historicalRoots,proto3" json:"historical_roots,omitempty" ssz-max:"16777216" ssz-size:"32"`
Eth1Data *Eth1Data `protobuf:"bytes,9,opt,name=eth1_data,json=eth1Data,proto3" json:"eth1_data,omitempty"`
Eth1DataVotes []*Eth1Data `protobuf:"bytes,10,rep,name=eth1_data_votes,json=eth1DataVotes,proto3" json:"eth1_data_votes,omitempty" ssz-max:"1024"`
Eth1DepositIndex uint64 `protobuf:"varint,11,opt,name=eth1_deposit_index,json=eth1DepositIndex,proto3" json:"eth1_deposit_index,omitempty"`
Validators []*Validator `protobuf:"bytes,12,rep,name=validators,proto3" json:"validators,omitempty" ssz-max:"1099511627776"`
Balances []uint64 `protobuf:"varint,13,rep,packed,name=balances,proto3" json:"balances,omitempty" ssz-max:"1099511627776"`
RandaoMixes [][]byte `protobuf:"bytes,14,rep,name=randao_mixes,json=randaoMixes,proto3" json:"randao_mixes,omitempty" ssz-size:"65536"`
Slashings []uint64 `protobuf:"varint,15,rep,packed,name=slashings,proto3" json:"slashings,omitempty" ssz-size:"65536"`
PreviousEpochAttestations []*PendingAttestation `protobuf:"bytes,16,rep,name=previous_epoch_attestations,json=previousEpochAttestations,proto3" json:"previous_epoch_attestations,omitempty" ssz-max:"4096"`
CurrentEpochAttestations []*PendingAttestation `protobuf:"bytes,17,rep,name=current_epoch_attestations,json=currentEpochAttestations,proto3" json:"current_epoch_attestations,omitempty" ssz-max:"4096"`
JustificationBits github_com_prysmaticlabs_go_bitfield.Bitvector4 `protobuf:"bytes,18,opt,name=justification_bits,json=justificationBits,proto3" json:"justification_bits,omitempty" cast-type:"github.com/prysmaticlabs/go-bitfield.Bitvector4" ssz-size:"1"`
PreviousJustifiedCheckpoint *Checkpoint `protobuf:"bytes,19,opt,name=previous_justified_checkpoint,json=previousJustifiedCheckpoint,proto3" json:"previous_justified_checkpoint,omitempty"`
CurrentJustifiedCheckpoint *Checkpoint `protobuf:"bytes,20,opt,name=current_justified_checkpoint,json=currentJustifiedCheckpoint,proto3" json:"current_justified_checkpoint,omitempty"`
FinalizedCheckpoint *Checkpoint `protobuf:"bytes,21,opt,name=finalized_checkpoint,json=finalizedCheckpoint,proto3" json:"finalized_checkpoint,omitempty"`
}
func (x *BeaconState) Reset() {
*x = BeaconState{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1_beacon_state_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BeaconState) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BeaconState) ProtoMessage() {}
func (x *BeaconState) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1_beacon_state_proto_msgTypes[0]
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 BeaconState.ProtoReflect.Descriptor instead.
func (*BeaconState) Descriptor() ([]byte, []int) {
return file_proto_eth_v1_beacon_state_proto_rawDescGZIP(), []int{0}
}
func (x *BeaconState) GetGenesisTime() uint64 {
if x != nil {
return x.GenesisTime
}
return 0
}
func (x *BeaconState) GetGenesisValidatorsRoot() []byte {
if x != nil {
return x.GenesisValidatorsRoot
}
return nil
}
func (x *BeaconState) GetSlot() github_com_prysmaticlabs_eth2_types.Slot {
if x != nil {
return x.Slot
}
return github_com_prysmaticlabs_eth2_types.Slot(0)
}
func (x *BeaconState) GetFork() *Fork {
if x != nil {
return x.Fork
}
return nil
}
func (x *BeaconState) GetLatestBlockHeader() *BeaconBlockHeader {
if x != nil {
return x.LatestBlockHeader
}
return nil
}
func (x *BeaconState) GetBlockRoots() [][]byte {
if x != nil {
return x.BlockRoots
}
return nil
}
func (x *BeaconState) GetStateRoots() [][]byte {
if x != nil {
return x.StateRoots
}
return nil
}
func (x *BeaconState) GetHistoricalRoots() [][]byte {
if x != nil {
return x.HistoricalRoots
}
return nil
}
func (x *BeaconState) GetEth1Data() *Eth1Data {
if x != nil {
return x.Eth1Data
}
return nil
}
func (x *BeaconState) GetEth1DataVotes() []*Eth1Data {
if x != nil {
return x.Eth1DataVotes
}
return nil
}
func (x *BeaconState) GetEth1DepositIndex() uint64 {
if x != nil {
return x.Eth1DepositIndex
}
return 0
}
func (x *BeaconState) GetValidators() []*Validator {
if x != nil {
return x.Validators
}
return nil
}
func (x *BeaconState) GetBalances() []uint64 {
if x != nil {
return x.Balances
}
return nil
}
func (x *BeaconState) GetRandaoMixes() [][]byte {
if x != nil {
return x.RandaoMixes
}
return nil
}
func (x *BeaconState) GetSlashings() []uint64 {
if x != nil {
return x.Slashings
}
return nil
}
func (x *BeaconState) GetPreviousEpochAttestations() []*PendingAttestation {
if x != nil {
return x.PreviousEpochAttestations
}
return nil
}
func (x *BeaconState) GetCurrentEpochAttestations() []*PendingAttestation {
if x != nil {
return x.CurrentEpochAttestations
}
return nil
}
func (x *BeaconState) GetJustificationBits() github_com_prysmaticlabs_go_bitfield.Bitvector4 {
if x != nil {
return x.JustificationBits
}
return github_com_prysmaticlabs_go_bitfield.Bitvector4(nil)
}
func (x *BeaconState) GetPreviousJustifiedCheckpoint() *Checkpoint {
if x != nil {
return x.PreviousJustifiedCheckpoint
}
return nil
}
func (x *BeaconState) GetCurrentJustifiedCheckpoint() *Checkpoint {
if x != nil {
return x.CurrentJustifiedCheckpoint
}
return nil
}
func (x *BeaconState) GetFinalizedCheckpoint() *Checkpoint {
if x != nil {
return x.FinalizedCheckpoint
}
return nil
}
type PendingAttestation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AggregationBits github_com_prysmaticlabs_go_bitfield.Bitlist `protobuf:"bytes,1,opt,name=aggregation_bits,json=aggregationBits,proto3" json:"aggregation_bits,omitempty" cast-type:"github.com/prysmaticlabs/go-bitfield.Bitlist" ssz-max:"2048"`
Data *AttestationData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
InclusionDelay github_com_prysmaticlabs_eth2_types.Slot `protobuf:"varint,3,opt,name=inclusion_delay,json=inclusionDelay,proto3" json:"inclusion_delay,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Slot"`
ProposerIndex github_com_prysmaticlabs_eth2_types.ValidatorIndex `protobuf:"varint,4,opt,name=proposer_index,json=proposerIndex,proto3" json:"proposer_index,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.ValidatorIndex"`
}
func (x *PendingAttestation) Reset() {
*x = PendingAttestation{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1_beacon_state_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PendingAttestation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PendingAttestation) ProtoMessage() {}
func (x *PendingAttestation) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1_beacon_state_proto_msgTypes[1]
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 PendingAttestation.ProtoReflect.Descriptor instead.
func (*PendingAttestation) Descriptor() ([]byte, []int) {
return file_proto_eth_v1_beacon_state_proto_rawDescGZIP(), []int{1}
}
func (x *PendingAttestation) GetAggregationBits() github_com_prysmaticlabs_go_bitfield.Bitlist {
if x != nil {
return x.AggregationBits
}
return github_com_prysmaticlabs_go_bitfield.Bitlist(nil)
}
func (x *PendingAttestation) GetData() *AttestationData {
if x != nil {
return x.Data
}
return nil
}
func (x *PendingAttestation) GetInclusionDelay() github_com_prysmaticlabs_eth2_types.Slot {
if x != nil {
return x.InclusionDelay
}
return github_com_prysmaticlabs_eth2_types.Slot(0)
}
func (x *PendingAttestation) GetProposerIndex() github_com_prysmaticlabs_eth2_types.ValidatorIndex {
if x != nil {
return x.ProposerIndex
}
return github_com_prysmaticlabs_eth2_types.ValidatorIndex(0)
}
type Committee struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Index github_com_prysmaticlabs_eth2_types.CommitteeIndex `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.CommitteeIndex"`
Slot github_com_prysmaticlabs_eth2_types.Slot `protobuf:"varint,2,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Slot"`
Validators []github_com_prysmaticlabs_eth2_types.ValidatorIndex `protobuf:"varint,3,rep,packed,name=validators,proto3" json:"validators,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.ValidatorIndex"`
}
func (x *Committee) Reset() {
*x = Committee{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1_beacon_state_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Committee) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Committee) ProtoMessage() {}
func (x *Committee) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1_beacon_state_proto_msgTypes[2]
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 Committee.ProtoReflect.Descriptor instead.
func (*Committee) Descriptor() ([]byte, []int) {
return file_proto_eth_v1_beacon_state_proto_rawDescGZIP(), []int{2}
}
func (x *Committee) GetIndex() github_com_prysmaticlabs_eth2_types.CommitteeIndex {
if x != nil {
return x.Index
}
return github_com_prysmaticlabs_eth2_types.CommitteeIndex(0)
}
func (x *Committee) GetSlot() github_com_prysmaticlabs_eth2_types.Slot {
if x != nil {
return x.Slot
}
return github_com_prysmaticlabs_eth2_types.Slot(0)
}
func (x *Committee) GetValidators() []github_com_prysmaticlabs_eth2_types.ValidatorIndex {
if x != nil {
return x.Validators
}
return []github_com_prysmaticlabs_eth2_types.ValidatorIndex(nil)
}
type Fork struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PreviousVersion []byte `protobuf:"bytes,1,opt,name=previous_version,json=previousVersion,proto3" json:"previous_version,omitempty" ssz-size:"4"`
CurrentVersion []byte `protobuf:"bytes,2,opt,name=current_version,json=currentVersion,proto3" json:"current_version,omitempty" ssz-size:"4"`
Epoch github_com_prysmaticlabs_eth2_types.Epoch `protobuf:"varint,3,opt,name=epoch,proto3" json:"epoch,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Epoch"`
}
func (x *Fork) Reset() {
*x = Fork{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1_beacon_state_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Fork) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Fork) ProtoMessage() {}
func (x *Fork) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1_beacon_state_proto_msgTypes[3]
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 Fork.ProtoReflect.Descriptor instead.
func (*Fork) Descriptor() ([]byte, []int) {
return file_proto_eth_v1_beacon_state_proto_rawDescGZIP(), []int{3}
}
func (x *Fork) GetPreviousVersion() []byte {
if x != nil {
return x.PreviousVersion
}
return nil
}
func (x *Fork) GetCurrentVersion() []byte {
if x != nil {
return x.CurrentVersion
}
return nil
}
func (x *Fork) GetEpoch() github_com_prysmaticlabs_eth2_types.Epoch {
if x != nil {
return x.Epoch
}
return github_com_prysmaticlabs_eth2_types.Epoch(0)
}
var File_proto_eth_v1_beacon_state_proto protoreflect.FileDescriptor
var file_proto_eth_v1_beacon_state_proto_rawDesc = []byte{
0x0a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x62,
0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e,
0x76, 0x31, 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, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f,
0x65, 0x78, 0x74, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x1e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f,
0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x1c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31,
0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0xa3, 0x0b, 0x0a, 0x0b, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65,
0x12, 0x21, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x54,
0x69, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x76,
0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x15, 0x67, 0x65,
0x6e, 0x65, 0x73, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52,
0x6f, 0x6f, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 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,
0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52,
0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x29, 0x0a, 0x04, 0x66, 0x6f, 0x72, 0x6b, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65,
0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x52, 0x04, 0x66, 0x6f, 0x72, 0x6b,
0x12, 0x52, 0x0a, 0x13, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e,
0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e,
0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65,
0x72, 0x52, 0x11, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65,
0x61, 0x64, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f,
0x6f, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x38,
0x31, 0x39, 0x32, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12,
0x29, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0x07,
0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x38, 0x31, 0x39, 0x32, 0x52, 0x0a,
0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x10, 0x68, 0x69,
0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0x08,
0x20, 0x03, 0x28, 0x0c, 0x42, 0x12, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x92, 0xb5, 0x18, 0x08,
0x31, 0x36, 0x37, 0x37, 0x37, 0x32, 0x31, 0x36, 0x52, 0x0f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72,
0x69, 0x63, 0x61, 0x6c, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x65, 0x74, 0x68,
0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65,
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x45,
0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74,
0x61, 0x12, 0x4b, 0x0a, 0x0f, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x76,
0x6f, 0x74, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x74, 0x68,
0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68,
0x31, 0x44, 0x61, 0x74, 0x61, 0x42, 0x08, 0x92, 0xb5, 0x18, 0x04, 0x31, 0x30, 0x32, 0x34, 0x52,
0x0d, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x2c,
0x0a, 0x12, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x69,
0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x65, 0x74, 0x68, 0x31,
0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x4d, 0x0a, 0x0a,
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e,
0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x11, 0x92, 0xb5,
0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52,
0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x2d, 0x0a, 0x08, 0x62,
0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x04, 0x42, 0x11, 0x92,
0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36,
0x52, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x0c, 0x72, 0x61,
0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x6d, 0x69, 0x78, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0c,
0x42, 0x09, 0x8a, 0xb5, 0x18, 0x05, 0x36, 0x35, 0x35, 0x33, 0x36, 0x52, 0x0b, 0x72, 0x61, 0x6e,
0x64, 0x61, 0x6f, 0x4d, 0x69, 0x78, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x09, 0x73, 0x6c, 0x61, 0x73,
0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x04, 0x42, 0x09, 0x8a, 0xb5, 0x18,
0x05, 0x36, 0x35, 0x35, 0x33, 0x36, 0x52, 0x09, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67,
0x73, 0x12, 0x6d, 0x0a, 0x1b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x65, 0x70,
0x6f, 0x63, 0x68, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75,
0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67,
0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0x92, 0xb5, 0x18,
0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x19, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x45,
0x70, 0x6f, 0x63, 0x68, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x12, 0x6b, 0x0a, 0x1a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63,
0x68, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x11,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x74,
0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0x92, 0xb5, 0x18, 0x04, 0x34,
0x30, 0x39, 0x36, 0x52, 0x18, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63,
0x68, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x67, 0x0a,
0x12, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62,
0x69, 0x74, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x38, 0x8a, 0xb5, 0x18, 0x01, 0x31,
0x82, 0xb5, 0x18, 0x2f, 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, 0x67, 0x6f, 0x2d,
0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, 0x76, 0x65, 0x63, 0x74,
0x6f, 0x72, 0x34, 0x52, 0x11, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x42, 0x69, 0x74, 0x73, 0x12, 0x5f, 0x0a, 0x1d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f,
0x75, 0x73, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65,
0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x13, 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, 0x1b, 0x70, 0x72, 0x65, 0x76,
0x69, 0x6f, 0x75, 0x73, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65,
0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x5d, 0x0a, 0x1c, 0x63, 0x75, 0x72, 0x72, 0x65,
0x6e, 0x74, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65,
0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x14, 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, 0x1a, 0x63, 0x75, 0x72, 0x72,
0x65, 0x6e, 0x74, 0x4a, 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, 0x15,
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, 0x22, 0xe5, 0x02, 0x0a, 0x12, 0x50, 0x65, 0x6e, 0x64, 0x69,
0x6e, 0x67, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x63, 0x0a,
0x10, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, 0x74,
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x32, 0x30, 0x34,
0x38, 0x82, 0xb5, 0x18, 0x2c, 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, 0x67, 0x6f,
0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, 0x6c, 0x69, 0x73,
0x74, 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69,
0x74, 0x73, 0x12, 0x34, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e,
0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61,
0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x55, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c,
0x75, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28,
0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 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,
0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52,
0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12,
0x5d, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65,
0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73,
0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52,
0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xf3,
0x01, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x4c, 0x0a, 0x05,
0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18,
0x32, 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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74,
0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e,
0x64, 0x65, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c,
0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65,
0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x56, 0x0a, 0x0a,
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04,
0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 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, 0x65,
0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61,
0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
0x74, 0x6f, 0x72, 0x73, 0x22, 0xad, 0x01, 0x0a, 0x04, 0x46, 0x6f, 0x72, 0x6b, 0x12, 0x30, 0x0a,
0x10, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x05, 0x8a, 0xb5, 0x18, 0x01, 0x34, 0x52, 0x0f,
0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
0x2e, 0x0a, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x05, 0x8a, 0xb5, 0x18, 0x01, 0x34, 0x52,
0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
0x43, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2d,
0x82, 0xb5, 0x18, 0x29, 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, 0x65, 0x74, 0x68,
0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x05, 0x65,
0x70, 0x6f, 0x63, 0x68, 0x42, 0x7b, 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, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
0x2c, 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, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
0x75, 0x6d, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0xaa, 0x02, 0x0f,
0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x76, 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 (
file_proto_eth_v1_beacon_state_proto_rawDescOnce sync.Once
file_proto_eth_v1_beacon_state_proto_rawDescData = file_proto_eth_v1_beacon_state_proto_rawDesc
)
func file_proto_eth_v1_beacon_state_proto_rawDescGZIP() []byte {
file_proto_eth_v1_beacon_state_proto_rawDescOnce.Do(func() {
file_proto_eth_v1_beacon_state_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_eth_v1_beacon_state_proto_rawDescData)
})
return file_proto_eth_v1_beacon_state_proto_rawDescData
}
var file_proto_eth_v1_beacon_state_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_proto_eth_v1_beacon_state_proto_goTypes = []interface{}{
(*BeaconState)(nil), // 0: ethereum.eth.v1.BeaconState
(*PendingAttestation)(nil), // 1: ethereum.eth.v1.PendingAttestation
(*Committee)(nil), // 2: ethereum.eth.v1.Committee
(*Fork)(nil), // 3: ethereum.eth.v1.Fork
(*BeaconBlockHeader)(nil), // 4: ethereum.eth.v1.BeaconBlockHeader
(*Eth1Data)(nil), // 5: ethereum.eth.v1.Eth1Data
(*Validator)(nil), // 6: ethereum.eth.v1.Validator
(*Checkpoint)(nil), // 7: ethereum.eth.v1.Checkpoint
(*AttestationData)(nil), // 8: ethereum.eth.v1.AttestationData
}
var file_proto_eth_v1_beacon_state_proto_depIdxs = []int32{
3, // 0: ethereum.eth.v1.BeaconState.fork:type_name -> ethereum.eth.v1.Fork
4, // 1: ethereum.eth.v1.BeaconState.latest_block_header:type_name -> ethereum.eth.v1.BeaconBlockHeader
5, // 2: ethereum.eth.v1.BeaconState.eth1_data:type_name -> ethereum.eth.v1.Eth1Data
5, // 3: ethereum.eth.v1.BeaconState.eth1_data_votes:type_name -> ethereum.eth.v1.Eth1Data
6, // 4: ethereum.eth.v1.BeaconState.validators:type_name -> ethereum.eth.v1.Validator
1, // 5: ethereum.eth.v1.BeaconState.previous_epoch_attestations:type_name -> ethereum.eth.v1.PendingAttestation
1, // 6: ethereum.eth.v1.BeaconState.current_epoch_attestations:type_name -> ethereum.eth.v1.PendingAttestation
7, // 7: ethereum.eth.v1.BeaconState.previous_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint
7, // 8: ethereum.eth.v1.BeaconState.current_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint
7, // 9: ethereum.eth.v1.BeaconState.finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint
8, // 10: ethereum.eth.v1.PendingAttestation.data:type_name -> ethereum.eth.v1.AttestationData
11, // [11:11] is the sub-list for method output_type
11, // [11:11] is the sub-list for method input_type
11, // [11:11] is the sub-list for extension type_name
11, // [11:11] is the sub-list for extension extendee
0, // [0:11] is the sub-list for field type_name
}
func init() { file_proto_eth_v1_beacon_state_proto_init() }
func file_proto_eth_v1_beacon_state_proto_init() {
if File_proto_eth_v1_beacon_state_proto != nil {
return
}
file_proto_eth_v1_attestation_proto_init()
file_proto_eth_v1_beacon_block_proto_init()
file_proto_eth_v1_validator_proto_init()
if !protoimpl.UnsafeEnabled {
file_proto_eth_v1_beacon_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BeaconState); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1_beacon_state_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PendingAttestation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1_beacon_state_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Committee); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1_beacon_state_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Fork); 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_state_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_proto_eth_v1_beacon_state_proto_goTypes,
DependencyIndexes: file_proto_eth_v1_beacon_state_proto_depIdxs,
MessageInfos: file_proto_eth_v1_beacon_state_proto_msgTypes,
}.Build()
File_proto_eth_v1_beacon_state_proto = out.File
file_proto_eth_v1_beacon_state_proto_rawDesc = nil
file_proto_eth_v1_beacon_state_proto_goTypes = nil
file_proto_eth_v1_beacon_state_proto_depIdxs = nil
}

View File

@@ -0,0 +1,3 @@
// +build ignore
package ignore

View File

@@ -0,0 +1,94 @@
// 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.v1;
import "google/protobuf/descriptor.proto";
import "proto/eth/ext/options.proto";
import "proto/eth/v1/attestation.proto";
import "proto/eth/v1/beacon_block.proto";
import "proto/eth/v1/validator.proto";
option csharp_namespace = "Ethereum.Eth.v1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1";
option java_multiple_files = true;
option java_outer_classname = "BeaconStateProto";
option java_package = "org.ethereum.eth.v1";
option php_namespace = "Ethereum\\Eth\\v1";
message BeaconState {
// Versioning
uint64 genesis_time = 1;
bytes genesis_validators_root = 2 [(ethereum.eth.ext.ssz_size) = "32"];
uint64 slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
Fork fork = 4;
// History
BeaconBlockHeader latest_block_header = 5;
repeated bytes block_roots = 6 [(ethereum.eth.ext.ssz_size) = "8192"];
repeated bytes state_roots = 7 [(ethereum.eth.ext.ssz_size) = "8192"];
repeated bytes historical_roots = 8 [(ethereum.eth.ext.ssz_size) = "32", (ethereum.eth.ext.ssz_max) = "16777216"];
// Eth1
Eth1Data eth1_data = 9;
repeated Eth1Data eth1_data_votes = 10 [(ethereum.eth.ext.ssz_max) = "1024"];
uint64 eth1_deposit_index = 11;
// Registry
repeated Validator validators = 12 [(ethereum.eth.ext.ssz_max) = "1099511627776"];
repeated uint64 balances = 13 [(ethereum.eth.ext.ssz_max) = "1099511627776"];
// Randomness
repeated bytes randao_mixes = 14 [(ethereum.eth.ext.ssz_size) = "65536"];
// Slashings
repeated uint64 slashings = 15 [(ethereum.eth.ext.ssz_size) = "65536"];
// Attestations
repeated PendingAttestation previous_epoch_attestations = 16 [(ethereum.eth.ext.ssz_max) = "4096"];
repeated PendingAttestation current_epoch_attestations = 17 [(ethereum.eth.ext.ssz_max) = "4096"];
// Finality
// Spec type [4]Bitvector which means this would be a fixed size of 4 bits.
bytes justification_bits = 18 [(ethereum.eth.ext.ssz_size) = "1", (ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/go-bitfield.Bitvector4"];
Checkpoint previous_justified_checkpoint = 19;
Checkpoint current_justified_checkpoint = 20;
Checkpoint finalized_checkpoint = 21;
}
message PendingAttestation {
// Bitfield representation of validator indices that have voted exactly
// the same vote and have been aggregated into this attestation.
bytes aggregation_bits = 1 [(ethereum.eth.ext.ssz_max) = "2048", (ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/go-bitfield.Bitlist"];
AttestationData data = 2;
// The difference of when attestation gets created and get included on chain.
uint64 inclusion_delay = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// The proposer who included the attestation in the block.
uint64 proposer_index = 4 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
message Committee {
uint64 index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.CommitteeIndex"];
uint64 slot = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
repeated uint64 validators = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
// Fork structure used for indicating beacon chain versioning and forks.
message Fork {
bytes previous_version = 1 [(ethereum.eth.ext.ssz_size) = "4"];
bytes current_version = 2 [(ethereum.eth.ext.ssz_size) = "4"];
uint64 epoch = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
}

File diff suppressed because it is too large Load Diff

1717
proto/eth/v1/node.pb.go generated Executable file

File diff suppressed because it is too large Load Diff

600
proto/eth/v1/node.pb.gw.go Executable file
View File

@@ -0,0 +1,600 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: proto/eth/v1/node.proto
/*
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package v1
import (
"context"
"github.com/golang/protobuf/ptypes/empty"
emptypb "github.com/golang/protobuf/ptypes/empty"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
"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"
"io"
"net/http"
)
// 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_eth2_types.Epoch(0)
var _ = emptypb.Empty{}
var _ = empty.Empty{}
func request_BeaconNode_GetIdentity_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.GetIdentity(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNode_GetIdentity_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.GetIdentity(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_BeaconNode_ListPeers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_BeaconNode_ListPeers_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq PeersRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconNode_ListPeers_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.ListPeers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNode_ListPeers_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq PeersRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconNode_ListPeers_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ListPeers(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconNode_GetPeer_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq PeerRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["peer_id"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "peer_id")
}
peer_id, err := runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "peer_id", err)
}
protoReq.PeerId = (peer_id)
msg, err := client.GetPeer(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNode_GetPeer_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq PeerRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["peer_id"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "peer_id")
}
peer_id, err := runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "peer_id", err)
}
protoReq.PeerId = (peer_id)
msg, err := server.GetPeer(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconNode_PeerCount_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.PeerCount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNode_PeerCount_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.PeerCount(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconNode_GetSyncStatus_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.GetSyncStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNode_GetSyncStatus_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.GetSyncStatus(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconNode_GetVersion_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.GetVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNode_GetVersion_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.GetVersion(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconNode_GetHealth_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconNodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.GetHealth(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconNode_GetHealth_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconNodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.GetHealth(ctx, &protoReq)
return msg, metadata, err
}
// RegisterBeaconNodeHandlerServer registers the http handlers for service BeaconNode to "mux".
// UnaryRPC :call BeaconNodeServer 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 RegisterBeaconNodeHandlerFromEndpoint instead.
func RegisterBeaconNodeHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BeaconNodeServer) error {
mux.Handle("GET", pattern_BeaconNode_GetIdentity_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.v1.BeaconNode/GetIdentity")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNode_GetIdentity_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_BeaconNode_GetIdentity_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNode_ListPeers_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.v1.BeaconNode/ListPeers")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNode_ListPeers_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_BeaconNode_ListPeers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNode_GetPeer_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.v1.BeaconNode/GetPeer")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNode_GetPeer_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_BeaconNode_GetPeer_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNode_PeerCount_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.v1.BeaconNode/PeerCount")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNode_PeerCount_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_BeaconNode_PeerCount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNode_GetSyncStatus_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.v1.BeaconNode/GetSyncStatus")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNode_GetSyncStatus_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_BeaconNode_GetSyncStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNode_GetVersion_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.v1.BeaconNode/GetVersion")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNode_GetVersion_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_BeaconNode_GetVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNode_GetHealth_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.v1.BeaconNode/GetHealth")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconNode_GetHealth_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_BeaconNode_GetHealth_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterBeaconNodeHandlerFromEndpoint is same as RegisterBeaconNodeHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterBeaconNodeHandlerFromEndpoint(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 RegisterBeaconNodeHandler(ctx, mux, conn)
}
// RegisterBeaconNodeHandler registers the http handlers for service BeaconNode to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterBeaconNodeHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterBeaconNodeHandlerClient(ctx, mux, NewBeaconNodeClient(conn))
}
// RegisterBeaconNodeHandlerClient registers the http handlers for service BeaconNode
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BeaconNodeClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BeaconNodeClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "BeaconNodeClient" to call the correct interceptors.
func RegisterBeaconNodeHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BeaconNodeClient) error {
mux.Handle("GET", pattern_BeaconNode_GetIdentity_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.v1.BeaconNode/GetIdentity")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNode_GetIdentity_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNode_GetIdentity_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNode_ListPeers_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.v1.BeaconNode/ListPeers")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNode_ListPeers_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNode_ListPeers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNode_GetPeer_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.v1.BeaconNode/GetPeer")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNode_GetPeer_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNode_GetPeer_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNode_PeerCount_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.v1.BeaconNode/PeerCount")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNode_PeerCount_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNode_PeerCount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNode_GetSyncStatus_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.v1.BeaconNode/GetSyncStatus")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNode_GetSyncStatus_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNode_GetSyncStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNode_GetVersion_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.v1.BeaconNode/GetVersion")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNode_GetVersion_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNode_GetVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconNode_GetHealth_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.v1.BeaconNode/GetHealth")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconNode_GetHealth_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconNode_GetHealth_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_BeaconNode_GetIdentity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1", "node", "identity"}, ""))
pattern_BeaconNode_ListPeers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1", "node", "peers"}, ""))
pattern_BeaconNode_GetPeer_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"eth", "v1", "node", "peers", "peer_id"}, ""))
pattern_BeaconNode_PeerCount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1", "node", "peer_count"}, ""))
pattern_BeaconNode_GetSyncStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1", "node", "syncing"}, ""))
pattern_BeaconNode_GetVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1", "node", "version"}, ""))
pattern_BeaconNode_GetHealth_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1", "node", "health"}, ""))
)
var (
forward_BeaconNode_GetIdentity_0 = runtime.ForwardResponseMessage
forward_BeaconNode_ListPeers_0 = runtime.ForwardResponseMessage
forward_BeaconNode_GetPeer_0 = runtime.ForwardResponseMessage
forward_BeaconNode_PeerCount_0 = runtime.ForwardResponseMessage
forward_BeaconNode_GetSyncStatus_0 = runtime.ForwardResponseMessage
forward_BeaconNode_GetVersion_0 = runtime.ForwardResponseMessage
forward_BeaconNode_GetHealth_0 = runtime.ForwardResponseMessage
)

197
proto/eth/v1/node.proto Normal file
View File

@@ -0,0 +1,197 @@
// 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.v1;
import "google/api/annotations.proto";
import "google/protobuf/descriptor.proto";
import "google/protobuf/empty.proto";
import "proto/eth/ext/options.proto";
option csharp_namespace = "Ethereum.Eth.v1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1";
option java_multiple_files = true;
option java_outer_classname = "BeaconNodeProto";
option java_package = "org.ethereum.eth.v1";
option php_namespace = "Ethereum\\Eth\\v1";
// 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.
rpc GetIdentity(google.protobuf.Empty) returns (IdentityResponse) {
option (google.api.http) = {get: "/eth/v1/node/identity"};
}
// ListPeers retrieves data about the node's network peers.
rpc ListPeers(PeersRequest) returns (PeersResponse) {
option (google.api.http) = {get: "/eth/v1/node/peers"};
}
// GetPeer retrieves data about the given peer.
rpc GetPeer(PeerRequest) returns (PeerResponse) {
option (google.api.http) = {get: "/eth/v1/node/peers/{peer_id}"};
}
// PeerCount retrieves number of known peers.
rpc PeerCount(google.protobuf.Empty) returns (PeerCountResponse) {
option (google.api.http) = {get: "/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.
rpc GetSyncStatus(google.protobuf.Empty) returns (SyncingResponse) {
option (google.api.http) = {get: "/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.
rpc GetVersion(google.protobuf.Empty) returns (VersionResponse) {
option (google.api.http) = {get: "/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
rpc GetHealth(google.protobuf.Empty) returns (google.protobuf.Empty) {
option (google.api.http) = {get: "/eth/v1/node/health"};
}
}
message IdentityResponse {
Identity data = 1;
}
message Identity {
// The peer id of the node.
string peer_id = 1;
// The latest ENR of the node.
string enr = 2;
// All the p2p multiaddresses of the peer, specified as a full multiaddr.
repeated string p2p_addresses = 3;
// All the discv5 multiaddresses of the peer, specified as a full multiaddr.
repeated string discovery_addresses = 4;
// Additional metadata that the node would like to provide. Includes extra networking information.
Metadata metadata = 5;
}
message Metadata {
// Sequence number starts at 0 used to version the node's metadata. If any other field in the local MetaData changes,
// the node MUST increment seq_number by 1.
uint64 seq_number = 1;
// Attnets is a bitvector representing the node's persistent attestation subnet subscriptions.
bytes attnets = 2 [(ethereum.eth.ext.ssz_size) = "8", (ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/go-bitfield.Bitvector64"];
}
message PeerRequest {
// Peer id of the peer requested.
string peer_id = 1;
}
message PeersRequest {
// Requested peer states (available values: disconnected, connecting, connected, disconnecting).
repeated ConnectionState state = 1;
// Requested peer directions (available values: inbound, outbound).
repeated PeerDirection direction = 2;
}
message PeerResponse {
Peer data = 1;
Meta meta = 2;
message Meta {
uint64 count = 1;
}
}
message PeersResponse {
repeated Peer data = 1;
}
message PeerCountResponse {
PeerCount data = 1;
message PeerCount {
// The number of disconnected peers.
uint64 disconnected = 1;
// The number of connecting peers.
uint64 connecting = 2;
// The number of connected peers.
uint64 connected = 3;
// The number of disconnecting peers.
uint64 disconnecting = 4;
}
}
// Peer provides details of a peer on the network.
message Peer {
// The peer id of the peer.
string peer_id = 1;
// The latest ENR of the peer that's in the record.
string enr = 2;
// The address of the peer, as a full multiaddr, for example:
// /ip4/37.221.192.134/tcp/13000/p2p/16Uiu2HAm8maLMjag1TAUM52zPfmLbVMGFdwUAWgoHu1HDQLR6e17
string last_seen_p2p_address = 3;
// The connection state of the peer at the moment of the request. (e.g. Connecting)
ConnectionState state = 4;
// The direction of the connection (inbound/outbound).
PeerDirection direction = 5;
}
// PeerDirection states the direction of the connection to a peer.
enum PeerDirection {
INBOUND = 0;
OUTBOUND = 1;
}
// ConnectionState states the current status of the peer.
enum ConnectionState {
DISCONNECTED = 0;
CONNECTING = 1;
CONNECTED = 2;
DISCONNECTING = 3;
}
message VersionResponse {
Version data = 1;
}
// Information about the node version.
message Version {
// A string that uniquely identifies the node and its version.
string version = 1;
}
message SyncingResponse {
SyncInfo data = 1;
}
message SyncInfo {
// A uint64 states the latest head slot of the current node.
uint64 head_slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// A uint64 indicating how many slots are left for the beacon node sync to complete.
uint64 sync_distance = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// A bool indicating whether the node is currently syncing or not.
bool is_syncing = 3;
}

Binary file not shown.

451
proto/eth/v1/validator.pb.go generated Executable file
View File

@@ -0,0 +1,451 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.15.8
// source: proto/eth/v1/validator.proto
package v1
import (
proto "github.com/golang/protobuf/proto"
_ "github.com/golang/protobuf/protoc-gen-go/descriptor"
github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
_ "github.com/prysmaticlabs/prysm/proto/eth/ext"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
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)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type ValidatorStatus int32
const (
ValidatorStatus_PENDING_INITIALIZED ValidatorStatus = 0
ValidatorStatus_PENDING_QUEUED ValidatorStatus = 1
ValidatorStatus_ACTIVE_ONGOING ValidatorStatus = 2
ValidatorStatus_ACTIVE_EXITING ValidatorStatus = 3
ValidatorStatus_ACTIVE_SLASHED ValidatorStatus = 4
ValidatorStatus_EXITED_UNSLASHED ValidatorStatus = 5
ValidatorStatus_EXITED_SLASHED ValidatorStatus = 6
ValidatorStatus_WITHDRAWAL_POSSIBLE ValidatorStatus = 7
ValidatorStatus_WITHDRAWAL_DONE ValidatorStatus = 8
ValidatorStatus_ACTIVE ValidatorStatus = 9
ValidatorStatus_PENDING ValidatorStatus = 10
ValidatorStatus_EXITED ValidatorStatus = 11
ValidatorStatus_WITHDRAWAL ValidatorStatus = 12
)
// Enum value maps for ValidatorStatus.
var (
ValidatorStatus_name = map[int32]string{
0: "PENDING_INITIALIZED",
1: "PENDING_QUEUED",
2: "ACTIVE_ONGOING",
3: "ACTIVE_EXITING",
4: "ACTIVE_SLASHED",
5: "EXITED_UNSLASHED",
6: "EXITED_SLASHED",
7: "WITHDRAWAL_POSSIBLE",
8: "WITHDRAWAL_DONE",
9: "ACTIVE",
10: "PENDING",
11: "EXITED",
12: "WITHDRAWAL",
}
ValidatorStatus_value = map[string]int32{
"PENDING_INITIALIZED": 0,
"PENDING_QUEUED": 1,
"ACTIVE_ONGOING": 2,
"ACTIVE_EXITING": 3,
"ACTIVE_SLASHED": 4,
"EXITED_UNSLASHED": 5,
"EXITED_SLASHED": 6,
"WITHDRAWAL_POSSIBLE": 7,
"WITHDRAWAL_DONE": 8,
"ACTIVE": 9,
"PENDING": 10,
"EXITED": 11,
"WITHDRAWAL": 12,
}
)
func (x ValidatorStatus) Enum() *ValidatorStatus {
p := new(ValidatorStatus)
*p = x
return p
}
func (x ValidatorStatus) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ValidatorStatus) Descriptor() protoreflect.EnumDescriptor {
return file_proto_eth_v1_validator_proto_enumTypes[0].Descriptor()
}
func (ValidatorStatus) Type() protoreflect.EnumType {
return &file_proto_eth_v1_validator_proto_enumTypes[0]
}
func (x ValidatorStatus) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ValidatorStatus.Descriptor instead.
func (ValidatorStatus) EnumDescriptor() ([]byte, []int) {
return file_proto_eth_v1_validator_proto_rawDescGZIP(), []int{0}
}
type ValidatorContainer struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Index github_com_prysmaticlabs_eth2_types.ValidatorIndex `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.ValidatorIndex"`
Balance uint64 `protobuf:"varint,2,opt,name=balance,proto3" json:"balance,omitempty"`
Status ValidatorStatus `protobuf:"varint,3,opt,name=status,proto3,enum=ethereum.eth.v1.ValidatorStatus" json:"status,omitempty"`
Validator *Validator `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"`
}
func (x *ValidatorContainer) Reset() {
*x = ValidatorContainer{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1_validator_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ValidatorContainer) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ValidatorContainer) ProtoMessage() {}
func (x *ValidatorContainer) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1_validator_proto_msgTypes[0]
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 ValidatorContainer.ProtoReflect.Descriptor instead.
func (*ValidatorContainer) Descriptor() ([]byte, []int) {
return file_proto_eth_v1_validator_proto_rawDescGZIP(), []int{0}
}
func (x *ValidatorContainer) GetIndex() github_com_prysmaticlabs_eth2_types.ValidatorIndex {
if x != nil {
return x.Index
}
return github_com_prysmaticlabs_eth2_types.ValidatorIndex(0)
}
func (x *ValidatorContainer) GetBalance() uint64 {
if x != nil {
return x.Balance
}
return 0
}
func (x *ValidatorContainer) GetStatus() ValidatorStatus {
if x != nil {
return x.Status
}
return ValidatorStatus_PENDING_INITIALIZED
}
func (x *ValidatorContainer) GetValidator() *Validator {
if x != nil {
return x.Validator
}
return nil
}
type Validator struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty" spec-name:"pubkey" ssz-size:"48"`
WithdrawalCredentials []byte `protobuf:"bytes,2,opt,name=withdrawal_credentials,json=withdrawalCredentials,proto3" json:"withdrawal_credentials,omitempty" ssz-size:"32"`
EffectiveBalance uint64 `protobuf:"varint,3,opt,name=effective_balance,json=effectiveBalance,proto3" json:"effective_balance,omitempty"`
Slashed bool `protobuf:"varint,4,opt,name=slashed,proto3" json:"slashed,omitempty"`
ActivationEligibilityEpoch github_com_prysmaticlabs_eth2_types.Epoch `protobuf:"varint,5,opt,name=activation_eligibility_epoch,json=activationEligibilityEpoch,proto3" json:"activation_eligibility_epoch,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Epoch"`
ActivationEpoch github_com_prysmaticlabs_eth2_types.Epoch `protobuf:"varint,6,opt,name=activation_epoch,json=activationEpoch,proto3" json:"activation_epoch,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Epoch"`
ExitEpoch github_com_prysmaticlabs_eth2_types.Epoch `protobuf:"varint,7,opt,name=exit_epoch,json=exitEpoch,proto3" json:"exit_epoch,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Epoch"`
WithdrawableEpoch github_com_prysmaticlabs_eth2_types.Epoch `protobuf:"varint,8,opt,name=withdrawable_epoch,json=withdrawableEpoch,proto3" json:"withdrawable_epoch,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Epoch"`
}
func (x *Validator) Reset() {
*x = Validator{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1_validator_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Validator) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Validator) ProtoMessage() {}
func (x *Validator) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1_validator_proto_msgTypes[1]
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 Validator.ProtoReflect.Descriptor instead.
func (*Validator) Descriptor() ([]byte, []int) {
return file_proto_eth_v1_validator_proto_rawDescGZIP(), []int{1}
}
func (x *Validator) GetPubkey() []byte {
if x != nil {
return x.Pubkey
}
return nil
}
func (x *Validator) GetWithdrawalCredentials() []byte {
if x != nil {
return x.WithdrawalCredentials
}
return nil
}
func (x *Validator) GetEffectiveBalance() uint64 {
if x != nil {
return x.EffectiveBalance
}
return 0
}
func (x *Validator) GetSlashed() bool {
if x != nil {
return x.Slashed
}
return false
}
func (x *Validator) GetActivationEligibilityEpoch() github_com_prysmaticlabs_eth2_types.Epoch {
if x != nil {
return x.ActivationEligibilityEpoch
}
return github_com_prysmaticlabs_eth2_types.Epoch(0)
}
func (x *Validator) GetActivationEpoch() github_com_prysmaticlabs_eth2_types.Epoch {
if x != nil {
return x.ActivationEpoch
}
return github_com_prysmaticlabs_eth2_types.Epoch(0)
}
func (x *Validator) GetExitEpoch() github_com_prysmaticlabs_eth2_types.Epoch {
if x != nil {
return x.ExitEpoch
}
return github_com_prysmaticlabs_eth2_types.Epoch(0)
}
func (x *Validator) GetWithdrawableEpoch() github_com_prysmaticlabs_eth2_types.Epoch {
if x != nil {
return x.WithdrawableEpoch
}
return github_com_prysmaticlabs_eth2_types.Epoch(0)
}
var File_proto_eth_v1_validator_proto protoreflect.FileDescriptor
var file_proto_eth_v1_validator_proto_rawDesc = []byte{
0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76,
0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f,
0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 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, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x65, 0x78, 0x74,
0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf0,
0x01, 0x0a, 0x12, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x74,
0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01,
0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x05, 0x69, 0x6e,
0x64, 0x65, 0x78, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x38, 0x0a,
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e,
0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e,
0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64,
0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x74, 0x68,
0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f,
0x72, 0x22, 0xb2, 0x04, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12,
0x28, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42,
0x10, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x9a, 0xb5, 0x18, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65,
0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x3d, 0x0a, 0x16, 0x77, 0x69, 0x74,
0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33,
0x32, 0x52, 0x15, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x43, 0x72, 0x65,
0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x66, 0x66, 0x65,
0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x04, 0x52, 0x10, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61,
0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x64,
0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x64, 0x12,
0x6f, 0x0a, 0x1c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6c,
0x69, 0x67, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18,
0x05, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2d, 0x82, 0xb5, 0x18, 0x29, 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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45,
0x70, 0x6f, 0x63, 0x68, 0x52, 0x1a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x45, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x70, 0x6f, 0x63, 0x68,
0x12, 0x58, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65,
0x70, 0x6f, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2d, 0x82, 0xb5, 0x18, 0x29,
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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79,
0x70, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x76,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x4c, 0x0a, 0x0a, 0x65, 0x78,
0x69, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2d,
0x82, 0xb5, 0x18, 0x29, 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, 0x65, 0x74, 0x68,
0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x09, 0x65,
0x78, 0x69, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x5c, 0x0a, 0x12, 0x77, 0x69, 0x74, 0x68,
0x64, 0x72, 0x61, 0x77, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x08,
0x20, 0x01, 0x28, 0x04, 0x42, 0x2d, 0x82, 0xb5, 0x18, 0x29, 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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x70,
0x6f, 0x63, 0x68, 0x52, 0x11, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x62, 0x6c,
0x65, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x2a, 0x87, 0x02, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64,
0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x45,
0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x45,
0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x51,
0x55, 0x45, 0x55, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x43, 0x54, 0x49, 0x56,
0x45, 0x5f, 0x4f, 0x4e, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x41,
0x43, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x45, 0x58, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12,
0x12, 0x0a, 0x0e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x53, 0x4c, 0x41, 0x53, 0x48, 0x45,
0x44, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x58, 0x49, 0x54, 0x45, 0x44, 0x5f, 0x55, 0x4e,
0x53, 0x4c, 0x41, 0x53, 0x48, 0x45, 0x44, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x58, 0x49,
0x54, 0x45, 0x44, 0x5f, 0x53, 0x4c, 0x41, 0x53, 0x48, 0x45, 0x44, 0x10, 0x06, 0x12, 0x17, 0x0a,
0x13, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x41, 0x4c, 0x5f, 0x50, 0x4f, 0x53, 0x53,
0x49, 0x42, 0x4c, 0x45, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52,
0x41, 0x57, 0x41, 0x4c, 0x5f, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x08, 0x12, 0x0a, 0x0a, 0x06, 0x41,
0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49,
0x4e, 0x47, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x58, 0x49, 0x54, 0x45, 0x44, 0x10, 0x0b,
0x12, 0x0e, 0x0a, 0x0a, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x41, 0x4c, 0x10, 0x0c,
0x42, 0x79, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d,
0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 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, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x61, 0x70, 0x69, 0x73,
0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65,
0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x76, 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 (
file_proto_eth_v1_validator_proto_rawDescOnce sync.Once
file_proto_eth_v1_validator_proto_rawDescData = file_proto_eth_v1_validator_proto_rawDesc
)
func file_proto_eth_v1_validator_proto_rawDescGZIP() []byte {
file_proto_eth_v1_validator_proto_rawDescOnce.Do(func() {
file_proto_eth_v1_validator_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_eth_v1_validator_proto_rawDescData)
})
return file_proto_eth_v1_validator_proto_rawDescData
}
var file_proto_eth_v1_validator_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_proto_eth_v1_validator_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_proto_eth_v1_validator_proto_goTypes = []interface{}{
(ValidatorStatus)(0), // 0: ethereum.eth.v1.ValidatorStatus
(*ValidatorContainer)(nil), // 1: ethereum.eth.v1.ValidatorContainer
(*Validator)(nil), // 2: ethereum.eth.v1.Validator
}
var file_proto_eth_v1_validator_proto_depIdxs = []int32{
0, // 0: ethereum.eth.v1.ValidatorContainer.status:type_name -> ethereum.eth.v1.ValidatorStatus
2, // 1: ethereum.eth.v1.ValidatorContainer.validator:type_name -> ethereum.eth.v1.Validator
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_proto_eth_v1_validator_proto_init() }
func file_proto_eth_v1_validator_proto_init() {
if File_proto_eth_v1_validator_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_proto_eth_v1_validator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ValidatorContainer); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1_validator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Validator); 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_validator_proto_rawDesc,
NumEnums: 1,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_proto_eth_v1_validator_proto_goTypes,
DependencyIndexes: file_proto_eth_v1_validator_proto_depIdxs,
EnumInfos: file_proto_eth_v1_validator_proto_enumTypes,
MessageInfos: file_proto_eth_v1_validator_proto_msgTypes,
}.Build()
File_proto_eth_v1_validator_proto = out.File
file_proto_eth_v1_validator_proto_rawDesc = nil
file_proto_eth_v1_validator_proto_goTypes = nil
file_proto_eth_v1_validator_proto_depIdxs = nil
}

View File

@@ -0,0 +1,3 @@
// +build ignore
package ignore

View File

@@ -0,0 +1,87 @@
// 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.v1;
import "google/protobuf/descriptor.proto";
import "proto/eth/ext/options.proto";
option csharp_namespace = "Ethereum.Eth.v1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1";
option java_multiple_files = true;
option java_outer_classname = "ValidatorProto";
option java_package = "org.ethereum.eth.v1";
option php_namespace = "Ethereum\\Eth\\v1";
message ValidatorContainer {
uint64 index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];;
uint64 balance = 2;
ValidatorStatus status = 3;
Validator validator = 4;
}
// An Ethereum 2.0 validator.
message Validator {
// 48 byte BLS public key used for the validator's activities.
bytes pubkey = 1 [(ethereum.eth.ext.ssz_size) = "48", (ethereum.eth.ext.spec_name) = "pubkey"];
// 32 byte hash of the withdrawal destination public key.
bytes withdrawal_credentials = 2 [(ethereum.eth.ext.ssz_size) = "32"];
// The validators current effective balance in gwei.
uint64 effective_balance = 3;
// Whether or not the validator has been slashed.
bool slashed = 4;
// Epoch when the validator became eligible for activation. This field may
// be zero if the validator was present in the Ethereum 2.0 genesis. This
// field is FAR_FUTURE_EPOCH if the validator has not been activated.
uint64 activation_eligibility_epoch = 5 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Epoch when the validator was activated. This field may be zero if the
// validator was present in the Ethereum 2.0 genesis. This field is
// FAR_FUTURE_EPOCH if the validator has not been activated.
uint64 activation_epoch = 6 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Epoch when the validator was exited. This field is FAR_FUTURE_EPOCH if
// the validator has not exited.
// FAR_FUTURE_EPOCH is a constant defined by the official Ethereum 2.0 specification:
// https://github.com/ethereum/eth2.0-specs/blob/v0.9.2/specs/core/0_beacon-chain.md#constants
uint64 exit_epoch = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Epoch when the validator is eligible to withdraw their funds. This field
// is FAR_FUTURE_EPOCH if the validator has not exited.
// FAR_FUTURE_EPOCH is a constant defined by the official Ethereum 2.0 specification:
// https://github.com/ethereum/eth2.0-specs/blob/v0.9.2/specs/core/0_beacon-chain.md#constants
uint64 withdrawable_epoch = 8 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
}
enum ValidatorStatus {
PENDING_INITIALIZED = 0;
PENDING_QUEUED = 1;
ACTIVE_ONGOING = 2;
ACTIVE_EXITING = 3;
ACTIVE_SLASHED = 4;
EXITED_UNSLASHED = 5;
EXITED_SLASHED = 6;
WITHDRAWAL_POSSIBLE = 7;
WITHDRAWAL_DONE = 8;
ACTIVE = 9;
PENDING = 10;
EXITED = 11;
WITHDRAWAL = 12;
}

1719
proto/eth/v1/validator_service.pb.go generated Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,758 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: proto/eth/v1/validator_service.proto
/*
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package v1
import (
"context"
"github.com/golang/protobuf/ptypes/empty"
emptypb "github.com/golang/protobuf/ptypes/empty"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
"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"
"io"
"net/http"
)
// 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_eth2_types.Epoch(0)
var _ = emptypb.Empty{}
var _ = empty.Empty{}
var (
filter_BeaconValidator_GetAttesterDuties_0 = &utilities.DoubleArray{Encoding: map[string]int{"epoch": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
)
func request_BeaconValidator_GetAttesterDuties_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq AttesterDutiesRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["epoch"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch")
}
epoch, err := runtime.Uint64(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch", err)
}
protoReq.Epoch = github_com_prysmaticlabs_eth2_types.Epoch(epoch)
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconValidator_GetAttesterDuties_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetAttesterDuties(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconValidator_GetAttesterDuties_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq AttesterDutiesRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["epoch"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch")
}
epoch, err := runtime.Uint64(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch", err)
}
protoReq.Epoch = github_com_prysmaticlabs_eth2_types.Epoch(epoch)
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconValidator_GetAttesterDuties_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetAttesterDuties(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconValidator_GetProposerDuties_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ProposerDutiesRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["epoch"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch")
}
epoch, err := runtime.Uint64(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch", err)
}
protoReq.Epoch = github_com_prysmaticlabs_eth2_types.Epoch(epoch)
msg, err := client.GetProposerDuties(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconValidator_GetProposerDuties_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ProposerDutiesRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["epoch"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch")
}
epoch, err := runtime.Uint64(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch", err)
}
protoReq.Epoch = github_com_prysmaticlabs_eth2_types.Epoch(epoch)
msg, err := server.GetProposerDuties(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_BeaconValidator_GetBlock_0 = &utilities.DoubleArray{Encoding: map[string]int{"slot": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
)
func request_BeaconValidator_GetBlock_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ProposerBlockRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["slot"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "slot")
}
slot, err := runtime.Uint64(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "slot", err)
}
protoReq.Slot = github_com_prysmaticlabs_eth2_types.Slot(slot)
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconValidator_GetBlock_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetBlock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconValidator_GetBlock_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ProposerBlockRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["slot"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "slot")
}
slot, err := runtime.Uint64(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "slot", err)
}
protoReq.Slot = github_com_prysmaticlabs_eth2_types.Slot(slot)
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconValidator_GetBlock_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetBlock(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_BeaconValidator_GetAttestationData_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_BeaconValidator_GetAttestationData_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq AttestationDataRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconValidator_GetAttestationData_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetAttestationData(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconValidator_GetAttestationData_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq AttestationDataRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconValidator_GetAttestationData_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetAttestationData(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_BeaconValidator_GetAggregateAttestation_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_BeaconValidator_GetAggregateAttestation_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq AggregateAttestationRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconValidator_GetAggregateAttestation_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetAggregateAttestation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconValidator_GetAggregateAttestation_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq AggregateAttestationRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconValidator_GetAggregateAttestation_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetAggregateAttestation(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconValidator_SubmitAggregateAndProofs_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq AggregateAndProofsSubmit
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Data); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.SubmitAggregateAndProofs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconValidator_SubmitAggregateAndProofs_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq AggregateAndProofsSubmit
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Data); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.SubmitAggregateAndProofs(ctx, &protoReq)
return msg, metadata, err
}
func request_BeaconValidator_SubmitBeaconCommitteeSubscription_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq BeaconCommitteeSubscribeSubmit
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Data); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.SubmitBeaconCommitteeSubscription(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_BeaconValidator_SubmitBeaconCommitteeSubscription_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq BeaconCommitteeSubscribeSubmit
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Data); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.SubmitBeaconCommitteeSubscription(ctx, &protoReq)
return msg, metadata, err
}
// RegisterBeaconValidatorHandlerServer registers the http handlers for service BeaconValidator to "mux".
// UnaryRPC :call BeaconValidatorServer 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 RegisterBeaconValidatorHandlerFromEndpoint instead.
func RegisterBeaconValidatorHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BeaconValidatorServer) error {
mux.Handle("GET", pattern_BeaconValidator_GetAttesterDuties_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.v1.BeaconValidator/GetAttesterDuties")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconValidator_GetAttesterDuties_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_BeaconValidator_GetAttesterDuties_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconValidator_GetProposerDuties_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.v1.BeaconValidator/GetProposerDuties")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconValidator_GetProposerDuties_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_BeaconValidator_GetProposerDuties_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconValidator_GetBlock_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.v1.BeaconValidator/GetBlock")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconValidator_GetBlock_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_BeaconValidator_GetBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconValidator_GetAttestationData_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.v1.BeaconValidator/GetAttestationData")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconValidator_GetAttestationData_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_BeaconValidator_GetAttestationData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconValidator_GetAggregateAttestation_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.v1.BeaconValidator/GetAggregateAttestation")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconValidator_GetAggregateAttestation_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_BeaconValidator_GetAggregateAttestation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconValidator_SubmitAggregateAndProofs_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.v1.BeaconValidator/SubmitAggregateAndProofs")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconValidator_SubmitAggregateAndProofs_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_BeaconValidator_SubmitAggregateAndProofs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconValidator_SubmitBeaconCommitteeSubscription_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.v1.BeaconValidator/SubmitBeaconCommitteeSubscription")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_BeaconValidator_SubmitBeaconCommitteeSubscription_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_BeaconValidator_SubmitBeaconCommitteeSubscription_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterBeaconValidatorHandlerFromEndpoint is same as RegisterBeaconValidatorHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterBeaconValidatorHandlerFromEndpoint(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 RegisterBeaconValidatorHandler(ctx, mux, conn)
}
// RegisterBeaconValidatorHandler registers the http handlers for service BeaconValidator to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterBeaconValidatorHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterBeaconValidatorHandlerClient(ctx, mux, NewBeaconValidatorClient(conn))
}
// RegisterBeaconValidatorHandlerClient registers the http handlers for service BeaconValidator
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BeaconValidatorClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BeaconValidatorClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "BeaconValidatorClient" to call the correct interceptors.
func RegisterBeaconValidatorHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BeaconValidatorClient) error {
mux.Handle("GET", pattern_BeaconValidator_GetAttesterDuties_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.v1.BeaconValidator/GetAttesterDuties")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconValidator_GetAttesterDuties_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconValidator_GetAttesterDuties_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconValidator_GetProposerDuties_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.v1.BeaconValidator/GetProposerDuties")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconValidator_GetProposerDuties_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconValidator_GetProposerDuties_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconValidator_GetBlock_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.v1.BeaconValidator/GetBlock")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconValidator_GetBlock_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconValidator_GetBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconValidator_GetAttestationData_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.v1.BeaconValidator/GetAttestationData")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconValidator_GetAttestationData_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconValidator_GetAttestationData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_BeaconValidator_GetAggregateAttestation_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.v1.BeaconValidator/GetAggregateAttestation")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconValidator_GetAggregateAttestation_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconValidator_GetAggregateAttestation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconValidator_SubmitAggregateAndProofs_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.v1.BeaconValidator/SubmitAggregateAndProofs")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconValidator_SubmitAggregateAndProofs_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconValidator_SubmitAggregateAndProofs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_BeaconValidator_SubmitBeaconCommitteeSubscription_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.v1.BeaconValidator/SubmitBeaconCommitteeSubscription")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_BeaconValidator_SubmitBeaconCommitteeSubscription_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_BeaconValidator_SubmitBeaconCommitteeSubscription_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_BeaconValidator_GetAttesterDuties_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"eth", "v1", "validator", "duties", "attester", "epoch"}, ""))
pattern_BeaconValidator_GetProposerDuties_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"eth", "v1", "validator", "duties", "proposer", "epoch"}, ""))
pattern_BeaconValidator_GetBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"eth", "v1", "validator", "blocks", "slot"}, ""))
pattern_BeaconValidator_GetAttestationData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1", "validator", "attestation_data"}, ""))
pattern_BeaconValidator_GetAggregateAttestation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1", "validator", "aggregate_attestation"}, ""))
pattern_BeaconValidator_SubmitAggregateAndProofs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1", "validator", "aggregate_and_proofs"}, ""))
pattern_BeaconValidator_SubmitBeaconCommitteeSubscription_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1", "validator", "beacon_committee_subscriptions"}, ""))
)
var (
forward_BeaconValidator_GetAttesterDuties_0 = runtime.ForwardResponseMessage
forward_BeaconValidator_GetProposerDuties_0 = runtime.ForwardResponseMessage
forward_BeaconValidator_GetBlock_0 = runtime.ForwardResponseMessage
forward_BeaconValidator_GetAttestationData_0 = runtime.ForwardResponseMessage
forward_BeaconValidator_GetAggregateAttestation_0 = runtime.ForwardResponseMessage
forward_BeaconValidator_SubmitAggregateAndProofs_0 = runtime.ForwardResponseMessage
forward_BeaconValidator_SubmitBeaconCommitteeSubscription_0 = runtime.ForwardResponseMessage
)

View File

@@ -0,0 +1,228 @@
// 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.v1;
import "google/api/annotations.proto";
import "google/protobuf/descriptor.proto";
import "google/protobuf/empty.proto";
import "proto/eth/ext/options.proto";
import "proto/eth/v1/attestation.proto";
import "proto/eth/v1/beacon_block.proto";
option csharp_namespace = "Ethereum.Eth.v1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1";
option java_multiple_files = true;
option java_outer_classname = "ValidatorServiceProto";
option java_package = "org.ethereum.eth.v1";
option php_namespace = "Ethereum\\Eth\\v1";
// Beacon chain validator API
//
// The beacon chain validator API is a set of endpoints to be used by validators for performing their roles.
//
// This service is defined in the upstream eth2.0-apis repository (eth2.0-APIs/apis/validator).
service BeaconValidator {
// GetAttesterDuties requests the beacon node to provide a set of attestation duties, which should be performed
// by validators, for a particular epoch. Duties should only need to be checked once per epoch, however
// a chain reorganization (of > MIN_SEED_LOOKAHEAD epochs) could occur, resulting in a change of duties.
// For full safety, you should monitor chain reorganization events.
rpc GetAttesterDuties(AttesterDutiesRequest) returns (AttesterDutiesResponse) {
option (google.api.http) = { get: "/eth/v1/validator/duties/attester/{epoch}" };
}
// GetProposerDuties requests beacon node to provide all validators that are scheduled to
// propose a block in the given epoch
rpc GetProposerDuties(ProposerDutiesRequest) returns (ProposerDutiesResponse) {
option (google.api.http) = { get: "/eth/v1/validator/duties/proposer/{epoch}" };
}
// GetBlock requests the beacon node to produce a valid unsigned beacon block,
// which can then be signed by a proposer and submitted.
rpc GetBlock(ProposerBlockRequest) returns (ProposerBlockResponse) {
option (google.api.http) = { get: "/eth/v1/validator/blocks/{slot}" };
}
// GetAttestationData requests that the beacon node provides the attestation data for
// the requested committee index and slot based on the nodes current head.
rpc GetAttestationData(AttestationDataRequest) returns (AttestationDataResponse) {
option (google.api.http) = { get: "/eth/v1/validator/attestation_data" };
}
// GetAggregateAttestation aggregates all attestations matching the given attestation data root and slot,
// returning the aggregated result.
rpc GetAggregateAttestation(AggregateAttestationRequest) returns (AttestationResponse) {
option (google.api.http) = { get: "/eth/v1/validator/aggregate_attestation" };
}
// SubmitAggregateAndProofs verifies given aggregate and proofs and publishes them on appropriate gossipsub topic.
//
// Response usage:
// - 200: Successful response
//
// - 400: Invalid request syntax.
//
// - 500: Beacon node internal error.
rpc SubmitAggregateAndProofs(AggregateAndProofsSubmit) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/eth/v1/validator/aggregate_and_proofs"
body: "data"
};
}
// SubmitBeaconCommitteeSubscription requests the beacon node to search using discv5 for peers related to
// the provided subnet information and replaces current peers with those ones if necessary.
//
// If validator is_aggregator, beacon node must:
// - announce subnet topic subscription on gossipsub.
// - aggregate attestations received on that subnet.
//
// Response usage:
// - 200: Slot signature is valid and beacon node has prepared the attestation subnet.
// Note that, we cannot be certain Beacon node will find peers for that subnet for various reasons.
//
// - 500: Beacon node internal error.
//
// - 503: Beacon node is currently syncing, try again later.
rpc SubmitBeaconCommitteeSubscription(BeaconCommitteeSubscribeSubmit) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/eth/v1/validator/beacon_committee_subscriptions"
body: "data"
};
}
}
message AttesterDutiesRequest {
// Epoch to request, should only be allowed 1 epoch ahead.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Validator index to request duties for.
repeated uint64 index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
message AttesterDutiesResponse {
bytes dependent_root = 1 [(ethereum.eth.ext.ssz_size) = "32"];
repeated AttesterDuty data = 2;
}
message AttesterDuty {
// 48 byte BLS public key for the validator who's assigned to perform a duty.
bytes pubkey = 1 [(ethereum.eth.ext.ssz_size) = "48"];
// The index of the validator in the beacon state.
uint64 validator_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// The index of the committee where the validator belongs to.
uint64 committee_index = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.CommitteeIndex"];
// The length of the committee the validator belongs to.
uint64 committee_length = 4;
// The total amount of committees for this slot.
uint64 committees_at_slot = 5;
// The index of the committee the validator belongs to.
uint64 validator_committee_index = 6 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.CommitteeIndex"];
// The slot this duty is for.
uint64 slot = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
}
message ProposerDutiesRequest {
// Epoch to request duties for.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
}
message ProposerDutiesResponse {
bytes dependent_root = 1 [(ethereum.eth.ext.ssz_size) = "32"];
repeated ProposerDuty data = 2;
}
message ProposerDuty {
// 48 byte BLS public key for the validator who's assigned to perform a duty.
bytes pubkey = 1 [(ethereum.eth.ext.ssz_size) = "48"];
// The index of the validator in the beacon state.
uint64 validator_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// The slot this duty is for.
uint64 slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
}
message ProposerBlockRequest {
// The slot to request a block for.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// The validators RANDAO reveal 96 byte value.
bytes randao_reveal = 2 [(ethereum.eth.ext.ssz_size) = "96"];
// 32 byte field of arbitrary data. This field may contain any data and
// is not used for anything other than a fun message.
bytes graffiti = 3 [(ethereum.eth.ext.ssz_size) = "32"];
}
message ProposerBlockResponse {
BeaconBlock data = 1;
}
message AttestationDataRequest {
// Slot for which the attestation data should be retrieved for.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// Committee index for which the attestation data should be retrieved for.
uint64 committee_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.CommitteeIndex"];
}
message AttestationDataResponse {
AttestationData data = 1;
}
message AggregateAttestationRequest {
// The root of the attestation data requesting the aggregate for.
bytes attestation_data_root = 1 [(ethereum.eth.ext.ssz_size) = "32"];
// The slot for the requested aggregate attestation.
uint64 slot = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
}
message AttestationResponse {
Attestation data = 1;
}
message AggregateAndProofsSubmit {
repeated SignedAggregateAttestationAndProof data = 1;
}
message BeaconCommitteeSubscribeSubmit {
repeated BeaconCommitteeSubscribe data = 1;
}
message BeaconCommitteeSubscribe {
// The validator index to subscribe for.
uint64 validator_index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// The committee index to be subscribed to.
uint64 committee_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.CommitteeIndex"];
// The total amount of committees for the given slot.
uint64 committees_at_slot = 3;
// The slot to be subscribed to.
uint64 slot = 4 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// If subscribing for aggregator, the beacon node will aggregate all attestations received.
bool is_aggregator = 5;
}

View File

@@ -0,0 +1 @@
# gazelle:ignore

View File

@@ -0,0 +1,4 @@
# gRPC Gateway
This package is contains generated files for applications that wish to use eth/v1alpha as a
[gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway).

553
proto/eth/v1alpha1/attestation.pb.go generated Executable file
View File

@@ -0,0 +1,553 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.15.8
// source: proto/eth/v1alpha1/attestation.proto
package eth
import (
proto "github.com/golang/protobuf/proto"
github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
github_com_prysmaticlabs_go_bitfield "github.com/prysmaticlabs/go-bitfield"
_ "github.com/prysmaticlabs/prysm/proto/eth/ext"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
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)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type Attestation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AggregationBits github_com_prysmaticlabs_go_bitfield.Bitlist `protobuf:"bytes,1,opt,name=aggregation_bits,json=aggregationBits,proto3" json:"aggregation_bits,omitempty" cast-type:"github.com/prysmaticlabs/go-bitfield.Bitlist" ssz-max:"2048"`
Data *AttestationData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"`
}
func (x *Attestation) Reset() {
*x = Attestation{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_attestation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Attestation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Attestation) ProtoMessage() {}
func (x *Attestation) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_attestation_proto_msgTypes[0]
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 Attestation.ProtoReflect.Descriptor instead.
func (*Attestation) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_attestation_proto_rawDescGZIP(), []int{0}
}
func (x *Attestation) GetAggregationBits() github_com_prysmaticlabs_go_bitfield.Bitlist {
if x != nil {
return x.AggregationBits
}
return github_com_prysmaticlabs_go_bitfield.Bitlist(nil)
}
func (x *Attestation) GetData() *AttestationData {
if x != nil {
return x.Data
}
return nil
}
func (x *Attestation) GetSignature() []byte {
if x != nil {
return x.Signature
}
return nil
}
type AggregateAttestationAndProof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AggregatorIndex github_com_prysmaticlabs_eth2_types.ValidatorIndex `protobuf:"varint,1,opt,name=aggregator_index,json=aggregatorIndex,proto3" json:"aggregator_index,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.ValidatorIndex"`
Aggregate *Attestation `protobuf:"bytes,3,opt,name=aggregate,proto3" json:"aggregate,omitempty"`
SelectionProof []byte `protobuf:"bytes,2,opt,name=selection_proof,json=selectionProof,proto3" json:"selection_proof,omitempty" ssz-size:"96"`
}
func (x *AggregateAttestationAndProof) Reset() {
*x = AggregateAttestationAndProof{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_attestation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AggregateAttestationAndProof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AggregateAttestationAndProof) ProtoMessage() {}
func (x *AggregateAttestationAndProof) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_attestation_proto_msgTypes[1]
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 AggregateAttestationAndProof.ProtoReflect.Descriptor instead.
func (*AggregateAttestationAndProof) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_attestation_proto_rawDescGZIP(), []int{1}
}
func (x *AggregateAttestationAndProof) GetAggregatorIndex() github_com_prysmaticlabs_eth2_types.ValidatorIndex {
if x != nil {
return x.AggregatorIndex
}
return github_com_prysmaticlabs_eth2_types.ValidatorIndex(0)
}
func (x *AggregateAttestationAndProof) GetAggregate() *Attestation {
if x != nil {
return x.Aggregate
}
return nil
}
func (x *AggregateAttestationAndProof) GetSelectionProof() []byte {
if x != nil {
return x.SelectionProof
}
return nil
}
type SignedAggregateAttestationAndProof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Message *AggregateAttestationAndProof `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"`
}
func (x *SignedAggregateAttestationAndProof) Reset() {
*x = SignedAggregateAttestationAndProof{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_attestation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SignedAggregateAttestationAndProof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SignedAggregateAttestationAndProof) ProtoMessage() {}
func (x *SignedAggregateAttestationAndProof) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_attestation_proto_msgTypes[2]
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 SignedAggregateAttestationAndProof.ProtoReflect.Descriptor instead.
func (*SignedAggregateAttestationAndProof) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_attestation_proto_rawDescGZIP(), []int{2}
}
func (x *SignedAggregateAttestationAndProof) GetMessage() *AggregateAttestationAndProof {
if x != nil {
return x.Message
}
return nil
}
func (x *SignedAggregateAttestationAndProof) GetSignature() []byte {
if x != nil {
return x.Signature
}
return nil
}
type AttestationData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Slot github_com_prysmaticlabs_eth2_types.Slot `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Slot"`
CommitteeIndex github_com_prysmaticlabs_eth2_types.CommitteeIndex `protobuf:"varint,2,opt,name=committee_index,json=committeeIndex,proto3" json:"committee_index,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.CommitteeIndex"`
BeaconBlockRoot []byte `protobuf:"bytes,3,opt,name=beacon_block_root,json=beaconBlockRoot,proto3" json:"beacon_block_root,omitempty" ssz-size:"32"`
Source *Checkpoint `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"`
Target *Checkpoint `protobuf:"bytes,5,opt,name=target,proto3" json:"target,omitempty"`
}
func (x *AttestationData) Reset() {
*x = AttestationData{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_attestation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AttestationData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AttestationData) ProtoMessage() {}
func (x *AttestationData) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_attestation_proto_msgTypes[3]
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 AttestationData.ProtoReflect.Descriptor instead.
func (*AttestationData) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_attestation_proto_rawDescGZIP(), []int{3}
}
func (x *AttestationData) GetSlot() github_com_prysmaticlabs_eth2_types.Slot {
if x != nil {
return x.Slot
}
return github_com_prysmaticlabs_eth2_types.Slot(0)
}
func (x *AttestationData) GetCommitteeIndex() github_com_prysmaticlabs_eth2_types.CommitteeIndex {
if x != nil {
return x.CommitteeIndex
}
return github_com_prysmaticlabs_eth2_types.CommitteeIndex(0)
}
func (x *AttestationData) GetBeaconBlockRoot() []byte {
if x != nil {
return x.BeaconBlockRoot
}
return nil
}
func (x *AttestationData) GetSource() *Checkpoint {
if x != nil {
return x.Source
}
return nil
}
func (x *AttestationData) GetTarget() *Checkpoint {
if x != nil {
return x.Target
}
return nil
}
type Checkpoint struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Epoch github_com_prysmaticlabs_eth2_types.Epoch `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Epoch"`
Root []byte `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty" ssz-size:"32"`
}
func (x *Checkpoint) Reset() {
*x = Checkpoint{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_attestation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Checkpoint) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Checkpoint) ProtoMessage() {}
func (x *Checkpoint) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_attestation_proto_msgTypes[4]
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 Checkpoint.ProtoReflect.Descriptor instead.
func (*Checkpoint) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_attestation_proto_rawDescGZIP(), []int{4}
}
func (x *Checkpoint) GetEpoch() github_com_prysmaticlabs_eth2_types.Epoch {
if x != nil {
return x.Epoch
}
return github_com_prysmaticlabs_eth2_types.Epoch(0)
}
func (x *Checkpoint) GetRoot() []byte {
if x != nil {
return x.Root
}
return nil
}
var File_proto_eth_v1alpha1_attestation_proto protoreflect.FileDescriptor
var file_proto_eth_v1alpha1_attestation_proto_rawDesc = []byte{
0x0a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c,
0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d,
0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x65, 0x78, 0x74, 0x2f, 0x6f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd4, 0x01, 0x0a, 0x0b, 0x41,
0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x63, 0x0a, 0x10, 0x61, 0x67,
0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0c, 0x42, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x32, 0x30, 0x34, 0x38, 0x82, 0xb5,
0x18, 0x2c, 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, 0x67, 0x6f, 0x2d, 0x62, 0x69,
0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x0f,
0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x74, 0x73, 0x12,
0x3a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e,
0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61,
0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x09, 0x73,
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06,
0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
0x65, 0x22, 0xf4, 0x01, 0x0a, 0x1c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41,
0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f,
0x6f, 0x66, 0x12, 0x61, 0x0a, 0x10, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72,
0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5,
0x18, 0x32, 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, 0x65, 0x74, 0x68, 0x32, 0x2d,
0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49,
0x6e, 0x64, 0x65, 0x78, 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72,
0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x40, 0x0a, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61,
0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72,
0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x61, 0x67,
0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x0f, 0x73, 0x65, 0x6c, 0x65, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0e, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x99, 0x01, 0x0a, 0x22, 0x53, 0x69, 0x67,
0x6e, 0x65, 0x64, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65,
0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12,
0x4d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x33, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e,
0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61,
0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64,
0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24,
0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61,
0x74, 0x75, 0x72, 0x65, 0x22, 0xde, 0x02, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e,
0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x5f, 0x0a, 0x0f, 0x63, 0x6f,
0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20,
0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d,
0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x63, 0x6f, 0x6d,
0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x32, 0x0a, 0x11, 0x62,
0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0f,
0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12,
0x39, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76,
0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69,
0x6e, 0x74, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x74, 0x61,
0x72, 0x67, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68,
0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x74,
0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x6d, 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f,
0x69, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01,
0x28, 0x04, 0x42, 0x2d, 0x82, 0xb5, 0x18, 0x29, 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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63,
0x68, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x1a, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x04,
0x72, 0x6f, 0x6f, 0x74, 0x42, 0x97, 0x01, 0x0a, 0x19, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68,
0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
0x61, 0x31, 0x42, 0x10, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50,
0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 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, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x74,
0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x65, 0x74, 0x68, 0xaa, 0x02,
0x15, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x76, 0x31,
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75,
0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_proto_eth_v1alpha1_attestation_proto_rawDescOnce sync.Once
file_proto_eth_v1alpha1_attestation_proto_rawDescData = file_proto_eth_v1alpha1_attestation_proto_rawDesc
)
func file_proto_eth_v1alpha1_attestation_proto_rawDescGZIP() []byte {
file_proto_eth_v1alpha1_attestation_proto_rawDescOnce.Do(func() {
file_proto_eth_v1alpha1_attestation_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_eth_v1alpha1_attestation_proto_rawDescData)
})
return file_proto_eth_v1alpha1_attestation_proto_rawDescData
}
var file_proto_eth_v1alpha1_attestation_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_proto_eth_v1alpha1_attestation_proto_goTypes = []interface{}{
(*Attestation)(nil), // 0: ethereum.eth.v1alpha1.Attestation
(*AggregateAttestationAndProof)(nil), // 1: ethereum.eth.v1alpha1.AggregateAttestationAndProof
(*SignedAggregateAttestationAndProof)(nil), // 2: ethereum.eth.v1alpha1.SignedAggregateAttestationAndProof
(*AttestationData)(nil), // 3: ethereum.eth.v1alpha1.AttestationData
(*Checkpoint)(nil), // 4: ethereum.eth.v1alpha1.Checkpoint
}
var file_proto_eth_v1alpha1_attestation_proto_depIdxs = []int32{
3, // 0: ethereum.eth.v1alpha1.Attestation.data:type_name -> ethereum.eth.v1alpha1.AttestationData
0, // 1: ethereum.eth.v1alpha1.AggregateAttestationAndProof.aggregate:type_name -> ethereum.eth.v1alpha1.Attestation
1, // 2: ethereum.eth.v1alpha1.SignedAggregateAttestationAndProof.message:type_name -> ethereum.eth.v1alpha1.AggregateAttestationAndProof
4, // 3: ethereum.eth.v1alpha1.AttestationData.source:type_name -> ethereum.eth.v1alpha1.Checkpoint
4, // 4: ethereum.eth.v1alpha1.AttestationData.target:type_name -> ethereum.eth.v1alpha1.Checkpoint
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_proto_eth_v1alpha1_attestation_proto_init() }
func file_proto_eth_v1alpha1_attestation_proto_init() {
if File_proto_eth_v1alpha1_attestation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_proto_eth_v1alpha1_attestation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Attestation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1alpha1_attestation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AggregateAttestationAndProof); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1alpha1_attestation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SignedAggregateAttestationAndProof); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1alpha1_attestation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AttestationData); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1alpha1_attestation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Checkpoint); 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_v1alpha1_attestation_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_proto_eth_v1alpha1_attestation_proto_goTypes,
DependencyIndexes: file_proto_eth_v1alpha1_attestation_proto_depIdxs,
MessageInfos: file_proto_eth_v1alpha1_attestation_proto_msgTypes,
}.Build()
File_proto_eth_v1alpha1_attestation_proto = out.File
file_proto_eth_v1alpha1_attestation_proto_rawDesc = nil
file_proto_eth_v1alpha1_attestation_proto_goTypes = nil
file_proto_eth_v1alpha1_attestation_proto_depIdxs = nil
}

View File

@@ -0,0 +1,3 @@
// +build ignore
package ignore

View File

@@ -0,0 +1,86 @@
// 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.v1alpha1;
import "proto/eth/ext/options.proto";
option csharp_namespace = "Ethereum.Eth.v1alpha1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth";
option java_multiple_files = true;
option java_outer_classname = "AttestationProto";
option java_package = "org.ethereum.eth.v1alpha1";
option php_namespace = "Ethereum\\Eth\\v1alpha1";
message Attestation {
// A bitfield representation of validator indices that have voted exactly
// the same vote and have been aggregated into this attestation.
bytes aggregation_bits = 1 [(ethereum.eth.ext.ssz_max) = "2048", (ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/go-bitfield.Bitlist"];
AttestationData data = 2;
// 96 byte BLS aggregate signature.
bytes signature = 3 [(ethereum.eth.ext.ssz_size) = "96"];
}
message AggregateAttestationAndProof {
// The aggregator index that submitted this aggregated attestation and proof.
uint64 aggregator_index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// The aggregated attestation that was submitted.
Attestation aggregate = 3;
// 96 byte selection proof signed by the aggregator, which is the signature of the slot to aggregate.
bytes selection_proof = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}
message SignedAggregateAttestationAndProof {
// The aggregated attestation and selection proof itself.
AggregateAttestationAndProof message = 1;
// 96 byte BLS aggregate signature signed by the aggregator over the message.
bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}
message AttestationData {
// Attestation data includes information on Casper the Friendly Finality Gadget's votes
// See: https://arxiv.org/pdf/1710.09437.pdf
// Slot of the attestation attesting for.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// The committee index that submitted this attestation.
uint64 committee_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.CommitteeIndex"];
// 32 byte root of the LMD GHOST block vote.
bytes beacon_block_root = 3 [(ethereum.eth.ext.ssz_size) = "32"];
// The most recent justified checkpoint in the beacon state
Checkpoint source = 4;
// The checkpoint attempting to be justified for the current epoch and its epoch boundary block
Checkpoint target = 5;
}
message Checkpoint {
// A checkpoint is every epoch's first slot. The goal of Casper FFG
// is to link the check points together for justification and finalization.
// Epoch the checkpoint references.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Block root of the checkpoint references.
bytes root = 2 [(ethereum.eth.ext.ssz_size) = "32"];
}

1302
proto/eth/v1alpha1/beacon_block.pb.go generated Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
// +build ignore
package ignore

View File

@@ -0,0 +1,199 @@
// 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.v1alpha1;
import "proto/eth/ext/options.proto";
import "proto/eth/v1alpha1/attestation.proto";
option csharp_namespace = "Ethereum.Eth.v1alpha1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth";
option java_multiple_files = true;
option java_outer_classname = "BeaconBlockProto";
option java_package = "org.ethereum.eth.v1alpha1";
option php_namespace = "Ethereum\\Eth\\v1alpha1";
// The Ethereum 2.0 beacon block. The message does not contain a validator signature.
message BeaconBlock {
// Beacon chain slot that this block represents.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// Validator index of the validator that proposed the block header.
uint64 proposer_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// 32 byte root of the parent block.
bytes parent_root = 3 [(ethereum.eth.ext.ssz_size) = "32"];
// 32 byte root of the resulting state after processing this block.
bytes state_root = 4 [(ethereum.eth.ext.ssz_size) = "32"];
// The block body itself.
BeaconBlockBody body = 5;
}
// The signed version of beacon block.
message SignedBeaconBlock {
// The unsigned beacon block itself.
BeaconBlock block = 1;
// 96 byte BLS signature from the validator that produced this block.
bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}
// The block body of an Ethereum 2.0 beacon block.
message BeaconBlockBody {
// The validators RANDAO reveal 96 byte value.
bytes randao_reveal = 1 [(ethereum.eth.ext.ssz_size) = "96"];
// A reference to the Ethereum 1.x chain.
Eth1Data eth1_data = 2;
// 32 byte field of arbitrary data. This field may contain any data and
// is not used for anything other than a fun message.
bytes graffiti = 3 [(ethereum.eth.ext.ssz_size) = "32"];
// Block operations
// Refer to spec constants at https://github.com/ethereum/eth2.0-specs/blob/dev/specs/core/0_beacon-chain.md#max-operations-per-block
// At most MAX_PROPOSER_SLASHINGS.
repeated ProposerSlashing proposer_slashings = 4 [(ethereum.eth.ext.ssz_max) = "16"];
// At most MAX_ATTESTER_SLASHINGS.
repeated AttesterSlashing attester_slashings = 5 [(ethereum.eth.ext.ssz_max) = "2"];
// At most MAX_ATTESTATIONS.
repeated Attestation attestations = 6 [(ethereum.eth.ext.ssz_max) = "128"];
// At most MAX_DEPOSITS.
repeated Deposit deposits = 7 [(ethereum.eth.ext.ssz_max) = "16"];
// At most MAX_VOLUNTARY_EXITS.
repeated SignedVoluntaryExit voluntary_exits = 8 [(ethereum.eth.ext.ssz_max) = "16"];
}
// Proposer slashings are proofs that a slashable offense has been committed by
// proposing two conflicting blocks from the same validator.
message ProposerSlashing {
// First conflicting signed block header.
SignedBeaconBlockHeader header_1 = 2;
// Second conflicting signed block header.
SignedBeaconBlockHeader header_2 = 3;
}
// Attestor slashings are proofs that a slashable offense has been committed by
// attestating to two conflicting pieces of information by the same validator.
message AttesterSlashing {
// First conflicting attestation.
IndexedAttestation attestation_1 = 1;
// Second conflicting attestation.
IndexedAttestation attestation_2 = 2;
}
// Deposit into the Ethereum 2.0 from the Ethereum 1.x deposit contract.
message Deposit {
// DepositData that is encoded into a deposit signature.
message Data {
// 48 byte BLS public key of the validator.
bytes public_key = 1 [(ethereum.eth.ext.ssz_size) = "48", (ethereum.eth.ext.spec_name) = "pubkey"];
// A 32 byte hash of the withdrawal address public key.
bytes withdrawal_credentials = 2 [(ethereum.eth.ext.ssz_size) = "32"];
// Deposit amount in gwei.
uint64 amount = 3;
// 96 byte signature from the validators public key.
bytes signature = 4 [(ethereum.eth.ext.ssz_size) = "96"];
}
// 32 byte roots in the deposit tree branch.
repeated bytes proof = 1 [(ethereum.eth.ext.ssz_size) = "33,32"];
Data data = 2;
}
// A message that represents a validator signaling that they want to voluntarily
// withdraw from the active validator set. The message does not contain a
// validator signature.
message VoluntaryExit {
// The epoch on when exit request becomes valid.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Index of the exiting validator.
uint64 validator_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
// The signed version of voluntary exit.
message SignedVoluntaryExit {
// The unsigned voluntary exit itself.
VoluntaryExit exit = 1;
// Validator's 96 byte signature
bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}
// Eth1Data represents references to the Ethereum 1.x deposit contract.
message Eth1Data {
// The 32 byte deposit tree root for the last deposit included in this
// block.
bytes deposit_root = 1 [(ethereum.eth.ext.ssz_size) = "32"];
// The total number of deposits included in the beacon chain since genesis
// including the deposits in this block.
uint64 deposit_count = 2;
// The 32 byte block hash of the Ethereum 1.x block considered for deposit
// inclusion.
bytes block_hash = 3 [(ethereum.eth.ext.ssz_size) = "32"];
}
// A beacon block header is essentially a beacon block with only a reference to
// the beacon body as a 32 byte merkle tree root. This type of message is more
// lightweight than a full beacon block. The message does not contain
// a validator signature.
message BeaconBlockHeader {
// Beacon chain slot that this block represents.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// Validator index of the validator that proposed the block header.
uint64 proposer_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// 32 byte merkle tree root of the parent ssz encoded block.
bytes parent_root = 3 [(ethereum.eth.ext.ssz_size) = "32"];
// 32 byte merkle tree root of the resulting ssz encoded state after processing this block.
bytes state_root = 4 [(ethereum.eth.ext.ssz_size) = "32"];
// 32 byte merkle tree root of the ssz encoded block body.
bytes body_root = 5 [(ethereum.eth.ext.ssz_size) = "32"];
}
message SignedBeaconBlockHeader {
// The unsigned beacon block header itself.
BeaconBlockHeader header = 1;
// 96 byte BLS signature from the validator that produced this block header.
bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}
message IndexedAttestation {
repeated uint64 attesting_indices = 1 [(ethereum.eth.ext.ssz_max) = "2048"];
AttestationData data = 2;
// 96 bytes aggregate signature.
bytes signature = 3 [(ethereum.eth.ext.ssz_size) = "96"];
}

558
proto/eth/v1alpha1/beacon_block_altair.pb.go generated Executable file
View File

@@ -0,0 +1,558 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.15.8
// source: proto/eth/v1alpha1/beacon_block_altair.proto
package eth
import (
proto "github.com/golang/protobuf/proto"
github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
github_com_prysmaticlabs_go_bitfield "github.com/prysmaticlabs/go-bitfield"
_ "github.com/prysmaticlabs/prysm/proto/eth/ext"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
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)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type SignedBeaconBlockAltair struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Block *BeaconBlockAltair `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"`
}
func (x *SignedBeaconBlockAltair) Reset() {
*x = SignedBeaconBlockAltair{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SignedBeaconBlockAltair) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SignedBeaconBlockAltair) ProtoMessage() {}
func (x *SignedBeaconBlockAltair) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[0]
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 SignedBeaconBlockAltair.ProtoReflect.Descriptor instead.
func (*SignedBeaconBlockAltair) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescGZIP(), []int{0}
}
func (x *SignedBeaconBlockAltair) GetBlock() *BeaconBlockAltair {
if x != nil {
return x.Block
}
return nil
}
func (x *SignedBeaconBlockAltair) GetSignature() []byte {
if x != nil {
return x.Signature
}
return nil
}
type BeaconBlockAltair struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Slot github_com_prysmaticlabs_eth2_types.Slot `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Slot"`
ProposerIndex github_com_prysmaticlabs_eth2_types.ValidatorIndex `protobuf:"varint,2,opt,name=proposer_index,json=proposerIndex,proto3" json:"proposer_index,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.ValidatorIndex"`
ParentRoot []byte `protobuf:"bytes,3,opt,name=parent_root,json=parentRoot,proto3" json:"parent_root,omitempty" ssz-size:"32"`
StateRoot []byte `protobuf:"bytes,4,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty" ssz-size:"32"`
Body *BeaconBlockBodyAltair `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
}
func (x *BeaconBlockAltair) Reset() {
*x = BeaconBlockAltair{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BeaconBlockAltair) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BeaconBlockAltair) ProtoMessage() {}
func (x *BeaconBlockAltair) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[1]
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 BeaconBlockAltair.ProtoReflect.Descriptor instead.
func (*BeaconBlockAltair) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescGZIP(), []int{1}
}
func (x *BeaconBlockAltair) GetSlot() github_com_prysmaticlabs_eth2_types.Slot {
if x != nil {
return x.Slot
}
return github_com_prysmaticlabs_eth2_types.Slot(0)
}
func (x *BeaconBlockAltair) GetProposerIndex() github_com_prysmaticlabs_eth2_types.ValidatorIndex {
if x != nil {
return x.ProposerIndex
}
return github_com_prysmaticlabs_eth2_types.ValidatorIndex(0)
}
func (x *BeaconBlockAltair) GetParentRoot() []byte {
if x != nil {
return x.ParentRoot
}
return nil
}
func (x *BeaconBlockAltair) GetStateRoot() []byte {
if x != nil {
return x.StateRoot
}
return nil
}
func (x *BeaconBlockAltair) GetBody() *BeaconBlockBodyAltair {
if x != nil {
return x.Body
}
return nil
}
type BeaconBlockBodyAltair struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RandaoReveal []byte `protobuf:"bytes,1,opt,name=randao_reveal,json=randaoReveal,proto3" json:"randao_reveal,omitempty" ssz-size:"96"`
Eth1Data *Eth1Data `protobuf:"bytes,2,opt,name=eth1_data,json=eth1Data,proto3" json:"eth1_data,omitempty"`
Graffiti []byte `protobuf:"bytes,3,opt,name=graffiti,proto3" json:"graffiti,omitempty" ssz-size:"32"`
ProposerSlashings []*ProposerSlashing `protobuf:"bytes,4,rep,name=proposer_slashings,json=proposerSlashings,proto3" json:"proposer_slashings,omitempty" ssz-max:"16"`
AttesterSlashings []*AttesterSlashing `protobuf:"bytes,5,rep,name=attester_slashings,json=attesterSlashings,proto3" json:"attester_slashings,omitempty" ssz-max:"2"`
Attestations []*Attestation `protobuf:"bytes,6,rep,name=attestations,proto3" json:"attestations,omitempty" ssz-max:"128"`
Deposits []*Deposit `protobuf:"bytes,7,rep,name=deposits,proto3" json:"deposits,omitempty" ssz-max:"16"`
VoluntaryExits []*SignedVoluntaryExit `protobuf:"bytes,8,rep,name=voluntary_exits,json=voluntaryExits,proto3" json:"voluntary_exits,omitempty" ssz-max:"16"`
SyncAggregate *SyncAggregate `protobuf:"bytes,9,opt,name=sync_aggregate,json=syncAggregate,proto3" json:"sync_aggregate,omitempty"`
}
func (x *BeaconBlockBodyAltair) Reset() {
*x = BeaconBlockBodyAltair{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BeaconBlockBodyAltair) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BeaconBlockBodyAltair) ProtoMessage() {}
func (x *BeaconBlockBodyAltair) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[2]
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 BeaconBlockBodyAltair.ProtoReflect.Descriptor instead.
func (*BeaconBlockBodyAltair) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescGZIP(), []int{2}
}
func (x *BeaconBlockBodyAltair) GetRandaoReveal() []byte {
if x != nil {
return x.RandaoReveal
}
return nil
}
func (x *BeaconBlockBodyAltair) GetEth1Data() *Eth1Data {
if x != nil {
return x.Eth1Data
}
return nil
}
func (x *BeaconBlockBodyAltair) GetGraffiti() []byte {
if x != nil {
return x.Graffiti
}
return nil
}
func (x *BeaconBlockBodyAltair) GetProposerSlashings() []*ProposerSlashing {
if x != nil {
return x.ProposerSlashings
}
return nil
}
func (x *BeaconBlockBodyAltair) GetAttesterSlashings() []*AttesterSlashing {
if x != nil {
return x.AttesterSlashings
}
return nil
}
func (x *BeaconBlockBodyAltair) GetAttestations() []*Attestation {
if x != nil {
return x.Attestations
}
return nil
}
func (x *BeaconBlockBodyAltair) GetDeposits() []*Deposit {
if x != nil {
return x.Deposits
}
return nil
}
func (x *BeaconBlockBodyAltair) GetVoluntaryExits() []*SignedVoluntaryExit {
if x != nil {
return x.VoluntaryExits
}
return nil
}
func (x *BeaconBlockBodyAltair) GetSyncAggregate() *SyncAggregate {
if x != nil {
return x.SyncAggregate
}
return nil
}
type SyncAggregate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SyncCommitteeBits github_com_prysmaticlabs_go_bitfield.Bitvector512 `protobuf:"bytes,1,opt,name=sync_committee_bits,json=syncCommitteeBits,proto3" json:"sync_committee_bits,omitempty" cast-type:"github.com/prysmaticlabs/go-bitfield.Bitvector512" ssz-size:"64"`
SyncCommitteeSignature []byte `protobuf:"bytes,2,opt,name=sync_committee_signature,json=syncCommitteeSignature,proto3" json:"sync_committee_signature,omitempty" ssz-size:"96"`
}
func (x *SyncAggregate) Reset() {
*x = SyncAggregate{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncAggregate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncAggregate) ProtoMessage() {}
func (x *SyncAggregate) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[3]
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 SyncAggregate.ProtoReflect.Descriptor instead.
func (*SyncAggregate) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescGZIP(), []int{3}
}
func (x *SyncAggregate) GetSyncCommitteeBits() github_com_prysmaticlabs_go_bitfield.Bitvector512 {
if x != nil {
return x.SyncCommitteeBits
}
return github_com_prysmaticlabs_go_bitfield.Bitvector512(nil)
}
func (x *SyncAggregate) GetSyncCommitteeSignature() []byte {
if x != nil {
return x.SyncCommitteeSignature
}
return nil
}
var File_proto_eth_v1alpha1_beacon_block_altair_proto protoreflect.FileDescriptor
var file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDesc = []byte{
0x0a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c,
0x70, 0x68, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63,
0x6b, 0x5f, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15,
0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61,
0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68,
0x2f, 0x65, 0x78, 0x74, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31,
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x61,
0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x7f, 0x0a, 0x17, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42,
0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x3e, 0x0a, 0x05, 0x62, 0x6c,
0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65,
0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74,
0x61, 0x69, 0x72, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69,
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a,
0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
0x22, 0xc6, 0x02, 0x0a, 0x11, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c,
0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x5d, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70,
0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04,
0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 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, 0x65,
0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61,
0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73,
0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 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, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74,
0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18,
0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d,
0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65,
0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x41, 0x6c, 0x74,
0x61, 0x69, 0x72, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0xa4, 0x05, 0x0a, 0x15, 0x42, 0x65,
0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x41, 0x6c, 0x74,
0x61, 0x69, 0x72, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65,
0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02,
0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c,
0x12, 0x3c, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65,
0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31,
0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22,
0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c,
0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69,
0x74, 0x69, 0x12, 0x5e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x73,
0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27,
0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31,
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53,
0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52,
0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e,
0x67, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73,
0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27,
0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31,
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53,
0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x32, 0x52, 0x11,
0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67,
0x73, 0x12, 0x4f, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x92, 0xb5, 0x18,
0x03, 0x31, 0x32, 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x12, 0x42, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70,
0x6f, 0x73, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65,
0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74,
0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76,
0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f,
0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18,
0x02, 0x31, 0x36, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78,
0x69, 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72,
0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74,
0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74,
0x65, 0x52, 0x0d, 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65,
0x22, 0xbe, 0x01, 0x0a, 0x0d, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61,
0x74, 0x65, 0x12, 0x6b, 0x0a, 0x13, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69,
0x74, 0x74, 0x65, 0x65, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42,
0x3b, 0x8a, 0xb5, 0x18, 0x02, 0x36, 0x34, 0x82, 0xb5, 0x18, 0x31, 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, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e,
0x42, 0x69, 0x74, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x35, 0x31, 0x32, 0x52, 0x11, 0x73, 0x79,
0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x42, 0x69, 0x74, 0x73, 0x12,
0x40, 0x0a, 0x18, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65,
0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x16, 0x73, 0x79, 0x6e, 0x63, 0x43,
0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
0x65, 0x42, 0x9d, 0x01, 0x0a, 0x19, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42,
0x16, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61,
0x69, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 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, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x61, 0x70, 0x69, 0x73,
0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x65, 0x74,
0x68, 0xaa, 0x02, 0x15, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68,
0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, 0x45, 0x74, 0x68, 0x65,
0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescOnce sync.Once
file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescData = file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDesc
)
func file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescGZIP() []byte {
file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescOnce.Do(func() {
file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescData)
})
return file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDescData
}
var file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_proto_eth_v1alpha1_beacon_block_altair_proto_goTypes = []interface{}{
(*SignedBeaconBlockAltair)(nil), // 0: ethereum.eth.v1alpha1.SignedBeaconBlockAltair
(*BeaconBlockAltair)(nil), // 1: ethereum.eth.v1alpha1.BeaconBlockAltair
(*BeaconBlockBodyAltair)(nil), // 2: ethereum.eth.v1alpha1.BeaconBlockBodyAltair
(*SyncAggregate)(nil), // 3: ethereum.eth.v1alpha1.SyncAggregate
(*Eth1Data)(nil), // 4: ethereum.eth.v1alpha1.Eth1Data
(*ProposerSlashing)(nil), // 5: ethereum.eth.v1alpha1.ProposerSlashing
(*AttesterSlashing)(nil), // 6: ethereum.eth.v1alpha1.AttesterSlashing
(*Attestation)(nil), // 7: ethereum.eth.v1alpha1.Attestation
(*Deposit)(nil), // 8: ethereum.eth.v1alpha1.Deposit
(*SignedVoluntaryExit)(nil), // 9: ethereum.eth.v1alpha1.SignedVoluntaryExit
}
var file_proto_eth_v1alpha1_beacon_block_altair_proto_depIdxs = []int32{
1, // 0: ethereum.eth.v1alpha1.SignedBeaconBlockAltair.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockAltair
2, // 1: ethereum.eth.v1alpha1.BeaconBlockAltair.body:type_name -> ethereum.eth.v1alpha1.BeaconBlockBodyAltair
4, // 2: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data
5, // 3: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing
6, // 4: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing
7, // 5: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.attestations:type_name -> ethereum.eth.v1alpha1.Attestation
8, // 6: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.deposits:type_name -> ethereum.eth.v1alpha1.Deposit
9, // 7: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit
3, // 8: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate
9, // [9:9] is the sub-list for method output_type
9, // [9:9] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
}
func init() { file_proto_eth_v1alpha1_beacon_block_altair_proto_init() }
func file_proto_eth_v1alpha1_beacon_block_altair_proto_init() {
if File_proto_eth_v1alpha1_beacon_block_altair_proto != nil {
return
}
file_proto_eth_v1alpha1_attestation_proto_init()
file_proto_eth_v1alpha1_beacon_block_proto_init()
if !protoimpl.UnsafeEnabled {
file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SignedBeaconBlockAltair); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BeaconBlockAltair); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BeaconBlockBodyAltair); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncAggregate); 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_v1alpha1_beacon_block_altair_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_proto_eth_v1alpha1_beacon_block_altair_proto_goTypes,
DependencyIndexes: file_proto_eth_v1alpha1_beacon_block_altair_proto_depIdxs,
MessageInfos: file_proto_eth_v1alpha1_beacon_block_altair_proto_msgTypes,
}.Build()
File_proto_eth_v1alpha1_beacon_block_altair_proto = out.File
file_proto_eth_v1alpha1_beacon_block_altair_proto_rawDesc = nil
file_proto_eth_v1alpha1_beacon_block_altair_proto_goTypes = nil
file_proto_eth_v1alpha1_beacon_block_altair_proto_depIdxs = nil
}

View File

@@ -0,0 +1,3 @@
// +build ignore
package ignore

View File

@@ -0,0 +1,99 @@
// Copyright 2021 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.v1alpha1;
import "proto/eth/ext/options.proto";
import "proto/eth/v1alpha1/attestation.proto";
import "proto/eth/v1alpha1/beacon_block.proto";
option csharp_namespace = "Ethereum.Eth.v1alpha1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth";
option java_multiple_files = true;
option java_outer_classname = "BeaconBlockAltairProto";
option java_package = "org.ethereum.eth.v1alpha1";
option php_namespace = "Ethereum\\Eth\\v1alpha1";
// The signed version of a Altair(HF1) beacon block.
message SignedBeaconBlockAltair {
// The unsigned beacon block itself.
BeaconBlockAltair block = 1;
// 96 byte BLS signature from the validator that produced this block.
bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}
// The unsigned version of a Altair(HF1) beacon block.. The message does not contain a validator signature.
message BeaconBlockAltair {
// Beacon chain slot that this block represents.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// Validator index of the validator that proposed the block header.
uint64 proposer_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// 32 byte root of the parent block.
bytes parent_root = 3 [(ethereum.eth.ext.ssz_size) = "32"];
// 32 byte root of the resulting state after processing this block.
bytes state_root = 4 [(ethereum.eth.ext.ssz_size) = "32"];
// The Altair beacon block body.
BeaconBlockBodyAltair body = 5;
}
// The block body of an Altair(HF1) beacon block.
// The new addition for Altair is SyncAggregate for light client support.
message BeaconBlockBodyAltair {
// The validators RANDAO reveal 96 byte value.
bytes randao_reveal = 1 [(ethereum.eth.ext.ssz_size) = "96"];
// A reference to the Ethereum 1.x chain.
Eth1Data eth1_data = 2;
// 32 byte field of arbitrary data. This field may contain any data and
// is not used for anything other than a fun message.
bytes graffiti = 3 [(ethereum.eth.ext.ssz_size) = "32"];
// Block operations
// Refer to spec constants at https://github.com/ethereum/eth2.0-specs/blob/dev/specs/core/0_beacon-chain.md#max-operations-per-block
// At most MAX_PROPOSER_SLASHINGS.
repeated ProposerSlashing proposer_slashings = 4 [(ethereum.eth.ext.ssz_max) = "16"];
// At most MAX_ATTESTER_SLASHINGS.
repeated AttesterSlashing attester_slashings = 5 [(ethereum.eth.ext.ssz_max) = "2"];
// At most MAX_ATTESTATIONS.
repeated Attestation attestations = 6 [(ethereum.eth.ext.ssz_max) = "128"];
// At most MAX_DEPOSITS.
repeated Deposit deposits = 7 [(ethereum.eth.ext.ssz_max) = "16"];
// At most MAX_VOLUNTARY_EXITS.
repeated SignedVoluntaryExit voluntary_exits = 8 [(ethereum.eth.ext.ssz_max) = "16"];
// Sync aggregate object to track sync committee votes for light client support. [New in Altair]
SyncAggregate sync_aggregate = 9;
}
// The sync aggregate object for the beacon chain to track sync committee votes and to
// support light client infra.
message SyncAggregate {
// Sync committee bits as Bitvector to track votes.
bytes sync_committee_bits = 1 [(ethereum.eth.ext.ssz_size) = "64", (ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/go-bitfield.Bitvector512"];
// BLS aggregated signature of the sync committee for the ones that voted.
bytes sync_committee_signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}

5791
proto/eth/v1alpha1/beacon_chain.pb.go generated Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,880 @@
// 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.v1alpha1;
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
import "proto/eth/ext/options.proto";
import "proto/eth/v1alpha1/attestation.proto";
import "proto/eth/v1alpha1/beacon_block.proto";
import "proto/eth/v1alpha1/validator.proto";
option csharp_namespace = "Ethereum.Eth.v1alpha1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth";
option java_multiple_files = true;
option java_outer_classname = "BeaconChainProto";
option java_package = "org.ethereum.eth.v1alpha1";
option php_namespace = "Ethereum\\Eth\\v1alpha1";
// Beacon chain API
//
// The beacon chain API can be used to access data relevant to the Ethereum 2.0
// phase 0 beacon chain.
service BeaconChain {
// TODO(preston): Batch requests?
// Retrieve attestations by block root, slot, or epoch.
//
// The server may return an empty list when no attestations match the given
// filter criteria. This RPC should not return NOT_FOUND. Only one filter
// criteria should be used. This endpoint allows for retrieval of genesis
// information via a boolean query filter.
rpc ListAttestations(ListAttestationsRequest) returns (ListAttestationsResponse) {
option (google.api.http) = {
get: "/eth/v1alpha1/beacon/attestations"
};
}
// Retrieve indexed attestations by block root, slot, or epoch.
//
// The server may return an empty list when no indexed attestations match the given
// filter criteria. This RPC should not return NOT_FOUND. Only one filter
// criteria should be used. This endpoint allows for retrieval of genesis
// information via a boolean query filter.
rpc ListIndexedAttestations(ListIndexedAttestationsRequest) returns (ListIndexedAttestationsResponse) {
option (google.api.http) = {
get: "/eth/v1alpha1/beacon/attestations/indexed"
};
}
// Server-side stream of attestations as they are received by
// the beacon chain node.
rpc StreamAttestations(google.protobuf.Empty) returns (stream Attestation) {
option (google.api.http) = {
get: "/eth/v1alpha1/beacon/attestations/stream"
};
}
// Server-side stream of indexed attestations as they are received by
// the beacon chain node.
rpc StreamIndexedAttestations(google.protobuf.Empty) returns (stream IndexedAttestation) {
option (google.api.http) = {
get: "/eth/v1alpha1/beacon/attestations/indexed/stream"
};
}
// Retrieve attestations from pool.
//
// The server returns a list of attestations that have been seen but not
// yet processed. Pool attestations eventually expire as the slot
// advances, so an attestation missing from this request does not imply
// that it was included in a block. The attestation may have expired.
// Refer to the ethereum 2.0 specification for more details on how
// attestations are processed and when they are no longer valid.
// https://github.com/ethereum/eth2.0-specs/blob/dev/specs/core/0_beacon-chain.md#attestations
rpc AttestationPool(AttestationPoolRequest) returns (AttestationPoolResponse) {
option (google.api.http) = {
get: "/eth/v1alpha1/beacon/attestations/pool"
};
}
// Retrieve blocks by root, slot, or epoch.
//
// The server may return multiple blocks in the case that a slot or epoch is
// provided as the filter criteria. The server may return an empty list when
// no blocks in their database match the filter criteria. This RPC should
// not return NOT_FOUND. Only one filter criteria should be used. This endpoint
// allows for retrieval of genesis information via a boolean query filter.
rpc ListBlocks(ListBlocksRequest) returns (ListBlocksResponse) {
option (google.api.http) = {
get: "/eth/v1alpha1/beacon/blocks"
};
}
// Server-side stream of all signed blocks as they are received by
// the beacon chain node.
rpc StreamBlocks(StreamBlocksRequest) returns (stream SignedBeaconBlock) {
option (google.api.http) = {
get: "/eth/v1alpha1/beacon/blocks/stream"
};
}
// Server-side stream of information about the head of the beacon chain
// from the view of the beacon chain node.
//
// This includes the head block slot and root as well as information about
// the most recent finalized and justified slots.
rpc StreamChainHead(google.protobuf.Empty) returns (stream ChainHead) {
option (google.api.http) = {
get: "/eth/v1alpha1/beacon/chainhead/stream"
};
}
// Retrieve information about the head of the beacon chain from the view of
// the beacon chain node.
//
// This includes the head block slot and root as well as information about
// the most recent finalized and justified slots.
rpc GetChainHead(google.protobuf.Empty) returns (ChainHead) {
option (google.api.http) = {
get: "/eth/v1alpha1/beacon/chainhead"
};
}
// Retrieve information about the weak subjectivity of the beacon chain from the view of
// the beacon chain node.
//
// This includes the weak subjectivity block root, state root and epoch number.
rpc GetWeakSubjectivityCheckpoint(google.protobuf.Empty) returns (WeakSubjectivityCheckpoint) {
option (google.api.http) = {
get: "/eth/v1alpha1/beacon/weak_subjectivity_checkpoint"
};
}
// Retrieve the beacon chain committees for a given epoch.
//
// If no filter criteria is specified, the response returns
// all beacon committees for the current epoch. The results are paginated by default.
// This endpoint allows for retrieval of genesis information via a boolean query filter.
rpc ListBeaconCommittees(ListCommitteesRequest) returns (BeaconCommittees) {
option (google.api.http) = {
get: "/eth/v1alpha1/beacon/committees"
};
}
// Retrieve validator balances for a given set of public keys at a specific
// epoch in time. This endpoint allows for retrieval of genesis information
// via a boolean query filter.
rpc ListValidatorBalances(ListValidatorBalancesRequest) returns (ValidatorBalances) {
option (google.api.http) = {
get: "/eth/v1alpha1/validators/balances"
};
}
// Retrieve the current validator registry.
//
// The request may include an optional historical epoch to retrieve a
// specific validator set in time. This endpoint allows for retrieval of genesis
// information via a boolean query filter.
rpc ListValidators(ListValidatorsRequest) returns (Validators) {
option (google.api.http) = {
get: "/eth/v1alpha1/validators"
};
}
// Retrieve information about a specific validator in the registry.
//
// This request may query by validator index or public key.
rpc GetValidator(GetValidatorRequest) returns (Validator) {
option (google.api.http) = {
get: "/eth/v1alpha1/validator"
};
}
// Retrieve the active set changes for a given epoch.
//
// This data includes any activations, voluntary exits, and involuntary
// ejections. This endpoint allows for retrieval of genesis
// information via a boolean query filter.
rpc GetValidatorActiveSetChanges(GetValidatorActiveSetChangesRequest) returns (ActiveSetChanges) {
option (google.api.http) = {
get: "/eth/v1alpha1/validators/activesetchanges"
};
}
// Retrieve the current validator queue information.
rpc GetValidatorQueue(google.protobuf.Empty) returns (ValidatorQueue) {
option (google.api.http) = {
get: "/eth/v1alpha1/validators/queue"
};
}
// GetValidatorPerformance reports a validator's latest balance along with other important
// metrics on rewards and penalties throughout its lifecycle in the beacon chain.
// The request takes in a list of validator public keys and returns a performance report
// for all of them respectively.
rpc GetValidatorPerformance(ValidatorPerformanceRequest) returns (ValidatorPerformanceResponse) {
option (google.api.http) = {
get: "/eth/v1alpha1/validators/performance"
};
}
// Retrieve the validator assignments for a given epoch.
//
// This request may specify optional validator indices or public keys to
// filter validator assignments. This endpoint allows for retrieval of genesis
// information via a boolean query filter.
rpc ListValidatorAssignments(ListValidatorAssignmentsRequest) returns (ValidatorAssignments) {
option (google.api.http) = {
get: "/eth/v1alpha1/validators/assignments"
};
}
// Retrieve the validator participation information for a given epoch.
//
// This method returns information about the global participation of
// validator attestations. This endpoint allows for retrieval of genesis
// information via a boolean query filter.
rpc GetValidatorParticipation(GetValidatorParticipationRequest) returns (ValidatorParticipationResponse) {
option (google.api.http) = {
get: "/eth/v1alpha1/validators/participation"
};
}
// Retrieve the current configuration parameters of the beacon chain.
rpc GetBeaconConfig(google.protobuf.Empty) returns (BeaconConfig) {
option (google.api.http) = {
get: "/eth/v1alpha1/beacon/config"
};
}
// Server-side stream of validator information at each epoch.
rpc StreamValidatorsInfo(stream ValidatorChangeSet) returns (stream ValidatorInfo) {
option (google.api.http) = {
get: "/eth/v1alpha1/beacon/validators/info/stream"
};
}
// Submit an attester slashing object to the beacon node.
rpc SubmitAttesterSlashing(AttesterSlashing) returns (SubmitSlashingResponse) {
option (google.api.http) = {
get: "/eth/v1alpha1/beacon/slashings/attester/submit"
};
}
// Submit a proposer slashing object to the beacon node.
rpc SubmitProposerSlashing(ProposerSlashing) returns (SubmitSlashingResponse) {
option (google.api.http) = {
get: "/eth/v1alpha1/beacon/slashings/proposer/submit"
};
}
// Returns a list of validators individual vote status of a given epoch.
rpc GetIndividualVotes(IndividualVotesRequest) returns (IndividualVotesRespond) {
option (google.api.http) = {
get: "/eth/v1alpha1/beacon/individual_votes"
};
}
}
// SetAction defines the type of action that should be applied to the keys in a validator change set.
enum SetAction {
// ADD_VALIDATOR_KEYS adds to the existing keys.
ADD_VALIDATOR_KEYS = 0;
// REMOVE_VALIDATOR_KEYS removes from the existing keys.
REMOVE_VALIDATOR_KEYS = 1;
// SET_VALIDATOR_KEYS overwrites the existing keys.
SET_VALIDATOR_KEYS = 2;
}
// ValidatorChangeSet updates the server's list of keys on which to operate.
message ValidatorChangeSet {
// Action (add/remove/set).
SetAction action = 1;
// 48 byte BLS public keys of validators on which the operation occurs.
repeated bytes public_keys = 2;
}
// Request for indexed attestations by target epoch.
message ListIndexedAttestationsRequest {
oneof query_filter {
// Retrieve attestations by epoch processed.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Optional criteria to retrieve genesis epoch attestations.
bool genesis_epoch = 2;
}
// The maximum number of IndexedAttestations to return in the response.
// This field is optional.
int32 page_size = 3;
// A pagination token returned from a previous call to `ListIndexedAttestations`
// that indicates where this listing should continue from.
// This field is optional.
string page_token = 4;
}
// Request for attestations.
message ListAttestationsRequest {
// TODO(preston): Test oneof with gRPC gateway.
oneof query_filter {
// Filter attestations by epoch processed.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Optional criteria to retrieve attestations from 0 epoch.
bool genesis_epoch = 2;
}
// The maximum number of Attestations to return in the response.
// This field is optional.
int32 page_size = 3;
// A pagination token returned from a previous call to `ListAttestations`
// that indicates where this listing should continue from.
// This field is optional.
string page_token = 4;
}
message ListAttestationsResponse {
repeated Attestation attestations = 1;
// A pagination token returned from a previous call to `ListAttestations`
// that indicates from where listing should continue.
// This field is optional.
string next_page_token = 2;
// Total count of Attestations matching the request filter.
int32 total_size = 3;
}
message ListIndexedAttestationsResponse {
repeated IndexedAttestation indexed_attestations = 1;
// A pagination token returned from a previous call to `ListIndexedAttestations`
// that indicates from where listing should continue.
// This field is optional.
string next_page_token = 2;
// Total count of Attestations matching the request filter.
int32 total_size = 3;
}
message ListBlocksRequest {
oneof query_filter {
// Block root filter to return a single block.
bytes root = 1;
// Slot to lookup a block. If the slot is not yet finalized, this
// criteria may yield multiple valid blocks if the node has seen blocks
// from another fork.
uint64 slot = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// The epoch number for which to retrieve blocks. If specified, this
// will return all blocks found within the span of the specified epoch.
uint64 epoch = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Optional criteria to retrieve genesis block.
bool genesis = 4;
}
// The maximum number of Blocks to return in the response.
// This field is optional.
int32 page_size = 5;
// A pagination token returned from a previous call to `ListBlocks`
// that indicates where this listing should continue from.
// This field is optional.
string page_token = 6;
}
message ListBlocksResponse {
repeated BeaconBlockContainer blockContainers = 1;
// A pagination token returned from a previous call to `ListBlocks`
// that indicates from where listing should continue.
// This field is optional.
string next_page_token = 2;
// Total count of Blocks matching the request filter.
int32 total_size = 3;
}
// Request to only return blocks that is verified by the beacon node.
message StreamBlocksRequest {
bool verified_only = 1;
}
// A container that contains both the beacon block
// and its corresponding root.
message BeaconBlockContainer {
// The contained Ethereum beacon block.
SignedBeaconBlock block = 1;
// 32 byte merkle tree root of contained beacon block.
bytes block_root = 2;
// Boolean indicating whether the block is canonical.
bool canonical = 3;
}
// Information about the head of the beacon chain.
message ChainHead {
// Slot of the head block.
uint64 head_slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// Epoch of the head block.
uint64 head_epoch = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// 32 byte merkle tree root of the canonical head block in the beacon node.
bytes head_block_root = 3 [(ethereum.eth.ext.ssz_size) = "32"];
// Most recent slot that contains the finalized block.
uint64 finalized_slot = 4 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// Epoch of the finalized block.
uint64 finalized_epoch = 5 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Most recent 32 byte finalized block root.
bytes finalized_block_root = 6 [(ethereum.eth.ext.ssz_size) = "32"];
// Most recent slot that contains the justified block.
uint64 justified_slot = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// Epoch of the justified block.
uint64 justified_epoch = 8 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Most recent 32 byte justified block root.
bytes justified_block_root = 9 [(ethereum.eth.ext.ssz_size) = "32"];
// Most recent slot that contains the previous justified block.
uint64 previous_justified_slot = 10 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// Epoch of the previous justified block.
uint64 previous_justified_epoch = 11 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Previous 32 byte justified block root.
bytes previous_justified_block_root = 12 [(ethereum.eth.ext.ssz_size) = "32"];
}
message ListCommitteesRequest {
oneof query_filter {
// Optional criteria to retrieve data at a specific epoch.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Optional criteria to retrieve genesis data.
bool genesis = 2;
}
}
message BeaconCommittees {
message CommitteeItem {
// A committee is a list of validator indices participating in consensus at a slot.
repeated uint64 validator_indices = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
message CommitteesList {
// A list of committees.
repeated CommitteeItem committees = 1;
}
// The epoch for which the committees in the response belong to.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// A map of validator committees by slot.
map<uint64, CommitteesList> committees = 2;
// The number of active validators at the given epoch.
uint64 active_validator_count = 3;
}
message ListValidatorBalancesRequest {
oneof query_filter {
// Optional criteria to retrieve balances at a specific epoch.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Optional criteria to retrieve the genesis list of balances.
bool genesis = 2;
}
// Validator 48 byte BLS public keys to filter validators for the given
// epoch.
repeated bytes public_keys = 3 [(ethereum.eth.ext.ssz_size) = "?,48"];
// Validator indices to filter validators for the given epoch.
repeated uint64 indices = 4 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// The maximum number of Validators to return in the response.
// This field is optional.
int32 page_size = 5;
// A pagination token returned from a previous call to `GetValidators`
// that indicates where this listing should continue from.
// This field is optional.
string page_token = 6;
}
message ValidatorBalances {
// Epoch which the state was considered to determine the validator balances.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
message Balance {
// Validator's 48 byte BLS public key.
bytes public_key = 1 [(ethereum.eth.ext.ssz_size) = "48"];
// Validator's index in the validator set.
uint64 index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// Validator's balance in gwei.
uint64 balance = 3;
// Validator's status, UNKNOWN if not found.
string status = 4;
}
repeated Balance balances = 2;
// A pagination token returned from a previous call to `GetListValidatorBalances`
// that indicates from where listing should continue.
string next_page_token = 3;
// Total count of items matching the request filter.
int32 total_size = 4;
}
message ListValidatorsRequest {
oneof query_filter {
// Optional criteria to retrieve validators at a specific epoch.
// Omitting this field or setting it to zero will retrieve a response
// with the current active validator set.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Optional criteria to retrieve the genesis set of validators.
bool genesis = 2;
}
// Specify whether or not you want to retrieve only active validators.
bool active = 3;
// The maximum number of Validators to return in the response.
// This field is optional.
int32 page_size = 4;
// A pagination token returned from a previous call to `GetValidators`
// that indicates where this listing should continue from.
// This field is optional.
string page_token = 5;
// Specify which validators you would like to retrieve by their public keys.
// This field is optional.
repeated bytes public_keys = 6;
// Specify which validators you would like to retrieve by their indices.
// This field is optional.
repeated uint64 indices = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
message GetValidatorRequest {
oneof query_filter {
// Validator index in the registry.
uint64 index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// 48 byte validator public key.
bytes public_key = 2 [(ethereum.eth.ext.ssz_size) = "48"];
}
}
message Validators {
// Epoch which the state was considered to determine the active validator
// set. This field is not optional. Zero value epoch indicates the validator
// set is from the Ethereum 2.0 genesis set.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
message ValidatorContainer {
uint64 index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
Validator validator = 2;
}
repeated ValidatorContainer validator_list = 2;
// A pagination token returned from a previous call to `GetValidators`
// that indicates from where listing should continue.
// This field is optional.
string next_page_token = 3;
// Total count of Validators matching the request filter.
int32 total_size = 4;
}
message GetValidatorActiveSetChangesRequest {
oneof query_filter {
// Optional criteria to retrieve balances at a specific epoch.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Optional criteria to retrieve the genesis list of balances.
bool genesis = 2;
}
}
message ActiveSetChanges {
// Epoch which the state was considered to determine the active validator
// set.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// 48 byte validator public keys that have been activated in the given epoch.
repeated bytes activated_public_keys = 2 [(ethereum.eth.ext.ssz_size) = "?,48"];
// Indices of validators activated in the given epoch.
repeated uint64 activated_indices = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// 48 byte validator public keys that have been voluntarily exited in the given epoch.
repeated bytes exited_public_keys = 4 [(ethereum.eth.ext.ssz_size) = "?,48"];
// Indices of validators exited in the given epoch.
repeated uint64 exited_indices = 5 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// 48 byte validator public keys that have been slashed in the given epoch.
repeated bytes slashed_public_keys = 6 [(ethereum.eth.ext.ssz_size) = "?,48"];
// Indices of validators slashed in the given epoch.
repeated uint64 slashed_indices = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// 48 byte validator public keys that have been involuntarily ejected in this epoch.
repeated bytes ejected_public_keys = 8 [(ethereum.eth.ext.ssz_size) = "?,48"];
// Indices of validators ejected in the given epoch.
repeated uint64 ejected_indices = 9 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
message ValidatorPerformanceRequest {
// A list of 48 byte validator public keys.
repeated bytes public_keys = 1 [deprecated = true];
// A list of validator indices to retrieve performance by their indices.
repeated uint64 indices = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
message ValidatorPerformanceResponse {
// A list of validator effective balances mapped 1-to-1 with the request's
// public keys.
repeated uint64 current_effective_balances = 1;
// The slot of when validator's attestation got included in the chain at previous epoch, the slot
// is mapped 1-to-1 with the request's public keys.
repeated uint64 inclusion_slots = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// The distance of when validator submitted and got included in the chain, the distance
// is mapped 1-to-1 with the request's public keys.
repeated uint64 inclusion_distances = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// Whether the list of validator recently correctly voted for source at previous epoch, the result
// is mapped 1-to-1 with the request's public keys.
repeated bool correctly_voted_source = 4;
// Whether the list of validator recently correctly voted for target at previous epoch, the result
// is mapped 1-to-1 with the request's public keys.
repeated bool correctly_voted_target = 5;
// Whether the list of validator recently correctly voted for head at previous epoch, the result
// is mapped 1-to-1 with the request's public keys.
repeated bool correctly_voted_head = 6;
// The balance of validators before epoch transition, the balance is mapped 1-to-1 with the requests's
// public keys.
repeated uint64 balances_before_epoch_transition = 7;
// The balance of validators after epoch transition, the balance is mapped 1-to-1 with the requests's
// public keys.
repeated uint64 balances_after_epoch_transition = 8;
// The total number of validators from the request not found in
// in the beacon chain.
repeated bytes missing_validators = 9;
// The average active validator balance in the beacon chain.
float average_active_validator_balance = 10;
// The public keys in the order they are in of the response.
repeated bytes public_keys = 11 [(ethereum.eth.ext.ssz_size) = "?,48"];
}
message ValidatorQueue {
// The amount of ether in gwei allowed to enter or exit the active
// validator set.
uint64 churn_limit = 1;
// Ordered list of 48 byte public keys awaiting activation. 0th index is the
// next key to be processed.
repeated bytes activation_public_keys = 2 [(ethereum.eth.ext.ssz_size) = "?,48", deprecated = true];
// Ordered list of public keys awaiting exit. 0th index is the next key to
// be processed.
repeated bytes exit_public_keys = 3 [(ethereum.eth.ext.ssz_size) = "?,48", deprecated = true];
// Ordered list of validator indices awaiting activation. 0th item in the list is the
// next validator index to be processed.
repeated uint64 activation_validator_indices = 4 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// Ordered list of validator indices awaiting exit. 0th item in the list is the
// next validator index to be processed.
repeated uint64 exit_validator_indices = 5 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
message ListValidatorAssignmentsRequest {
oneof query_filter {
// Epoch to validator assignments for.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Whether or not to query for the genesis information.
bool genesis = 2;
}
// 48 byte validator public keys to filter assignments for the given epoch.
repeated bytes public_keys = 3 [(ethereum.eth.ext.ssz_size) = "?,48"];
// Validator indicies to filter assignments for the given epoch.
repeated uint64 indices = 4 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// The maximum number of ValidatorAssignments to return in the response.
// This field is optional.
int32 page_size = 5;
// A pagination token returned from a previous call to `ListValidatorAssignments`
// that indicates where this listing should continue from.
// This field is optional.
string page_token = 6;
}
message ValidatorAssignments {
message CommitteeAssignment {
// Beacon committees are responsible for crosslinking committee data back to the beacon chain,
// they also attest and produce beacon chain blocks. This is a list of validator indices that
// are in the same committee as requested validator, everyone in the committee is assigned to the
// same slot and same committee.
repeated uint64 beacon_committees = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// Committee index represents the committee of validator that's in.
uint64 committee_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.CommitteeIndex"];
// Beacon chain slot in which the validator must perform its assigned
// duty as an attester.
uint64 attester_slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// Beacon chain slots in which the validator must perform its assigned
// duty as a proposer.
repeated uint64 proposer_slots = 4 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// 48 byte BLS public key.
bytes public_key = 5 [(ethereum.eth.ext.ssz_size) = "48", deprecated = true];
// Validator index in the beacon state.
uint64 validator_index = 6 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
// The epoch for which this set of validator assignments is valid.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
repeated CommitteeAssignment assignments = 2;
// A pagination token returned from a previous call to `ListValidatorAssignmentsRequest`
// that indicates where this listing should continue from.
// This field is optional.
string next_page_token = 3;
// Total count of CommitteeAssignments matching the request filter.
int32 total_size = 4;
}
message GetValidatorParticipationRequest {
oneof query_filter {
// Epoch to request participation information.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Whether or not to query for the genesis information.
bool genesis = 2;
}
}
message ValidatorParticipationResponse {
// Epoch which this message is applicable.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Whether or not epoch has been finalized.
bool finalized = 2;
// The actual validator participation metrics.
ValidatorParticipation participation = 3;
}
message AttestationPoolRequest {
// The maximum number of objects to return in the response.
// This field is optional.
int32 page_size = 1;
// A pagination token returned from a previous call
// that indicates where this listing should continue from.
// This field is optional.
string page_token = 2;
}
message AttestationPoolResponse {
// List of attestations currently in the pool of the beacon chain.
repeated Attestation attestations = 1;
// A pagination token returned from a previous call
// that indicates where this listing should continue from.
// This field is optional.
string next_page_token = 2;
// Total count of objects matching the request filter.
int32 total_size = 3;
}
// Information about the configuration parameters of the beacon node, such
// as the slots per epoch, slots per eth1 voting period, and more.
message BeaconConfig {
map<string, string> config = 1;
}
message SubmitSlashingResponse {
// Indices of the validators to be slashed by the submitted
// proposer/attester slashing object.
repeated uint64 slashed_indices = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
message IndividualVotesRequest {
// Epoch of the request.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Validator 48 byte BLS public keys to filter validators for the given epoch.
repeated bytes public_keys = 2;
// Validator indices to filter validators for the given epoch.
repeated uint64 indices = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
message IndividualVotesRespond {
message IndividualVote {
// The epoch of the vote status request.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// The public key of the vote status request.
bytes public_key = 2;
// The validator index of the request.
uint64 validator_index = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// Has the validator been slashed.
bool is_slashed = 4;
// Is the validator withdrawable.
bool is_withdrawable_in_current_epoch = 5;
// Is the validator active in current epoch.
bool is_active_in_current_epoch = 6;
// Was the validator active in previous epoch.
bool is_active_in_previous_epoch = 7;
// Did validator attest for current epoch.
bool is_current_epoch_attester = 8;
// Did validator attest target for current epoch.
bool is_current_epoch_target_attester = 9;
// Did validator attest for previous epoch.
bool is_previous_epoch_attester = 10;
// Did validator attest target for previous epoch.
bool is_previous_epoch_target_attester = 11;
// Did validator attest head for previous epoch.
bool is_previous_epoch_head_attester = 12;
// The current effective balance of the validator.
uint64 current_epoch_effective_balance_gwei = 13;
// The slots of when the validator's attestation got included in the block.
uint64 inclusion_slot = 14 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// How many slots have passed until the validator's attestation got included in the block.
uint64 inclusion_distance = 15 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
}
repeated IndividualVote individual_votes = 1;
}
message WeakSubjectivityCheckpoint {
// The block root of weak subjectivity checkpoint.
bytes block_root = 1;
// The state root of weak subjectivity checkpoint.
bytes state_root = 2;
// The epoch of weak subjectivity checkpoint.
uint64 epoch = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
}

File diff suppressed because it is too large Load Diff

1189
proto/eth/v1alpha1/node.pb.go generated Executable file

File diff suppressed because it is too large Load Diff

564
proto/eth/v1alpha1/node.pb.gw.go Executable file
View File

@@ -0,0 +1,564 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: proto/eth/v1alpha1/node.proto
/*
Package eth is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package eth
import (
"context"
"github.com/golang/protobuf/ptypes/empty"
emptypb "github.com/golang/protobuf/ptypes/empty"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
"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"
"io"
"net/http"
)
// 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_eth2_types.Epoch(0)
var _ = emptypb.Empty{}
var _ = empty.Empty{}
func request_Node_GetSyncStatus_0(ctx context.Context, marshaler runtime.Marshaler, client NodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.GetSyncStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Node_GetSyncStatus_0(ctx context.Context, marshaler runtime.Marshaler, server NodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.GetSyncStatus(ctx, &protoReq)
return msg, metadata, err
}
func request_Node_GetGenesis_0(ctx context.Context, marshaler runtime.Marshaler, client NodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.GetGenesis(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Node_GetGenesis_0(ctx context.Context, marshaler runtime.Marshaler, server NodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.GetGenesis(ctx, &protoReq)
return msg, metadata, err
}
func request_Node_GetVersion_0(ctx context.Context, marshaler runtime.Marshaler, client NodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.GetVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Node_GetVersion_0(ctx context.Context, marshaler runtime.Marshaler, server NodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.GetVersion(ctx, &protoReq)
return msg, metadata, err
}
func request_Node_ListImplementedServices_0(ctx context.Context, marshaler runtime.Marshaler, client NodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.ListImplementedServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Node_ListImplementedServices_0(ctx context.Context, marshaler runtime.Marshaler, server NodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.ListImplementedServices(ctx, &protoReq)
return msg, metadata, err
}
func request_Node_GetHost_0(ctx context.Context, marshaler runtime.Marshaler, client NodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.GetHost(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Node_GetHost_0(ctx context.Context, marshaler runtime.Marshaler, server NodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.GetHost(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_Node_GetPeer_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_Node_GetPeer_0(ctx context.Context, marshaler runtime.Marshaler, client NodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq PeerRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Node_GetPeer_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetPeer(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Node_GetPeer_0(ctx context.Context, marshaler runtime.Marshaler, server NodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq PeerRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Node_GetPeer_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetPeer(ctx, &protoReq)
return msg, metadata, err
}
func request_Node_ListPeers_0(ctx context.Context, marshaler runtime.Marshaler, client NodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.ListPeers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Node_ListPeers_0(ctx context.Context, marshaler runtime.Marshaler, server NodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.ListPeers(ctx, &protoReq)
return msg, metadata, err
}
// RegisterNodeHandlerServer registers the http handlers for service Node to "mux".
// UnaryRPC :call NodeServer 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 RegisterNodeHandlerFromEndpoint instead.
func RegisterNodeHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NodeServer) error {
mux.Handle("GET", pattern_Node_GetSyncStatus_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.v1alpha1.Node/GetSyncStatus")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Node_GetSyncStatus_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_Node_GetSyncStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Node_GetGenesis_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.v1alpha1.Node/GetGenesis")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Node_GetGenesis_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_Node_GetGenesis_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Node_GetVersion_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.v1alpha1.Node/GetVersion")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Node_GetVersion_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_Node_GetVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Node_ListImplementedServices_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.v1alpha1.Node/ListImplementedServices")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Node_ListImplementedServices_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_Node_ListImplementedServices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Node_GetHost_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.v1alpha1.Node/GetHost")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Node_GetHost_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_Node_GetHost_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Node_GetPeer_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.v1alpha1.Node/GetPeer")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Node_GetPeer_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_Node_GetPeer_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Node_ListPeers_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.v1alpha1.Node/ListPeers")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Node_ListPeers_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_Node_ListPeers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterNodeHandlerFromEndpoint is same as RegisterNodeHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterNodeHandlerFromEndpoint(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 RegisterNodeHandler(ctx, mux, conn)
}
// RegisterNodeHandler registers the http handlers for service Node to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterNodeHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterNodeHandlerClient(ctx, mux, NewNodeClient(conn))
}
// RegisterNodeHandlerClient registers the http handlers for service Node
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NodeClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NodeClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "NodeClient" to call the correct interceptors.
func RegisterNodeHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NodeClient) error {
mux.Handle("GET", pattern_Node_GetSyncStatus_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.v1alpha1.Node/GetSyncStatus")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Node_GetSyncStatus_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Node_GetSyncStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Node_GetGenesis_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.v1alpha1.Node/GetGenesis")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Node_GetGenesis_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Node_GetGenesis_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Node_GetVersion_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.v1alpha1.Node/GetVersion")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Node_GetVersion_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Node_GetVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Node_ListImplementedServices_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.v1alpha1.Node/ListImplementedServices")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Node_ListImplementedServices_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Node_ListImplementedServices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Node_GetHost_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.v1alpha1.Node/GetHost")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Node_GetHost_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Node_GetHost_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Node_GetPeer_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.v1alpha1.Node/GetPeer")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Node_GetPeer_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Node_GetPeer_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Node_ListPeers_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.v1alpha1.Node/ListPeers")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Node_ListPeers_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Node_ListPeers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_Node_GetSyncStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "node", "syncing"}, ""))
pattern_Node_GetGenesis_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "node", "genesis"}, ""))
pattern_Node_GetVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "node", "version"}, ""))
pattern_Node_ListImplementedServices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "node", "services"}, ""))
pattern_Node_GetHost_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "node", "p2p"}, ""))
pattern_Node_GetPeer_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "node", "peer"}, ""))
pattern_Node_ListPeers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1alpha1", "node", "peers"}, ""))
)
var (
forward_Node_GetSyncStatus_0 = runtime.ForwardResponseMessage
forward_Node_GetGenesis_0 = runtime.ForwardResponseMessage
forward_Node_GetVersion_0 = runtime.ForwardResponseMessage
forward_Node_ListImplementedServices_0 = runtime.ForwardResponseMessage
forward_Node_GetHost_0 = runtime.ForwardResponseMessage
forward_Node_GetPeer_0 = runtime.ForwardResponseMessage
forward_Node_ListPeers_0 = runtime.ForwardResponseMessage
)

View File

@@ -0,0 +1,172 @@
// 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.v1alpha1;
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
import "proto/eth/ext/options.proto";
option csharp_namespace = "Ethereum.Eth.v1alpha1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth";
option java_multiple_files = true;
option java_outer_classname = "NodeProto";
option java_package = "org.ethereum.eth.v1alpha1";
option php_namespace = "Ethereum\\Eth\\v1alpha1";
// Node service API
//
// Node service provides general information about the node itself, the services
// it supports, chain information and node version.
service Node {
// Retrieve the current network sync status of the node.
rpc GetSyncStatus(google.protobuf.Empty) returns (SyncStatus) {
option (google.api.http) = {
get: "/eth/v1alpha1/node/syncing"
};
}
// Retrieve information about the genesis of Ethereum 2.0.
rpc GetGenesis(google.protobuf.Empty) returns (Genesis) {
option (google.api.http) = {
get: "/eth/v1alpha1/node/genesis"
};
}
// Retrieve information about the running Ethereum 2.0 node.
rpc GetVersion(google.protobuf.Empty) returns (Version) {
option (google.api.http) = {
get: "/eth/v1alpha1/node/version"
};
}
// Retrieve the list of services implemented and enabled by this node.
//
// Any service not present in this list may return UNIMPLEMENTED or
// PERMISSION_DENIED. The server may also support fetching services by grpc
// reflection.
rpc ListImplementedServices(google.protobuf.Empty) returns (ImplementedServices) {
option (google.api.http) = {
get: "/eth/v1alpha1/node/services"
};
}
// Retrieves the peer data of the local peer.
rpc GetHost(google.protobuf.Empty) returns (HostData) {
option (google.api.http) = {
get: "/eth/v1alpha1/node/p2p"
};
}
// Retrieve the peer corresponding to the provided peer id.
rpc GetPeer(PeerRequest) returns (Peer) {
option (google.api.http) = {
get: "/eth/v1alpha1/node/peer"
};
}
// Retrieve the list of peers currently connected to this node.
rpc ListPeers(google.protobuf.Empty) returns (Peers) {
option (google.api.http) = {
get: "/eth/v1alpha1/node/peers"
};
}
}
// Information about the current network sync status of the node.
message SyncStatus {
// Whether or not the node is currently syncing.
bool syncing = 1;
}
// Information about the genesis of Ethereum 2.0.
message Genesis {
// UTC time specified in the chain start event in the deposit contract.
google.protobuf.Timestamp genesis_time = 1;
// Address of the deposit contract in the Ethereum 1 chain.
bytes deposit_contract_address = 2;
// Root of the genesis validators deposits; used for domain separation
// when signing data structures for this chain.
bytes genesis_validators_root = 3 [(ethereum.eth.ext.ssz_size) = "32"];
}
// Information about the node version.
message Version {
// A string that uniquely identifies the node and its version.
string version = 1;
// Additional metadata that the node would like to provide. This field may
// be used to list any meaningful data to the client.
string metadata = 2;
}
message ImplementedServices {
repeated string services = 1;
}
message PeerRequest {
// Peer id of the peer requested.
string peer_id = 1;
}
// Peers is a list of peer messages.
message Peers {
repeated Peer peers = 1;
}
// Peer provides details of a peer on the network.
message Peer {
// The address of the peer, as a full multiaddr, for example:
// /ip4/37.221.192.134/tcp/13000/p2p/16Uiu2HAm8maLMjag1TAUM52zPfmLbVMGFdwUAWgoHu1HDQLR6e17
string address = 1;
// The direction of the connection (inbound/outbound).
PeerDirection direction = 2;
// The connection state of the peer at the moment of the request. (e.g. Connecting)
ConnectionState connection_state = 3;
// The peer id of the peer.
string peer_id = 4;
// The latest ENR of the peer that's in the record.
string enr = 5;
}
// P2P Data on the local host.
message HostData{
// All the multiaddress of the peer, specified as a full multiaddr, for example:
// /ip4/37.221.192.134/tcp/13000/p2p/16Uiu2HAm8maLMjag1TAUM52zPfmLbVMGFdwUAWgoHu1HDQLR6e17
repeated string addresses = 1;
// The peer id of the peer.
string peer_id = 2;
// The latest ENR of the local peer.
string enr = 3;
}
// PeerDirection states the direction of the connection to a peer.
enum PeerDirection {
UNKNOWN = 0;
INBOUND = 1;
OUTBOUND = 2;
}
// ConnectionState states the current status of the peer.
enum ConnectionState {
DISCONNECTED = 0;
DISCONNECTING = 1;
CONNECTED = 2;
CONNECTING = 3;
}

View File

@@ -0,0 +1,48 @@
// 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.
// This is an optional proto that provides some gRPC gateway metadata for
// generating the OpenAPIv2(swagger) header.
syntax = "proto3";
package ethereum.eth.v1alpha1;
import "protoc-gen-openapiv2/options/annotations.proto";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth";
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
info: {
title: "Ethereum Serenity APIs";
version: "v1alpha1";
license: {
name: "Licenced under Apache 2.0";
url: "http://www.apache.org/licenses/LICENSE-2.0";
};
description: "{{ index . "description" }}";
};
external_docs: {
url: "https://github.com/ethereum/eth2.0-specs";
description: "Ethereum 2.0 Specification on Github";
};
host: "api.prylabs.net",
schemes: HTTPS;
schemes: WSS;
consumes: "application/json";
consumes: "application/grpc-web-text";
consumes: "application/grpc-web-json";
produces: "application/json";
produces: "application/grpc-web-text";
produces: "application/grpc-web-json";
};

View File

@@ -0,0 +1,64 @@
{
"swagger": "2.0",
"info": {
"title": "Ethereum Serenity APIs",
"description": "{{ index . description }}",
"version": "v1alpha1",
"license": {
"name": "Licenced under Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0"
}
},
"host": "api.prylabs.net",
"schemes": [
"https",
"wss"
],
"consumes": [
"application/json",
"application/grpc-web-text",
"application/grpc-web-json"
],
"produces": [
"application/json",
"application/grpc-web-text",
"application/grpc-web-json"
],
"paths": {},
"definitions": {
"protobufAny": {
"type": "object",
"properties": {
"typeUrl": {
"type": "string"
},
"value": {
"type": "string",
"format": "byte"
}
}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
}
},
"externalDocs": {
"description": "Ethereum 2.0 Specification on Github",
"url": "https://github.com/ethereum/eth2.0-specs"
}
}

View File

@@ -0,0 +1,31 @@
[![Build status](https://badge.buildkite.com/62be08099e9e228b165c2dba69c637eb9ca7a1ca95efd54b9f.svg?branch=master)](https://buildkite.com/prysmatic-labs/ethereum-apis)[![Discord](https://user-images.githubusercontent.com/7288322/34471967-1df7808a-efbb-11e7-9088-ed0b04151291.png)](https://discord.gg/KSA7rPr)[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/prysmaticlabs/geth-sharding?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)[![ETH2.0_Spec_Version 0.12.1](https://img.shields.io/badge/ETH2.0%20Spec%20Version-v0.12.1-blue.svg)](https://github.com/ethereum/eth2.0-specs/tree/v0.12.1)
This swagger site hosts the service interface definitions for the Ethereum Serenity JSON API.
## Service Overview
At the core of Ethereum Serenity lies the "Beacon Chain", a proof-of-stake based blockchain managing a set of validators and "shards" across a network, which are stateful, smaller blockchains used for transaction and smart contract execution. The Beacon Chain reconciles consensus results across shards to provide the backbone of Ethereum Serenity. The services below allow for retrieval of current and historical information relating to validators, consensus, blocks, and staking participation.
| Package | Service | Version | Description |
|---------|---------|---------|-------------|
| eth | BeaconChain | v1alpha1 | This service is used to retrieve critical data relevant to the Ethereum 2.0 phase 0 beacon chain, including the most recent head block, current pending deposits, the chain state and more. |
| eth | Node | v1alpha1 | The Node service returns information about the Ethereum node itself, including versioning and general information as well as network sync status and a list of services currently implemented on the node.
| eth | Validator | v1alpha1 | This API provides the information a validator needs to retrieve throughout its lifecycle, including recieved assignments from the network, its current index in the state, as well the rewards and penalties that have been applied to it.
### JSON Mapping
The majority of field primitive types for Ethereum are either `bytes` or `uint64`. The canonical JSON mapping for those fields are a Base64 encoded string for `bytes`, or a string representation of `uint64`. Since JavaScript loses precision for values over [MAX_SAFE_INTEGER](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER), uint64 must be a JSON string in order to accommodate those values. If the field value not changed and is still set to protobuf's default, this field will be omitted from the JSON encoding entirely.
For more details on JSON mapping for other types, view the relevant section in the [proto3 language guide](https://developers.google.com/protocol-buffers/docs/proto3#json).
### Helpful gRPC Tooling and Resources
- [Google's API Style Guide](https://cloud.google.com/apis/design/)
- [Language reference for protoc3](https://developers.google.com/protocol-buffers/docs/proto3)
- [Awesome gRPC](https://github.com/grpc-ecosystem/awesome-grpc)
- [Protocol Buffer Basics: Go](https://developers.google.com/protocol-buffers/docs/gotutorial)
- [Transcoding gRPC to JSON/HTTP using Envoy](https://blog.jdriven.com/2018/11/transcoding-grpc-to-http-json-using-envoy/)
## Contributing
We have put all of our contribution guidelines into [CONTRIBUTING.md](https://github.com/prysmaticlabs/prysm/blob/master/CONTRIBUTING.md)! Check it out to get started.

480
proto/eth/v1alpha1/sync_committee.pb.go generated Executable file
View File

@@ -0,0 +1,480 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.15.8
// source: proto/eth/v1alpha1/sync_committee.proto
package eth
import (
proto "github.com/golang/protobuf/proto"
github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
_ "github.com/prysmaticlabs/prysm/proto/eth/ext"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
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)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type SyncCommitteeSignature struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Slot github_com_prysmaticlabs_eth2_types.Slot `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Slot"`
BlockRoot []byte `protobuf:"bytes,2,opt,name=block_root,json=blockRoot,proto3" json:"block_root,omitempty" ssz-size:"32"`
ValidatorIndex github_com_prysmaticlabs_eth2_types.ValidatorIndex `protobuf:"varint,3,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.ValidatorIndex"`
Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"`
}
func (x *SyncCommitteeSignature) Reset() {
*x = SyncCommitteeSignature{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncCommitteeSignature) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncCommitteeSignature) ProtoMessage() {}
func (x *SyncCommitteeSignature) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[0]
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 SyncCommitteeSignature.ProtoReflect.Descriptor instead.
func (*SyncCommitteeSignature) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_sync_committee_proto_rawDescGZIP(), []int{0}
}
func (x *SyncCommitteeSignature) GetSlot() github_com_prysmaticlabs_eth2_types.Slot {
if x != nil {
return x.Slot
}
return github_com_prysmaticlabs_eth2_types.Slot(0)
}
func (x *SyncCommitteeSignature) GetBlockRoot() []byte {
if x != nil {
return x.BlockRoot
}
return nil
}
func (x *SyncCommitteeSignature) GetValidatorIndex() github_com_prysmaticlabs_eth2_types.ValidatorIndex {
if x != nil {
return x.ValidatorIndex
}
return github_com_prysmaticlabs_eth2_types.ValidatorIndex(0)
}
func (x *SyncCommitteeSignature) GetSignature() []byte {
if x != nil {
return x.Signature
}
return nil
}
type SyncCommitteeContribution struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Slot github_com_prysmaticlabs_eth2_types.Slot `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Slot"`
BlockRoot []byte `protobuf:"bytes,2,opt,name=block_root,json=blockRoot,proto3" json:"block_root,omitempty" ssz-size:"32"`
SubcommitteeIndex uint64 `protobuf:"varint,3,opt,name=subcommittee_index,json=subcommitteeIndex,proto3" json:"subcommittee_index,omitempty"`
AggregationBits []byte `protobuf:"bytes,4,opt,name=aggregation_bits,json=aggregationBits,proto3" json:"aggregation_bits,omitempty" ssz-size:"32"`
Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"`
}
func (x *SyncCommitteeContribution) Reset() {
*x = SyncCommitteeContribution{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncCommitteeContribution) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncCommitteeContribution) ProtoMessage() {}
func (x *SyncCommitteeContribution) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[1]
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 SyncCommitteeContribution.ProtoReflect.Descriptor instead.
func (*SyncCommitteeContribution) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_sync_committee_proto_rawDescGZIP(), []int{1}
}
func (x *SyncCommitteeContribution) GetSlot() github_com_prysmaticlabs_eth2_types.Slot {
if x != nil {
return x.Slot
}
return github_com_prysmaticlabs_eth2_types.Slot(0)
}
func (x *SyncCommitteeContribution) GetBlockRoot() []byte {
if x != nil {
return x.BlockRoot
}
return nil
}
func (x *SyncCommitteeContribution) GetSubcommitteeIndex() uint64 {
if x != nil {
return x.SubcommitteeIndex
}
return 0
}
func (x *SyncCommitteeContribution) GetAggregationBits() []byte {
if x != nil {
return x.AggregationBits
}
return nil
}
func (x *SyncCommitteeContribution) GetSignature() []byte {
if x != nil {
return x.Signature
}
return nil
}
type ContributionAndProof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AggregatorIndex github_com_prysmaticlabs_eth2_types.ValidatorIndex `protobuf:"varint,1,opt,name=aggregator_index,json=aggregatorIndex,proto3" json:"aggregator_index,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.ValidatorIndex"`
Contribution *SyncCommitteeContribution `protobuf:"bytes,2,opt,name=contribution,proto3" json:"contribution,omitempty"`
SelectionProof []byte `protobuf:"bytes,3,opt,name=selection_proof,json=selectionProof,proto3" json:"selection_proof,omitempty" ssz-size:"96"`
}
func (x *ContributionAndProof) Reset() {
*x = ContributionAndProof{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ContributionAndProof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ContributionAndProof) ProtoMessage() {}
func (x *ContributionAndProof) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[2]
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 ContributionAndProof.ProtoReflect.Descriptor instead.
func (*ContributionAndProof) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_sync_committee_proto_rawDescGZIP(), []int{2}
}
func (x *ContributionAndProof) GetAggregatorIndex() github_com_prysmaticlabs_eth2_types.ValidatorIndex {
if x != nil {
return x.AggregatorIndex
}
return github_com_prysmaticlabs_eth2_types.ValidatorIndex(0)
}
func (x *ContributionAndProof) GetContribution() *SyncCommitteeContribution {
if x != nil {
return x.Contribution
}
return nil
}
func (x *ContributionAndProof) GetSelectionProof() []byte {
if x != nil {
return x.SelectionProof
}
return nil
}
type SignedContributionAndProof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Message *ContributionAndProof `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"`
}
func (x *SignedContributionAndProof) Reset() {
*x = SignedContributionAndProof{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SignedContributionAndProof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SignedContributionAndProof) ProtoMessage() {}
func (x *SignedContributionAndProof) ProtoReflect() protoreflect.Message {
mi := &file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[3]
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 SignedContributionAndProof.ProtoReflect.Descriptor instead.
func (*SignedContributionAndProof) Descriptor() ([]byte, []int) {
return file_proto_eth_v1alpha1_sync_committee_proto_rawDescGZIP(), []int{3}
}
func (x *SignedContributionAndProof) GetMessage() *ContributionAndProof {
if x != nil {
return x.Message
}
return nil
}
func (x *SignedContributionAndProof) GetSignature() []byte {
if x != nil {
return x.Signature
}
return nil
}
var File_proto_eth_v1alpha1_sync_committee_proto protoreflect.FileDescriptor
var file_proto_eth_v1alpha1_sync_committee_proto_rawDesc = []byte{
0x0a, 0x27, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c,
0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
0x74, 0x65, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x74, 0x68, 0x65, 0x72,
0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
0x1a, 0x1b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x65, 0x78, 0x74, 0x2f,
0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x02,
0x0a, 0x16, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53,
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 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, 0x5f, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69,
0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32,
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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79,
0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64,
0x65, 0x78, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64,
0x65, 0x78, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73,
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x8c, 0x02, 0x0a, 0x19, 0x53, 0x79, 0x6e,
0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69,
0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 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,
0x2d, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f,
0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x73, 0x75, 0x62,
0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x31,
0x0a, 0x10, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69,
0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32,
0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x74,
0x73, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05,
0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69,
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x80, 0x02, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x74,
0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66,
0x12, 0x61, 0x0a, 0x10, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69,
0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32,
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, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79,
0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64,
0x65, 0x78, 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e,
0x64, 0x65, 0x78, 0x12, 0x54, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65,
0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43,
0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x63, 0x6f, 0x6e,
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x0f, 0x73, 0x65, 0x6c,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0e, 0x73, 0x65, 0x6c, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x89, 0x01, 0x0a, 0x1a, 0x53,
0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f,
0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x45, 0x0a, 0x07, 0x6d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x74, 0x68,
0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41,
0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67,
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x99, 0x01, 0x0a, 0x19, 0x6f, 0x72, 0x67, 0x2e, 0x65,
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c,
0x70, 0x68, 0x61, 0x31, 0x42, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
0x74, 0x65, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 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, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x61, 0x70, 0x69,
0x73, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x65,
0x74, 0x68, 0xaa, 0x02, 0x15, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74,
0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, 0x45, 0x74, 0x68,
0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_proto_eth_v1alpha1_sync_committee_proto_rawDescOnce sync.Once
file_proto_eth_v1alpha1_sync_committee_proto_rawDescData = file_proto_eth_v1alpha1_sync_committee_proto_rawDesc
)
func file_proto_eth_v1alpha1_sync_committee_proto_rawDescGZIP() []byte {
file_proto_eth_v1alpha1_sync_committee_proto_rawDescOnce.Do(func() {
file_proto_eth_v1alpha1_sync_committee_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_eth_v1alpha1_sync_committee_proto_rawDescData)
})
return file_proto_eth_v1alpha1_sync_committee_proto_rawDescData
}
var file_proto_eth_v1alpha1_sync_committee_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_proto_eth_v1alpha1_sync_committee_proto_goTypes = []interface{}{
(*SyncCommitteeSignature)(nil), // 0: ethereum.eth.v1alpha1.SyncCommitteeSignature
(*SyncCommitteeContribution)(nil), // 1: ethereum.eth.v1alpha1.SyncCommitteeContribution
(*ContributionAndProof)(nil), // 2: ethereum.eth.v1alpha1.ContributionAndProof
(*SignedContributionAndProof)(nil), // 3: ethereum.eth.v1alpha1.SignedContributionAndProof
}
var file_proto_eth_v1alpha1_sync_committee_proto_depIdxs = []int32{
1, // 0: ethereum.eth.v1alpha1.ContributionAndProof.contribution:type_name -> ethereum.eth.v1alpha1.SyncCommitteeContribution
2, // 1: ethereum.eth.v1alpha1.SignedContributionAndProof.message:type_name -> ethereum.eth.v1alpha1.ContributionAndProof
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_proto_eth_v1alpha1_sync_committee_proto_init() }
func file_proto_eth_v1alpha1_sync_committee_proto_init() {
if File_proto_eth_v1alpha1_sync_committee_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncCommitteeSignature); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncCommitteeContribution); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ContributionAndProof); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_eth_v1alpha1_sync_committee_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SignedContributionAndProof); 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_v1alpha1_sync_committee_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_proto_eth_v1alpha1_sync_committee_proto_goTypes,
DependencyIndexes: file_proto_eth_v1alpha1_sync_committee_proto_depIdxs,
MessageInfos: file_proto_eth_v1alpha1_sync_committee_proto_msgTypes,
}.Build()
File_proto_eth_v1alpha1_sync_committee_proto = out.File
file_proto_eth_v1alpha1_sync_committee_proto_rawDesc = nil
file_proto_eth_v1alpha1_sync_committee_proto_goTypes = nil
file_proto_eth_v1alpha1_sync_committee_proto_depIdxs = nil
}

View File

@@ -0,0 +1,3 @@
// +build ignore
package ignore

View File

@@ -0,0 +1,78 @@
// Copyright 2021 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.v1alpha1;
import "proto/eth/ext/options.proto";
option csharp_namespace = "Ethereum.Eth.v1alpha1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth";
option java_multiple_files = true;
option java_outer_classname = "SyncCommitteeProto";
option java_package = "org.ethereum.eth.v1alpha1";
option php_namespace = "Ethereum\\Eth\\v1alpha1";
// Sync committee object to support light client.
message SyncCommitteeSignature {
// Slot to which this contribution pertains.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// 32 byte block root for this signature.
bytes block_root = 2 [(ethereum.eth.ext.ssz_size) = "32"];
// Index of the validator that produced this signature.
uint64 validator_index = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// Signature by the validator over the block root of `slot`.
bytes signature = 4 [(ethereum.eth.ext.ssz_size) = "96"];
}
// Aggregated sync committee object to support light client.
message SyncCommitteeContribution {
// Slot to which this contribution pertains.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// 32 byte block root for this signature.
bytes block_root = 2 [(ethereum.eth.ext.ssz_size) = "32"];
// The subcommittee this contribution pertains to out of the broader sync committee.
uint64 subcommittee_index = 3;
// A bit is set if a signature from the validator at the corresponding
// index in the subcommittee is present in the aggregate `signature`.
bytes aggregation_bits = 4 [(ethereum.eth.ext.ssz_size) = "32"];
// Signature by the validator(s) over the block root of `slot`.
bytes signature = 5 [(ethereum.eth.ext.ssz_size) = "96"];
}
// Aggregated sync committee signature object with selection proof to support light client.
message ContributionAndProof {
// Index of the aggregator that produced this proof.
uint64 aggregator_index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
SyncCommitteeContribution contribution = 2;
// The selection proof itself.
bytes selection_proof = 3 [(ethereum.eth.ext.ssz_size) = "96"];
}
// Signed aggregated sync committee signature object with selection proof to support light client.
message SignedContributionAndProof {
ContributionAndProof message = 1;
// Signature of the aggregator that produced `message`.
bytes signature = 4 [(ethereum.eth.ext.ssz_size) = "96"];
}

3632
proto/eth/v1alpha1/validator.pb.go generated Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,552 @@
// 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.v1alpha1;
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
import "proto/eth/ext/options.proto";
import "proto/eth/v1alpha1/beacon_block.proto";
import "proto/eth/v1alpha1/attestation.proto";
option csharp_namespace = "Ethereum.Eth.v1alpha1";
option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth";
option java_multiple_files = true;
option java_outer_classname = "ValidatorProto";
option java_package = "org.ethereum.eth.v1alpha1";
option php_namespace = "Ethereum\\Eth\\v1alpha1";
// Beacon node validator API
//
// The beacon node validator API enables a validator to connect
// and perform its obligations on the Ethereum 2.0 phase 0 beacon chain.
service BeaconNodeValidator {
// Retrieves validator duties for the requested validators.
//
// The duties consist of:
// Proposer - the validator that creates a beacon chain block.
// Attester — a validator that is part of a committee that needs to sign off on a beacon chain
// block while simultaneously creating a cross link to a recent shard block on a particular shard chain.
// The server returns a list of duties which are the actions should be performed by validators for a given epoch.
// Validator duties should be polled every epoch, but due to chain reorg of >MIN_SEED_LOOKAHEAD could occur,
// the validator duties could chain. For complete safety, it is recommended to poll at every slot to ensure
// validator is fully aware of any sudden chain reorg.
rpc GetDuties(DutiesRequest) returns (DutiesResponse) {
option (google.api.http) = {
get: "/eth/v1alpha1/validator/duties"
};
}
// Stream validator duties for the requested validators.
//
// The duties consist of:
// Proposer - the validator that creates a beacon chain block.
// Attester — a validator that is part of a committee that needs to sign off on a beacon chain
rpc StreamDuties(DutiesRequest) returns (stream DutiesResponse) {
option (google.api.http) = {
get: "/eth/v1alpha1/validator/duties/stream"
};
}
// DomainData fetches the current BLS signature domain version information from the
// running beacon node's state. This information is used when validators sign
// blocks and attestations appropriately based on their duty.
rpc DomainData(DomainRequest) returns (DomainResponse) {
option (google.api.http) = {
get: "/eth/v1alpha1/validator/domain"
};
}
// WaitForChainStart queries the logs of the Validator Deposit Contract on the Ethereum
// proof-of-work chain to verify the beacon chain has started its runtime and
// validators are ready to begin their responsibilities.
//
// If the chain has not yet started, this endpoint starts a server-side stream which updates
// the client when the beacon chain is ready.
rpc WaitForChainStart(google.protobuf.Empty) returns (stream ChainStartResponse) {
option deprecated = true;
option (google.api.http) = {
get: "/eth/v1alpha1/validator/chainstart/stream"
};
}
// WaitForActivation checks if a validator public key exists in the active validator
// registry of the current beacon state. If the validator is NOT yet active, it starts a
// server-side stream which updates the client whenever the validator becomes active in
// the beacon node's state.
//
// The input to this endpoint is a list of validator public keys, and the corresponding
// stream will respond until at least a single corresponding validator to those
// keys is activated.
rpc WaitForActivation(ValidatorActivationRequest) returns (stream ValidatorActivationResponse) {
option (google.api.http) = {
get: "/eth/v1alpha1/validator/activation/stream"
};
}
// ValidatorIndex retrieves a validator's index location in the beacon state's
// validator registry looking up whether the validator exists based on its
// public key. This method returns NOT_FOUND if no index is found for the public key
// specified in the request.
rpc ValidatorIndex(ValidatorIndexRequest) returns (ValidatorIndexResponse) {
option (google.api.http) = {
get: "/eth/v1alpha1/validator/index"
};
}
// ValidatorStatus returns a validator's status based on the current epoch.
// The request can specify either a validator's public key or validator index.
//
// The status response can be one of the following:
// DEPOSITED - validator's deposit has been recognized by Ethereum 1, not yet recognized by Ethereum 2.
// PENDING - validator is in Ethereum 2's activation queue.
// ACTIVE - validator is active.
// EXITING - validator has initiated an an exit request, or has dropped below the ejection balance and is being kicked out.
// EXITED - validator is no longer validating.
// SLASHING - validator has been kicked out due to meeting a slashing condition.
// UNKNOWN_STATUS - validator does not have a known status in the network.
rpc ValidatorStatus(ValidatorStatusRequest) returns (ValidatorStatusResponse) {
option (google.api.http) = {
get: "/eth/v1alpha1/validator/status"
};
}
// MultipleValidatorStatus returns a list of validator statuses on the current epoch.
// The request can specify a list of validator public keys.
//
// Returns a list of ValidatorStatusResponses.
rpc MultipleValidatorStatus(MultipleValidatorStatusRequest) returns (MultipleValidatorStatusResponse) {
option (google.api.http) = {
get: "/eth/v1alpha1/validator/statuses"
};
}
// Retrieves the latest valid beacon block to be proposed on the beacon chain.
//
// The server returns a new beacon block, without proposer signature, that can be
// proposed on the beacon chain. The block should be filled with all the necessary
// data for proposer to sign.
rpc GetBlock(BlockRequest) returns (BeaconBlock) {
option (google.api.http) = {
get: "/eth/v1alpha1/validator/block"
};
}
// Sends the newly signed beacon block to beacon node.
//
// The validator sends the newly signed beacon block to the beacon node so the beacon block can
// be included in the beacon chain. The beacon node is expected to validate and process the
// beacon block into its state.
rpc ProposeBlock(SignedBeaconBlock) returns (ProposeResponse) {
option (google.api.http) = {
post: "/eth/v1alpha1/validator/block"
body: "*"
};
}
// Retrieves the latest valid attestation data to be attested on the beacon chain.
//
// The server returns the latest valid data which represents the correct vote
// for the head of the beacon chain,
rpc GetAttestationData(AttestationDataRequest) returns (AttestationData) {
option (google.api.http) = {
get: "/eth/v1alpha1/validator/attestation"
};
}
// Sends the newly signed attestation to beacon node.
//
// The validator sends the newly signed attestation to the beacon node for the attestation to
// be included in the beacon chain. The beacon node is expected to validate and publish attestation on
// appropriate committee subnet.
rpc ProposeAttestation(Attestation) returns (AttestResponse) {
option (google.api.http) = {
post: "/eth/v1alpha1/validator/attestation"
body: "*"
};
}
// Submit selection proof to the beacon node to aggregate all matching wire attestations with the same data root.
// the beacon node responses with an aggregate and proof object back to validator to sign over.
rpc SubmitAggregateSelectionProof(AggregateSelectionRequest) returns (AggregateSelectionResponse) {
option (google.api.http) = {
post: "/eth/v1alpha1/validator/aggregate"
body: "*"
};
}
// Submit a signed aggregate and proof object, the beacon node will broadcast the
// signed aggregated attestation and proof object.
rpc SubmitSignedAggregateSelectionProof(SignedAggregateSubmitRequest) returns (SignedAggregateSubmitResponse) {
option (google.api.http) = {
post: "/eth/v1alpha1/validator/aggregate"
body: "*"
};
}
// Propose to leave the list of active validators.
//
// The beacon node is expected to validate the request and make it available for inclusion in
// the next proposed block.
rpc ProposeExit(SignedVoluntaryExit) returns (ProposeExitResponse) {
option (google.api.http) = {
post: "/eth/v1alpha1/validator/exit"
body: "*"
};
}
// Subscribe to particular committee ID subnets given validator's duty.
//
// The beacon node is expected to subscribe to the committee ID subnet given by the request. With this,
// beacon node serving attesters can find persistent peers on the subnet to publish attestation,
// and beacon node serving aggregator can join the subnet.
rpc SubscribeCommitteeSubnets(CommitteeSubnetsSubscribeRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/eth/v1alpha1/validator/subnet/subscribe"
body: "*"
};
}
}
message DomainRequest {
// The epoch for which the domain is being requested.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// The bytes domain specified by the validator.
bytes domain = 2;
}
message DomainResponse {
// The signature domain is a byte array used by validators when
// signing data related to block proposals and attestations.
bytes signature_domain = 1;
}
message ValidatorActivationRequest {
// A list of 48 byte validator public keys.
repeated bytes public_keys = 1 [(ethereum.eth.ext.ssz_size) = "?,48"];
}
message ValidatorActivationResponse {
message Status {
// A 48 byte validator public key.
bytes public_key = 1;
// A wrapper representing a validator's status object.
ValidatorStatusResponse status = 2;
// The validators index in the beacon state.
uint64 index = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
// A list of validator statuses mapped 1-to-1 with the public keys
// in the request.
repeated Status statuses = 1;
}
message ChainStartResponse {
// A boolean specifying whether or not the chain has started.
bool started = 1;
// The genesis time of the beacon chain.
uint64 genesis_time = 2;
// 32 byte hash tree root of the genesis validator set.
bytes genesis_validators_root = 3 [(ethereum.eth.ext.ssz_size) = "32"];
}
message SyncedResponse {
// A boolean specifying whether or not the beacon node is synced and ready for the validator.
bool synced = 1;
// The genesis time of the beacon chain.
uint64 genesis_time = 2;
}
message ValidatorIndexRequest {
// A 48 byte validator public key.
bytes public_key = 1 [(ethereum.eth.ext.ssz_size) = "48"];
}
message ValidatorIndexResponse {
// The validator's index in the beacon chain state's validator registry.
uint64 index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
message ValidatorStatusRequest {
// A 48 byte validator public key.
bytes public_key = 1 [(ethereum.eth.ext.ssz_size) = "48"];
}
enum ValidatorStatus {
UNKNOWN_STATUS = 0;
DEPOSITED = 1;
PENDING = 2;
ACTIVE = 3;
EXITING = 4;
SLASHING = 5;
EXITED = 6;
INVALID = 7;
PARTIALLY_DEPOSITED = 8;
}
message ValidatorStatusResponse {
// The corresponding validator status.
ValidatorStatus status = 1;
// The block number of the Ethereum proof-of-work chain
// where the deposit for the validator was included.
uint64 eth1_deposit_block_number = 2;
// The slot in the beacon chain in which the validator's
// deposit was included in a block.
uint64 deposit_inclusion_slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// The epoch in the beacon chain in which the validator
// is determined as active.
uint64 activation_epoch = 4 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// The position in the activation queue of pending validators.
uint64 position_in_activation_queue = 5;
}
message MultipleValidatorStatusRequest {
// A list of 48 byte validator public keys.
repeated bytes public_keys = 1 [(ethereum.eth.ext.ssz_size) = "?,48"];
// A list of validator indices.
repeated int64 indices = 2;
}
message MultipleValidatorStatusResponse {
// A list of 48 byte validator public keys.
repeated bytes public_keys = 1 [(ethereum.eth.ext.ssz_size) = "?,48"];
// A list of ValidatorStatusResponses mapped 1-to-1 with the public keys.
repeated ValidatorStatusResponse statuses = 2;
// A list of validator indices.
repeated uint64 indices = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
message DutiesRequest {
// Epoch at which validators should perform their duties.
uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Array of byte encoded BLS public keys.
repeated bytes public_keys = 2 [(ethereum.eth.ext.ssz_size) = "?,48"];
}
message DutiesResponse {
repeated Duty duties = 1 [deprecated = true];
repeated Duty current_epoch_duties = 2;
repeated Duty next_epoch_duties = 3;
message Duty {
// The committee a validator is assigned to.
repeated uint64 committee = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// The index into the committee where the validator belongs in.
uint64 committee_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.CommitteeIndex"];
// Slot at which a validator must attest.
uint64 attester_slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// Slots at which a validator must propose a beacon chain block.
repeated uint64 proposer_slots = 4 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// 48 byte BLS public key for the validator who's assigned to perform a duty.
bytes public_key = 5 [(ethereum.eth.ext.ssz_size) = "48"];
// The current status of the validator assigned to perform the duty.
ValidatorStatus status = 6;
// The index of the validator in the beacon state.
uint64 validator_index = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
}
}
message BlockRequest {
// Slot for which the block should be proposed.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// Validator's 32 byte randao reveal secret of the current epoch.
bytes randao_reveal = 2 [(ethereum.eth.ext.ssz_size) = "48"];
// Validator's 32 byte graffiti message for the new block.
bytes graffiti = 3 [(ethereum.eth.ext.ssz_size) = "32"];
}
message ProposeResponse {
// The block root of the successfully proposed beacon block.
bytes block_root = 1 [(ethereum.eth.ext.ssz_size) = "32"];
}
message ProposeExitResponse {
// The root of the successfully proposed voluntary exit.
bytes exit_root = 1 [(ethereum.eth.ext.ssz_size) = "32"];
}
message AttestationDataRequest {
// Slot for which the attestation should be created.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// Committee index the attestation should be created for.
uint64 committee_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.CommitteeIndex"];
}
message AttestResponse {
// The root of the attestation data successfully submitted to the beacon node.
bytes attestation_data_root = 1 [(ethereum.eth.ext.ssz_size) = "32"];
}
message AggregateSelectionRequest {
// Slot for which the aggregation request applies.
uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// Committee index of the validator at the given slot.
uint64 committee_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.CommitteeIndex"];
// 48 byte public key of the validator.
bytes public_key = 3 [(ethereum.eth.ext.ssz_size) = "48", (ethereum.eth.ext.spec_name) = "pubkey"];
// 96 byte signature of the validator on the slot. This is used as proof that the validator is
// an aggregator for the given slot.
bytes slot_signature = 4 [(ethereum.eth.ext.ssz_size) = "96"];
}
message AggregateSelectionResponse {
// The aggregate and proof message without the signature.
AggregateAttestationAndProof aggregate_and_proof = 1;
}
message SignedAggregateSubmitRequest {
// The signed aggregate and proof message with the signature.
SignedAggregateAttestationAndProof signed_aggregate_and_proof = 1;
}
message SignedAggregateSubmitResponse {
// The 32 byte hash tree root of the aggregated attestation data.
bytes attestation_data_root = 1 [(ethereum.eth.ext.ssz_size) = "32"];
}
message CommitteeSubnetsSubscribeRequest {
// A list of intended slots to subscribe.
repeated uint64 slots = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
// A list of intended committee ids to subscribe. It is mapped 1-to-1 with the slots
repeated uint64 committee_ids = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.CommitteeIndex"];
// Whether to subscribe as an aggregator or by default attester.
// It is mapped 1-to-1 with the slots and committee ids.
// Subscribe as an aggregator means to join the subnet.
// Subscribe as an attester means finding persistent peers on the subnet to be able to publish attestations.
repeated bool is_aggregator = 3;
}
// An Ethereum 2.0 validator.
message Validator {
// 48 byte BLS public key used for the validator's activities.
bytes public_key = 1 [(ethereum.eth.ext.ssz_size) = "48", (ethereum.eth.ext.spec_name) = "pubkey"];
// 32 byte hash of the withdrawal destination public key.
bytes withdrawal_credentials = 2 [(ethereum.eth.ext.ssz_size) = "32"];
// The validators current effective balance in gwei.
uint64 effective_balance = 3;
// Whether or not the validator has been slashed.
bool slashed = 4;
// Epoch when the validator became eligible for activation. This field may
// be zero if the validator was present in the Ethereum 2.0 genesis. This
// field is FAR_FUTURE_EPOCH if the validator has not been activated.
uint64 activation_eligibility_epoch = 5 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Epoch when the validator was activated. This field may be zero if the
// validator was present in the Ethereum 2.0 genesis. This field is
// FAR_FUTURE_EPOCH if the validator has not been activated.
uint64 activation_epoch = 6 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Epoch when the validator was exited. This field is FAR_FUTURE_EPOCH if
// the validator has not exited.
// FAR_FUTURE_EPOCH is a constant defined by the official Ethereum 2.0 specification:
// https://github.com/ethereum/eth2.0-specs/blob/v0.9.2/specs/core/0_beacon-chain.md#constants
uint64 exit_epoch = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// Epoch when the validator is eligible to withdraw their funds. This field
// is FAR_FUTURE_EPOCH if the validator has not exited.
// FAR_FUTURE_EPOCH is a constant defined by the official Ethereum 2.0 specification:
// https://github.com/ethereum/eth2.0-specs/blob/v0.9.2/specs/core/0_beacon-chain.md#constants
uint64 withdrawable_epoch = 8 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
}
// ValidatorParticipation stores participation metrics during a given epoch.
message ValidatorParticipation {
// Percentage of validator participation in the given epoch. This field
// contains a value between 0 and 1.
float global_participation_rate = 1 [deprecated = true];
// The total amount of ether, in gwei, that has been used in voting.
uint64 voted_ether = 2 [deprecated = true];
// The total amount of ether, in gwei, that is eligible for voting.
uint64 eligible_ether = 3 [deprecated = true];
// Total staked gwei that was active (i.e. eligible to vote) during the current epoch.
uint64 current_epoch_active_gwei = 4;
// Total staked gwei that had attestations included in a block during the current epoch,
// attestations by the same validator do not increase this figure.
uint64 current_epoch_attesting_gwei = 5;
// Total staked gwei that attested to the majority-elected Casper FFG target epoch during the current epoch.
uint64 current_epoch_target_attesting_gwei = 6;
// Same as current_epoch_active_gwei but for previous epoch.
uint64 previous_epoch_active_gwei = 7;
// Same as current_epoch_attesting_gwei but for previous epoch.
uint64 previous_epoch_attesting_gwei = 8;
// Same as current_epoch_target_attesting_gwei but for previous epoch.
uint64 previous_epoch_target_attesting_gwei = 9;
// Total staked gwei that attested to a head beacon block that is in the canonical chain.
uint64 previous_epoch_head_attesting_gwei = 10;
}
// ValidatorInfo gives information about the state of a validator at a certain epoch.
message ValidatorInfo {
// The validator's 48 byte BLS public key.
bytes public_key = 1;
// The validator's index in the beacon state.
uint64 index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
// The epoch for which the information pertains.
uint64 epoch = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
// The validator's current status.
ValidatorStatus status = 4;
// The unix timestamp when the validator enters the next state.
// This could be in the past. Some values depend on chain operation and so will vary from epoch to epoch.
// Specific times for each state are as follows:
// - state == DEPOSITED: time at which Ethereum 1 deposit will be stored on-chain by Ethereum 2 (variable, can be 0).
// - state == PENDING: time at which validator will be activated (variable).
// - state == ACTIVE: no value (next transition depends on user and network actions).
// - state == EXITING: time at which validator will exit.
// - state == SLASHING: time at which validator will exit.
// - state == EXITED: time at which validator funds will be withdrawable.
uint64 transition_timestamp = 5;
// The validator's current balance in GWei.
uint64 balance = 6;
// The validator's current effective balance in GWei.
// Only valid for states ACTIVE, EXITING, SLASHING.
uint64 effective_balance = 7;
}