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, execution windows, and other parameters required for execution.
- Mempool Placement: Commissioned computations are queued in the mempool.
- Execution: Nodes execute the computation securely, ensuring confidentiality 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.
Execution validity windows
Each computation can specify an optional execution window consisting of:- Valid After Timestamp: The earliest time a computation can be executed.
- Valid Before Timestamp: The latest time a computation can be executed.
- Valid After: Set to zero (no delay).
- Valid Before: Set to infinity (no expiry).
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.