Skip to content

fix(flashblocks): gracefull cancellation on payload build failure#239

Merged
avalonche merged 1 commit intoflashbots:mainfrom
julio4:fix/flashblocks-payload-building-cancellation
Sep 11, 2025
Merged

fix(flashblocks): gracefull cancellation on payload build failure#239
avalonche merged 1 commit intoflashbots:mainfrom
julio4:fix/flashblocks-payload-building-cancellation

Conversation

@julio4
Copy link
Member

@julio4 julio4 commented Aug 15, 2025

📝 Summary

Close #209

Within a payload building job in flashblocks mode, we sequentially build flashblocks and a timer task coordinate timing of building these flashblocks. When a flashblock building fails, the whole payload building job fails and we need to gracefully shutdown all tasks related to this job. This is implemented by cancelling the payload building job cancellation token on flashblock building error, which correctly signal to the associated timer task to shutdown itself.

  • Also fix channel variable names

💡 Motivation and Context

The channel between timer task to coordinate flashblock building was not gracefully shutdown when payload building fail, causing unwanted error and logs.


✅ I have completed the following steps:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

@SozinM
Copy link
Collaborator

SozinM commented Aug 27, 2025

I think with this we still won't get insight into the error we got

@julio4
Copy link
Member Author

julio4 commented Aug 27, 2025

I think with this we still won't get insight into the error we got

We do log the error here

@avalonche avalonche merged commit 7403f95 into flashbots:main Sep 11, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error logging on payload build failure and graceful cancellation token handling

3 participants