Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
5389957
Clarify return ordering and units for get_revealed_commitment_by_hotkey
Dairus01 Dec 27, 2025
eeec6e4
Add write permission for issues in workflow
Dairus01 Dec 28, 2025
c21c83c
fix TestSubnet class
basfroman Dec 29, 2025
dcfc51d
update `subtensor.is_fast_blocks` methods
basfroman Dec 29, 2025
cf4ed4c
add unit tests for `is_fast_blocks` methods
basfroman Dec 29, 2025
c4146f1
update `extras.dev_framework.calls` subpackage modules
basfroman Dec 29, 2025
f084562
add `get_start_call_delay` methods
basfroman Dec 29, 2025
38496ec
improve SubtensorApi
basfroman Dec 29, 2025
cac7ed5
update subnet activation logic in dev framework
basfroman Dec 29, 2025
9d9085c
add unit tests
basfroman Dec 29, 2025
cd73c17
add e2e tests
basfroman Dec 29, 2025
f667672
remove unused imports
basfroman Dec 29, 2025
59d422f
Update bittensor/core/subtensor.py
basfroman Dec 29, 2025
f73c629
Update bittensor/core/async_subtensor.py
basfroman Dec 29, 2025
c318f4c
Clarify return format in get_revealed_commitment_by_hotkey
Dairus01 Dec 30, 2025
8fc3420
Restore assertion in test_subtensor.py
Dairus01 Dec 30, 2025
1fe3ae6
Update .github/workflows/monitor_requirements_size_master.yml
Dairus01 Dec 30, 2025
825d9c0
Update subtensor.py
Dairus01 Dec 30, 2025
010ceed
Update bittensor/core/subtensor.py
basfroman Dec 30, 2025
8135462
Update bittensor/core/subtensor.py
basfroman Dec 30, 2025
1f62fa7
fix for async metagraph initialization
basfroman Dec 30, 2025
d58cddf
correct `subtensor.initialize`
basfroman Dec 30, 2025
3bb9e54
Merge pull request #3236 from opentensor/fix/roman/metagraph
basfroman Dec 30, 2025
70a873c
Merge pull request #3231 from Dairus01/clarify-return-ordering-and-units
basfroman Dec 30, 2025
ef0658f
skips user liquidity e2e test pending the rework
basfroman Jan 5, 2026
f5487ce
Merge pull request #3239 from opentensor/tests/roman/@pytest.mark.ski…
basfroman Jan 5, 2026
0ae1c31
chore: fix incorrect Optional type annotation in utils
Olexandr88 Jan 5, 2026
72994b6
chore: run make check
Olexandr88 Jan 8, 2026
2af4498
Merge pull request #3238 from Olexandr88/master
basfroman Jan 9, 2026
17b3e13
chore: remove unused test helper
Olexandr88 Jan 9, 2026
264d1b3
Merge pull request #3241 from Olexandr88/cleanup-remove-unused-test-h…
basfroman Jan 12, 2026
f0745fe
Merge pull request #3234 from opentensor/feat/roman/start_call_delay_…
basfroman Jan 12, 2026
eded626
update .gitignore
basfroman Jan 12, 2026
e62643c
improve is_fast_blocks
basfroman Jan 14, 2026
2599552
apply cast to aviod ruff crying
basfroman Jan 14, 2026
147e780
fix unit tests
basfroman Jan 14, 2026
ad8cdb6
Merge pull request #3243 from opentensor/feat/roman/improve-is-fast-b…
basfroman Jan 14, 2026
7711685
update CHANGELOG.md
basfroman Jan 15, 2026
c373169
bumping version
basfroman Jan 15, 2026
72bf940
bumping async-substrate-interface version to 1.5.15
basfroman Jan 15, 2026
a788073
Adds note about block 5611654 decoding
thewhaleking Jan 22, 2026
e3e4cf9
More conservative number
thewhaleking Jan 22, 2026
1d6c73f
Merge pull request #3246 from opentensor/feat/thewhaleking/add-note-a…
thewhaleking Jan 22, 2026
d7bf030
Merge branch 'staging' into changelog/10.1.0
basfroman Jan 27, 2026
f36ef2a
update changelog + merge staging
basfroman Jan 27, 2026
144e1ab
Merge pull request #3244 from opentensor/changelog/10.1.0
basfroman Jan 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/monitor_requirements_size_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
permissions:
pull-requests: write
contents: read
issues: write

jobs:
read-python-versions:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,5 @@ replicate.yaml
# Notebooks
*.ipynb

tests/zombienet/bin/**/*
tests/zombienet/bin/**/*
myscripts/
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 10.1.0 /2026-01-15

## What's Changed
* Fix for async metagraph initialization by @basfroman in https://github.com/opentensor/bittensor/pull/3236
* Clarify return ordering and units for `get_revealed_commitment_by_hotkey` by @Dairus01 in https://github.com/opentensor/bittensor/pull/3231
* Skips user liquidity e2e test pending the rework by @basfroman in https://github.com/opentensor/bittensor/pull/3239
* chore: fix incorrect Optional type annotation in utils by @Olexandr88 in https://github.com/opentensor/bittensor/pull/3238
* chore: remove unused test helper by @Olexandr88 in https://github.com/opentensor/bittensor/pull/3241
* Add `start_call_delay_hyperparameter` support by @basfroman in https://github.com/opentensor/bittensor/pull/3234
* Improve `is_fast_blocks` by @basfroman in https://github.com/opentensor/bittensor/pull/3243
* Adds note about block 5611654 decoding by @thewhaleking in https://github.com/opentensor/bittensor/pull/3246

## New Contributors
* @Dairus01 made their first contribution in https://github.com/opentensor/bittensor/pull/3231
* @Olexandr88 made their first contribution in https://github.com/opentensor/bittensor/pull/3238

**Full Changelog**: https://github.com/opentensor/bittensor/compare/v10.1.0...v10.0.2

## 10.0.1 /2025-12-22

## What's Changed
Expand Down
42 changes: 36 additions & 6 deletions bittensor/core/async_subtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import scalecodec
from async_substrate_interface import AsyncSubstrateInterface
from async_substrate_interface.substrate_addons import RetryAsyncSubstrate
from async_substrate_interface.types import ScaleObj
from async_substrate_interface.utils.storage import StorageKey
from bittensor_drand import get_encrypted_commitment
from bittensor_wallet.utils import SS58_FORMAT
Expand Down Expand Up @@ -165,7 +166,6 @@

if TYPE_CHECKING:
from async_substrate_interface import AsyncQueryMapResult
from async_substrate_interface.types import ScaleObj
from bittensor_wallet import Keypair, Wallet

from bittensor.core.axon import Axon
Expand Down Expand Up @@ -4306,6 +4306,35 @@ async def get_stake_weight(
)
return [u16_normalized_float(w) for w in result]

async def get_start_call_delay(
self,
block: Optional[int] = None,
block_hash: Optional[str] = None,
reuse_block: bool = False,
) -> int:
"""
Retrieves the start call delay in blocks.

Parameters:
block: The blockchain block number for the query.
block_hash: The blockchain block_hash of the block id.
reuse_block: Whether to reuse the last-used block hash.

Return:
Amount of blocks after the start call can be executed.
"""
return cast(
int,
(
await self.query_subtensor(
name="StartCallDelay",
block=block,
block_hash=block_hash,
reuse_block=reuse_block,
)
),
)

async def get_subnet_burn_cost(
self,
block: Optional[int] = None,
Expand Down Expand Up @@ -4985,19 +5014,20 @@ async def is_in_admin_freeze_window(
async def is_fast_blocks(self) -> bool:
"""Checks if the node is running with fast blocks enabled.

Fast blocks have a block time of 10 seconds, compared to the standard 12-second block time. This affects
Fast blocks have a block time of 0.25 seconds, compared to the standard 12-second block time. This affects
transaction timing and network synchronization.

Returns:
`True` if fast blocks are enabled (10-second block time), `False` otherwise (12-second block time).
`True` if fast blocks are enabled, `False` otherwise.

Notes:
- <https://docs.learnbittensor.org/resources/glossary#fast-blocks>

"""
return (
await self.query_constant("SubtensorModule", "DurationOfStartCall")
) == 10
slot_duration_obj = cast(
ScaleObj, await self.query_constant("Aura", "SlotDuration")
)
return slot_duration_obj.value == 250

async def is_hotkey_delegate(
self,
Expand Down
19 changes: 15 additions & 4 deletions bittensor/core/metagraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ async def sync(
await self._apply_extra_info(block=block)

async def _initialize_subtensor(
self, subtensor: "AsyncSubtensor"
self, subtensor: Optional["AsyncSubtensor"]
) -> "AsyncSubtensor":
"""
Initializes the subtensor to be used for syncing the metagraph.
Expand Down Expand Up @@ -1422,8 +1422,8 @@ async def _initialize_subtensor(
# Lazy import due to circular import (subtensor -> metagraph, metagraph -> subtensor)
from bittensor.core.async_subtensor import AsyncSubtensor

self.subtensor = AsyncSubtensor(network=self.chain_endpoint)
await self.subtensor.initialize()
subtensor = AsyncSubtensor(network=self.chain_endpoint)
await subtensor.initialize()
self.subtensor = subtensor
return subtensor

Expand Down Expand Up @@ -1720,7 +1720,7 @@ def sync(
# apply MetagraphInfo data to instance
self._apply_extra_info(block=block)

def _initialize_subtensor(self, subtensor: "Subtensor") -> "Subtensor":
def _initialize_subtensor(self, subtensor: Optional["Subtensor"]) -> "Subtensor":
"""
Initializes the subtensor to be used for syncing the metagraph.
Expand Down Expand Up @@ -1939,6 +1939,17 @@ async def async_metagraph(
) -> "AsyncMetagraph":
"""
Factory function to create an instantiated AsyncMetagraph, mainly for the ability to use sync at instantiation.
Parameters:
netuid: The netuid of the subnet for which to create the AsyncMetagraph.
mechid: The mechid of the subnet for which to create the AsyncMetagraph.
network: The network to use for the AsyncMetagraph.
lite: Whether to use a lite version of the AsyncMetagraph.
sync: Whether to sync the AsyncMetagraph.
subtensor: The subtensor to use for the AsyncMetagraph.
Returns:
AsyncMetagraph: The instantiated AsyncMetagraph.
"""
metagraph_ = AsyncMetagraph(
netuid=netuid,
Expand Down
25 changes: 22 additions & 3 deletions bittensor/core/subtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3540,6 +3540,24 @@ def get_stake_weight(self, netuid: int, block: Optional[int] = None) -> list[flo
)
return [u16_normalized_float(w) for w in result]

def get_start_call_delay(self, block: Optional[int] = None) -> int:
"""
Retrieves the start call delay in blocks.

Parameters:
block: The blockchain block number for the query.

Return:
Amount of blocks after the start call can be executed.
"""
return cast(
int,
self.query_subtensor(
name="StartCallDelay",
block=block,
),
)

def get_subnet_burn_cost(self, block: Optional[int] = None) -> Optional[Balance]:
"""
Retrieves the burn cost for registering a new subnet within the Bittensor network. This cost represents the
Expand Down Expand Up @@ -4075,17 +4093,18 @@ def is_in_admin_freeze_window(
def is_fast_blocks(self) -> bool:
"""Checks if the node is running with fast blocks enabled.

Fast blocks have a block time of 10 seconds, compared to the standard 12-second block time. This affects
Fast blocks have a block time of 0.25 seconds, compared to the standard 12-second block time. This affects
transaction timing and network synchronization.

Returns:
`True` if fast blocks are enabled (10-second block time), `False` otherwise (12-second block time).
`True` if fast blocks are enabled, `False` otherwise.

Notes:
- <https://docs.learnbittensor.org/resources/glossary#fast-blocks>

"""
return self.query_constant("SubtensorModule", "DurationOfStartCall") == 10
slot_duration_obj = cast(ScaleObj, self.query_constant("Aura", "SlotDuration"))
return slot_duration_obj.value == 250

def is_hotkey_delegate(self, hotkey_ss58: str, block: Optional[int] = None) -> bool:
"""
Expand Down
98 changes: 91 additions & 7 deletions bittensor/extras/dev_framework/calls/non_sudo_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

Note:
Any manual changes will be overwritten the next time the generator is run.
Subtensor spec version: 331
Subtensor spec version: 365
"""

from collections import namedtuple
Expand Down Expand Up @@ -42,6 +42,9 @@
ANNOUNCE = namedtuple(
"ANNOUNCE", ["wallet", "pallet", "real", "call_hash"]
) # args: [real: AccountIdLookupOf<T>, call_hash: CallHashOf<T>] | Pallet: Proxy
ANNOUNCE_NEXT_KEY = namedtuple(
"ANNOUNCE_NEXT_KEY", ["wallet", "pallet", "public_key"]
) # args: [public_key: BoundedVec<u8, ConstU32<2048>>] | Pallet: MevShield
APPLY_AUTHORIZED_UPGRADE = namedtuple(
"APPLY_AUTHORIZED_UPGRADE", ["wallet", "pallet", "code"]
) # args: [code: Vec<u8>] | Pallet: System
Expand Down Expand Up @@ -118,6 +121,10 @@
BURN_ALPHA = namedtuple(
"BURN_ALPHA", ["wallet", "pallet", "hotkey", "amount", "netuid"]
) # args: [hotkey: T::AccountId, amount: AlphaCurrency, netuid: NetUid] | Pallet: SubtensorModule
CALL = namedtuple(
"CALL",
["wallet", "pallet", "dest", "value", "gas_limit", "storage_deposit_limit", "data"],
) # args: [dest: AccountIdLookupOf<T>, value: BalanceOf<T>, gas_limit: Weight, storage_deposit_limit: Option<<BalanceOf<T> as codec::HasCompact>::Type>, data: Vec<u8>] | Pallet: Contracts
CALL = namedtuple(
"CALL",
[
Expand All @@ -135,6 +142,10 @@
"authorization_list",
],
) # args: [source: H160, target: H160, input: Vec<u8>, value: U256, gas_limit: u64, max_fee_per_gas: U256, max_priority_fee_per_gas: Option<U256>, nonce: Option<U256>, access_list: Vec<(H160, Vec<H256>)>, authorization_list: AuthorizationList] | Pallet: EVM
CALL_OLD_WEIGHT = namedtuple(
"CALL_OLD_WEIGHT",
["wallet", "pallet", "dest", "value", "gas_limit", "storage_deposit_limit", "data"],
) # args: [dest: AccountIdLookupOf<T>, value: BalanceOf<T>, gas_limit: OldWeight, storage_deposit_limit: Option<<BalanceOf<T> as codec::HasCompact>::Type>, data: Vec<u8>] | Pallet: Contracts
CANCEL = namedtuple(
"CANCEL", ["wallet", "pallet", "when", "index"]
) # args: [when: BlockNumberFor<T>, index: u32] | Pallet: Scheduler
Expand All @@ -152,12 +163,8 @@
"CANCEL_RETRY_NAMED", ["wallet", "pallet", "id"]
) # args: [id: TaskName] | Pallet: Scheduler
CLAIM_ROOT = namedtuple(
"CLAIM_ROOT",
[
"wallet",
"pallet",
],
) # args: [] | Pallet: SubtensorModule
"CLAIM_ROOT", ["wallet", "pallet", "subnets"]
) # args: [subnets: BTreeSet<NetUid>] | Pallet: SubtensorModule
CLEAR_IDENTITY = namedtuple(
"CLEAR_IDENTITY", ["wallet", "pallet", "identified"]
) # args: [identified: T::AccountId] | Pallet: Registry
Expand Down Expand Up @@ -242,6 +249,13 @@
DECREASE_TAKE = namedtuple(
"DECREASE_TAKE", ["wallet", "pallet", "hotkey", "take"]
) # args: [hotkey: T::AccountId, take: u16] | Pallet: SubtensorModule
DISABLE_LP = namedtuple(
"DISABLE_LP",
[
"wallet",
"pallet",
],
) # args: [] | Pallet: Swap
DISABLE_WHITELIST = namedtuple(
"DISABLE_WHITELIST", ["wallet", "pallet", "disabled"]
) # args: [disabled: bool] | Pallet: EVM
Expand Down Expand Up @@ -328,6 +342,58 @@
INCREASE_TAKE = namedtuple(
"INCREASE_TAKE", ["wallet", "pallet", "hotkey", "take"]
) # args: [hotkey: T::AccountId, take: u16] | Pallet: SubtensorModule
INSTANTIATE = namedtuple(
"INSTANTIATE",
[
"wallet",
"pallet",
"value",
"gas_limit",
"storage_deposit_limit",
"code_hash",
"data",
"salt",
],
) # args: [value: BalanceOf<T>, gas_limit: Weight, storage_deposit_limit: Option<<BalanceOf<T> as codec::HasCompact>::Type>, code_hash: CodeHash<T>, data: Vec<u8>, salt: Vec<u8>] | Pallet: Contracts
INSTANTIATE_OLD_WEIGHT = namedtuple(
"INSTANTIATE_OLD_WEIGHT",
[
"wallet",
"pallet",
"value",
"gas_limit",
"storage_deposit_limit",
"code_hash",
"data",
"salt",
],
) # args: [value: BalanceOf<T>, gas_limit: OldWeight, storage_deposit_limit: Option<<BalanceOf<T> as codec::HasCompact>::Type>, code_hash: CodeHash<T>, data: Vec<u8>, salt: Vec<u8>] | Pallet: Contracts
INSTANTIATE_WITH_CODE = namedtuple(
"INSTANTIATE_WITH_CODE",
[
"wallet",
"pallet",
"value",
"gas_limit",
"storage_deposit_limit",
"code",
"data",
"salt",
],
) # args: [value: BalanceOf<T>, gas_limit: Weight, storage_deposit_limit: Option<<BalanceOf<T> as codec::HasCompact>::Type>, code: Vec<u8>, data: Vec<u8>, salt: Vec<u8>] | Pallet: Contracts
INSTANTIATE_WITH_CODE_OLD_WEIGHT = namedtuple(
"INSTANTIATE_WITH_CODE_OLD_WEIGHT",
[
"wallet",
"pallet",
"value",
"gas_limit",
"storage_deposit_limit",
"code",
"data",
"salt",
],
) # args: [value: BalanceOf<T>, gas_limit: OldWeight, storage_deposit_limit: Option<<BalanceOf<T> as codec::HasCompact>::Type>, code: Vec<u8>, data: Vec<u8>, salt: Vec<u8>] | Pallet: Contracts
KILL_PREFIX = namedtuple(
"KILL_PREFIX", ["wallet", "pallet", "prefix", "subkeys"]
) # args: [prefix: Key, subkeys: u32] | Pallet: System
Expand All @@ -338,6 +404,12 @@
KILL_STORAGE = namedtuple(
"KILL_STORAGE", ["wallet", "pallet", "keys"]
) # args: [keys: Vec<Key>] | Pallet: System
MARK_DECRYPTION_FAILED = namedtuple(
"MARK_DECRYPTION_FAILED", ["wallet", "pallet", "id", "reason"]
) # args: [id: T::Hash, reason: BoundedVec<u8, ConstU32<256>>] | Pallet: MevShield
MIGRATE = namedtuple(
"MIGRATE", ["wallet", "pallet", "weight_limit"]
) # args: [weight_limit: Weight] | Pallet: Contracts
MODIFY_POSITION = namedtuple(
"MODIFY_POSITION",
["wallet", "pallet", "hotkey", "netuid", "position_id", "liquidity_delta"],
Expand Down Expand Up @@ -420,6 +492,9 @@
REMOVE_ANNOUNCEMENT = namedtuple(
"REMOVE_ANNOUNCEMENT", ["wallet", "pallet", "real", "call_hash"]
) # args: [real: AccountIdLookupOf<T>, call_hash: CallHashOf<T>] | Pallet: Proxy
REMOVE_CODE = namedtuple(
"REMOVE_CODE", ["wallet", "pallet", "code_hash"]
) # args: [code_hash: CodeHash<T>] | Pallet: Contracts
REMOVE_KEY = namedtuple(
"REMOVE_KEY",
[
Expand Down Expand Up @@ -557,6 +632,9 @@
SET_CODE = namedtuple(
"SET_CODE", ["wallet", "pallet", "code"]
) # args: [code: Vec<u8>] | Pallet: System
SET_CODE = namedtuple(
"SET_CODE", ["wallet", "pallet", "dest", "code_hash"]
) # args: [dest: AccountIdLookupOf<T>, code_hash: CodeHash<T>] | Pallet: Contracts
SET_CODE_WITHOUT_CHECKS = namedtuple(
"SET_CODE_WITHOUT_CHECKS", ["wallet", "pallet", "code"]
) # args: [code: Vec<u8>] | Pallet: System
Expand Down Expand Up @@ -645,6 +723,9 @@
START_CALL = namedtuple(
"START_CALL", ["wallet", "pallet", "netuid"]
) # args: [netuid: NetUid] | Pallet: SubtensorModule
SUBMIT_ENCRYPTED = namedtuple(
"SUBMIT_ENCRYPTED", ["wallet", "pallet", "commitment", "ciphertext"]
) # args: [commitment: T::Hash, ciphertext: BoundedVec<u8, ConstU32<8192>>] | Pallet: MevShield
SUDO = namedtuple(
"SUDO", ["wallet", "pallet", "call"]
) # args: [call: Box<<T as Config>::RuntimeCall>] | Pallet: Sudo
Expand Down Expand Up @@ -742,6 +823,9 @@
UPGRADE_ACCOUNTS = namedtuple(
"UPGRADE_ACCOUNTS", ["wallet", "pallet", "who"]
) # args: [who: Vec<T::AccountId>] | Pallet: Balances
UPLOAD_CODE = namedtuple(
"UPLOAD_CODE", ["wallet", "pallet", "code", "storage_deposit_limit", "determinism"]
) # args: [code: Vec<u8>, storage_deposit_limit: Option<<BalanceOf<T> as codec::HasCompact>::Type>, determinism: Determinism] | Pallet: Contracts
WITHDRAW = namedtuple(
"WITHDRAW", ["wallet", "pallet", "address", "value"]
) # args: [address: H160, value: BalanceOf<T>] | Pallet: EVM
Expand Down
Loading
Loading