Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
PatStiles committed Aug 21, 2024
1 parent bc9ff19 commit 2e8c160
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions batcher/aligned-batcher/src/risc_zero/mod.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use risc0_zkvm::{InnerReceipt, Receipt};
use log::error;
use risc0_zkvm::{InnerReceipt, Receipt};

pub fn verify_risc_zero_proof(
inner_receipt_bytes: &[u8],
image_id: &[u8; 32],
public_input: &[u8],
) -> bool {
// We verify that the buffers are non-zero otherwise return false. We allow public_input size of 0.
if receipt_bytes.is_empty() || image_id.is_empty() {
if inner_receipt_bytes.is_empty() || image_id.is_empty() {
error!("Risc0 input buffer zero size");
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions operator/risc_zero/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ pub extern "C" fn verify_risc_zero_receipt_ffi(
public_input: *const u8,
public_input_len: u32,
) -> bool {
if receipt_bytes.is_null() || image_id.is_null() {
if inner_receipt_bytes.is_null() || image_id.is_null() {
error!("Input buffer null");
return false;
}

if receipt_len == 0 || image_id_len == 0 {
if inner_receipt_len == 0 || image_id_len == 0 {
error!("Input buffer length zero size");
return false;
}
Expand Down

0 comments on commit 2e8c160

Please sign in to comment.