Skip to content

Commit 955efa9

Browse files
authored
Merge pull request #3049 from opentensor/release/9.10.1
Release/9.10.1
2 parents 59f86a9 + ccb5021 commit 955efa9

File tree

6 files changed

+25
-12
lines changed

6 files changed

+25
-12
lines changed

CHANGELOG.md

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

3+
## 9.10.1 /2025-09-05
4+
5+
## What's Changed
6+
* Async Get_balances at a specific block returns current block by @basfroman in https://github.com/opentensor/bittensor/pull/3043
7+
* Fix bug if `block==0` by @basfroman in https://github.com/opentensor/bittensor/pull/3044
8+
* docs: Update Bittensor documentation link by @Galoretka in https://github.com/opentensor/bittensor/pull/3040
9+
10+
## New Contributors
11+
* @Galoretka made their first contribution in https://github.com/opentensor/bittensor/pull/3040
12+
13+
**Full Changelog**: https://github.com/opentensor/bittensor/compare/v9.10.0...v9.10.1
14+
315
## 9.10.0 /2025-08-28
416

517
## What's Changed

bittensor/core/async_subtensor.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ async def determine_block_hash(
343343
# Return the appropriate value.
344344
if block_hash:
345345
return block_hash
346-
if block:
346+
if block is not None:
347347
return await self.get_block_hash(block)
348348
return None
349349

@@ -1235,7 +1235,8 @@ async def get_balances(
12351235
"""
12361236
if reuse_block:
12371237
block_hash = self.substrate.last_block_hash
1238-
elif not block_hash:
1238+
elif block_hash is None and block is None:
1239+
# Neither block nor block_hash provided, default to head
12391240
block_hash = await self.get_block_hash()
12401241
else:
12411242
block_hash = await self.determine_block_hash(block, block_hash, reuse_block)
@@ -1308,7 +1309,7 @@ async def get_block_hash(self, block: Optional[int] = None) -> str:
13081309
Notes:
13091310
See also: <https://docs.learnbittensor.org/glossary#block>
13101311
"""
1311-
if block:
1312+
if block is not None:
13121313
return await self._get_block_hash(block)
13131314
else:
13141315
return await self.substrate.get_chain_head()

bittensor/core/subtensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ def get_block_hash(self, block: Optional[int] = None) -> str:
746746
data. It is crucial for verifying transactions, ensuring data consistency, and maintaining the
747747
trustworthiness of the blockchain.
748748
"""
749-
if block:
749+
if block is not None:
750750
return self._get_block_hash(block)
751751
else:
752752
return self.substrate.get_chain_head()

bittensor/utils/mock/subtensor_mock.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ def query_subtensor(
581581
) -> MockSubtensorValue:
582582
if params is None:
583583
params = []
584-
if block:
584+
if block is not None:
585585
if self.block_number < block:
586586
raise Exception("Cannot query block in the future")
587587

@@ -622,7 +622,7 @@ def query_map_subtensor(
622622
"""
623623
if params is None:
624624
params = []
625-
if block:
625+
if block is not None:
626626
if self.block_number < block:
627627
raise Exception("Cannot query block in the future")
628628

@@ -668,7 +668,7 @@ def query_map_subtensor(
668668
def query_constant(
669669
self, module_name: str, constant_name: str, block: Optional[int] = None
670670
) -> Optional[object]:
671-
if block:
671+
if block is not None:
672672
if self.block_number < block:
673673
raise Exception("Cannot query block in the future")
674674

@@ -697,7 +697,7 @@ def get_current_block(self) -> int:
697697
# ==== Balance RPC methods ====
698698

699699
def get_balance(self, address: str, block: int = None) -> "Balance":
700-
if block:
700+
if block is not None:
701701
if self.block_number < block:
702702
raise Exception("Cannot query block in the future")
703703

@@ -732,7 +732,7 @@ def neuron_for_uid(
732732
if uid is None:
733733
return NeuronInfo.get_null_neuron()
734734

735-
if block:
735+
if block is not None:
736736
if self.block_number < block:
737737
raise Exception("Cannot query block in the future")
738738

@@ -958,7 +958,7 @@ def neuron_for_uid_lite(
958958
if uid is None:
959959
return NeuronInfoLite.get_null_neuron()
960960

961-
if block:
961+
if block is not None:
962962
if self.block_number < block:
963963
raise Exception("Cannot query block in the future")
964964

contrib/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ When you are creating an enhancement suggestion, please [include as many details
279279

280280
#### Before Submitting An Enhancement Suggestion
281281

282-
* **Check the [debugging guide](./DEBUGGING.md).** for tips — you might discover that the enhancement is already available. Most importantly, check if you're using the latest version of Bittensor by pulling the latest changes from the Master branch and if you can get the desired behavior by changing [Bittensor's config settings](https://opentensor.github.io/getting-started/configuration.html).
282+
* **Check the [debugging guide](./DEBUGGING.md).** for tips — you might discover that the enhancement is already available. Most importantly, check if you're using the latest version of Bittensor by pulling the latest changes from the Master branch and if you can get the desired behavior by changing [Bittensor's config settings](https://docs.learnbittensor.org/python-api/html/autoapi/bittensor/core/config/).
283283
* **Determine which repository the problem should be reported in: if it has to do with your ML model, then it's likely [Bittensor](https://github.com/opentensor/bittensor). If you are having problems with your emissions or Blockchain, then it is in [subtensor](https://github.com/opentensor/subtensor)
284284

285285
#### How To Submit A (Good) Feature Suggestion

pyproject.toml

Lines changed: 1 addition & 1 deletion
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.10.0"
7+
version = "9.10.1"
88
description = "Bittensor"
99
readme = "README.md"
1010
authors = [

0 commit comments

Comments
 (0)