Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi-sig as host function #12

Open
przemyslaw opened this issue Apr 10, 2024 · 0 comments
Open

multi-sig as host function #12

przemyslaw opened this issue Apr 10, 2024 · 0 comments

Comments

@przemyslaw
Copy link
Collaborator

przemyslaw commented Apr 10, 2024

Context

Current multisig functionality is based on associated keys which can be configured for an account and used to sign deploys.

This approach exposes key management functions through a WASM runtime API, which means that setting up and managing multisig for an account requires writing and deploying WASM. This is somewhat inconvenient and potentially error-prone, since the API is very granular and it's relatively easy to render an account unusable (for example by upping action thresholds before key weights).

Goal

The goal of this task is to add a system contract for managing associated keys etc. similar to the auction contract and others.

This new contract does not necessarily have to be a 1:1 translation of the existing solution, but could instead expose methods for handling common use-cases, for example setup_account_recovery, setup_action_thresholds etc.

References

  • there are already some functionalities with similar parallel implementations, for example mint_native and mint_internal
  • it can be a trait (something like KeyManagementProvider) that we then implement for WASM Runtime and RuntimeNative
  • keep in mind that this implementation can be simplified compared to existing WASM one since there will no longer be a need to validate everything in each function
  • use TransactionCategory::Entity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant