Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
f45a328
perf(evm): optimistic parallel block execution with batched commit be…
gakonst Nov 14, 2026
86a37dd
fix(evm): allow the parallel bench runner's argument count
gakonst Nov 14, 2026
0c5e7f3
perf: optimistic parallel block execution in payload validation behin…
gakonst Nov 14, 2026
a87fd3e
perf: optimistic parallel block execution in payload validation behin…
gakonst Nov 14, 2026
846e55f
chore: stream batched parallel commits to the state root task
gakonst Nov 14, 2026
45353f2
perf(evm): parallel executor replaces tx prewarming and feeds proof h…
gakonst Nov 14, 2026
5c15d3a
perf(evm): stream transactions into the parallel executor and receipt…
gakonst Nov 14, 2026
d5a5e13
perf(evm): move batched-commit streaming and deferred-op reads off th…
gakonst Nov 14, 2026
931847c
chore(evm): log parallel execution stats per block
gakonst Nov 14, 2026
585a327
chore(deps): pin evm2 with cheaper parallel read validation
gakonst Nov 15, 2026
bff088d
chore(deps): pin evm2 with per-thread base read memo
gakonst Nov 15, 2026
01db28a
chore(deps): pin reth with capped transaction conversion batches
gakonst Nov 15, 2026
25489bb
docs(evm): fix broken intra-doc link to test-only validate_system_tx
gakonst Nov 15, 2026
d1ad3ef
perf(evm): derive parallel execution hints from static transaction facts
gakonst Nov 15, 2026
8ef4234
docs(evm): fix broken intra-doc link to test-only validate_system_tx
gakonst Nov 15, 2026
4db5c54
Merge remote-tracking branch 'origin/perf/parallel-best' into ship2
gakonst Nov 15, 2026
71b1d30
chore(deps): pin reth with sequential warmup before parallel execution
gakonst Nov 15, 2026
e2aec68
perf(engine): warm caches with sequential blocks before parallel exec…
gakonst Nov 15, 2026
5618a24
test(evm): differential fuzz of parallel against sequential block exe…
gakonst Nov 15, 2026
8520f47
test(evm): ignore unchanged slots a batched commit streams in the dif…
gakonst Nov 15, 2026
5321f6d
perf(precompiles): insert expiring nonces in one batch per parallel b…
gakonst Nov 15, 2026
59f3088
perf(precompiles): write expiring nonce ring entries as each transact…
gakonst Nov 15, 2026
765c4ec
perf(evm): copy receipts on parallel workers
gakonst Nov 15, 2026
fa21aa0
chore(deps): pin evm2 and reth with the batched committer, nonce batc…
gakonst Nov 15, 2026
6eb88aa
perf(evm): batch committer work in parallel execution
gakonst Nov 15, 2026
9e33466
chore(deps): pin reth with proof worker niceness
gakonst Nov 15, 2026
604948f
perf(node): deprioritize proof workers during parallel execution
gakonst Nov 15, 2026
51ea2a7
chore(deps): pin evm2 with write filters and a seeded slot hasher
gakonst Nov 15, 2026
0cd6fa0
perf(node): deprioritize proof workers during parallel execution
gakonst Nov 15, 2026
58e30da
perf(evm): cheaper multi-version store reads in parallel execution
gakonst Nov 15, 2026
129282a
chore(deps): pin reth with a cache-warmth parallel warmup
gakonst Nov 15, 2026
3fdce65
perf(engine): end parallel warmup once the prewarm cache is warm
gakonst Nov 15, 2026
30d28d9
perf(evm): pin evm2 with single-lock batched deferred writes
gakonst Nov 16, 2026
2ab1b3d
perf(evm): batch deferred storage writes per shard
gakonst Nov 16, 2026
c8db586
perf(evm): pin evm2 with parked idle parallel workers
gakonst Nov 16, 2026
0f79c62
fix: clippy cast and private doc link
gakonst Nov 16, 2026
b9ac343
fix(ci): build patched Forge with tempo's evm2 patch revision
gakonst Nov 16, 2026
a83337e
fix: drop unused test import
gakonst Nov 16, 2026
60b5c77
perf(evm): park idle parallel workers
gakonst Nov 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
261 changes: 131 additions & 130 deletions Cargo.lock

Large diffs are not rendered by default.

140 changes: 70 additions & 70 deletions Cargo.toml

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions bin/tempo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ use nix as _;
const DEFAULT_DEV_ZONE_FACTORY_OWNER: Address =
alloy_primitives::address!("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266");

/// Proof worker niceness used with `--execution.parallel-threads` unless
/// `--engine.proof-worker-niceness` is set.
///
/// Parallel execution and the proof workers together keep more threads runnable than there are
/// CPUs. Proof workers otherwise inherit the engine's priority and time-share CPUs with the
/// execution workers; a higher niceness lets execution preempt them while they keep using idle
/// CPUs.
const PARALLEL_EXECUTION_PROOF_WORKER_NICENESS: i32 = 19;

fn apply_tempo_cli_overrides(cli: &mut TempoCli) -> eyre::Result<()> {
if let Commands::Node(node_cmd) = &mut cli.command
&& node_cmd
Expand All @@ -113,6 +122,15 @@ fn apply_tempo_cli_overrides(cli: &mut TempoCli) -> eyre::Result<()> {
node_cmd.engine.share_execution_cache_with_payload_builder = false;
}

if let Commands::Node(node_cmd) = &mut cli.command
&& node_cmd.ext.node_args.execution_parallel_threads.is_some()
{
node_cmd
.engine
.proof_worker_niceness
.get_or_insert(PARALLEL_EXECUTION_PROOF_WORKER_NICENESS);
}

if let Commands::Node(node_cmd) = &mut cli.command
&& node_cmd.dev.dev
&& node_cmd.chain.genesis_hash() == DEV.genesis_hash()
Expand Down Expand Up @@ -1002,6 +1020,44 @@ mod tests {
);
}

#[test]
fn parallel_execution_deprioritizes_proof_workers() {
init_defaults_once();

let niceness = |args: &[&str]| {
let mut cli = TempoCli::try_parse_from(args).unwrap();
apply_tempo_cli_overrides(&mut cli).unwrap();
let Commands::Node(node_cmd) = cli.command else {
panic!("expected node command");
};
node_cmd.engine.proof_worker_niceness
};

assert_eq!(niceness(&["tempo", "node", "--dev"]), None);
assert_eq!(
niceness(&[
"tempo",
"node",
"--dev",
"--execution.parallel-threads",
"6"
]),
Some(19)
);
assert_eq!(
niceness(&[
"tempo",
"node",
"--dev",
"--execution.parallel-threads",
"6",
"--engine.proof-worker-niceness",
"-2",
]),
Some(-2)
);
}

#[test]
fn non_dev_chains_are_not_modified() {
init_defaults_once();
Expand Down
4 changes: 4 additions & 0 deletions crates/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ jit = ["dep:evm2-jit", "reth-evm-ethereum/jit"]
name = "tip20_execution"
harness = false

[[bench]]
name = "tip20_parallel"
harness = false

[[bench]]
name = "dex_execution"
harness = false
14 changes: 7 additions & 7 deletions crates/evm/benches/tip20_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! `TEMPO_TIP20_EXEC_TXS` to a newline-delimited raw 2718 txgen output file to replay exact
//! txgen transactions against the in-memory fixed-cache execution path.

mod common;
pub(crate) mod common;

use alloy_consensus::transaction::{Recovered, SignerRecoverable};
use alloy_eips::Decodable2718;
Expand Down Expand Up @@ -42,13 +42,13 @@ const DEFAULT_TX_COUNT: usize = 4_096;
const PARTICIPANT_MINT_AMOUNT: u128 = 1_000_000_000_000_000_000;

#[derive(Clone)]
struct Workload {
transactions: Vec<Recovered<TempoTxEnvelope>>,
participants: Vec<Address>,
block_timestamp: u64,
pub(crate) struct Workload {
pub(crate) transactions: Vec<Recovered<TempoTxEnvelope>>,
pub(crate) participants: Vec<Address>,
pub(crate) block_timestamp: u64,
}

fn seed_in_memory_cache_db(
pub(crate) fn seed_in_memory_cache_db(
participants: &[Address],
block_timestamp: u64,
with_policies: bool,
Expand Down Expand Up @@ -206,7 +206,7 @@ fn load_txgen_workload(path: &Path) -> Workload {
}
}

fn workload() -> Workload {
pub(crate) fn workload() -> Workload {
if let Ok(path) = std::env::var("TEMPO_TIP20_EXEC_TXS") {
load_txgen_workload(Path::new(&path))
} else {
Expand Down
Loading
Loading