Skip to content

Commit 6b3a711

Browse files
authored
Merge pull request #436 from opentensor/release/9.4.0
Release/9.4.0
2 parents aeb15c7 + 27eb874 commit 6b3a711

File tree

10 files changed

+788
-470
lines changed

10 files changed

+788
-470
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## 9.4.0 /2025-04-17
4+
5+
## What's Changed
6+
* Formatting/ruff fixes by @thewhaleking in https://github.com/opentensor/btcli/pull/426
7+
* Allows for torch 2.6+ by @thewhaleking in https://github.com/opentensor/btcli/pull/427
8+
* chore: fixed version format error and improved readability by @mdqst in https://github.com/opentensor/btcli/pull/428
9+
* Fixes help msg of safe staking help (in stake add etc) by @ibraheem-abe in https://github.com/opentensor/btcli/pull/432
10+
* Feat/start call by @ibraheem-abe in https://github.com/opentensor/btcli/pull/434
11+
12+
## New Contributors
13+
* @mdqst made their first contribution in https://github.com/opentensor/btcli/pull/428
14+
15+
**Full Changelog**: https://github.com/opentensor/btcli/compare/v9.3.0...v9.4.0
16+
317
## 9.3.0 /2025-04-09
418

519
## What's Changed

bittensor_cli/cli.py

Lines changed: 77 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,22 +259,24 @@ class Options:
259259
"--slippage-tolerance",
260260
"--tolerance",
261261
"--rate-tolerance",
262-
help="Set the rate tolerance percentage for transactions (default: 0.05%).",
262+
help="Set the rate tolerance percentage for transactions (default: 0.05 for 5%).",
263263
callback=validate_rate_tolerance,
264264
)
265265
safe_staking = typer.Option(
266266
None,
267267
"--safe-staking/--no-safe-staking",
268268
"--safe/--unsafe",
269-
help="Enable or disable safe staking mode (default: enabled).",
269+
show_default=False,
270+
help="Enable or disable safe staking mode [dim](default: enabled)[/dim].",
270271
)
271272
allow_partial_stake = typer.Option(
272273
None,
273274
"--allow-partial-stake/--no-allow-partial-stake",
274275
"--partial/--no-partial",
275276
"--allow/--not-allow",
276277
"--allow-partial/--not-partial",
277-
help="Enable or disable partial stake mode (default: disabled).",
278+
show_default=False,
279+
help="Enable or disable partial stake mode [dim](default: disabled)[/dim].",
278280
)
279281
dashboard_path = typer.Option(
280282
None,
@@ -873,6 +875,12 @@ def __init__(self):
873875
self.subnets_app.command(
874876
"get-identity", rich_help_panel=HELP_PANELS["SUBNETS"]["IDENTITY"]
875877
)(self.subnets_get_identity)
878+
self.subnets_app.command(
879+
"start", rich_help_panel=HELP_PANELS["SUBNETS"]["CREATION"]
880+
)(self.subnets_start)
881+
self.subnets_app.command(
882+
"check-start", rich_help_panel=HELP_PANELS["SUBNETS"]["INFO"]
883+
)(self.subnets_check_start)
876884

877885
# weights commands
878886
self.weights_app.command(
@@ -1184,12 +1192,14 @@ def set_config(
11841192
"--safe-staking/--no-safe-staking",
11851193
"--safe/--unsafe",
11861194
help="Enable or disable safe staking mode.",
1195+
show_default=False,
11871196
),
11881197
allow_partial_stake: Optional[bool] = typer.Option(
11891198
None,
11901199
"--allow-partial-stake/--no-allow-partial-stake",
11911200
"--partial/--no-partial",
11921201
"--allow/--not-allow",
1202+
show_default=False,
11931203
),
11941204
dashboard_path: Optional[str] = Options.dashboard_path,
11951205
):
@@ -4975,6 +4985,70 @@ def subnets_create(
49754985
)
49764986
)
49774987

4988+
def subnets_check_start(
4989+
self,
4990+
network: Optional[list[str]] = Options.network,
4991+
netuid: int = Options.netuid,
4992+
quiet: bool = Options.quiet,
4993+
verbose: bool = Options.verbose,
4994+
):
4995+
"""
4996+
Checks if a subnet's emission schedule can be started.
4997+
4998+
This command verifies if a subnet's emission schedule can be started based on the subnet's registration block.
4999+
5000+
Example:
5001+
[green]$[/green] btcli subnets check_start --netuid 1
5002+
"""
5003+
self.verbosity_handler(quiet, verbose)
5004+
return self._run_command(
5005+
subnets.get_start_schedule(self.initialize_chain(network), netuid)
5006+
)
5007+
5008+
def subnets_start(
5009+
self,
5010+
wallet_name: str = Options.wallet_name,
5011+
wallet_path: str = Options.wallet_path,
5012+
wallet_hotkey: str = Options.wallet_hotkey,
5013+
network: Optional[list[str]] = Options.network,
5014+
netuid: int = Options.netuid,
5015+
prompt: bool = Options.prompt,
5016+
quiet: bool = Options.quiet,
5017+
verbose: bool = Options.verbose,
5018+
):
5019+
"""
5020+
Starts a subnet's emission schedule.
5021+
5022+
The owner of the subnet must call this command to start the emission schedule.
5023+
5024+
Example:
5025+
[green]$[/green] btcli subnets start --netuid 1
5026+
[green]$[/green] btcli subnets start --netuid 1 --wallet-name alice
5027+
"""
5028+
self.verbosity_handler(quiet, verbose)
5029+
if not wallet_name:
5030+
wallet_name = Prompt.ask(
5031+
"Enter the [blue]wallet name[/blue] [dim](which you used to create the subnet)[/dim]",
5032+
default=self.config.get("wallet_name") or defaults.wallet.name,
5033+
)
5034+
wallet = self.wallet_ask(
5035+
wallet_name,
5036+
wallet_path,
5037+
wallet_hotkey,
5038+
ask_for=[
5039+
WO.NAME,
5040+
],
5041+
validate=WV.WALLET,
5042+
)
5043+
return self._run_command(
5044+
subnets.start_subnet(
5045+
wallet,
5046+
self.initialize_chain(network),
5047+
netuid,
5048+
prompt,
5049+
)
5050+
)
5051+
49785052
def subnets_get_identity(
49795053
self,
49805054
network: Optional[list[str]] = Options.network,

0 commit comments

Comments
 (0)