Skip to content

refactor: wire presim through flashpool#499

Merged
akundaz merged 1 commit into
mainfrom
ash-ltrvspmypmkn
May 8, 2026
Merged

refactor: wire presim through flashpool#499
akundaz merged 1 commit into
mainfrom
ash-ltrvspmypmkn

Conversation

@akundaz
Copy link
Copy Markdown
Contributor

@akundaz akundaz commented May 7, 2026

📝 Summary

Refactor the presim startup so that it starts with the pool. Also hook into the add_transaction function to rework the presim lifecycle. Previously, txs would be added to the pool and the background presim task would remove them if the tx reverted, now we run the presim task and then add it to the pool if it succeeds. This is now possible because we access the transaction validator from the inner pool and use it to run the several quick checks first.

💡 Motivation and Context

Presim should be managed closer to the pool.


✅ I have completed the following steps:

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

@akundaz akundaz self-assigned this May 7, 2026
@akundaz akundaz force-pushed the ash-ltrvspmypmkn branch 3 times, most recently from f61b274 to dd34175 Compare May 7, 2026 23:41
Comment thread crates/op-rbuilder/src/pool/overrides.rs Outdated
@akundaz akundaz force-pushed the ash-ltrvspmypmkn branch from dd34175 to dbb609a Compare May 8, 2026 19:42
Copy link
Copy Markdown
Collaborator

@avalonche avalonche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tokio::task::spawn_blocking() in pool/presim.rs uses Tokio's shared blocking pool which is used by the block building pipeline and can starve resources for block building - consider bounding the number of concurrent presim processes or have its own dedicated threads in a different pool

@akundaz akundaz merged commit d89d5e7 into main May 8, 2026
4 checks passed
@akundaz akundaz deleted the ash-ltrvspmypmkn branch May 8, 2026 20:08
@akundaz
Copy link
Copy Markdown
Contributor Author

akundaz commented May 8, 2026

tokio::task::spawn_blocking() in pool/presim.rs uses Tokio's shared blocking pool which is used by the block building pipeline and can starve resources for block building - consider bounding the number of concurrent presim processes or have its own dedicated threads in a different pool

this is a bit involved, will definitely do in a follow up

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.

2 participants