Conversation
execute_block_parallel previously returned (current_state, codes, shadow_touched, shadow_reads) per tx and validated them in a serial post-loop across all txs (validate_tx_execution + shadow checks + mark unread_storage_reads / unaccessed_pure_accounts). Validation is per-tx pure work; only marking the shared sets mutates cross-tx state. Move validate_tx_execution + shadow_touched/shadow_reads checks into the closure. Precompute the small (Vec<(Address, H256)>, Vec<Address>) inputs the serial pass needs to update the shared sets. Drop current_state + codes inside the closure so they no longer cross the rayon boundary. Defer BAL validation errors via Option<EvmError> in the result tuple so the post-par_iter gas-limit check still takes priority over BAL mismatch (preserves GAS_USED_OVERFLOW > BAL error ordering for blocks exceeding the gas limit). Expected win on 200-tx blocks: the ~3 ms median serial validation pass goes away. Also reduces per-tx allocator pressure across rayon workers since the per-tx maps are dropped before the result tuple is constructed.
- reads_satisfied: pre-size with current_state.len() * 4 to skip 2-3 reallocations on the hot path (rough avg slots-per-account). - destroyed: keep Vec::new() since selfdestruct is rare post-EIP-6780; no-allocation default is optimal. - Document why the post-collect sort_unstable_by_key is a defensive no-op (IndexedParallelIterator preserves order) so a future refactor doesn't drop the guard. Addresses ElFantasma feedback on #6677.
Replace N parallel point-gets in CachingDatabase::prefetch_accounts with a single multi_get_cf on ACCOUNT_FLATKEYVALUE for FKV-covered addresses, falling back to per-address trie walks for paths past the FKV cursor. Reduces warmer-phase cost on the bal-devnet-7 fixture from 6.78 ms to 2.37 ms per block (-65%); total wall time -21.5%.
Address review feedback on PR #6712: - store.rs: hoist `fkv_cursor` out of the per-address loop and document why the comparison matches `BackendTrieDB::flatkeyvalue_computed`'s semantics (not the more-conservative `flatkeyvalue_computed_with_last_written`). Drop the dead `diff_hits` counter. - vm.rs: comment on why `cache.insert` (vs `or_insert`) is intentional. - rocksdb.rs: clone a `String` instead of formatting the error per key.
Address review feedback on #6712: - Parallelize the trie-walk fallback in get_account_states_batch_by_root with rayon par_iter, recovering the per-address fan-out that the pre-batch prefetch_accounts path had. Matters during initial sync when most addresses miss the FKV cursor; no effect on the FKV-hot path. - Drop per-iteration Nibbles::from_hex(path.clone()) in the classifier loop; compare last_written and the leaf path as slices directly (Nibbles::Ord delegates to data Vec compare, so this is equivalent). - Expand multi_get rustdoc to spell out that the default impl is equivalent to N get calls on backends without a batched primitive.
…96) for glamsterdam-devnet-4 Extends PayloadAttributesV4 with the new required target_gas_limit field introduced by execution-apis#796 and consensus-specs#5235 (Gloas / upstream "Glamsterdam"). The CL is now the authoritative source of the per-block target gas limit on engine_forkchoiceUpdatedV4 instead of the EL reading it from the static --builder.gas-limit flag. validate_attributes_v4 strictly rejects FCUv4 requests that omit the field with RpcErr::InvalidPayloadAttributes, matching the spec contract. The paired CL on glamsterdam-devnet-4 ships consensus-specs#5235 and populates the field on every FCUv4 it sends. build_payload_v4 sets BuildPayloadArgs.gas_ceil directly from the attribute. The EIP-1559 1/1024 gas-limit envelope inside calc_gas_limit continues to clamp the value relative to the parent block. V1/V2/V3 and non-engine callers (sequencer, dev mode) keep using --builder.gas-limit. Also fixes a latent collision in BuildPayloadArgs::id(): slot_number was never hashed and gas_ceil now matters per-call, so two FCUv4s differing only in CL-supplied targetGasLimit could collide on payload_id. Both fields are now part of the Keccak input. Tests added: - payload-attribute parser round-trips for hex value present, field absent, and explicit null - validator accepts present, rejects absent (matches spec error message), and continues to reject pre-Amsterdam timestamps - BuildPayloadArgs::id() distinguishes different gas_ceil values and different slot_number values, and is stable under equal inputs - calc_gas_limit steps up/down toward target within one EIP-1559 1/1024 step and clamps when the target is within one step
- Combine the per-protocol "Negotatied eth/snap version" debug pair into a single structured line that includes the peer node and client id. Two unrelated-looking lines for the same connection are now one. - Fix the `Negotatied` typo in the same site. - Demote `early eof` IO errors during the handshake to TRACE; they are expected on simultaneous-dial races (both peers initiate, only one connection wins). Other handshake failures stay at DEBUG with structured `error` field.
|
Lines of code reportTotal lines added: Detailed view |
Benchmark Results ComparisonNo significant difference was registered for any benchmark run. Detailed ResultsBenchmark Results: BubbleSort
Benchmark Results: ERC20Approval
Benchmark Results: ERC20Mint
Benchmark Results: ERC20Transfer
Benchmark Results: Factorial
Benchmark Results: FactorialRecursive
Benchmark Results: Fibonacci
Benchmark Results: FibonacciRecursive
Benchmark Results: ManyHashes
Benchmark Results: MstoreBench
Benchmark Results: Push
Benchmark Results: SstoreBench_no_opt
|
[DNM] — Do Not Merge. Opened to run CI on the rebased
glamsterdam-devnet-4branch.This branch was rebased onto
mainvia cherry-pick. 5 commits already present onmainwere dropped (FCU finalized-ancestor work via #6676; BAL storage prefetch via #6732). The 10 commits below are the net-new work:multi_get_cf(perf(l1): batch account-state prefetch via rocksdb multi_get_cf #6712)get_account_state_multitargetGasLimit(execution-apis#796)Not for merge; tracking CI only.