Skip to content
Open
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
5f0b4d6
feat(mip8): storage perf-regression suite + consume timing report
pdobacz Jul 10, 2026
8f5c7cd
test(mip8): drop layout dimension, random tests hit distinct pages
pdobacz Jul 13, 2026
80af283
perf(mip8): Various fixes
pdobacz Jul 17, 2026
22a0f8b
perf(mip8): split sweep into sload_sweep_k and whole-page sload_sweep…
pdobacz Jul 16, 2026
8bba210
perf(mip8): adapt perf suite to MONAD_TEN
pdobacz Jul 30, 2026
ab58acd
Minor various fixes
pdobacz Aug 18, 2026
86cbada
refactor(consume): make block timing an optional consumer capability
pdobacz Aug 18, 2026
7d30280
refactor(perf): make perf_regression a click CLI in the testing package
pdobacz Aug 18, 2026
2d6ec19
perf: pair the fork comparison and adjust for the table's test count
pdobacz Aug 18, 2026
22b4864
test(mip8): give every perf transaction its own sender
pdobacz Aug 18, 2026
3859832
perf(mip8): move the perf suite under tests/benchmark on the gas knob
pdobacz Aug 18, 2026
9f12d4d
perf(mip8): report the runloop's retry count alongside the timings
pdobacz Aug 19, 2026
18f7e2b
fix(monad): stop implying the primary keeps the state machine it formats
pdobacz Aug 19, 2026
2f916ba
test(mip8): build the compute-loop control from a fixed fork
pdobacz Aug 19, 2026
31c0bb0
perf(mip8): flag perf measures at a 5% adjusted threshold
pdobacz Aug 28, 2026
e341a3b
docs(perf): name the harness default branches now the runloop work is…
pdobacz Aug 28, 2026
1b6b650
docs(mip8): correct the compute-loop and block-shape diagrams
pdobacz Aug 28, 2026
039aec1
fix(monad): tolerate a runloop that logs no retry count
pdobacz Aug 28, 2026
d6fc0b2
docs(mip8): keep the diagrams to structure, not counts
pdobacz Aug 28, 2026
3482dff
perf: drop the HTML rendering and shorten the power note
pdobacz Aug 28, 2026
af3bf26
refactor(consume): collect timing rows in memory
pdobacz Aug 28, 2026
dc0c87a
ci: rehearse the MIP-8 perf suite as its own release feature
pdobacz Aug 28, 2026
e790ffe
fix(monad): verify every fixture when given no name
pdobacz Aug 28, 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
10 changes: 10 additions & 0 deletions .github/configs/feature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@ monad_runloop:
evm-type: eels
# Like `monad`, but `--monad-runloop` and eestnet chain id `30143`
fill-params: -m blockchain_test --from=MONAD_EIGHT --until=MONAD_TEN --chain-id=30143 --monad-runloop -k "not invalid_header"

monad_benchmark:
evm-type: eels
# The MIP-8 perf suite, which lives outside the default collection and
# so is named explicitly. Filled at the smallest block gas every case
# supports: below 10M the 128-read sweeps cannot fit one iteration in a
# transaction. The excluded `page_spread` cases size their work from `m`
# rather than the gas budget, so they need ~29M and ~177M whatever is
# passed here.
fill-params: -m blockchain_test tests/benchmark/stateful/mip8_pageified_storage/ --from=MONAD_NINE --until=MONAD_TEN --chain-id=30143 --monad-runloop --gas-benchmark-values=10 -k "not m4096 and not m1024"
553 changes: 553 additions & 0 deletions MIP8_PERF_TESTS_DIAGRAMS.md

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions MONAD_RUNLOOP_TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Requirements: docker, ~10 GB disk for the builder image and build
artifacts, ~6 GB RAM for hugepages.

```sh
snap install astral-uv --classic
git clone --branch main \
git@github.com:monad-exp/monad-eest-rust-harness.git
cd monad-eest-rust-harness
Expand Down Expand Up @@ -68,6 +69,48 @@ uv run consume direct --input ../fixtures_eestnet \
across ~14 threads), so budget ~5 vCPUs per worker (`-n N` needs
roughly `5 * N` cores).

## MIP-8 perf-regression tests

`tests/benchmark/stateful/mip8_pageified_storage/test_perf_regression.py`
fills SLOAD/SSTORE workloads at both forks and times block execution on
the runloop to compare MONAD_NINE (slot-encoded) vs MONAD_TEN
(page-encoded).

### Setup

```sh
sudo tee /etc/sysctl.d/99-benchmark.conf >/dev/null <<'EOF'
kernel.randomize_va_space = 0
kernel.perf_event_paranoid = 1
vm.nr_hugepages = 3072
EOF
sudo sysctl --system
sudo cpupower idle-set -D 1
```

### Run

From the repo root:

```sh
tmux new -s perf 'TAG=v4 scripts/perf_cycle.sh'
```

Fills once, consumes `RUNS` times, and writes the NINE-vs-TEN table to
`../timing_${TAG}_<utc>_table.md` (headed with the
cycle time and the four repo SHAs). Knobs:

- `TAG` (required) names every artifact; use a fresh one per experiment.
- `RUNS` consume passes (default 13), `REPEATS` page-disjoint copies per
fixture (cold samples reduced to a `min` within each pass).
- `BLOCK_GAS_M=N` sets the block gas budget in millions, passed through
as `--gas-benchmark-values`; the default 200 matches the gas the
runloop stamps. Fixtures land under `for_{fork}_at_0200M/`, so the
budget a fixture was built with is visible in its path.
`SKIP_FILL=1` reuses an existing `../fixtures_${TAG}`.

Run on a quiet host; timings are noisy under contention.

## Behavior and known limits

- Fixtures containing expected-invalid blocks are skipped: the ledger
Expand Down
20 changes: 20 additions & 0 deletions docs/running_tests/consume/direct.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ uv run consume direct --bin=<evm-binary> [OPTIONS]

- `--bin EVM_BIN`: Path to an evm executable that can process `StateTestFixture` and/or `BlockTestFixture` formats.
- `--traces`: Collect execution traces from the evm executable.
- `--timing-report`: Write per-block execution timing to `timing_consume.csv` (see [Block Execution Timing](#block-execution-timing)).
- `--timing-report-dir DIR`: Directory for that CSV; defaults to the HTML report's directory.

!!! warning "Limited Client Support"

Expand Down Expand Up @@ -35,6 +37,24 @@ uv run consume direct --bin=<evm-binary> [OPTIONS]
- **Module scope**: Tests EVM, respectively block import, in isolation, not full client behavior.
- **Interface dependency**: Requires client-specific test interfaces.

## Block Execution Timing

`--timing-report` writes a `timing_consume.csv` holding the per-block
measurements the client reported while executing each fixture, one row per
block.

The `test`, `params` and `fork` columns identify the fixture; the remaining
columns are whatever metrics the client reported, so they vary by client.

!!! note "Reporting clients only"

A client only appears in the report if its fixture consumer measures
block execution.

!!! warning "Run the timed pass serially"

`--timing-report` is rejected together with xdist (`-n`).

## Example Usage

Only run state tests (by using a mark filter, `-m`) from a local `fixtures` folder with go-ethereum:
Expand Down
6 changes: 6 additions & 0 deletions docs/running_tests/useful_pytest_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,9 @@ Print relevant test stage timings such as client start-up, payload response time
```bash
uv run consume engine --input=<fixture_input> --timing-data
```

Write the per-block execution timing reported by the client to a CSV (`consume direct` only, see [Block Execution Timing](./consume/direct.md#block-execution-timing)):

```bash
uv run consume direct --input=<fixture_input> --bin=<evm-binary> --timing-report
```
1 change: 1 addition & 0 deletions packages/testing/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ groupstats = "execution_testing.cli.show_pre_alloc_group_stats:main"
extract_config = "execution_testing.cli.extract_config:extract_config"
compare_fixtures = "execution_testing.cli.compare_fixtures:main"
benchmark_parser = "execution_testing.cli.benchmark_parser:main"
perf_regression = "execution_testing.cli.perf_regression:main"

[tool.setuptools.packages.find]
where = ["src"]
Expand Down
Loading