You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(l1): thread Arc<BlockAccessList> to avoid per-block BAL deep clones (#6829)
Before this change, `execute_block_parallel` in
`crates/vm/backends/levm/mod.rs` called `Arc::new(bal.clone())` and
`Arc::new(validation_index.clone())` on the critical path -- a full deep
copy of the BAL (potentially multiple MB of account/slot/code data)
before a single transaction executed, serially.
Fix: thread `Option<Arc<BlockAccessList>>` and `Arc<BalAddressIndex>`
through the entire pipeline:
`add_block_pipeline{,_bal,_with_witness,_inner}`,
`Blockchain::execute_block_pipeline`, `Evm::execute_block_pipeline`,
`LEVM::execute_block_pipeline`, and `execute_block_parallel`. The owned
BAL is wrapped in an `Arc` once at the call boundary
(`bal.map(Arc::new)`). The validation index is built directly into an
`Arc`. All downstream per-thread (warmer/executor) and per-tx
(`LazyBalCursor`) uses become pointer clones. The two deep clones become
moves.
7 files touched: `cmd/ethrex/cli.rs`, `crates/blockchain/blockchain.rs`,
`crates/networking/p2p/sync/full.rs`, `crates/networking/rpc/rpc.rs`,
`crates/vm/backends/levm/mod.rs`, `crates/vm/backends/mod.rs`,
`tooling/ef_tests/blockchain/test_runner.rs`. Zero behavior change.
`make test` passes (57 binaries, 0 failures). `cargo check --workspace
--all-targets` and `cargo clippy` clean. Full EF state/blockchain suites
not run locally; they should gate in CI.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,10 @@
12
12
13
13
## Perf
14
14
15
+
### 2026-06-29
16
+
17
+
- Thread `Arc<BlockAccessList>` through the block pipeline to avoid an O(BAL-size) deep clone of the Block Access List (and its validation index) per block on the parallel execution path [#6829](https://github.com/lambdaclass/ethrex/pull/6829)
18
+
15
19
### 2026-06-18
16
20
17
21
- In-place top-slot mutation for unary/binary opcodes and `MLOAD`: mutate the top stack slot directly instead of pop-then-push, removing the serial read-modify-write of the stack offset on offset-chain-bound ops. ~2.16x on an ISZERO loop and ~1.63x on `MLOAD` (IPC 2.41 -> 3.45 on a 33M-op loop) [#6865](https://github.com/lambdaclass/ethrex/pull/6865)
0 commit comments