Bittensor monorepo consolidation: SDK, py-sp-core, website, docs, clones, CI, and release train#2841
Open
unarbos wants to merge 613 commits into
Open
Bittensor monorepo consolidation: SDK, py-sp-core, website, docs, clones, CI, and release train#2841unarbos wants to merge 613 commits into
unarbos wants to merge 613 commits into
Conversation
Contributor
eco-tests changed — indexer review requiredThis PR modifies files under Changed files
|
…d-request auth, and CI/SDK follow-ups. Co-authored-by: Cursor <cursoragent@cursor.com>
…and CI action. - cargo update: openssl 0.10.81, quinn-proto 0.11.15, rustls-webpki 0.103.13, yamux 0.13.10, alloy-dyn-abi 1.4.1 - eco-tests: unpin time (=0.3.36 -> 0.3.47) and tracing-subscriber (=0.3.18 -> 0.3.20) - ts-tests: vitest/@vitest/ui 3.2.6 (critical), pnpm 10.34.4, overrides for protobufjs/tar/ws/undici/form-data/minimatch/serialize-javascript/tmp/yaml - check-node-compat: ws 8.21.0, bn.js 5.2.5 - apply-benchmark-patch: action-download-artifact v3 -> v6 (artifact poisoning fix) Co-authored-by: Cursor <cursoragent@cursor.com>
…fication, and SDK/py-sp-core cleanups. Co-authored-by: Cursor <cursoragent@cursor.com>
…eccak, rand (Cargo); uuid, esbuild via pnpm overrides. Co-authored-by: Cursor <cursoragent@cursor.com>
…s, itertools use_alloc for powerset, py-sp-core extension-module linking, sdk uv.lock sync. Co-authored-by: Cursor <cursoragent@cursor.com>
…AssociatedUidsByEvmAddress cleanup, spec 427. Keeps mono-bittensor's deletion of scripts/install_rust.sh and scripts/update-deps-to-path.sh (whitespace-only edits on devnet-ready). Co-authored-by: Cursor <cursoragent@cursor.com>
2 tasks
…not e2e' addopts and actually selects the collected test. Co-authored-by: Cursor <cursoragent@cursor.com>
…ut, fail closed (mirrors PR #2845). Co-authored-by: Cursor <cursoragent@cursor.com>
… pallet_subtensor_proxy, pallet_subtensor_utility) Co-authored-by: Cursor <cursoragent@cursor.com>
…tion. The clone harness logger redirected console output to a temp file nothing ever printed, so the runtime:update:alice failure reason never reached CI; tee to the real console and dump clone/harness logs on failure. The SDK e2e matrix ran pytest without -m e2e, so the default addopts (-m 'not e2e') deselected every collected test. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR lands the monorepo consolidation plus the runtime changes that accumulated on
mono-bittensorsince it diverged frommain(~110 commits, spec version now 426). It is large by nature; the review checklist below points at the load-bearing pieces.What we have done
Monorepo consolidation
sdk/python/— the Python SDK (bittensorpackage) now lives in-repo: intent-based tx API (plan/confirm/execute), generated calls/storage/errors catalogs under_generated/, btcli CLI (wallet, EVM, multisig, extension signer), and a codegen gate (codegen.check --coverage/--names/--drift) that fails CI when the SDK drifts from node metadata.py-sp-core/— new PyO3 crate providing native sp-core key handling to the SDK: sr25519/ed25519 keypairs, SS58, keyfile encryption (NaCl, legacy Fernet, ansible-vault), and PolkadotJS encrypted-JSON import.website/— docs site and website monorepo (Turborepo + Vercel), with tx/query/error reference pages generated from the SDK catalogs; a drift gate fails CI when committed docs pages go stale.clones/— mainnet-clone regression harness: clone mainnet state, sudo-upgrade it to the PR's runtime, then run a curated JS regression suite (npm run test:clone-regressions, 9 tests: balancer, locks/conviction, proxy filters, hotkey swap, emission allocation, issuance trackers) plus the SDK offline suite against the upgraded chain (check-clone-upgrade.yml).Runtime changes (spec 424 → 426)
fee_filters.rslist mirrored into the SDK soplan()warns users before signing.AssociatedEvmAddress+MAX_ASSOCIATED_UIDS_PER_EVM_ADDRESScap with a pruning migration (Charge hotkey-origin fees to the owning coldkey #2570 follow-ups).uidLookupO(1) and bound its cost #2830), start-call error fix (Fix bad start call error name #2811), nonce-reuse avoidance in contract deploy (add finalize after contract deploy #2820), rate-limit cleanup (Remove rate limits for hotkey/coldkey swaps #2727), registry cleanup migration removed (Remove registry pallet cleanup migration #2815).Org transfer
ghcr.io/raofoundation/*), CI workflows, and review tooling moved fromopentensortoRaoFoundation(Org migration: update references for RaoFoundation #2834).CI / release automation
release-train.yml): build runtime once → deploy devnet → smoke → deploy testnet → smoke → publish SDK rc to PyPI → propose mainnet upgrade behind an environment gate + triumvirate multisig. Now also publishespy-sp-coremanylinux wheels alongside the SDK rc.watch-mainnet-release.yml: watches the chain for the executed multisig upgrade, then tags the release, publishes wheels/crates/Docker images, and deploys the prod website. Release SHA now comes from the release-train artifact (pending-release.json) instead ofHEADof main, so docs-only merges after the proposal can't skew the tag.devnet/testnetbranches are force-updated to the deployed commit;mainnetbranch is updated by the watcher once the multisig executes. These branches always reflect what runs on each chain.trusted-prjob that only passes for non-fork PRs, so a fork PR can't execute untrusted code on persistent org hardware.check-bittensor-e2e-tests.ymlno longer clones externalbtcli/bittensorrepos atstaging; it collects and runs the in-repo SDK e2e suite (-m e2e) against the locally built localnet image.verify_finney_evm_association_cap.pyscans live Finney state before proposing spec ≥ 426 and fails if any(netuid, evm_address)bucket exceeds the new cap (the migration would prune entries).SDK / security hardening (final commit)
~/.bittensor/extension_bridge.token, mode 0600); unauthorized websocket clients are rejected, and pending requests fail fast when the bridge page disconnects instead of hanging.py-sp-coreencrypted-JSON import (n ≤ 2^18power of two,r ≤ 8,p = 1) so a malicious keystore JSON can't CPU-DoS the import path; covered by new Rust unit tests including an ed25519 passphrase round-trip.ecdsa/ethereumextension accounts explicitly instead of mis-signing them as ed25519.Executor.plan()for hotkey-signed calls (recurses through proxy/batch/multisig wrappers).Commitments,AdminUtils(derived from the intent registry), andContractspallets.Verification done locally
sdk/python:ruff check+ruff format --checkclean, 824 unit tests pass (1 skipped),codegen.check --coverageand--namespass.py-sp-core: 16 Rust tests pass, including the new scrypt-cap and encrypted-JSON round-trip tests.actionlinton all workflows: no errors (only pre-existing shellcheck style infos).What reviewers should check before merge
Runtime (highest stakes — this ships to mainnet as spec 426)
AssociatedEvmAddressreverse index + cap: verify it's idempotent and try-runtime passes against Finney and testnet state.runtime/src/fee_filters.rsmatchessdk/python/bittensor/fee_filters.pyexactly — these are maintained by hand in two places.no-spec-version-bumpgate behavior.Release automation (can push code to live networks)
release-train.yml: the mainnet proposal path (environment gate, multisig scripts under.github/scripts/deploy/) — confirm the required reviewers on themainnetenvironment are configured in repo settings before this merges.devnet/testnet/mainnetbranches: confirm these branch names are not protected in a way that breaks the mirror step, and that nobody bases work on them.watch-mainnet-release.yml: artifact lookup bymainnet-upgrade-<spec>name — check retention (artifacts expire; a long gap between proposal and execution could losepending-release.json).bittensorandpy-sp-coreunder the RaoFoundation org.CI security
trusted-prfork gate: sanity-check theif:expression on a real fork PR — jobs that already had their ownif:conditions now combine withneeds: trusted-pr, and a skipped gate should skip dependents, not pass them.runs-on: [self-hosted).SDK / bridge
n ≤ 2^18,r ≤ 8,p = 1): confirm these accept every keystore format we need to import (PolkadotJS default is n=32768/r=8/p=1; anything nonstandard in the wild will now be rejected).RAW_ONLYadditions forCommitments/Contracts: agree these calls should stay raw-only rather than getting intents.Monorepo mechanics
sdk/python,website,clones) — confirm we're comfortable with squashed import rather than preserved history.btclistaging suite from PR CI is intentional and that coverage moved intotests/e2e/.Not verified locally: full Rust workspace tests, try-runtime, e2e suites, and website build — these run in CI on this PR.
Made with Cursor