From 0cfd90ea3486e49ce697a5092656000df8cc7fbc Mon Sep 17 00:00:00 2001 From: Potuz Date: Mon, 15 Jul 2024 13:12:09 -0300 Subject: [PATCH] Helper for Payload Attestation Signing (#13901) --- beacon-chain/rpc/eth/config/handlers_test.go | 12 +- config/params/config.go | 4 +- proto/engine/v1/engine.ssz.go | 287 ------------- proto/engine/v1/epbs.pb.go | 389 +++--------------- proto/engine/v1/epbs.proto | 19 - proto/prysm/v1alpha1/BUILD.bazel | 6 +- 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.proto | 4 + testing/util/BUILD.bazel | 1 + testing/util/payload_attestation.go | 45 ++ validator/client/BUILD.bazel | 2 + validator/client/payload_attestation.go | 49 +++ validator/client/payload_attestation_test.go | 51 +++ 18 files changed, 973 insertions(+), 677 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 testing/util/payload_attestation.go 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 080082e35e6f..318a6a0a9ae1 100644 --- a/beacon-chain/rpc/eth/config/handlers_test.go +++ b/beacon-chain/rpc/eth/config/handlers_test.go @@ -20,6 +20,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() @@ -192,7 +196,7 @@ func TestGetSpec(t *testing.T) { data, ok := resp.Data.(map[string]interface{}) require.Equal(t, true, ok) - assert.Equal(t, 155, len(data)) + assert.Equal(t, 157, len(data)) for k, v := range data { t.Run(k, func(t *testing.T) { switch k { @@ -530,6 +534,12 @@ func TestGetSpec(t *testing.T) { case "MAX_DEPOSIT_REQUESTS_PER_PAYLOAD": assert.Equal(t, "93", 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 25535eebf923..6b2d126ad5cd 100644 --- a/config/params/config.go +++ b/config/params/config.go @@ -126,8 +126,8 @@ type BeaconChainConfig struct { 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 DomainConsolidation [4]byte `yaml:"DOMAIN_CONSOLIDATION" spec:"true"` - DomainBeaconBuilder [4]byte `yaml:"DOMAIN_BEACON_BULDER" 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] + 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. GweiPerEth uint64 // GweiPerEth is the amount of gwei corresponding to 1 eth. diff --git a/proto/engine/v1/engine.ssz.go b/proto/engine/v1/engine.ssz.go index e0c466a0ca9b..ca69dc1dfd3e 100644 --- a/proto/engine/v1/engine.ssz.go +++ b/proto/engine/v1/engine.ssz.go @@ -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/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/prysm/v1alpha1/BUILD.bazel b/proto/prysm/v1alpha1/BUILD.bazel index 25dd1824466b..44fca33454d9 100644 --- a/proto/prysm/v1alpha1/BUILD.bazel +++ b/proto/prysm/v1alpha1/BUILD.bazel @@ -157,6 +157,9 @@ ssz_electra_objs = [ ssz_epbs_objs = [ "BeaconBlockePBS", "SignedBeaconBlockePBS", + "PayloadAttestationData", + "PayloadAttestation", + "PayloadAttestationMessage", ] ssz_gen_marshal( @@ -246,7 +249,7 @@ ssz_gen_marshal( "//math:go_default_library", ], objs = ssz_epbs_objs, - exclude_objs = ssz_phase0_objs + ssz_altair_objs + ssz_bellatrix_objs + ssz_capella_objs + ssz_deneb_objs + ssz_epbs_objs, + exclude_objs = ssz_phase0_objs + ssz_altair_objs + ssz_bellatrix_objs + ssz_capella_objs + ssz_deneb_objs + ssz_electra_objs, ) @@ -379,6 +382,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 6dcda4db5f72..337c6d72655d 100755 --- a/proto/prysm/v1alpha1/beacon_block.pb.go +++ b/proto/prysm/v1alpha1/beacon_block.pb.go @@ -4773,7 +4773,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() { @@ -4885,7 +4885,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 } @@ -5029,6 +5029,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, @@ -6345,7 +6348,7 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 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, + 0x52, 0x04, 0x62, 0x6f, 0x64, 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, @@ -6402,31 +6405,31 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_rawDesc = []byte{ 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, 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, + 0x61, 0x64, 0x48, 0x65, 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, + 0x18, 0x0c, 0x20, 0x03, 0x28, 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 ( @@ -6519,7 +6522,7 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_goTypes = []interface{}{ (*v1.ExecutionPayloadElectra)(nil), // 73: ethereum.engine.v1.ExecutionPayloadElectra (*v1.ExecutionPayloadHeaderElectra)(nil), // 74: ethereum.engine.v1.ExecutionPayloadHeaderElectra (*v1.SignedExecutionPayloadHeader)(nil), // 75: ethereum.engine.v1.SignedExecutionPayloadHeader - (*v1.PayloadAttestation)(nil), // 76: ethereum.engine.v1.PayloadAttestation + (*PayloadAttestation)(nil), // 76: 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 @@ -6682,7 +6685,7 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_depIdxs = []int32{ 19, // 157: ethereum.eth.v1alpha1.BeaconBlockBodyePBS.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate 68, // 158: ethereum.eth.v1alpha1.BeaconBlockBodyePBS.bls_to_execution_changes:type_name -> ethereum.eth.v1alpha1.SignedBLSToExecutionChange 75, // 159: ethereum.eth.v1alpha1.BeaconBlockBodyePBS.signed_execution_payload_header:type_name -> ethereum.engine.v1.SignedExecutionPayloadHeader - 76, // 160: ethereum.eth.v1alpha1.BeaconBlockBodyePBS.payload_attestations:type_name -> ethereum.engine.v1.PayloadAttestation + 76, // 160: ethereum.eth.v1alpha1.BeaconBlockBodyePBS.payload_attestations:type_name -> ethereum.eth.v1alpha1.PayloadAttestation 59, // 161: ethereum.eth.v1alpha1.SignedBeaconBlockePBS.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockePBS 162, // [162:162] is the sub-list for method output_type 162, // [162:162] is the sub-list for method input_type @@ -6697,6 +6700,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 772026494e43..88028af539c5 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"; @@ -1012,7 +1013,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 928f7fddb85e..945f135cfbb8 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: 5ebf8b5a0edaf5de61f82f703c6646891a5375726867dca26f21f8a5e1e6ca59 +// Hash: 6d4d64999bdb99ed147e3ac5088f6ea550718311bbace9097827092f63a2feb7 package eth import ( @@ -12633,10 +12633,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 @@ -20703,6 +20703,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.proto b/proto/prysm/v1alpha1/validator-client/keymanager.proto index 81769612a17c..fa98d7af8196 100644 --- a/proto/prysm/v1alpha1/validator-client/keymanager.proto +++ b/proto/prysm/v1alpha1/validator-client/keymanager.proto @@ -3,6 +3,7 @@ package ethereum.validator.accounts.v2; 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"; @@ -65,6 +66,9 @@ message SignRequest { ethereum.eth.v1alpha1.BeaconBlockElectra block_electra = 118; ethereum.eth.v1alpha1.BlindedBeaconBlockElectra blinded_block_electra = 119; ethereum.eth.v1alpha1.AggregateAttestationAndProofElectra aggregate_attestation_and_proof_electra = 120; + + // 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/BUILD.bazel b/testing/util/BUILD.bazel index 8456b8d17824..7d8722ad2983 100644 --- a/testing/util/BUILD.bazel +++ b/testing/util/BUILD.bazel @@ -21,6 +21,7 @@ go_library( "electra_state.go", "helpers.go", "merge.go", + "payload_attestation.go", "state.go", "sync_aggregate.go", "sync_committee.go", 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, + } +} diff --git a/validator/client/BUILD.bazel b/validator/client/BUILD.bazel index 6c9fbce2acd5..c356ab19fbbc 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..3b405227dfd4 --- /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 payload attestation") + } + + // 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[:])) +}