Skip to content
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
f472452
describe every chain error with its trigger and where to check
unarbos Jul 13, 2026
3e4f4bc
restore PEP 740 provenance attestations on PyPI releases
unarbos Jul 13, 2026
d316a45
expose every owner-settable hyperparameter and describe each in the l…
unarbos Jul 13, 2026
7b548b6
give each hyperparameter an explainer page with a playable demo
unarbos Jul 13, 2026
a66ae53
add a parameter-specific chart to every hyperparameter explainer page
unarbos Jul 13, 2026
8ab26eb
add activity_cutoff_factor hyperparameter, expose derived hyperparams…
unarbos Jul 14, 2026
66944fe
describe the new TAO and Alpha insufficient-balance error variants
unarbos Jul 14, 2026
088eae1
preserve dissolution stake settlement cursor
unarbos Jul 14, 2026
d359d53
split InsufficientBalance into TAO and Alpha variants
unarbos Jul 14, 2026
a7743d8
refund unswapped tao in stake_into_subnet at price limit
unarbos Jul 14, 2026
201a2e8
remove alpha transfer cap bypass in move_stake
unarbos Jul 14, 2026
06e22e9
charge alpha-based fees for hotkey swaps
unarbos Jul 14, 2026
92ebe74
account for check_nonce weight in extension
unarbos Jul 14, 2026
7949e89
wire cleanup_swap_v3 and orphan subnet-identity migrations
unarbos Jul 14, 2026
d06c697
add optional jemalloc allocator feature for the node
unarbos Jul 14, 2026
6529178
document neuron precompile methods
unarbos Jul 14, 2026
b5cffc5
add signer-side srtool verification script
unarbos Jul 14, 2026
0826b89
defer wallet-security details to multisig and proxy guides
unarbos Jul 14, 2026
21adad3
alias staging docs via the deployments api
unarbos Jul 14, 2026
a4f3d8d
fix wrong and outdated doc comments
unarbos Jul 14, 2026
51c89df
bump brace-expansion, lodash, picomatch, and flatted in website
unarbos Jul 14, 2026
70f2a73
regen sdk generated-file headers to spec 430
unarbos Jul 14, 2026
796fae5
bump spec_version to 431
unarbos Jul 14, 2026
621edcd
surface keyfile errors as clean cli failures in wallet commands
unarbos Jul 14, 2026
13f6d60
document v431 chain and runtime changes in migration guide and releas…
unarbos Jul 14, 2026
9ded802
restore devnet and testnet docker image publishing
unarbos Jul 14, 2026
c6b7442
beautify the extension signing bridge ui
unarbos Jul 14, 2026
18a6b4d
Charge identity migration weight for every scanned entry
unarbos Jul 14, 2026
f3f90ce
fix clippy duplicate attribute and ruff formatting
unarbos Jul 14, 2026
9ad3920
surface actionable bridge errors in the signing page UI
unarbos Jul 14, 2026
ee87586
Finish dissolution hotkey cleanup when on_idle weight runs out
unarbos Jul 14, 2026
6a15266
ci: lock cargo-audit installation
UnArbosFive Jul 14, 2026
127e9cb
Fix btcli/docs audit issues ahead of v431 release.
unarbos Jul 14, 2026
cb2ce82
Fix CI: dissolve cursor borrow and e2e manifest count.
unarbos Jul 14, 2026
e13c7bb
Mark mechanism emission split as raw-only for coverage.
unarbos Jul 14, 2026
b27ab99
fix(runtime): preserve deprecated tempo call indices
UnArbosFour Jul 14, 2026
4fb248b
Fix clippy needless borrow in destroy_alpha_tests.
unarbos Jul 14, 2026
66022e8
fix(runtime): make deprecated tempo calls no-op
UnArbosFour Jul 14, 2026
ebff258
Retry flaky GHCR docker pushes in e2e image job.
unarbos Jul 14, 2026
44af61a
Merge pull request #2906 from RaoFoundation/fix/preserve-tempo-call-i…
unarbos Jul 14, 2026
9596e35
Validate hyperparameter values against codec and semantic bounds.
unarbos Jul 14, 2026
1b5a108
Fix CI: ruff-format hyperparams and clippy indexing in tempo tests.
unarbos Jul 14, 2026
5406f31
Mark deprecated tempo call stubs raw-only and refresh docs catalogs.
unarbos Jul 14, 2026
dc96d2b
Regenerate SDK metadata layer for runtime spec 431.
unarbos Jul 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 19 additions & 1 deletion .github/scripts/deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,25 @@ btcli multisig pending -w <ms> # pending sudo-multisig ops; also lists pending

Do not sign a WASM you were simply handed. srtool builds are deterministic:
identical source at the same toolchain produces a byte-identical runtime. The
pre-release tag *is* the code being deployed, so:
pre-release tag *is* the code being deployed.

The short version is one command (requires docker). Run it from a checkout
you already trust — reviewed `main`, not the proposal tag, so the proposal
cannot supply the verifier that vouches for it:

```
git fetch origin && git checkout origin/main
./scripts/verify-upgrade.sh
```

It downloads the release manifest and wasm, fetches the proposal commit and
rebuilds it from a pristine clone in the same srtool container CI used,
byte-compares the result against the released runtime, runs
`btcli upgrade check` against the chain if btcli is installed, and prints
the `btcli upgrade sign` command pinned to your own build. It never submits
anything.

The manual recipe, if you prefer to run each step yourself:

```
git fetch origin && git checkout v<spec>
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cargo-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
sccache-writer-secret-access-key: ${{ secrets.SCCACHE_R2_WRITE_SECRET_ACCESS_KEY }}

- name: Install cargo-audit
run: cargo install --force cargo-audit
run: cargo install --force --locked cargo-audit

- name: cargo audit
# Each ignore is a known, accepted advisory; revisit when bumping
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-bittensor-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
run: |
set -euo pipefail
manifest=sdk/bittensor-core/tests/e2e-manifest.json
jq -e 'length == 113' "$manifest" >/dev/null
jq -e 'length == 112' "$manifest" >/dev/null
jq -e 'map(.test) | length == (unique | length)' "$manifest" >/dev/null
jq -e 'all(.[]; (.test | startswith("intent_")) or (.test | startswith("test_")))' "$manifest" >/dev/null
test_matrix=$(jq -c . "$manifest")
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ jobs:
npx --yes vercel build --token "$VERCEL_TOKEN"
url=$(npx --yes vercel deploy --prebuilt --token "$VERCEL_TOKEN")
echo "Deployed: $url"
npx --yes vercel alias set "$url" "staging.$DOCS_DOMAIN" --token "$VERCEL_TOKEN"
# `vercel alias set` only accepts domains in the team-level domain
# registry; staging.$DOCS_DOMAIN is attached (and verified) at the
# project level, so the CLI rejects it with "you don't have access
# to the domain". The deployments API honors project domains.
dep_id=$(curl -sf -H "Authorization: Bearer $VERCEL_TOKEN" \
"https://api.vercel.com/v13/deployments/${url#https://}?teamId=$VERCEL_ORG_ID" \
| node -pe 'JSON.parse(require("fs").readFileSync(0, "utf8")).id')
curl -sf -X POST \
-H "Authorization: Bearer $VERCEL_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"alias\":\"staging.$DOCS_DOMAIN\"}" \
"https://api.vercel.com/v2/deployments/$dep_id/aliases?teamId=$VERCEL_ORG_ID" > /dev/null
echo "Aliased to https://staging.$DOCS_DOMAIN" >> $GITHUB_STEP_SUMMARY
fi
22 changes: 12 additions & 10 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: Publish Docker Image

# Node images publish on runtime releases and on demand. Releases cut by
# watch-mainnet-release.yml use the default GITHUB_TOKEN, which never emits
# `release: published`; the watcher therefore dispatches this workflow
# directly with the release tag. Release-version tags (vN) move :latest.
# Node images publish when a network mirror moves, on runtime releases, and on
# demand. Releases cut by watch-mainnet-release.yml use the default
# GITHUB_TOKEN, which never emits `release: published`; the watcher therefore
# dispatches this workflow directly with the release tag. Release-version tags
# (vN) move :latest; network mirror tags do not.

on:
release:
types: [published]
push:
branches: [devnet, testnet]
workflow_dispatch:
inputs:
tag:
Expand All @@ -31,7 +34,9 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag || github.ref_name }}
# Push/release events carry the immutable promoted commit. Manual
# dispatches may override it with a branch or tag.
ref: ${{ github.event.inputs.tag || github.sha }}

- name: Resolve immutable source revision
id: ref
Expand Down Expand Up @@ -116,18 +121,15 @@ jobs:
runs-on: [self-hosted, fireactions-turbo-8]
timeout-minutes: 30
steps:
- name: Determine tag, ref, and image name
- name: Determine tag and image name
env:
INPUT_TAG: ${{ github.event.inputs.tag || github.ref_name }}
run: |
ref="$INPUT_TAG"
# `ref` is what we check out (a real branch/tag, may contain '/').
# Docker tags cannot contain '/', so derive the tag by replacing any
# disallowed characters — otherwise a ref like `feat/x` fails tag
# validation at push time.
tag="${ref//[^a-zA-Z0-9._-]/-}"
tag="${INPUT_TAG//[^a-zA-Z0-9._-]/-}"
echo "tag=$tag" >> $GITHUB_ENV
echo "ref=$ref" >> $GITHUB_ENV
# Move :latest for release events and for dispatched release-version
# tags (the watcher dispatches with tag=vN because its GITHUB_TOKEN
# release cannot fire the `release` trigger).
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/publish-sdk-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ jobs:
working-directory: sdk/python
run: uv build --out-dir ../../dist

# PEP 740 provenance, same as the rc/stable publish jobs. Running it on
# the dev channel means a broken attestation step fails here on every
# push to main instead of for the first time during a release.
- name: Generate PEP 740 attestations
uses: astral-sh/attest-action@f589a42a7efb6fe400b4f400de60b4bc90390027 # v0.0.6

- name: Publish to TestPyPI
run: |
uv publish --trusted-publishing always \
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release-train.yml
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,12 @@ jobs:
- name: Build SDK wheel and sdist
working-directory: sdk/python
run: uv build --out-dir ../../dist
# PEP 740 provenance: sign every dist with this job's OIDC identity
# (must match the trusted publisher, so it runs here rather than in
# build-core-wheels.yml). uv publish uploads the resulting
# *.publish.attestation files alongside each dist.
- name: Generate PEP 740 attestations
uses: astral-sh/attest-action@f589a42a7efb6fe400b4f400de60b4bc90390027 # v0.0.6
# --check-url makes a re-run after a partial upload idempotent: files
# already on the index are skipped instead of failing with a 400
# duplicate (e.g. the SDK wheel landed but bittensor-core didn't).
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/watch-mainnet-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,14 @@ jobs:
working-directory: sdk/python
run: uv build --out-dir ../../dist

# PEP 740 provenance: sign every dist with this job's OIDC identity.
# Must happen here, not in build-core-wheels.yml — PyPI only accepts
# attestations whose Sigstore identity matches the trusted publisher
# doing the upload. uv publish picks up the *.publish.attestation
# files from dist/ automatically.
- name: Generate PEP 740 attestations
uses: astral-sh/attest-action@f589a42a7efb6fe400b4f400de60b4bc90390027 # v0.0.6

# --check-url makes a re-run after a partial upload idempotent: files
# already on the index are skipped instead of failing with a 400
# duplicate (e.g. the SDK wheel landed but bittensor-core didn't).
Expand Down
12 changes: 12 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ contracts alongside native Substrate extrinsics.
| Shared Rust | [`common/`](./common/), [`primitives/`](./primitives/), [`support/`](./support/) | Shared types, math primitives, lints, macros, weight tooling. |
| Client core | [`sdk/bittensor-core/`](./sdk/bittensor-core/) | 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/bittensor-core-py/`](./sdk/bittensor-core-py/). |
| Python SDK | [`sdk/python/`](./sdk/python/) | The `bittensor` package and `btcli` CLI. Generated from chain metadata so reads, writes, and docs cannot drift. |
| Documentation | [`docs/`](./docs/) | Source for bittensor.com/docs. `docs/tx/`, `docs/query/`, and `docs/errors.mdx` are generated — do not hand-edit. |
| Documentation | [`docs/`](./docs/) | Source for bittensor.com/docs. `docs/tx/`, `docs/query/`, and `docs/errors/` are generated — do not hand-edit. |
| Website | [`website/`](./website/) | Yarn + Turbo monorepo; `apps/bittensor-website` renders marketing pages and these docs. |
| Tests | [`ts-tests/`](./ts-tests/), [`clones/`](./clones/), [`eco-tests/`](./eco-tests/) | Moonwall/zombienet integration tests, mainnet-clone regression harness, indexer contract tests. |
| Operations | [`chainspecs/`](./chainspecs/), [`scripts/`](./scripts/), [`Dockerfile`](./Dockerfile) | Chain specs, CI/dev scripts, production and localnet Docker images. |
Expand Down
2 changes: 1 addition & 1 deletion chain-extensions/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ parameter_types! {
pub const InitialColdkeySwapAnnouncementDelay: u64 = 50;
pub const InitialColdkeySwapReannouncementDelay: u64 = 10;
pub const InitialDissolveNetworkScheduleDuration: u64 = 5 * 24 * 60 * 60 / 12; // Default as 5 days
pub const InitialTaoWeight: u64 = 0; // 100% global weight.
pub const InitialTaoWeight: u64 = 0; // 0% TAO weight.
pub const InitialEmaPriceHalvingPeriod: u64 = 201_600_u64; // 4 weeks
pub const InitialStartCallDelay: u64 = 7 * 24 * 60 * 60 / 12; // Default as 7 days
pub const InitialKeySwapOnSubnetCost: TaoBalance = TaoBalance::new(10_000_000);
Expand Down
4 changes: 4 additions & 0 deletions chain-extensions/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ impl From<DispatchError> for Output {
Some("SlippageTooHigh") => Output::SlippageTooHigh,
Some("SubnetNotExists") => Output::SubnetNotExists,
Some("SameAutoStakeHotkeyAlreadySet") => Output::SameAutoStakeHotkeyAlreadySet,
Some("InsufficientTaoBalance") => Output::InsufficientBalance,
Some("InsufficientAlphaBalance") => Output::InsufficientBalance,
// Other pallets (e.g. swap, crowdloan) still emit their own
// `InsufficientBalance`; keep mapping it to the same ABI code.
Some("InsufficientBalance") => Output::InsufficientBalance,
Some("AmountTooLow") => Output::AmountTooLow,
Some("InsufficientLiquidity") => Output::InsufficientLiquidity,
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"title": "Concepts",
"pages": ["network", "emissions", "wallets", "money", "client", "transactions", "advanced"]
"pages": ["network", "emissions", "wallets", "money", "staking-pools", "client", "transactions", "advanced"]
}
4 changes: 3 additions & 1 deletion docs/concepts/money.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ slippage.

## Slippage

Staking and unstaking are swaps against a pool, so the trade itself moves the
Staking and unstaking are swaps against a pool
([staking and pools](/docs/concepts/staking-pools) explains the pool
mechanics with interactive charts), so the trade itself moves the
price: your order consumes reserves as it fills, and the gap between what the
spot price promised and what you actually receive grows with the trade's size
relative to the pool's liquidity. Strictly, that self-inflicted gap is
Expand Down
Loading
Loading