Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SenateMembers in is_senate_member helper #1449

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

Rubberbandits
Copy link
Contributor

This PR is required for the new change in subtensor which removes the Senate collective instance, simplifying the runtime for ease-of-use. You can find the matching PR for subtensor here.

@Rubberbandits
Copy link
Contributor Author

We don't need the subtensor update to use this change in the CLI, merging.

@Rubberbandits Rubberbandits merged commit 6e9aadc into release/5.3.1 Jul 12, 2023
@Rubberbandits Rubberbandits deleted the senate/remove-senate-collective branch July 12, 2023 17:24
camfairchild added a commit that referenced this pull request Jul 17, 2023
* (un)Staking multiple avoid tx limit (#1244)

* add tx rate limit

* wait for tx limit if not done multi stake/unstake

* dont "decrypt" hotkey

* Grab delegates details from GitHub (#1245)

* add url to init

* add dataclass and util functions

* use in cli

* remove delegates json

---------

Co-authored-by: joeylegere <joeylegere@gmail.com>

* Fix list_delegates on non-archive nodes (#1232)

* Change how pull of archival data is handled

* fix for list_delegates too

* .

* use empty dict

* fix spacing

* specify exception

* log out

* add space in log message

* use warning instead

* Improve development workflow documentation

* Update DEVELOPMENT_WORKFLOW.md

* (un)Staking multiple avoid tx limit (#1244)

* add tx rate limit

* wait for tx limit if not done multi stake/unstake

* dont "decrypt" hotkey

* Grab delegates details from GitHub (#1245)

* add url to init

* add dataclass and util functions

* use in cli

* remove delegates json

---------

Co-authored-by: joeylegere <joeylegere@gmail.com>

* Fix list_delegates on non-archive nodes (#1232)

* Change how pull of archival data is handled

* fix for list_delegates too

* .

* use empty dict

* fix spacing

* specify exception

* log out

* add space in log message

* use warning instead

* Improve development workflow documentation

* Update DEVELOPMENT_WORKFLOW.md

* progress on fix mock subtensor

rename test files for discovery

catch nonce errors

skip long tests

test durations

group cli tests to same runner

try group again

try to group tests using arg

patch start server

dont use groups and wait longer to teardown

dont kill

loadgroup

.

update durations

update durations

delay reruns

progress on new mock

more progress

add back mock init

create axons and prometheus

fix imports

add reset state

fix mock calls

fix setup

move some extr send to subtensor impl

move stake ext call

move unstake ext

add extr outline to mock sub

add ext bodies

fix type ann

return empty map on None

fix global state

* [BIT-351] Ask for wallet name on btcli unstake (#1387)

add not

* fix query map mock

* inc subnetN on mock reg

* add active to neuron on mock reg

* dont store balance in chainstate

* use dict comprehension

* don't print __is_set when displaying config

* use axon info from axon module

* set is set for Config in tests

* passes overview

* remove neurons, take out multiforward Synapse

* take out _neuron, these are in openminers & openvalidators now

* cleanup dendrite multi_forward

* missed MultiForward class in dendrite

* fix tests

* dont skip

* return data free of balance

* return proper types

* no nonces

* use same format for balances

* allow block for is delegate

* fix nominate

* fix nominate again :)

* fix typehint and return value==None

* fix total stake tracking

* nominate passes

* fix state for ismember and totalstake

* not returning last part of tuple

* oops, dont pass self twice

* return null neuron

* get mock block hash

* add set diff mock

* fix total issuance and balance

* add rate limit storage

* fix loop over nom

* fix some unit tests

* fix pow test

* fix get delegates mock

* fix typo

* typo again

* remove assert on err

* typo on storage

* spacing

* BlocksSinceLastStep instead

* fix list subnets

* dont skip

* add is set map

* fix patch

* setup mock net 3

* add a do_prometheus serve func

* add to mock

* remove unused examples

* update bittensor version into to current (510)

* fix prometheus test

* fix some staking tests

* fix transfer tests

* add do_set_weights

* add do_set_weights to mock

* use dsw in tests

* use == true

* use == True

* add do_serve_axon

* use typeddict

* add do serve axon mock

* add _ to subtensor.do_*  methods

* add _subtensor.types

* fix circular import

* fix mock get_balances

* return uid in mock

* run setup for tests with mock sub

* use mock sub for tests

* all subtensor tests pass

* fix mock with underscore

* nominators mock should be list tuple not dict

* fix duplicate setup

* Update README.md

fix typo

* Fix integration test

* remove multiforward from synapse (missed before)

* remove hotkey from proto and dendrite

* Weight Utils fix (#1372)

When Torch sets zeros or ones, it does this on the CPU. The metagraph is loaded on GPU. This results in errors—proposed fix.

* Extract config to new package (#1401)

* integrate openconfig progess

* add type or suppress for argparse

* use for problematic types

* fix type hints

* move test under testcase class

* move tests under testcase class

* add test for btcli with empty arguments on every command

* remove unneeded setup from test

* remove type or suppress from int

* remove to defaults test

* use dot get for prefix check

* move tests to config repo

* fix test by passing argv=[]

* use new package name

* fix name of openconfig package

* Extract wallet (#1403)

* integrate openconfig progess

* add type or suppress for argparse

* use for problematic types

* fix type hints

* move test under testcase class

* move tests under testcase class

* add test for btcli with empty arguments on every command

* remove unneeded setup from test

* remove type or suppress from int

* remove to defaults test

* use dot get for prefix check

* move test to package

* move wallet mock

* move some utils to package

* move wallet to package

* move reregister to registration utils

* add mocks

* move keyfile to package

* move test to utils tests

* use different naming

* fix import

* change function name and use kwargs

* modify naming

* add is_hotkey_registered

* use new function

* fix patch

* arg is cuda (typo)

* specify reregister true

* use generate wallet

* get mock wallet during tests

* extract get ss58 format util

* remove _mock arg

* extract tests

* import from base

* use subtensor for get_balance

* use new hotkey during test

* fix mocking

* add new packages to reqs file

* use new package naming

* bump wallet dep

* BTCli integration with new governance protocol (#1398)

* Begin senate cli

* Add helper functions to subtensor object for query_module, query_module_map

* Remove unused senate helpers

* Rename SenateCommand -> ProposalsCommand

* Remove unused proposals info datatype

* Add proposals data in rich table

* Clarify + beautify calldata column

* Add SenateRegisterCommand

* Add helper function wallet.is_senate_member

* Add subtensor *_senate extrinsics, is_senate_member, get_vote_data impl

* Use helper function to check senate membership

* Add command to view senate members

* Use get_vote_data helper and refactor call data formatting for recursion

* Add senate_vote and senate_leave cmd classes

* Add membership check in senate_register command

* Add senate_leave, senate_vote extrinsic functions

* Import senate_leave, senate_vote extrinsic functions in subtensor_impl

* Add senate, proposal_votes, senate_leave, senate_vote cmds to cli

* Move closure helper funcs to main scope, add display_votes helper

* Add senate size and active proposals metric, vote overview and nice names

* Add delegate nice-name support to proposal_votes

* Use coldkey for senate actions instead of hotkey

* Reverting unnecessary commits for next release. (#1415)

* Reverting unnecessary commits for next release.

* fix missed conflict

---------

Co-authored-by: ifrit98 <ifrit98@gmail.com>

* fix merge conflict

* fix dockerignore

* Use delegate nice-names in senate view

* use new regex for test

* make test assertion more verbose

* add to config for test

* bump version

* create api calls for senate info

* add block optional to is senate member

* prefer using subtensor api

* use new api calls

* dont sync metagraph on neuron init

* remove multiforwad

* fix error calling metagraph from subtensor without passing (#1426)

* fix error calling metagraph from subtensor without passing

* Update bittensor/_subtensor/subtensor_impl.py

Co-authored-by: Cameron Fairchild <cameron@opentensor.dev>

---------

Co-authored-by: Cameron Fairchild <cameron@opentensor.dev>

* Fix docker and pypi upload commands (#1375)

Co-authored-by: philanthrope <stgeorgejas@gmail.com>

* Fix cli ask for wallet hotkey name (#1430)

* check if NOT hotkey set

* add test for stake and unstake

* remove unneeded import

* add tests for delegate and undelegate

* add tests for delegate ss58 arg

* always sync metagraph during subtensor.metagraph

* derp

* remove unused HelpCommand class for miners/validators

* update changelog from running add_notes_changelog.sh

* fix script for the changelog

* add changelog

* Update scripts/release/github_utils.sh

* add weights call to subtensor (#1436)

* add weights call to subtensor

* add bonds call

* use bonds and weights calls for sync

* move into neurons

* fix type hints

* move func to chain data

* use new funcs in meta init

* fix kwarg name

* Revert "use new funcs in meta init"

This reverts commit 955e671.

* update dockerignore file (#1428)

* update dockerignore file

* add newline

* fix function name in script

* add new changelog additions

* update changelog again

* make minor release

* remove wallet impl

* use reregister from utils

* add arg for base miner reregister

* fix mock return values

* fix return format to use Tuple

* raise -> return

* Revert "fix return format to use Tuple"

This reverts commit 0252fcc.

* Revert "fix mock return values"

This reverts commit 2df31eb.

* raise correct errors in mock

* return tuples for do server

* move mocks to bt_wallet package (#1441)

* bump bittensor-wallet req, update cryptography security req

* Fixes #1442

* fix script error msg

* bump patch version

* add changelog

* bump bt wallet

* add to changelog new btwallet

* fix test imports

* bump btwallet version

* Use SenateMembers in is_senate_member helper (#1449)

---------

Co-authored-by: joeylegere <joeylegere@gmail.com>
Co-authored-by: “quac88” <“mac2@thrasher.com”>
Co-authored-by: philanthrope <stgeorgejas@gmail.com>
Co-authored-by: ifrit98 <ifrit98@gmail.com>
Co-authored-by: Mostima <91517378+mostimasblunderbuss@users.noreply.github.com>
Co-authored-by: Julius ter Pelkwijk <1099127+mrseeker@users.noreply.github.com>
Co-authored-by: Ayden Brewer <dalegribble@riseup.net>
Co-authored-by: Eduardo García <garciaruiz.edu+github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants