Skip to content

Commit

Permalink
fix output
Browse files Browse the repository at this point in the history
  • Loading branch information
yann-sjtu authored and xgaozoyoe committed Sep 12, 2023
1 parent 0ad6531 commit 930d0a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/cli/src/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ pub fn exec_create_proof(
) -> Result<()> {
let loader = ZkWasmLoader::<Bn256>::new(zkwasm_k, wasm_binary, phantom_functions, None)?;

let (circuit, instances) = loader.circuit_with_witness(ExecutionArg {
let (circuit, instances, _) = loader.circuit_with_witness(ExecutionArg {
public_inputs,
private_inputs,
context_inputs,
Expand Down
4 changes: 2 additions & 2 deletions crates/zkwasm/src/loader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ impl<E: MultiMillerLoop> ZkWasmLoader<E> {
pub fn circuit_with_witness(
&self,
arg: ExecutionArg,
) -> Result<(TestCircuit<E::Scalar>, Vec<E::Scalar>)> {
) -> Result<(TestCircuit<E::Scalar>, Vec<E::Scalar>, Vec<u64>)> {
let execution_result = self.run(arg, true)?;

#[allow(unused_mut)]
Expand All @@ -236,7 +236,7 @@ impl<E: MultiMillerLoop> ZkWasmLoader<E> {
println!("output:");
println!("{:?}", execution_result.outputs);

Ok((builder.build_circuit(), instance))
Ok((builder.build_circuit(), instance, execution_result.outputs))
}

pub fn mock_test(
Expand Down
2 changes: 1 addition & 1 deletion crates/zkwasm/src/runtime/wasmi_interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl Execution<RuntimeValue>
},
result,
public_inputs_and_outputs: wasm_io.public_inputs_and_outputs.borrow().clone(),
outputs: wasm_io.public_inputs_and_outputs.borrow().clone(),
outputs: wasm_io.outputs.borrow().clone(),
})
}
}
Expand Down

0 comments on commit 930d0a5

Please sign in to comment.