Errors
Four error types matter to a caller. ExecutionError comes from the engine during execution and reaches a caller wrapped in LeeError::InvalidProgramBehavior (except EmptyValidityWindowIntersection, which becomes LeeError::OutOfValidityWindow). InvalidTransaction comes from the checks before execution and reaches a caller as LeeError::InvalidInput carrying its message. ClassifyError comes from fee classification, before execution; a client sees its message, not its name. LeeError is everything else: proving, validation, serialization, settlement.
Sources: lee/state_machine/core/src/execution_state.rs, lee/state_machine/src/transaction_message.rs, lez/chain_state/src/classify.rs and lee/state_machine/src/error.rs.
Common errors
| Error | What happened |
|---|---|
ProgramExecutionFailed("Guest panicked: <msg>") | your handler’s assertion failed, and <msg> is yours. Write assertions that name the check |
UndeclaredActor | a SyncMessage to an actor the transaction did not declare and so cannot run |
UnheldGrant | a SyncMessage attaches a grant its sender does not hold |
UnsignedAuthority (InvalidTransaction, as is the next, from lee/state_machine/src/transaction_message.rs) | an actor marked Signer whose account did not sign |
DuplicateActor | the same actor declared twice |
UnmarkedPrivateSigner | a declared private signer that no authorized witness marks |
TransitionInputMismatch | a handler’s proof was made for a different input |
BoundaryMismatch, CrossMessageMismatch | the public side did not do what the proof assumed |
LoaderOutsidePublicExecution | a message to the program loader inside a private transaction |
UnboundAsyncDestination | an AsyncMessage from a public actor to an address with no recovery binding on chain and none introduced by the same transaction, so it cannot be stored; this includes any undeclared public account. Raised at settlement, so it is a LeeError, not an ExecutionError |
UnadmittedPublicActor | a public actor the transaction touched without admitting it: a message to a public account that does not exist and came with no evidence |
MissingFeeDeclaration (ClassifyError, as are the next four) | a user public transaction whose lee::public_transaction::Message was built with the fee-exempt Message::try_new instead of Message::try_new_with_fees |
MissingPrivateFee | a privacy-preserving transaction with no fee reserve crossing to the fee inbox |
TooManyPrivateActions | more than eight private actions in one transaction |
InvalidFeeFallback | the fallback a proof names does not pay exactly the reserve priced for it |
InvalidRefundTarget | a refund aimed at a restricted account: the clock, the fee state, escrow or inbox account, or the bridge |
OutOfGas | the transaction exceeded its declared gas_limit |
OutOfValidityWindow | the block or timestamp fell outside the window the handler set, or two handlers’ windows do not overlap (EmptyValidityWindowIntersection, which a caller sees as this) |
UnknownProgram | a message in public execution to a program the sequencer cannot load, such as a shadow program’s public effect. Named at the transaction root it is refused uncharged; reached later it is chargeable, so it reverts and pays wherever the transaction can revert (Where an error surfaces) |
MaxAccountNonceReached | an account’s nonce is exhausted |
InvalidPrivacyPreservingProof | a disclosed program image no longer matches the program deployed at that account id (it was upgraded after proving), or the proof did not verify against the journal the sequencer rebuilt: a proof for other inputs, a journal altered after proving, a receipt that is not succinct, or a dev-mode receipt at a sequencer not running in dev mode |
Engine errors in full
| Error | Meaning |
|---|---|
PublicActorStateUnavailable | the engine was asked to run a public actor’s handler where no public state is supplied, as inside the proof (below) |
DuplicateWitness | two private witnesses derive the same account |
FamilyBindingConflict | two different accounts resolve under the same program and PDA seed in one transaction |
PublicFamilyMemberDeclared | the transaction uses a private PDA and declares the public PDA of the same program and seed |
AliasCollision | a blinded address is also a declared account, or names two different accounts |
MissingSenderPresentation | no presentation (plain or blinded) was supplied for a private sender |
LoaderOutsidePublicExecution | the program loader reached in a private or mixed transaction |
UndeclaredActor | a delivery to an actor that is neither declared public nor private |
UnadmittedPublicActor | a delivery to a declared public account that was not admitted |
UnreachedPromotion | a promotion selects an async message the execution never sent |
TransitionInputMismatch | a handler echoed an input it was not given |
EmptyValidityWindowIntersection | the handlers’ validity windows do not overlap |
PublicAndPrivate | an account is declared public and also has a private witness |
MissingPredictedCrossMessages, UnusedPredictedCrossMessages | the prover’s predicted messages from the public side are missing for a public segment, or supplied for one the execution never entered |
UndeclaredCrossMessageSender | a predicted message comes from an actor that is not declared public |
UnmarkedPrivateSigner | a declared private signer that no authorized witness marks |
UnheldGrant | a sync message attaches a grant its sender does not hold |
UnwitnessedFeePayer, FeePayerWithoutAuthorization | the fee payer is not a witnessed private account, or its witness lacks the authorization key |
BoundaryMismatch, CrossMessageMismatch, IncompleteBoundary | a boundary step, or the message at it, does not match the execution, or the execution did not consume the boundary exactly |
The predicted message and boundary errors (MissingPredictedCrossMessages, UnusedPredictedCrossMessages, UndeclaredCrossMessageSender, BoundaryMismatch, CrossMessageMismatch, IncompleteBoundary) mean the prover and the sequencer disagree about what crossed, usually because a client built the transaction by hand rather than through the wallet.
PublicActorStateUnavailable means an execution holding no public state, such as the prover’s, reached a public actor’s handler. A correctly built private transaction never does: the proof holds no public actor state and runs no public handler. A message to a public actor crosses the boundary, and what the public side sends back is predicted at proving time and checked by the sequencer at settlement against live state (A reply from public to private is fixed at proving time, The boundary).
LeeError in full
InvalidInput, OutOfGas, InvalidProgramBehavior, MessageSerializationError, InvalidPrivateKey, Io, BoundaryTooLong, InvalidPublicKey, InvalidHexPublicKey, ProgramWriteInputFailed, ProgramExecutionFailed, ProgramExitedWithCode, ProgramProveFailed, TransactionDeserializationError, Core, CircuitOutputDeserializationError, InvalidPrivacyPreservingProof, CircuitProvingError, InvalidProgramBytecode, ProgramAlreadyExists, MaxAccountNonceReached, OutOfValidityWindow, UnknownProgram, UnboundAsyncDestination.
Tooling errors
Program bytecode splits into N segment(s) but M were supplied (SegmentChainError::CountMismatch, in lee/program_loader) from a deploy whose --segments count does not match the chunk count. The wallet checks it before sending anything and reports the number expected. Deploying has the rest of the deploy rules.
Where an error surfaces
It depends on where the handler ran. For a public transaction it runs on the sequencer, so a panic appears in the sequencer’s output as the guest printed it:
thread 'main' (1) panicked at …/hello_world_with_authorization.rs:15:5:
Missing required authorization
The transaction is still included and pays its fee. So does one whose effects would change a guarded system account (the clock, a fee account, bridge state or the system registry, outside the system transactions that own them): it reverts rather than being refused.
For a private transaction the handler runs on your machine, so a panic comes back as a local prover error before anything is submitted. This example does not show it privately: run with run_hello_world_private on a private account the wallet owns, hello_world_with_authorization succeeds, because the owner’s witness authorizes the account. That is the faster loop, and why developing against a private account with RISC0_DEV_MODE=1 is often quicker than against a public one.
A private transaction refused before or at proof verification is not included: nothing changed, nothing was charged, and it can be resubmitted. One whose proof verifies but whose public part then fails in a chargeable way is included as a revert and pays, through its proven fee fallback or its declared fee; with neither it is refused. Two failures after verification are still refused: a public root naming a program the sequencer cannot load, and effects that would change a guarded system account in a transaction that pays inside its proof.