Aztec Sandbox Errors
Disclaimer
We are building Aztec as transparently as we can. The documents published here are living documents. The protocol, sandbox, language, and tools are all subject to change over time.
Please see here for details of known Aztec protocol and Aztec Sandbox limitations.
If you would like to help us build Aztec:
This section contains a list of errors you may encounter when using Aztec Sandbox and an explanation of each of them.
Circuit Errors
To prevent bloating this doc, here is a list of some of the common errors.
Kernel Circuits
We have several versions of public and private kernels as explained in the circuits section in the concepts. Certain things are only possible in certain versions of the circuits. So always ensure that the right version is being used for proof generation. For example, there is a specific version of the public kernel that only works if the previous kernel iteration was a private kernel. Similarly there is one that only works if the previous kernel was public.
Remember that for each function call (i.e. each item in the call stack), there is a new kernel iteration that gets run.
2002 - PRIVATE_KERNEL__INVALID_CONTRACT_ADDRESS
Cannot call contract at address(0x0) privately. This error may also happen when you deploy a new contract and the contract data hash is inconsistent to the expected contract address.
2005 - PRIVATE_KERNEL__NEW_NOTE_HASHES_PROHIBITED_IN_STATIC_CALL
For static calls, new note hashes aren't allowed
2006 - PRIVATE_KERNEL__NEW_NULLIFIERS_PROHIBITED_IN_STATIC_CALL
For static calls, new nullifiers aren't allowed
2009 - PRIVATE_KERNEL__NON_PRIVATE_FUNCTION_EXECUTED_WITH_PRIVATE_KERNEL
You cannot execute a public Aztec.nr function in the private kernel
2011 - PRIVATE_KERNEL__UNSUPPORTED_OP
You are trying to do something that is currently unsupported in the private kernel. If this is a blocker feel free to open up an issue on our monorepo aztec-packages (GitHub link) or reach out to us on discord
Note that certain operations are unsupported on certain versions of the private kernel. Eg static calls are allowed for all but the initial iteration of the private kernel (which initializes the kernel for subsequent function calls).
2012 - PRIVATE_KERNEL__CONTRACT_ADDRESS_MISMATCH
For the initial iteration of the private kernel, only the expected Aztec.nr contract should be the entrypoint. Static and delegate calls are not allowed in the initial iteration.
2013 - PRIVATE_KERNEL__NON_PRIVATE_KERNEL_VERIFIED_WITH_PRIVATE_KERNEL
The previous kernel iteration within the private kernel must also be private
2014 - PRIVATE_KERNEL__CONSTRUCTOR_EXECUTED_IN_RECURSION
A constructor must be executed as the first tx in the recursion i.e. a constructor call must be the first item in the call stack i.e. it can be executed in the first kernel iteration but not in subsequent ones. This also means you can't have a contract deploy another contract yet on Aztec.
2017 - PRIVATE_KERNEL__USER_INTENT_MISMATCH_BETWEEN_TX_REQUEST_AND_CALL_STACK_ITEM
Confirms that the TxRequest (user's intent) matches the private call being executed. This error may happen when:
- origin address of tx_request doesn't match call_stack_item's contract_address
- tx_request.function_data doesn't match call_stack_item.function_data
- Aztec.nr function args passed to tx_request doesn't match args in the call_stack_item
2018 - PRIVATE_KERNEL__READ_REQUEST_NOTE_HASH_TREE_ROOT_MISMATCH
Given a read request and provided witness, we check that the merkle root obtained from the witness' sibling path and it's leaf is similar to the historical state root we want to read against. This is a sanity check to ensure we are reading from the right state. For a non transient read, we fetch the merkle root from the membership witnesses and the leaf index
2019 - PRIVATE_KERNEL__TRANSIENT_READ_REQUEST_NO_MATCH
A pending note hash is the one that is not yet added to note hash tree. A transient read is when we try to "read" a pending note hash. This error happens when you try to read a pending note hash that doesn't exist.
2021 - PRIVATE_KERNEL__UNRESOLVED_NON_TRANSIENT_READ_REQUEST
For a transient read request we skip merkle membership checks since pending note hashes aren't inserted into the note hash tree yet. But for non transient reads, we do a merkle membership check. Reads are done at the kernel circuit. So this checks that there are no already unresolved reads from a previous kernel iteration (other than non transient ones).
3001 - PUBLIC_KERNEL__UNSUPPORTED_OP
You are trying to do something that is currently unsupported in the public kernel. If this is a blocker feel free to open up an issue on our monorepo aztec-packages (GitHub link) or reach out to us on discord
3002 - PUBLIC_KERNEL__PRIVATE_FUNCTION_NOT_ALLOWED
Calling a private Aztec.nr function in a public kernel is not allowed.
3005 - PUBLIC_KERNEL__NON_EMPTY_PRIVATE_CALL_STACK
Public functions are executed after all the private functions are (see private-public execution). As such, private call stack must be empty when executing in the public kernel.
3011 - PUBLIC_KERNEL__CALCULATED_PRIVATE_CALL_HASH_AND_PROVIDED_PRIVATE_CALL_HASH_MISMATCH
When the hash stored at the top most of the call stack is different to the call stack item expected by the public kernel's inputs.
3012 - PUBLIC_KERNEL__PUBLIC_CALL_STACK_MISMATCH
Similar to above, except here we actually have the preimages to the call stack and hash to ensure they match.
3013 - PUBLIC_KERNEL__CONTRACT_DEPLOYMENT_NOT_ALLOWED
Public kernel doesn't allow contract deployments
3014 - PUBLIC_KERNEL__CONSTRUCTOR_NOT_ALLOWED
Aztec doesn't support public constructors.
3015 - PUBLIC_KERNEL__CONTRACT_ADDRESS_INVALID
Calling address(0x0)
publicly is not permitted.
3016 - PUBLIC_KERNEL__FUNCTION_SIGNATURE_INVALID
Cannot call a contract with no function (i.e. function signature of 0) publicly.
3022 - PUBLIC_KERNEL__PUBLIC_CALL_STACK_CONTRACT_STORAGE_UPDATES_PROHIBITED_FOR_STATIC_CALL
For static calls, no contract storage change requests are allowed.
3024 - PUBLIC_KERNEL__CALL_CONTEXT_CONTRACT_STORAGE_UPDATE_REQUESTS_PROHIBITED_FOR_STATIC_CALL
Same as 3022, no contract changes are allowed for static calls.
3026 - PUBLIC_KERNEL__NOTE_HASHES_PROHIBITED_IN_STATIC_CALL
For static calls, no new note hashes or nullifiers can be added to the state.
3027 - PUBLIC_KERNEL__NEW_NULLIFIERS_PROHIBITED_IN_STATIC_CALL
For static calls, no new note hashes or nullifiers can be added to the state.
Rollup circuit errors
These are errors that occur when kernel proofs (transaction proofs) are sent to the rollup circuits to create an L2 block. See rollup circuits for more information.