refactor: wire presim through flashpool#499
Merged
Merged
Conversation
f61b274 to
dd34175
Compare
avalonche
reviewed
May 8, 2026
avalonche
approved these changes
May 8, 2026
Collaborator
avalonche
left a comment
There was a problem hiding this comment.
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
Contributor
Author
this is a bit involved, will definitely do in a follow up |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
Refactor the presim startup so that it starts with the pool. Also hook into the
add_transactionfunction 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:
make lintmake test