Fix deneb builder bid HTR (#12906)

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
terencechain
2023-09-14 17:14:03 -07:00
committed by GitHub
parent 9bb81537c8
commit 4d6b3252ae
6 changed files with 121 additions and 121 deletions

View File

@@ -1773,9 +1773,9 @@ type BlindedBlobsBundle struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
KzgCommitments [][]byte `protobuf:"bytes,1,rep,name=kzg_commitments,json=kzgCommitments,proto3" json:"kzg_commitments,omitempty" ssz-max:"4" ssz-size:"?,48"`
Proofs [][]byte `protobuf:"bytes,2,rep,name=proofs,proto3" json:"proofs,omitempty" ssz-max:"4" ssz-size:"?,48"`
BlobRoots [][]byte `protobuf:"bytes,3,rep,name=blob_roots,json=blobRoots,proto3" json:"blob_roots,omitempty" ssz-max:"4" ssz-size:"?,32"`
KzgCommitments [][]byte `protobuf:"bytes,1,rep,name=kzg_commitments,json=kzgCommitments,proto3" json:"kzg_commitments,omitempty" ssz-max:"4096" ssz-size:"?,48"`
Proofs [][]byte `protobuf:"bytes,2,rep,name=proofs,proto3" json:"proofs,omitempty" ssz-max:"4096" ssz-size:"?,48"`
BlobRoots [][]byte `protobuf:"bytes,3,rep,name=blob_roots,json=blobRoots,proto3" json:"blob_roots,omitempty" ssz-max:"4096" ssz-size:"?,32"`
}
func (x *BlindedBlobsBundle) Reset() {
@@ -2318,34 +2318,34 @@ var file_proto_engine_v1_execution_engine_proto_rawDesc = []byte{
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,
0xa1, 0x01, 0x0a, 0x12, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x62, 0x73,
0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x36, 0x0a, 0x0f, 0x6b, 0x7a, 0x67, 0x5f, 0x63, 0x6f,
0xaa, 0x01, 0x0a, 0x12, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x62, 0x73,
0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 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,
0x0d, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x01, 0x34, 0x52, 0x0e,
0x6b, 0x7a, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25,
0x0a, 0x06, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0d,
0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x01, 0x34, 0x52, 0x06, 0x70,
0x72, 0x6f, 0x6f, 0x66, 0x73, 0x12, 0x2c, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x72, 0x6f,
0x6f, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0d, 0x8a, 0xb5, 0x18, 0x04, 0x3f,
0x2c, 0x33, 0x32, 0x92, 0xb5, 0x18, 0x01, 0x34, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x62, 0x52, 0x6f,
0x6f, 0x74, 0x73, 0x22, 0x26, 0x0a, 0x04, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x1e, 0x0a, 0x04, 0x64,
0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x0a, 0x8a, 0xb5, 0x18, 0x06, 0x31,
0x33, 0x31, 0x30, 0x37, 0x32, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x43, 0x0a, 0x14, 0x45,
0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74,
0x69, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64,
0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10,
0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 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, 0x34, 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,
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, 0x28, 0x0a, 0x06, 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, 0x06, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x12, 0x2f, 0x0a, 0x0a, 0x62,
0x6c, 0x6f, 0x62, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x42,
0x10, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x33, 0x32, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39,
0x36, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x62, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x22, 0x26, 0x0a, 0x04,
0x42, 0x6c, 0x6f, 0x62, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0c, 0x42, 0x0a, 0x8a, 0xb5, 0x18, 0x06, 0x31, 0x33, 0x31, 0x30, 0x37, 0x32, 0x52, 0x04,
0x64, 0x61, 0x74, 0x61, 0x22, 0x43, 0x0a, 0x14, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65,
0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x11,
0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64,
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74,
0x65, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 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, 0x34, 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 (

View File

@@ -230,11 +230,11 @@ message BlobsBundle {
// BlindedBlobsBundle is retrieved through the builder-api from /eth/v1/builder/header/{slot}/{parent_hash}/{pubkey} after the Deneb hardfork.
message BlindedBlobsBundle {
// The KZG commitments of the blobs.
repeated bytes kzg_commitments = 1 [(ethereum.eth.ext.ssz_size) = "?,48", (ethereum.eth.ext.ssz_max) = "4"];
repeated bytes kzg_commitments = 1 [(ethereum.eth.ext.ssz_size) = "?,48", (ethereum.eth.ext.ssz_max) = "max_blob_commitments.size"];
// The proofs of the blobs.
repeated bytes proofs = 2 [(ethereum.eth.ext.ssz_size) = "?,48", (ethereum.eth.ext.ssz_max) = "4"];
repeated bytes proofs = 2 [(ethereum.eth.ext.ssz_size) = "?,48", (ethereum.eth.ext.ssz_max) = "max_blob_commitments.size"];
// The blob roots.
repeated bytes blob_roots = 3 [(ethereum.eth.ext.ssz_size) = "?,32", (ethereum.eth.ext.ssz_max) = "4"];
repeated bytes blob_roots = 3 [(ethereum.eth.ext.ssz_size) = "?,32", (ethereum.eth.ext.ssz_max) = "max_blob_commitments.size"];
}
// Blob contains the data that is to be committed on chain.

View File

@@ -1,5 +1,5 @@
// Code generated by fastssz. DO NOT EDIT.
// Hash: 68f45ae4080f56abb8c89f1da5f89f449df5d58f2ff06318122ec28ce6a84751
// Hash: d163294d035463f410495773be37e7997f5305be52b9d58b513197b7b37d5124
package enginev1
import (
@@ -2685,8 +2685,8 @@ func (b *BlindedBlobsBundle) MarshalSSZTo(buf []byte) (dst []byte, err error) {
offset += len(b.BlobRoots) * 32
// Field (0) 'KzgCommitments'
if size := len(b.KzgCommitments); size > 4 {
err = ssz.ErrListTooBigFn("--.KzgCommitments", size, 4)
if size := len(b.KzgCommitments); size > 4096 {
err = ssz.ErrListTooBigFn("--.KzgCommitments", size, 4096)
return
}
for ii := 0; ii < len(b.KzgCommitments); ii++ {
@@ -2698,8 +2698,8 @@ func (b *BlindedBlobsBundle) MarshalSSZTo(buf []byte) (dst []byte, err error) {
}
// Field (1) 'Proofs'
if size := len(b.Proofs); size > 4 {
err = ssz.ErrListTooBigFn("--.Proofs", size, 4)
if size := len(b.Proofs); size > 4096 {
err = ssz.ErrListTooBigFn("--.Proofs", size, 4096)
return
}
for ii := 0; ii < len(b.Proofs); ii++ {
@@ -2711,8 +2711,8 @@ func (b *BlindedBlobsBundle) MarshalSSZTo(buf []byte) (dst []byte, err error) {
}
// Field (2) 'BlobRoots'
if size := len(b.BlobRoots); size > 4 {
err = ssz.ErrListTooBigFn("--.BlobRoots", size, 4)
if size := len(b.BlobRoots); size > 4096 {
err = ssz.ErrListTooBigFn("--.BlobRoots", size, 4096)
return
}
for ii := 0; ii < len(b.BlobRoots); ii++ {
@@ -2759,7 +2759,7 @@ func (b *BlindedBlobsBundle) UnmarshalSSZ(buf []byte) error {
// Field (0) 'KzgCommitments'
{
buf = tail[o0:o1]
num, err := ssz.DivideInt2(len(buf), 48, 4)
num, err := ssz.DivideInt2(len(buf), 48, 4096)
if err != nil {
return err
}
@@ -2775,7 +2775,7 @@ func (b *BlindedBlobsBundle) UnmarshalSSZ(buf []byte) error {
// Field (1) 'Proofs'
{
buf = tail[o1:o2]
num, err := ssz.DivideInt2(len(buf), 48, 4)
num, err := ssz.DivideInt2(len(buf), 48, 4096)
if err != nil {
return err
}
@@ -2791,7 +2791,7 @@ func (b *BlindedBlobsBundle) UnmarshalSSZ(buf []byte) error {
// Field (2) 'BlobRoots'
{
buf = tail[o2:]
num, err := ssz.DivideInt2(len(buf), 32, 4)
num, err := ssz.DivideInt2(len(buf), 32, 4096)
if err != nil {
return err
}
@@ -2833,8 +2833,8 @@ func (b *BlindedBlobsBundle) HashTreeRootWith(hh *ssz.Hasher) (err error) {
// Field (0) 'KzgCommitments'
{
if size := len(b.KzgCommitments); size > 4 {
err = ssz.ErrListTooBigFn("--.KzgCommitments", size, 4)
if size := len(b.KzgCommitments); size > 4096 {
err = ssz.ErrListTooBigFn("--.KzgCommitments", size, 4096)
return
}
subIndx := hh.Index()
@@ -2848,16 +2848,16 @@ func (b *BlindedBlobsBundle) HashTreeRootWith(hh *ssz.Hasher) (err error) {
numItems := uint64(len(b.KzgCommitments))
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, numItems, 4)
hh.MerkleizeWithMixinVectorizedHTR(subIndx, numItems, 4096)
} else {
hh.MerkleizeWithMixin(subIndx, numItems, 4)
hh.MerkleizeWithMixin(subIndx, numItems, 4096)
}
}
// Field (1) 'Proofs'
{
if size := len(b.Proofs); size > 4 {
err = ssz.ErrListTooBigFn("--.Proofs", size, 4)
if size := len(b.Proofs); size > 4096 {
err = ssz.ErrListTooBigFn("--.Proofs", size, 4096)
return
}
subIndx := hh.Index()
@@ -2871,16 +2871,16 @@ func (b *BlindedBlobsBundle) HashTreeRootWith(hh *ssz.Hasher) (err error) {
numItems := uint64(len(b.Proofs))
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, numItems, 4)
hh.MerkleizeWithMixinVectorizedHTR(subIndx, numItems, 4096)
} else {
hh.MerkleizeWithMixin(subIndx, numItems, 4)
hh.MerkleizeWithMixin(subIndx, numItems, 4096)
}
}
// Field (2) 'BlobRoots'
{
if size := len(b.BlobRoots); size > 4 {
err = ssz.ErrListTooBigFn("--.BlobRoots", size, 4)
if size := len(b.BlobRoots); size > 4096 {
err = ssz.ErrListTooBigFn("--.BlobRoots", size, 4096)
return
}
subIndx := hh.Index()
@@ -2894,9 +2894,9 @@ func (b *BlindedBlobsBundle) HashTreeRootWith(hh *ssz.Hasher) (err error) {
numItems := uint64(len(b.BlobRoots))
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, numItems, 4)
hh.MerkleizeWithMixinVectorizedHTR(subIndx, numItems, 4096)
} else {
hh.MerkleizeWithMixin(subIndx, numItems, 4)
hh.MerkleizeWithMixin(subIndx, numItems, 4096)
}
}