Skip to content

fix(deps): bump bittensor to 10.3.0 — fixes NetUid(u16) metagraph sync failure

Choose a tag to compare

@Arrmlet Arrmlet released this 16 Jul 23:14
8a341ae

Fix

  • bittensor==9.9.0 → 10.3.0 in requirements.txt.
  • Lowercase class aliases removed in 10.x → renamed the references the codebase used (type annotations + constructors only; bt.logging and .config attribute access untouched): bt.subtensor→bt.Subtensor, bt.metagraph→bt.Metagraph, bt.wallet→bt.Wallet, bt.axon→bt.Axon, bt.dendrite→bt.Dendrite, bt.config(...)→bt.Config(...).
  • substrate-interface dropped. 10.x no longer depends on it, and it drags in scalecodec, which conflicts with 10.x's cyscale and breaks import bittensor outright. common/api_client.py now imports Keypair from bittensor_wallet (fallback to the legacy package for older installs), and the stale substrate-interface==1.7.11 pin is removed.

Verification (end-to-end on 10.3.0, live finney)

  • MetagraphSyncer.do_initial_sync() — the exact class in the stack trace — now succeeds: netuid=13, n=256. Fails on the installed 9.0.0.
  • common/api_client.py auth signing (TaoSigner) verified with the bittensor_wallet Keypair — produces valid X-Tao-Signature headers.
  • Confirmed the 10.3.0 environment has no scalecodec (only cyscale), so import bittensor is clean.
  • All edited files compile on py3.11 and py3.13; test_s3_validation_results_client.py passes (4/4).

Rollout safety

bittensor 9.0.0 already exposes the capitalized aliases, so this code change is backward-compatible with the currently-installed SDK — the code and the pip install do not have to flip in the same instant. Deploy: merge → pip install -r requirements.txt on validator/miner hosts → restart.

⚠️ Major version jump (9→10). Recommend one validator host canary before fleet-wide restart, watching for a clean Successfully synced metagraph for 13 and a normal weight-set cycle.