@@ -183,13 +183,15 @@ func (b *Builder) Stop() error {
183183 return nil
184184}
185185
186- func (b * Builder ) onSealedBlock (block * types.Block , blockValue * big.Int , ordersClosedAt , sealedAt time.Time , commitedBundles , allBundles []types.SimulatedBundle , proposerPubkey boostTypes.PublicKey , vd ValidatorData , attrs * types.BuilderPayloadAttributes ) error {
186+ func (b * Builder ) onSealedBlock (block * types.Block , blockValue * big.Int , ordersClosedAt , sealedAt time.Time ,
187+ commitedBundles , allBundles []types.SimulatedBundle , usedSbundles []types.UsedSBundle ,
188+ proposerPubkey boostTypes.PublicKey , vd ValidatorData , attrs * types.BuilderPayloadAttributes ) error {
187189 if b .eth .Config ().IsShanghai (block .Time ()) {
188- if err := b .submitCapellaBlock (block , blockValue , ordersClosedAt , sealedAt , commitedBundles , allBundles , proposerPubkey , vd , attrs ); err != nil {
190+ if err := b .submitCapellaBlock (block , blockValue , ordersClosedAt , sealedAt , commitedBundles , allBundles , usedSbundles , proposerPubkey , vd , attrs ); err != nil {
189191 return err
190192 }
191193 } else {
192- if err := b .submitBellatrixBlock (block , blockValue , ordersClosedAt , sealedAt , commitedBundles , allBundles , proposerPubkey , vd , attrs ); err != nil {
194+ if err := b .submitBellatrixBlock (block , blockValue , ordersClosedAt , sealedAt , commitedBundles , allBundles , usedSbundles , proposerPubkey , vd , attrs ); err != nil {
193195 return err
194196 }
195197 }
@@ -200,7 +202,9 @@ func (b *Builder) onSealedBlock(block *types.Block, blockValue *big.Int, ordersC
200202 return nil
201203}
202204
203- func (b * Builder ) submitBellatrixBlock (block * types.Block , blockValue * big.Int , ordersClosedAt , sealedAt time.Time , commitedBundles , allBundles []types.SimulatedBundle , proposerPubkey boostTypes.PublicKey , vd ValidatorData , attrs * types.BuilderPayloadAttributes ) error {
205+ func (b * Builder ) submitBellatrixBlock (block * types.Block , blockValue * big.Int , ordersClosedAt , sealedAt time.Time ,
206+ commitedBundles , allBundles []types.SimulatedBundle , usedSbundles []types.UsedSBundle ,
207+ proposerPubkey boostTypes.PublicKey , vd ValidatorData , attrs * types.BuilderPayloadAttributes ) error {
204208 executableData := engine .BlockToExecutableData (block , blockValue )
205209 payload , err := executableDataToExecutionPayload (executableData .ExecutionPayload )
206210 if err != nil {
@@ -245,7 +249,7 @@ func (b *Builder) submitBellatrixBlock(block *types.Block, blockValue *big.Int,
245249 log .Error ("could not validate bellatrix block" , "err" , err )
246250 }
247251 } else {
248- go b .ds .ConsumeBuiltBlock (block , blockValue , ordersClosedAt , sealedAt , commitedBundles , allBundles , & blockBidMsg )
252+ go b .ds .ConsumeBuiltBlock (block , blockValue , ordersClosedAt , sealedAt , commitedBundles , allBundles , usedSbundles , & blockBidMsg )
249253 err = b .relay .SubmitBlock (& blockSubmitReq , vd )
250254 if err != nil {
251255 log .Error ("could not submit bellatrix block" , "err" , err , "#commitedBundles" , len (commitedBundles ))
@@ -258,7 +262,9 @@ func (b *Builder) submitBellatrixBlock(block *types.Block, blockValue *big.Int,
258262 return nil
259263}
260264
261- func (b * Builder ) submitCapellaBlock (block * types.Block , blockValue * big.Int , ordersClosedAt , sealedAt time.Time , commitedBundles , allBundles []types.SimulatedBundle , proposerPubkey boostTypes.PublicKey , vd ValidatorData , attrs * types.BuilderPayloadAttributes ) error {
265+ func (b * Builder ) submitCapellaBlock (block * types.Block , blockValue * big.Int , ordersClosedAt , sealedAt time.Time ,
266+ commitedBundles , allBundles []types.SimulatedBundle , usedSbundles []types.UsedSBundle ,
267+ proposerPubkey boostTypes.PublicKey , vd ValidatorData , attrs * types.BuilderPayloadAttributes ) error {
262268 executableData := engine .BlockToExecutableData (block , blockValue )
263269 payload , err := executableDataToCapellaExecutionPayload (executableData .ExecutionPayload )
264270 if err != nil {
@@ -308,7 +314,7 @@ func (b *Builder) submitCapellaBlock(block *types.Block, blockValue *big.Int, or
308314 log .Error ("could not validate block for capella" , "err" , err )
309315 }
310316 } else {
311- go b .ds .ConsumeBuiltBlock (block , blockValue , ordersClosedAt , sealedAt , commitedBundles , allBundles , & boostBidTrace )
317+ go b .ds .ConsumeBuiltBlock (block , blockValue , ordersClosedAt , sealedAt , commitedBundles , allBundles , usedSbundles , & boostBidTrace )
312318 err = b .relay .SubmitBlockCapella (& blockSubmitReq , vd )
313319 if err != nil {
314320 log .Error ("could not submit capella block" , "err" , err , "#commitedBundles" , len (commitedBundles ))
@@ -375,6 +381,7 @@ type blockQueueEntry struct {
375381 sealedAt time.Time
376382 commitedBundles []types.SimulatedBundle
377383 allBundles []types.SimulatedBundle
384+ usedSbundles []types.UsedSBundle
378385}
379386
380387func (b * Builder ) runBuildingJob (slotCtx context.Context , proposerPubkey boostTypes.PublicKey , vd ValidatorData , attrs * types.BuilderPayloadAttributes ) {
@@ -401,7 +408,8 @@ func (b *Builder) runBuildingJob(slotCtx context.Context, proposerPubkey boostTy
401408 submitBestBlock := func () {
402409 queueMu .Lock ()
403410 if queueBestEntry .block .Hash () != queueLastSubmittedHash {
404- err := b .onSealedBlock (queueBestEntry .block , queueBestEntry .blockValue , queueBestEntry .ordersCloseTime , queueBestEntry .sealedAt , queueBestEntry .commitedBundles , queueBestEntry .allBundles , proposerPubkey , vd , attrs )
411+ err := b .onSealedBlock (queueBestEntry .block , queueBestEntry .blockValue , queueBestEntry .ordersCloseTime , queueBestEntry .sealedAt ,
412+ queueBestEntry .commitedBundles , queueBestEntry .allBundles , queueBestEntry .usedSbundles , proposerPubkey , vd , attrs )
405413
406414 if err != nil {
407415 log .Error ("could not run sealed block hook" , "err" , err )
@@ -422,7 +430,7 @@ func (b *Builder) runBuildingJob(slotCtx context.Context, proposerPubkey boostTy
422430
423431 // Populates queue with submissions that increase block profit
424432 blockHook := func (block * types.Block , blockValue * big.Int , ordersCloseTime time.Time ,
425- committedBundles , allBundles []types.SimulatedBundle ,
433+ committedBundles , allBundles []types.SimulatedBundle , usedSbundles []types. UsedSBundle ,
426434 ) {
427435 if ctx .Err () != nil {
428436 return
@@ -440,6 +448,7 @@ func (b *Builder) runBuildingJob(slotCtx context.Context, proposerPubkey boostTy
440448 sealedAt : sealedAt ,
441449 commitedBundles : committedBundles ,
442450 allBundles : allBundles ,
451+ usedSbundles : usedSbundles ,
443452 }
444453
445454 select {
0 commit comments