You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to port some code that applies a simple filter to an image in Jolt from Succinct SP1 to Jolt. I had to raise the memory limits, and also encountered some OOM issues if the input images were too large. Now, when I run the code on images of size 40x40 with 1 input channel (i.e. 3.2kB of input to the ZKVM), my prover executions always fail with something that looks like this:
GUEST PANIC
Trace length: 245557
program_io.outputs.len(): 0
program_io.memory_layout: MemoryLayout { ram_witness_offset: 4194304, max_input_size: 4000000, max_output_size: 4096, input_start: 2143289408, input_end: 2147289408, output_start: 2147289409, output_end: 2147293505, panic: 2147293506, termination: 2147293507 }
thread 'main' panicked at guest/src/lib.rs:8:1:
called `Result::unwrap()` on an `Err` value: DeserializeUnexpectedEnd
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Line 8 of lib.rs in my code is the line that is #[jolt::provable()]. This DeserializeUnexpectedEnd error comes from the postcard library, which is only used in a couple places in the Jolt codebase. I did a bit of experimentation, and this does not seem to be related to input parameter types (e.g. I made the method signature of my provable function the same as the sha2_ex/sha3_ex examples even though my function initially had multiple parameters). Here is the serialized function (it is too big to upload directly in a github issue).
Here is the code I'm running to call the function:
let input_file = "./resources/resized_img_channels/chebu_resized_R.txt";
let target_file = "./resources/resized_img_channels/chebu_resized_R.txt";
let mut image: Vec<u8> = lib::load_image_from_file(input_file);
let target_image: Vec<u8> = lib::load_image_from_file(target_file);
image.extend(target_image);
// Image is ~3.2kB here
let (prove_frame_resize, verify_frame_resize) = guest::build_frame_resize();
println!("Build provers!");
let (output, proof) = prove_frame_resize(&image);
println!("Ran proof?");
let is_valid = verify_frame_resize(proof);
println!("output: {}", output);
println!("valid: {}", is_valid);
I think there may be a bug that occurs when the input being passed into the prove function is too large, but there may be some other issue. Let me know if there is any other required information needed to understand the issue. Thanks in advance!
The text was updated successfully, but these errors were encountered:
I have been trying to port some code that applies a simple filter to an image in Jolt from Succinct SP1 to Jolt. I had to raise the memory limits, and also encountered some OOM issues if the input images were too large. Now, when I run the code on images of size 40x40 with 1 input channel (i.e. 3.2kB of input to the ZKVM), my prover executions always fail with something that looks like this:
Line 8 of lib.rs in my code is the line that is #[jolt::provable()]. This DeserializeUnexpectedEnd error comes from the postcard library, which is only used in a couple places in the Jolt codebase. I did a bit of experimentation, and this does not seem to be related to input parameter types (e.g. I made the method signature of my provable function the same as the sha2_ex/sha3_ex examples even though my function initially had multiple parameters). Here is the serialized function (it is too big to upload directly in a github issue).
Here is the code I'm running to call the function:
I think there may be a bug that occurs when the input being passed into the prove function is too large, but there may be some other issue. Let me know if there is any other required information needed to understand the issue. Thanks in advance!
The text was updated successfully, but these errors were encountered: