Skip to content

Commit

Permalink
Feat/fix block public inputs (#45)
Browse files Browse the repository at this point in the history
* Update zkm receipt

* Fix fmt

* Update block_public_inputs
  • Loading branch information
xander42280 authored Dec 22, 2024
1 parent f57eeae commit 9a93536
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sdk/src/local/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,12 @@ pub fn prove_segments(
let wrapped_proof = wrapped_circuit.prove(&block_receipt.proof()).unwrap();
wrapped_proof.save(outdir).unwrap();

let src_public_inputs = match &block_receipt {
Receipt::Segments(receipt) => &receipt.proof.public_inputs,
Receipt::Composite(recepit) => &recepit.program_receipt.proof.public_inputs,
};
let block_public_inputs = serde_json::json!({
"public_inputs": wrapped_proof.proof.public_inputs,
"public_inputs": src_public_inputs,
});
let outdir_path = std::path::Path::new(outdir);
let public_values_file = File::create(outdir_path.join("public_values.json"))?;
Expand Down

0 comments on commit 9a93536

Please sign in to comment.