REAX.docs Pre-release · not on testnet
MenuLocal quickstart

Get started

Local harness quickstart

Install the private REAX reference package, run its tests, and run the three-miner loopback harness. The harness exercises the signed serving path and the validator epoch pipeline end to end on your own machine.

Local only

Everything on this page runs on 127.0.0.1 with synthetic data and a mocked chain snapshot. It does not connect to Bittensor, register anything, or move TAO. The reference source is private pre-release; prospective operators can request access through reax.co/apply.

Requirements

Core dependencies are pinned in pyproject.toml: cryptography==50.0.1 for Ed25519, Pillow==12.3.0 and rfc8785==0.1.4 for RFC 8785 canonical JSON. The harness also needs the server extra, which pins uvicorn==0.54.0. The Bittensor SDK (bittensor==11.1.0, extra chain) is not needed for anything on this page.

Install

From the repository root, create a virtual environment and install the package with the server extra:

python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install -e '.[server]'

For a fully hash-locked development environment, install from the lock file instead. It pins every package in scope and verifies published wheel SHA-256 values; source distributions are disabled:

python3 -m pip install --only-binary=:all: --require-hashes -r requirements/dev.lock

Run the tests

python3 -m unittest discover -s tests -v
python3 -m compileall -q src tests

The Makefile wraps the same commands as make test and make compile, plus make typecheck (mypy on Python 3.10). Suites cover the protocol, transport, admission, router, gateway, miner, receipts, scoring, validator epoch and chain guards. Three SDK compatibility tests are skipped unless the pinned Bittensor SDK is installed in an isolated environment.

Run the three-miner harness

Pass an absolute output path in a directory that already exists and that you keep private:

PYTHONPATH=src python3 -m reax_subnet.harness --output /path/to/private/evidence/local-harness.json

The wrapper script does the same thing (despite its name, it does not touch testnet):

scripts/testnet_harness.sh --output /path/to/private/evidence/local-harness.json

With --output, the harness writes the full JSON receipt to that file and prints a one-line summary. Without it, the receipt is printed to standard output. The exit code is 0 when the receipt says "passed": true and 1 otherwise.

{"passed": true, "receipt": "/path/to/private/evidence/local-harness.json"}
--output
Receipt path. Its parent directory must already exist.
--count-per-source
Scheduled probes per miner, default 288 (six synthetic epochs of 48). A short cold start such as --count-per-source 1 intentionally produces no weight vector and exits with 1.

What the harness runs

  1. Three miners on ephemeral loopback ports, each a real MinerApp behind Uvicorn: two simulated EU miners admitted by a signed local admission fixture (gdpr_eu) and one simulated permissionless miner (global_permissionless). Their engine is a synthetic arithmetic engine, not a model.
  2. Three gateway fixtures (one per miner, same ingress identity) serving signed HTTP. Every scored dispatch goes signed gateway HTTP, then signed miner HTTP.
  3. One validator with its own caller key. It generates fresh arithmetic tasks with known answers from a registered deterministic checker, balanced across outcomes, and hashes the entire schedule before any output is inspected.
  4. Six synthetic ledger epochs of 48 probes per miner: 864 scheduled inference requests in total at the default count. Epoch boundaries are wall-clock, not chain tempos.
  5. Scoring and weights through the typed score_epoch and weights_from_epochs pipeline, with signed policy and epoch documents verified against separate ephemeral owner and ingestor keys, and a dry-run weight plan against a mocked chain snapshot.

What a passing receipt shows

What it does not prove

Read before quoting results

The receipt establishes signed loopback serving and synthetic epoch-to-weight computation. It establishes no Bittensor connection, SDK compatibility, registration, on-chain weights, real model performance, independent operator identity or legal EU admission.

Receipt fields worth checking

The receipt schema is reax.local-harness.v2. These keys are the quickest way to confirm what was and was not exercised:

KeyMeaning
passedAll harness assertions held
network"actual signed loopback gateway HTTP to miner HTTP"
miner_count, validator_count, gateway_count3, 1 and 3
scheduled_inference_count3 × --count-per-source
replay_status, gateway_replay_statusHTTP status of the replayed request at miner and gateway
eu_route_to_global_denied, cross_tier_statusTier isolation checks
weightsThe weight decision, including status, applied gains and fidelity states
external_weight_gate_open, customer_gate_openAlways false
chain_connection_proven, sdk_weights_provenAlways false

Keep receipts private. They contain signed policy and epoch document hashes and per-miner scores from your local run.