Skip to content

PoC: Extension System #8

@xlc

Description

@xlc

Prototype an Extension System with following requirements:

  • Each extension can be defined as a Rust trait.
  • Some macro to read the definitions of it and generate a stable 64 bytes hash as a const ID field as the ExtensionId
    • It should normalize the order of methods and parameter names
    • The parameter type should be considered. But in that case, we will need to be able to generate a stable hash for it. In that case, we need to either use Implement stable type id paritytech/scale-info#182 or have a custom solution
  • User should be able to pass a list of Extension implementations, and the ExtensionExecutor should be able to perform discovery and invocation of the methods for an extension.
  • Extension can have associated types
  • A permission controller to safeguard extensions. For example, we may have an extension that allow arbitrary storage read but only expose it for the usage of offchain context. i.e. it should be disabled when executed via XCM. This also allows the runtime to dynamically disable an extension if needed.

Metadata

Metadata

Assignees

No one assigned

    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