@@ -136,13 +136,15 @@ func (b *Builder) Stop() error {
136
136
return nil
137
137
}
138
138
139
- func (b * Builder ) onSealedBlock (block * types.Block , blockValue * big.Int , ordersClosedAt time.Time , sealedAt time.Time , commitedBundles []types.SimulatedBundle , allBundles []types.SimulatedBundle , proposerPubkey boostTypes.PublicKey , vd ValidatorData , attrs * types.BuilderPayloadAttributes ) error {
139
+ func (b * Builder ) onSealedBlock (block * types.Block , blockValue * big.Int , ordersClosedAt time.Time , sealedAt time.Time ,
140
+ commitedBundles []types.SimulatedBundle , allBundles []types.SimulatedBundle , usedSbundles []types.UsedSBundle ,
141
+ proposerPubkey boostTypes.PublicKey , vd ValidatorData , attrs * types.BuilderPayloadAttributes ) error {
140
142
if b .eth .Config ().IsShanghai (block .Time ()) {
141
- if err := b .submitCapellaBlock (block , blockValue , ordersClosedAt , sealedAt , commitedBundles , allBundles , proposerPubkey , vd , attrs ); err != nil {
143
+ if err := b .submitCapellaBlock (block , blockValue , ordersClosedAt , sealedAt , commitedBundles , allBundles , usedSbundles , proposerPubkey , vd , attrs ); err != nil {
142
144
return err
143
145
}
144
146
} else {
145
- if err := b .submitBellatrixBlock (block , blockValue , ordersClosedAt , sealedAt , commitedBundles , allBundles , proposerPubkey , vd , attrs ); err != nil {
147
+ if err := b .submitBellatrixBlock (block , blockValue , ordersClosedAt , sealedAt , commitedBundles , allBundles , usedSbundles , proposerPubkey , vd , attrs ); err != nil {
146
148
return err
147
149
}
148
150
}
@@ -152,7 +154,9 @@ func (b *Builder) onSealedBlock(block *types.Block, blockValue *big.Int, ordersC
152
154
return nil
153
155
}
154
156
155
- func (b * Builder ) submitBellatrixBlock (block * types.Block , blockValue * big.Int , ordersClosedAt time.Time , sealedAt time.Time , commitedBundles []types.SimulatedBundle , allBundles []types.SimulatedBundle , proposerPubkey boostTypes.PublicKey , vd ValidatorData , attrs * types.BuilderPayloadAttributes ) error {
157
+ func (b * Builder ) submitBellatrixBlock (block * types.Block , blockValue * big.Int , ordersClosedAt time.Time , sealedAt time.Time ,
158
+ commitedBundles []types.SimulatedBundle , allBundles []types.SimulatedBundle , usedSbundles []types.UsedSBundle ,
159
+ proposerPubkey boostTypes.PublicKey , vd ValidatorData , attrs * types.BuilderPayloadAttributes ) error {
156
160
executableData := engine .BlockToExecutableData (block , blockValue )
157
161
payload , err := executableDataToExecutionPayload (executableData .ExecutionPayload )
158
162
if err != nil {
@@ -197,7 +201,7 @@ func (b *Builder) submitBellatrixBlock(block *types.Block, blockValue *big.Int,
197
201
log .Error ("could not validate bellatrix block" , "err" , err )
198
202
}
199
203
} else {
200
- go b .ds .ConsumeBuiltBlock (block , blockValue , ordersClosedAt , sealedAt , commitedBundles , allBundles , & blockBidMsg )
204
+ go b .ds .ConsumeBuiltBlock (block , blockValue , ordersClosedAt , sealedAt , commitedBundles , allBundles , usedSbundles , & blockBidMsg )
201
205
err = b .relay .SubmitBlock (& blockSubmitReq , vd )
202
206
if err != nil {
203
207
log .Error ("could not submit bellatrix block" , "err" , err , "#commitedBundles" , len (commitedBundles ))
@@ -210,7 +214,9 @@ func (b *Builder) submitBellatrixBlock(block *types.Block, blockValue *big.Int,
210
214
return nil
211
215
}
212
216
213
- func (b * Builder ) submitCapellaBlock (block * types.Block , blockValue * big.Int , ordersClosedAt time.Time , sealedAt time.Time , commitedBundles []types.SimulatedBundle , allBundles []types.SimulatedBundle , proposerPubkey boostTypes.PublicKey , vd ValidatorData , attrs * types.BuilderPayloadAttributes ) error {
217
+ func (b * Builder ) submitCapellaBlock (block * types.Block , blockValue * big.Int , ordersClosedAt time.Time , sealedAt time.Time ,
218
+ commitedBundles []types.SimulatedBundle , allBundles []types.SimulatedBundle , usedSbundles []types.UsedSBundle ,
219
+ proposerPubkey boostTypes.PublicKey , vd ValidatorData , attrs * types.BuilderPayloadAttributes ) error {
214
220
executableData := engine .BlockToExecutableData (block , blockValue )
215
221
payload , err := executableDataToCapellaExecutionPayload (executableData .ExecutionPayload )
216
222
if err != nil {
@@ -260,7 +266,7 @@ func (b *Builder) submitCapellaBlock(block *types.Block, blockValue *big.Int, or
260
266
log .Error ("could not validate block for capella" , "err" , err )
261
267
}
262
268
} else {
263
- go b .ds .ConsumeBuiltBlock (block , blockValue , ordersClosedAt , sealedAt , commitedBundles , allBundles , & boostBidTrace )
269
+ go b .ds .ConsumeBuiltBlock (block , blockValue , ordersClosedAt , sealedAt , commitedBundles , allBundles , usedSbundles , & boostBidTrace )
264
270
err = b .relay .SubmitBlockCapella (& blockSubmitReq , vd )
265
271
if err != nil {
266
272
log .Error ("could not submit capella block" , "err" , err , "#commitedBundles" , len (commitedBundles ))
@@ -330,6 +336,7 @@ type blockQueueEntry struct {
330
336
sealedAt time.Time
331
337
commitedBundles []types.SimulatedBundle
332
338
allBundles []types.SimulatedBundle
339
+ usedSbundles []types.UsedSBundle
333
340
}
334
341
335
342
func (b * Builder ) runBuildingJob (slotCtx context.Context , proposerPubkey boostTypes.PublicKey , vd ValidatorData , attrs * types.BuilderPayloadAttributes ) {
@@ -356,7 +363,8 @@ func (b *Builder) runBuildingJob(slotCtx context.Context, proposerPubkey boostTy
356
363
submitBestBlock := func () {
357
364
queueMu .Lock ()
358
365
if queueBestEntry .block .Hash () != queueLastSubmittedHash {
359
- err := b .onSealedBlock (queueBestEntry .block , queueBestEntry .blockValue , queueBestEntry .ordersCloseTime , queueBestEntry .sealedAt , queueBestEntry .commitedBundles , queueBestEntry .allBundles , proposerPubkey , vd , attrs )
366
+ err := b .onSealedBlock (queueBestEntry .block , queueBestEntry .blockValue , queueBestEntry .ordersCloseTime , queueBestEntry .sealedAt ,
367
+ queueBestEntry .commitedBundles , queueBestEntry .allBundles , queueBestEntry .usedSbundles , proposerPubkey , vd , attrs )
360
368
361
369
if err != nil {
362
370
log .Error ("could not run sealed block hook" , "err" , err )
@@ -371,7 +379,8 @@ func (b *Builder) runBuildingJob(slotCtx context.Context, proposerPubkey boostTy
371
379
go runResubmitLoop (ctx , b .limiter , queueSignal , submitBestBlock )
372
380
373
381
// Populates queue with submissions that increase block profit
374
- blockHook := func (block * types.Block , blockValue * big.Int , ordersCloseTime time.Time , commitedBundles []types.SimulatedBundle , allBundles []types.SimulatedBundle ) {
382
+ blockHook := func (block * types.Block , blockValue * big.Int , ordersCloseTime time.Time ,
383
+ commitedBundles []types.SimulatedBundle , allBundles []types.SimulatedBundle , usedSbundles []types.UsedSBundle ) {
375
384
if ctx .Err () != nil {
376
385
return
377
386
}
@@ -388,6 +397,7 @@ func (b *Builder) runBuildingJob(slotCtx context.Context, proposerPubkey boostTy
388
397
sealedAt : sealedAt ,
389
398
commitedBundles : commitedBundles ,
390
399
allBundles : allBundles ,
400
+ usedSbundles : usedSbundles ,
391
401
}
392
402
393
403
select {
0 commit comments