Conversation
| Error::<T>::AmountTooLow | ||
| ); | ||
|
|
||
| // Step 3: Update StakingHotkeys if the hotkey's total alpha, across all subnets, is zero |
There was a problem hiding this comment.
Why do we have this snippet commented?
There was a problem hiding this comment.
It needs a better fix than just O(n) iteration over all all subnets for this hotkey. Probably we should store aggregate alpha for each hotkey or some king of bitmap that shows whether the hotkey has any alpha in a subnet. This is an older tech debt.
There was a problem hiding this comment.
Is it valid without the update? Can we get away with the postponed solution?
There was a problem hiding this comment.
Ya we can clean up the map later if needed. There's a call for it also
c47ae2b
| TransferToggle::<T>::get(destination_netuid), | ||
| Error::<T>::TransferDisallowed | ||
| ); | ||
| if origin_netuid != destination_netuid { |
There was a problem hiding this comment.
Saves one read
We need to make sure we check only for coldkey dest != coldkey origin
| Error::<T>::AmountTooLow | ||
| ); | ||
|
|
||
| // Step 3: Update StakingHotkeys if the hotkey's total alpha, across all subnets, is zero |
There was a problem hiding this comment.
Ya we can clean up the map later if needed. There's a call for it also
|
We should maybe pays::yes for this though. Or have a base fee. Just not percentage-wise. To prevent DoS |
…ubtensor into feat/staking-fees-corrected
| .saturating_add(T::DbWeight::get().reads(0)) | ||
| .saturating_add(T::DbWeight::get().writes(1)), | ||
| DispatchClass::Operational, | ||
| Pays::No |
There was a problem hiding this comment.
sudo_set_tx_childkey_take_rate_limit is a root-only transaction. No spam risk.
Description
Type of Change
Checklist
cargo fmtandcargo clippyto ensure my code is formatted and linted correctly