Closed naps62 closed 1 year ago
We appreciate your feedback. Please
output
directory,wasm_input
method, remove --public 5:i64
argument,-k 19
For example,
./target/release/cli -k 19 --function add --output ./output --wasm rlp_bg.wasm setup
./target/release/cli -k 19 --function add --output ./output --wasm rlp_bg.wasm single-prove
./target/release/cli -k 19 --function add --output ./output --wasm rlp_bg.wasm single-verify --proof output/zkwasm.0.transcript.data
@junyu0312 seems to work now. thank you!
One follow-up question though: I couldn't find any documentation or example on how to access the output of the execution. Is there such an example?
@junyu0312 I'm not sure if I incorrectly tested 2 weeks ago, or if there's some regression, but this is now failing again.
I tried with a few different commits of zkwasm.
also commented the assert_eq!
part of the program. it still crashes. the problem seems to be on the rlp::decode
call
I extracted the code into a separate repo for debugging: github.com/naps62/zkwasm-hello-world
The error I get:
zkwasm-cli-x86 -k 19 --function rlp --output ./output --wasm pkg/zkwasm_rlp_bg.wasm single-prove
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `Err([ConstraintNotSatisfied { constraint: Constraint { gate: Gate { index: 105, name: "compare op res" }, index: 3,
name: "" }, location: InRegion { region: Region { index: 13, name: "jtable mtable etable" }, offset: 14680 }, cell_values:
[(VirtualCell { name: "", column: Column { column_type: Advice, index: 7 }, rotation: 1 }, "0"), (VirtualCell { name: "", co
lumn: Column { column_type: Advice, index: 7 }, rotation: 2 }, "1"), (VirtualCell { name: "", column: Column { column_type:
Advice, index: 7 }, rotation: 3 }, "0"), (VirtualCell { name: "", column: Column { column_type: Advice, index: 7 }, rotation
: 4 }, "1"), (VirtualCell { name: "", column: Column { column_type: Advice, index: 7 }, rotation: 5 }, "1"), (VirtualCell {
name: "", column: Column { column_type: Advice, index: 7 }, rotation: 10 }, "1"), (VirtualCell { name: "", column: Column {
column_type: Advice, index: 9 }, rotation: 1 }, "1"), (VirtualCell { name: "", column: Column { column_type: Advice, index:
9 }, rotation: 14 }, "1"), (VirtualCell { name: "", column: Column { column_type: Advice, index: 12 }, rotation: 1 }, "1"),
(VirtualCell { name: "", column: Column { column_type: Fixed, index: 22 }, rotation: 0 }, "1")] }])`,
right: `Ok(())`', src/cli/exec.rs:173:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Thank you very much to report this issue. It is related to a bug on negative numbers' comparison. The PR #100 is waiting for @junyu0312 review. You can try zkWasm on commit d375af87fced482c0f99c08ca14b7434a2ce0a09 before merge.
Tried to run the following code:
calling
just run
yieled the following: