Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Extend SDK with non-default verify implementation #448

Open
YaronWittenstein opened this issue Dec 15, 2021 · 0 comments
Open

Extend SDK with non-default verify implementation #448

YaronWittenstein opened this issue Dec 15, 2021 · 0 comments
Assignees
Labels
AA Related to the Accounts Abstraction sdk Related to the SVM SDK simple-coin-iteration-2 svm

Comments

@YaronWittenstein
Copy link
Contributor

YaronWittenstein commented Dec 15, 2021

Right now, the SDK generates this verify code (svm_verify if to be precise)

 #[no_mangle]
pub extern "C" fn svm_verify() -> u32 {
    0
}

fn export_verify_ast() -> TokenStream {
quote! {
#[no_mangle]
pub extern "C" fn svm_verify() -> u32 {
// TODO:
// This is a temporary stub
//
// The Template Author will have to come up with
// his own implementation for `svm_verify`
0
}
}
}

The Simple Coin Iteration #2 is about being able to implement meaningful verify that will implement algorithms such as Single-Sig or MultiSig.

  • Introduce a new #[verify] proc-macro attribute. For references look at the current #[endpoint] and #[ctor].
  • Enforce only one usage of #[verify] within a Template.
  • In case no #[verify] usage is being used - we can decide to fall back to the current stub implementation for now.
@YaronWittenstein YaronWittenstein added AA Related to the Accounts Abstraction sdk Related to the SVM SDK simple-coin-iteration-2 svm labels Dec 15, 2021
@YaronWittenstein YaronWittenstein changed the title Extend SDK with non-default verify implementation Extend SDK with non-default verify implementation Dec 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AA Related to the Accounts Abstraction sdk Related to the SVM SDK simple-coin-iteration-2 svm
Projects
None yet
Development

No branches or pull requests

2 participants