Parallel transaction execution with BALs#9182
Conversation
a84593b to
692e22b
Compare
76a8434 to
de48b8c
Compare
EVM Opcode Benchmark DiffAggregated runs: base=1, pr=1 No significant regressions or improvements detected. |
|
@Marchhill let me handle last few open comments |
Thanks but I think all addressed now except for |
- BlockAccessListManager: hybrid wrap of parallel-worker exceptions — InvalidTransactionException re-wrapped (preserving Reason), plain InvalidBlockException re-wrapped, others rethrown via ExceptionDispatchInfo - BlockCachePreWarmer: extract ShouldPreWarm/IsBalReadWarmingEnabled and WarmupTransactionAddresses/WarmupBalAccountAt helpers - Engine module tests: parametrize EngineModuleTests + AuRaMergeEngineModuleTests with [TestFixture(true)]/[TestFixture(false)], delete Sequential* derived classes
|
@claude re-review |
|
Claude finished @benaadams's task in 6m 30s —— View job Re-Review: Parallel Transaction Execution with BALs
Fixed Since April 20 Re-Review
New IssueMedium — Thread-pool thread leak when non-
|
- ParallelBlockValidationTransactionsExecutor now composes an inner IBlockProcessor.IBlockTransactionsExecutor instead of inheriting from BlockValidationTransactionsExecutor; BAL-disabled path delegates to inner - BlockProcessingModule wires inner via AddDecorator (matches the SimulateBlockValidationTransactionsExecutor pattern) - ThrowInvalidTransactionException protected -> internal so the decorator reuses it instead of duplicating - Fix thread-pool hang when a non-InvalidBlockException escapes the parallel worker: TrySetCanceled the gasResults slot before rethrowing so IncrementalValidation unblocks; wrap parallel-for in try/catch that observes the background task before propagating the original exception Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@claude re-review. Everything with TODO's is out of scope of this PR and will be done in next ones |
|
Claude finished @LukaszRozmej's task in 6m 9s —— View job Re-Review: Parallel Transaction Execution with BALs
|
Distinguish self-induced TaskCanceledException (from worker TrySetCanceled, pure noise) from any other independent secondary fault in IncrementalValidation (BAL validator, gas check, etc.) — the latter is logged at Error since the original parallel-for exception is what we rethrow, so this branch is the only place the secondary fault is observable. Adds ILogManager ctor param; test sites pass LimboLogs.Instance. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- BranchProcessor.ShouldPreWarmOrBatchRead -> ShouldSkipPreWarming. Old name implied "do prewarm/batch-read"; method actually returns true when prewarming should be skipped. Comment also rewritten to describe the BAL batch-read carve-out for tiny blocks. - BlockAccessListManager._lastLoadedBal: add field comment explaining the guard prevents double-mutation of the suggested block's BAL by LoadPreStateToSuggestedBlockAccessList (which appends -1 prestate entries in place) when PrepareForProcessing is re-invoked for the same block within the same DI scope (manager is scoped to the main processing context, not per block). Three prior reviews mistook the field for dead code. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
BranchProcessor was duplicating the BAL read-warming predicate (_parallelExecutionBatchRead && spec.BlockLevelAccessListsEnabled) that already lives in BlockCachePreWarmer. Expose IsBalReadWarmingEnabled on IBlockCachePreWarmer so BranchProcessor can ask rather than re-derive, and split ShouldSkipPreWarming into two helpers — one for the tx-count + BAL carve-out, one delegating the spec/config check to the prewarmer. Drops the now-unused IBlocksConfig ctor dep and _parallelExecutionBatchRead field from BranchProcessor; test sites adjusted. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@claude one more review |
|
Claude finished @LukaszRozmej's task in 7m 6s —— View job Re-Review: Parallel Transaction Execution with BALs
Fixed Since April 27 13:07 Review
Minor Issues1.
|
…t.Restore - Remove BlockValidationTransactionsExecutor.SetBlockAccessListManager (virtual no-op, never called, not on the IBlockTransactionsExecutor interface) and the corresponding NotImplementedException stub on SimulateBlockValidationTransactionsExecutor. - BlockAccessList.Restore: balance branch was the odd one out using change.BlockAccessIndex while code/nonce/storage all use Index. They are equal at restore time (snapshot/restore is per-tx, Index doesn't change between them), so normalize to Index for consistency. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@claude one more review |
|
Claude finished @LukaszRozmej's task in 3m 31s —— View job Re-Review: Parallel Transaction Execution with BALs
Fixed Since April 27 13:40 ReviewAll two minor items from that review are confirmed fixed:
Acknowledged TODOs (out of scope per LukaszRozmej)These items persist but are explicitly deferred to follow-up PRs:
No New Issues FoundThis pass found no new correctness, safety, or performance concerns beyond the acknowledged TODOs. Overall AssessmentAll blocking and minor items raised across multiple review rounds are now resolved. The two items fixed in today's commits ( |

Depends on BALs #9114
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Documentation
Requires documentation update
Requires explanation in Release Notes