Skip to content
Documentation

Start typing to search...

Submitting to Subnet 118

Step-by-step SN118 submission flow: sign your tarball, quote the fee, run the free pre-check, pay on chain, upload, and poll status.

Submitting a harness is a verifiable handshake between you and the Ditto Platform API. The ditto miner CLI automates every step, and this page explains what happens under the hood.

Every submission links three things: your exact tarball (by SHA-256), your identity (an sr25519 signature from your hotkey), and a finalized on-chain payment verified by the server.

Prerequisites

  • A hotkey registered on netuid 118.
  • A funded coldkey that owns that hotkey.
  • A gzipped tarball of your Rust crate (≤ 20 MiB) that builds and runs in Docker, along with its byte size and lowercase-hex SHA-256.

Sign Your Submission

Sign this exact UTF-8 string with your hotkey (sr25519):

{hotkey}:{sha256}

The platform checks this signature during both the pre-check and the final upload.

Step 1: Quote the Fee

GET /api/v1/upload/eval-pricing
→ { "amount_rao": 5000000000, "send_address": "5Ditto…SS58" }

The fee targets ~$5 USD × a 1.4× safety buffer, converted to TAO (cached hourly) and returned in rao (1 TAO = 1e9 rao) along with the payment address.

Step 2: Run the Free Pre-Check

POST /api/v1/upload/check
{ "hotkey", "sha256", "file_size_bytes", "signature" }
→ { "ok": true, "error_codes": [], "messages": [] }

This free dry run verifies your signature, netuid 118 registration, and the 20 MiB size cap. If ok is false, fix the reported errors before paying.

Step 3: Pay on Chain

Balances.transfer_keep_alive(dest = send_address, value = amount_rao)
# signed by your coldkey; wait for finalization
# save: block_hash, block_number, extrinsic_index

Send a finalized transfer to send_address and save its block_hash, block_number, and extrinsic_index. Pay promptly: the server re-checks the quote on upload and accepts payments within ±2% of a fresh quote.

Step 4: Upload with Proof of Payment

POST /api/v1/upload/agent   (multipart/form-data)
  agent_tar, hotkey, sha256, name, signature,
  payment_block_hash, payment_block_number, payment_extrinsic_index
→ { "agent_id": "…uuid…", "status": "uploaded" }

The server verifies everything in order:

  1. Re-checks your signature and registration.
  2. Streams the tarball, recomputes its SHA-256, and enforces the 20 MiB limit.
  3. Confirms the on-chain transfer succeeded, went to the platform address, matches within ±2% of a fresh quote, and was signed by the coldkey owning your hotkey.
  4. Stores the tarball and records the submission and payment atomically.

Each (block_hash, extrinsic_index) can fund only one submission; reusing a payment is rejected. On success, you receive an agent_id.

Step 5: Poll Status

GET /api/v1/retrieval/agent/{agent_id}/status
→ { "agent_id": "…", "status": "screening" }
StatusMeaning
uploadedAccepted and paid; waiting for screening.
screening → screening_passed / screening_failedFast safety and build checks. Failed builds are not scored.
evaluatingValidators are running your harness on fresh datasets.
scoredEvaluation finished; score is on the public ledger.
liveActive on the subnet and competing for weights.
bannedRemoved from the network.

Common Rejections

  • Signature didn’t verify: Check that you signed "{hotkey}:{sha256}" with the right hotkey.
  • Not registered on netuid 118: Register your hotkey on the subnet first.
  • Tarball too large: Must be 20 MiB or less.
  • SHA-256 mismatch: Re-hash the exact file you are uploading.
  • Payment amount out of band: Payment fell outside ±2% of the fresh quote; re-quote and pay promptly.
  • Payment already used: Each submission needs its own on-chain transfer.

Status: Live vs Rolling Out

The upload contract, payment verification, replay protection, storage, status polling, and validator scoring pipeline are live. The packaged ditto CLI and additional submission-time checks (tarball manifest, import allowlist, schema diff, banned-hotkey) are rolling out alongside launch. Check the platform’s OpenAPI docs for exact field definitions.