From d65ad92ecd1c18225a841da59bcd2f46a34d4da9 Mon Sep 17 00:00:00 2001 From: bdhimes Date: Wed, 8 Oct 2025 22:38:11 +0200 Subject: [PATCH 1/6] Update type hint/docstring for ws_shutdown_timer --- bittensor/core/async_subtensor.py | 6 ++++-- bittensor/core/subtensor_api/__init__.py | 5 +++-- pyproject.toml | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/bittensor/core/async_subtensor.py b/bittensor/core/async_subtensor.py index f79ac72558..2d42bc4816 100644 --- a/bittensor/core/async_subtensor.py +++ b/bittensor/core/async_subtensor.py @@ -155,7 +155,7 @@ def __init__( retry_forever: bool = False, _mock: bool = False, archive_endpoints: Optional[list[str]] = None, - websocket_shutdown_timer: float = 5.0, + websocket_shutdown_timer: Optional[float] = 5.0, ): """Initializes an AsyncSubtensor instance for blockchain interaction. @@ -172,7 +172,9 @@ def __init__( cases where you are requesting a block that is too old for your current (presumably lite) node. Defaults to ``None``. websocket_shutdown_timer: Amount of time, in seconds, to wait after the last response from the chain to - close the connection. Defaults to ``5.0``. + close the connection. Defaults to ``5.0``. Passing `None` will disable to automatic shutdown process + entirely. + Returns: None diff --git a/bittensor/core/subtensor_api/__init__.py b/bittensor/core/subtensor_api/__init__.py index 5ae0bf7134..9806110a34 100644 --- a/bittensor/core/subtensor_api/__init__.py +++ b/bittensor/core/subtensor_api/__init__.py @@ -32,7 +32,8 @@ class SubtensorApi: archive_endpoints: Similar to fallback_endpoints, but specifically only archive nodes. Will be used in cases where you are requesting a block that is too old for your current (presumably lite) node. Defaults to `None` websocket_shutdown_timer: Amount of time, in seconds, to wait after the last response from the chain to close - the connection. Only applicable to AsyncSubtensor. + the connection. Only applicable to AsyncSubtensor. If `None` is passed to this, the automatic shutdown + process is disabled. Example: # sync version @@ -80,7 +81,7 @@ def __init__( log_verbose: bool = False, mock: bool = False, archive_endpoints: Optional[list[str]] = None, - websocket_shutdown_timer: float = 5.0, + websocket_shutdown_timer: Optional[float] = 5.0, ): self.network = network self._fallback_endpoints = fallback_endpoints diff --git a/pyproject.toml b/pyproject.toml index 88c4f68616..7732b25eb9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ dependencies = [ "uvicorn", "bittensor-drand>=1.0.0,<2.0.0", "bittensor-wallet>=4.0.0,<5.0", - "async-substrate-interface>=1.5.4" + "async-substrate-interface>=1.5.6" ] [project.optional-dependencies] From 4d56e45662a5b2af61878ba31c0aeb5a0b138d8c Mon Sep 17 00:00:00 2001 From: Roman Chkhaidze Date: Thu, 9 Oct 2025 17:18:29 -0700 Subject: [PATCH 2/6] replace error --- tests/e2e_tests/test_hotkeys.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e_tests/test_hotkeys.py b/tests/e2e_tests/test_hotkeys.py index 36d1bbfc4d..6e85e685aa 100644 --- a/tests/e2e_tests/test_hotkeys.py +++ b/tests/e2e_tests/test_hotkeys.py @@ -194,7 +194,7 @@ async def test_children(local_chain, subtensor, alice_wallet, bob_wallet, dave_w raise_error=True, ) - with pytest.raises(TooManyChildren): + with pytest.raises(DuplicateChild): subtensor.set_children( alice_wallet, alice_wallet.hotkey.ss58_address, From d201019fa3ce7c7306aced391f55be485275f321 Mon Sep 17 00:00:00 2001 From: Roman <167799377+basfroman@users.noreply.github.com> Date: Thu, 9 Oct 2025 17:37:28 -0700 Subject: [PATCH 3/6] Update bittensor/core/async_subtensor.py --- bittensor/core/async_subtensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bittensor/core/async_subtensor.py b/bittensor/core/async_subtensor.py index 2d42bc4816..50851218a4 100644 --- a/bittensor/core/async_subtensor.py +++ b/bittensor/core/async_subtensor.py @@ -172,7 +172,7 @@ def __init__( cases where you are requesting a block that is too old for your current (presumably lite) node. Defaults to ``None``. websocket_shutdown_timer: Amount of time, in seconds, to wait after the last response from the chain to - close the connection. Defaults to ``5.0``. Passing `None` will disable to automatic shutdown process + close the connection. Passing `None` will disable to automatic shutdown process entirely. Returns: From c495cfecc6e83fee2cfe898ac1b9d909484eb387 Mon Sep 17 00:00:00 2001 From: Roman Chkhaidze Date: Wed, 15 Oct 2025 16:47:30 -0700 Subject: [PATCH 4/6] commenting on the test until the new governance come --- tests/e2e_tests/test_delegate.py | 200 +++++++++++++++---------------- 1 file changed, 100 insertions(+), 100 deletions(-) diff --git a/tests/e2e_tests/test_delegate.py b/tests/e2e_tests/test_delegate.py index 949b1324be..8d403339a0 100644 --- a/tests/e2e_tests/test_delegate.py +++ b/tests/e2e_tests/test_delegate.py @@ -380,103 +380,103 @@ def test_nominator_min_required_stake( assert stake == Balance(0) -def test_get_vote_data(subtensor, alice_wallet): - """ - Tests: - - Sends Propose - - Checks existing Proposals - - Votes - - Checks Proposal is updated - """ - - subtensor.root_register(alice_wallet) - - proposals = subtensor.query_map( - "Triumvirate", - "ProposalOf", - params=[], - ) - - assert proposals.records == [] - - success, error = propose( - subtensor, - alice_wallet, - proposal=subtensor.substrate.compose_call( - call_module="Triumvirate", - call_function="set_members", - call_params={ - "new_members": [], - "prime": None, - "old_count": 0, - }, - ), - duration=1_000_000, - ) - - assert error == "" - assert success is True - - proposals = subtensor.query_map( - "Triumvirate", - "ProposalOf", - params=[], - ) - proposals = { - bytes(proposal_hash[0]): proposal.value for proposal_hash, proposal in proposals - } - - assert list(proposals.values()) == [ - { - "Triumvirate": ( - { - "set_members": { - "new_members": (), - "prime": None, - "old_count": 0, - }, - }, - ), - }, - ] - - proposal_hash = list(proposals.keys())[0] - proposal_hash = f"0x{proposal_hash.hex()}" - - proposal = subtensor.get_vote_data( - proposal_hash, - ) - - assert proposal == ProposalVoteData( - ayes=[], - end=CloseInValue(1_000_000, subtensor.block), - index=0, - nays=[], - threshold=3, - ) - - success, error = vote( - subtensor, - alice_wallet, - alice_wallet.hotkey.ss58_address, - proposal_hash, - index=0, - approve=True, - ) - - assert error == "" - assert success is True - - proposal = subtensor.get_vote_data( - proposal_hash, - ) - - assert proposal == ProposalVoteData( - ayes=[ - alice_wallet.hotkey.ss58_address, - ], - end=CloseInValue(1_000_000, subtensor.block), - index=0, - nays=[], - threshold=3, - ) +# def test_get_vote_data(subtensor, alice_wallet): +# """ +# Tests: +# - Sends Propose +# - Checks existing Proposals +# - Votes +# - Checks Proposal is updated +# """ +# +# subtensor.root_register(alice_wallet) +# +# proposals = subtensor.query_map( +# "Triumvirate", +# "ProposalOf", +# params=[], +# ) +# +# assert proposals.records == [] +# +# success, error = propose( +# subtensor, +# alice_wallet, +# proposal=subtensor.substrate.compose_call( +# call_module="Triumvirate", +# call_function="set_members", +# call_params={ +# "new_members": [], +# "prime": None, +# "old_count": 0, +# }, +# ), +# duration=1_000_000, +# ) +# +# assert error == "" +# assert success is True +# +# proposals = subtensor.query_map( +# "Triumvirate", +# "ProposalOf", +# params=[], +# ) +# proposals = { +# bytes(proposal_hash[0]): proposal.value for proposal_hash, proposal in proposals +# } +# +# assert list(proposals.values()) == [ +# { +# "Triumvirate": ( +# { +# "set_members": { +# "new_members": (), +# "prime": None, +# "old_count": 0, +# }, +# }, +# ), +# }, +# ] +# +# proposal_hash = list(proposals.keys())[0] +# proposal_hash = f"0x{proposal_hash.hex()}" +# +# proposal = subtensor.get_vote_data( +# proposal_hash, +# ) +# +# assert proposal == ProposalVoteData( +# ayes=[], +# end=CloseInValue(1_000_000, subtensor.block), +# index=0, +# nays=[], +# threshold=3, +# ) +# +# success, error = vote( +# subtensor, +# alice_wallet, +# alice_wallet.hotkey.ss58_address, +# proposal_hash, +# index=0, +# approve=True, +# ) +# +# assert error == "" +# assert success is True +# +# proposal = subtensor.get_vote_data( +# proposal_hash, +# ) +# +# assert proposal == ProposalVoteData( +# ayes=[ +# alice_wallet.hotkey.ss58_address, +# ], +# end=CloseInValue(1_000_000, subtensor.block), +# index=0, +# nays=[], +# threshold=3, +# ) From 43be0fba7eda1c3984ceff5da142c1eaadcc875d Mon Sep 17 00:00:00 2001 From: Roman Chkhaidze Date: Mon, 20 Oct 2025 11:36:02 -0700 Subject: [PATCH 5/6] bumping scalecodec to 1.2.12 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7732b25eb9..850d559e70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ dependencies = [ "retry==0.9.2", "requests>=2.0.0,<3.0", "pydantic>=2.3, <3", - "scalecodec==1.2.11", + "scalecodec==1.2.12", "uvicorn", "bittensor-drand>=1.0.0,<2.0.0", "bittensor-wallet>=4.0.0,<5.0", From f9f7350359d60c3d0c2b7c7751bb77eee6805d57 Mon Sep 17 00:00:00 2001 From: Roman Chkhaidze Date: Mon, 20 Oct 2025 12:13:10 -0700 Subject: [PATCH 6/6] bumping version + changelog --- CHANGELOG.md | 10 ++++++++++ pyproject.toml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab03c5bde0..8334220b5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 9.12.1 /2025-10-20 + +## What's Changed +* replace error by @basfroman in https://github.com/opentensor/bittensor/pull/3092 +* Update type hint/docstring for ws_shutdown_timer by @thewhaleking in https://github.com/opentensor/bittensor/pull/3090 +* Commenting on the test until the new governance come by @basfroman in https://github.com/opentensor/bittensor/pull/3101 +* Bumping scalecodec to 1.2.12 by @basfroman in https://github.com/opentensor/bittensor/pull/3104 + +**Full Changelog**: https://github.com/opentensor/bittensor/compare/v9.12.0...v9.12.1 + ## 9.12.0 /2025-10-08 ## What's Changed diff --git a/pyproject.toml b/pyproject.toml index 850d559e70..487092f7fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "bittensor" -version = "9.12.0" +version = "9.12.1" description = "Bittensor" readme = "README.md" authors = [