Skip to content

Commit c0dd7d3

Browse files
authored
Merge pull request #3106 from opentensor/release/v9.12.1
Release/v9.12.1
2 parents 6411041 + f8dd7f8 commit c0dd7d3

File tree

6 files changed

+121
-108
lines changed

6 files changed

+121
-108
lines changed

CHANGELOG.md

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

3+
## 9.12.1 /2025-10-20
4+
5+
## What's Changed
6+
* replace error by @basfroman in https://github.com/opentensor/bittensor/pull/3092
7+
* Update type hint/docstring for ws_shutdown_timer by @thewhaleking in https://github.com/opentensor/bittensor/pull/3090
8+
* Commenting on the test until the new governance come by @basfroman in https://github.com/opentensor/bittensor/pull/3101
9+
* Bumping scalecodec to 1.2.12 by @basfroman in https://github.com/opentensor/bittensor/pull/3104
10+
11+
**Full Changelog**: https://github.com/opentensor/bittensor/compare/v9.12.0...v9.12.1
12+
313
## 9.12.0 /2025-10-08
414

515
## What's Changed

bittensor/core/async_subtensor.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def __init__(
155155
retry_forever: bool = False,
156156
_mock: bool = False,
157157
archive_endpoints: Optional[list[str]] = None,
158-
websocket_shutdown_timer: float = 5.0,
158+
websocket_shutdown_timer: Optional[float] = 5.0,
159159
):
160160
"""Initializes an AsyncSubtensor instance for blockchain interaction.
161161
@@ -172,7 +172,9 @@ def __init__(
172172
cases where you are requesting a block that is too old for your current (presumably lite) node.
173173
Defaults to ``None``.
174174
websocket_shutdown_timer: Amount of time, in seconds, to wait after the last response from the chain to
175-
close the connection. Defaults to ``5.0``.
175+
close the connection. Passing `None` will disable to automatic shutdown process
176+
entirely.
177+
176178
Returns:
177179
None
178180

bittensor/core/subtensor_api/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ class SubtensorApi:
3232
archive_endpoints: Similar to fallback_endpoints, but specifically only archive nodes. Will be used in cases
3333
where you are requesting a block that is too old for your current (presumably lite) node. Defaults to `None`
3434
websocket_shutdown_timer: Amount of time, in seconds, to wait after the last response from the chain to close
35-
the connection. Only applicable to AsyncSubtensor.
35+
the connection. Only applicable to AsyncSubtensor. If `None` is passed to this, the automatic shutdown
36+
process is disabled.
3637
3738
Example:
3839
# sync version
@@ -80,7 +81,7 @@ def __init__(
8081
log_verbose: bool = False,
8182
mock: bool = False,
8283
archive_endpoints: Optional[list[str]] = None,
83-
websocket_shutdown_timer: float = 5.0,
84+
websocket_shutdown_timer: Optional[float] = 5.0,
8485
):
8586
self.network = network
8687
self._fallback_endpoints = fallback_endpoints

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "bittensor"
7-
version = "9.12.0"
7+
version = "9.12.1"
88
description = "Bittensor"
99
readme = "README.md"
1010
authors = [
@@ -31,11 +31,11 @@ dependencies = [
3131
"retry==0.9.2",
3232
"requests>=2.0.0,<3.0",
3333
"pydantic>=2.3, <3",
34-
"scalecodec==1.2.11",
34+
"scalecodec==1.2.12",
3535
"uvicorn",
3636
"bittensor-drand>=1.0.0,<2.0.0",
3737
"bittensor-wallet>=4.0.0,<5.0",
38-
"async-substrate-interface>=1.5.4"
38+
"async-substrate-interface>=1.5.6"
3939
]
4040

4141
[project.optional-dependencies]

tests/e2e_tests/test_delegate.py

Lines changed: 100 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -380,103 +380,103 @@ def test_nominator_min_required_stake(
380380
assert stake == Balance(0)
381381

382382

383-
def test_get_vote_data(subtensor, alice_wallet):
384-
"""
385-
Tests:
386-
- Sends Propose
387-
- Checks existing Proposals
388-
- Votes
389-
- Checks Proposal is updated
390-
"""
391-
392-
subtensor.root_register(alice_wallet)
393-
394-
proposals = subtensor.query_map(
395-
"Triumvirate",
396-
"ProposalOf",
397-
params=[],
398-
)
399-
400-
assert proposals.records == []
401-
402-
success, error = propose(
403-
subtensor,
404-
alice_wallet,
405-
proposal=subtensor.substrate.compose_call(
406-
call_module="Triumvirate",
407-
call_function="set_members",
408-
call_params={
409-
"new_members": [],
410-
"prime": None,
411-
"old_count": 0,
412-
},
413-
),
414-
duration=1_000_000,
415-
)
416-
417-
assert error == ""
418-
assert success is True
419-
420-
proposals = subtensor.query_map(
421-
"Triumvirate",
422-
"ProposalOf",
423-
params=[],
424-
)
425-
proposals = {
426-
bytes(proposal_hash[0]): proposal.value for proposal_hash, proposal in proposals
427-
}
428-
429-
assert list(proposals.values()) == [
430-
{
431-
"Triumvirate": (
432-
{
433-
"set_members": {
434-
"new_members": (),
435-
"prime": None,
436-
"old_count": 0,
437-
},
438-
},
439-
),
440-
},
441-
]
442-
443-
proposal_hash = list(proposals.keys())[0]
444-
proposal_hash = f"0x{proposal_hash.hex()}"
445-
446-
proposal = subtensor.get_vote_data(
447-
proposal_hash,
448-
)
449-
450-
assert proposal == ProposalVoteData(
451-
ayes=[],
452-
end=CloseInValue(1_000_000, subtensor.block),
453-
index=0,
454-
nays=[],
455-
threshold=3,
456-
)
457-
458-
success, error = vote(
459-
subtensor,
460-
alice_wallet,
461-
alice_wallet.hotkey.ss58_address,
462-
proposal_hash,
463-
index=0,
464-
approve=True,
465-
)
466-
467-
assert error == ""
468-
assert success is True
469-
470-
proposal = subtensor.get_vote_data(
471-
proposal_hash,
472-
)
473-
474-
assert proposal == ProposalVoteData(
475-
ayes=[
476-
alice_wallet.hotkey.ss58_address,
477-
],
478-
end=CloseInValue(1_000_000, subtensor.block),
479-
index=0,
480-
nays=[],
481-
threshold=3,
482-
)
383+
# def test_get_vote_data(subtensor, alice_wallet):
384+
# """
385+
# Tests:
386+
# - Sends Propose
387+
# - Checks existing Proposals
388+
# - Votes
389+
# - Checks Proposal is updated
390+
# """
391+
#
392+
# subtensor.root_register(alice_wallet)
393+
#
394+
# proposals = subtensor.query_map(
395+
# "Triumvirate",
396+
# "ProposalOf",
397+
# params=[],
398+
# )
399+
#
400+
# assert proposals.records == []
401+
#
402+
# success, error = propose(
403+
# subtensor,
404+
# alice_wallet,
405+
# proposal=subtensor.substrate.compose_call(
406+
# call_module="Triumvirate",
407+
# call_function="set_members",
408+
# call_params={
409+
# "new_members": [],
410+
# "prime": None,
411+
# "old_count": 0,
412+
# },
413+
# ),
414+
# duration=1_000_000,
415+
# )
416+
#
417+
# assert error == ""
418+
# assert success is True
419+
#
420+
# proposals = subtensor.query_map(
421+
# "Triumvirate",
422+
# "ProposalOf",
423+
# params=[],
424+
# )
425+
# proposals = {
426+
# bytes(proposal_hash[0]): proposal.value for proposal_hash, proposal in proposals
427+
# }
428+
#
429+
# assert list(proposals.values()) == [
430+
# {
431+
# "Triumvirate": (
432+
# {
433+
# "set_members": {
434+
# "new_members": (),
435+
# "prime": None,
436+
# "old_count": 0,
437+
# },
438+
# },
439+
# ),
440+
# },
441+
# ]
442+
#
443+
# proposal_hash = list(proposals.keys())[0]
444+
# proposal_hash = f"0x{proposal_hash.hex()}"
445+
#
446+
# proposal = subtensor.get_vote_data(
447+
# proposal_hash,
448+
# )
449+
#
450+
# assert proposal == ProposalVoteData(
451+
# ayes=[],
452+
# end=CloseInValue(1_000_000, subtensor.block),
453+
# index=0,
454+
# nays=[],
455+
# threshold=3,
456+
# )
457+
#
458+
# success, error = vote(
459+
# subtensor,
460+
# alice_wallet,
461+
# alice_wallet.hotkey.ss58_address,
462+
# proposal_hash,
463+
# index=0,
464+
# approve=True,
465+
# )
466+
#
467+
# assert error == ""
468+
# assert success is True
469+
#
470+
# proposal = subtensor.get_vote_data(
471+
# proposal_hash,
472+
# )
473+
#
474+
# assert proposal == ProposalVoteData(
475+
# ayes=[
476+
# alice_wallet.hotkey.ss58_address,
477+
# ],
478+
# end=CloseInValue(1_000_000, subtensor.block),
479+
# index=0,
480+
# nays=[],
481+
# threshold=3,
482+
# )

tests/e2e_tests/test_hotkeys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ async def test_children(local_chain, subtensor, alice_wallet, bob_wallet, dave_w
194194
raise_error=True,
195195
)
196196

197-
with pytest.raises(TooManyChildren):
197+
with pytest.raises(DuplicateChild):
198198
subtensor.set_children(
199199
alice_wallet,
200200
alice_wallet.hotkey.ss58_address,

0 commit comments

Comments
 (0)