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
531dfdf
feat(mip8): storage perf-regression suite + consume timing report
pdobacz Jul 10, 2026
cb836d0
test(mip8): drop layout dimension, random tests hit distinct pages
pdobacz Jul 13, 2026
a283db9
perf(mip8): Various fixes
pdobacz Jul 17, 2026
2abe1e1
perf(mip8): split sweep into sload_sweep_k and whole-page sload_sweep…
pdobacz Jul 16, 2026
d64dd65
perf(mip8): adapt perf suite to MONAD_TEN
pdobacz Jul 30, 2026
6dab1a2
Minor various fixes
pdobacz Aug 18, 2026
8c3dff0
refactor(consume): make block timing an optional consumer capability
pdobacz Aug 18, 2026
c980a27
refactor(perf): make perf_regression a click CLI in the testing package
pdobacz Aug 18, 2026
cda7ce2
perf: pair the fork comparison and adjust for the table's test count
pdobacz Aug 18, 2026
ec2432c
test(mip8): give every perf transaction its own sender
pdobacz Aug 18, 2026
1e0dc95
perf(mip8): move the perf suite under tests/benchmark on the gas knob
pdobacz Aug 18, 2026
9b97125
perf(mip8): report the runloop's retry count alongside the timings
pdobacz Aug 19, 2026
f00b3f9
fix(monad): stop implying the primary keeps the state machine it formats
pdobacz Aug 19, 2026
e9d7722
test(mip8): build the compute-loop control from a fixed fork
pdobacz Aug 19, 2026
f9f10e0
perf(mip8): flag perf measures at a 5% adjusted threshold
pdobacz Aug 28, 2026
b358c2a
docs(mip8): correct the compute-loop and block-shape diagrams
pdobacz Aug 28, 2026
1a58edb
fix(monad): tolerate a runloop that logs no retry count
pdobacz Aug 28, 2026
cb710a7
docs(mip8): keep the diagrams to structure, not counts
pdobacz Aug 28, 2026
edf631e
perf: drop the HTML rendering and shorten the power note
pdobacz Aug 28, 2026
3213337
refactor(consume): collect timing rows in memory
pdobacz Aug 28, 2026
e1403c7
ci: rehearse the MIP-8 perf suite as its own release feature
pdobacz Aug 28, 2026
769822e
fix(monad): verify every fixture when given no name
pdobacz Aug 28, 2026
9cf3573
perf: follow the harness into the repo under monad-runloop
pdobacz Sep 7, 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.

42 changes: 42 additions & 0 deletions MONAD_RUNLOOP_TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,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