From d6bbe00e075b6449f36306cbc34ed5e466bca798 Mon Sep 17 00:00:00 2001 From: Francis Li Date: Mon, 3 Mar 2025 15:25:22 -0800 Subject: [PATCH 1/2] Add new message type to proto and generate .go files --- proto/engine/v1/BUILD.bazel | 5 +- proto/engine/v1/engine.ssz.go | 231 ++++++++++++++++ .../engine/v1/execution_engine_eip7594.pb.go | 255 ++++++++++++++++++ .../engine/v1/execution_engine_eip7594.proto | 56 ++++ 4 files changed, 546 insertions(+), 1 deletion(-) create mode 100755 proto/engine/v1/execution_engine_eip7594.pb.go create mode 100644 proto/engine/v1/execution_engine_eip7594.proto diff --git a/proto/engine/v1/BUILD.bazel b/proto/engine/v1/BUILD.bazel index fad2e889531d..0c78742f3d10 100644 --- a/proto/engine/v1/BUILD.bazel +++ b/proto/engine/v1/BUILD.bazel @@ -44,6 +44,7 @@ ssz_gen_marshal( "ExecutionPayloadDeneb", "BlindedBlobsBundle", "BlobsBundle", + "BlobsBundleV2", "Withdrawal", "WithdrawalRequest", "DepositRequest", @@ -76,6 +77,7 @@ go_library( srcs = [ "electra.go", "execution_engine.go", + "execution_engine_eip7594.go", "json_marshal_unmarshal.go", ":ssz_generated_files", # keep ], @@ -111,7 +113,8 @@ ssz_proto_files( name = "ssz_proto_files", srcs = [ "execution_engine.proto", - "electra.proto", + "execution_engine_eip7594.proto", + "electra.proto", ], config = select({ "//conditions:default": "mainnet", diff --git a/proto/engine/v1/engine.ssz.go b/proto/engine/v1/engine.ssz.go index b298fb0891a0..bc079701d9a9 100644 --- a/proto/engine/v1/engine.ssz.go +++ b/proto/engine/v1/engine.ssz.go @@ -1,4 +1,5 @@ // Code generated by fastssz. DO NOT EDIT. +// Hash: ab5dad88347c6ab5ef07406f784c0d59bd8744e0ab9db338d865b3d9beb26393 package enginev1 import ( @@ -3094,3 +3095,233 @@ func (b *BlobsBundle) HashTreeRootWith(hh *ssz.Hasher) (err error) { hh.Merkleize(indx) return } + +// MarshalSSZ ssz marshals the BlobsBundleV2 object +func (b *BlobsBundleV2) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(b) +} + +// MarshalSSZTo ssz marshals the BlobsBundleV2 object to a target array +func (b *BlobsBundleV2) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(12) + + // Offset (0) 'KzgCommitments' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.KzgCommitments) * 48 + + // Offset (1) 'CellProofs' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.CellProofs) * 48 + + // Offset (2) 'Blobs' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.Blobs) * 131072 + + // Field (0) 'KzgCommitments' + if size := len(b.KzgCommitments); size > 4096 { + err = ssz.ErrListTooBigFn("--.KzgCommitments", size, 4096) + return + } + for ii := 0; ii < len(b.KzgCommitments); ii++ { + if size := len(b.KzgCommitments[ii]); size != 48 { + err = ssz.ErrBytesLengthFn("--.KzgCommitments[ii]", size, 48) + return + } + dst = append(dst, b.KzgCommitments[ii]...) + } + + // Field (1) 'CellProofs' + if size := len(b.CellProofs); size > 4096 { + err = ssz.ErrListTooBigFn("--.CellProofs", size, 4096) + return + } + for ii := 0; ii < len(b.CellProofs); ii++ { + if size := len(b.CellProofs[ii]); size != 48 { + err = ssz.ErrBytesLengthFn("--.CellProofs[ii]", size, 48) + return + } + dst = append(dst, b.CellProofs[ii]...) + } + + // Field (2) 'Blobs' + if size := len(b.Blobs); size > 4096 { + err = ssz.ErrListTooBigFn("--.Blobs", size, 4096) + return + } + for ii := 0; ii < len(b.Blobs); ii++ { + if size := len(b.Blobs[ii]); size != 131072 { + err = ssz.ErrBytesLengthFn("--.Blobs[ii]", size, 131072) + return + } + dst = append(dst, b.Blobs[ii]...) + } + + return +} + +// UnmarshalSSZ ssz unmarshals the BlobsBundleV2 object +func (b *BlobsBundleV2) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 12 { + return ssz.ErrSize + } + + tail := buf + var o0, o1, o2 uint64 + + // Offset (0) 'KzgCommitments' + if o0 = ssz.ReadOffset(buf[0:4]); o0 > size { + return ssz.ErrOffset + } + + if o0 != 12 { + return ssz.ErrInvalidVariableOffset + } + + // Offset (1) 'CellProofs' + if o1 = ssz.ReadOffset(buf[4:8]); o1 > size || o0 > o1 { + return ssz.ErrOffset + } + + // Offset (2) 'Blobs' + if o2 = ssz.ReadOffset(buf[8:12]); o2 > size || o1 > o2 { + return ssz.ErrOffset + } + + // Field (0) 'KzgCommitments' + { + buf = tail[o0:o1] + num, err := ssz.DivideInt2(len(buf), 48, 4096) + if err != nil { + return err + } + b.KzgCommitments = make([][]byte, num) + for ii := 0; ii < num; ii++ { + if cap(b.KzgCommitments[ii]) == 0 { + b.KzgCommitments[ii] = make([]byte, 0, len(buf[ii*48:(ii+1)*48])) + } + b.KzgCommitments[ii] = append(b.KzgCommitments[ii], buf[ii*48:(ii+1)*48]...) + } + } + + // Field (1) 'CellProofs' + { + buf = tail[o1:o2] + num, err := ssz.DivideInt2(len(buf), 48, 4096) + if err != nil { + return err + } + b.CellProofs = make([][]byte, num) + for ii := 0; ii < num; ii++ { + if cap(b.CellProofs[ii]) == 0 { + b.CellProofs[ii] = make([]byte, 0, len(buf[ii*48:(ii+1)*48])) + } + b.CellProofs[ii] = append(b.CellProofs[ii], buf[ii*48:(ii+1)*48]...) + } + } + + // Field (2) 'Blobs' + { + buf = tail[o2:] + num, err := ssz.DivideInt2(len(buf), 131072, 4096) + if err != nil { + return err + } + b.Blobs = make([][]byte, num) + for ii := 0; ii < num; ii++ { + if cap(b.Blobs[ii]) == 0 { + b.Blobs[ii] = make([]byte, 0, len(buf[ii*131072:(ii+1)*131072])) + } + b.Blobs[ii] = append(b.Blobs[ii], buf[ii*131072:(ii+1)*131072]...) + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the BlobsBundleV2 object +func (b *BlobsBundleV2) SizeSSZ() (size int) { + size = 12 + + // Field (0) 'KzgCommitments' + size += len(b.KzgCommitments) * 48 + + // Field (1) 'CellProofs' + size += len(b.CellProofs) * 48 + + // Field (2) 'Blobs' + size += len(b.Blobs) * 131072 + + return +} + +// HashTreeRoot ssz hashes the BlobsBundleV2 object +func (b *BlobsBundleV2) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(b) +} + +// HashTreeRootWith ssz hashes the BlobsBundleV2 object with a hasher +func (b *BlobsBundleV2) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'KzgCommitments' + { + if size := len(b.KzgCommitments); size > 4096 { + err = ssz.ErrListTooBigFn("--.KzgCommitments", size, 4096) + return + } + subIndx := hh.Index() + for _, i := range b.KzgCommitments { + if len(i) != 48 { + err = ssz.ErrBytesLength + return + } + hh.PutBytes(i) + } + + numItems := uint64(len(b.KzgCommitments)) + hh.MerkleizeWithMixin(subIndx, numItems, 4096) + } + + // Field (1) 'CellProofs' + { + if size := len(b.CellProofs); size > 4096 { + err = ssz.ErrListTooBigFn("--.CellProofs", size, 4096) + return + } + subIndx := hh.Index() + for _, i := range b.CellProofs { + if len(i) != 48 { + err = ssz.ErrBytesLength + return + } + hh.PutBytes(i) + } + + numItems := uint64(len(b.CellProofs)) + hh.MerkleizeWithMixin(subIndx, numItems, 4096) + } + + // Field (2) 'Blobs' + { + if size := len(b.Blobs); size > 4096 { + err = ssz.ErrListTooBigFn("--.Blobs", size, 4096) + return + } + subIndx := hh.Index() + for _, i := range b.Blobs { + if len(i) != 131072 { + err = ssz.ErrBytesLength + return + } + hh.PutBytes(i) + } + + numItems := uint64(len(b.Blobs)) + hh.MerkleizeWithMixin(subIndx, numItems, 4096) + } + + hh.Merkleize(indx) + return +} diff --git a/proto/engine/v1/execution_engine_eip7594.pb.go b/proto/engine/v1/execution_engine_eip7594.pb.go new file mode 100755 index 000000000000..485eea58dbe7 --- /dev/null +++ b/proto/engine/v1/execution_engine_eip7594.pb.go @@ -0,0 +1,255 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.33.0 +// protoc v3.21.7 +// source: proto/engine/v1/execution_engine_eip7594.proto + +package enginev1 + +import ( + _ "github.com/prysmaticlabs/prysm/v5/proto/eth/ext" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type BlobsBundleV2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KzgCommitments [][]byte `protobuf:"bytes,1,rep,name=kzg_commitments,json=kzgCommitments,proto3" json:"kzg_commitments,omitempty" ssz-max:"4096" ssz-size:"?,48"` + CellProofs [][]byte `protobuf:"bytes,2,rep,name=cell_proofs,json=cellProofs,proto3" json:"cell_proofs,omitempty" ssz-max:"4096" ssz-size:"?,48"` + Blobs [][]byte `protobuf:"bytes,3,rep,name=blobs,proto3" json:"blobs,omitempty" ssz-max:"4096" ssz-size:"?,131072"` +} + +func (x *BlobsBundleV2) Reset() { + *x = BlobsBundleV2{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_engine_v1_execution_engine_eip7594_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlobsBundleV2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlobsBundleV2) ProtoMessage() {} + +func (x *BlobsBundleV2) ProtoReflect() protoreflect.Message { + mi := &file_proto_engine_v1_execution_engine_eip7594_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 BlobsBundleV2.ProtoReflect.Descriptor instead. +func (*BlobsBundleV2) Descriptor() ([]byte, []int) { + return file_proto_engine_v1_execution_engine_eip7594_proto_rawDescGZIP(), []int{0} +} + +func (x *BlobsBundleV2) GetKzgCommitments() [][]byte { + if x != nil { + return x.KzgCommitments + } + return nil +} + +func (x *BlobsBundleV2) GetCellProofs() [][]byte { + if x != nil { + return x.CellProofs + } + return nil +} + +func (x *BlobsBundleV2) GetBlobs() [][]byte { + if x != nil { + return x.Blobs + } + return nil +} + +type BlobAndProofV2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Blob []byte `protobuf:"bytes,1,opt,name=blob,proto3" json:"blob,omitempty" ssz-size:"131072"` + CellProofs [][]byte `protobuf:"bytes,2,rep,name=cell_proofs,json=cellProofs,proto3" json:"cell_proofs,omitempty" ssz-max:"4096" ssz-size:"48"` +} + +func (x *BlobAndProofV2) Reset() { + *x = BlobAndProofV2{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_engine_v1_execution_engine_eip7594_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlobAndProofV2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlobAndProofV2) ProtoMessage() {} + +func (x *BlobAndProofV2) ProtoReflect() protoreflect.Message { + mi := &file_proto_engine_v1_execution_engine_eip7594_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 BlobAndProofV2.ProtoReflect.Descriptor instead. +func (*BlobAndProofV2) Descriptor() ([]byte, []int) { + return file_proto_engine_v1_execution_engine_eip7594_proto_rawDescGZIP(), []int{1} +} + +func (x *BlobAndProofV2) GetBlob() []byte { + if x != nil { + return x.Blob + } + return nil +} + +func (x *BlobAndProofV2) GetCellProofs() [][]byte { + if x != nil { + return x.CellProofs + } + return nil +} + +var File_proto_engine_v1_execution_engine_eip7594_proto protoreflect.FileDescriptor + +var file_proto_engine_v1_execution_engine_eip7594_proto_rawDesc = []byte{ + 0x0a, 0x2e, 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, 0x5f, 0x65, 0x69, 0x70, 0x37, 0x35, 0x39, 0x34, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x12, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, + 0x65, 0x2e, 0x76, 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, 0xa9, 0x01, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, + 0x65, 0x56, 0x32, 0x12, 0x39, 0x0a, 0x0f, 0x6b, 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, + 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x0e, + 0x6b, 0x7a, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x31, + 0x0a, 0x0b, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, + 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x0a, 0x63, 0x65, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x6f, 0x66, + 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, + 0x42, 0x14, 0x8a, 0xb5, 0x18, 0x08, 0x3f, 0x2c, 0x31, 0x33, 0x31, 0x30, 0x37, 0x32, 0x92, 0xb5, + 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x22, 0x61, 0x0a, + 0x0e, 0x42, 0x6c, 0x6f, 0x62, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x56, 0x32, 0x12, + 0x1e, 0x0a, 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x0a, 0x8a, + 0xb5, 0x18, 0x06, 0x31, 0x33, 0x31, 0x30, 0x37, 0x32, 0x52, 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x12, + 0x2f, 0x0a, 0x0b, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0e, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, + 0x34, 0x30, 0x39, 0x36, 0x52, 0x0a, 0x63, 0x65, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, + 0x42, 0x96, 0x01, 0x0a, 0x16, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 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, 0x65, 0x6e, 0x67, + 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x76, 0x31, 0xaa, + 0x02, 0x12, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, + 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, + 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5c, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_proto_engine_v1_execution_engine_eip7594_proto_rawDescOnce sync.Once + file_proto_engine_v1_execution_engine_eip7594_proto_rawDescData = file_proto_engine_v1_execution_engine_eip7594_proto_rawDesc +) + +func file_proto_engine_v1_execution_engine_eip7594_proto_rawDescGZIP() []byte { + file_proto_engine_v1_execution_engine_eip7594_proto_rawDescOnce.Do(func() { + file_proto_engine_v1_execution_engine_eip7594_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_engine_v1_execution_engine_eip7594_proto_rawDescData) + }) + return file_proto_engine_v1_execution_engine_eip7594_proto_rawDescData +} + +var file_proto_engine_v1_execution_engine_eip7594_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_proto_engine_v1_execution_engine_eip7594_proto_goTypes = []interface{}{ + (*BlobsBundleV2)(nil), // 0: ethereum.engine.v1.BlobsBundleV2 + (*BlobAndProofV2)(nil), // 1: ethereum.engine.v1.BlobAndProofV2 +} +var file_proto_engine_v1_execution_engine_eip7594_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_proto_engine_v1_execution_engine_eip7594_proto_init() } +func file_proto_engine_v1_execution_engine_eip7594_proto_init() { + if File_proto_engine_v1_execution_engine_eip7594_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_engine_v1_execution_engine_eip7594_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlobsBundleV2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_engine_v1_execution_engine_eip7594_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlobAndProofV2); 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_engine_v1_execution_engine_eip7594_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_engine_v1_execution_engine_eip7594_proto_goTypes, + DependencyIndexes: file_proto_engine_v1_execution_engine_eip7594_proto_depIdxs, + MessageInfos: file_proto_engine_v1_execution_engine_eip7594_proto_msgTypes, + }.Build() + File_proto_engine_v1_execution_engine_eip7594_proto = out.File + file_proto_engine_v1_execution_engine_eip7594_proto_rawDesc = nil + file_proto_engine_v1_execution_engine_eip7594_proto_goTypes = nil + file_proto_engine_v1_execution_engine_eip7594_proto_depIdxs = nil +} diff --git a/proto/engine/v1/execution_engine_eip7594.proto b/proto/engine/v1/execution_engine_eip7594.proto new file mode 100644 index 000000000000..23c14b12e767 --- /dev/null +++ b/proto/engine/v1/execution_engine_eip7594.proto @@ -0,0 +1,56 @@ +// Copyright 2022 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.engine.v1; + +import "proto/eth/ext/options.proto"; + +option csharp_namespace = "Ethereum.Engine.V1"; +option go_package = "github.com/prysmaticlabs/prysm/v5/proto/engine/v1;enginev1"; +option java_multiple_files = true; +option java_outer_classname = "ExecutionEngineProto"; +option java_package = "org.ethereum.engine.v1"; +option php_namespace = "Ethereum\\Engine\\v1"; + +message BlobsBundleV2 { + // The KZG commitments of the blobs. + repeated bytes kzg_commitments = 1 [ + (ethereum.eth.ext.ssz_size) = "?,48", + (ethereum.eth.ext.ssz_max) = "max_blob_commitments.size" + ]; + + // The cell_proofs for all blobs + // TODO: update ssz_max when it's defined in the spec + repeated bytes cell_proofs = 2 [ + (ethereum.eth.ext.ssz_size) = "?,48", + (ethereum.eth.ext.ssz_max) = "max_blob_commitments.size" + ]; + + // The blobs itself. + repeated bytes blobs = 3 [ + (ethereum.eth.ext.ssz_size) = "?,blob.size", + (ethereum.eth.ext.ssz_max) = "max_blob_commitments.size" + ]; +} + +// BlobAndProofV2 consists of the blob and the cell proofs for each cell in the blob. +// TODO: update ssz_max when it's defined in the spec +message BlobAndProofV2 { + bytes blob = 1 [ (ethereum.eth.ext.ssz_size) = "blob.size" ]; + repeated bytes cell_proofs = 2 [ + (ethereum.eth.ext.ssz_size) = "48", + (ethereum.eth.ext.ssz_max) = "max_blob_commitments.size" + ]; +} \ No newline at end of file From 324d51f0a8c34298aeff49b052f6cbf81ba437a6 Mon Sep 17 00:00:00 2001 From: Manu NALEPA Date: Tue, 4 Mar 2025 10:47:06 +0100 Subject: [PATCH 2/2] `proto/engine/v1`: Remove `execution_engine_eip7594.go` since this file does not exists. Rerun ` hack/update-go-pbs.sh` and `hack/update-go-ssz.sh `. --- proto/engine/v1/BUILD.bazel | 1 - proto/engine/v1/engine.ssz.go | 1 - proto/engine/v1/execution_engine_eip7594.pb.go | 5 +++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/proto/engine/v1/BUILD.bazel b/proto/engine/v1/BUILD.bazel index 0c78742f3d10..360a352f2929 100644 --- a/proto/engine/v1/BUILD.bazel +++ b/proto/engine/v1/BUILD.bazel @@ -77,7 +77,6 @@ go_library( srcs = [ "electra.go", "execution_engine.go", - "execution_engine_eip7594.go", "json_marshal_unmarshal.go", ":ssz_generated_files", # keep ], diff --git a/proto/engine/v1/engine.ssz.go b/proto/engine/v1/engine.ssz.go index bc079701d9a9..9607f735fe2b 100644 --- a/proto/engine/v1/engine.ssz.go +++ b/proto/engine/v1/engine.ssz.go @@ -1,5 +1,4 @@ // Code generated by fastssz. DO NOT EDIT. -// Hash: ab5dad88347c6ab5ef07406f784c0d59bd8744e0ab9db338d865b3d9beb26393 package enginev1 import ( diff --git a/proto/engine/v1/execution_engine_eip7594.pb.go b/proto/engine/v1/execution_engine_eip7594.pb.go index 485eea58dbe7..9f8074e44860 100755 --- a/proto/engine/v1/execution_engine_eip7594.pb.go +++ b/proto/engine/v1/execution_engine_eip7594.pb.go @@ -7,11 +7,12 @@ package enginev1 import ( + reflect "reflect" + sync "sync" + _ "github.com/prysmaticlabs/prysm/v5/proto/eth/ext" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const (