This commit is contained in:
Dmitriy Ryajov 2023-04-10 12:16:29 -06:00
parent 3057cb201b
commit 1f9cb9175a
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4
2 changed files with 5 additions and 7 deletions

View File

@ -6,15 +6,15 @@ use std::str;
#[derive(Debug, Clone)]
#[repr(C)]
pub struct Buffer {
data: *const u8,
len: usize,
pub data: *const u8,
pub len: usize,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct ProofCtx {
proof: Buffer,
public_inputs: Buffer,
pub proof: Buffer,
pub public_inputs: Buffer,
}
impl ProofCtx {
@ -71,10 +71,9 @@ pub unsafe extern "C" fn init(
Box::into_raw(Box::new(StorageProofs::new(wasm, r1cs, zkey)))
}
/// # Safety
///
/// Use after constructing a StorageProofs object
/// Use after constructing a StorageProofs object with init
#[no_mangle]
pub unsafe extern "C" fn prove(
prover_ptr: *mut StorageProofs,

View File

@ -11,7 +11,6 @@ use ark_std::rand::rngs::ThreadRng;
use ruint::aliases::U256;
#[derive(Debug, Clone)]
#[repr(C)]
pub struct StorageProofs {
builder: CircomBuilder<Bn254>,
params: ProvingKey<Bn254>,