Usage
Arguments
The name of the program to synthesize, e.g.,
helloworld.aleoOptions
Use the local Leo project. Builds the project before synthesizing.
Skip functions that contain any of the given substrings. Can be specified multiple times.
Directory path to save the generated keys. Keys are not saved if not specified.
Network to use (mainnet, testnet, canary)
API endpoint URL for querying network data
Private key for the account (can also use PRIVATE_KEY environment variable)
Examples
Synthesize local program
Synthesize with key saving
Skip specific functions
Synthesize from network
Output Information
For each function, the command displays:Key Files
When--save is specified, three files are generated per function:
-
Prover Key - Used to generate proofs
- Filename:
{network}.{program}.{function}.{edition}.prover.{timestamp} - Large file (MB to GB range)
- Filename:
-
Verifier Key - Used to verify proofs
- Filename:
{network}.{program}.{function}.{edition}.verifier.{timestamp} - Small file (KB range)
- Filename:
-
Metadata - Contains checksums and sizes
- Filename:
{network}.{program}.{function}.{edition}.metadata.{timestamp} - JSON format
- Filename:
Metadata Format
Use Cases
Pre-generate Keys for Production
Generate keys once and reuse them:Key Distribution
Distribute verifier keys to validators:Performance Testing
Measure circuit complexity:Performance Considerations
Circuit Metrics
The output provides important metrics for understanding program complexity:- Public Inputs - Number of public values the function accepts
- Variables - Total circuit variables (indicates memory usage)
- Constraints - Number of R1CS constraints (indicates proof size/time)
- Non-Zero Entries - Sparsity of constraint matrices
Related Commands
- Build - Compile programs before synthesis
- Deploy - Deploy programs to network
- Execute - Execute programs with proofs