Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/fix block public inputs #45

Merged
merged 4 commits into from
Dec 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading