Nexisgen is a Bittensor-style data subnet implementation. Miners produce interval-based video clip datasets, and validators verify those datasets, score miners, and submit weights on-chain.
This README is an operator-focused guide for:
- understanding miner and validator roles
- setting up and running miners
- setting up and running validators (Docker and local)
- understanding exactly how miner data is validated
- How Nexisgen Works
- Roles: Miner vs Validator
- System Requirements
- Local Project Setup
- Miner Setup and Run
- Validator Setup and Run
- How Miner Data Validation Works
- Dataset and Manifest Format
- Useful Commands
- Troubleshooting
- More Documentation
Nexisgen runs on fixed block intervals:
- one dataset package per miner per interval
- interval length:
50blocks - validator waits for closed interval +
2reserve blocks before evaluation - validator submits chain weights every
250blocks
At a high level:
- Miner generates
dataset.parquet+manifest.jsonfor an interval. - Miner uploads package to storage (Cloudflare R2 via S3 API).
- Validator discovers miners with committed read credentials.
- Validator downloads each miner interval package and validates it.
- Validator accepts/rejects each miner interval and computes scores/weights.
- Validator submits weights to chain (every 250 blocks).
- collects source videos and builds clip records
- creates captions
- writes interval package (
dataset.parquet+manifest.json) - uploads package to bucket
- commits read credentials on-chain so validators can access miner submissions
- discovers miner credentials and active interval submissions
- validates miner datasets with schema and anti-cheat checks
- samples and verifies clip/frame assets
- enforces sampled clip resolution (
1280x720) - runs optional semantic caption checks
- prunes overlap rows and arbitrates cross-miner conflicts
- computes miner scores and submits chain weights
- fetches invalid hotkeys from validation API and zeros them before
set_weights
When validator hotkey equals NEXIS_OWNER_VALIDATOR_HOTKEY, it also:
- publishes accepted metadata bundles (
dataset.parquet,manifest.json) to record-info bucket (NEXIS_RECORD_INFO_BUCKET) - writes the shared overlap index snapshot (
NEXIS_RECORD_INFO_OBJECT_KEY) - can run an independent
nexis sync-owner-datasetsworker to copy full assets into owner dataset bucket (NEXIS_OWNER_DB_BUCKET)
Install these before running miner or validator:
yt-dlpffmpegffprobe
- Python
>=3.10,<3.13 - access to Bittensor wallet files
- Cloudflare R2 credentials (account id + read/write keys)
- Docker Engine
- Docker Compose v2
cd nexisgen
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
cp .env.example .envEdit .env and fill required values before running commands.
At minimum, set wallet, Cloudflare R2 credentials, source file path, and
NEXIS_DATASET_CATEGORY.
Shared buckets require explicit account IDs:
NEXIS_RECORD_INFO_ACCOUNT_ID and NEXIS_OWNER_DB_ACCOUNT_ID.
Validators rely on this to discover miner buckets.
nexis commit-credentialsnexis mineOptional:
# choose spec explicitly
nexis mine --spec video_v1
# debug logging
nexis mine --debug
# override polling interval
nexis mine --poll-sec 4Miner behavior:
- long-running process (stop with
Ctrl+C) - builds one package per 50-block interval
- skips interval if manifest already exists
You can run a validator in either of these ways:
- Docker: recommended for most operators because it is easier to deploy, update, and keep isolated from host Python dependencies
- Local (non-Docker): supported for development, debugging, or operators who prefer managing the Python environment directly
Choose one setup path below. Do not run both on the same validator instance.
This is the best default choice for production or long-running validator nodes.
cd docker
cp validator.env.example validator.env
cp compose.env.example compose.env
chmod 600 validator.env compose.envEdit:
compose.envBT_WALLET_HOST_PATH
validator.env- wallet/wallet_path/api_key values
Start validator + watchtower:
docker compose --env-file compose.env -f docker-compose.validator.yml up -dCheck logs:
docker logs -f nexis-validator
docker logs -f nexis-watchtowerUse this path if you want to run the validator directly on the host instead of in Docker.
From project root, complete Local Project Setup first so the virtualenv and
dependencies are installed. If .env does not already exist, create it from
the example file:
cp .env.example .envThen edit .env with the validator settings you need and run:
nexis validateOptional:
# validate specific specs
nexis validate --specs video_v1
# enable debug output (recommended while tuning)
nexis validate --debug
# runtime hotkey exclusions (API blacklist is always enforced)
nexis validate --exclude-hotkeys hotkey1,hotkey2
# override polling interval
nexis validate --poll-sec 4Validator checks miner submissions in layers. A miner interval is accepted only if all required checks pass.
- Discover + fetch
- discover miners from metagraph + committed credentials
- download
manifest.jsonanddataset.parquet
- Manifest and identity checks
- manifest must match miner hotkey and interval id
- spec and protocol/schema versions must be compatible and enabled
- Integrity checks
manifest.dataset_sha256must match downloaded dataset hashmanifest.record_countmust match dataset row count
- Schema + hard checks (full dataset)
- row schema must parse correctly
- source URLs must be YouTube (
youtube.com/youtu.be) - clip overlap policy (
>=5sgap) must hold - captions must pass lexical checks (non-empty, not too short, not URL-like)
- Sampled asset verification
- validator samples rows
- verifies clip/frame assets against SHA256 fields
- validates sampled clip resolution is exactly
1280x720
- Optional semantic caption check
- model checks whether caption matches sampled multi-frame visual context
- Category validation (nature/landscape/scenery)
- requires manifest category metadata
- caption-only gate
- strict vision check on middle timeline frames for borderline captions
- Overlap pruning
- rows already seen in global index are pruned
- cross-miner same-source overlaps are arbitrated by earliest manifest time
- Decision + scoring
- emits per-miner accept/reject decision with failure reasons
- API maintains invalid-hotkey windows (
interval_id-500tointerval_id) - validator zeros API-invalid hotkeys before submitting chain weights
Run validator with debug:
nexis validate --debugValidator outputs per-interval decision JSON including:
accepted(true/false)failures(list of failure reason codes)sampled_rowsnotes(record/sample counts, overlap prune counts, spec id)
Optional: forward signed interval results to central evidence API by setting:
NEXIS_VALIDATION_API_URLNEXIS_VALIDATION_API_TIMEOUT_SEC
Miner submissions use:
dataset.parquetwith clip-level rowsmanifest.jsonwith interval metadata and hashes
Core dataset columns include:
clip_id,clip_uri,clip_sha256first_frame_uri,first_frame_sha256source_video_id,source_video_urlclip_start_sec,duration_secwidth,height,fps,num_frames,has_audiocaption,source_proof
Manifest includes:
protocol_version,schema_versionspec_id/dataset_typecategory(for category-aware validator checks)netuid,miner_hotkey,interval_idcreated_atrecord_countdataset_sha256
Current default spec: video_v1.
# commit miner read credentials for validator discovery
nexis commit-credentials
# run miner
nexis mine
# run validator
nexis validate
# run independent owner dataset copy worker (every 60s)
nexis sync-owner-datasets --poll-sec 60- No miner data validated
- ensure miners have run
nexis commit-credentials - verify validator can read metagraph and bucket credentials
- ensure miners have run
- Semantic checks failing unexpectedly
- disable with
NEXIS_VALIDATOR_SEMANTIC_CHECK_ENABLED=falsefor isolation - if
OPENAI_API_KEYis set, validator usesgpt-4o - if
OPENAI_API_KEYis unset andGEMINI_API_KEYis set, validator usesgemini-3.1-flash-lite-preview - confirm timeout/model settings and provider key configuration
- disable with
- Source authenticity failures
- confirm
yt-dlpandffmpegare installed and working - verify miner
source_video_urlis valid and reachable
- confirm
- Docker wallet issues
- ensure
BT_WALLET_HOST_PATHis correct indocker/compose.env - ensure
BT_WALLET_PATH=/walletsindocker/validator.env
- ensure
- miner guide:
docs/miner.md - validator guide:
docs/validator.md - validator docker deployment:
docker/README.md - dataset schema details:
docs/dataset-schema.md - adding new dataset specs:
docs/adding-dataset-spec.md