# Bittensor ## Searching these docs Every docs link in this file is already raw markdown. Fetch it directly; do not scrape HTML. Grep the corpus as if it were local: - This index: `https://www.bittensor.com/llms.txt` - Full corpus (for `rg`, not for stuffing into context): `curl -s https://www.bittensor.com/llms-full.txt | rg -n ''` - One page: https://www.bittensor.com/llms.mdx/docs//content.md - JSON catalogs: https://www.bittensor.com/catalog/intents.json, https://www.bittensor.com/catalog/reads.json, https://www.bittensor.com/catalog/errors.json (each entry has `markdown_url` for prose and, where known, `sources`/`hits` with `raw_url`) - Chain source search: `curl -s 'https://www.bittensor.com/code/search.json?q='` - Chain source by path: `curl -s https://www.bittensor.com/code/index.json` then `curl -s https://www.bittensor.com/code/raw/` - Clone for heavy exploration (docs in docs/): `git clone --depth 1 https://github.com/RaoFoundation/subtensor` ## Reference catalogs Per-op and per-query pages are omitted here (they dominate the tree). Prefer the JSON catalogs; each entry carries `markdown_url` (raw prose), `docs_url` (HTML), and often `sources` / `hits` with `raw_url` into `/code`. - Transactions: https://www.bittensor.com/catalog/intents.json - Queries: https://www.bittensor.com/catalog/reads.json - Errors: https://www.bittensor.com/catalog/errors.json — semantic codes under `.codes`, chain names under `.chain_errors` (see `.note`) - Hyperparameters landing: https://www.bittensor.com/llms.mdx/docs/hyperparameters/content.md - Full prose dump: https://www.bittensor.com/llms-full.txt - [Bittensor Documentation](https://www.bittensor.com/llms.mdx/docs/content.md): Do anything on the Bittensor chain with the Bittensor SDK and CLI. - [Quickstart](https://www.bittensor.com/llms.mdx/docs/quickstart/content.md): Install, connect, read chain state, and submit your first transaction. - [The SDK](https://www.bittensor.com/llms.mdx/docs/sdk/content.md): The five core primitives — Subtensor, Wallet, Balance, intents, and results — and their one-line constructors. - [For agents](https://www.bittensor.com/llms.mdx/docs/agents/content.md): How an agent discovers, previews, and safely executes any Bittensor operation. - [The CLI](https://www.bittensor.com/llms.mdx/docs/cli/content.md): Configuration, global options, generated commands, and non-interactive use. - Concepts - [The network](https://www.bittensor.com/llms.mdx/docs/concepts/network/content.md): Subnets, miners, validators, stakers, TAO and alpha, emissions, and epochs. - [Emissions](https://www.bittensor.com/llms.mdx/docs/concepts/emissions/content.md): TAO and alpha issuance, halvings, subnet emission shares, the per-tempo split, and Yuma Consensus. - [Wallets and keys](https://www.bittensor.com/llms.mdx/docs/concepts/wallets/content.md): Coldkeys, hotkeys, key material and backups, security tiers, key rotation, and how address arguments resolve. - [Money](https://www.bittensor.com/llms.mdx/docs/concepts/money/content.md): The Balance type, TAO vs alpha, rao, and valuing stake without lying to yourself. - [Staking and pools](https://www.bittensor.com/llms.mdx/docs/concepts/staking-pools/content.md): The per-subnet balancer pools, what a stake operation actually does, price impact, swap fees, and MEV-shielded submission. - [The client](https://www.bittensor.com/llms.mdx/docs/concepts/client/content.md): Connecting, the three levels of reading chain state, blocks and waiting, and snapshots. - [The transaction model](https://www.bittensor.com/llms.mdx/docs/concepts/transactions/content.md): Intents, plan and execute, Policy guardrails, and typed results. - [Advanced submission](https://www.bittensor.com/llms.mdx/docs/concepts/advanced/content.md): Proxies, atomic batches, MEV-shielded submission, multisig, and raw calls. - Guides - [Staking](https://www.bittensor.com/llms.mdx/docs/guides/staking/content.md): Back validators with TAO, manage positions across subnets, and claim root dividends. - [Conviction locks](https://www.bittensor.com/llms.mdx/docs/guides/conviction/content.md): Lock alpha on a subnet, accrue conviction toward a hotkey, and understand the path to subnet ownership — with a worked example on Subnet 7. - Mining - [Mining](https://www.bittensor.com/llms.mdx/docs/guides/mining/content.md): Register a hotkey on a subnet, publish your axon, and keep your UID. - [Registration burn](https://www.bittensor.com/llms.mdx/docs/guides/mining/burn/content.md): The floating registration price — how it decays, jumps, and what the burned share buys. - [Registration collateral](https://www.bittensor.com/llms.mdx/docs/guides/mining/collateral/content.md): Lock a share of the registration price as a bond you earn back through emission; misbehave and it stays frozen. - [Validating](https://www.bittensor.com/llms.mdx/docs/guides/validating/content.md): Register, attract stake, score miners with weights, and manage take and childkeys. - [Running a subnet](https://www.bittensor.com/llms.mdx/docs/guides/subnets/content.md): Create a subnet, activate it, tune hyperparameters, and manage its identity and economics. - [Multisig wallets](https://www.bittensor.com/llms.mdx/docs/guides/multisig/content.md): Put a coldkey under M-of-N control so no single stolen or lost key can move your funds. - [Proxy accounts](https://www.bittensor.com/llms.mdx/docs/guides/proxies/content.md): Keep the coldkey offline and do daily work through scoped, revocable, optionally delayed delegate keys. - [Signed requests](https://www.bittensor.com/llms.mdx/docs/guides/signed-requests/content.md): Hotkey-signed HTTP between validators and miners — the btauth/1 wire format, framework recipes, and cross-language notes. - [Signing with a browser extension](https://www.bittensor.com/llms.mdx/docs/guides/extension-signing/content.md): Sign any transaction with Talisman, Polkadot.js, or another wallet extension — the private key never touches the machine running the CLI. - [Signing with a Ledger](https://www.bittensor.com/llms.mdx/docs/guides/ledger/content.md): Sign any transaction on a Ledger hardware wallet with the Polkadot generic app — the key never leaves the device, and every transaction is decoded and verified on its screen. - [Signing with Polkadot Vault](https://www.bittensor.com/llms.mdx/docs/guides/vault/content.md): Sign any transaction from a permanently offline phone with Polkadot Vault — transactions travel by QR code, the key never touches a networked device, and every QR carries its own metadata proof. - EVM - [EVM](https://www.bittensor.com/llms.mdx/docs/guides/evm/content.md): Use the Bittensor EVM from the terminal — keys, funding, MetaMask, precompiles, and the ss58 ↔ h160 seam. - [Deploy a contract](https://www.bittensor.com/llms.mdx/docs/guides/evm/deploy-a-contract/content.md): From an empty directory to a live contract on the Bittensor EVM, with Hardhat or Remix. - [Read chain state](https://www.bittensor.com/llms.mdx/docs/guides/evm/read-chain-state/content.md): The metagraph, alpha, uid-lookup, and balance precompiles — free view calls from the CLI, Python, and Solidity. - [Stake from the EVM](https://www.bittensor.com/llms.mdx/docs/guides/evm/stake-from-evm/content.md): The staking-v2 precompile — CLI sugar, raw calls, and a contract that stakes what it receives. - [Subnet and neuron operations](https://www.bittensor.com/llms.mdx/docs/guides/evm/subnet-and-neuron/content.md): Register a subnet, register neurons, serve an axon, and set weights — from an EVM key. - [Verify substrate keys](https://www.bittensor.com/llms.mdx/docs/guides/evm/verify-keys/content.md): Check ed25519/sr25519 signatures in contracts, and associate an EVM key with a hotkey. - [Local development](https://www.bittensor.com/llms.mdx/docs/guides/local-development/content.md): Run a local subtensor chain and test wallets, subnets, and neurons against it. - [Running a node](https://www.bittensor.com/llms.mdx/docs/guides/running-a-node/content.md): Operate a mainnet or testnet subtensor node — lite or archive, with Docker or from source. - [Timelock](https://www.bittensor.com/llms.mdx/docs/guides/timelock/content.md): Seal data anyone can open at a known future time — nobody, including you, can open it early. - [Migrating from v9/v10](https://www.bittensor.com/llms.mdx/docs/migration/content.md): Complete mapping from the legacy bittensor SDK (v10) and bittensor-cli (v9) to the unified v11 package — written so an LLM can upgrade your scripts from this page alone. - [Releases](https://www.bittensor.com/releases) - [Code](https://www.bittensor.com/code) - **Reference** - Transactions - [Transactions](https://www.bittensor.com/llms.mdx/docs/tx/content.md): Every state-changing operation: one page per intent, generated from the SDK. - Queries - [Queries](https://www.bittensor.com/llms.mdx/docs/query/content.md): Every chain read: one page per query, generated from the SDK. - Errors - [Errors](https://www.bittensor.com/llms.mdx/docs/errors/content.md): Every failure carries a machine-readable code and a remediation hint. - Hyperparameters - [Hyperparameters](https://www.bittensor.com/llms.mdx/docs/hyperparameters/content.md): What each subnet hyperparameter controls, its unit, and how to change it. - **Contributing** - Internals: Runtime internals and contributor documentation - [Contributing](https://www.bittensor.com/llms.mdx/docs/internals/contributing/content.md): PR lifecycle, review requirements, labels, and how a merge rides the release train to devnet, testnet, and mainnet. - [Repository layout](https://www.bittensor.com/llms.mdx/docs/internals/repo-layout/content.md): What lives where — a map of the subtensor monorepo for new contributors. - [Release process](https://www.bittensor.com/llms.mdx/docs/internals/release-process/content.md): How a merge to main becomes a runtime upgrade on devnet, testnet, and mainnet, and how the release train's artifacts are published. - [Yuma Consensus](https://www.bittensor.com/llms.mdx/docs/internals/consensus/content.md): The consensus mechanism, its game-theoretic framework, Monte Carlo simulations, and consensus guarantees. - [Transaction priority](https://www.bittensor.com/llms.mdx/docs/internals/transaction-priority/content.md): How custom transaction extensions determine extrinsic priority in subtensor. - [Benchmarks and weights](https://www.bittensor.com/llms.mdx/docs/internals/benchmarks-and-weights/content.md): How extrinsic weights are benchmarked, generated, and validated in CI. - [Testing](https://www.bittensor.com/llms.mdx/docs/internals/testing/content.md): How to run every test suite in the repo — Rust unit tests, TypeScript integration tests, and migration checks. - [Mainnet clone testing](https://www.bittensor.com/llms.mdx/docs/internals/mainnet-clone/content.md): How CI sudo-upgrades a clone of live mainnet with your runtime, and how to reproduce it locally when it fails. - [Python SDK tests](https://www.bittensor.com/llms.mdx/docs/internals/sdk-tests/content.md): The SDK test layers, the fake-substrate harness, and how to regenerate codegen bindings and golden fixtures after a runtime change. - [Eco-tests (indexer contract)](https://www.bittensor.com/llms.mdx/docs/internals/eco-tests/content.md): What the eco-tests pin, why they run on every PR, and what to do when one fails. - [WASM smart contracts](https://www.bittensor.com/llms.mdx/docs/internals/wasm-contracts/content.md): Deploy ink! smart contracts on subtensor via pallet-contracts and the custom chain extension. - [Rust setup](https://www.bittensor.com/llms.mdx/docs/internals/rust-setup/content.md): Prepare a computer for Substrate development. - [Repository scripts](https://www.bittensor.com/llms.mdx/docs/internals/scripts/content.md): What each script in scripts/ does, what depends on it, and when to run the manual tools. ## Chain source code The Rust that runs on the chain (pallets, runtime, primitives — no tests/mocks/benchmarks), at commit 89eb75f38fb3121fdd041d642331cc975dd20d94. - Search: https://www.bittensor.com/code/search.json?q= - Index: https://www.bittensor.com/code/index.json - Browse: https://www.bittensor.com/code/ with #L or #L-L line anchors - Plain text: https://www.bittensor.com/code/raw/ - Roots: pallets, runtime, primitives, common, precompiles, chain-extensions