Atlantic Steps
Trace Generation
Trace generation is a process of running Cairo program on given inputs and generating pie.zip
file. Pie represents exact execution of Cairo program and is necessary for proof generation.
How to use?
To generate trace you need two things:
-
programFile
- compiled Cairo program in JSON format for cairo0 or SIERRA file for cairo1. -
(optional)
inputFile
- depending on Cairo and VM version:- Cairo1 - text file containing input array: e.g.
[1 [2 3 4]]
as described in Rust VM documentation. Keep in mind that your cairo main function should have signaturefn main(input: Array<felt252>) -> Array<felt252>
. - Cairo0, Python VM - JSON file representing the (private) input of the program (as in
cairo-run
of cairo-lang) - Cairo0, Rust VM - no support
- Cairo1 - text file containing input array: e.g.
When submitting a Cairo0 program, you can choose between Rust VM and Python VM. Rust VM is much faster and should be used if possible. However, for now custom hints including inputs are not supported for Rust VM. If your program requires custom hints, you need to use Python VM.
Cairo1 on the other hand only works with Rust VM, but fortunately it supports inputs.