Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ea57a4c
feat: add binary entry point for external proofs in OP (op-rs/op-reth…
itschaindev Oct 16, 2025
abedc05
feat: add support for `eth_getProof` (op-rs/op-reth#257)
meyer9 Oct 21, 2025
37be338
perf(trie): feature gate `reth-optimism-trie` metrics (op-rs/op-reth#…
emhane Oct 21, 2025
bab7317
fix(test): Enable live collector tests with metrics feature (op-rs/op…
emhane Oct 22, 2025
96d7d53
feat: implement `debug_executePayload` (op-rs/op-reth#276)
meyer9 Oct 23, 2025
266a6f0
feat: live collector integration (op-rs/op-reth#306)
dhyaniarun1993 Oct 27, 2025
577cfb4
fix: rebase conflicts (op-rs/op-reth#367)
emhane Nov 12, 2025
cff3755
feat: implemented `OpProofStorage` Database metrics (op-rs/op-reth#407)
sadiq1971 Nov 26, 2025
4e75e3b
feat: Implemented `OpProofStoragePrunerTask` (op-rs/op-reth#375)
sadiq1971 Dec 8, 2025
f2cb1ff
chore: inmem proof storage removed (op-rs/op-reth#465)
dhyaniarun1993 Dec 9, 2025
f0b3424
chore(exex): Add metrics feature in `reth-optimism-exex` (op-rs/op-re…
emhane Dec 9, 2025
30b6929
feat: prune cli added (op-rs/op-reth#507)
dhyaniarun1993 Dec 16, 2025
b74f990
refactor(trie): return `OpProofsStorageError` from `execute_and_store…
Himess Jan 5, 2026
20e3080
fix: reduce default proofs pruning interval (op-rs/op-reth#560)
dhyaniarun1993 Jan 8, 2026
39f41e8
feat: add verification interval for integrity check (op-rs/op-reth#577)
itschaindev Jan 14, 2026
29196f0
chore: getProof benchmark utility added (op-rs/op-reth#550)
dhyaniarun1993 Jan 20, 2026
4d89ca0
chore: mv proof args to rollup node (op-rs/op-reth#625)
dhyaniarun1993 Jan 23, 2026
5ed2916
chore: ExEx config builder (op-rs/op-reth#642)
dhyaniarun1993 Jan 27, 2026
1353bc1
chore: moved proof initialization to `reth-optimism-node` (op-rs/op-r…
sadiq1971 Jan 28, 2026
87990ec
chore(rust): fix compilation errors
theochap Feb 19, 2026
4c53222
docs(op-reth): add historical proofs README to exex crate
theochap Feb 20, 2026
9ef9767
chore(op-reth): move proof-bench to rust/op-reth/bin/proof-bench
theochap Feb 20, 2026
aef69ee
fix(op-reth): fix go-lint and rust-clippy CI failures
theochap Feb 23, 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
31 changes: 31 additions & 0 deletions .circleci/continue/rust-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,32 @@ jobs:
- go-save-cache:
namespace: kona-ci

# op-reth E2E Sysgo Tests
op-reth-e2e-sysgo-tests:
docker:
- image: <<pipeline.parameters.c-default_docker_image>>
resource_class: xlarge
steps:
- utils/checkout-with-mise:
checkout-method: blobless
- attach_workspace:
at: .
- go-restore-cache:
namespace: op-reth-e2e
- rust-build:
directory: rust
profile: release
binary: "op-reth"
- run:
name: Run op-reth E2E tests with sysgo orchestrator
working_directory: rust/op-reth/tests
no_output_timeout: 60m
command: |
export OP_RETH_EXEC_PATH="$(pwd)/../../target/release/op-reth"
make test-e2e-sysgo
- go-save-cache:
namespace: op-reth-e2e

# Kona Proof Action Tests (from proof.yaml)
kona-proof-action-tests:
parameters:
Expand Down Expand Up @@ -305,6 +331,11 @@ workflows:
- cannon-kona-host
- kona-build-release
- op-reth-build
- op-reth-e2e-sysgo-tests:
<<: *rust-e2e-job-base
requires:
- contracts-bedrock-build
- op-reth-build
- rust-restart-sysgo-tests:
name: rust-e2e-restart
<<: *rust-e2e-job-base
Expand Down
25 changes: 25 additions & 0 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ members = [

# Op-Reth
"op-reth/bin/",
"op-reth/bin/proof-bench/",
"op-reth/crates/chainspec/",
"op-reth/crates/cli/",
"op-reth/crates/consensus/",
Expand Down
4 changes: 4 additions & 0 deletions rust/op-reth/bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ reth-optimism-evm.workspace = true
reth-optimism-payload-builder.workspace = true
reth-optimism-primitives.workspace = true
reth-optimism-forks.workspace = true
reth-node-builder.workspace = true
reth-db.workspace = true

clap = { workspace = true, features = ["derive", "env"] }
tracing.workspace = true
eyre.workspace = true

[lints]
workspace = true
Expand All @@ -33,6 +36,7 @@ otlp = ["reth-optimism-cli/otlp"]

js-tracer = [
"reth-optimism-node/js-tracer",
"reth-node-builder/js-tracer",
]

jemalloc = ["reth-cli-util/jemalloc", "reth-optimism-cli/jemalloc"]
Expand Down
24 changes: 24 additions & 0 deletions rust/op-reth/bin/proof-bench/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "op-reth-proof-bench"
version = "1.11.0"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
# reth
reth-cli-runner.workspace = true

# alloy
alloy-primitives = { workspace = true, features = ["serde"] }

tokio = { workspace = true, features = ["macros"] }
reqwest = { workspace = true, features = ["json"] }
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
clap = { workspace = true, features = ["derive"] }
futures.workspace = true
anyhow.workspace = true
hdrhistogram = "7.5"
82 changes: 82 additions & 0 deletions rust/op-reth/bin/proof-bench/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Reth Proof Benchmark Tool

`op-reth-proof-bench` is a specialized CLI tool designed to benchmark the performance of the `eth_getProof` RPC method on Optimism/Ethereum nodes. It iterates through a range of blocks, sending concurrent proof requests to valid addresses, and reports detailed latency and throughput metrics.

## Features

- **Concurrent Execution:** Sends multiple requests in parallel to stress test the RPC.
- **Detailed Reporting:**
- Real-time per-block stats (Req/s, P95 Latency, Min/Max).
- Final summary with histogram-based percentiles (P50, P95, P99).
- **Customizable Workload:** Configure worker count, request count per block, and block step.
- **Robustness:** Handles network errors gracefully and reports error counts.

## Installation

This tool is part of the `op-reth` workspace. You can run it directly using Cargo.

```bash
# Build and run directly
cargo run -p reth-proof-bench -- --help
```

## Usage

### Basic Example

Benchmark 100 blocks from block `10,000,000` to `10,000,100` against a local node:

```bash
cargo run --release -p reth-proof-bench -- \
--rpc http://localhost:8545 \
--from 10000000 \
--to 10000100
```

### Advanced Usage

Stress test a remote node with higher concurrency:

```bash
cargo run --release -p reth-proof-bench -- \
--rpc http://remote-node:8545 \
--from 4000000 \
--to 4100000 \
--step 10000 \
--reqs 50 \
--workers 10
```

### Arguments

| Flag | Default | Description |
|------|---------|-------------|
| `--rpc` | `http://localhost:8545` | The HTTP RPC endpoint of the node. |
| `--from` | **Required** | Start block number. |
| `--to` | **Required** | End block number. |
| `--step` | `10000` | Number of blocks to skip between benchmark iterations. |
| `--reqs` | `10` | Number of `eth_getProof` requests to send *per block*. |
| `--workers` | `2` | Number of concurrent async workers to run. |

## Output Example

```text
Block | Req/s | Min(ms) | P95(ms) | Max(ms) | Errors
---------------------------------------------------------------------------
36441154 | 245.50 | 25.12 | 45.20 | 55.10 | 0
36451154 | 230.10 | 26.05 | 48.10 | 60.15 | 0

---------------------------------------------------------------------------
Summary:
Total Requests: 100
Total Time: 0.85s
Throughput (Req/s): 117.65
Total Errors: 0
-----------------------------------
Min Latency: 25.12 ms
Median Latency: 32.00 ms
P95 Latency: 48.10 ms
P99 Latency: 60.15 ms
Max Latency: 60.15 ms
---------------------------------------------------------------------------
```
23 changes: 23 additions & 0 deletions rust/op-reth/bin/proof-bench/src/args.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
use clap::Parser;

#[derive(Parser, Debug)]
#[command(author, version, about = "Benchmark eth_getProof performance", long_about = None)]
pub struct Args {
#[arg(long, default_value = "http://localhost:8545")]
pub rpc: String,

#[arg(long)]
pub from: u64,

#[arg(long)]
pub to: u64,

#[arg(long, default_value_t = 10000)]
pub step: u64,

#[arg(long, default_value_t = 10)]
pub reqs: usize,

#[arg(long, default_value_t = 2)]
pub workers: usize,
}
92 changes: 92 additions & 0 deletions rust/op-reth/bin/proof-bench/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
//! # reth-proof-bench
//!
//! A benchmarking tool for measuring the performance of historical state proofs
//! retrieval using the `eth_getProof` RPC method.

#![doc(
html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
)]

mod args;
mod report;
mod rpc;
mod utils;

use anyhow::Result;
use clap::Parser;
use futures::stream::{self, StreamExt};
use std::time::Instant;

use crate::{
args::Args,
report::{BenchMetrics, BenchSummary, Reporter},
rpc::run_proof,
utils::get_addresses,
};
use reth_cli_runner::CliRunner;

#[allow(missing_docs)]
fn main() -> Result<()> {
let args = Args::parse();

if args.from > args.to {
anyhow::bail!("--from must be less than or equal to --to");
}

let runner = CliRunner::try_default_runtime()?;
runner.run_command_until_exit(|_| run(args))
}

async fn run(args: Args) -> Result<()> {
let client = reqwest::Client::new();
let addresses = get_addresses();

// Use the reporter for output
Reporter::print_header();

let start_time = Instant::now();
let mut current_block = args.from;

// Initialize Summary
let mut summary = BenchSummary::new();

while current_block <= args.to {
let block_start = Instant::now();

let target_block = current_block;

let work_items = (0..args.reqs).map(|i| {
let addr = addresses[i % addresses.len()];
let client = client.clone();
let rpc_url = args.rpc.clone();
(i, addr, client, rpc_url, target_block)
});

let mut stream = stream::iter(work_items)
.map(|(attempt, addr, client, url, block)| async move {
run_proof(client, url, block, attempt, addr).await
})
.buffer_unordered(args.workers);

let mut samples = Vec::with_capacity(args.reqs);
while let Some(sample) = stream.next().await {
summary.add(&sample);
samples.push(sample);
}

let block_duration = block_start.elapsed().as_secs_f64();

// Clean logic: Create metrics -> Report metrics
let metrics = BenchMetrics::new(current_block, &samples, block_duration);
Reporter::print_metrics(&metrics);

current_block += args.step;
}

let total_duration = start_time.elapsed().as_secs_f64();
Reporter::print_summary(&summary, total_duration);

Ok(())
}
Loading
Loading