Skip to content

Instantly share code, notes, and snippets.

@jsign
jsign / trie-benchmark
Created January 5, 2026 19:09
Benchmark of OpenVM-MPT vs Risc0-MPT
### Fixture-by-Fixture Comparison
Fixture mainnet-2353.. zkevm-metric.. Diff Thru mainnet-2353.. Thru zkevm-metric..
----------------------------------------------------------------------------------------------------------------
rpc_block_23533620 2.92s 3.02s +3.4% 36.16K gas/s 34.98K gas/s
rpc_block_23533698 1m 3.30s 1m 0.31s -4.7% 708.25K gas/s 743.44K gas/s
rpc_block_23533808 29.80s 28.36s -4.8% 368.32K gas/s 387.09K gas/s
rpc_block_23533917 13.76s 12.94s -6.0% 606.71K gas/s 645.16K gas/s
rpc_block_23533725 11.25s 10.53s -6.4% 498.86K gas/s 532.81K gas/s
rpc_block_23533696 55.41s 51.87s -6.4% 739.33K gas/s 789.85K gas/s
rpc_block_23533538 12
"chain_config": {
"chain_id": 1,
"homestead_block": 1150000,
"dao_fork_block": 1920000,
"dao_fork_support": true,
"eip150_block": 2463000,
"eip155_block": 2675000,
"eip158_block": 2463000,
"byzantium_block": 4370000,
"constantinople_block": 7280000,
REPORT
------------------------------------
STEPS 214,070,839
COST DISTRIBUTION COST %
--------------------------------------------
BASE 293,601,280 1.14%
MAIN 14,556,817,052 56.49%
OPCODES 3,375,402,776 13.10%
PRECOMPILES 5,780,354,908 22.43%
COST DISTRIBUTION COST %
--------------------------------------------
BASE 293,601,280 0.55%
MAIN 30,787,913,852 58.13%
OPCODES 6,768,539,324 12.78%
PRECOMPILES 11,233,562,620 21.21%
MEMORY 3,883,892,920 7.33%
FROPS 6,500,227,574 12.27%
RAM USAGE 56,585,293 10.54%
This file has been truncated, but you can view the full file.
2025-11-05T19:15:01.163479Z  INFO ere_hosts: Running benchmarks with resource=Gpu and action=Prove
2025-11-05T19:15:01.163506Z  INFO ere_hosts: Running stateless-validator benchmark for input folder: test-mainnet-blocks/
2025-11-05T19:15:01.218776Z  INFO benchmark_runner::runner: Running cargo openvm...
2025-11-05T19:15:05.063087Z  INFO benchmark_runner::runner: cargo openvm completed successfully
cargo:rerun-if-env-changed=OPENVM_SKIP_BUILD
Using rustc: /usr/local/rustup/toolchains/nightly-2025-08-07-x86_64-unknown-linux-gnu/bin/rustc
Building guest package: cargo +nightly-2025-08-07 build --target riscv32im-risc0-zkvm-elf -Z build-std=alloc,core,proc_macro,panic_abort,std -Z build-std-features=compiler-builtins-mem
[init] complex #0 = Bn254Fp2 (mod_idx = 0)
[init] complex #1 = Bls12_381Fp2 (mod_idx = 4)
2025-11-05T19:16:44.902871Z  INFO openvm_stark_backend
This file has been truncated, but you can view the full file.
2025-11-05T19:15:01.163479Z  INFO ere_hosts: Running benchmarks with resource=Gpu and action=Prove
2025-11-05T19:15:01.163506Z  INFO ere_hosts: Running stateless-validator benchmark for input folder: test-mainnet-blocks/
2025-11-05T19:15:01.218776Z  INFO benchmark_runner::runner: Running cargo openvm...
2025-11-05T19:15:05.063087Z  INFO benchmark_runner::runner: cargo openvm completed successfully
cargo:rerun-if-env-changed=OPENVM_SKIP_BUILD
Using rustc: /usr/local/rustup/toolchains/nightly-2025-08-07-x86_64-unknown-linux-gnu/bin/rustc
Building guest package: cargo +nightly-2025-08-07 build --target riscv32im-risc0-zkvm-elf -Z build-std=alloc,core,proc_macro,panic_abort,std -Z build-std-features=compiler-builtins-mem
[init] complex #0 = Bn254Fp2 (mod_idx = 0)
[init] complex #1 = Bls12_381Fp2 (mod_idx = 4)
2025-11-05T19:16:44.902871Z  INFO openvm_stark_backend
#![warn(unused_crate_dependencies)]
use core::panic;
use std::sync::Arc;
use alloy_primitives::{keccak256, Bytes, U256};
use alloy_rlp::Encodable;
use reth_ethereum::{
chainspec::ChainSpecBuilder,
consensus::validate_block_post_execution,

Steps to reproduce EmulationNoCompleted error in ZisK.

Context

The workload repo allows running benchmarks not only in mainnet blocks, but in EEST benchmarks cases that we worked on some time ago to create the worst possible scenarios for different gas limits for different opcodes/precompiles/protocol-weaknesses.

The way we created this is to create worst-case blocks under different gas limits to:

  • For 45M gas limit, know which are today’s worst cases.
  • For lower gas limits (e.g., 10M) to have downsized attacks that we can benchmark faster, or might be relevant like for tx gas capping.
  • Higher gas limits than 45M to project how mainnet bumping the gas limit can affect provers.
This file has been truncated, but you can view the full file.
{
"tests/benchmark/test_worst_compute.py::test_worst_memory_access[fork_Prague-blockchain_test_from_state_test-big_memory_expansion_False-offset_initialized_False-offset_0-opcode_MSTORE8]": {
"network": "Prague",
"genesisBlockHeader": {
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"coinbase": "0x0000000000000000000000000000000000000000",
"stateRoot": "0x5601be58dc81cf9c0691c37ccf13f1677db07490408c27a0869037aed83b3b11",
"transactionsTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"receiptTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
Loading baseline metrics from: /home/ignacio/code/zkevm-benchmark-workload/zkevm-metrics-master
Found subfolders with metrics: ['sp1-v5.1.0']
Loaded 100 baseline files
Loading optimized metrics from: /home/ignacio/code/zkevm-benchmark-workload/zkevm-metrics
Found subfolders with metrics: ['sp1-v5.1.0']
Loaded 100 optimized files
Calculating speedups...
Found 100 common files with 8 regions