opentensor / subtensor

Bittensor Blockchain Layer
The Unlicense
145 stars 149 forks source link

Fix Senate Membership #430

Closed camfairchild closed 2 months ago

camfairchild commented 4 months ago

Describe the bug

The Senate is comprised of the top peers by Stake in the root subnet (SN0). This group is a governance group that is permitted to vote on proposals made by the Triumvirate.

The issue is that the Senate membership is never update outside of initially adding a key (and swapping, if applicable) to the subnet during the root registration call. This means that when a peer registers for the root subnet they are given a status of either Senate membership, and if their relative Stake changes above or below the threshold to join/leave the Senate, their membership is not updated.

To Reproduce

  1. Register in the root subnet with low Stake, but enough to register (i.e. lowest_peer.stake + \epsilon)
  2. Notice you are not in the Senate
  3. Add sufficient Stake to qualify for the Senate
  4. Notice you are still not in the Senate

Expected behavior

I would expect the membership status to change automatically or for a call to change it to reflect the Stake holdings of the root subnet peers.

Screenshots

No response

Environment

OS: NA, Runtime Version: 148

Additional context

No response