Skip to content

Commit

Permalink
merge master back into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
ifrit98 committed Jul 21, 2023
2 parents c6d159d + 484991d commit af1f535
Show file tree
Hide file tree
Showing 21 changed files with 175 additions and 114 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 5.3.1 / 2023-07-06

## What's Changed
* bump bittensor-wallet req, update cryptography security req by @@ifrit98 in [91d13b0](https://github.com/opentensor/bittensor/commit/91d13b0fa711621cbf823708d4368b1b387e42c4)
* Fixes Discord Link Issue #1442 by @camfairchild in [54d6248](https://github.com/opentensor/bittensor/commit/54d62487d4cb59e0b5edcd53acdca013108d155b)
* move mocks to bittensor_wallet package by @camfairchild in https://github.com/opentensor/bittensor/pull/1441
* Bump bittensor-wallet version to 0.0.4

**Full Changelog**: https://github.com/opentensor/bittensor/compare/v5.3.0...v5.3.1


## 5.3.0 / 2023-07-04

## What's Changed
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.0
5.3.1
2 changes: 1 addition & 1 deletion bittensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
nest_asyncio.apply()

# Bittensor code and protocol version.
__version__ = '5.3.0'
__version__ = '5.3.1'
version_split = __version__.split(".")
__version_as_int__ = (100 * int(version_split[0])) + (10 * int(version_split[1])) + (1 * int(version_split[2]))
__new_signature_version__ = 360
Expand Down
4 changes: 2 additions & 2 deletions bittensor/_blacklist/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def add_args( cls, parser: argparse.ArgumentParser, prefix: str = None ):
parser.add_argument(
'--' + prefix_str + 'blacklist.allow_non_registered',
action = 'store_true',
help = 'If True, the miner will allow non-registered hotkeys to mine.',
default = True
help = 'If True, the miner will allow non-registered hotkeys to pass blacklist.',
default = False
)
parser.add_argument(
'--' + prefix_str + 'blacklist.min_allowed_stake',
Expand Down
2 changes: 1 addition & 1 deletion bittensor/_subtensor/subtensor_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ def is_senate_member(
hotkey_ss58: str,
block: Optional[int] = None,
) -> bool:
senate_members = self.query_module(module="Senate", name="Members", block=block ).serialize()
senate_members = self.query_module(module="SenateMembers", name="Members", block=block ).serialize()
return senate_members.count( hotkey_ss58 ) > 0

def get_vote_data(
Expand Down
2 changes: 1 addition & 1 deletion requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ argparse==1.4.0
base58==2.0.1
backoff==2.1.0
bittensor-config==0.0.0
bittensor-wallet==0.0.2
bittensor-wallet==0.0.4
cryptography==41.0.0
datasets==2.12.0
fuzzywuzzy==0.18.0
Expand Down
2 changes: 1 addition & 1 deletion scripts/release/versioning.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ while [[ $# -gt 0 ]]; do
done

if [[ $VERSION_TYPE != "major" && $VERSION_TYPE != "minor" && $VERSION_TYPE != "patch" && $VERSION_TYPE != "rc" ]]; then
echo_error "Incorrect version type (-V|--version). Version types accepted: {major, minor, patch}"
echo_error "Incorrect version type (-U|--update). Version types accepted: {major, minor, patch}"
exit 1
fi

Expand Down
18 changes: 18 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# The MIT License (MIT)
# Copyright © 2022 Yuma Rao
# Copyright © 2022-2023 Opentensor Foundation
# Copyright © 2023 Opentensor Technologies

# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the “Software”), to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
# the Software.

# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
# THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
18 changes: 18 additions & 0 deletions tests/helpers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# The MIT License (MIT)
# Copyright © 2023 Opentensor Technologies

# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the “Software”), to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
# the Software.

# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
# THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.

from .helpers import _get_mock_coldkey, _get_mock_hotkey, _get_mock_keypair, _get_mock_wallet, CLOSE_IN_VALUE, MockConsole
21 changes: 17 additions & 4 deletions tests/helpers.py → tests/helpers/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,21 @@
from rich.console import Console
from rich.text import Text

from bittensor_wallet.mock import MockWallet as MockWallet
from bittensor_wallet.mock.utils import get_mock_wallet as get_mock_wallet, get_mock_hotkey, get_mock_coldkey
from bittensor_wallet.mock import MockWallet as _MockWallet, utils as _mock_wallet_utils

_get_mock_coldkey = _mock_wallet_utils.get_mock_coldkey
_get_mock_hotkey = _mock_wallet_utils.get_mock_hotkey
_get_mock_keypair = _mock_wallet_utils.get_mock_keypair
_get_mock_wallet = _mock_wallet_utils.get_mock_wallet


def __mock_wallet_factory__(*args, **kwargs) -> _MockWallet:
"""Returns a mock wallet object."""

mock_wallet = _get_mock_wallet()

return mock_wallet


class CLOSE_IN_VALUE():
value: Union[float, int, Balance]
Expand Down Expand Up @@ -105,8 +118,8 @@ def get_mock_neuron(**kwargs) -> NeuronInfo:
def get_mock_neuron_by_uid( uid: int, **kwargs ) -> NeuronInfo:
return get_mock_neuron(
uid = uid,
hotkey = get_mock_hotkey(uid),
coldkey = get_mock_coldkey(uid),
hotkey = _get_mock_hotkey(uid),
coldkey = _get_mock_coldkey(uid),
**kwargs
)

Expand Down
Empty file.
Loading

0 comments on commit af1f535

Please sign in to comment.