Skip to content

Cleanup rate limits #1519

Open
Open
@gztensor

Description

@gztensor

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions