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.
/v1/trace-generation
This endpoint submits query for trace generation only.
How to use?
This endpoint has two ways how you can use it:
- Using
programFile
If you are going to generate trace for the given program only a few times, or you are experimenting with different programs, you can upload compiled Cairo program file directly in the request with programFile
parameter.
- Using
programHash
If you are going to generate trace for the same program multiple times, it is better if you first submit the program to program registry. Then you can use its unique program hash to avoid reuploading. This way you can save bandwidth and time.
Moreover, in both cases you can specify inputFile
parameter which is private input data for the Cairo program.
Sending Request
Note: Remember not to use programHash
and programFile
at the same time.
- Query Parameters
apiKey
(string, required)
- Request Body
- For Option 1 (
programFile
)programFile
(file -.json
, required) - A compiled Cairo program in JSON format.
- For Option 2 (
programHash
)programHash
(string, required) - A unique hash representing Cairo program, which has been previously registered in program registry.
- In addition for both options
inputFile
(file -.json
, optional) - Input data for Cairo program if used.cairoVersion
(string, required, default:0
) - For now only version0
is supported
- For Option 1 (
Responses
- Success (201 created)
- Content-Type:application/json
- Response Body
- You can use this
atlanticQueryId
to check status of that request.
- Error Responses
- 400 Bad Request - Indicates that parameters are invalid such as providing
programFile
withprogramHash
at the same request. - 500 Internal Server Error - This says error is on our side.
- 400 Bad Request - Indicates that parameters are invalid such as providing
Example Requests
-
using
programFile
-
using
programHash