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. |
This reverts commit 59f76a7.
* Move cumulative gas tracking from tracer to TransactionProcessor
Track cumulative regular and receipt gas as fields on
TransactionProcessorBase, removing the IBlockGasAccountingTracer cast
from ValidateGas. This decouples transaction validation from the
tracing infrastructure.
- Add _blockCumulativeRegularGas and _blockCumulativeReceiptGas fields
- Reset in SetBlockExecutionContext, update after each validated tx
- Remove ITxTracer parameter from ValidateGas and ValidateStatic
- Update SystemTransactionProcessor, Taiko, and Xdc overrides
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix
* cleanup
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Ben {chmark} Adams <thundercat@illyriad.co.uk>
# Conflicts: # src/Nethermind/Nethermind.Evm/TransactionProcessing/TransactionProcessor.cs
|
@claude review |
|
Claude finished @Marchhill's task in 4m 16s —— View job Code Review: Parallel Transaction Execution with BALs
Status Since Last Re-Review (April 16 01:37)Good progress. Several items from the previous review are confirmed fixed:
Still OpenHigh — Hot-path allocations1.
!Enumerable.SequenceEqual(generatedHead.Value.SlotChanges, suggestedHead.Value.SlotChanges)Both sides are 2.
accountChanges.SlotChangesAtIndex(index),
Issues #1 and #2 are coupled. The root fix: remove Medium3.
private Hash256 _lastLoadedBal = Hash256.Zero;
...
if (ParallelExecutionEnabled && suggestedBlock.Hash != _lastLoadedBal)
{
_lastLoadedBal = suggestedBlock.Hash;
LoadPreStateToSuggestedBlockAccessList(suggestedBlock.BlockAccessList);
}
4. N
5.
6.
// Find largest key < blockAccessIndex using binary search
int pos = _balanceChanges.Keys.BinarySearch(blockAccessIndex);
int idx = (pos < 0 ? ~pos : pos) - 1;
return idx >= 0 ? _balanceChanges.Values[idx].PostBalance : null;Minor7.
lastValue.ToBigEndian(tmp);
return [.. tmp.WithoutLeadingZeros()]; // still allocatesThe stackalloc is good — one allocation down from two. 8.
9.
10. Both processor managers allocated unconditionally
Overall AssessmentThe PR continues to improve. The |
|
@claude since all open comments will be resolved in future todos the PR is ready for human review |
|
Claude finished @Marchhill's task in 2m 4s —— View job PR Readiness Summary for Human Review
Marc has confirmed that outstanding items will be tracked as future todos. Here is the current state of what remains open, to help human reviewers calibrate: Still Open (Tracked as Future Todos)Hot-path allocations in
N
What Has Been Fixed Through Multiple Review Rounds
Overall AssessmentThe PR is in materially better shape than at the first review — the correctness blockers are resolved, parallel execution defaults to off, and there is meaningful test coverage through |
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