Repository navigation
core: implement parallel block execution with BAL - #35264
Merged
MariusVanDerWijden merged 1 commit intoJul 28, 2026
Merged
Conversation
rjl493456442
commented
Jul 1, 2026
rjl493456442
force-pushed
the
parallel-execution
branch
3 times, most recently
from
July 6, 2026 01:39
bca6fc5 to
b67888a
Compare
rjl493456442
force-pushed
the
parallel-execution
branch
4 times, most recently
from
July 21, 2026 04:16
014cd9d to
a2f3f6c
Compare
Comment on lines
+112
to
+124
| // CumulativeRegular returns the cumulative regular-dimension gas consumed | ||
| // (EIP-8037). It is used to derive the block gas used when transactions are | ||
| // charged against independent pools during parallel execution. | ||
| func (gp *GasPool) CumulativeRegular() uint64 { | ||
| return gp.cumulativeRegular | ||
| } | ||
|
|
||
| // CumulativeState returns the cumulative state-dimension gas consumed | ||
| // (EIP-8037). See CumulativeRegular for the rationale. | ||
| func (gp *GasPool) CumulativeState() uint64 { | ||
| return gp.cumulativeState | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
Should we move this together?
cRegular, cState := gp.Cumulative()
Member
Author
There was a problem hiding this comment.
We also have CumulativeUsed. Unifying the regular and state as Cumulative is a bit vague and let's improve the naming of GasPool in a following PR.
MariusVanDerWijden
approved these changes
Jul 23, 2026
MariusVanDerWijden
left a comment
Member
There was a problem hiding this comment.
LGTM, I let some fuzzer run to try to find a diff, but they passed perfectly. Some small nitpicks
rjl493456442
force-pushed
the
parallel-execution
branch
from
July 25, 2026 05:55
dd9b410 to
6611a0b
Compare
rjl493456442
force-pushed
the
parallel-execution
branch
from
July 28, 2026 03:09
6611a0b to
c776d3c
Compare
jimmyc256
pushed a commit
to Lambda256/go-ethereum-ralim
that referenced
this pull request
Sep 23, 2026
This PR implements the parallel block executor, with the execution pre-state derived from the block-level access list.
simonlechner
added a commit
to 0xsoniclabs/go-ethereum
that referenced
this pull request
Nov 2, 2026
A hook can be lost in an upstream rebase while the tree still compiles: a nil-interceptor early return disappears in a conflict resolution, a config guard is dropped when upstream restructures the surrounding function, a new return path bypasses a code-size check. Upstream's own test suite cannot catch any of it, because it runs with a zero-valued vm.Config where every Sonic hook is inert by design. Each test in the suite flips one hook and asserts that observable behavior changes, so an inert hook fails a test. On top of the behavioral tests, sonic_hook_registry_test.go pins the vm.Config and vm.EVM field sets, asserts the number of reference sites per hook, and checks that every hook still has a pinning test and that the make target still selects it. SONIC_HOOKS.md documents the inventory, the upstream behavior Sonic depends on, the known limitations, and the rule: after any upstream rebase, `make test-sonic-hooks` must pass before the branch is mergeable. Ported to v1.17.5. Four registry entries changed, justified here as the registry requires: - vm.EVM gained the upstream field arena (*stackArena), now listed in upstreamEvmFields. - EVM.CheckCodeSize is expected 3 times rather than once, because upstream splits the max-code-size check across the EIP-4762, Amsterdam and default branches of initNewContract. - The two StateDB.EmitLogsForBurnAccounts census entries and the tests pinning them are dropped. That hook was upstream v1.17.2 behavior Sonic depended on rather than a Sonic modification, and upstream removed EIP-7708 burn logs entirely in EIP-8246 (ethereum#35219), so there is no call site left to pin. - expectedCallInterceptorDispatches carries EVM.create, dispatching to both Create and Create2, in place of the EVM.Create and EVM.Create2 rows, because the guard now sits in the shared creation frame. The CREATE/CREATE2 opcodes reach the interceptor through that frame alone, which TestCallInterceptor_CreateOpcodesDispatchToTheInterceptor pins by running the two opcode handlers. Rebased onto v1.17.8. Two more upstream fields are registered: - vm.Config gained DisableParallelExecution (bool) with parallel block execution (ethereum#35264), now listed in upstreamConfigFields. - vm.EVM gained precompileCache (*PrecompileCache) with precompile result caching (ethereum#35388), now listed in upstreamEvmFields. Rebased onto v1.17.10. Registry changes: - vm.EVM gained forceTableLoop (bool), the test-only switch upstream's differential test uses to run the table loop against the generated interpreter (ethereum#35638), now listed in upstreamEvmFields. - EVM.CheckInitCodeSize is expected 5 times rather than 3, because gasCreateEip8037 and gasCreate2Eip8037 now call it as well. The v1.17.5 port had left them calling upstream's CheckMaxInitCodeSize, which the census could not see. - Two new census entries allow exactly one call each to upstream's CheckMaxCodeSize and CheckMaxInitCodeSize in core and core/vm: the fallback in the Sonic wrapper. Since their upstream signatures were restored, a call upstream adds compiles and silently checks the protocol limit; these entries fail on it instead. - Config.MaxInitCodeSize is pinned by TestCustomCodeSize_CreateGasAllowsCustomMaxInitCodeSize, which replaces the EIP-3860-only test and also covers Amsterdam. - Config.MaxTxGas is expected 3 times rather than 2. Under Amsterdam, preCheck applies a configured cap to the whole gas limit as well, and reads the field directly to tell a configured cap from the protocol default. TestCallInterceptor_CreateOpcodesDispatchToTheInterceptor takes its stack from the test EVM, since NewStack became EVM.NewStack. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simonlechner
added a commit
to 0xsoniclabs/go-ethereum
that referenced
this pull request
Nov 4, 2026
A hook can be lost in an upstream rebase while the tree still compiles: a nil-interceptor early return disappears in a conflict resolution, a config guard is dropped when upstream restructures the surrounding function, a new return path bypasses a code-size check. Upstream's own test suite cannot catch any of it, because it runs with a zero-valued vm.Config where every Sonic hook is inert by design. Each test in the suite flips one hook and asserts that observable behavior changes, so an inert hook fails a test. On top of the behavioral tests, sonic_hook_registry_test.go pins the vm.Config and vm.EVM field sets, asserts the number of reference sites per hook, and checks that every hook still has a pinning test and that the make target still selects it. SONIC_HOOKS.md documents the inventory, the upstream behavior Sonic depends on, the known limitations, and the rule: after any upstream rebase, `make test-sonic-hooks` must pass before the branch is mergeable. Ported to v1.17.5. Four registry entries changed, justified here as the registry requires: - vm.EVM gained the upstream field arena (*stackArena), now listed in upstreamEvmFields. - EVM.CheckCodeSize is expected 3 times rather than once, because upstream splits the max-code-size check across the EIP-4762, Amsterdam and default branches of initNewContract. - The two StateDB.EmitLogsForBurnAccounts census entries and the tests pinning them are dropped. That hook was upstream v1.17.2 behavior Sonic depended on rather than a Sonic modification, and upstream removed EIP-7708 burn logs entirely in EIP-8246 (ethereum#35219), so there is no call site left to pin. - expectedCallInterceptorDispatches carries EVM.create, dispatching to both Create and Create2, in place of the EVM.Create and EVM.Create2 rows, because the guard now sits in the shared creation frame. The CREATE/CREATE2 opcodes reach the interceptor through that frame alone, which TestCallInterceptor_CreateOpcodesDispatchToTheInterceptor pins by running the two opcode handlers. Rebased onto v1.17.8. Two more upstream fields are registered: - vm.Config gained DisableParallelExecution (bool) with parallel block execution (ethereum#35264), now listed in upstreamConfigFields. - vm.EVM gained precompileCache (*PrecompileCache) with precompile result caching (ethereum#35388), now listed in upstreamEvmFields. Rebased onto v1.17.10. Registry changes: - vm.EVM gained forceTableLoop (bool), the test-only switch upstream's differential test uses to run the table loop against the generated interpreter (ethereum#35638), now listed in upstreamEvmFields. - EVM.CheckInitCodeSize is expected 5 times rather than 3, because gasCreateEip8037 and gasCreate2Eip8037 now call it as well. The v1.17.5 port had left them calling upstream's CheckMaxInitCodeSize, which the census could not see. - Two new census entries allow exactly one call each to upstream's CheckMaxCodeSize and CheckMaxInitCodeSize in core and core/vm: the fallback in the Sonic wrapper. Since their upstream signatures were restored, a call upstream adds compiles and silently checks the protocol limit; these entries fail on it instead. - Config.MaxInitCodeSize is pinned by TestCustomCodeSize_CreateGasAllowsCustomMaxInitCodeSize, which replaces the EIP-3860-only test and also covers Amsterdam. TestCallInterceptor_CreateOpcodesDispatchToTheInterceptor takes its stack from the test EVM, since NewStack became EVM.NewStack. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
This PR implements the parallel block executor, with the execution pre-state
derived from the block-level access list.