Skip to content

Commit db38d16

Browse files
authored
Merge branch 'staging' into feat/update-delegate-info
2 parents d6acaa4 + e408df2 commit db38d16

File tree

9 files changed

+102
-17
lines changed

9 files changed

+102
-17
lines changed

.github/workflows/e2e-subtensor-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
max-parallel: 8 # Set the maximum number of parallel jobs
5353
matrix:
5454
rust-branch:
55-
- nightly-2024-03-05
55+
- stable
5656
rust-target:
5757
- x86_64-unknown-linux-gnu
5858
os:

CHANGELOG.md

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

3+
## 9.0.0 /2025-02-13
4+
5+
## What's Changed
6+
* Optimisations and tests for Async Sync Subtensor by @thewhaleking in https://github.com/opentensor/bittensor/pull/2569
7+
* [SDK] Get rid of py-substrate-interface (DO NOT MERGE) by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2565
8+
* Uses the new async_substrate_interface lib by @thewhaleking in https://github.com/opentensor/bittensor/pull/2572
9+
* AsyncSubstrateInterface Overhaul (with Sync AsyncSubstrate) by @thewhaleking in https://github.com/opentensor/bittensor/pull/2526
10+
* [SDK] Small improvements by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2575
11+
* Sync Subtensor warning by @thewhaleking in https://github.com/opentensor/bittensor/pull/2578
12+
* [SDK] Fixes types in async by @thewhaleking in https://github.com/opentensor/bittensor/pull/2577
13+
* Release/8.5.2 by @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2584
14+
* fix: typos in documentation files by @leopardracer in https://github.com/opentensor/bittensor/pull/2580
15+
* fix(2337): btlogging setLevel by @zyzniewski-reef in https://github.com/opentensor/bittensor/pull/2588
16+
* perf: don't use 2 threads to create FastAPI server by @zyzniewski-reef in https://github.com/opentensor/bittensor/pull/2592
17+
* fix(2188): don't allow uvicorn to reconfigure event_loop_policy by @zyzniewski-reef in https://github.com/opentensor/bittensor/pull/2591
18+
* Fix spelling errors by @Dimitrolito in https://github.com/opentensor/bittensor/pull/2586
19+
* Make code as beautiful as it has never been before by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2599
20+
* test: bring back old (sync subtensor) tests and fix them by @zyzniewski-reef in https://github.com/opentensor/bittensor/pull/2600
21+
* YAASO: Yet Another AsyncSubtensor Overhaul by @thewhaleking in https://github.com/opentensor/bittensor/pull/2579
22+
* Add alias for `Subtensor.commit` as `set_commitment` by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2606
23+
* [RAO] Add methods to fetch metagraph data from the chain by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2605
24+
* Rewrite config.py by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2607
25+
* Update metagraph class with `rao` stuff by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2611
26+
* [RAO] fix for unit test + refactoring by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2612
27+
* fix integration metagraph test by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2613
28+
* Cleanups, fixes, improvements for rao by @thewhaleking in https://github.com/opentensor/bittensor/pull/2614
29+
* Adds deprecation notice for non-balance amounts by @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2615
30+
* Staging pre merge port rao (New async substrate) by @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2610
31+
* Tests for SyncSubtensor by @zyzniewski-reef in https://github.com/opentensor/bittensor/pull/2617
32+
* Many small fixes by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2619
33+
* Use async-substrate-interface for runtime decoding by @zyzniewski-reef in https://github.com/opentensor/bittensor/pull/2618
34+
* Pins torch version to 2.5.1 by @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2623
35+
* Fixes, adds stake and other methods by @thewhaleking in https://github.com/opentensor/bittensor/pull/2622
36+
* Fix typos by @Marcofann in https://github.com/opentensor/bittensor/pull/2620
37+
* Add `subnet_volume` field to `MetagraphInfo` and `DynamicInfo` by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2624
38+
* Update wallet creation command logs post-install by @HudsonGraeme in https://github.com/opentensor/bittensor/pull/2621
39+
* fix subtensor methods for async by @thewhaleking in https://github.com/opentensor/bittensor/pull/2628
40+
* Subnet burn cost return type by @thewhaleking in https://github.com/opentensor/bittensor/pull/2629
41+
* Specifies a range of torch versions, rather than a pinned version. by @thewhaleking in https://github.com/opentensor/bittensor/pull/2632
42+
* Adds subnet registration extrinsic by @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2630
43+
* Bumps btwallet 302 by @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2633
44+
* SKD implementation for Subtensor `Feat/RPC Upgrades`. PR #1205 by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2627
45+
* Bug fixes after release SDK v9.0.0rc1 by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2637
46+
* Adds Latent Lite endpoint to the SDK by @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2641
47+
* Bringing meta fields to a common form with float values float(TAO) instead of Balance and Tensor by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2642
48+
* Adds `get_all_commitments` and fixes commitment tests and `query_map` by @thewhaleking in https://github.com/opentensor/bittensor/pull/2644
49+
* Fix for extra fields from chain data by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2647
50+
* Fix InfoBase + dataclasses by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2649
51+
* fix integration tests by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2651
52+
* feat: Add logging for unexpected header keys in Synapse by @crStiv in https://github.com/opentensor/bittensor/pull/2587
53+
* Fixes Dendrite new loop close by @thewhaleking in https://github.com/opentensor/bittensor/pull/2654
54+
* Fix e2e tests by @zyzniewski-reef in https://github.com/opentensor/bittensor/pull/2639
55+
* feat/roman/deps by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2655
56+
* Metagraph Improvements by @thewhaleking in https://github.com/opentensor/bittensor/pull/2659
57+
* add name and symbol fields to metagraph by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2658
58+
* Using one determine_chain_endpoint_and_network by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2661
59+
* Tests: separate `templates` fixture by @zyzniewski-reef in https://github.com/opentensor/bittensor/pull/2660
60+
* Merge `async-pre-merge-new-async` to `staging` by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2656
61+
* Add `set_subnet_identity_extrinsic` and related stuff by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2662
62+
* Changes the logging level for unexpected header keys to trace by @thewhaleking in https://github.com/opentensor/bittensor/pull/2666
63+
* Remove logs by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2667
64+
* Tests: properly handle subprocesses (subtensor, miner, validator) by @zyzniewski-reef in https://github.com/opentensor/bittensor/pull/2664
65+
* Last-minute requests by @thewhaleking in https://github.com/opentensor/bittensor/pull/2665
66+
* Updates tao_weights for mainnet by @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2669
67+
* Update deps and default network/endpoint by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2670
68+
69+
## New Contributors
70+
* @leopardracer made their first contribution in https://github.com/opentensor/bittensor/pull/2580
71+
* @Dimitrolito made their first contribution in https://github.com/opentensor/bittensor/pull/2586
72+
* @Marcofann made their first contribution in https://github.com/opentensor/bittensor/pull/2620
73+
* @HudsonGraeme made their first contribution in https://github.com/opentensor/bittensor/pull/2621
74+
* @crStiv made their first contribution in https://github.com/opentensor/bittensor/pull/2587
75+
76+
**Full Changelog**: https://github.com/opentensor/bittensor/compare/v8.5.2...v9.0.0
77+
78+
## 9.0.0rc6 /2025-02-11
79+
* Using one determine_chain_endpoint_and_network by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2661
80+
* Tests: separate templates fixture by @zyzniewski-reef in https://github.com/opentensor/bittensor/pull/2660
81+
* add name and symbol fields to metagraph by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2658
82+
* Metagraph Improvements by @thewhaleking in https://github.com/opentensor/bittensor/pull/2659
83+
* feat/roman/add-subnet-identity-with-subnet-creation by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2662
84+
85+
**Full Changelog**: https://github.com/opentensor/bittensor/compare/v9.0.0rc5...v9.0.0rc6
86+
387
## 9.0.0rc5 /2025-02-07
488
* Fix InfoBase + dataclasses @roman-opentensor in https://github.com/opentensor/bittensor/pull/2649
589

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9.0.0rc5
1+
9.0.0

bittensor/core/async_subtensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ async def __aenter__(self):
173173
f"[magenta]Connecting to Substrate:[/magenta] [blue]{self}[/blue][magenta]...[/magenta]"
174174
)
175175
try:
176-
async with self.substrate:
177-
return self
176+
await self.substrate.initialize()
177+
return self
178178
except TimeoutError:
179179
logging.error(
180180
f"[red]Error[/red]: Timeout occurred connecting to substrate."

bittensor/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "9.0.0rc5"
1+
__version__ = "9.0.0"
22

33
import os
44
import re

requirements/cli.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bittensor-cli>=9.0.0

requirements/prod.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,3 @@ websockets>=14.1
2424
bittensor-commit-reveal>=0.2.0
2525
bittensor-wallet>=3.0.3
2626
async-substrate-interface>=1.0.0
27-
bittensor-cli>=9.0.0

setup.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,25 @@
88
from setuptools import setup, find_packages
99

1010

11-
def read_requirements(path):
12-
requirements = []
11+
def read_requirements(path_):
12+
requirements_ = []
1313

14-
with pathlib.Path(path).open() as requirements_txt:
14+
with pathlib.Path(path_).open() as requirements_txt:
1515
for line in requirements_txt:
1616
if line.startswith("git+"):
1717
pkg_name = re.search(r"egg=([a-zA-Z0-9_-]+)", line.strip()).group(1)
18-
requirements.append(pkg_name + " @ " + line.strip())
18+
requirements_.append(pkg_name + " @ " + line.strip())
1919
else:
20-
requirements.append(line.strip())
20+
requirements_.append(line.strip())
2121

22-
return requirements
22+
return requirements_
2323

2424

2525
requirements = read_requirements("requirements/prod.txt")
2626
extra_requirements_dev = read_requirements("requirements/dev.txt")
2727
extra_requirements_cubit = read_requirements("requirements/cubit.txt")
2828
extra_requirements_torch = read_requirements("requirements/torch.txt")
29+
extra_requirements_cli = read_requirements("requirements/cli.txt")
2930

3031
here = path.abspath(path.dirname(__file__))
3132

@@ -62,6 +63,7 @@ def read_requirements(path):
6263
extras_require={
6364
"dev": extra_requirements_dev + extra_requirements_torch,
6465
"torch": extra_requirements_torch,
66+
"cli": extra_requirements_cli,
6567
},
6668
classifiers=[
6769
"Development Status :: 3 - Alpha",

tests/unit_tests/test_async_subtensor.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,8 @@ async def test_async_subtensor_magic_methods(mocker):
128128
pass
129129

130130
# Asserts
131-
fake_async_substrate.__aenter__.assert_called_once()
132-
fake_async_substrate.__aexit__.assert_called_once()
133-
fake_async_substrate.close.assert_awaited_once()
131+
fake_async_substrate.initialize.assert_called_once()
132+
fake_async_substrate.close.assert_called_once()
134133

135134

136135
@pytest.mark.parametrize(
@@ -145,7 +144,7 @@ async def test_async_subtensor_aenter_connection_refused_error(
145144
# Preps
146145
fake_async_substrate = mocker.AsyncMock(
147146
autospec=async_subtensor.AsyncSubstrateInterface,
148-
__aenter__=mocker.AsyncMock(side_effect=error),
147+
initialize=mocker.AsyncMock(side_effect=error),
149148
)
150149
mocker.patch.object(
151150
async_subtensor, "AsyncSubstrateInterface", return_value=fake_async_substrate
@@ -158,7 +157,7 @@ async def test_async_subtensor_aenter_connection_refused_error(
158157
pass
159158

160159
# Asserts
161-
fake_async_substrate.__aenter__.assert_called_once()
160+
fake_async_substrate.initialize.assert_awaited_once()
162161

163162

164163
@pytest.mark.asyncio

0 commit comments

Comments
 (0)