Skip to content

Commit

Permalink
add comments for the host program
Browse files Browse the repository at this point in the history
  • Loading branch information
[gavin-ygy] committed Nov 13, 2024
1 parent 70a6259 commit a604f97
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion host-program/src/bin/zkm-prove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,14 @@ fn update_public_inputs_with_bincode(
if userdata == output_hs {
log::info!(" hash(bincode(pulic_input))1: {:?} ", &userdata);
//2, update userdata with bincode(host's public_inputs).
//the userdata is saved in the public_inputs.json.
//the test contract validates the public inputs in the snark proof file using this userdata.
public_inputs.userdata = public_inputstream;
} else if public_inputstream.is_empty() {
log::info!(" hash(bincode(pulic_input))2: {:?} ", &userdata);
//2', here, the bincode() setting as vec![0u8; 32].
//2', in this case, the bincode(public inputs) need setting to vec![0u8; 32].
//the userdata is saved in the public_inputs.json.
//the test contract validates the public inputs in the snark proof file using this userdata.
public_inputs.userdata = vec![0u8; 32];
} else {
log::info!(
Expand Down

0 comments on commit a604f97

Please sign in to comment.