diff --git a/api/deneb/submitblockrequest.go b/api/deneb/submitblockrequest.go index 7c22306..660d3d7 100644 --- a/api/deneb/submitblockrequest.go +++ b/api/deneb/submitblockrequest.go @@ -4,15 +4,17 @@ import ( "fmt" v1 "github.com/attestantio/go-builder-client/api/v1" + "github.com/attestantio/go-eth2-client/spec/deneb" "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/goccy/go-yaml" ) // SubmitBlockRequest is the request from the builder to submit a block. type SubmitBlockRequest struct { - Message *v1.BidTrace - ExecutionPayloadAndBlobsBundle - Signature phase0.BLSSignature `ssz-size:"96"` + Message *v1.BidTrace + ExecutionPayload *deneb.ExecutionPayload + BlobsBundle *BlobsBundle + Signature phase0.BLSSignature `ssz-size:"96"` } // String returns a string version of the structure. diff --git a/spec/versionedsignedbuilderbid_test.go b/spec/versionedsignedbuilderbid_test.go index 5f36bcd..06e2e92 100644 --- a/spec/versionedsignedbuilderbid_test.go +++ b/spec/versionedsignedbuilderbid_test.go @@ -1557,8 +1557,8 @@ func TestVersionedSignedBuilderBidMessageHashTreeRoot(t *testing.T) { }, }, res: phase0.Root{ - 0x31, 0x5d, 0x00, 0x52, 0x98, 0x8b, 0x3f, 0x54, 0xc3, 0x74, 0xa1, 0x87, 0x94, 0x30, 0xc8, 0x18, - 0x00, 0x0f, 0x60, 0x50, 0x4a, 0xaa, 0xcf, 0x5b, 0xa5, 0xa9, 0x73, 0xc8, 0xa0, 0xb1, 0x4f, 0xa1, + 0xfb, 0x3a, 0xe3, 0xdc, 0x57, 0xe4, 0x16, 0x8c, 0x65, 0xc6, 0x43, 0x3f, 0x56, 0xb6, 0x99, 0x67, + 0x33, 0x36, 0x52, 0x8e, 0x4a, 0xae, 0x4f, 0x79, 0xe7, 0x82, 0x66, 0x03, 0x9f, 0xe4, 0xe8, 0x25, }, }, } diff --git a/spec/versionedsubmitblockrequest.go b/spec/versionedsubmitblockrequest.go index b5e600f..46ab35f 100644 --- a/spec/versionedsubmitblockrequest.go +++ b/spec/versionedsubmitblockrequest.go @@ -20,6 +20,7 @@ import ( "github.com/attestantio/go-builder-client/api/bellatrix" "github.com/attestantio/go-builder-client/api/capella" + "github.com/attestantio/go-builder-client/api/deneb" v1 "github.com/attestantio/go-builder-client/api/v1" consensusspec "github.com/attestantio/go-eth2-client/spec" consensusbellatrix "github.com/attestantio/go-eth2-client/spec/bellatrix" @@ -33,6 +34,7 @@ type VersionedSubmitBlockRequest struct { Version consensusspec.DataVersion Bellatrix *bellatrix.SubmitBlockRequest Capella *capella.SubmitBlockRequest + Deneb *deneb.SubmitBlockRequest } // IsEmpty returns true if there is no request. @@ -42,6 +44,8 @@ func (v *VersionedSubmitBlockRequest) IsEmpty() bool { return v.Bellatrix == nil case consensusspec.DataVersionCapella: return v.Capella == nil + case consensusspec.DataVersionDeneb: + return v.Deneb == nil default: return true } @@ -69,6 +73,14 @@ func (v *VersionedSubmitBlockRequest) Slot() (uint64, error) { return 0, errors.New("no data message") } return v.Capella.Message.Slot, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return 0, errors.New("no data") + } + if v.Deneb.Message == nil { + return 0, errors.New("no data message") + } + return v.Deneb.Message.Slot, nil default: return 0, errors.New("unsupported version") } @@ -96,6 +108,14 @@ func (v *VersionedSubmitBlockRequest) BlockHash() (phase0.Hash32, error) { return phase0.Hash32{}, errors.New("no data message") } return v.Capella.Message.BlockHash, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return phase0.Hash32{}, errors.New("no data") + } + if v.Deneb.Message == nil { + return phase0.Hash32{}, errors.New("no data message") + } + return v.Deneb.Message.BlockHash, nil default: return phase0.Hash32{}, errors.New("unsupported version") } @@ -123,6 +143,14 @@ func (v *VersionedSubmitBlockRequest) Builder() (phase0.BLSPubKey, error) { return phase0.BLSPubKey{}, errors.New("no data message") } return v.Capella.Message.BuilderPubkey, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return phase0.BLSPubKey{}, errors.New("no data") + } + if v.Deneb.Message == nil { + return phase0.BLSPubKey{}, errors.New("no data message") + } + return v.Deneb.Message.BuilderPubkey, nil default: return phase0.BLSPubKey{}, errors.New("unsupported version") } @@ -150,6 +178,14 @@ func (v *VersionedSubmitBlockRequest) ProposerFeeRecipient() (consensusbellatrix return consensusbellatrix.ExecutionAddress{}, errors.New("no data message") } return v.Capella.Message.ProposerFeeRecipient, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return consensusbellatrix.ExecutionAddress{}, errors.New("no data") + } + if v.Deneb.Message == nil { + return consensusbellatrix.ExecutionAddress{}, errors.New("no data message") + } + return v.Deneb.Message.ProposerFeeRecipient, nil default: return consensusbellatrix.ExecutionAddress{}, errors.New("unsupported version") } @@ -177,6 +213,14 @@ func (v *VersionedSubmitBlockRequest) ProposerPubKey() (phase0.BLSPubKey, error) return phase0.BLSPubKey{}, errors.New("no data message") } return v.Capella.Message.ProposerPubkey, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return phase0.BLSPubKey{}, errors.New("no data") + } + if v.Deneb.Message == nil { + return phase0.BLSPubKey{}, errors.New("no data message") + } + return v.Deneb.Message.ProposerPubkey, nil default: return phase0.BLSPubKey{}, errors.New("unsupported version") } @@ -204,6 +248,14 @@ func (v *VersionedSubmitBlockRequest) ParentHash() (phase0.Hash32, error) { return phase0.Hash32{}, errors.New("no data message") } return v.Capella.Message.ParentHash, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return phase0.Hash32{}, errors.New("no data") + } + if v.Deneb.Message == nil { + return phase0.Hash32{}, errors.New("no data message") + } + return v.Deneb.Message.ParentHash, nil default: return phase0.Hash32{}, errors.New("unsupported version") } @@ -231,6 +283,14 @@ func (v *VersionedSubmitBlockRequest) Value() (*uint256.Int, error) { return nil, errors.New("no data message") } return v.Capella.Message.Value, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return nil, errors.New("no data") + } + if v.Deneb.Message == nil { + return nil, errors.New("no data message") + } + return v.Deneb.Message.Value, nil default: return nil, errors.New("unsupported version") } @@ -258,6 +318,14 @@ func (v *VersionedSubmitBlockRequest) BidTrace() (*v1.BidTrace, error) { return nil, errors.New("no data message") } return v.Capella.Message, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return nil, errors.New("no data") + } + if v.Deneb.Message == nil { + return nil, errors.New("no data message") + } + return v.Deneb.Message, nil default: return nil, errors.New("unsupported version") } @@ -279,6 +347,11 @@ func (v *VersionedSubmitBlockRequest) Signature() (phase0.BLSSignature, error) { return phase0.BLSSignature{}, errors.New("no data") } return v.Capella.Signature, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return phase0.BLSSignature{}, errors.New("no data") + } + return v.Deneb.Signature, nil default: return phase0.BLSSignature{}, errors.New("unsupported version") } @@ -306,6 +379,14 @@ func (v *VersionedSubmitBlockRequest) ExecutionPayloadBlockHash() (phase0.Hash32 return phase0.Hash32{}, errors.New("no data execution payload") } return v.Capella.ExecutionPayload.BlockHash, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return phase0.Hash32{}, errors.New("no data") + } + if v.Deneb.ExecutionPayload == nil { + return phase0.Hash32{}, errors.New("no data execution payload") + } + return v.Deneb.ExecutionPayload.BlockHash, nil default: return phase0.Hash32{}, errors.New("unsupported version") } @@ -333,6 +414,14 @@ func (v *VersionedSubmitBlockRequest) ExecutionPayloadParentHash() (phase0.Hash3 return phase0.Hash32{}, errors.New("no data execution payload") } return v.Capella.ExecutionPayload.ParentHash, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return phase0.Hash32{}, errors.New("no data") + } + if v.Deneb.ExecutionPayload == nil { + return phase0.Hash32{}, errors.New("no data execution payload") + } + return v.Deneb.ExecutionPayload.ParentHash, nil default: return phase0.Hash32{}, errors.New("unsupported version") } @@ -360,6 +449,14 @@ func (v *VersionedSubmitBlockRequest) PrevRandao() (phase0.Hash32, error) { return phase0.Hash32{}, errors.New("no data execution payload") } return v.Capella.ExecutionPayload.PrevRandao, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return phase0.Hash32{}, errors.New("no data") + } + if v.Deneb.ExecutionPayload == nil { + return phase0.Hash32{}, errors.New("no data execution payload") + } + return v.Deneb.ExecutionPayload.PrevRandao, nil default: return phase0.Hash32{}, errors.New("unsupported version") } @@ -387,6 +484,14 @@ func (v *VersionedSubmitBlockRequest) GasLimit() (uint64, error) { return 0, errors.New("no data execution payload") } return v.Capella.ExecutionPayload.GasLimit, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return 0, errors.New("no data") + } + if v.Deneb.ExecutionPayload == nil { + return 0, errors.New("no data execution payload") + } + return v.Deneb.ExecutionPayload.GasLimit, nil default: return 0, errors.New("unsupported version") } @@ -414,6 +519,14 @@ func (v *VersionedSubmitBlockRequest) GasUsed() (uint64, error) { return 0, errors.New("no data execution payload") } return v.Capella.ExecutionPayload.GasUsed, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return 0, errors.New("no data") + } + if v.Deneb.ExecutionPayload == nil { + return 0, errors.New("no data execution payload") + } + return v.Deneb.ExecutionPayload.GasUsed, nil default: return 0, errors.New("unsupported version") } @@ -441,6 +554,14 @@ func (v *VersionedSubmitBlockRequest) BlockNumber() (uint64, error) { return 0, errors.New("no data execution payload") } return v.Capella.ExecutionPayload.BlockNumber, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return 0, errors.New("no data") + } + if v.Deneb.ExecutionPayload == nil { + return 0, errors.New("no data execution payload") + } + return v.Deneb.ExecutionPayload.BlockNumber, nil default: return 0, errors.New("unsupported version") } @@ -468,6 +589,14 @@ func (v *VersionedSubmitBlockRequest) Timestamp() (uint64, error) { return 0, errors.New("no data execution payload") } return v.Capella.ExecutionPayload.Timestamp, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return 0, errors.New("no data") + } + if v.Deneb.ExecutionPayload == nil { + return 0, errors.New("no data execution payload") + } + return v.Deneb.ExecutionPayload.Timestamp, nil default: return 0, errors.New("unsupported version") } @@ -495,6 +624,14 @@ func (v *VersionedSubmitBlockRequest) Transactions() ([]consensusbellatrix.Trans return nil, errors.New("no data execution payload") } return v.Capella.ExecutionPayload.Transactions, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return nil, errors.New("no data") + } + if v.Deneb.ExecutionPayload == nil { + return nil, errors.New("no data execution payload") + } + return v.Deneb.ExecutionPayload.Transactions, nil default: return nil, errors.New("unsupported version") } @@ -514,6 +651,14 @@ func (v *VersionedSubmitBlockRequest) Withdrawals() ([]*consensuscapella.Withdra return nil, errors.New("no data execution payload") } return v.Capella.ExecutionPayload.Withdrawals, nil + case consensusspec.DataVersionDeneb: + if v.Deneb == nil { + return nil, errors.New("no data") + } + if v.Deneb.ExecutionPayload == nil { + return nil, errors.New("no data execution payload") + } + return v.Deneb.ExecutionPayload.Withdrawals, nil default: return nil, errors.New("unsupported version") } diff --git a/spec/versionedsubmitblockrequest_json.go b/spec/versionedsubmitblockrequest_json.go index 247434b..fd40181 100644 --- a/spec/versionedsubmitblockrequest_json.go +++ b/spec/versionedsubmitblockrequest_json.go @@ -19,6 +19,7 @@ import ( "github.com/attestantio/go-builder-client/api/bellatrix" "github.com/attestantio/go-builder-client/api/capella" + "github.com/attestantio/go-builder-client/api/deneb" "github.com/attestantio/go-eth2-client/spec" "github.com/pkg/errors" ) @@ -30,6 +31,10 @@ type capellaVersionedSubmitBlockRequestJSON struct { Data *capella.SubmitBlockRequest `json:"data"` } +type denebVersionedSubmitBlockRequestJSON struct { + Data *deneb.SubmitBlockRequest `json:"data"` +} + // MarshalJSON implements json.Marshaler. func (v *VersionedSubmitBlockRequest) MarshalJSON() ([]byte, error) { version := &versionJSON{ @@ -61,6 +66,18 @@ func (v *VersionedSubmitBlockRequest) MarshalJSON() ([]byte, error) { *capellaVersionedSubmitBlockRequestJSON }{version, data} return json.Marshal(payload) + case spec.DataVersionDeneb: + if v.Deneb == nil { + return nil, errors.New("no deneb data") + } + data := &denebVersionedSubmitBlockRequestJSON{ + Data: v.Deneb, + } + payload := struct { + *versionJSON + *denebVersionedSubmitBlockRequestJSON + }{version, data} + return json.Marshal(payload) default: return nil, fmt.Errorf("unsupported data version %v", v.Version) } @@ -86,6 +103,12 @@ func (v *VersionedSubmitBlockRequest) UnmarshalJSON(input []byte) error { return errors.Wrap(err, "invalid JSON") } v.Capella = data.Data + case spec.DataVersionDeneb: + var data denebVersionedSubmitBlockRequestJSON + if err := json.Unmarshal(input, &data); err != nil { + return errors.Wrap(err, "invalid JSON") + } + v.Deneb = data.Data default: return fmt.Errorf("unsupported data version %v", metadata.Version) } diff --git a/spec/versionedsubmitblockrequest_test.go b/spec/versionedsubmitblockrequest_test.go index d43fb23..709e10b 100644 --- a/spec/versionedsubmitblockrequest_test.go +++ b/spec/versionedsubmitblockrequest_test.go @@ -18,11 +18,13 @@ import ( "github.com/attestantio/go-builder-client/api/bellatrix" "github.com/attestantio/go-builder-client/api/capella" + "github.com/attestantio/go-builder-client/api/deneb" v1 "github.com/attestantio/go-builder-client/api/v1" "github.com/attestantio/go-builder-client/spec" consensusspec "github.com/attestantio/go-eth2-client/spec" consensusbellatrix "github.com/attestantio/go-eth2-client/spec/bellatrix" consensuscapella "github.com/attestantio/go-eth2-client/spec/capella" + consensusdeneb "github.com/attestantio/go-eth2-client/spec/deneb" "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/holiman/uint256" "github.com/stretchr/testify/require" @@ -46,6 +48,12 @@ func TestVersionedSubmitBlockRequestEmpty(t *testing.T) { } require.True(t, mismatch2.IsEmpty()) + mismatch3 := &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Capella: &capella.SubmitBlockRequest{}, + } + require.True(t, mismatch3.IsEmpty()) + incorrectVersion := &spec.VersionedSubmitBlockRequest{ Version: consensusspec.DataVersionAltair, Bellatrix: &bellatrix.SubmitBlockRequest{}, @@ -132,6 +140,33 @@ func TestVersionedSubmitBlockRequestSlot(t *testing.T) { }, res: 12345, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebNoDataMessage", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{}, + }, + err: "no data message", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + Message: &v1.BidTrace{ + Slot: 12345, + }, + }, + }, + res: 12345, + }, } for _, test := range tests { @@ -231,6 +266,39 @@ func TestVersionedSubmitBlockRequestBlockHash(t *testing.T) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, }, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebNoDataMessage", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{}, + }, + err: "no data message", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + Message: &v1.BidTrace{ + BlockHash: phase0.Hash32{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + }, + }, + }, + }, + res: phase0.Hash32{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + }, + }, } for _, test := range tests { @@ -334,6 +402,41 @@ func TestVersionedSubmitBlockRequestBuilder(t *testing.T) { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, }, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebNoDataMessage", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{}, + }, + err: "no data message", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + Message: &v1.BidTrace{ + BuilderPubkey: phase0.BLSPubKey{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + }, + }, + }, + }, + res: phase0.BLSPubKey{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + }, + }, } for _, test := range tests { @@ -433,6 +536,39 @@ func TestVersionedSubmitBlockRequestProposerFeeRecipient(t *testing.T) { 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, }, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebNoDataMessage", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{}, + }, + err: "no data message", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + Message: &v1.BidTrace{ + ProposerFeeRecipient: consensusbellatrix.ExecutionAddress{ + 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, + 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, + }, + }, + }, + }, + res: consensusbellatrix.ExecutionAddress{ + 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, + 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, + }, + }, } for _, test := range tests { @@ -536,6 +672,41 @@ func TestVersionedSubmitBlockRequestProposerPubKey(t *testing.T) { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, }, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebNoDataMessage", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{}, + }, + err: "no data message", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + Message: &v1.BidTrace{ + ProposerPubkey: phase0.BLSPubKey{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + }, + }, + }, + }, + res: phase0.BLSPubKey{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + }, + }, } for _, test := range tests { @@ -635,6 +806,39 @@ func TestVersionedSubmitBlockRequestParentHash(t *testing.T) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, }, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebNoDataMessage", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{}, + }, + err: "no data message", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + Message: &v1.BidTrace{ + ParentHash: phase0.Hash32{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + }, + }, + }, + }, + res: phase0.Hash32{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + }, + }, } for _, test := range tests { @@ -722,6 +926,33 @@ func TestVersionedSubmitBlockRequestValue(t *testing.T) { }, res: uint256.NewInt(12345), }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebNoDataMessage", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{}, + }, + err: "no data message", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + Message: &v1.BidTrace{ + Value: uint256.NewInt(12345), + }, + }, + }, + res: uint256.NewInt(12345), + }, } for _, test := range tests { @@ -817,6 +1048,37 @@ func TestVersionedSubmitBlockRequestBidTrace(t *testing.T) { Value: uint256.NewInt(12345), }, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebNoDataMessage", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{}, + }, + err: "no data message", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + Message: &v1.BidTrace{ + Slot: 123, + Value: uint256.NewInt(12345), + }, + }, + }, + res: &v1.BidTrace{ + Slot: 123, + Value: uint256.NewInt(12345), + }, + }, } for _, test := range tests { @@ -904,6 +1166,33 @@ func TestVersionedSubmitBlockRequestSignature(t *testing.T) { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, }, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + Signature: phase0.BLSSignature{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + }, + }, + }, + res: phase0.BLSSignature{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + }, + }, } for _, test := range tests { @@ -1003,6 +1292,39 @@ func TestVersionedSubmitBlockRequestExecutionPayloadBlockHash(t *testing.T) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, }, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebNoDataExecutionPayload", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{}, + }, + err: "no data execution payload", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + ExecutionPayload: &consensusdeneb.ExecutionPayload{ + BlockHash: phase0.Hash32{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + }, + }, + }, + }, + res: phase0.Hash32{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + }, + }, } for _, test := range tests { @@ -1102,6 +1424,39 @@ func TestVersionedSubmitBlockRequestExecutionPayloadParentHash(t *testing.T) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, }, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebNoDataExecutionPayload", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{}, + }, + err: "no data execution payload", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + ExecutionPayload: &consensusdeneb.ExecutionPayload{ + ParentHash: phase0.Hash32{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + }, + }, + }, + }, + res: phase0.Hash32{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + }, + }, } for _, test := range tests { @@ -1201,6 +1556,39 @@ func TestVersionedSubmitBlockRequestPrevRandao(t *testing.T) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, }, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebNoDataExecutionPayload", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{}, + }, + err: "no data execution payload", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + ExecutionPayload: &consensusdeneb.ExecutionPayload{ + PrevRandao: phase0.Hash32{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + }, + }, + }, + }, + res: phase0.Hash32{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + }, + }, } for _, test := range tests { @@ -1288,6 +1676,33 @@ func TestVersionedSubmitBlockRequestGasLimit(t *testing.T) { }, res: 123, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebNoDataExecutionPayload", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{}, + }, + err: "no data execution payload", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + ExecutionPayload: &consensusdeneb.ExecutionPayload{ + GasLimit: 123, + }, + }, + }, + res: 123, + }, } for _, test := range tests { @@ -1375,6 +1790,33 @@ func TestVersionedSubmitBlockRequestGasUsed(t *testing.T) { }, res: 123, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebNoDataExecutionPayload", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{}, + }, + err: "no data execution payload", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + ExecutionPayload: &consensusdeneb.ExecutionPayload{ + GasUsed: 123, + }, + }, + }, + res: 123, + }, } for _, test := range tests { @@ -1462,6 +1904,33 @@ func TestVersionedSubmitBlockRequestBlockNumber(t *testing.T) { }, res: 123, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebNoDataExecutionPayload", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{}, + }, + err: "no data execution payload", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + ExecutionPayload: &consensusdeneb.ExecutionPayload{ + BlockNumber: 123, + }, + }, + }, + res: 123, + }, } for _, test := range tests { @@ -1549,6 +2018,33 @@ func TestVersionedSubmitBlockRequestTimestamp(t *testing.T) { }, res: 12345, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebNoDataExecutionPayload", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{}, + }, + err: "no data execution payload", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + ExecutionPayload: &consensusdeneb.ExecutionPayload{ + Timestamp: 12345, + }, + }, + }, + res: 12345, + }, } for _, test := range tests { @@ -1648,6 +2144,39 @@ func TestVersionedSubmitBlockRequestTransactions(t *testing.T) { {0x01}, }, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebNoDataExecutionPayload", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{}, + }, + err: "no data execution payload", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + ExecutionPayload: &consensusdeneb.ExecutionPayload{ + Transactions: []consensusbellatrix.Transaction{ + {0x00}, + {0x01}, + }, + }, + }, + }, + res: []consensusbellatrix.Transaction{ + {0x00}, + {0x01}, + }, + }, } for _, test := range tests { @@ -1734,6 +2263,59 @@ func TestVersionedSubmitBlockRequestWithdrawals(t *testing.T) { }, }, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + err: "no data", + }, + { + name: "DenebNoDataExecutionPayload", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{}, + }, + err: "no data execution payload", + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + ExecutionPayload: &consensusdeneb.ExecutionPayload{ + Withdrawals: []*consensuscapella.Withdrawal{ + { + Index: 5, + ValidatorIndex: 10, + Address: consensusbellatrix.ExecutionAddress{}, + Amount: 12345, + }, + { + Index: 10, + ValidatorIndex: 20, + Address: consensusbellatrix.ExecutionAddress{}, + Amount: 12345, + }, + }, + }, + }, + }, + res: []*consensuscapella.Withdrawal{ + { + Index: 5, + ValidatorIndex: 10, + Address: consensusbellatrix.ExecutionAddress{}, + Amount: 12345, + }, + { + Index: 10, + ValidatorIndex: 20, + Address: consensusbellatrix.ExecutionAddress{}, + Amount: 12345, + }, + }, + }, } for _, test := range tests { @@ -1830,6 +2412,45 @@ func TestVersionedSubmitBlockRequestString(t *testing.T) { }, res: `{"version":"capella","data":{"message":{"slot":"123","parent_hash":"0x0000000000000000000000000000000000000000000000000000000000000000","block_hash":"0x0000000000000000000000000000000000000000000000000000000000000000","builder_pubkey":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","proposer_pubkey":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","proposer_fee_recipient":"0x0000000000000000000000000000000000000000","gas_limit":"0","gas_used":"0","value":"12345"},"execution_payload":{"parent_hash":"0x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f","fee_recipient":"0x0000000000000000000000000000000000000000","state_root":"0x0000000000000000000000000000000000000000000000000000000000000000","receipts_root":"0x0000000000000000000000000000000000000000000000000000000000000000","logs_bloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","prev_randao":"0x0000000000000000000000000000000000000000000000000000000000000000","block_number":"0","gas_limit":"0","gas_used":"0","timestamp":"0","extra_data":"0x","base_fee_per_gas":"0","block_hash":"0x0000000000000000000000000000000000000000000000000000000000000000","transactions":[],"withdrawals":[]},"signature":"0x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f0000000000000000000000000000000000000000000000000000000000000000"}}`, }, + { + name: "DenebNoData", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + }, + res: `ERR: json: error calling MarshalJSON for type *spec.VersionedSubmitBlockRequest: no deneb data`, + }, + { + name: "DenebGood", + request: &spec.VersionedSubmitBlockRequest{ + Version: consensusspec.DataVersionDeneb, + Deneb: &deneb.SubmitBlockRequest{ + Message: &v1.BidTrace{ + Slot: 123, + Value: uint256.NewInt(12345), + }, + ExecutionPayload: &consensusdeneb.ExecutionPayload{ + ParentHash: phase0.Hash32{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + }, + BaseFeePerGas: uint256.NewInt(0), + Withdrawals: make([]*consensuscapella.Withdrawal, 0), + }, + BlobsBundle: &deneb.BlobsBundle{ + Commitments: make([]consensusdeneb.KzgCommitment, 0), + Proofs: make([]consensusdeneb.KzgProof, 0), + Blobs: make([]consensusdeneb.Blob, 0), + }, + Signature: phase0.BLSSignature{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + }, + }, + }, + res: `{"version":"deneb","data":{"message":{"slot":"123","parent_hash":"0x0000000000000000000000000000000000000000000000000000000000000000","block_hash":"0x0000000000000000000000000000000000000000000000000000000000000000","builder_pubkey":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","proposer_pubkey":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","proposer_fee_recipient":"0x0000000000000000000000000000000000000000","gas_limit":"0","gas_used":"0","value":"12345"},"execution_payload":{"parent_hash":"0x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f","fee_recipient":"0x0000000000000000000000000000000000000000","state_root":"0x0000000000000000000000000000000000000000000000000000000000000000","receipts_root":"0x0000000000000000000000000000000000000000000000000000000000000000","logs_bloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","prev_randao":"0x0000000000000000000000000000000000000000000000000000000000000000","block_number":"0","gas_limit":"0","gas_used":"0","timestamp":"0","extra_data":"0x","base_fee_per_gas":"0","block_hash":"0x0000000000000000000000000000000000000000000000000000000000000000","transactions":[],"withdrawals":[],"data_gas_used":"0","excess_data_gas":"0"},"blobs_bundle":{"commitments":[],"proofs":[],"blobs":[]},"signature":"0x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f0000000000000000000000000000000000000000000000000000000000000000"}}`, + }, } for _, test := range tests {