define_verify_openvm_stark

Macro define_verify_openvm_stark 

Source
macro_rules! define_verify_openvm_stark {
    ($fn_name: ident, $asm_folder: expr, $asm_filename: literal) => { ... };
}
Expand description

Define a function that verifies an OpenVM Stark proof. To define this function, users need to specify the function name and an ASM file containing the assembly code for the verification(this ASM file can be generated by Sdk.generate_root_verifier_asm function). To specify the ASM file, users need to provide the parent folder and filename of the ASM file. To call this function:

  1. users need to provide app_exe_commit/app_vm_commit/user_pvs(user public values) as the arguments. CAREFUL: app_exe_commit/app_vm_commit are in u32 and are interpreted as native fields. user_pvs are the exact public values of that proof. Here we assume all the public values are u8s.
  2. Provide the corresponding stark proof in the key-value store in OpenVM streams. The key should be the concatenation of the filename, app_exe_commit, app_vm_commit, and user_pvs in little-endian bytes. Users can use openvm::host::compute_hint_key_for_verify_openvm_stark to compute the hint key.