[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-93361":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":9,"totalLinesOfCode":9,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":9,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":19,"topics":21,"createdAt":9,"pushedAt":9,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":28,"discoverSource":29},93361,"subtensor","RaoFoundation\u002Fsubtensor","RaoFoundation","Bittensor Blockchain Layer",null,"https:\u002F\u002Fgithub.com\u002FRaoFoundation\u002Fsubtensor","Rust",365,324,16,247,0,2,45.74,false,"main",[22,23,24],"blockchain","rust","substrate","2026-07-22 04:02:08","```commandline             _      _\n███████╗██╗   ██╗██████╗ ████████╗███████╗███╗   ██╗███████╗ ██████╗ ██████╗\n██╔════╝██║   ██║██╔══██╗╚══██╔══╝██╔════╝████╗  ██║██╔════╝██╔═══██╗██╔══██╗\n███████╗██║   ██║██████╔╝   ██║   █████╗  ██╔██╗ ██║███████╗██║   ██║██████╔╝\n╚════██║██║   ██║██╔══██╗   ██║   ██╔══╝  ██║╚██╗██║╚════██║██║   ██║██╔══██╗\n███████║╚██████╔╝██████╔╝   ██║   ███████╗██║ ╚████║███████║╚██████╔╝██║  ██║\n╚══════╝ ╚═════╝ ╚═════╝    ╚═╝   ╚══════╝╚═╝  ╚═══╝╚══════╝ ╚═════╝ ╚═╝  ╚═╝\n\n```\n\n# Subtensor\n\n[![CodeQL](https:\u002F\u002Fgithub.com\u002FRaoFoundation\u002Fsubtensor\u002Factions\u002Fworkflows\u002Fgithub-code-scanning\u002Fcodeql\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FRaoFoundation\u002Fsubtensor\u002Factions)\n[![Discord Chat](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F308323056592486420.svg)](https:\u002F\u002Fdiscord.gg\u002Fbittensor)\n\nThe Bittensor monorepo. It contains the **subtensor** chain (a Substrate-based\nblockchain), the **Python SDK and `btcli`**, the **documentation**, and the\n**website** that renders it — all in one place so a single change can be\nvalidated end-to-end before it ships.\n\n**Full documentation:** [bittensor.com\u002Fdocs](https:\u002F\u002Fbittensor.com\u002Fdocs)\n\nThat site is the source of truth for using Bittensor: install, wallets,\nstaking, subnets, EVM, every transaction and query, error codes, and\ncontributor guides. The markdown lives in [`docs\u002F`](.\u002Fdocs\u002F) and is published\nby [`website\u002F`](.\u002Fwebsite\u002F).\n\n## What Bittensor is\n\nBittensor is an open network where independent **subnets** produce digital\ncommodities — compute, inference, storage, prediction — and the chain pays\nparticipants in **TAO** in proportion to the value they contribute. **Miners**\nproduce, **validators** score, **subnet owners** define incentive mechanisms,\nand **stakers** back validators.\n\nThe **subtensor** chain is the trust layer: it runs consensus, records subnet\nand neuron state, handles staking and emissions, and moves value. Work itself\nhappens off-chain inside subnets; the chain coordinates and pays for it.\nSubtensor also exposes a full **EVM** (Frontier) and **ink!\u002Fwasm** smart\ncontracts alongside native Substrate extrinsics.\n\n## What's in this repo\n\n| Area | Path | What it is |\n|------|------|------------|\n| Chain runtime | [`pallets\u002F`](.\u002Fpallets\u002F), [`runtime\u002F`](.\u002Fruntime\u002F) | FRAME pallets and the composed runtime. `pallets\u002Fsubtensor\u002F` is the core (staking, subnets, emissions, weights). |\n| Node | [`node\u002F`](.\u002Fnode\u002F) | The `node-subtensor` binary: networking, RPC, chain specs. |\n| EVM | [`precompiles\u002F`](.\u002Fprecompiles\u002F) | Precompiles that expose substrate functionality to EVM contracts. |\n| Wasm contracts | [`chain-extensions\u002F`](.\u002Fchain-extensions\u002F), [`ink-contract\u002F`](.\u002Fink-contract\u002F) | Chain extensions and ink! contract sources. |\n| Shared Rust | [`common\u002F`](.\u002Fcommon\u002F), [`primitives\u002F`](.\u002Fprimitives\u002F), [`support\u002F`](.\u002Fsupport\u002F) | Shared types, math primitives, lints, macros, weight tooling. |\n| Client core | [`sdk\u002Fbittensor-core\u002F`](.\u002Fsdk\u002Fbittensor-core\u002F) | The Rust core for Bittensor clients (keypairs, keyfiles, SCALE codec, extrinsic assembly, RFC-0078 digest, drand timelock, ML-KEM) — built against the same crate revisions as the chain; Python bindings in [`sdk\u002Fbittensor-core-py\u002F`](.\u002Fsdk\u002Fbittensor-core-py\u002F). |\n| Python SDK | [`sdk\u002Fpython\u002F`](.\u002Fsdk\u002Fpython\u002F) | The `bittensor` package and `btcli` CLI. Generated from chain metadata so reads, writes, and docs cannot drift. |\n| Documentation | [`docs\u002F`](.\u002Fdocs\u002F) | Source for bittensor.com\u002Fdocs. `docs\u002Ftx\u002F`, `docs\u002Fquery\u002F`, and `docs\u002Ferrors\u002F` are generated — do not hand-edit. |\n| Website | [`website\u002F`](.\u002Fwebsite\u002F) | Yarn + Turbo monorepo; `apps\u002Fbittensor-website` renders marketing pages and these docs. |\n| Tests | [`ts-tests\u002F`](.\u002Fts-tests\u002F), [`clones\u002F`](.\u002Fclones\u002F), [`eco-tests\u002F`](.\u002Feco-tests\u002F) | Moonwall\u002Fzombienet integration tests, mainnet-clone regression harness, indexer contract tests. |\n| Operations | [`chainspecs\u002F`](.\u002Fchainspecs\u002F), [`scripts\u002F`](.\u002Fscripts\u002F), [`Dockerfile`](.\u002FDockerfile) | Chain specs, CI\u002Fdev scripts, production and localnet Docker images. |\n\nDeeper map: [Repository layout](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Finternals\u002Frepo-layout).\n\n## How the monorepo fits together\n\nA runtime change can break the SDK, the docs, or live mainnet state. This\nrepo keeps those surfaces in sync:\n\n1. **Metadata-driven SDK.** The Python layer (`bittensor.storage`, `runtime_api`,\n   `calls`, `constants`) is emitted from a node's runtime metadata. Hand-written\n   **reads** and **intents** sit on top; the CLI (`btcli query …`, `btcli tx …`)\n   is generated from the same registries. CI proves every chain call is either\n   wrapped by an intent or explicitly marked raw-only.\n\n2. **Docs generated from the same registries.** Transaction, query, and error\n   reference pages in `docs\u002F` are built from the SDK catalogs, so\n   bittensor.com\u002Fdocs always matches what `btcli` and `import bittensor` expose.\n\n3. **CI validates the whole stack.** On every PR, Rust checks run alongside a\n   [mainnet-clone upgrade](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Finternals\u002Fmainnet-clone)\n   (your runtime applied to a copy of live state), Python SDK suites, and a docs\n   build. Runtime migrations are replayed with try-runtime.\n\n4. **Release train.** Merging to `main` builds the runtime once (deterministic\n   srtool build) and promotes it devnet → testnet → mainnet. The SDK and docs\n   publish after the chain upgrade lands. See\n   [Release process](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Finternals\u002Frelease-process).\n\n## Where to start\n\nPick the path that matches what you are doing — the linked docs have the detail.\n\n| You want to… | Start here |\n|--------------|------------|\n| Install the SDK and run your first query\u002Ftx | [Quickstart](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Fquickstart) |\n| Use `btcli` or the Python API day-to-day | [CLI](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Fcli) · [SDK README](.\u002Fsdk\u002Fpython\u002FREADME.md) |\n| Build an agent on top of the chain | [For agents](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Fagents) · [`\u002Fcatalog\u002Fintents.json`](https:\u002F\u002Fbittensor.com\u002Fcatalog\u002Fintents.json) |\n| Understand subnets, TAO, epochs, wallets | [Concepts](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Fconcepts\u002Fnetwork) |\n| Run a local chain for development | [Local development](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Fguides\u002Flocal-development) |\n| Operate a mainnet\u002Ftestnet node | [Running a node](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Fguides\u002Frunning-a-node) |\n| Develop or change the chain\u002Fruntime | [Rust setup](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Finternals\u002Frust-setup) · [Testing](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Finternals\u002Ftesting) |\n| Contribute a PR | [Contributing](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Finternals\u002Fcontributing) · [CONTRIBUTING.md](.\u002FCONTRIBUTING.md) |\n\n### Minimal local chain (Docker)\n\n```bash\ndocker run --rm --name local_chain \\\n  -p 9944:9944 -p 9945:9945 \\\n  ghcr.io\u002Fraofoundation\u002Fsubtensor-localnet:devnet\n```\n\nUse `:testnet` for the commit deployed to testnet or `:main` for the current\nmain-branch candidate; `:latest` is an alias for `:main`. The `:devnet` and\n`:testnet` tags move only after the release train verifies that commit on the\ncorresponding live network. Immutable `:sha-\u003Ccommit>` tags are also published\nfor reproducible CI.\n\nThen connect with `btcli --network local query is-fast-blocks` or\n`bittensor.Client(\"local\")`. See\n[local development](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Fguides\u002Flocal-development)\nfor building from source, the Alice dev account, and faucet behavior.\n\n### Minimal chain build (from source)\n\n```bash\n.\u002Fscripts\u002Finit.sh        # Rust toolchain + wasm target\n.\u002Fscripts\u002Flocalnet.sh    # build and launch a fast-blocks localnet\n```\n\nThe node binary is `node-subtensor` (`cargo build --release` →\n`.\u002Ftarget\u002Frelease\u002Fnode-subtensor`). Extrinsic and query reference:\n[Transactions](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Ftx) ·\n[Queries](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Fquery).\n\n### Minimal SDK dev (from this repo)\n\n```bash\ncd sdk\u002Fpython\njust sync    # uv environment; builds bittensor-core from ..\u002Fbittensor-core-py (in sdk\u002F)\njust check   # lint, typecheck, unit tests, codegen gates (same as CI)\n```\n\nChain-facing SDK coverage lives in the Rust core e2e suite:\n`cargo test -p bittensor-core --test e2e -- --nocapture`. See\n[SDK tests](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Finternals\u002Fsdk-tests).\n\n## Chain architecture (high level)\n\n```\n                    ┌─────────────────────────────────────┐\n                    │           node-subtensor            │\n                    │  (libp2p, RPC, tx pool, executor)   │\n                    └─────────────────┬───────────────────┘\n                                      │ executes\n                    ┌─────────────────▼───────────────────┐\n                    │     node-subtensor-runtime (wasm)     │\n                    │  ┌─────────────┐  ┌────────────────┐  │\n                    │  │ pallet-     │  │ Frontier EVM   │  │\n                    │  │ subtensor   │  │ + precompiles  │  │\n                    │  │ + swap,     │  │ + pallet-      │  │\n                    │  │   shield,   │  │   contracts    │  │\n                    │  │   proxy, …  │  └────────────────┘  │\n                    │  └─────────────┘                       │\n                    └───────────────────────────────────────┘\n```\n\n- **Runtime** (`runtime\u002Fsrc\u002Flib.rs`): composes pallets, defines\n  `spec_version`, hosts migrations and runtime APIs.\n- **Core pallet** (`pallets\u002Fsubtensor\u002F`): subnets, registration, staking,\n  weights, emissions, delegates, commitments.\n- **EVM**: Substrate accounts (ss58) and EVM accounts (h160) are separate\n  signing domains on the same chain; precompiles bridge staking and balances\n  into Solidity. Guide: [EVM](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Fguides\u002Fevm).\n- **Networks**: `finney` (mainnet), `test` (testnet), `local` (dev node).\n  Public endpoints and lite vs archive nodes:\n  [The network](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Fconcepts\u002Fnetwork).\n\n## Contributing\n\nOpen PRs against `main`. Runtime-affecting changes need tests, a `spec_version`\nbump (or the `no-spec-version-bump` label), and three positive reviews. Full\nlifecycle and release train:\n[Contributing](https:\u002F\u002Fbittensor.com\u002Fdocs\u002Finternals\u002Fcontributing).\n\n## License\n\nSee [LICENSE](.\u002FLICENSE). Individual crates may declare their own SPDX\nidentifier in `Cargo.toml` \u002F `pyproject.toml`.\n\n## Community\n\n- [Discord](https:\u002F\u002Fdiscord.gg\u002Fbittensor)\n- [GitHub](https:\u002F\u002Fgithub.com\u002FRaoFoundation\u002Fsubtensor)\n","Subtensor 是 Bittensor 网络的底层区块链层，基于 Substrate 框架构建，负责协调去中心化机器学习子网（subnets）的共识、状态存储、代币经济（TAO 分发）、质押与权重验证。其核心功能包括原生 Substrate 运行时（含 staking、subnet 管理、权重计算）、集成 EVM（Frontier）及 ink!\u002FWasm 智能合约支持，并通过预编译合约桥接链上链下逻辑。适用于需要可扩展、模块化、支持 AI 计算激励结算的去中心化基础设施场景，尤其适配机器学习模型训练、推理与数据服务的链上治理与价值分配。","2026-07-17 02:30:06","trending"]