Skip to content

Vision: Easily verifiable key-less accounts #283

@emostov

Description

@emostov

Some use cases require creating a key-less account that can be easily verified by a DApp.

Currently, the only way to do this with a substrate FRAME pallet is to spawn an anonymous proxy account and then remove all keys from the account. To prove that an account is key-less, one would need to verify both 1) that the account was created with a proxy::Call::anonymous extrinsic and 2) that the account has no proxies in the proxy::Proxies map.

Assuming a DApp wants to exclusively rely on node RPCs (and not any indexing services), looking up historical extrinsics just to check if accounts might be keyless is unreasonably expensive. Instead, it would be helpful if a DApp could perform perform just a few lookups to prove an account is keyless.

Some possible ideas:

  • Create a map in the proxy or system pallet that stores if an account if it does not allow_signatures, which could be set for an account at any time to make it key-less. This could also be added to the AccountInfo storage item. A signed extension would then need to be added in order to check if the origin is allowed to sign
  • Create a map of anonymous proxy account -> spawner (or just a bool if we don't think its necessary to store the spawner)

In either of the aforementioned ideas we should consider cleaning up key less account metadata once they are dusted. This can be done with the OnAccountDeleted hook. However one might argue that if an account is set to not have a signature, it should forever not be able to have one, and thus should not be cleaned up

Metadata

Metadata

Assignees

No one assigned

    Labels

    D1-mediumCan be fixed by a coder with good Rust knowledge but little knowledge of the codebase.I5-enhancementAn additional feature request.T1-FRAMEThis PR/Issue is related to core FRAME, the framework.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions