# xbench: reproduce the xone.sh benchmarks

Results page: https://xone.sh/benchmarks/ . Raw data: https://xone.sh/bench/results/

## One line (Linux x86_64, python3, curl, tar)

    curl -fsSL https://xone.sh/bench/run.sh | bash

Downloads pinned, sha256-checked release binaries of xone v0.2.9, geth 1.17.10, reth 2.11.0 and
nethermind 2.2.2 (about 250 MB in total, into a temp dir that is deleted afterwards), starts each as a
dev-chain node with no peers (`--dev`; Nethermind has no `--dev`, so its bundled `spaceneth` dev preset),
and measures:

| metric | how |
|---|---|
| binary size | bytes of the release executable |
| start to first RPC answer | wall time from `exec` to the first successful `eth_blockNumber` on HTTP |
| idle RSS | `/proc/<pid>/status` VmRSS 30 s after start (children included) |
| RPC latency | 50 warm-up calls, then 1,000 sequential calls on one keep-alive connection: `eth_blockNumber` and `eth_call` to the identity precompile (0x04); p50 / p99 / mean |

Three trials per client, median reported; every trial is in the JSON. Use your own builds with
`curl -fsSL https://xone.sh/bench/run.sh | XONE_BIN=... GETH_BIN=... RETH_BIN=... NETHERMIND_BIN=... bash`,
skip clients with `SKIP=nethermind`, and pass `--trials 5 --idle 60 --n 5000` after `bash -s --`.

Note: the public xone binary the script downloads is v0.2.9 (release build; its commit is not in public history), which includes the RPC latency fix.
The 2026-11-28d result set is two public run.sh runs of that build (shared 8-core VM and shared production host). The earlier 2026-11-28 and 2026-11-28b sets were run before that build was public and are kept as history.

xOne rate-limits RPC by default; xbench raises that limit for xOne
(`--rpc.bucket.burst 100000000 --rpc.bucket.rate 100000000`). The other
clients run with their default settings. Nothing else is tuned.

## Against a synced node (the numbers that matter for RPC providers)

    curl -fsSLO https://xone.sh/bench/xbench.py
    python3 xbench.py rpc --url http://127.0.0.1:8545 --n 5000 --out rpc.json

Run it against xone and geth-XDC (or geth/reth/nethermind) synced on the same host, same network.

## Disk per 100k blocks (Apothem)

Start a fresh node on Apothem with its datadir at DIR and HTTP on 8545, then:

    python3 xbench.py disk --datadir DIR --url http://127.0.0.1:8545 --minutes 120 --every 60 --out disk.json

It samples `du -sb DIR` and the head block every minute and reports `bytes_per_100k_blocks`.
Compare clients over the same block range; early Apothem blocks are much lighter than recent ones.

## Rules we hold ourselves to

- Same host, same run, same flags class (dev mode, no peers) for every client.
- We publish losses. The xone RPC latency gap is on the page, not hidden.
- Host, kernel, core count, RAM and load average are recorded in every JSON. A loaded box is noisy;
  look at all trials, not only the median.
- Send your results (the JSON file) to hello@xone.sh. We add independent runs to the page with credit.
