subtensor icon indicating copy to clipboard operation
subtensor copied to clipboard

Cleanup rate limits

Open gztensor opened this issue 7 months ago • 0 comments

This task contains two sub-tasks:

  • Remove rate limits for root admin calls.
  • Store all rate limits in LastRateLimitedBlock and 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 RateLimitKey in LastRateLimitedBlock is the enum with the inner data that stores the piece of information the chain uses to decide who or what to limit. For example, for SetWeightsVersionKey transaction, 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.

gztensor avatar Apr 08 '25 16:04 gztensor