Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
714 changes: 357 additions & 357 deletions docs/errors.mdx

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions sdk/python/bittensor/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from .. import __version__, wallets
from .._generated.errors import ERRORS
from ..config import get as config_default
from ..error_descriptions import DESCRIPTIONS
from ..intents import list_tools
from ..result import EXPLANATIONS, REMEDIATION, ErrorCode, classify_error
from ..settings import DEFAULT_NETWORK
Expand Down Expand Up @@ -326,6 +327,7 @@ def _chain_error_matches(query: str) -> list[dict[str, str]]:
"name": info.name,
"code": code.value,
"docs": info.docs,
"description": DESCRIPTIONS.get(info.name, ""),
"help": REMEDIATION[code],
}
)
Expand Down
11 changes: 8 additions & 3 deletions sdk/python/bittensor/cli/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -1496,6 +1496,8 @@ def _print_failure(self, result: ExtrinsicResult) -> None:
return
if error.name:
self._sub_diag("note", f"the chain rejected the call with `{error.name}`")
if error.description:
self._sub_diag("note", error.description)
self._sub_diag("help", error.remediation)
if result.explorer_url:
self._sub_diag("see", result.explorer_url)
Expand Down Expand Up @@ -1554,8 +1556,10 @@ def error_catalog(self, title: str, records: list[dict[str, str]]) -> None:
self._out.print(f"[dim]{len(records)} {suffix}[/dim]")

def explain_chain(self, matches: list[dict[str, str]]) -> None:
"""Explain exact chain error names: the on-chain docs plus the semantic
code each classifies to. One block per pallet when a name collides."""
"""Explain exact chain error names: the researched description (trigger
plus where to check) with the on-chain docs as fallback, and the
semantic code each classifies to. One block per pallet when a name
collides."""
if self.json_mode:
self._json(matches[0] if len(matches) == 1 else matches)
return
Expand All @@ -1568,7 +1572,8 @@ def explain_chain(self, matches: list[dict[str, str]]) -> None:
header.append(f"{match['pallet']}.{match['name']}")
self._out.print(header)
self._out.print()
self._out.print(_prose(_diagnostic(match["docs"] or match["name"])))
body = match.get("description") or match["docs"] or match["name"]
self._out.print(_prose(_diagnostic(body)))
self._out.print()
self._sub_diag("help", match["help"], console=self._out)
for code in dict.fromkeys(match["code"] for match in matches):
Expand Down
1,845 changes: 1,845 additions & 0 deletions sdk/python/bittensor/error_descriptions.py

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion sdk/python/bittensor/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from typing import Any, Optional

from ._generated.errors import ERRORS
from .error_descriptions import DESCRIPTIONS as _DESCRIPTIONS
from .error_map import NAME_TO_CODE as _NAME_TO_CODE
from .error_map import ErrorCode

Expand Down Expand Up @@ -311,13 +312,23 @@ def remediation(self) -> str:
return help_text
return REMEDIATION[self.code]

@property
def description(self) -> Optional[str]:
"""What triggered this exact chain error and where to check, from the
per-name table in :mod:`bittensor.error_descriptions`. ``None`` when the
failure carried no module error name (e.g. a pool rejection)."""
return _DESCRIPTIONS.get(self.name) if self.name else None

def to_dict(self) -> dict[str, Any]:
return {
payload = {
"message": self.message,
"name": self.name,
"code": self.code.value,
"remediation": self.remediation,
}
if self.description:
payload["description"] = self.description
return payload


def chain_error_from_substrate_request(error: Exception) -> ChainError:
Expand Down
19 changes: 16 additions & 3 deletions sdk/python/codegen/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,24 +329,37 @@ def check_coverage() -> int:

def check_names() -> int:
from bittensor._generated.errors import ERRORS
from bittensor.error_descriptions import DESCRIPTIONS
from bittensor.error_map import NAME_TO_CODE, ErrorCode
from bittensor.result import classify_error

catalog = {info.name for info in ERRORS.values()}
stale = sorted(name for name in NAME_TO_CODE if name not in catalog)
unclassified = sorted(name for name in catalog if classify_error("", name) is ErrorCode.UNKNOWN)
undescribed = sorted(name for name in NAME_TO_CODE if name not in DESCRIPTIONS)
orphan_descriptions = sorted(name for name in DESCRIPTIONS if name not in NAME_TO_CODE)
if stale:
print(f"STALE: error names classified by the SDK but absent from chain: {stale}")
if unclassified:
print(
"UNCLASSIFIED: chain error names with no semantic code "
f"(add them to bittensor/error_map.py): {unclassified}"
)
if stale or unclassified:
if undescribed:
print(
"UNDESCRIBED: classified error names with no description "
f"(add them to bittensor/error_descriptions.py): {undescribed}"
)
if orphan_descriptions:
print(
"ORPHANED: described error names no longer classified "
f"(remove them from bittensor/error_descriptions.py): {orphan_descriptions}"
)
if stale or unclassified or undescribed or orphan_descriptions:
return 1
print(
f"names ok: all {len(catalog)} chain error names classify to a semantic code "
"and no mapped name is stale"
f"names ok: all {len(catalog)} chain error names classify to a semantic code, "
"every classified name is described, and no mapped name is stale"
)
return 0

Expand Down
Loading
Loading