Skip to content

Commit b9deabb

Browse files
authored
Execution API: Support blobs_bundle_v2 for PeerDAS (#15167)
* Execution api: add and use blobs_bundle_v2 * Execution bundle fulu can unmarshal * Manus feedback and fix execution request decode
1 parent 5d66a98 commit b9deabb

18 files changed

+727
-77
lines changed

beacon-chain/execution/engine_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ func (s *Service) ForkchoiceUpdated(
275275
func getPayloadMethodAndMessage(slot primitives.Slot) (string, proto.Message) {
276276
pe := slots.ToEpoch(slot)
277277
if pe >= params.BeaconConfig().FuluForkEpoch {
278-
return GetPayloadMethodV5, &pb.ExecutionBundleElectra{}
278+
return GetPayloadMethodV5, &pb.ExecutionBundleFulu{}
279279
}
280280
if pe >= params.BeaconConfig().ElectraForkEpoch {
281281
return GetPayloadMethodV4, &pb.ExecutionBundleElectra{}

beacon-chain/execution/engine_client_test.go

Lines changed: 85 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ func TestClient_HTTP(t *testing.T) {
168168
cfg.CapellaForkEpoch = 1
169169
cfg.DenebForkEpoch = 2
170170
cfg.ElectraForkEpoch = 3
171+
cfg.FuluForkEpoch = 4
171172
params.OverrideBeaconConfig(cfg)
172173

173174
t.Run(GetPayloadMethod, func(t *testing.T) {
@@ -318,11 +319,11 @@ func TestClient_HTTP(t *testing.T) {
318319
require.DeepEqual(t, uint64(2), g)
319320

320321
commitments := [][]byte{bytesutil.PadTo([]byte("commitment1"), fieldparams.BLSPubkeyLength), bytesutil.PadTo([]byte("commitment2"), fieldparams.BLSPubkeyLength)}
321-
require.DeepEqual(t, commitments, resp.BlobsBundle.GetKzgCommitments())
322+
require.DeepEqual(t, commitments, resp.BlobsBundler.GetKzgCommitments())
322323
proofs := [][]byte{bytesutil.PadTo([]byte("proof1"), fieldparams.BLSPubkeyLength), bytesutil.PadTo([]byte("proof2"), fieldparams.BLSPubkeyLength)}
323-
require.DeepEqual(t, proofs, resp.BlobsBundle.GetProofs())
324+
require.DeepEqual(t, proofs, resp.BlobsBundler.GetProofs())
324325
blobs := [][]byte{bytesutil.PadTo([]byte("a"), fieldparams.BlobLength), bytesutil.PadTo([]byte("b"), fieldparams.BlobLength)}
325-
require.DeepEqual(t, blobs, resp.BlobsBundle.GetBlobs())
326+
require.DeepEqual(t, blobs, resp.BlobsBundler.GetBlobs())
326327
})
327328
t.Run(GetPayloadMethodV4, func(t *testing.T) {
328329
payloadId := [8]byte{1}
@@ -373,11 +374,11 @@ func TestClient_HTTP(t *testing.T) {
373374
require.DeepEqual(t, uint64(2), g)
374375

375376
commitments := [][]byte{bytesutil.PadTo([]byte("commitment1"), fieldparams.BLSPubkeyLength), bytesutil.PadTo([]byte("commitment2"), fieldparams.BLSPubkeyLength)}
376-
require.DeepEqual(t, commitments, resp.BlobsBundle.GetKzgCommitments())
377+
require.DeepEqual(t, commitments, resp.BlobsBundler.GetKzgCommitments())
377378
proofs := [][]byte{bytesutil.PadTo([]byte("proof1"), fieldparams.BLSPubkeyLength), bytesutil.PadTo([]byte("proof2"), fieldparams.BLSPubkeyLength)}
378-
require.DeepEqual(t, proofs, resp.BlobsBundle.GetProofs())
379+
require.DeepEqual(t, proofs, resp.BlobsBundler.GetProofs())
379380
blobs := [][]byte{bytesutil.PadTo([]byte("a"), fieldparams.BlobLength), bytesutil.PadTo([]byte("b"), fieldparams.BlobLength)}
380-
require.DeepEqual(t, blobs, resp.BlobsBundle.GetBlobs())
381+
require.DeepEqual(t, blobs, resp.BlobsBundler.GetBlobs())
381382
requests := &pb.ExecutionRequests{
382383
Deposits: []*pb.DepositRequest{
383384
{
@@ -406,7 +407,52 @@ func TestClient_HTTP(t *testing.T) {
406407

407408
require.DeepEqual(t, requests, resp.ExecutionRequests)
408409
})
410+
t.Run(GetPayloadMethodV5, func(t *testing.T) {
411+
payloadId := [8]byte{1}
412+
want, ok := fix["ExecutionBundleFulu"].(*pb.GetPayloadV5ResponseJson)
413+
require.Equal(t, true, ok)
414+
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
415+
w.Header().Set("Content-Type", "application/json")
416+
defer func() {
417+
require.NoError(t, r.Body.Close())
418+
}()
419+
enc, err := io.ReadAll(r.Body)
420+
require.NoError(t, err)
421+
jsonRequestString := string(enc)
422+
423+
reqArg, err := json.Marshal(pb.PayloadIDBytes(payloadId))
424+
require.NoError(t, err)
425+
426+
// We expect the JSON string RPC request contains the right arguments.
427+
require.Equal(t, true, strings.Contains(
428+
jsonRequestString, string(reqArg),
429+
))
430+
resp := map[string]interface{}{
431+
"jsonrpc": "2.0",
432+
"id": 1,
433+
"result": want,
434+
}
435+
err = json.NewEncoder(w).Encode(resp)
436+
require.NoError(t, err)
437+
}))
438+
defer srv.Close()
439+
440+
rpcClient, err := rpc.DialHTTP(srv.URL)
441+
require.NoError(t, err)
442+
defer rpcClient.Close()
409443

444+
client := &Service{}
445+
client.rpcClient = rpcClient
446+
447+
// We call the RPC method via HTTP and expect a proper result.
448+
resp, err := client.GetPayload(ctx, payloadId, 4*params.BeaconConfig().SlotsPerEpoch)
449+
require.NoError(t, err)
450+
_, ok = resp.BlobsBundler.(*pb.BlobsBundleV2)
451+
if !ok {
452+
t.Logf("resp.BlobsBundler has unexpected type: %T", resp.BlobsBundler)
453+
}
454+
require.Equal(t, ok, true)
455+
})
410456
t.Run(ForkchoiceUpdatedMethod+" VALID status", func(t *testing.T) {
411457
forkChoiceState := &pb.ForkchoiceState{
412458
HeadBlockHash: []byte("head"),
@@ -1540,6 +1586,7 @@ func fixtures() map[string]interface{} {
15401586
"ExecutionPayloadCapellaWithValue": s.ExecutionPayloadWithValueCapella,
15411587
"ExecutionPayloadDenebWithValue": s.ExecutionPayloadWithValueDeneb,
15421588
"ExecutionBundleElectra": s.ExecutionBundleElectra,
1589+
"ExecutionBundleFulu": s.ExecutionBundleFulu,
15431590
"ValidPayloadStatus": s.ValidPayloadStatus,
15441591
"InvalidBlockHashStatus": s.InvalidBlockHashStatus,
15451592
"AcceptedStatus": s.AcceptedStatus,
@@ -1775,6 +1822,36 @@ func fixturesStruct() *payloadFixtures {
17751822
append([]byte{pb.WithdrawalRequestType}, withdrawalRequestBytes...),
17761823
append([]byte{pb.ConsolidationRequestType}, consolidationRequestBytes...)},
17771824
}
1825+
executionBundleFixtureFulu := &pb.GetPayloadV5ResponseJson{
1826+
ShouldOverrideBuilder: true,
1827+
ExecutionPayload: &pb.ExecutionPayloadDenebJSON{
1828+
ParentHash: &common.Hash{'a'},
1829+
FeeRecipient: &common.Address{'b'},
1830+
StateRoot: &common.Hash{'c'},
1831+
ReceiptsRoot: &common.Hash{'d'},
1832+
LogsBloom: &hexutil.Bytes{'e'},
1833+
PrevRandao: &common.Hash{'f'},
1834+
BaseFeePerGas: "0x123",
1835+
BlockHash: &common.Hash{'g'},
1836+
Transactions: []hexutil.Bytes{{'h'}},
1837+
Withdrawals: []*pb.Withdrawal{},
1838+
BlockNumber: &hexUint,
1839+
GasLimit: &hexUint,
1840+
GasUsed: &hexUint,
1841+
Timestamp: &hexUint,
1842+
BlobGasUsed: &bgu,
1843+
ExcessBlobGas: &ebg,
1844+
},
1845+
BlockValue: "0x11fffffffff",
1846+
BlobsBundle: &pb.BlobBundleV2JSON{
1847+
Commitments: []hexutil.Bytes{[]byte("commitment1"), []byte("commitment2")},
1848+
Proofs: []hexutil.Bytes{[]byte("proof1"), []byte("proof2")},
1849+
Blobs: []hexutil.Bytes{{'a'}, {'b'}},
1850+
},
1851+
ExecutionRequests: []hexutil.Bytes{append([]byte{pb.DepositRequestType}, depositRequestBytes...),
1852+
append([]byte{pb.WithdrawalRequestType}, withdrawalRequestBytes...),
1853+
append([]byte{pb.ConsolidationRequestType}, consolidationRequestBytes...)},
1854+
}
17781855
parent := bytesutil.PadTo([]byte("parentHash"), fieldparams.RootLength)
17791856
sha3Uncles := bytesutil.PadTo([]byte("sha3Uncles"), fieldparams.RootLength)
17801857
miner := bytesutil.PadTo([]byte("miner"), fieldparams.FeeRecipientLength)
@@ -1869,6 +1946,7 @@ func fixturesStruct() *payloadFixtures {
18691946
ExecutionPayloadWithValueCapella: executionPayloadWithValueFixtureCapella,
18701947
ExecutionPayloadWithValueDeneb: executionPayloadWithValueFixtureDeneb,
18711948
ExecutionBundleElectra: executionBundleFixtureElectra,
1949+
ExecutionBundleFulu: executionBundleFixtureFulu,
18721950
ValidPayloadStatus: validStatus,
18731951
InvalidBlockHashStatus: inValidBlockHashStatus,
18741952
AcceptedStatus: acceptedStatus,
@@ -1893,6 +1971,7 @@ type payloadFixtures struct {
18931971
ExecutionPayloadWithValueCapella *pb.GetPayloadV2ResponseJson
18941972
ExecutionPayloadWithValueDeneb *pb.GetPayloadV3ResponseJson
18951973
ExecutionBundleElectra *pb.GetPayloadV4ResponseJson
1974+
ExecutionBundleFulu *pb.GetPayloadV5ResponseJson
18961975
ValidPayloadStatus *pb.PayloadStatus
18971976
InvalidBlockHashStatus *pb.PayloadStatus
18981977
AcceptedStatus *pb.PayloadStatus

beacon-chain/rpc/prysm/v1alpha1/validator/construct_generic_block.go

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package validator
33
import (
44
"fmt"
55

6+
"github.com/pkg/errors"
67
"github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces"
78
"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives"
89
enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1"
@@ -12,9 +13,13 @@ import (
1213
)
1314

1415
// constructGenericBeaconBlock constructs a `GenericBeaconBlock` based on the block version and other parameters.
15-
func (vs *Server) constructGenericBeaconBlock(sBlk interfaces.SignedBeaconBlock, blobsBundle *enginev1.BlobsBundle, winningBid primitives.Wei) (*ethpb.GenericBeaconBlock, error) {
16+
func (vs *Server) constructGenericBeaconBlock(
17+
sBlk interfaces.SignedBeaconBlock,
18+
blobsBundler enginev1.BlobsBundler,
19+
winningBid primitives.Wei,
20+
) (*ethpb.GenericBeaconBlock, error) {
1621
if sBlk == nil || sBlk.Block() == nil {
17-
return nil, fmt.Errorf("block cannot be nil")
22+
return nil, errors.New("block cannot be nil")
1823
}
1924

2025
blockProto, err := sBlk.Block().Proto()
@@ -34,12 +39,21 @@ func (vs *Server) constructGenericBeaconBlock(sBlk interfaces.SignedBeaconBlock,
3439
return vs.constructBellatrixBlock(blockProto, isBlinded, bidStr), nil
3540
case version.Capella:
3641
return vs.constructCapellaBlock(blockProto, isBlinded, bidStr), nil
37-
case version.Deneb:
38-
return vs.constructDenebBlock(blockProto, isBlinded, bidStr, blobsBundle), nil
39-
case version.Electra:
40-
return vs.constructElectraBlock(blockProto, isBlinded, bidStr, blobsBundle), nil
42+
case version.Deneb, version.Electra:
43+
bundle, ok := blobsBundler.(*enginev1.BlobsBundle)
44+
if blobsBundler != nil && !ok {
45+
return nil, fmt.Errorf("expected *BlobsBundler, got %T", blobsBundler)
46+
}
47+
if sBlk.Version() == version.Deneb {
48+
return vs.constructDenebBlock(blockProto, isBlinded, bidStr, bundle), nil
49+
}
50+
return vs.constructElectraBlock(blockProto, isBlinded, bidStr, bundle), nil
4151
case version.Fulu:
42-
return vs.constructFuluBlock(blockProto, isBlinded, bidStr, blobsBundle), nil
52+
bundle, ok := blobsBundler.(*enginev1.BlobsBundleV2)
53+
if blobsBundler != nil && !ok {
54+
return nil, fmt.Errorf("expected *BlobsBundleV2, got %T", blobsBundler)
55+
}
56+
return vs.constructFuluBlock(blockProto, isBlinded, bidStr, bundle), nil
4357
default:
4458
return nil, fmt.Errorf("unknown block version: %d", sBlk.Version())
4559
}
@@ -92,7 +106,7 @@ func (vs *Server) constructElectraBlock(blockProto proto.Message, isBlinded bool
92106
return &ethpb.GenericBeaconBlock{Block: &ethpb.GenericBeaconBlock_Electra{Electra: electraContents}, IsBlinded: false, PayloadValue: payloadValue}
93107
}
94108

95-
func (vs *Server) constructFuluBlock(blockProto proto.Message, isBlinded bool, payloadValue string, bundle *enginev1.BlobsBundle) *ethpb.GenericBeaconBlock {
109+
func (vs *Server) constructFuluBlock(blockProto proto.Message, isBlinded bool, payloadValue string, bundle *enginev1.BlobsBundleV2) *ethpb.GenericBeaconBlock {
96110
if isBlinded {
97111
return &ethpb.GenericBeaconBlock{Block: &ethpb.GenericBeaconBlock_BlindedFulu{BlindedFulu: blockProto.(*ethpb.BlindedBeaconBlockFulu)}, IsBlinded: true, PayloadValue: payloadValue}
98112
}

beacon-chain/rpc/prysm/v1alpha1/validator/construct_generic_block_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,19 @@ func TestConstructGenericBeaconBlock(t *testing.T) {
2929
require.NoError(t, err)
3030
r1, err := eb.Block.HashTreeRoot()
3131
require.NoError(t, err)
32-
result, err := vs.constructGenericBeaconBlock(b, nil, primitives.ZeroWei())
32+
bundle := &enginev1.BlobsBundleV2{
33+
KzgCommitments: [][]byte{{1, 2, 3}},
34+
Proofs: [][]byte{{4, 5, 6}},
35+
Blobs: [][]byte{{7, 8, 9}},
36+
}
37+
result, err := vs.constructGenericBeaconBlock(b, bundle, primitives.ZeroWei())
3338
require.NoError(t, err)
3439
r2, err := result.GetFulu().Block.HashTreeRoot()
3540
require.NoError(t, err)
3641
require.Equal(t, r1, r2)
3742
require.Equal(t, result.IsBlinded, false)
43+
require.DeepEqual(t, bundle.Blobs, result.GetFulu().GetBlobs())
44+
require.DeepEqual(t, bundle.Proofs, result.GetFulu().GetKzgProofs())
3845
})
3946

4047
// Test for Electra version

beacon-chain/rpc/prysm/v1alpha1/validator/proposer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func (vs *Server) BuildBlockParallel(ctx context.Context, sBlk interfaces.Signed
238238
}()
239239

240240
winningBid := primitives.ZeroWei()
241-
var bundle *enginev1.BlobsBundle
241+
var bundle enginev1.BlobsBundler
242242
if sBlk.Version() >= version.Bellatrix {
243243
local, err := vs.getLocalPayload(ctx, sBlk.Block(), head)
244244
if err != nil {
@@ -369,7 +369,7 @@ func (vs *Server) handleBlindedBlock(ctx context.Context, block interfaces.Signe
369369
}
370370

371371
if isPeerDASEnabled {
372-
dataColumnSideCars, err := peerdas.ConstructDataColumnSidecars(block, bundle.Blobs, bundle.Proofs)
372+
dataColumnSideCars, err := peerdas.ConstructDataColumnSidecars(block, bundle.GetBlobs(), bundle.GetProofs())
373373
if err != nil {
374374
return nil, nil, nil, errors.Wrap(err, "construct data column sidecars")
375375
}

beacon-chain/rpc/prysm/v1alpha1/validator/proposer_bellatrix.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const blockBuilderTimeout = 1 * time.Second
5454
const gasLimitAdjustmentFactor = 1024
5555

5656
// Sets the execution data for the block. Execution data can come from local EL client or remote builder depends on validator registration and circuit breaker conditions.
57-
func setExecutionData(ctx context.Context, blk interfaces.SignedBeaconBlock, local *blocks.GetPayloadResponse, bid builder.Bid, builderBoostFactor primitives.Gwei) (primitives.Wei, *enginev1.BlobsBundle, error) {
57+
func setExecutionData(ctx context.Context, blk interfaces.SignedBeaconBlock, local *blocks.GetPayloadResponse, bid builder.Bid, builderBoostFactor primitives.Gwei) (primitives.Wei, enginev1.BlobsBundler, error) {
5858
_, span := trace.StartSpan(ctx, "ProposerServer.setExecutionData")
5959
defer span.End()
6060

@@ -69,13 +69,13 @@ func setExecutionData(ctx context.Context, blk interfaces.SignedBeaconBlock, loc
6969

7070
// Use local payload if builder payload is nil.
7171
if bid == nil {
72-
return local.Bid, local.BlobsBundle, setLocalExecution(blk, local)
72+
return local.Bid, local.BlobsBundler, setLocalExecution(blk, local)
7373
}
7474

7575
builderPayload, err := bid.Header()
7676
if err != nil {
7777
log.WithError(err).Warn("Proposer: failed to retrieve header from BuilderBid")
78-
return local.Bid, local.BlobsBundle, setLocalExecution(blk, local)
78+
return local.Bid, local.BlobsBundler, setLocalExecution(blk, local)
7979
}
8080

8181
switch {
@@ -84,7 +84,7 @@ func setExecutionData(ctx context.Context, blk interfaces.SignedBeaconBlock, loc
8484
if err != nil {
8585
tracing.AnnotateError(span, err)
8686
log.WithError(err).Warn("Proposer: failed to match withdrawals root")
87-
return local.Bid, local.BlobsBundle, setLocalExecution(blk, local)
87+
return local.Bid, local.BlobsBundler, setLocalExecution(blk, local)
8888
}
8989

9090
// Compare payload values between local and builder. Default to the local value if it is higher.
@@ -97,7 +97,7 @@ func setExecutionData(ctx context.Context, blk interfaces.SignedBeaconBlock, loc
9797
"minBuilderBid": minBid,
9898
"builderGweiValue": builderValueGwei,
9999
}).Warn("Proposer: using local execution payload because min bid not attained")
100-
return local.Bid, local.BlobsBundle, setLocalExecution(blk, local)
100+
return local.Bid, local.BlobsBundler, setLocalExecution(blk, local)
101101
}
102102

103103
// Use local block if min difference is not attained
@@ -108,7 +108,7 @@ func setExecutionData(ctx context.Context, blk interfaces.SignedBeaconBlock, loc
108108
"minBidDiff": minDiff,
109109
"builderGweiValue": builderValueGwei,
110110
}).Warn("Proposer: using local execution payload because min difference with local value was not attained")
111-
return local.Bid, local.BlobsBundle, setLocalExecution(blk, local)
111+
return local.Bid, local.BlobsBundler, setLocalExecution(blk, local)
112112
}
113113

114114
// Use builder payload if the following in true:
@@ -133,7 +133,7 @@ func setExecutionData(ctx context.Context, blk interfaces.SignedBeaconBlock, loc
133133
bidDeneb, ok := bid.(builder.BidDeneb)
134134
if !ok {
135135
log.Warnf("bid type %T does not implement builder.BidDeneb", bid)
136-
return local.Bid, local.BlobsBundle, setLocalExecution(blk, local)
136+
return local.Bid, local.BlobsBundler, setLocalExecution(blk, local)
137137
} else {
138138
builderKzgCommitments = bidDeneb.BlobKzgCommitments()
139139
}
@@ -144,14 +144,14 @@ func setExecutionData(ctx context.Context, blk interfaces.SignedBeaconBlock, loc
144144
bidElectra, ok := bid.(builder.BidElectra)
145145
if !ok {
146146
log.Warnf("bid type %T does not implement builder.BidElectra", bid)
147-
return local.Bid, local.BlobsBundle, setLocalExecution(blk, local)
147+
return local.Bid, local.BlobsBundler, setLocalExecution(blk, local)
148148
} else {
149149
executionRequests = bidElectra.ExecutionRequests()
150150
}
151151
}
152152
if err := setBuilderExecution(blk, builderPayload, builderKzgCommitments, executionRequests); err != nil {
153153
log.WithError(err).Warn("Proposer: failed to set builder payload")
154-
return local.Bid, local.BlobsBundle, setLocalExecution(blk, local)
154+
return local.Bid, local.BlobsBundler, setLocalExecution(blk, local)
155155
} else {
156156
return bid.Value(), nil, nil
157157
}
@@ -171,11 +171,11 @@ func setExecutionData(ctx context.Context, blk interfaces.SignedBeaconBlock, loc
171171
trace.Int64Attribute("builderGweiValue", int64(builderValueGwei)), // lint:ignore uintcast -- This is OK for tracing.
172172
trace.Int64Attribute("builderBoostFactor", int64(builderBoostFactor)), // lint:ignore uintcast -- This is OK for tracing.
173173
)
174-
return local.Bid, local.BlobsBundle, setLocalExecution(blk, local)
174+
return local.Bid, local.BlobsBundler, setLocalExecution(blk, local)
175175
default: // Bellatrix case.
176176
if err := setBuilderExecution(blk, builderPayload, nil, nil); err != nil {
177177
log.WithError(err).Warn("Proposer: failed to set builder payload")
178-
return local.Bid, local.BlobsBundle, setLocalExecution(blk, local)
178+
return local.Bid, local.BlobsBundler, setLocalExecution(blk, local)
179179
} else {
180180
return bid.Value(), nil, nil
181181
}
@@ -375,8 +375,8 @@ func matchingWithdrawalsRoot(local, builder interfaces.ExecutionData) (bool, err
375375
// It delegates to setExecution for the actual work.
376376
func setLocalExecution(blk interfaces.SignedBeaconBlock, local *blocks.GetPayloadResponse) error {
377377
var kzgCommitments [][]byte
378-
if local.BlobsBundle != nil {
379-
kzgCommitments = local.BlobsBundle.KzgCommitments
378+
if local.BlobsBundler != nil {
379+
kzgCommitments = local.BlobsBundler.GetKzgCommitments()
380380
}
381381
if local.ExecutionRequests != nil {
382382
if err := blk.SetExecutionRequests(local.ExecutionRequests); err != nil {

beacon-chain/rpc/prysm/v1alpha1/validator/proposer_bellatrix_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,15 +520,15 @@ func TestServer_setExecutionData(t *testing.T) {
520520
PayloadIDBytes: id,
521521
GetPayloadResponse: &blocks.GetPayloadResponse{
522522
ExecutionData: ed,
523-
BlobsBundle: blobsBundle,
523+
BlobsBundler: blobsBundle,
524524
Bid: primitives.ZeroWei(),
525525
},
526526
}
527527
blk.SetSlot(primitives.Slot(params.BeaconConfig().DenebForkEpoch) * params.BeaconConfig().SlotsPerEpoch)
528528
res, err := vs.getLocalPayload(ctx, blk.Block(), capellaTransitionState)
529529
require.NoError(t, err)
530530
require.Equal(t, uint64(4), res.ExecutionData.BlockNumber())
531-
require.DeepEqual(t, res.BlobsBundle, blobsBundle)
531+
require.DeepEqual(t, res.BlobsBundler, blobsBundle)
532532
})
533533
t.Run("Can get builder payload and blobs in Deneb", func(t *testing.T) {
534534
cfg := params.BeaconConfig().Copy()

beacon-chain/rpc/prysm/v1alpha1/validator/proposer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ func TestServer_GetBeaconBlock_Deneb(t *testing.T) {
529529
PayloadIDBytes: &enginev1.PayloadIDBytes{1},
530530
GetPayloadResponse: &blocks.GetPayloadResponse{
531531
ExecutionData: ed,
532-
BlobsBundle: bundle,
532+
BlobsBundler: bundle,
533533
},
534534
}
535535

consensus-types/blocks/execution.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ func NewWrappedExecutionData(v proto.Message) (interfaces.ExecutionData, error)
4141
case *enginev1.ExecutionBundleElectra:
4242
// note: no payload changes in electra so using deneb
4343
return WrappedExecutionPayloadDeneb(pbStruct.Payload)
44+
case *enginev1.ExecutionBundleFulu:
45+
return WrappedExecutionPayloadDeneb(pbStruct.Payload)
4446
default:
4547
// return nil, errors.Wrapf(ErrUnsupportedVersion, "type %T", pbStruct)
4648
return nil, errs.Wrapf(ErrUnsupportedVersion, "type %T", pbStruct)

0 commit comments

Comments
 (0)