# 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. - [Emission weights](https://www.bittensor.com/llms.mdx/docs/concepts/emission-weights/content.md): How a subnet owner divides alpha emission between owner, validators and miners, and how root TAO stakers are paid their baseline share off the top of the validator slot every block. - [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. - [Beta tokens](https://www.bittensor.com/llms.mdx/docs/concepts/beta-tokens/content.md): A share in one validator’s root basket. The count stays put. The TAO value moves. - [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. - [Chain consensus](https://www.bittensor.com/llms.mdx/docs/concepts/chain-consensus/content.md): How Subtensor produces and finalizes blocks today, and the planned transition from Proof of Authority to Nominated Proof of Stake. - [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. - [Root Reborn](https://www.bittensor.com/llms.mdx/docs/guides/root-reborn/content.md): Validator baskets — why root yield stopped being force-sold, how the fund works, and the btcli commands to allocate, trade, and claim. - [Basket trading](https://www.bittensor.com/llms.mdx/docs/guides/basket-trading/content.md): How a root validator rebalances its beta basket with swap_basket — the trader proxy, the btcli and SDK flow, every guardrail with its default and error, and what governance can change. - [Basket trading for governance](https://www.bittensor.com/llms.mdx/docs/guides/basket-trading-governance/content.md): How the root key enables, freezes, and tunes validator basket trading — what each knob bounds, the worst-case loss formula, how to read a fund's trading status, and the playbook for a suspected rogue trader key. - [Basket trading for stakers](https://www.bittensor.com/llms.mdx/docs/guides/basket-trading-for-stakers/content.md): What runtime v461 basket trading means if you stake on root — nothing to do, what stays the same, how to see what your validator holds and trades, what the guardrails protect, and how to move if you disagree. - [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. - [Null consensus](https://www.bittensor.com/llms.mdx/docs/guides/null-consensus/content.md): Configure Null epochs, submit precise integer weights to large subnets, and safely switch back to Yuma. - [Etao](https://www.bittensor.com/llms.mdx/docs/guides/etao/content.md): Release notes for Etao (runtime v480, root-off-the-top fix in v481) — subnets choose how their alpha emission is split between owner, validators and miners, while root TAO stakers are paid their baseline share off the top every block. What changed, the rules, the migration, and the CLI. - [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. - Precompiles - [Precompiles](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/content.md): Addresses, implementations, and reference pages for Bittensor EVM precompiles. - [BLS12-381 verification](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/bls12-381/content.md): EIP-2537 curve operations, encodings, gas costs, and a Solidity BLS signature verification example. - [Extrinsic coverage](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/extrinsic-coverage/content.md): Audit of typed EVM coverage for every extrinsic in the authorized runtime pallets. - [Balance transfer](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/balance-transfer/content.md): Reference for the deployed BalanceTransferPrecompile. - [Staking V1](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/staking-v1/content.md): Reference for the deployed legacy StakingPrecompile. - [Metagraph](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/metagraph/content.md): Reference for the deployed MetagraphPrecompile. - [Subnet](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/subnet/content.md): Reference for the deployed SubnetPrecompile. - [Neuron](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/neuron/content.md): Reference for the deployed NeuronPrecompile. - [Staking V2](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/staking-v2/content.md): Reference for the deployed StakingPrecompileV2. - [UID lookup](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/uid-lookup/content.md): Reference for the deployed UidLookupPrecompile. - [Storage query](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/storage-query/content.md): Reference for the deployed selectorless StorageQueryPrecompile. - [Alpha](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/alpha/content.md): Reference for the deployed AlphaPrecompile. - [Crowdloan](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/crowdloan/content.md): Reference for the deployed CrowdloanPrecompile. - [Leasing](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/leasing/content.md): Reference for the deployed LeasingPrecompile. - [Proxy](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/proxy/content.md): Reference for the deployed ProxyPrecompile. - [Address mapping](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/address-mapping/content.md): Reference for the deployed AddressMappingPrecompile. - [Voting power](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/voting-power/content.md): Reference for the deployed VotingPowerPrecompile. - [Account balance](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/account-balance/content.md): Reference for the deployed BalancePrecompile. - [Scheduler](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/scheduler/content.md): Typed EVM interface for Scheduler metadata. - [Drand](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/drand/content.md): Typed EVM interface for stored Drand randomness. - [Timestamp](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/timestamp/content.md): Typed EVM interface for Timestamp pallet state. - [Runtime configuration](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/runtime-configuration/content.md): Typed EVM views for global runtime configuration. - [Precompile registry](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompiles/registry/content.md): Registry for precompile availability. - [Precompile design and lifecycle](https://www.bittensor.com/llms.mdx/docs/guides/evm/precompile-design/content.md): How Bittensor precompiles preserve compatibility and how projects relay selected Substrate events to EVM contracts. - [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. - [Null consensus testnet validation](https://www.bittensor.com/llms.mdx/docs/internals/null-consensus-testnet/content.md): Verify a reviewed Null runtime and its full SDK, CLI, timelock, emission and mode-switch path before mainnet approval. - [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 25b3866e13abe5c0492624d6365b9c4e5f69ed27. - 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