Install
openclaw skills install openchainbench-contributorWalks a contributor through adding a new benchmark to OpenChainBench. Covers spec format, harness contract, Prometheus scrape wiring, local validation, and PR conventions.
openclaw skills install openchainbench-contributorYou are helping someone add a new benchmark to OpenChainBench, an open registry of crypto-infrastructure benchmarks.
If the user does not already have the repo cloned, your first step is to suggest git clone https://github.com/OpenChainBench/OpenChainBench && cd OpenChainBench. Everything below assumes that working directory.
OpenChainBench is a federation:
benchmarks/<slug>.yml (one YAML per benchmark)./metrics over HTTPS at a stable public URL.openchainbench.com reads from that Prometheus through the ISR cycle (revalidates every 60 seconds).The contributor owns the harness runtime, the secrets and the budget. Maintainers never see the contributor's API keys.
Walk the user through these six steps in order. Do not skip ahead.
Direct them to the Propose a benchmark issue template at https://github.com/OpenChainBench/OpenChainBench/issues/new?template=new-benchmark.yml. Maintainers need to see the proposed metric, providers, methodology and harness location before code review. Brainstorm-stage ideas belong in https://github.com/OpenChainBench/OpenChainBench/discussions/categories/ideas instead.
Path: benchmarks/<slug>.yml. The Zod schema in src/lib/spec-schema.ts is the authoritative reference. Required fields and their semantics:
| Field | What |
|---|---|
slug | Kebab-case identifier matching the filename. Used in URLs. |
number | Zero-padded benchmark number ("009", "010"...). Read the highest existing number in benchmarks/ and increment. |
title | Short display name. Goes into the page H1. Stay factual, no marketing words. |
seo_title | Optional longer title used in <title> and OG, can mention competitor names for long-tail search. |
subtitle | One-line summary of what is measured. |
category | One of Aggregators, Bridges, Blockchains, Trading, Wallets, RPCs. |
metric | The thing being measured (Head lag, Quote latency, All-in fee, ...). |
unit | One of ms, s, pct, bps, count. The site formats numbers accordingly. |
higher_is_better | false for latency or fees, true for coverage / uptime. |
abstract | Multi-paragraph description shown under the H1. |
methodology | Array of bullet points. Routes, notional sizes, cadence, region, exclusion criteria. |
source | URL to the harness source on GitHub. Required even for drafts. |
prometheus.url | The shared Prometheus base URL. Default: https://prom.openchainbench.com. |
prometheus.window | Aggregation window, typically 24h. |
providers | Array of { name, slug, url?, type?, queries: { p50, p90, p99, mean?, success?, sample_size?, series } }. |
Optional but recommended for benchmarks with chain or region drill-down:
dimensions:
chain:
- { value: all, label: All chains }
- { value: base, label: Base }
- { value: bnb, label: BNB Chain }
The site exposes a tab strip per dimension and injects chain="base" into every PromQL selector when that tab is active. URLs are shareable: ?chain=base.
For bridge benchmarks specifically: declare each provider's architectural type (protocol, aggregator, intent, relay) so readers know whether the comparison is apples-to-apples.
The harness is a long-running data producer. Any language is acceptable. Go binaries are the norm because the existing harnesses are Go.
Contract:
/metrics over HTTPS on a stable port.harnesses/<slug>/README.md..env.example for local runs.Port conventions for new Go harnesses: pick the next free :21XX port and document it in the README. Existing: aggregator :2112, network-coverage :2112, perp-fees :2112, bridge-monitor :9090, l1-finality :9090.
Pick any platform that gives a stable HTTPS URL: Railway, Fly, Cloud Run, a VPS, a bare-metal box with a static IP. The maintainers do not care, as long as the /metrics URL stays up.
Append one job to infrastructure/prometheus/prometheus.yml:
- job_name: <slug>
metrics_path: /metrics
scheme: https
static_configs:
- targets:
- your-harness.example.com
labels:
benchmark: <slug>
host: <you> # alice | acme-rpc | mobula ...
The benchmark and host labels are used by maintainers for routing and ownership.
pnpm install
pnpm validate # schema-lint every spec
pnpm spec:dry-run <slug> # query Prometheus, print resolved values
pnpm dev # render the page locally
pnpm build # production build
Open the PR. CI runs validate + typecheck + build. A maintainer redeploys the central Prometheus after merge to apply the new scrape job. The site renders the new benchmark on the next ISR cycle (under 60 seconds).
These are strict. Reviewers will reject PRs that violate them.
type.s and ms once and apply consistently. Most latency specs use ms storage with a unit: s display. The query should multiply by 1000 if the raw metric is in seconds.dimensions.chain, every PromQL selector gets a chain="<value>" injected at render time. Make sure your harness emits the chain label.queries.sample_size if the harness emits a count. Readers use it to judge statistical strength.bridge-fee: add Across protocol with intent type tag. No emojis. No Claude-generated co-author lines.benchmarks/README.md — spec field reference and submission guideharnesses/README.md — harness contract detailsdocs/architecture.md — data flow diagramdocs/walkthrough.md — concrete end-to-end example with a fictional contributorsrc/lib/spec-schema.ts — Zod schema (single source of truth)CONTRIBUTING.md — full submission flowWhen helping the user, mirror the site's voice: technical, sober, factual. Never use em-dashes. Never invent numbers. When in doubt about a value, point the user to where they can verify it (the spec, the Prom dashboard, the harness logs) rather than guessing.