Lifecycle overview
The lifecycle of a computation in the Arcium Network follows a clear progression of steps. These steps ensure computations are securely defined, efficiently commissioned, and accurately executed. Here are the five key stages:- Definition: A computation is defined within the context of an MXE, providing a blueprint for its execution (see the Defining and commissioning computations section for details). This includes specifying inputs, outputs, logic, versioning, and access permissions.
- Commissioning: A defined computation is instantiated by specifying arguments, callback requirements, and fee parameters required for queueing.
- Mempool Placement: Commissioned computations are queued in the Cluster’s mempool, where they stay eligible until a Node picks them up or they expire after 180 slots. If a computation is still queued when it expires, the payer can reclaim its computation fee.
- Execution: Nodes execute the computation securely, ensuring privacy and accuracy.
- Post-Execution Callbacks: Following execution, actions defined for success or failure cases are carried out so downstream programs can update state or notify clients.
Post-execution callbacks
Once a computation is executed, the system triggers callbacks based on the outcome:- Success Callbacks: Handle actions for successfully executed computations. These may include:
- Dynamic Onchain Actions: Triggering onchain processes based on computation results.
- Static Onchain Actions: Fixed onchain processes to address success scenarios.
- Failure Callbacks: Manage actions when a computation fails. These are always static and include:
- Static Onchain Actions: Fixed onchain processes to address failure scenarios.