Skip to content

[Fix] Allow unstake below network min#2016

Merged
thealligatorking merged 18 commits intostagingfrom
fix/allow-unstake-below-network-min
Jun 12, 2024
Merged

[Fix] Allow unstake below network min#2016
thealligatorking merged 18 commits intostagingfrom
fix/allow-unstake-below-network-min

Conversation

@camfairchild
Copy link
Contributor

@camfairchild camfairchild commented Jun 12, 2024

Bug

This fixes an errant exit when trying to unstake an amount that is below the minimum required stake on-chain.

Description of the Change

  • The code will now check if the remaining balance is below the aforementioned minimum (rather than the amount to unstake), and only for nominated stakes.
  • The code will now only emit a warning message, instead unstaking all staked balance, as expected since [Fix] allow unstake below nom limit subtensor#462
  • The code will now check the threshold when attempting to stake, to reduce failed extrinsics

Verification Process

  • Wrote some CLI tests
  • Tested with btcli on testnet

Release Notes

Allow unstake below network minimum

@camfairchild camfairchild force-pushed the fix/allow-unstake-below-network-min branch from 2ae84e1 to 7a49c12 Compare June 12, 2024 18:27
@ibraheem-abe ibraheem-abe requested a review from a team June 12, 2024 20:17
@thealligatorking thealligatorking merged commit 7d902ff into staging Jun 12, 2024
@thealligatorking thealligatorking mentioned this pull request Jun 12, 2024
thealligatorking added a commit that referenced this pull request Jun 12, 2024
…ork-min

[Fix] Allow unstake below network min
@opendansor opendansor deleted the fix/allow-unstake-below-network-min branch June 12, 2024 23:35
@ibraheem-abe ibraheem-abe mentioned this pull request Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bittensor bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants