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.

Shared storage for instantiable FRAME pallets #8320

Description

@sacha-l

Implementing instantiable pallets could benefit from more flexibility and ease of usability if they could share common storage items. This was brought up at Substrate Seminar by @chevdor whereby the following scenario was outlined to give a practical use case example:

  • Assume a runtime has 100 instances of the Societies pallet
  • Each Society shares some common constant, such as the minimum balance of a societies treasury for it to stay alive
  • Over time, as per discussions within the governing body of this system containing all these Societies, this constant may change
  • How could a change to a constant (which must remain common to all Societies) be brought without needing to make 100 separate calls to storage?

As pointed out by @shawntabrizi, the work-away around this would be to create a custom instantiable pallet (not using FRAME) and to hardcode some shared storage key where all pallets will know to look when needed to retrieve the common information they require. Having FRAME give developers this possibility "out-the-box" could be something useful. Thanks @chevdor for the thinking here!

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

    A5-stalePull request did not receive any updates in a long time. No review needed at this stage. Close it.J2-unconfirmedIssue might be valid, but it’s not yet known.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions