fix: require full block_size validations before scheduler completion#510
Open
datnguyencse wants to merge 2 commits into
Open
fix: require full block_size validations before scheduler completion#510datnguyencse wants to merge 2 commits into
datnguyencse wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the thread exit condition in crates/pevm/src/scheduler.rs to require all transactions to be validated before any thread exits. This ensures that tail transactions requiring re-execution do not run on a shrinking thread pool. There are no review comments to address.
Contributor
|
benchmark |
|
✅ Gigagas benchmark for commit 393e96d Detail |
|
✅ Mainnet benchmark for commit 393e96d This pr: Detail |
Contributor
|
benchmark |
|
✅ Gigagas benchmark for commit 393e96d Detail |
|
✅ Mainnet benchmark for commit 393e96d This pr: Detail |
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.
With NeedValidation = 1 (distinct bit values), lazy and first transactions
auto-validate in finish_execution, incrementing num_validated without going
through the validation queue. This left min_validation_idx > 0, making the
completion threshold block_size - min_validation_idx < block_size.
Threads could exit as soon as that lower threshold was met, while the
remaining high-conflict non-lazy tail transactions were still mid
re-execution. Those transactions then ran with a shrinking thread pool,
degrading parallelism on contentious workloads.
Fix: require num_validated >= block_size unconditionally. Auto-validations
still count toward the total, so pure lazy blocks are unaffected; all
threads now stay alive until every transaction's conflict resolution is
complete.
Benchmark: