#[jolt::provable]
fn cast(n: u32) -> f64 {
n as f64
}
This produces an invalid proof:
pub fn main() {
let (prove, verify) = guest::build_cast();
let (result, proof) = prove(15);
println!("Result: {:?}", result);
println!("valid: {}", verify(proof));
This prints the correct result, but verification fails. In other words, the program compiles and is executed correctly, a proof is generated, but the proof is invalid.
Note: I get the same result for n.into(). The problem does not appear for casting u32 to u64, but I didn't try other combinations.
I execute the following program:
This produces an invalid proof:
This prints the correct result, but verification fails. In other words, the program compiles and is executed correctly, a proof is generated, but the proof is invalid.
Note: I get the same result for
n.into()
. The problem does not appear for casting u32 to u64, but I didn't try other combinations.