docs/architecture.md:1-7.
High-level pipeline
Source:docs/architecture.md:11-23.
Main components
Source:
docs/architecture.md:27-37.
Subnet integration
BASE is responsible for miner-facing upload security. It verifies signatures, timestamps, nonces, and hotkey identity before forwarding a submission to PRISM. PRISM receives verified submissions on the internal bridge route:src/prism_challenge/app.py:68-75; docs/architecture.md:39-52.
Execution model
PRISM does not execute miner submissions directly in the master process. The worker performs static inspection and the LLM hard gate, then sends the project to an isolated evaluator container through the Docker broker:- AST sandbox hard-blocks over both scripts.
- Forced-seed
build_modelinstantiation and the 150M parameter cap. - The multi-GPU static contract and single-node bound.
docs/architecture.md:64-80.
Forced-init re-execution (anti-cheat core)
The challenge harness drives every scored run; the miner code only supplies the model and the loop body.- The harness writes a challenge-owned runner that imports the miner’s
architecture.pyandtraining.py, sets the global seeds and deterministic flags before any miner code runs, then launchestorchrun --standalone --nnodes=1 --nproc-per-node=1. - The runner installs an instrumented loss capture. The data iterator yields fresh, single-pass batches from the read-only locked
trainsplit in a challenge-controlled order, and the challenge records each per-batch loss before the optimizer updates on it. Because the data is single-pass, this online training loss is the prequential code-length by construction. - The challenge authors
prism_run_manifest.v2.jsonfrom the captured stream. Any manifest the miner writes is discarded; any metric the miner reports is ignored.
artifacts_dir, uses network=none, and is bounded by a wall-clock budget that is only a safety cap, never part of the score.
Source: docs/architecture.md:82-102.
State model
PRISM stores state in SQLite. Important tables includeminers, submissions, eval_jobs, gpu_leases, scores, submission_sources, llm_reviews, plagiarism_reviews, and epochs.
eval_jobstracks each evaluation attempt (including thelevel='l1'static-tracking placeholder created at submission time, which is not GPU work).gpu_leasesrecords the exclusive single-GPU lease for a scored run.scoresholds the challenge-computed prequential bits-per-bytefinal_scoreand its metrics payload.
docs/architecture.md:104-121; src/prism_challenge/db.py:100-159.
Scoring flow
After the forced-init re-execution completes with a valid challenge-authoredprism_run_manifest.v2.json, scoring computes everything from the challenge-owned capture:
- the prequential bits-per-byte primary score (lower bpb yields a better
final_score); - the held-out delta-over-random-init tie-breaker on the secret
valsplit; - the train-vs-held-out anti-memorization gap, which penalizes an excessive gap;
- a step-0 / smuggled-weights anomaly multiplier that zeroes an anomalous run.
final_score with a deterministic earliest-commit-wins tie-break, and get_weights returns one normalized, dry-run weight per hotkey. Weights are never written on-chain.
Source: docs/architecture.md:123-146; src/prism_challenge/repository.py:506; src/prism_challenge/weights.py:21-31.
The weights module
get_weights converts completed scores into normalized weights: it reads each epoch’s score rows and keeps, per hotkey, the best final_score, then normalizes the survivors to sum to 1.0. Weights are always dry-run.
Source: src/prism_challenge/weights.py:21-31; docs/scoring.md:80-89; docs/architecture.md:162.
Failure handling
A submission ends in one of these states:pending, running, completed, failed, rejected, or held.
- Rejected - failed static review, the two-script contract, the LLM hard gate, or duplicate review.
- Failed - passed the gates but failed the re-execution, scoring, or infrastructure.
- Held - quarantined by the LLM review pending operator attention.
docs/architecture.md:148-162.
See PRISM API for the full route list and Running PRISM for deployment.