Multi-challenge Bittensor subnet platform with master/validator orchestration
Validators • Architecture • Challenges • Security • Website
Platform is a Python 3.12 implementation of a multi-challenge Bittensor validator platform. A master validator orchestrates independent challenge containers, exposes a registry and public challenge proxy, collects get_weights from each active challenge, normalizes emissions, maps hotkeys to UIDs, and submits final weights to Bittensor.
Each challenge lives in its own repository, ships its own GHCR Docker image, owns its SQLite state, and exposes a standard FastAPI contract for the master.
- One Platform master validator controls the central registry and orchestration.
- One repo/image per challenge, isolated in Docker.
- Challenges expose only the standard internal
get_weightscontract to Platform. - Public challenge APIs are proxied through
/challenges/{slug}/.... - Master PostgreSQL is private to the master process.
- Challenge state is persistent SQLite mounted as Docker named volumes.
- Validators can run all active challenge containers from the master registry.
- Architecture
- Validator Guide
- Challenges
- Challenge Integration Guide
- Security Model
- Validator Operations
flowchart LR
BT[Bittensor] --> M[Master]
M --> PG[(Postgres)]
M --> DO[Docker]
DO --> C1[Challenge A]
DO --> C2[Challenge B]
C1 --> S1[(SQLite)]
C2 --> S2[(SQLite)]
V[Validator] --> R[Registry]
R --> M
U[Miners] --> P[Proxy]
P --> C1
P --> C2
M --> W[set_weights]
W --> BT
sequenceDiagram
participant E as Epoch
participant M as Master
participant A as Challenge A
participant B as Challenge B
participant G as Aggregator
participant BT as Bittensor
E->>M: trigger
M->>A: GET /internal/v1/get_weights
M->>B: GET /internal/v1/get_weights
A-->>M: hotkey -> weight
B-->>M: hotkey -> weight
M->>G: normalize + emissions
G-->>M: uid weights
M->>BT: set_weights
git clone https://github.com/PlatformNetwork/platform.git
cd ./platform
uv sync --extra dev
uv run pytest
uv run platform --helpRun the private master API:
uv run platform master run --config config/master.example.yamlRun the public proxy API:
uv run platform master proxy --config config/master.example.yamlGenerate a new challenge repository:
uv run platform challenge create code-arena --out ../code-arenaValidate the project:
uv run ruff check .
uv run ruff format --check .
uv run mypy src
uv run pytestEvery challenge image must expose:
GET /healthGET /versionGET /internal/v1/get_weights- optional public routes proxied via
/challenges/{slug}/...
get_weights returns hotkey weights:
{
"challenge_slug": "code-arena",
"weights": {
"5F...hotkey": 1.0
}
}The master normalizes each challenge, applies fixed emission percentages, ignores unknown hotkeys, and sets a challenge contribution to zero if it fails.
platform/
src/platform_network/ # CLI, APIs, orchestration, Bittensor wrappers
alembic/ # PostgreSQL migrations
config/ # YAML example configs
docker/ # Dockerfiles and dev compose
docs/ # Project documentation
plan/ # Detailed design plan
tests/ # Unit/runtime validation tests
Current validation suite:
ruff checkruff format --checkmypy srcmypy -p platform_networkpytestdocker compose config- rendered challenge template tests
Apache-2.0
