Skip to content

feat(standards): add foundation for Multisig Smart Authentication Component#2806

Open
onurinanc wants to merge 6 commits into0xMiden:nextfrom
onurinanc:multisig-smart-foundation
Open

feat(standards): add foundation for Multisig Smart Authentication Component#2806
onurinanc wants to merge 6 commits into0xMiden:nextfrom
onurinanc:multisig-smart-foundation

Conversation

@onurinanc
Copy link
Copy Markdown
Collaborator

This is a follow-up PR for: #2670

It's a foundation for MultisigSmart Authentication Component will have the following properties:

  • Timelocked Accounts
  • Amount-Based Thresholds
  • Spending Limits with Oracle Integration
  • Guardian Integration to Smart Account

The completed version of the PR having the above features is a big PR, so, decided to separate these PRs into 3:

  • First PR is this PR implementing a core foundation for MultisigSmart
  • The follow-up PR will be adding the above features (if it is again a big PR, will try to split it up to 2 PRs)
  • Final PR is the Presets Configurations for Multisig Accounts with the Security Best Practices

I believe this PR is self-explanatory since it doesn't include any features but prepares a core component for MultisigSmart.

@mmagician mmagician added standards Related to standard note scripts or account components pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority labels Apr 29, 2026
Copy link
Copy Markdown
Contributor

@partylikeits1983 partylikeits1983 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just a few comments during my first review pass.

I saw some MASM that I saw could be cycle count optimized so I went to check how many cycles could be shaved off in the set_procedure_policy procedure, but then realized that the tests do not call it.

I'd push for adding tests which execute all MASM which is added. I understand this is a foundational PR for follow up PRs, but even minimal testing would be better than no tests. I think once this has a bit more test coverage it will be ready to merge, because everything else looks good!

Comment on lines +13 to +14


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: double empty line

Suggested change

#!
#! Invocation: exec
@locals(3)
pub proc set_procedure_policy
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not find a test which calls set_procedure_policy. Could we add a test which calls it just so we don't add code which is never tested.

#!
#! Invocation: call
@locals(2)
pub proc update_signers_and_threshold(multisig_config_hash: word)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, can we add a test which calls this?

(Vec<AuthSecretKey>, Vec<AuthScheme>, Vec<PublicKey>, Vec<BasicAuthenticator>);

/// Sets up secret keys, auth schemes, public keys, and authenticators for a specific scheme.
fn setup_keys_and_authenticators_with_scheme(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not possible to reuse the existing setup_keys_and_authenticators_with_scheme function which we use in the existing mutlisig?

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

Labels

pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority standards Related to standard note scripts or account components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants