Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

FRAME Storage remove_all API should have a key limit  #9002

Description

@shawntabrizi

Similar to the storage_kill api in child tries, the remove_all api on any maps should also have an optional key limit to enforce weight restrictions.

#8166

When calling remove_all, a user should also be able to include Option<u32>, which describes the maximum number of keys that can be removed at once.

At the end of the operation, you can return AllRemoved(u32) or SomeReamining(u32) with the number of items that were actually removed at the end of the operation.

Should reuse and rename KillChildStorageResult:

https://github.com/paritytech/substrate/blob/master/primitives/io/src/lib.rs#L89

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C3-mediumPR touches the given topic and has a medium impact on builders.Z6-mentorAn easy task where a mentor is available. Please indicate in the issue who the mentor could be.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions