Skip to content

Commit

Permalink
Merge branch 'staging' into tests/zyzniewski/more_e2e_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zyzniewski-reef authored Feb 25, 2025
2 parents 2dd9b7b + 0f8d278 commit d0b0cfc
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 22 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## 9.0.1 /2025-02-20

## What's Changed
* Release/9.0.0 by @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2671
* fix e2e test by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2673
* fix e2e test incentive by @roman-opentensor in https://github.com/opentensor/bittensor/pull/2674
* Add compatibility for read-only systems by @Arthurdw in https://github.com/opentensor/bittensor/pull/2676
* test: use asynccontextmanager for FastAPI lifespan by @zyzniewski-reef in https://github.com/opentensor/bittensor/pull/2597
* test(2472): offline unittests by @zyzniewski-reef in https://github.com/opentensor/bittensor/pull/2596
* Removes redundant assignments in Metagraph by @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2680
* Alpha str formatting by @thewhaleking in https://github.com/opentensor/bittensor/pull/2672
* Add method for fetching all Neuron Certificates on a Netuid by @thewhaleking in https://github.com/opentensor/bittensor/pull/2677
* Updates tao_stake in MetagraphInfo by @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2682
* fix(2188): configure uvicorn event loop by @zyzniewski-reef in https://github.com/opentensor/bittensor/pull/2679
* Refactor AsyncSubtensor aenter logic by @thewhaleking in https://github.com/opentensor/bittensor/pull/2684
* Backmerge master to staging 900 by @ibraheem-opentensor in https://github.com/opentensor/bittensor/pull/2685

## New Contributors
* @Arthurdw made their first contribution in https://github.com/opentensor/bittensor/pull/2676

**Full Changelog**: https://github.com/opentensor/bittensor/compare/v9.0.0...v9.0.1

## 9.0.0 /2025-02-13

## What's Changed
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.0.0
9.0.1
19 changes: 2 additions & 17 deletions bittensor/core/extrinsics/staking.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import time
from typing import Optional, TYPE_CHECKING, Sequence

from bittensor.core.errors import StakeError, NotRegisteredError
Expand Down Expand Up @@ -233,7 +232,7 @@ def add_stake_multiple_extrinsic(
total_staking_rao = sum(
[amount.rao if amount is not None else 0 for amount in new_amounts]
)
old_balance = inital_balance = subtensor.get_balance(
old_balance = initial_balance = subtensor.get_balance(
wallet.coldkeypub.ss58_address, block=block
)
if total_staking_rao == 0:
Expand Down Expand Up @@ -298,20 +297,6 @@ def add_stake_multiple_extrinsic(
if staking_response is True: # If we successfully staked.
# We only wait here if we expect finalization.

if idx < len(hotkey_ss58s) - 1:
# Wait for tx rate limit.
tx_query = subtensor.substrate.query(
module="SubtensorModule", storage_function="TxRateLimit"
)
tx_rate_limit_blocks: int = getattr(tx_query, "value", 0)
if tx_rate_limit_blocks > 0:
logging.error(
f":hourglass: [yellow]Waiting for tx rate limit: [white]{tx_rate_limit_blocks}[/white] "
f"blocks[/yellow]"
)
# 12 seconds per block
time.sleep(tx_rate_limit_blocks * 12)

if not wait_for_finalization and not wait_for_inclusion:
old_balance -= staking_balance
successful_stakes += 1
Expand Down Expand Up @@ -365,7 +350,7 @@ def add_stake_multiple_extrinsic(
)
new_balance = subtensor.get_balance(wallet.coldkeypub.ss58_address)
logging.info(
f"Balance: [blue]{inital_balance}[/blue] :arrow_right: [green]{new_balance}[/green]"
f"Balance: [blue]{initial_balance}[/blue] :arrow_right: [green]{new_balance}[/green]"
)
return True

Expand Down
2 changes: 1 addition & 1 deletion bittensor/core/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "9.0.0"
__version__ = "9.0.1"

import os
import re
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e_tests/test_commit_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async def test_commit_and_reveal_weights_legacy(local_chain, subtensor, alice_wa
), "Failed to set weights_rate_limit"
assert subtensor.weights_rate_limit(netuid=netuid) == 0

# Increase subnet tempo so we have enought time to commit and reveal weights
# Increase subnet tempo so we have enough time to commit and reveal weights
sudo_set_admin_utils(
local_chain,
alice_wallet,
Expand Down
3 changes: 1 addition & 2 deletions tests/unit_tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

def test_py_config_parsed_successfully_rust_wallet():
"""Verify that python based config object is successfully parsed with rust-based wallet object."""
# Preps
parser = argparse.ArgumentParser()

bittensor.wallet.add_args(parser)
Expand All @@ -14,7 +13,7 @@ def test_py_config_parsed_successfully_rust_wallet():

config = bittensor.config(parser)

# since we can't apply mocking to rust implewmented object then replace those directly
# override config manually since we can't apply mocking to rust objects easily
config.wallet.name = "new_wallet_name"
config.wallet.hotkey = "new_hotkey"
config.wallet.path = "/some/not_default/path"
Expand Down

0 comments on commit d0b0cfc

Please sign in to comment.