-
Notifications
You must be signed in to change notification settings - Fork 409
Description
PRs:
- [v10] Initial PR #3030
- [v10] Add async tests #3039
- [v10] Remove
_do*
extrinsic calls and combine them with extrinsic logic. #3042 - [v10] Standardize extrinsic parameter order #3045
- [v10]
safe-staking
parameter renamed #3046 - [v10] Unify extrinsic return values by introducing an
ExtrinsicResponse
class #3053 - [v10] Removing deprecated extrinsics and replacing them with consistent ones #3064
- [v10] Improved docstrings (replacing
Arguments
withParameters
to match MCP server auto-parsing) #3065 - [v10] remove unused and deprecated stuff #3066
- [v10] Improve extrinsics logic and related subtensor calls #3074
- [v10]
mechid
related changes #3076 - [v10] Subtensor improvement (and related logic) #3077
- [v10] Update auto staking to be compatible with SDKv10 #3078
- [v10] Development framework #3079
- [v10]
serving
extrinsic module refactoring #3080 - [v10] Add
BlockInfo
#3082 - [v10] Fix
argparser
issue #3085 - [v10] SimSwap + Extrinsics Improvement #3091
- [v10] All TODOs resolved #3093
- Update and add new
Markdown
files #3095
Adds:
- Integrate Crowdloan #3017 will be part of SDK v10
Full progress in SDKv10/MIGRATION.md
Plan
Extrinsics and related
- ✅ Standardize parameter order across all extrinsics and related calls. Pass extrinsic-specific arguments first (e.g., wallet, hotkey, netuid, amount), followed by optional general flags (e.g., wait_for_inclusion, wait_for_finalization)
- ✅ Set
wait_for_inclusion
andwait_for_finalization
toTrue
by default in extrinsics and their related calls. Then we will guarantee the correct/expected extrinsic call response is consistent with the chain response. If the user changes those values, then it is the user's responsibility. - ✅ Make the internal logic of extrinsics the same. There are extrinsics that are slightly different in implementation.
- ✅
Since SDK is not a responsible tool, try to remove all calculations inside extrinsics that do not affect the result, but are only used in logging. Actually, this should be applied not to extrinsics only but for all codebase.Just improved regarding usage. - ✅ Remove
unstake_all
parameter fromunstake_extrinsic
since we haveunstake_all_extrinsic
which is calles another subtensor function. - ✅
unstake
andunstake_multiple
extrinsics should havesafe_unstaking
parameters instead ofsafe_staking
. - ✅ Remove
_do*
extrinsic calls and combine them with extrinsic logic. - ✅
(subtensor.get_transfer_fee
calls extrinsic inside the subtensor module. Actually the method could be updated by usingbittensor.core.extrinsics.utils.get_extrinsic_fee
.get_transfer_fee
isn'tget_extrinsic_fee
)
Subtensor
- ✅ In the synchronous Subtensor class, the
get_owned_hotkeys
method includes areuse_block
parameter that is inconsistent with other methods. Either remove this parameter fromget_owned_hotkeys
, or add it to all other methods that directly call self.substrate.* to maintain a consistent interface. - ✅ In all methods where we
sim_swap
is called, remove unused arguments. Consider combining all methods usingsim_swap
into one common one. - ✅ Delete deprecated
get_current_weight_commit_info
andget_current_weight_commit_info_v2
.Renameget_timelocked_weight_commits
toget_current_weight_commit_info
. - ✅ Remove references like
get_stake_info_for_coldkey = get_stake_for_coldkey
. - ✅ Reconsider some methods naming across the entire subtensor module.
Addwrong ideahotkey_ss58
parameter toget_liquidity_list
method. One wallet can have many HKs. Currently, the mentioned method uses default HK only.- ✅ apply correct logic if subtensor got
lov_verbose=True
->set_trace
level for btloggin - ✅ Should the next functions move to
subtensor
as methods? They have exactly the same behavior as subtensor methods.get_metadata
get_last_bonds_reset
- ✅ Apply
SimSwap
logic to calculate any stake operation fees (this is not an extrinsic fee)
Metagraph
- ✅ Remove verbose archival node warnings for blocks older than 300. Some users complained about many messages for them.
- ✅ Reconsider entire metagraph module logic.
Balance
- ✅ In
bittensor.utils.balance._check_currencies
raise the error instead ofwarnings.warn
. - ✅ In
bittensor.utils.balance.check_and_convert_to_balance
raise the error instead ofwarnings.warn
. This may
seem like a harsh decision at first, but ultimately we will push the community to use Balance and there will be fewer
errors in their calculations. Confusion with TAO and Alpha in calculations and display/printing/logging will be
eliminated.
Common things
-
✅ Reduce the amount of logging.info or transfer part of logging.info to logging.debug
-
✅ To be consistent across all SDK regarding local environment variables name:
- remove
BT_CHAIN_ENDPOINT
(settings.py :line 124) and useBT_SUBTENSOR_CHAIN_ENDPOINT
instead of that.
rename this variable in documentation. - rename local env variable
BT_NETWORK
toBT_SUBTENSOR_NETWORK
- remove
-
✅
Moveit's on the right place.bittensor.utils.get_transfer_fn_params
tobittensor.core.extrinsics.utils
. -
✅ Common refactoring (improve type annotations, etc)
-
✅
Renamedone across many PRs.non-/fast-blocks
tonon-/fast-runtime
in related places to be consistent with subtensor repo. Related with testing, subtensor scripts, documentation. -
✅ To be consistent throughout the SDK:
hotkey
,coldkey
,hotkeypub
, andcoldkeypub
are keypairshotkey_ss58
,coldkey_ss58
,hotkeypub_ss58
, andcoldkeypub_ss58
are SS58 addresses of keypair.
-
✅ Replace
Arguments
withParameters
. Matches Python rules. Improve docstrings for writing MСP server. -
✅ Remove all type annotations for parameters in docstrings.
-
✅ Remove all logic related to CRv3 as it will be removed from the chain next week.
- CRv3 extrinsics
- CRv3 logic related subtensor's calls
-
✅ Revise
bittensor/utils/easy_imports.py
module to remove deprecated backwards compatibility objects. Use this module as a functionality for exporting existing objects to the package root to keep init.py minimal and simple. -
✅ Remove deprecated
bittensor.utils.version.version_checking
-
✅ The SDK is dropping support for
Python 3.9
starting with this release. -
✅ Remove
Default is
andDefault to
in docstrings bc parameters enough. -
✅
camfairchild
: TODO, but we should have a grab_metadata if we don't already. Maybe don't decode, but can have a call that removes the Raw prefix, and another just doing grab_metadata_raw (no decoding).get_commitment_metadata
added. -
✅ Resolve an issue where a script using the SDK receives the
--config
or any other CLI parameters used in the SDK. Disable configuration processing. Use default values instead. -
✅ Find and process all
TODOs
across the entire code base. If in doubt, discuss each one with the team separately. SDK has 29 TODOs.
New features
-
✅ Unify extrinsic return values by introducing an ExtrinsicResponse class. Extrinsics currently return either a boolean or a tuple.
Purpose:
- Ease of processing.
- This class should contain success, message, and optionally data.
- Opportunity to expand the content of the extrinsic's response at any time upon community request or based on new technical requirements any time.
-
✅ Add
bittensor.utils.hex_to_ss58
function. SDK still doesn't have it. (Probably inner importfrom scalecodec import ss58_encode, ss58_decode
) -
✅ Implement Sub-subnets logic. Subtensor PR Subsubnets subtensor#1984
-
✅ Implement classes for
BlockInfo
objects that will contain the following fields:- number (int)
- hash (str)
- timestamp (datetime)
- header (dict)
- extrinsics (list)
- block_explorer (link to tao.app)
This implementation has been repeatedly requested by the community in the past.
-
✅ Added
bittensor.core.extrinsics.params
subpackage. This package will contain all extrinsic parameters. Due to
the duplication of extrinsics (async and sync implementations), it's easy to miss the sequence of changes. This also
makes it easier to obtain the parameter list. -
Implement
Crowdloan
logic. Issue: Integrate Crowdloan #3017
Testing
-
✅ When running tests via Docker, ensure no lingering processes occupy required ports before launch.
-
Improve failed test reporting from GH Actions to the Docker channel (e.g., clearer messages, formatting).
-
✅ Write a configurable test harness class for tests that will accept arguments and immediately:
- create a subnet
- activate a subnet (if the argument is passed as True)
- register neurons (use wallets as arguments)
- set the necessary hyperparameters (tempo, etc. if the argument are passed)
Will greatly simplify tests.
-
✅ Add an async test versions. This will help us greatly improve the asynchronous implementation of Subtensors and Extrinsics.