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
In stwo_cairo_prover/crates/prover/src/input/vm_import/mod.rs
let memory_path = private_input_json
.parent().unwrap().join(&private_input.memory_path);let trace_path = private_input_json
.parent().unwrap().join(&private_input.trace_path);
Those read the path of the memory.bin and trace.bin from the private-input.json fields "trace_path" and `"memory_path". The way they do so is not robust and coherent with the way they are generated.
I generated those using cairo1-run and the values are:
And those values are $TRACE_OUTPUT_DIR/trace.bin and $TRACE_OUTPUT_DIR/memory.bin
But the code just append this to the private_input_path.parent(), which gives us outputs/spending_conditions/outputs/spending_conditions/trace/trace.bin, which fails.
That is not how stones works. If I run cpu_air_prover from the same folder, it will correctly retrieve the trace.bin file given the relative path.
We need coherence here.
Also the error I got wasn't descriptive enough:
➜ spending_conditions git:(main) ✗ adapted_stwo --pub_json outputs/spending_conditions/trace/public-input.json --priv_json outputs/spending_conditions/trace/private-input.json --proof_path ./proof.json
2025-01-09T09:04:47.484453Z INFO run: adapted_stwo: enter
2025-01-09T09:04:47.484572Z INFO run:adapt_vm_output: stwo_cairo_prover::input::vm_import: enter
2025-01-09T09:04:47.484955Z INFO run:adapt_vm_output: stwo_cairo_prover::input::vm_import: close time.busy=382µs time.idle=917ns
2025-01-09T09:04:47.484970Z INFO run: adapted_stwo: close time.busy=521µs time.idle=2.42µs
[INFO stwo_cairo_utils::binary_utils] run_and_prove failed: VM import failed: IO error: No such file or directory (os error 2)
➜ spending_conditions git:(main) ✗ adapted_stwo --pub_json outputs/spending_conditions/trace/public-input.json --priv_json outputs/spending_conditions/trace/private-input.json --proof_path ./proof.json
2025-01-09T09:05:07.503604Z INFO run: adapted_stwo: enter
2025-01-09T09:05:07.503751Z INFO run:adapt_vm_output: stwo_cairo_prover::input::vm_import: enter
2025-01-09T09:05:07.504163Z INFO run:adapt_vm_output: stwo_cairo_prover::input::vm_import: close time.busy=411µs time.idle=833ns
2025-01-09T09:05:07.504183Z INFO run: adapted_stwo: close time.busy=585µs time.idle=3.71µs
[INFO stwo_cairo_utils::binary_utils] run_and_prove failed: VM import failed: IO error: No such file or directory (os error 2)
In
stwo_cairo_prover/crates/prover/src/input/vm_import/mod.rs
Those read the path of the
memory.bin
andtrace.bin
from theprivate-input.json
fields"trace_path"
and `"memory_path". The way they do so is not robust and coherent with the way they are generated.I generated those using cairo1-run and the values are:
This is a path relative to the folder I was into when I ran cairo1-run. I ran
And those values are
$TRACE_OUTPUT_DIR/trace.bin
and$TRACE_OUTPUT_DIR/memory.bin
But the code just append this to the private_input_path.parent(), which gives us
outputs/spending_conditions/outputs/spending_conditions/trace/trace.bin
, which fails.That is not how stones works. If I run
cpu_air_prover
from the same folder, it will correctly retrieve the trace.bin file given the relative path.We need coherence here.
Also the error I got wasn't descriptive enough:
Your error message is defined there:
And it gives me no context on what I am doing wrong.
I'm expecting something along the lines of:
With this, I know what you tried to do, why it failed, and how I can try fixing it
The text was updated successfully, but these errors were encountered: