You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a very minor, but annoying bug in the runtime. My beloved coworker unstaked all but 1 rao (X), and now the runtime decided to unstake the full amount (X+1), leading to an additional balances.Deposit of 1 rao, but the SubtensorModule.StakeRemoved event does not include the additional 1 rao, i.e. it reports a removal of X instead of X+1.
I think this is a bug. pallets/subtensor/src/staking/helpers.rs:clear_small_nomination_if_required() should either emit StakeRemoved if it removes stake, or it should return the additional rao removed so that pallets/subtensor/src/staking/remove_stake.rs:do_remove_stake() knows what additional amount to report as being unstaked.
Another way to look at it: Self::deposit_event(Event::StakeRemoved(hotkey, stake_to_be_removed)); should not report "stake to be removed" but "stake actually removed" if these numbers are not equal in practice.
I suspect an additional (minor) bug is that StakeDeltaSinceLastEmissionDrain is not mutated with the correct amount, for the same reason.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: