Slice-Length Operation causes `not implemented` error in mles_product_sum
When attempting to run a Jolt guest to prove properties of image files (e.g., file-type checks or simple byte-pattern checks), I encountered errors during the proving phase. Several different guest operations were tested, but the Jolt prover consistently panicked with multiple occurrences of:
`thread '<unnamed>' panicked at jolt-core/src/subprotocols/mles_product_sum.rs:186:14:
not implemented`
Just a slice length check also causes this error.
### Minimal Guest Example
```rust
#![cfg_attr(feature = "guest", no_std)]
#[jolt::provable(memory_size = 10240, max_trace_length = 65536, max_input_size = 10000, max_output_size = 10000)]
fn check_jpeg(file_bytes: &[u8]) -> bool {
file_bytes.len() > 0
}
```
### Minimal Host
```rust
use std::fs;
pub fn main() {
let target_dir = "/tmp/jolt-guest-targets";
let mut program = guest::compile_check_jpeg(target_dir);
let prover_preprocessing = guest::preprocess_prover_check_jpeg(&mut program);
let verifier_preprocessing = guest::verifier_preprocessing_from_prover_check_jpeg(&prover_preprocessing);
let prove_check_jpeg = guest::build_prover_check_jpeg(program, prover_preprocessing);
let verify_check_jpeg = guest::build_verifier_check_jpeg(verifier_preprocessing);
let file_path = "example_flower.jpg";
let bytes = fs::read(file_path).expect("failed to read file");
let (output, proof, io_device) = prove_check_jpeg(&bytes);
let is_valid = verify_check_jpeg(&bytes, output, io_device.panic, proof);
println!("output: {output}");
println!("valid: {is_valid}");
}
```
Some cases also included the following:
`thread 'main' panicked at jolt-core/src/poly/opening_proof.rs:904:51:
called 'Option::unwrap()' on a 'None' value`
Jolt commit: `88821842c`
Hardware: M4 Mac Pro
0 条评论