@@ -37,7 +37,7 @@ type IBeaconClient interface {
3737}
3838
3939type IRelay interface {
40- SubmitBlock (msg * boostTypes.BuilderSubmitBlockRequest ) error
40+ SubmitBlock (msg * boostTypes.BuilderSubmitBlockRequest , vd ValidatorData ) error
4141 GetValidatorForSlot (nextSlot uint64 ) (ValidatorData , error )
4242}
4343
@@ -97,7 +97,7 @@ func (b *Builder) Stop() error {
9797 return nil
9898}
9999
100- func (b * Builder ) onSealedBlock (block * types.Block , ordersClosedAt time.Time , sealedAt time.Time , commitedBundles []types.SimulatedBundle , allBundles []types.SimulatedBundle , proposerPubkey boostTypes.PublicKey , proposerFeeRecipient boostTypes. Address , proposerRegisteredGasLimit uint64 , attrs * BuilderPayloadAttributes ) error {
100+ func (b * Builder ) onSealedBlock (block * types.Block , ordersClosedAt time.Time , sealedAt time.Time , commitedBundles []types.SimulatedBundle , allBundles []types.SimulatedBundle , proposerPubkey boostTypes.PublicKey , vd ValidatorData , attrs * BuilderPayloadAttributes ) error {
101101 executableData := beacon .BlockToExecutableData (block )
102102 payload , err := executableDataToExecutionPayload (executableData )
103103 if err != nil {
@@ -118,7 +118,7 @@ func (b *Builder) onSealedBlock(block *types.Block, ordersClosedAt time.Time, se
118118 BlockHash : payload .BlockHash ,
119119 BuilderPubkey : b .builderPublicKey ,
120120 ProposerPubkey : proposerPubkey ,
121- ProposerFeeRecipient : proposerFeeRecipient ,
121+ ProposerFeeRecipient : vd . FeeRecipient ,
122122 GasLimit : executableData .GasLimit ,
123123 GasUsed : executableData .GasUsed ,
124124 Value : * value ,
@@ -137,13 +137,13 @@ func (b *Builder) onSealedBlock(block *types.Block, ordersClosedAt time.Time, se
137137 }
138138
139139 if b .dryRun {
140- err = b .validator .ValidateBuilderSubmissionV1 (& blockvalidation.BuilderBlockValidationRequest {blockSubmitReq , proposerRegisteredGasLimit })
140+ err = b .validator .ValidateBuilderSubmissionV1 (& blockvalidation.BuilderBlockValidationRequest {blockSubmitReq , vd . GasLimit })
141141 if err != nil {
142142 log .Error ("could not validate block" , "err" , err )
143143 }
144144 } else {
145145 go b .ds .ConsumeBuiltBlock (block , ordersClosedAt , sealedAt , commitedBundles , allBundles , & blockBidMsg )
146- err = b .relay .SubmitBlock (& blockSubmitReq )
146+ err = b .relay .SubmitBlock (& blockSubmitReq , vd )
147147 if err != nil {
148148 log .Error ("could not submit block" , "err" , err , "#commitedBundles" , len (commitedBundles ))
149149 return err
@@ -208,7 +208,7 @@ func (b *Builder) OnPayloadAttribute(attrs *BuilderPayloadAttributes) error {
208208 }
209209 b .slotAttrs = append (b .slotAttrs , * attrs )
210210
211- go b .runBuildingJob (b .slotCtx , proposerPubkey , vd . FeeRecipient , vd . GasLimit , attrs )
211+ go b .runBuildingJob (b .slotCtx , proposerPubkey , vd , attrs )
212212 return nil
213213}
214214
@@ -220,7 +220,7 @@ type blockQueueEntry struct {
220220 allBundles []types.SimulatedBundle
221221}
222222
223- func (b * Builder ) runBuildingJob (slotCtx context.Context , proposerPubkey boostTypes.PublicKey , feeRecipient boostTypes. Address , proposerRegisteredGasLimit uint64 , attrs * BuilderPayloadAttributes ) {
223+ func (b * Builder ) runBuildingJob (slotCtx context.Context , proposerPubkey boostTypes.PublicKey , vd ValidatorData , attrs * BuilderPayloadAttributes ) {
224224 ctx , cancel := context .WithTimeout (slotCtx , 12 * time .Second )
225225 defer cancel ()
226226
@@ -245,7 +245,7 @@ func (b *Builder) runBuildingJob(slotCtx context.Context, proposerPubkey boostTy
245245 submitBestBlock := func () {
246246 queueMu .Lock ()
247247 if queueLastSubmittedProfit .Cmp (queueBestProfit ) < 0 {
248- err := b .onSealedBlock (queueBestEntry .block , queueBestEntry .ordersCloseTime , queueBestEntry .sealedAt , queueBestEntry .commitedBundles , queueBestEntry .allBundles , proposerPubkey , feeRecipient , proposerRegisteredGasLimit , attrs )
248+ err := b .onSealedBlock (queueBestEntry .block , queueBestEntry .ordersCloseTime , queueBestEntry .sealedAt , queueBestEntry .commitedBundles , queueBestEntry .allBundles , proposerPubkey , vd , attrs )
249249
250250 if err != nil {
251251 log .Error ("could not run sealed block hook" , "err" , err )
0 commit comments