Cortex is a Python Bittensor subnet with two live challenges: Bounty and Proof. Read AGENTS.md, the architecture, and the naming contract before changing protocol or deployment code.
Linux, Python 3.12 or 3.13, uv, Docker Compose, and libsodium are required.
sudo apt-get install libsodium23
uv sync --locked --extra chain --group buildRun the same offline gates as CI:
uv run --no-sync ruff format --check src tests scripts
uv run --no-sync ruff check src tests scripts
uv run --no-sync mypy
uv run --no-sync pytest -m 'not live'
uv run --no-sync python scripts/check_repo.py --final
uv run --no-sync python scripts/check_deploy.py --check-examples
uv build --no-build-isolationCI never rents a GPU, contacts OpenRouter, boots Firecracker, or submits chain weights. Tests substitute those external boundaries while exercising real HTTP, SQLite, signatures, RLM state, scoring, sealing, and validator verification.
- Do not change the frozen files named by
scripts/check_repo.py. - Preserve the
BASE_*aliases andbase-*-v1signature domains. - Keep challenge content out of Git. Proof topics are signed operator data.
- A product/API change must update the matching
docs/external-miner/page. - Never weaken a fail-closed path to make a smoke test pass.
- Every bug fix needs a regression test at the public boundary it affected.
Target main, fill in the pull request template, and request a Greptile review.
Use Conventional Commit subjects no longer than 72 characters:
type(scope): lowercase summary
Supported types are feat, fix, refactor, perf, test, docs, chore,
build, ci, style, and revert.
Do not publish vulnerability details or credentials in issues, logs, fixtures, or test output. Use the process in SECURITY.md.
Participation is governed by CODE_OF_CONDUCT.md.