subtensor
subtensor copied to clipboard
Cleanup rate limits
This task contains two sub-tasks:
- Remove rate limits for root admin calls.
- Store all rate limits in
LastRateLimitedBlockand implement corresponding migration.
Remove rate limits for root admin calls
- [ ] All extrinsics in admin pallet that can be called by root (esp. the ones that can be called by both root and subnet owner) should not impose any rate limiting when called by root.
Store all rate limits in LastRateLimitedBlock and implement corresponding migration
See the reference implementation for do_set_sn_owner_hotkey in this PR:
- [ ] The rate limit key
RateLimitKeyinLastRateLimitedBlockis the enum with the inner data that stores the piece of information the chain uses to decide who or what to limit. For example, forSetWeightsVersionKeytransaction, we rate limit for each netuid independently. Which means that rate limit key should contain netuid as inner data, etc. - [ ] Implement a migration that will remove older maps that store all rate limiting information such as
LastTxBlock,LastTxBlockChildKeyTake,LastTxBlockDelegateTake, etc.