Skip to content

Commit

Permalink
fix: set [0u8; 32] if public_input is empty (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
xander42280 authored Nov 13, 2024
1 parent d469655 commit 061d0a2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion prover/src/cpu/kernel/assembler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ impl Kernel {
let mut hasher = Sha256::new();
let public_input = if let Some(first) = self.program.input_stream.first() {
// bincode::deserialize::<Vec<u8>>(first).expect("deserialization failed")
first
if first.is_empty() {
&vec![0u8; 32]
} else {
first
}
} else {
&vec![0u8; 32]
};
Expand Down

0 comments on commit 061d0a2

Please sign in to comment.