diff --git a/beacon-chain/execution/engine_client.go b/beacon-chain/execution/engine_client.go index 1dd410a4726d..3fc708788742 100644 --- a/beacon-chain/execution/engine_client.go +++ b/beacon-chain/execution/engine_client.go @@ -687,8 +687,8 @@ func (s *Service) ReconstructDataColumnSidecars(ctx context.Context, block inter return nil, wrapWithBlockRoot(err, blockRoot, "could not compute cells") } - proofs := make([]kzg.Proof, len(blobAndProof.KzgProofs)) - for i, proof := range blobAndProof.KzgProofs { + proofs := make([]kzg.Proof, len(blobAndProof.Proofs)) + for i, proof := range blobAndProof.Proofs { proofs[i] = kzg.Proof(proof) } cellsAndProofs = append(cellsAndProofs, kzg.CellsAndProofs{ diff --git a/beacon-chain/execution/engine_client_test.go b/beacon-chain/execution/engine_client_test.go index 2818cfa9e1a8..5966bacff2cd 100644 --- a/beacon-chain/execution/engine_client_test.go +++ b/beacon-chain/execution/engine_client_test.go @@ -2586,12 +2586,12 @@ func createBlobServerV2(t *testing.T, numBlobs int, blobMasks []bool) *httptest. } blobAndCellProofs[i] = &pb.BlobAndProofV2Json{ - Blob: []byte("0xblob"), - KzgProofs: []hexutil.Bytes{}, + Blob: []byte("0xblob"), + Proofs: []hexutil.Bytes{}, } for j := 0; j < int(params.BeaconConfig().NumberOfColumns); j++ { cellProof := make([]byte, 48) - blobAndCellProofs[i].KzgProofs = append(blobAndCellProofs[i].KzgProofs, cellProof) + blobAndCellProofs[i].Proofs = append(blobAndCellProofs[i].Proofs, cellProof) } } diff --git a/proto/engine/v1/execution_engine_eip7594.pb.go b/proto/engine/v1/execution_engine_eip7594.pb.go index 6959ee52092f..803484d13213 100755 --- a/proto/engine/v1/execution_engine_eip7594.pb.go +++ b/proto/engine/v1/execution_engine_eip7594.pb.go @@ -27,8 +27,8 @@ type BlobAndProofV2 struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Blob []byte `protobuf:"bytes,1,opt,name=blob,proto3" json:"blob,omitempty" ssz-size:"131072"` - KzgProofs [][]byte `protobuf:"bytes,2,rep,name=kzg_proofs,json=kzgProofs,proto3" json:"kzg_proofs,omitempty" ssz-max:"33554432" ssz-size:"48"` + Blob []byte `protobuf:"bytes,1,opt,name=blob,proto3" json:"blob,omitempty" ssz-size:"131072"` + Proofs [][]byte `protobuf:"bytes,2,rep,name=proofs,proto3" json:"proofs,omitempty" ssz-max:"33554432" ssz-size:"48"` } func (x *BlobAndProofV2) Reset() { @@ -70,9 +70,9 @@ func (x *BlobAndProofV2) GetBlob() []byte { return nil } -func (x *BlobAndProofV2) GetKzgProofs() [][]byte { +func (x *BlobAndProofV2) GetProofs() [][]byte { if x != nil { - return x.KzgProofs + return x.Proofs } return nil } @@ -86,23 +86,22 @@ var file_proto_engine_v1_execution_engine_eip7594_proto_rawDesc = []byte{ 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, 0x63, 0x0a, 0x0e, 0x42, 0x6c, 0x6f, 0x62, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, + 0x6f, 0x22, 0x5c, 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, 0x31, 0x0a, 0x0a, 0x6b, 0x7a, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x12, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x92, - 0xb5, 0x18, 0x08, 0x33, 0x33, 0x35, 0x35, 0x34, 0x34, 0x33, 0x32, 0x52, 0x09, 0x6b, 0x7a, 0x67, - 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, + 0x6c, 0x6f, 0x62, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0c, 0x42, 0x12, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x08, 0x33, + 0x33, 0x35, 0x35, 0x34, 0x34, 0x33, 0x32, 0x52, 0x06, 0x70, 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 ( diff --git a/proto/engine/v1/execution_engine_eip7594.proto b/proto/engine/v1/execution_engine_eip7594.proto index 006c2ce56a2f..a28cc990d800 100644 --- a/proto/engine/v1/execution_engine_eip7594.proto +++ b/proto/engine/v1/execution_engine_eip7594.proto @@ -29,7 +29,7 @@ option php_namespace = "Ethereum\\Engine\\v1"; // It is introduced in Fulu network upgrade. message BlobAndProofV2 { bytes blob = 1 [ (ethereum.eth.ext.ssz_size) = "blob.size" ]; - repeated bytes kzg_proofs = 2 [ + repeated bytes proofs = 2 [ (ethereum.eth.ext.ssz_size) = "48", (ethereum.eth.ext.ssz_max) = "max_cell_proofs_length.size" ]; diff --git a/proto/engine/v1/json_marshal_unmarshal.go b/proto/engine/v1/json_marshal_unmarshal.go index fd73c1803e79..ddbfbbd849eb 100644 --- a/proto/engine/v1/json_marshal_unmarshal.go +++ b/proto/engine/v1/json_marshal_unmarshal.go @@ -1284,8 +1284,8 @@ func (b *BlobAndProof) UnmarshalJSON(enc []byte) error { } type BlobAndProofV2Json struct { - Blob hexutil.Bytes `json:"blob"` - KzgProofs []hexutil.Bytes `json:"proofs"` + Blob hexutil.Bytes `json:"blob"` + Proofs []hexutil.Bytes `json:"proofs"` } func (b *BlobAndProofV2) UnmarshalJSON(enc []byte) error { @@ -1298,12 +1298,12 @@ func (b *BlobAndProofV2) UnmarshalJSON(enc []byte) error { copy(blob, dec.Blob) b.Blob = blob - proofs := make([][]byte, len(dec.KzgProofs)) - for i, proof := range dec.KzgProofs { + proofs := make([][]byte, len(dec.Proofs)) + for i, proof := range dec.Proofs { p := proof proofs[i] = bytesutil.PadTo(p[:], fieldparams.BLSPubkeyLength) } - b.KzgProofs = proofs + b.Proofs = proofs return nil }