-
Notifications
You must be signed in to change notification settings - Fork 418
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-stakingparameter renamed #3046 - [v10] Unify extrinsic return values by introducing an
ExtrinsicResponseclass #3053 - [v10] Removing deprecated extrinsics and replacing them with consistent ones #3064
- [v10] Improved docstrings (replacing
ArgumentswithParametersto match MCP server auto-parsing) #3065 - [v10] remove unused and deprecated stuff #3066
- [v10] Improve extrinsics logic and related subtensor calls #3074
- [v10]
mechidrelated changes #3076 - [v10] Subtensor improvement (and related logic) #3077
- [v10] Update auto staking to be compatible with SDKv10 #3078
- [v10] Development framework #3079
- [v10]
servingextrinsic module refactoring #3080 - [v10] Add
BlockInfo#3082 - [v10] Fix
argparserissue #3085 - [v10] SimSwap + Extrinsics Improvement #3091
- [v10] All TODOs resolved #3093
- [v10] Update and add new
Markdownfiles #3095 - [v10] Release/v10.0.0rc1 #3097
- [v10] Integrate Crowdloan #3098
- [v10] Remove deprecated
bittensor.version_split#3100 - [v10] Commenting on the test until the new governance come #3102
- [v10] Fix
bittensor.core.types.Weightstype annotation #3103 - [v10] Rename
max_retriestomax_attemptsto be more obvious #3108 - [v10] Release/v10.0.0rc2 #3107
- [v10] Apply default era.period to all extrinsics #3116
- [v10]
Root claim/ Airdropmechanism implementation #3117 - [v10] Update subnet owner #3119
- [v10] Separate hot and cold keys in tests #3120
Full progress in SDKv10/MIGRATION-GUIDE.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_inclusionandwait_for_finalizationtoTrueby 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_allparameter fromunstake_extrinsicsince we haveunstake_all_extrinsicwhich is calles another subtensor function. - ✅
unstakeandunstake_multipleextrinsics should havesafe_unstakingparameters instead ofsafe_staking. - ✅ Remove
_do*extrinsic calls and combine them with extrinsic logic. - ✅
(subtensor.get_transfer_feecalls extrinsic inside the subtensor module. Actually the method could be updated by usingbittensor.core.extrinsics.utils.get_extrinsic_fee.get_transfer_feeisn'tget_extrinsic_fee)
Subtensor
- ✅ In the synchronous Subtensor class, the
get_owned_hotkeysmethod includes areuse_blockparameter 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_swapis called, remove unused arguments. Consider combining all methods usingsim_swapinto one common one. - ✅ Delete deprecated
get_current_weight_commit_infoandget_current_weight_commit_info_v2.Renameget_timelocked_weight_commitstoget_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_ss58parameter toget_liquidity_listmethod. One wallet can have many HKs. Currently, the mentioned method uses default HK only.- ✅ apply correct logic if subtensor got
lov_verbose=True->set_tracelevel for btloggin - ✅ Should the next functions move to
subtensoras methods? They have exactly the same behavior as subtensor methods.get_metadataget_last_bonds_reset
- ✅ Apply
SimSwaplogic 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_currenciesraise the error instead ofwarnings.warn. - ✅ In
bittensor.utils.balance.check_and_convert_to_balanceraise 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_ENDPOINTinstead of that.
rename this variable in documentation. - rename local env variable
BT_NETWORKtoBT_SUBTENSOR_NETWORK
- remove
-
✅
Moveit's on the right place.bittensor.utils.get_transfer_fn_paramstobittensor.core.extrinsics.utils. -
✅ Common refactoring (improve type annotations, etc)
-
✅
Renamedone across many PRs.non-/fast-blockstonon-/fast-runtimein related places to be consistent with subtensor repo. Related with testing, subtensor scripts, documentation. -
✅ To be consistent throughout the SDK:
hotkey,coldkey,hotkeypub, andcoldkeypubare keypairshotkey_ss58,coldkey_ss58,hotkeypub_ss58, andcoldkeypub_ss58are SS58 addresses of keypair.
-
✅ Replace
ArgumentswithParameters. 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.pymodule 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.9starting with this release. -
✅ Remove
Default isandDefault toin 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_metadataadded. -
✅ Resolve an issue where a script using the SDK receives the
--configor any other CLI parameters used in the SDK. Disable configuration processing. Use default values instead. -
✅ Find and process all
TODOsacross 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_ss58function. 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
BlockInfoobjects 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.paramssubpackage. 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
Crowdloanlogic. 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.