From 63f688f0881729d00022620d2c053e5d862a932b Mon Sep 17 00:00:00 2001 From: terence tsao Date: Fri, 19 Apr 2024 20:23:44 -0700 Subject: [PATCH 1/3] Enable validator to sign payload attestation --- beacon-chain/rpc/eth/config/handlers_test.go | 13 +- config/params/config.go | 2 +- proto/engine/v1/BUILD.bazel | 3 - proto/engine/v1/epbs.pb.go | 389 +++--------------- proto/engine/v1/epbs.proto | 19 - proto/engine/v1/generated.ssz.go | 289 +------------ proto/prysm/v1alpha1/BUILD.bazel | 4 + proto/prysm/v1alpha1/beacon_block.pb.go | 62 +-- proto/prysm/v1alpha1/beacon_block.proto | 3 +- proto/prysm/v1alpha1/generated.ssz.go | 293 ++++++++++++- .../prysm/v1alpha1/payload_attestation.pb.go | 376 +++++++++++++++++ .../v1alpha1/payload_attestation.pb.gw.go | 4 + .../prysm/v1alpha1/payload_attestation.proto | 43 ++ .../validator-client/keymanager.pb.go | 201 +++++---- .../validator-client/keymanager.proto | 6 + testing/util/deneb.go | 35 ++ validator/client/BUILD.bazel | 2 + validator/client/payload_attestation.go | 49 +++ validator/client/payload_attestation_test.go | 51 +++ 19 files changed, 1078 insertions(+), 766 deletions(-) create mode 100755 proto/prysm/v1alpha1/payload_attestation.pb.go create mode 100755 proto/prysm/v1alpha1/payload_attestation.pb.gw.go create mode 100644 proto/prysm/v1alpha1/payload_attestation.proto create mode 100644 validator/client/payload_attestation.go create mode 100644 validator/client/payload_attestation_test.go diff --git a/beacon-chain/rpc/eth/config/handlers_test.go b/beacon-chain/rpc/eth/config/handlers_test.go index 521ba62d5def..7b060b344d20 100644 --- a/beacon-chain/rpc/eth/config/handlers_test.go +++ b/beacon-chain/rpc/eth/config/handlers_test.go @@ -21,6 +21,10 @@ import ( "github.com/prysmaticlabs/prysm/v5/testing/require" ) +// Variables defined in the placeholderFields will not be tested in `TestGetSpec`. +// These are variables that we don't use in Prysm. (i.e. future hardfork, light client... etc) +var placeholderFields = []string{"DOMAIN_BEACON_BUILDER", "DOMAIN_PTC_ATTESTER"} + func TestGetDepositContract(t *testing.T) { params.SetupTestConfigCleanup(t) config := params.BeaconConfig().Copy() @@ -170,7 +174,7 @@ func TestGetSpec(t *testing.T) { data, ok := resp.Data.(map[string]interface{}) require.Equal(t, true, ok) - assert.Equal(t, 129, len(data)) + assert.Equal(t, 129, len(data)-len(placeholderFields)) for k, v := range data { switch k { case "CONFIG_NAME": @@ -243,6 +247,7 @@ func TestGetSpec(t *testing.T) { assert.Equal(t, "0x"+hex.EncodeToString([]byte("DenebForkVersion")), v) case "DENEB_FORK_EPOCH": assert.Equal(t, "105", v) + case "MIN_ANCHOR_POW_BLOCK_DIFFICULTY": assert.Equal(t, "1000", v) case "BLS_WITHDRAWAL_PREFIX": @@ -455,6 +460,12 @@ func TestGetSpec(t *testing.T) { case "MAX_REQUEST_BLOCKS_DENEB": assert.Equal(t, "128", v) default: + for _, pf := range placeholderFields { + if k == pf { + t.Logf("Skipping placeholder field: %s", k) + return + } + } t.Errorf("Incorrect key: %s", k) } } diff --git a/config/params/config.go b/config/params/config.go index 2e1fe753ec1b..9750850f3d10 100644 --- a/config/params/config.go +++ b/config/params/config.go @@ -120,7 +120,7 @@ type BeaconChainConfig struct { DomainApplicationMask [4]byte `yaml:"DOMAIN_APPLICATION_MASK" spec:"true"` // DomainApplicationMask defines the BLS signature domain for application mask. DomainApplicationBuilder [4]byte `yaml:"DOMAIN_APPLICATION_BUILDER" spec:"true"` // DomainApplicationBuilder defines the BLS signature domain for application builder. DomainBLSToExecutionChange [4]byte `yaml:"DOMAIN_BLS_TO_EXECUTION_CHANGE" spec:"true"` // DomainBLSToExecutionChange defines the BLS signature domain to change withdrawal addresses to ETH1 prefix - DomainBeaconBuilder [4]byte `yaml:"DOMAIN_BEACON_BULDER" spec:"false"` // DomainBeaconBuilder defines the BLS signature domain used by builders [New in ePBS] + DomainBeaconBuilder [4]byte `yaml:"DOMAIN_BEACON_BUILDER" spec:"false"` // DomainBeaconBuilder defines the BLS signature domain used by builders [New in ePBS] DomainPTCAttester [4]byte `yaml:"DOMAIN_PTC_ATTESTER" spec:"false"` // DomainPTCAttester defines the BLS signature domain used by PTC members [New in ePBS] // Prysm constants. diff --git a/proto/engine/v1/BUILD.bazel b/proto/engine/v1/BUILD.bazel index 772236ab0540..fefaf85abf17 100644 --- a/proto/engine/v1/BUILD.bazel +++ b/proto/engine/v1/BUILD.bazel @@ -41,9 +41,6 @@ ssz_gen_marshal( "ExecutionPayloadHeaderCapella", "ExecutionPayloadHeaderDeneb", "ExecutionPayloadDeneb", - "PayloadAttestationData", - "PayloadAttestation", - "PayloadAttestationMessage", "InclusionListSummaryEntry", "InclusionListSummary", "SignedInclusionListSummary", diff --git a/proto/engine/v1/epbs.pb.go b/proto/engine/v1/epbs.pb.go index 324755ca910b..52210801db76 100755 --- a/proto/engine/v1/epbs.pb.go +++ b/proto/engine/v1/epbs.pb.go @@ -10,7 +10,6 @@ import ( reflect "reflect" sync "sync" - github_com_prysmaticlabs_go_bitfield "github.com/prysmaticlabs/go-bitfield" github_com_prysmaticlabs_prysm_v5_consensus_types_primitives "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" _ "github.com/prysmaticlabs/prysm/v5/proto/eth/ext" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -24,195 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type PayloadAttestationData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BeaconBlockRoot []byte `protobuf:"bytes,1,opt,name=beacon_block_root,json=beaconBlockRoot,proto3" json:"beacon_block_root,omitempty" ssz-size:"32"` - Slot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,2,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` - PayloadStatus github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.PTCStatus `protobuf:"varint,3,opt,name=payload_status,json=payloadStatus,proto3" json:"payload_status,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.PTCStatus"` -} - -func (x *PayloadAttestationData) Reset() { - *x = PayloadAttestationData{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PayloadAttestationData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PayloadAttestationData) ProtoMessage() {} - -func (x *PayloadAttestationData) ProtoReflect() protoreflect.Message { - mi := &file_proto_engine_v1_epbs_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 PayloadAttestationData.ProtoReflect.Descriptor instead. -func (*PayloadAttestationData) Descriptor() ([]byte, []int) { - return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{0} -} - -func (x *PayloadAttestationData) GetBeaconBlockRoot() []byte { - if x != nil { - return x.BeaconBlockRoot - } - return nil -} - -func (x *PayloadAttestationData) GetSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { - if x != nil { - return x.Slot - } - return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) -} - -func (x *PayloadAttestationData) GetPayloadStatus() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.PTCStatus { - if x != nil { - return x.PayloadStatus - } - return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.PTCStatus(0) -} - -type PayloadAttestation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AggregationBits github_com_prysmaticlabs_go_bitfield.Bitvector512 `protobuf:"bytes,1,opt,name=aggregation_bits,json=aggregationBits,proto3" json:"aggregation_bits,omitempty" cast-type:"github.com/prysmaticlabs/go-bitfield.Bitvector512" ssz-size:"64"` - Data *PayloadAttestationData `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 *PayloadAttestation) Reset() { - *x = PayloadAttestation{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PayloadAttestation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PayloadAttestation) ProtoMessage() {} - -func (x *PayloadAttestation) ProtoReflect() protoreflect.Message { - mi := &file_proto_engine_v1_epbs_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 PayloadAttestation.ProtoReflect.Descriptor instead. -func (*PayloadAttestation) Descriptor() ([]byte, []int) { - return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{1} -} - -func (x *PayloadAttestation) GetAggregationBits() github_com_prysmaticlabs_go_bitfield.Bitvector512 { - if x != nil { - return x.AggregationBits - } - return github_com_prysmaticlabs_go_bitfield.Bitvector512(nil) -} - -func (x *PayloadAttestation) GetData() *PayloadAttestationData { - if x != nil { - return x.Data - } - return nil -} - -func (x *PayloadAttestation) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil -} - -type PayloadAttestationMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ValidatorIndex github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex `protobuf:"varint,1,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"` - Data *PayloadAttestationData `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 *PayloadAttestationMessage) Reset() { - *x = PayloadAttestationMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PayloadAttestationMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PayloadAttestationMessage) ProtoMessage() {} - -func (x *PayloadAttestationMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_engine_v1_epbs_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 PayloadAttestationMessage.ProtoReflect.Descriptor instead. -func (*PayloadAttestationMessage) Descriptor() ([]byte, []int) { - return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{2} -} - -func (x *PayloadAttestationMessage) GetValidatorIndex() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex { - if x != nil { - return x.ValidatorIndex - } - return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(0) -} - -func (x *PayloadAttestationMessage) GetData() *PayloadAttestationData { - if x != nil { - return x.Data - } - return nil -} - -func (x *PayloadAttestationMessage) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil -} - type InclusionListSummary struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -226,7 +36,7 @@ type InclusionListSummary struct { func (x *InclusionListSummary) Reset() { *x = InclusionListSummary{} if protoimpl.UnsafeEnabled { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[3] + mi := &file_proto_engine_v1_epbs_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -239,7 +49,7 @@ func (x *InclusionListSummary) String() string { func (*InclusionListSummary) ProtoMessage() {} func (x *InclusionListSummary) ProtoReflect() protoreflect.Message { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[3] + mi := &file_proto_engine_v1_epbs_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -252,7 +62,7 @@ func (x *InclusionListSummary) ProtoReflect() protoreflect.Message { // Deprecated: Use InclusionListSummary.ProtoReflect.Descriptor instead. func (*InclusionListSummary) Descriptor() ([]byte, []int) { - return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{3} + return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{0} } func (x *InclusionListSummary) GetProposerIndex() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex { @@ -288,7 +98,7 @@ type SignedInclusionListSummary struct { func (x *SignedInclusionListSummary) Reset() { *x = SignedInclusionListSummary{} if protoimpl.UnsafeEnabled { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[4] + mi := &file_proto_engine_v1_epbs_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -301,7 +111,7 @@ func (x *SignedInclusionListSummary) String() string { func (*SignedInclusionListSummary) ProtoMessage() {} func (x *SignedInclusionListSummary) ProtoReflect() protoreflect.Message { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[4] + mi := &file_proto_engine_v1_epbs_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -314,7 +124,7 @@ func (x *SignedInclusionListSummary) ProtoReflect() protoreflect.Message { // Deprecated: Use SignedInclusionListSummary.ProtoReflect.Descriptor instead. func (*SignedInclusionListSummary) Descriptor() ([]byte, []int) { - return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{4} + return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{1} } func (x *SignedInclusionListSummary) GetMessage() *InclusionListSummary { @@ -344,7 +154,7 @@ type InclusionList struct { func (x *InclusionList) Reset() { *x = InclusionList{} if protoimpl.UnsafeEnabled { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[5] + mi := &file_proto_engine_v1_epbs_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -357,7 +167,7 @@ func (x *InclusionList) String() string { func (*InclusionList) ProtoMessage() {} func (x *InclusionList) ProtoReflect() protoreflect.Message { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[5] + mi := &file_proto_engine_v1_epbs_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -370,7 +180,7 @@ func (x *InclusionList) ProtoReflect() protoreflect.Message { // Deprecated: Use InclusionList.ProtoReflect.Descriptor instead. func (*InclusionList) Descriptor() ([]byte, []int) { - return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{5} + return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{2} } func (x *InclusionList) GetSignedSummary() *SignedInclusionListSummary { @@ -411,7 +221,7 @@ type ExecutionPayloadHeaderEPBS struct { func (x *ExecutionPayloadHeaderEPBS) Reset() { *x = ExecutionPayloadHeaderEPBS{} if protoimpl.UnsafeEnabled { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[6] + mi := &file_proto_engine_v1_epbs_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -424,7 +234,7 @@ func (x *ExecutionPayloadHeaderEPBS) String() string { func (*ExecutionPayloadHeaderEPBS) ProtoMessage() {} func (x *ExecutionPayloadHeaderEPBS) ProtoReflect() protoreflect.Message { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[6] + mi := &file_proto_engine_v1_epbs_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -437,7 +247,7 @@ func (x *ExecutionPayloadHeaderEPBS) ProtoReflect() protoreflect.Message { // Deprecated: Use ExecutionPayloadHeaderEPBS.ProtoReflect.Descriptor instead. func (*ExecutionPayloadHeaderEPBS) Descriptor() ([]byte, []int) { - return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{6} + return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{3} } func (x *ExecutionPayloadHeaderEPBS) GetParentBlockHash() []byte { @@ -517,7 +327,7 @@ type ExecutionPayloadEPBS struct { func (x *ExecutionPayloadEPBS) Reset() { *x = ExecutionPayloadEPBS{} if protoimpl.UnsafeEnabled { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[7] + mi := &file_proto_engine_v1_epbs_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -530,7 +340,7 @@ func (x *ExecutionPayloadEPBS) String() string { func (*ExecutionPayloadEPBS) ProtoMessage() {} func (x *ExecutionPayloadEPBS) ProtoReflect() protoreflect.Message { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[7] + mi := &file_proto_engine_v1_epbs_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -543,7 +353,7 @@ func (x *ExecutionPayloadEPBS) ProtoReflect() protoreflect.Message { // Deprecated: Use ExecutionPayloadEPBS.ProtoReflect.Descriptor instead. func (*ExecutionPayloadEPBS) Descriptor() ([]byte, []int) { - return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{7} + return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{4} } func (x *ExecutionPayloadEPBS) GetParentHash() []byte { @@ -684,7 +494,7 @@ type SignedExecutionPayloadHeader struct { func (x *SignedExecutionPayloadHeader) Reset() { *x = SignedExecutionPayloadHeader{} if protoimpl.UnsafeEnabled { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[8] + mi := &file_proto_engine_v1_epbs_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -697,7 +507,7 @@ func (x *SignedExecutionPayloadHeader) String() string { func (*SignedExecutionPayloadHeader) ProtoMessage() {} func (x *SignedExecutionPayloadHeader) ProtoReflect() protoreflect.Message { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[8] + mi := &file_proto_engine_v1_epbs_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -710,7 +520,7 @@ func (x *SignedExecutionPayloadHeader) ProtoReflect() protoreflect.Message { // Deprecated: Use SignedExecutionPayloadHeader.ProtoReflect.Descriptor instead. func (*SignedExecutionPayloadHeader) Descriptor() ([]byte, []int) { - return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{8} + return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{5} } func (x *SignedExecutionPayloadHeader) GetMessage() *ExecutionPayloadHeader { @@ -746,7 +556,7 @@ type ExecutionPayloadEnvelope struct { func (x *ExecutionPayloadEnvelope) Reset() { *x = ExecutionPayloadEnvelope{} if protoimpl.UnsafeEnabled { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[9] + mi := &file_proto_engine_v1_epbs_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -759,7 +569,7 @@ func (x *ExecutionPayloadEnvelope) String() string { func (*ExecutionPayloadEnvelope) ProtoMessage() {} func (x *ExecutionPayloadEnvelope) ProtoReflect() protoreflect.Message { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[9] + mi := &file_proto_engine_v1_epbs_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -772,7 +582,7 @@ func (x *ExecutionPayloadEnvelope) ProtoReflect() protoreflect.Message { // Deprecated: Use ExecutionPayloadEnvelope.ProtoReflect.Descriptor instead. func (*ExecutionPayloadEnvelope) Descriptor() ([]byte, []int) { - return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{9} + return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{6} } func (x *ExecutionPayloadEnvelope) GetPayload() *ExecutionPayloadEPBS { @@ -850,7 +660,7 @@ type SignedExecutionPayloadEnvelope struct { func (x *SignedExecutionPayloadEnvelope) Reset() { *x = SignedExecutionPayloadEnvelope{} if protoimpl.UnsafeEnabled { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[10] + mi := &file_proto_engine_v1_epbs_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -863,7 +673,7 @@ func (x *SignedExecutionPayloadEnvelope) String() string { func (*SignedExecutionPayloadEnvelope) ProtoMessage() {} func (x *SignedExecutionPayloadEnvelope) ProtoReflect() protoreflect.Message { - mi := &file_proto_engine_v1_epbs_proto_msgTypes[10] + mi := &file_proto_engine_v1_epbs_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -876,7 +686,7 @@ func (x *SignedExecutionPayloadEnvelope) ProtoReflect() protoreflect.Message { // Deprecated: Use SignedExecutionPayloadEnvelope.ProtoReflect.Descriptor instead. func (*SignedExecutionPayloadEnvelope) Descriptor() ([]byte, []int) { - return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{10} + return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{7} } func (x *SignedExecutionPayloadEnvelope) GetMessage() *ExecutionPayloadEnvelope { @@ -903,55 +713,7 @@ var file_proto_engine_v1_epbs_proto_rawDesc = []byte{ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x02, 0x0a, 0x16, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, - 0x12, 0x32, 0x0a, 0x11, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 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, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, - 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, - 0x69, 0x76, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, - 0x71, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4a, 0x82, 0xb5, 0x18, 0x46, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, - 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, - 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x50, 0x54, 0x43, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x22, 0xe2, 0x01, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x66, 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, 0x3b, 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, 0x8a, 0xb5, 0x18, 0x02, 0x36, 0x34, - 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x74, - 0x73, 0x12, 0x3e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 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, 0xfb, 0x01, 0x0a, 0x19, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x78, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, - 0x82, 0xb5, 0x18, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, - 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, - 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, - 0x2e, 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, - 0x3e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 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, 0x95, 0x02, 0x0a, 0x14, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x02, 0x0a, 0x14, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 0x67, 0x69, 0x74, 0x68, @@ -1161,36 +923,31 @@ func file_proto_engine_v1_epbs_proto_rawDescGZIP() []byte { return file_proto_engine_v1_epbs_proto_rawDescData } -var file_proto_engine_v1_epbs_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_proto_engine_v1_epbs_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_proto_engine_v1_epbs_proto_goTypes = []interface{}{ - (*PayloadAttestationData)(nil), // 0: ethereum.engine.v1.PayloadAttestationData - (*PayloadAttestation)(nil), // 1: ethereum.engine.v1.PayloadAttestation - (*PayloadAttestationMessage)(nil), // 2: ethereum.engine.v1.PayloadAttestationMessage - (*InclusionListSummary)(nil), // 3: ethereum.engine.v1.InclusionListSummary - (*SignedInclusionListSummary)(nil), // 4: ethereum.engine.v1.SignedInclusionListSummary - (*InclusionList)(nil), // 5: ethereum.engine.v1.InclusionList - (*ExecutionPayloadHeaderEPBS)(nil), // 6: ethereum.engine.v1.ExecutionPayloadHeaderEPBS - (*ExecutionPayloadEPBS)(nil), // 7: ethereum.engine.v1.ExecutionPayloadEPBS - (*SignedExecutionPayloadHeader)(nil), // 8: ethereum.engine.v1.SignedExecutionPayloadHeader - (*ExecutionPayloadEnvelope)(nil), // 9: ethereum.engine.v1.ExecutionPayloadEnvelope - (*SignedExecutionPayloadEnvelope)(nil), // 10: ethereum.engine.v1.SignedExecutionPayloadEnvelope - (*Withdrawal)(nil), // 11: ethereum.engine.v1.Withdrawal - (*ExecutionPayloadHeader)(nil), // 12: ethereum.engine.v1.ExecutionPayloadHeader + (*InclusionListSummary)(nil), // 0: ethereum.engine.v1.InclusionListSummary + (*SignedInclusionListSummary)(nil), // 1: ethereum.engine.v1.SignedInclusionListSummary + (*InclusionList)(nil), // 2: ethereum.engine.v1.InclusionList + (*ExecutionPayloadHeaderEPBS)(nil), // 3: ethereum.engine.v1.ExecutionPayloadHeaderEPBS + (*ExecutionPayloadEPBS)(nil), // 4: ethereum.engine.v1.ExecutionPayloadEPBS + (*SignedExecutionPayloadHeader)(nil), // 5: ethereum.engine.v1.SignedExecutionPayloadHeader + (*ExecutionPayloadEnvelope)(nil), // 6: ethereum.engine.v1.ExecutionPayloadEnvelope + (*SignedExecutionPayloadEnvelope)(nil), // 7: ethereum.engine.v1.SignedExecutionPayloadEnvelope + (*Withdrawal)(nil), // 8: ethereum.engine.v1.Withdrawal + (*ExecutionPayloadHeader)(nil), // 9: ethereum.engine.v1.ExecutionPayloadHeader } var file_proto_engine_v1_epbs_proto_depIdxs = []int32{ - 0, // 0: ethereum.engine.v1.PayloadAttestation.data:type_name -> ethereum.engine.v1.PayloadAttestationData - 0, // 1: ethereum.engine.v1.PayloadAttestationMessage.data:type_name -> ethereum.engine.v1.PayloadAttestationData - 3, // 2: ethereum.engine.v1.SignedInclusionListSummary.message:type_name -> ethereum.engine.v1.InclusionListSummary - 4, // 3: ethereum.engine.v1.InclusionList.signed_summary:type_name -> ethereum.engine.v1.SignedInclusionListSummary - 11, // 4: ethereum.engine.v1.ExecutionPayloadEPBS.withdrawals:type_name -> ethereum.engine.v1.Withdrawal - 12, // 5: ethereum.engine.v1.SignedExecutionPayloadHeader.message:type_name -> ethereum.engine.v1.ExecutionPayloadHeader - 7, // 6: ethereum.engine.v1.ExecutionPayloadEnvelope.payload:type_name -> ethereum.engine.v1.ExecutionPayloadEPBS - 9, // 7: ethereum.engine.v1.SignedExecutionPayloadEnvelope.message:type_name -> ethereum.engine.v1.ExecutionPayloadEnvelope - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 0, // 0: ethereum.engine.v1.SignedInclusionListSummary.message:type_name -> ethereum.engine.v1.InclusionListSummary + 1, // 1: ethereum.engine.v1.InclusionList.signed_summary:type_name -> ethereum.engine.v1.SignedInclusionListSummary + 8, // 2: ethereum.engine.v1.ExecutionPayloadEPBS.withdrawals:type_name -> ethereum.engine.v1.Withdrawal + 9, // 3: ethereum.engine.v1.SignedExecutionPayloadHeader.message:type_name -> ethereum.engine.v1.ExecutionPayloadHeader + 4, // 4: ethereum.engine.v1.ExecutionPayloadEnvelope.payload:type_name -> ethereum.engine.v1.ExecutionPayloadEPBS + 6, // 5: ethereum.engine.v1.SignedExecutionPayloadEnvelope.message:type_name -> ethereum.engine.v1.ExecutionPayloadEnvelope + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_proto_engine_v1_epbs_proto_init() } @@ -1201,42 +958,6 @@ func file_proto_engine_v1_epbs_proto_init() { file_proto_engine_v1_execution_engine_proto_init() if !protoimpl.UnsafeEnabled { file_proto_engine_v1_epbs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PayloadAttestationData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_engine_v1_epbs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PayloadAttestation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_engine_v1_epbs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PayloadAttestationMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_engine_v1_epbs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InclusionListSummary); i { case 0: return &v.state @@ -1248,7 +969,7 @@ func file_proto_engine_v1_epbs_proto_init() { return nil } } - file_proto_engine_v1_epbs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_proto_engine_v1_epbs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignedInclusionListSummary); i { case 0: return &v.state @@ -1260,7 +981,7 @@ func file_proto_engine_v1_epbs_proto_init() { return nil } } - file_proto_engine_v1_epbs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_proto_engine_v1_epbs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InclusionList); i { case 0: return &v.state @@ -1272,7 +993,7 @@ func file_proto_engine_v1_epbs_proto_init() { return nil } } - file_proto_engine_v1_epbs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_proto_engine_v1_epbs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExecutionPayloadHeaderEPBS); i { case 0: return &v.state @@ -1284,7 +1005,7 @@ func file_proto_engine_v1_epbs_proto_init() { return nil } } - file_proto_engine_v1_epbs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_proto_engine_v1_epbs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExecutionPayloadEPBS); i { case 0: return &v.state @@ -1296,7 +1017,7 @@ func file_proto_engine_v1_epbs_proto_init() { return nil } } - file_proto_engine_v1_epbs_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_proto_engine_v1_epbs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignedExecutionPayloadHeader); i { case 0: return &v.state @@ -1308,7 +1029,7 @@ func file_proto_engine_v1_epbs_proto_init() { return nil } } - file_proto_engine_v1_epbs_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_proto_engine_v1_epbs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExecutionPayloadEnvelope); i { case 0: return &v.state @@ -1320,7 +1041,7 @@ func file_proto_engine_v1_epbs_proto_init() { return nil } } - file_proto_engine_v1_epbs_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_proto_engine_v1_epbs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignedExecutionPayloadEnvelope); i { case 0: return &v.state @@ -1339,7 +1060,7 @@ func file_proto_engine_v1_epbs_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_engine_v1_epbs_proto_rawDesc, NumEnums: 0, - NumMessages: 11, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/engine/v1/epbs.proto b/proto/engine/v1/epbs.proto index 48f775e95a33..a708bca39529 100644 --- a/proto/engine/v1/epbs.proto +++ b/proto/engine/v1/epbs.proto @@ -25,25 +25,6 @@ option java_outer_classname = "ExecutionEngineProto"; option java_package = "org.ethereum.engine.v1"; option php_namespace = "Ethereum\\Engine\\v1"; - -message PayloadAttestationData { - bytes beacon_block_root = 1 [(ethereum.eth.ext.ssz_size) = "32"]; - uint64 slot = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; - uint64 payload_status = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.PTCStatus"]; -} - -message PayloadAttestation { - bytes aggregation_bits = 1 [(ethereum.eth.ext.ssz_size) = "ptc.size", (ethereum.eth.ext.cast_type) = "ptc.type"]; - PayloadAttestationData data = 2; - bytes signature = 3 [(ethereum.eth.ext.ssz_size) = "96"]; -} - -message PayloadAttestationMessage { - uint64 validator_index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"]; - PayloadAttestationData data = 2; - bytes signature = 3 [(ethereum.eth.ext.ssz_size) = "96"]; -} - message InclusionListSummary { uint64 proposer_index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"]; uint64 slot = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; diff --git a/proto/engine/v1/generated.ssz.go b/proto/engine/v1/generated.ssz.go index 4238c83481db..b0c70a52a12a 100644 --- a/proto/engine/v1/generated.ssz.go +++ b/proto/engine/v1/generated.ssz.go @@ -1,5 +1,5 @@ // Code generated by fastssz. DO NOT EDIT. -// Hash: 9da65ddb83d4372c994a19faf27c1c09c9c4aba7811f98528d0c6fe176fb335e +// Hash: bd52a747e91259f87dee329c4b5cd646d4785631af68ce6473ea238aa99a75ce package enginev1 import ( @@ -7,293 +7,6 @@ import ( github_com_prysmaticlabs_prysm_v5_consensus_types_primitives "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" ) -// MarshalSSZ ssz marshals the PayloadAttestationData object -func (p *PayloadAttestationData) MarshalSSZ() ([]byte, error) { - return ssz.MarshalSSZ(p) -} - -// MarshalSSZTo ssz marshals the PayloadAttestationData object to a target array -func (p *PayloadAttestationData) MarshalSSZTo(buf []byte) (dst []byte, err error) { - dst = buf - - // Field (0) 'BeaconBlockRoot' - if size := len(p.BeaconBlockRoot); size != 32 { - err = ssz.ErrBytesLengthFn("--.BeaconBlockRoot", size, 32) - return - } - dst = append(dst, p.BeaconBlockRoot...) - - // Field (1) 'Slot' - dst = ssz.MarshalUint64(dst, uint64(p.Slot)) - - // Field (2) 'PayloadStatus' - dst = ssz.MarshalUint64(dst, uint64(p.PayloadStatus)) - - return -} - -// UnmarshalSSZ ssz unmarshals the PayloadAttestationData object -func (p *PayloadAttestationData) UnmarshalSSZ(buf []byte) error { - var err error - size := uint64(len(buf)) - if size != 48 { - return ssz.ErrSize - } - - // Field (0) 'BeaconBlockRoot' - if cap(p.BeaconBlockRoot) == 0 { - p.BeaconBlockRoot = make([]byte, 0, len(buf[0:32])) - } - p.BeaconBlockRoot = append(p.BeaconBlockRoot, buf[0:32]...) - - // Field (1) 'Slot' - p.Slot = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[32:40])) - - // Field (2) 'PayloadStatus' - p.PayloadStatus = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.PTCStatus(ssz.UnmarshallUint64(buf[40:48])) - - return err -} - -// SizeSSZ returns the ssz encoded size in bytes for the PayloadAttestationData object -func (p *PayloadAttestationData) SizeSSZ() (size int) { - size = 48 - return -} - -// HashTreeRoot ssz hashes the PayloadAttestationData object -func (p *PayloadAttestationData) HashTreeRoot() ([32]byte, error) { - return ssz.HashWithDefaultHasher(p) -} - -// HashTreeRootWith ssz hashes the PayloadAttestationData object with a hasher -func (p *PayloadAttestationData) HashTreeRootWith(hh *ssz.Hasher) (err error) { - indx := hh.Index() - - // Field (0) 'BeaconBlockRoot' - if size := len(p.BeaconBlockRoot); size != 32 { - err = ssz.ErrBytesLengthFn("--.BeaconBlockRoot", size, 32) - return - } - hh.PutBytes(p.BeaconBlockRoot) - - // Field (1) 'Slot' - hh.PutUint64(uint64(p.Slot)) - - // Field (2) 'PayloadStatus' - hh.PutUint64(uint64(p.PayloadStatus)) - - if ssz.EnableVectorizedHTR { - hh.MerkleizeVectorizedHTR(indx) - } else { - hh.Merkleize(indx) - } - return -} - -// MarshalSSZ ssz marshals the PayloadAttestation object -func (p *PayloadAttestation) MarshalSSZ() ([]byte, error) { - return ssz.MarshalSSZ(p) -} - -// MarshalSSZTo ssz marshals the PayloadAttestation object to a target array -func (p *PayloadAttestation) MarshalSSZTo(buf []byte) (dst []byte, err error) { - dst = buf - - // Field (0) 'AggregationBits' - if size := len(p.AggregationBits); size != 64 { - err = ssz.ErrBytesLengthFn("--.AggregationBits", size, 64) - return - } - dst = append(dst, p.AggregationBits...) - - // Field (1) 'Data' - if p.Data == nil { - p.Data = new(PayloadAttestationData) - } - if dst, err = p.Data.MarshalSSZTo(dst); err != nil { - return - } - - // Field (2) 'Signature' - if size := len(p.Signature); size != 96 { - err = ssz.ErrBytesLengthFn("--.Signature", size, 96) - return - } - dst = append(dst, p.Signature...) - - return -} - -// UnmarshalSSZ ssz unmarshals the PayloadAttestation object -func (p *PayloadAttestation) UnmarshalSSZ(buf []byte) error { - var err error - size := uint64(len(buf)) - if size != 208 { - return ssz.ErrSize - } - - // Field (0) 'AggregationBits' - if cap(p.AggregationBits) == 0 { - p.AggregationBits = make([]byte, 0, len(buf[0:64])) - } - p.AggregationBits = append(p.AggregationBits, buf[0:64]...) - - // Field (1) 'Data' - if p.Data == nil { - p.Data = new(PayloadAttestationData) - } - if err = p.Data.UnmarshalSSZ(buf[64:112]); err != nil { - return err - } - - // Field (2) 'Signature' - if cap(p.Signature) == 0 { - p.Signature = make([]byte, 0, len(buf[112:208])) - } - p.Signature = append(p.Signature, buf[112:208]...) - - return err -} - -// SizeSSZ returns the ssz encoded size in bytes for the PayloadAttestation object -func (p *PayloadAttestation) SizeSSZ() (size int) { - size = 208 - return -} - -// HashTreeRoot ssz hashes the PayloadAttestation object -func (p *PayloadAttestation) HashTreeRoot() ([32]byte, error) { - return ssz.HashWithDefaultHasher(p) -} - -// HashTreeRootWith ssz hashes the PayloadAttestation object with a hasher -func (p *PayloadAttestation) HashTreeRootWith(hh *ssz.Hasher) (err error) { - indx := hh.Index() - - // Field (0) 'AggregationBits' - if size := len(p.AggregationBits); size != 64 { - err = ssz.ErrBytesLengthFn("--.AggregationBits", size, 64) - return - } - hh.PutBytes(p.AggregationBits) - - // Field (1) 'Data' - if err = p.Data.HashTreeRootWith(hh); err != nil { - return - } - - // Field (2) 'Signature' - if size := len(p.Signature); size != 96 { - err = ssz.ErrBytesLengthFn("--.Signature", size, 96) - return - } - hh.PutBytes(p.Signature) - - if ssz.EnableVectorizedHTR { - hh.MerkleizeVectorizedHTR(indx) - } else { - hh.Merkleize(indx) - } - return -} - -// MarshalSSZ ssz marshals the PayloadAttestationMessage object -func (p *PayloadAttestationMessage) MarshalSSZ() ([]byte, error) { - return ssz.MarshalSSZ(p) -} - -// MarshalSSZTo ssz marshals the PayloadAttestationMessage object to a target array -func (p *PayloadAttestationMessage) MarshalSSZTo(buf []byte) (dst []byte, err error) { - dst = buf - - // Field (0) 'ValidatorIndex' - dst = ssz.MarshalUint64(dst, uint64(p.ValidatorIndex)) - - // Field (1) 'Data' - if p.Data == nil { - p.Data = new(PayloadAttestationData) - } - if dst, err = p.Data.MarshalSSZTo(dst); err != nil { - return - } - - // Field (2) 'Signature' - if size := len(p.Signature); size != 96 { - err = ssz.ErrBytesLengthFn("--.Signature", size, 96) - return - } - dst = append(dst, p.Signature...) - - return -} - -// UnmarshalSSZ ssz unmarshals the PayloadAttestationMessage object -func (p *PayloadAttestationMessage) UnmarshalSSZ(buf []byte) error { - var err error - size := uint64(len(buf)) - if size != 152 { - return ssz.ErrSize - } - - // Field (0) 'ValidatorIndex' - p.ValidatorIndex = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(ssz.UnmarshallUint64(buf[0:8])) - - // Field (1) 'Data' - if p.Data == nil { - p.Data = new(PayloadAttestationData) - } - if err = p.Data.UnmarshalSSZ(buf[8:56]); err != nil { - return err - } - - // Field (2) 'Signature' - if cap(p.Signature) == 0 { - p.Signature = make([]byte, 0, len(buf[56:152])) - } - p.Signature = append(p.Signature, buf[56:152]...) - - return err -} - -// SizeSSZ returns the ssz encoded size in bytes for the PayloadAttestationMessage object -func (p *PayloadAttestationMessage) SizeSSZ() (size int) { - size = 152 - return -} - -// HashTreeRoot ssz hashes the PayloadAttestationMessage object -func (p *PayloadAttestationMessage) HashTreeRoot() ([32]byte, error) { - return ssz.HashWithDefaultHasher(p) -} - -// HashTreeRootWith ssz hashes the PayloadAttestationMessage object with a hasher -func (p *PayloadAttestationMessage) HashTreeRootWith(hh *ssz.Hasher) (err error) { - indx := hh.Index() - - // Field (0) 'ValidatorIndex' - hh.PutUint64(uint64(p.ValidatorIndex)) - - // Field (1) 'Data' - if err = p.Data.HashTreeRootWith(hh); err != nil { - return - } - - // Field (2) 'Signature' - if size := len(p.Signature); size != 96 { - err = ssz.ErrBytesLengthFn("--.Signature", size, 96) - return - } - hh.PutBytes(p.Signature) - - if ssz.EnableVectorizedHTR { - hh.MerkleizeVectorizedHTR(indx) - } else { - hh.Merkleize(indx) - } - return -} - // MarshalSSZ ssz marshals the InclusionListSummary object func (i *InclusionListSummary) MarshalSSZ() ([]byte, error) { return ssz.MarshalSSZ(i) diff --git a/proto/prysm/v1alpha1/BUILD.bazel b/proto/prysm/v1alpha1/BUILD.bazel index 46a17e7b6e47..3de9f7619d23 100644 --- a/proto/prysm/v1alpha1/BUILD.bazel +++ b/proto/prysm/v1alpha1/BUILD.bazel @@ -133,6 +133,9 @@ ssz_gen_marshal( "BlobSidecars", "BlobIdentifier", "DepositSnapshot", + "PayloadAttestationData", + "PayloadAttestation", + "PayloadAttestationMessage", ], ) @@ -231,6 +234,7 @@ ssz_proto_files( "beacon_block.proto", "beacon_state.proto", "blobs.proto", + "payload_attestation.proto", "sync_committee.proto", "withdrawals.proto", ], diff --git a/proto/prysm/v1alpha1/beacon_block.pb.go b/proto/prysm/v1alpha1/beacon_block.pb.go index 04d3c8da94d8..324facac6cec 100755 --- a/proto/prysm/v1alpha1/beacon_block.pb.go +++ b/proto/prysm/v1alpha1/beacon_block.pb.go @@ -3935,7 +3935,7 @@ type BeaconBlockBodyePBS struct { SyncAggregate *SyncAggregate `protobuf:"bytes,9,opt,name=sync_aggregate,json=syncAggregate,proto3" json:"sync_aggregate,omitempty"` BlsToExecutionChanges []*SignedBLSToExecutionChange `protobuf:"bytes,10,rep,name=bls_to_execution_changes,json=blsToExecutionChanges,proto3" json:"bls_to_execution_changes,omitempty" ssz-max:"16"` SignedExecutionPayloadHeader *v1.SignedExecutionPayloadHeader `protobuf:"bytes,11,opt,name=signed_execution_payload_header,json=signedExecutionPayloadHeader,proto3" json:"signed_execution_payload_header,omitempty"` - PayloadAttestations []*v1.PayloadAttestation `protobuf:"bytes,12,rep,name=payload_attestations,json=payloadAttestations,proto3" json:"payload_attestations,omitempty" ssz-max:"4"` + PayloadAttestations []*PayloadAttestation `protobuf:"bytes,12,rep,name=payload_attestations,json=payloadAttestations,proto3" json:"payload_attestations,omitempty" ssz-max:"4"` } func (x *BeaconBlockBodyePBS) Reset() { @@ -4047,7 +4047,7 @@ func (x *BeaconBlockBodyePBS) GetSignedExecutionPayloadHeader() *v1.SignedExecut return nil } -func (x *BeaconBlockBodyePBS) GetPayloadAttestations() []*v1.PayloadAttestation { +func (x *BeaconBlockBodyePBS) GetPayloadAttestations() []*PayloadAttestation { if x != nil { return x.PayloadAttestations } @@ -4191,6 +4191,9 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_rawDesc = []byte{ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 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, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, + 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x70, @@ -5248,7 +5251,7 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_rawDesc = []byte{ 0x2a, 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, 0x65, 0x50, 0x42, 0x53, 0x52, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x22, 0xf1, 0x07, 0x0a, 0x13, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, + 0x79, 0x22, 0xf4, 0x07, 0x0a, 0x13, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x65, 0x50, 0x42, 0x53, 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, @@ -5305,31 +5308,31 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_rawDesc = []byte{ 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x1c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x12, 0x60, 0x0a, 0x14, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x61, + 0x64, 0x65, 0x72, 0x12, 0x63, 0x0a, 0x14, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x6e, 0x67, - 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x34, - 0x52, 0x13, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7b, 0x0a, 0x15, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, - 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x50, 0x42, 0x53, 0x12, 0x3c, - 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 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, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x65, 0x50, 0x42, 0x53, 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, 0x42, 0x9b, 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, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, - 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, - 0x79, 0x73, 0x6d, 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, + 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x05, 0x92, 0xb5, + 0x18, 0x01, 0x34, 0x52, 0x13, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7b, 0x0a, 0x15, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x50, 0x42, + 0x53, 0x12, 0x3c, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 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, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x50, 0x42, 0x53, 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, 0x42, 0x9b, 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, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, + 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 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 ( @@ -5409,7 +5412,7 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_goTypes = []interface{}{ (*v1.ExecutionPayloadHeaderCapella)(nil), // 60: ethereum.engine.v1.ExecutionPayloadHeaderCapella (*v1.ExecutionPayloadHeaderDeneb)(nil), // 61: ethereum.engine.v1.ExecutionPayloadHeaderDeneb (*v1.SignedExecutionPayloadHeader)(nil), // 62: ethereum.engine.v1.SignedExecutionPayloadHeader - (*v1.PayloadAttestation)(nil), // 63: ethereum.engine.v1.PayloadAttestation + (*PayloadAttestation)(nil), // 63: ethereum.eth.v1alpha1.PayloadAttestation } var file_proto_prysm_v1alpha1_beacon_block_proto_depIdxs = []int32{ 3, // 0: ethereum.eth.v1alpha1.GenericSignedBeaconBlock.phase0:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlock @@ -5541,7 +5544,7 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_depIdxs = []int32{ 17, // 126: ethereum.eth.v1alpha1.BeaconBlockBodyePBS.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate 58, // 127: ethereum.eth.v1alpha1.BeaconBlockBodyePBS.bls_to_execution_changes:type_name -> ethereum.eth.v1alpha1.SignedBLSToExecutionChange 62, // 128: ethereum.eth.v1alpha1.BeaconBlockBodyePBS.signed_execution_payload_header:type_name -> ethereum.engine.v1.SignedExecutionPayloadHeader - 63, // 129: ethereum.eth.v1alpha1.BeaconBlockBodyePBS.payload_attestations:type_name -> ethereum.engine.v1.PayloadAttestation + 63, // 129: ethereum.eth.v1alpha1.BeaconBlockBodyePBS.payload_attestations:type_name -> ethereum.eth.v1alpha1.PayloadAttestation 49, // 130: ethereum.eth.v1alpha1.SignedBeaconBlockePBS.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockePBS 131, // [131:131] is the sub-list for method output_type 131, // [131:131] is the sub-list for method input_type @@ -5556,6 +5559,7 @@ func file_proto_prysm_v1alpha1_beacon_block_proto_init() { return } file_proto_prysm_v1alpha1_attestation_proto_init() + file_proto_prysm_v1alpha1_payload_attestation_proto_init() file_proto_prysm_v1alpha1_withdrawals_proto_init() if !protoimpl.UnsafeEnabled { file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { diff --git a/proto/prysm/v1alpha1/beacon_block.proto b/proto/prysm/v1alpha1/beacon_block.proto index 1123c02e1562..3d16922bd730 100644 --- a/proto/prysm/v1alpha1/beacon_block.proto +++ b/proto/prysm/v1alpha1/beacon_block.proto @@ -17,6 +17,7 @@ package ethereum.eth.v1alpha1; import "proto/eth/ext/options.proto"; import "proto/prysm/v1alpha1/attestation.proto"; +import "proto/prysm/v1alpha1/payload_attestation.proto"; import "proto/prysm/v1alpha1/withdrawals.proto"; import "proto/engine/v1/execution_engine.proto"; import "proto/engine/v1/epbs.proto"; @@ -842,7 +843,7 @@ message BeaconBlockBodyePBS { ethereum.engine.v1.SignedExecutionPayloadHeader signed_execution_payload_header = 11; // Payload attestations. New in ePBS - repeated ethereum.engine.v1.PayloadAttestation payload_attestations = 12 [(ethereum.eth.ext.ssz_max) = "payload_attestation.size"]; + repeated PayloadAttestation payload_attestations = 12 [(ethereum.eth.ext.ssz_max) = "payload_attestation.size"]; } message SignedBeaconBlockePBS { diff --git a/proto/prysm/v1alpha1/generated.ssz.go b/proto/prysm/v1alpha1/generated.ssz.go index 4afae5d20853..59c5baceee45 100644 --- a/proto/prysm/v1alpha1/generated.ssz.go +++ b/proto/prysm/v1alpha1/generated.ssz.go @@ -1,5 +1,5 @@ // Code generated by fastssz. DO NOT EDIT. -// Hash: cc8e907ec1a66a4edcfd9f8fd0180b75523c1b0b370704931022436aa7c10091 +// Hash: 995662707399e895c09a761cc6ba5bb215a8c01c9d172c5c56c7ef021b9a74f4 package eth import ( @@ -10036,10 +10036,10 @@ func (b *BeaconBlockBodyePBS) UnmarshalSSZ(buf []byte) error { if err != nil { return err } - b.PayloadAttestations = make([]*v1.PayloadAttestation, num) + b.PayloadAttestations = make([]*PayloadAttestation, num) for ii := 0; ii < num; ii++ { if b.PayloadAttestations[ii] == nil { - b.PayloadAttestations[ii] = new(v1.PayloadAttestation) + b.PayloadAttestations[ii] = new(PayloadAttestation) } if err = b.PayloadAttestations[ii].UnmarshalSSZ(buf[ii*208 : (ii+1)*208]); err != nil { return err @@ -16548,6 +16548,293 @@ func (b *BlobSidecarsByRangeRequest) HashTreeRootWith(hh *ssz.Hasher) (err error return } +// MarshalSSZ ssz marshals the PayloadAttestationData object +func (p *PayloadAttestationData) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(p) +} + +// MarshalSSZTo ssz marshals the PayloadAttestationData object to a target array +func (p *PayloadAttestationData) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + + // Field (0) 'BeaconBlockRoot' + if size := len(p.BeaconBlockRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.BeaconBlockRoot", size, 32) + return + } + dst = append(dst, p.BeaconBlockRoot...) + + // Field (1) 'Slot' + dst = ssz.MarshalUint64(dst, uint64(p.Slot)) + + // Field (2) 'PayloadStatus' + dst = ssz.MarshalUint64(dst, uint64(p.PayloadStatus)) + + return +} + +// UnmarshalSSZ ssz unmarshals the PayloadAttestationData object +func (p *PayloadAttestationData) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size != 48 { + return ssz.ErrSize + } + + // Field (0) 'BeaconBlockRoot' + if cap(p.BeaconBlockRoot) == 0 { + p.BeaconBlockRoot = make([]byte, 0, len(buf[0:32])) + } + p.BeaconBlockRoot = append(p.BeaconBlockRoot, buf[0:32]...) + + // Field (1) 'Slot' + p.Slot = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[32:40])) + + // Field (2) 'PayloadStatus' + p.PayloadStatus = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.PTCStatus(ssz.UnmarshallUint64(buf[40:48])) + + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the PayloadAttestationData object +func (p *PayloadAttestationData) SizeSSZ() (size int) { + size = 48 + return +} + +// HashTreeRoot ssz hashes the PayloadAttestationData object +func (p *PayloadAttestationData) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(p) +} + +// HashTreeRootWith ssz hashes the PayloadAttestationData object with a hasher +func (p *PayloadAttestationData) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'BeaconBlockRoot' + if size := len(p.BeaconBlockRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.BeaconBlockRoot", size, 32) + return + } + hh.PutBytes(p.BeaconBlockRoot) + + // Field (1) 'Slot' + hh.PutUint64(uint64(p.Slot)) + + // Field (2) 'PayloadStatus' + hh.PutUint64(uint64(p.PayloadStatus)) + + if ssz.EnableVectorizedHTR { + hh.MerkleizeVectorizedHTR(indx) + } else { + hh.Merkleize(indx) + } + return +} + +// MarshalSSZ ssz marshals the PayloadAttestation object +func (p *PayloadAttestation) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(p) +} + +// MarshalSSZTo ssz marshals the PayloadAttestation object to a target array +func (p *PayloadAttestation) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + + // Field (0) 'AggregationBits' + if size := len(p.AggregationBits); size != 64 { + err = ssz.ErrBytesLengthFn("--.AggregationBits", size, 64) + return + } + dst = append(dst, p.AggregationBits...) + + // Field (1) 'Data' + if p.Data == nil { + p.Data = new(PayloadAttestationData) + } + if dst, err = p.Data.MarshalSSZTo(dst); err != nil { + return + } + + // Field (2) 'Signature' + if size := len(p.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + dst = append(dst, p.Signature...) + + return +} + +// UnmarshalSSZ ssz unmarshals the PayloadAttestation object +func (p *PayloadAttestation) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size != 208 { + return ssz.ErrSize + } + + // Field (0) 'AggregationBits' + if cap(p.AggregationBits) == 0 { + p.AggregationBits = make([]byte, 0, len(buf[0:64])) + } + p.AggregationBits = append(p.AggregationBits, buf[0:64]...) + + // Field (1) 'Data' + if p.Data == nil { + p.Data = new(PayloadAttestationData) + } + if err = p.Data.UnmarshalSSZ(buf[64:112]); err != nil { + return err + } + + // Field (2) 'Signature' + if cap(p.Signature) == 0 { + p.Signature = make([]byte, 0, len(buf[112:208])) + } + p.Signature = append(p.Signature, buf[112:208]...) + + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the PayloadAttestation object +func (p *PayloadAttestation) SizeSSZ() (size int) { + size = 208 + return +} + +// HashTreeRoot ssz hashes the PayloadAttestation object +func (p *PayloadAttestation) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(p) +} + +// HashTreeRootWith ssz hashes the PayloadAttestation object with a hasher +func (p *PayloadAttestation) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'AggregationBits' + if size := len(p.AggregationBits); size != 64 { + err = ssz.ErrBytesLengthFn("--.AggregationBits", size, 64) + return + } + hh.PutBytes(p.AggregationBits) + + // Field (1) 'Data' + if err = p.Data.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'Signature' + if size := len(p.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + hh.PutBytes(p.Signature) + + if ssz.EnableVectorizedHTR { + hh.MerkleizeVectorizedHTR(indx) + } else { + hh.Merkleize(indx) + } + return +} + +// MarshalSSZ ssz marshals the PayloadAttestationMessage object +func (p *PayloadAttestationMessage) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(p) +} + +// MarshalSSZTo ssz marshals the PayloadAttestationMessage object to a target array +func (p *PayloadAttestationMessage) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + + // Field (0) 'ValidatorIndex' + dst = ssz.MarshalUint64(dst, uint64(p.ValidatorIndex)) + + // Field (1) 'Data' + if p.Data == nil { + p.Data = new(PayloadAttestationData) + } + if dst, err = p.Data.MarshalSSZTo(dst); err != nil { + return + } + + // Field (2) 'Signature' + if size := len(p.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + dst = append(dst, p.Signature...) + + return +} + +// UnmarshalSSZ ssz unmarshals the PayloadAttestationMessage object +func (p *PayloadAttestationMessage) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size != 152 { + return ssz.ErrSize + } + + // Field (0) 'ValidatorIndex' + p.ValidatorIndex = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(ssz.UnmarshallUint64(buf[0:8])) + + // Field (1) 'Data' + if p.Data == nil { + p.Data = new(PayloadAttestationData) + } + if err = p.Data.UnmarshalSSZ(buf[8:56]); err != nil { + return err + } + + // Field (2) 'Signature' + if cap(p.Signature) == 0 { + p.Signature = make([]byte, 0, len(buf[56:152])) + } + p.Signature = append(p.Signature, buf[56:152]...) + + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the PayloadAttestationMessage object +func (p *PayloadAttestationMessage) SizeSSZ() (size int) { + size = 152 + return +} + +// HashTreeRoot ssz hashes the PayloadAttestationMessage object +func (p *PayloadAttestationMessage) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(p) +} + +// HashTreeRootWith ssz hashes the PayloadAttestationMessage object with a hasher +func (p *PayloadAttestationMessage) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'ValidatorIndex' + hh.PutUint64(uint64(p.ValidatorIndex)) + + // Field (1) 'Data' + if err = p.Data.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'Signature' + if size := len(p.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + hh.PutBytes(p.Signature) + + if ssz.EnableVectorizedHTR { + hh.MerkleizeVectorizedHTR(indx) + } else { + hh.Merkleize(indx) + } + return +} + // MarshalSSZ ssz marshals the DepositSnapshot object func (d *DepositSnapshot) MarshalSSZ() ([]byte, error) { return ssz.MarshalSSZ(d) diff --git a/proto/prysm/v1alpha1/payload_attestation.pb.go b/proto/prysm/v1alpha1/payload_attestation.pb.go new file mode 100755 index 000000000000..1d62c2ea7ace --- /dev/null +++ b/proto/prysm/v1alpha1/payload_attestation.pb.go @@ -0,0 +1,376 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v4.25.1 +// source: proto/prysm/v1alpha1/payload_attestation.proto + +package eth + +import ( + reflect "reflect" + sync "sync" + + github_com_prysmaticlabs_go_bitfield "github.com/prysmaticlabs/go-bitfield" + github_com_prysmaticlabs_prysm_v5_consensus_types_primitives "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + _ "github.com/prysmaticlabs/prysm/v5/proto/eth/ext" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +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) +) + +type PayloadAttestationData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BeaconBlockRoot []byte `protobuf:"bytes,1,opt,name=beacon_block_root,json=beaconBlockRoot,proto3" json:"beacon_block_root,omitempty" ssz-size:"32"` + Slot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,2,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` + PayloadStatus github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.PTCStatus `protobuf:"varint,3,opt,name=payload_status,json=payloadStatus,proto3" json:"payload_status,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.PTCStatus"` +} + +func (x *PayloadAttestationData) Reset() { + *x = PayloadAttestationData{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_payload_attestation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayloadAttestationData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayloadAttestationData) ProtoMessage() {} + +func (x *PayloadAttestationData) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_payload_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 PayloadAttestationData.ProtoReflect.Descriptor instead. +func (*PayloadAttestationData) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescGZIP(), []int{0} +} + +func (x *PayloadAttestationData) GetBeaconBlockRoot() []byte { + if x != nil { + return x.BeaconBlockRoot + } + return nil +} + +func (x *PayloadAttestationData) GetSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.Slot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + +func (x *PayloadAttestationData) GetPayloadStatus() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.PTCStatus { + if x != nil { + return x.PayloadStatus + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.PTCStatus(0) +} + +type PayloadAttestation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AggregationBits github_com_prysmaticlabs_go_bitfield.Bitvector512 `protobuf:"bytes,1,opt,name=aggregation_bits,json=aggregationBits,proto3" json:"aggregation_bits,omitempty" cast-type:"github.com/prysmaticlabs/go-bitfield.Bitvector512" ssz-size:"64"` + Data *PayloadAttestationData `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 *PayloadAttestation) Reset() { + *x = PayloadAttestation{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_payload_attestation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayloadAttestation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayloadAttestation) ProtoMessage() {} + +func (x *PayloadAttestation) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_payload_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 PayloadAttestation.ProtoReflect.Descriptor instead. +func (*PayloadAttestation) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescGZIP(), []int{1} +} + +func (x *PayloadAttestation) GetAggregationBits() github_com_prysmaticlabs_go_bitfield.Bitvector512 { + if x != nil { + return x.AggregationBits + } + return github_com_prysmaticlabs_go_bitfield.Bitvector512(nil) +} + +func (x *PayloadAttestation) GetData() *PayloadAttestationData { + if x != nil { + return x.Data + } + return nil +} + +func (x *PayloadAttestation) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +type PayloadAttestationMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ValidatorIndex github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex `protobuf:"varint,1,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"` + Data *PayloadAttestationData `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 *PayloadAttestationMessage) Reset() { + *x = PayloadAttestationMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_payload_attestation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayloadAttestationMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayloadAttestationMessage) ProtoMessage() {} + +func (x *PayloadAttestationMessage) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_payload_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 PayloadAttestationMessage.ProtoReflect.Descriptor instead. +func (*PayloadAttestationMessage) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescGZIP(), []int{2} +} + +func (x *PayloadAttestationMessage) GetValidatorIndex() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex { + if x != nil { + return x.ValidatorIndex + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(0) +} + +func (x *PayloadAttestationMessage) GetData() *PayloadAttestationData { + if x != nil { + return x.Data + } + return nil +} + +func (x *PayloadAttestationMessage) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +var File_proto_prysm_v1alpha1_payload_attestation_proto protoreflect.FileDescriptor + +var file_proto_prysm_v1alpha1_payload_attestation_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 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, 0x9a, 0x02, 0x0a, 0x16, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x32, 0x0a, 0x11, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 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, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, + 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, + 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, + 0x76, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x71, + 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4a, 0x82, 0xb5, 0x18, 0x46, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, + 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, + 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, + 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x50, 0x54, 0x43, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x66, 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, 0x3b, 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, 0x8a, 0xb5, 0x18, 0x02, 0x36, 0x34, 0x52, + 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x74, 0x73, + 0x12, 0x41, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 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, 0xfe, 0x01, 0x0a, 0x19, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x78, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, + 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, + 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, + 0x65, 0x73, 0x2e, 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, 0x41, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 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, 0x42, 0xa2, 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, 0x17, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, + 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, + 0x73, 0x6d, 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_prysm_v1alpha1_payload_attestation_proto_rawDescOnce sync.Once + file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescData = file_proto_prysm_v1alpha1_payload_attestation_proto_rawDesc +) + +func file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescGZIP() []byte { + file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescOnce.Do(func() { + file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescData) + }) + return file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescData +} + +var file_proto_prysm_v1alpha1_payload_attestation_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_proto_prysm_v1alpha1_payload_attestation_proto_goTypes = []interface{}{ + (*PayloadAttestationData)(nil), // 0: ethereum.eth.v1alpha1.PayloadAttestationData + (*PayloadAttestation)(nil), // 1: ethereum.eth.v1alpha1.PayloadAttestation + (*PayloadAttestationMessage)(nil), // 2: ethereum.eth.v1alpha1.PayloadAttestationMessage +} +var file_proto_prysm_v1alpha1_payload_attestation_proto_depIdxs = []int32{ + 0, // 0: ethereum.eth.v1alpha1.PayloadAttestation.data:type_name -> ethereum.eth.v1alpha1.PayloadAttestationData + 0, // 1: ethereum.eth.v1alpha1.PayloadAttestationMessage.data:type_name -> ethereum.eth.v1alpha1.PayloadAttestationData + 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_prysm_v1alpha1_payload_attestation_proto_init() } +func file_proto_prysm_v1alpha1_payload_attestation_proto_init() { + if File_proto_prysm_v1alpha1_payload_attestation_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_prysm_v1alpha1_payload_attestation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PayloadAttestationData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_payload_attestation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PayloadAttestation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_payload_attestation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PayloadAttestationMessage); 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_prysm_v1alpha1_payload_attestation_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_prysm_v1alpha1_payload_attestation_proto_goTypes, + DependencyIndexes: file_proto_prysm_v1alpha1_payload_attestation_proto_depIdxs, + MessageInfos: file_proto_prysm_v1alpha1_payload_attestation_proto_msgTypes, + }.Build() + File_proto_prysm_v1alpha1_payload_attestation_proto = out.File + file_proto_prysm_v1alpha1_payload_attestation_proto_rawDesc = nil + file_proto_prysm_v1alpha1_payload_attestation_proto_goTypes = nil + file_proto_prysm_v1alpha1_payload_attestation_proto_depIdxs = nil +} diff --git a/proto/prysm/v1alpha1/payload_attestation.pb.gw.go b/proto/prysm/v1alpha1/payload_attestation.pb.gw.go new file mode 100755 index 000000000000..cdd03643f0c7 --- /dev/null +++ b/proto/prysm/v1alpha1/payload_attestation.pb.gw.go @@ -0,0 +1,4 @@ +//go:build ignore +// +build ignore + +package ignore diff --git a/proto/prysm/v1alpha1/payload_attestation.proto b/proto/prysm/v1alpha1/payload_attestation.proto new file mode 100644 index 000000000000..7778245688ef --- /dev/null +++ b/proto/prysm/v1alpha1/payload_attestation.proto @@ -0,0 +1,43 @@ +// Copyright 2024 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/v5/proto/prysm/v1alpha1;eth"; +option java_multiple_files = true; +option java_outer_classname = "PayloadAttestationProto"; +option java_package = "org.ethereum.eth.v1alpha1"; +option php_namespace = "Ethereum\\Eth\\v1alpha1"; + +message PayloadAttestationData { + bytes beacon_block_root = 1 [(ethereum.eth.ext.ssz_size) = "32"]; + uint64 slot = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; + uint64 payload_status = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.PTCStatus"]; +} + +message PayloadAttestation { + bytes aggregation_bits = 1 [(ethereum.eth.ext.ssz_size) = "ptc.size", (ethereum.eth.ext.cast_type) = "ptc.type"]; + PayloadAttestationData data = 2; + bytes signature = 3 [(ethereum.eth.ext.ssz_size) = "96"]; +} + +message PayloadAttestationMessage { + uint64 validator_index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"]; + PayloadAttestationData data = 2; + bytes signature = 3 [(ethereum.eth.ext.ssz_size) = "96"]; +} diff --git a/proto/prysm/v1alpha1/validator-client/keymanager.pb.go b/proto/prysm/v1alpha1/validator-client/keymanager.pb.go index 267ca72f5ab7..e810afa05d3e 100755 --- a/proto/prysm/v1alpha1/validator-client/keymanager.pb.go +++ b/proto/prysm/v1alpha1/validator-client/keymanager.pb.go @@ -105,6 +105,7 @@ type SignRequest struct { // *SignRequest_BlindedBlockCapella // *SignRequest_BlockDeneb // *SignRequest_BlindedBlockDeneb + // *SignRequest_PayloadAttestationData Object isSignRequest_Object `protobuf_oneof:"object"` SigningSlot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,6,opt,name=signing_slot,json=signingSlot,proto3" json:"signing_slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` } @@ -288,6 +289,13 @@ func (x *SignRequest) GetBlindedBlockDeneb() *v1alpha1.BlindedBeaconBlockDeneb { return nil } +func (x *SignRequest) GetPayloadAttestationData() *v1alpha1.PayloadAttestationData { + if x, ok := x.GetObject().(*SignRequest_PayloadAttestationData); ok { + return x.PayloadAttestationData + } + return nil +} + func (x *SignRequest) GetSigningSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { if x != nil { return x.SigningSlot @@ -367,6 +375,10 @@ type SignRequest_BlindedBlockDeneb struct { BlindedBlockDeneb *v1alpha1.BlindedBeaconBlockDeneb `protobuf:"bytes,117,opt,name=blinded_block_deneb,json=blindedBlockDeneb,proto3,oneof"` } +type SignRequest_PayloadAttestationData struct { + PayloadAttestationData *v1alpha1.PayloadAttestationData `protobuf:"bytes,120,opt,name=payload_attestation_data,json=payloadAttestationData,proto3,oneof"` +} + func (*SignRequest_Block) isSignRequest_Object() {} func (*SignRequest_AttestationData) isSignRequest_Object() {} @@ -401,6 +413,8 @@ func (*SignRequest_BlockDeneb) isSignRequest_Object() {} func (*SignRequest_BlindedBlockDeneb) isSignRequest_Object() {} +func (*SignRequest_PayloadAttestationData) isSignRequest_Object() {} + type SignResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -651,6 +665,9 @@ var file_proto_prysm_v1alpha1_validator_client_keymanager_proto_rawDesc = []byte 0x65, 0x74, 0x68, 0x2f, 0x65, 0x78, 0x74, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 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, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, @@ -659,7 +676,7 @@ var file_proto_prysm_v1alpha1_validator_client_keymanager_proto_rawDesc = []byte 0x63, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 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, 0x22, 0xee, 0x0d, 0x0a, 0x0b, 0x53, + 0x74, 0x74, 0x65, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x0e, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x67, @@ -762,85 +779,92 @@ var file_proto_prysm_v1alpha1_validator_client_keymanager_proto_rawDesc = []byte 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x48, 0x00, 0x52, 0x11, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, - 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x68, 0x0a, 0x0c, 0x73, - 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, - 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, - 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, - 0x76, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, - 0x67, 0x53, 0x6c, 0x6f, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4a, - 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xb7, 0x01, 0x0a, 0x0c, - 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x65, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3c, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, - 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, - 0x06, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, - 0x4c, 0x45, 0x44, 0x10, 0x03, 0x22, 0xb3, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, - 0x23, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, - 0x69, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x69, 0x0a, 0x18, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x78, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x16, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x68, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, + 0x67, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, + 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, + 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, + 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x53, + 0x6c, 0x6f, 0x74, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x6c, 0x6f, 0x74, + 0x42, 0x08, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, + 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xb7, 0x01, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x1f, 0x0a, - 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x88, 0x01, 0x01, 0x42, 0x0b, - 0x0a, 0x09, 0x5f, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x22, 0xa6, 0x01, 0x0a, 0x0d, - 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, - 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x63, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, - 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, - 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x55, 0x69, 0x6e, 0x74, - 0x36, 0x34, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, - 0x72, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, - 0x6c, 0x61, 0x79, 0x73, 0x22, 0xe7, 0x02, 0x0a, 0x17, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, - 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x12, 0x74, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x22, 0x3c, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, + 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4e, 0x49, + 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, + 0x22, 0xb3, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x65, + 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, + 0x47, 0x0a, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x32, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, + 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x67, 0x72, + 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x67, 0x72, + 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x22, 0xa6, 0x01, 0x0a, 0x0d, 0x42, 0x75, 0x69, 0x6c, 0x64, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x12, 0x63, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, + 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x08, 0x67, + 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6c, 0x61, 0x79, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x22, + 0xe7, 0x02, 0x0a, 0x17, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x74, 0x0a, 0x0f, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x5c, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5c, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x78, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4b, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xce, - 0x01, 0x0a, 0x22, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x4b, 0x65, 0x79, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, - 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x3b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xaa, 0x02, 0x1e, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x56, 0x32, 0xca, 0x02, - 0x1e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x32, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, + 0x78, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xce, 0x01, 0x0a, 0x22, 0x6f, 0x72, + 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, + 0x42, 0x0f, 0x4b, 0x65, 0x79, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, + 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, + 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3b, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xaa, 0x02, 0x1e, 0x45, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x1e, 0x45, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -879,6 +903,7 @@ var file_proto_prysm_v1alpha1_validator_client_keymanager_proto_goTypes = []inte (*v1alpha1.BlindedBeaconBlockCapella)(nil), // 18: ethereum.eth.v1alpha1.BlindedBeaconBlockCapella (*v1alpha1.BeaconBlockDeneb)(nil), // 19: ethereum.eth.v1alpha1.BeaconBlockDeneb (*v1alpha1.BlindedBeaconBlockDeneb)(nil), // 20: ethereum.eth.v1alpha1.BlindedBeaconBlockDeneb + (*v1alpha1.PayloadAttestationData)(nil), // 21: ethereum.eth.v1alpha1.PayloadAttestationData } var file_proto_prysm_v1alpha1_validator_client_keymanager_proto_depIdxs = []int32{ 7, // 0: ethereum.validator.accounts.v2.SignRequest.block:type_name -> ethereum.eth.v1alpha1.BeaconBlock @@ -895,16 +920,17 @@ var file_proto_prysm_v1alpha1_validator_client_keymanager_proto_depIdxs = []int3 18, // 11: ethereum.validator.accounts.v2.SignRequest.blinded_block_capella:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockCapella 19, // 12: ethereum.validator.accounts.v2.SignRequest.block_deneb:type_name -> ethereum.eth.v1alpha1.BeaconBlockDeneb 20, // 13: ethereum.validator.accounts.v2.SignRequest.blinded_block_deneb:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockDeneb - 0, // 14: ethereum.validator.accounts.v2.SignResponse.status:type_name -> ethereum.validator.accounts.v2.SignResponse.Status - 4, // 15: ethereum.validator.accounts.v2.ProposerOptionPayload.builder:type_name -> ethereum.validator.accounts.v2.BuilderConfig - 6, // 16: ethereum.validator.accounts.v2.ProposerSettingsPayload.proposer_config:type_name -> ethereum.validator.accounts.v2.ProposerSettingsPayload.ProposerConfigEntry - 3, // 17: ethereum.validator.accounts.v2.ProposerSettingsPayload.default_config:type_name -> ethereum.validator.accounts.v2.ProposerOptionPayload - 3, // 18: ethereum.validator.accounts.v2.ProposerSettingsPayload.ProposerConfigEntry.value:type_name -> ethereum.validator.accounts.v2.ProposerOptionPayload - 19, // [19:19] is the sub-list for method output_type - 19, // [19:19] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name + 21, // 14: ethereum.validator.accounts.v2.SignRequest.payload_attestation_data:type_name -> ethereum.eth.v1alpha1.PayloadAttestationData + 0, // 15: ethereum.validator.accounts.v2.SignResponse.status:type_name -> ethereum.validator.accounts.v2.SignResponse.Status + 4, // 16: ethereum.validator.accounts.v2.ProposerOptionPayload.builder:type_name -> ethereum.validator.accounts.v2.BuilderConfig + 6, // 17: ethereum.validator.accounts.v2.ProposerSettingsPayload.proposer_config:type_name -> ethereum.validator.accounts.v2.ProposerSettingsPayload.ProposerConfigEntry + 3, // 18: ethereum.validator.accounts.v2.ProposerSettingsPayload.default_config:type_name -> ethereum.validator.accounts.v2.ProposerOptionPayload + 3, // 19: ethereum.validator.accounts.v2.ProposerSettingsPayload.ProposerConfigEntry.value:type_name -> ethereum.validator.accounts.v2.ProposerOptionPayload + 20, // [20:20] is the sub-list for method output_type + 20, // [20:20] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_proto_prysm_v1alpha1_validator_client_keymanager_proto_init() } @@ -992,6 +1018,7 @@ func file_proto_prysm_v1alpha1_validator_client_keymanager_proto_init() { (*SignRequest_BlindedBlockCapella)(nil), (*SignRequest_BlockDeneb)(nil), (*SignRequest_BlindedBlockDeneb)(nil), + (*SignRequest_PayloadAttestationData)(nil), } file_proto_prysm_v1alpha1_validator_client_keymanager_proto_msgTypes[2].OneofWrappers = []interface{}{} type x struct{} diff --git a/proto/prysm/v1alpha1/validator-client/keymanager.proto b/proto/prysm/v1alpha1/validator-client/keymanager.proto index 85500ceb840b..44a76a4d725c 100644 --- a/proto/prysm/v1alpha1/validator-client/keymanager.proto +++ b/proto/prysm/v1alpha1/validator-client/keymanager.proto @@ -4,6 +4,7 @@ package ethereum.validator.accounts.v2; import "google/protobuf/wrappers.proto"; import "proto/eth/ext/options.proto"; import "proto/prysm/v1alpha1/attestation.proto"; +import "proto/prysm/v1alpha1/payload_attestation.proto"; import "proto/prysm/v1alpha1/beacon_block.proto"; import "proto/prysm/v1alpha1/beacon_state.proto"; import "proto/prysm/v1alpha1/sync_committee.proto"; @@ -61,6 +62,11 @@ message SignRequest { // Deneb objects. ethereum.eth.v1alpha1.BeaconBlockDeneb block_deneb = 116; ethereum.eth.v1alpha1.BlindedBeaconBlockDeneb blinded_block_deneb = 117; + + // Electra objects (to be added for 118 and 119). + + // ePBS objects. + ethereum.eth.v1alpha1.PayloadAttestationData payload_attestation_data = 120; } reserved 4, 5; // Reserving old, deleted fields. uint64 signing_slot = 6 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; diff --git a/testing/util/deneb.go b/testing/util/deneb.go index 83db5a2a5e35..f2460e538d61 100644 --- a/testing/util/deneb.go +++ b/testing/util/deneb.go @@ -1,6 +1,7 @@ package util import ( + "crypto/rand" "encoding/binary" "math" "math/big" @@ -203,3 +204,37 @@ func HackDenebMaxuint(t *testing.T) func() { require.NoError(t, undo()) } } + +// GenerateRandomPayloadAttestationData generates a random PayloadAttestationData for testing purposes. +func GenerateRandomPayloadAttestationData(t *testing.T) *ethpb.PayloadAttestationData { + // Generate a random BeaconBlockRoot + randomBytes := make([]byte, fieldparams.RootLength) + _, err := rand.Read(randomBytes) + if err != nil { + t.Fatalf("Failed to generate random BeaconBlockRoot: %v", err) + } + + // Generate a random Slot value + randomSlot, err := rand.Int(rand.Reader, big.NewInt(10000)) + if err != nil { + t.Fatalf("Failed to generate random Slot: %v", err) + } + + payloadStatuses := []primitives.PTCStatus{ + primitives.PAYLOAD_ABSENT, + primitives.PAYLOAD_PRESENT, + primitives.PAYLOAD_WITHHELD, + } + // Select a random PayloadStatus + index, err := rand.Int(rand.Reader, big.NewInt(int64(len(payloadStatuses)))) + if err != nil { + t.Fatalf("Failed to select random PayloadStatus: %v", err) + } + randomPayloadStatus := payloadStatuses[index.Int64()] + + return ðpb.PayloadAttestationData{ + BeaconBlockRoot: randomBytes, + Slot: primitives.Slot(randomSlot.Uint64()), + PayloadStatus: randomPayloadStatus, + } +} diff --git a/validator/client/BUILD.bazel b/validator/client/BUILD.bazel index bbcab6f56385..5c683dd218e5 100644 --- a/validator/client/BUILD.bazel +++ b/validator/client/BUILD.bazel @@ -9,6 +9,7 @@ go_library( "log.go", "metrics.go", "multiple_endpoints_grpc_resolver.go", + "payload_attestation.go", "propose.go", "registration.go", "runner.go", @@ -105,6 +106,7 @@ go_test( "attest_test.go", "key_reload_test.go", "metrics_test.go", + "payload_attestation_test.go", "propose_test.go", "registration_test.go", "runner_test.go", diff --git a/validator/client/payload_attestation.go b/validator/client/payload_attestation.go new file mode 100644 index 000000000000..bb50287a9656 --- /dev/null +++ b/validator/client/payload_attestation.go @@ -0,0 +1,49 @@ +package client + +import ( + "context" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/config/params" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + validatorpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1/validator-client" + "github.com/prysmaticlabs/prysm/v5/time/slots" +) + +func (v *validator) signPayloadAttestation(ctx context.Context, p *ethpb.PayloadAttestationData, pubKey [fieldparams.BLSPubkeyLength]byte) ([]byte, error) { + // Get domain data + epoch := slots.ToEpoch(p.Slot) + domain, err := v.domainData(ctx, epoch, params.BeaconConfig().DomainPTCAttester[:]) + if err != nil { + return nil, errors.Wrap(err, domainDataErr) + } + if domain == nil { + return nil, errors.New(domainDataErr) + } + + // Compute signing root + signingRoot, err := signing.ComputeSigningRoot(p, domain.SignatureDomain) + if err != nil { + return nil, errors.Wrap(err, signingRootErr) + } + + // Create signature request + signReq := &validatorpb.SignRequest{ + PublicKey: pubKey[:], + SigningRoot: signingRoot[:], + SignatureDomain: domain.SignatureDomain, + Object: &validatorpb.SignRequest_PayloadAttestationData{PayloadAttestationData: p}, + SigningSlot: p.Slot, + } + + // Sign the payload attestation data + sig, err := v.keyManager.Sign(ctx, signReq) + if err != nil { + return nil, errors.Wrap(err, "could not sign block proposal") + } + + // Marshal the signature into bytes + return sig.Marshal(), nil +} diff --git a/validator/client/payload_attestation_test.go b/validator/client/payload_attestation_test.go new file mode 100644 index 000000000000..6c2f356404f5 --- /dev/null +++ b/validator/client/payload_attestation_test.go @@ -0,0 +1,51 @@ +package client + +import ( + "context" + "testing" + + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/crypto/bls" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util" + "go.uber.org/mock/gomock" +) + +func Test_validator_signPayloadAttestation(t *testing.T) { + v, m, vk, finish := setup(t, false) + defer finish() + + // Define constants and mock expectations + e := primitives.Epoch(1000) + m.validatorClient.EXPECT(). + DomainData(gomock.Any(), // ctx + ðpb.DomainRequest{ + Epoch: e, + Domain: params.BeaconConfig().DomainPTCAttester[:], + }). // epoch + Return(ðpb.DomainResponse{ + SignatureDomain: bytesutil.PadTo([]byte("signatureDomain"), 32), + }, nil) + + // Generate random payload attestation data + pa := util.GenerateRandomPayloadAttestationData(t) + pa.Slot = primitives.Slot(e) * params.BeaconConfig().SlotsPerEpoch // Verify that go mock EXPECT() gets the correct epoch. + + // Perform the signature operation + ctx := context.Background() + sig, err := v.signPayloadAttestation(ctx, pa, [48]byte(vk.PublicKey().Marshal())) + require.NoError(t, err) + + // Verify the signature + pb, err := bls.PublicKeyFromBytes(vk.PublicKey().Marshal()) + require.NoError(t, err) + signature, err := bls.SignatureFromBytes(sig) + require.NoError(t, err) + sr, err := signing.ComputeSigningRoot(pa, bytesutil.PadTo([]byte("signatureDomain"), 32)) + require.NoError(t, err) + require.Equal(t, true, signature.Verify(pb, sr[:])) +} From 3aa32c5716db02c5fd54d5d24930170358f817f6 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Mon, 22 Apr 2024 08:08:36 -0700 Subject: [PATCH 2/3] Fix typo --- validator/client/payload_attestation.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validator/client/payload_attestation.go b/validator/client/payload_attestation.go index bb50287a9656..3b405227dfd4 100644 --- a/validator/client/payload_attestation.go +++ b/validator/client/payload_attestation.go @@ -41,7 +41,7 @@ func (v *validator) signPayloadAttestation(ctx context.Context, p *ethpb.Payload // Sign the payload attestation data sig, err := v.keyManager.Sign(ctx, signReq) if err != nil { - return nil, errors.Wrap(err, "could not sign block proposal") + return nil, errors.Wrap(err, "could not sign payload attestation") } // Marshal the signature into bytes From 202ad7a5f06f60862b6caa5600eadc9ea2778fd5 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Mon, 22 Apr 2024 08:21:07 -0700 Subject: [PATCH 3/3] Move generate random payload attestation --- testing/util/BUILD.bazel | 1 + testing/util/deneb.go | 35 ---------------------- testing/util/payload_attestation.go | 45 +++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 35 deletions(-) create mode 100644 testing/util/payload_attestation.go diff --git a/testing/util/BUILD.bazel b/testing/util/BUILD.bazel index 3f6c1e6121be..b51ba73c3bdb 100644 --- a/testing/util/BUILD.bazel +++ b/testing/util/BUILD.bazel @@ -18,6 +18,7 @@ go_library( "deposits.go", "helpers.go", "merge.go", + "payload_attestation.go", "state.go", "sync_aggregate.go", "sync_committee.go", diff --git a/testing/util/deneb.go b/testing/util/deneb.go index f2460e538d61..83db5a2a5e35 100644 --- a/testing/util/deneb.go +++ b/testing/util/deneb.go @@ -1,7 +1,6 @@ package util import ( - "crypto/rand" "encoding/binary" "math" "math/big" @@ -204,37 +203,3 @@ func HackDenebMaxuint(t *testing.T) func() { require.NoError(t, undo()) } } - -// GenerateRandomPayloadAttestationData generates a random PayloadAttestationData for testing purposes. -func GenerateRandomPayloadAttestationData(t *testing.T) *ethpb.PayloadAttestationData { - // Generate a random BeaconBlockRoot - randomBytes := make([]byte, fieldparams.RootLength) - _, err := rand.Read(randomBytes) - if err != nil { - t.Fatalf("Failed to generate random BeaconBlockRoot: %v", err) - } - - // Generate a random Slot value - randomSlot, err := rand.Int(rand.Reader, big.NewInt(10000)) - if err != nil { - t.Fatalf("Failed to generate random Slot: %v", err) - } - - payloadStatuses := []primitives.PTCStatus{ - primitives.PAYLOAD_ABSENT, - primitives.PAYLOAD_PRESENT, - primitives.PAYLOAD_WITHHELD, - } - // Select a random PayloadStatus - index, err := rand.Int(rand.Reader, big.NewInt(int64(len(payloadStatuses)))) - if err != nil { - t.Fatalf("Failed to select random PayloadStatus: %v", err) - } - randomPayloadStatus := payloadStatuses[index.Int64()] - - return ðpb.PayloadAttestationData{ - BeaconBlockRoot: randomBytes, - Slot: primitives.Slot(randomSlot.Uint64()), - PayloadStatus: randomPayloadStatus, - } -} diff --git a/testing/util/payload_attestation.go b/testing/util/payload_attestation.go new file mode 100644 index 000000000000..a66a4d1e5a7b --- /dev/null +++ b/testing/util/payload_attestation.go @@ -0,0 +1,45 @@ +package util + +import ( + "crypto/rand" + "math/big" + "testing" + + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" +) + +// GenerateRandomPayloadAttestationData generates a random PayloadAttestationData for testing purposes. +func GenerateRandomPayloadAttestationData(t *testing.T) *ethpb.PayloadAttestationData { + // Generate a random BeaconBlockRoot + randomBytes := make([]byte, fieldparams.RootLength) + _, err := rand.Read(randomBytes) + if err != nil { + t.Fatalf("Failed to generate random BeaconBlockRoot: %v", err) + } + + // Generate a random Slot value + randomSlot, err := rand.Int(rand.Reader, big.NewInt(10000)) + if err != nil { + t.Fatalf("Failed to generate random Slot: %v", err) + } + + payloadStatuses := []primitives.PTCStatus{ + primitives.PAYLOAD_ABSENT, + primitives.PAYLOAD_PRESENT, + primitives.PAYLOAD_WITHHELD, + } + // Select a random PayloadStatus + index, err := rand.Int(rand.Reader, big.NewInt(int64(len(payloadStatuses)))) + if err != nil { + t.Fatalf("Failed to select random PayloadStatus: %v", err) + } + randomPayloadStatus := payloadStatuses[index.Int64()] + + return ðpb.PayloadAttestationData{ + BeaconBlockRoot: randomBytes, + Slot: primitives.Slot(randomSlot.Uint64()), + PayloadStatus: randomPayloadStatus, + } +}