Commissioning a Computation

Once a Computation has been defined — see the Defining a Computation section for more on this step — individual Computations may be commissioned for execution. First, the exact details for execution, including the arguments, when it should be executed, callbacks to be executed afterward, and payment bid details must be provided. The Computation Customer may additionally specify a time window during which the Computation's execution is valid, see the Computation Lifecycle section for more. Then the Computation is sent to the Arcium Network's on-chain mempool.

Mempool

Once a Computation is commissioned, it is placed into either the active or dependent on-chain mempool. Computations that should not wait for the execution of any other Computations are placed in the active mempool, while Computations that are contingent on other Computations await execution in the dependent mempool. For more on how Computations are handled in the Arcium mempool architecture.

Execution Bids

When commissioning a Computation the Computation Customer must explicitly define the priority fee that they are willing to pay for the Computation, see the Pricing section for more on how priority fees work to define competitive fee markets. In addition to priority fees, execution bids must also include delivery fees for both the inputs and outputs associated with the Computation, these are paid to Middlelayer Nodes as compensation for relaying off-chain data.

Arguments

The arguments passed to a Computation during commissioning naturally correspond identically to the parameters specified during the Computation definition step. As such, arguments are passed as either Data Objects (used for a wide variety of on-chain and off-chain sources) or Binary Data which is simply a string of raw binary data.

Callbacks

Callbacks enable bespoke actions to be taken following the execution of a Computation. Callbacks are defined during commissioning rather than in the definition itself since that way callback actions may be unique to that particular instantiation without affecting the underlying logic and circuit of the Computation definition. Callbacks are specified as either for the success or failure case, meaning that, depending on the outcome of the Computation's execution, different instructions can be taken.

Success Instructions

Callback instructions for the success case may be either static or dynamic. Static instructions enable pre-defined on-chain actions to be taken, while dynamic instructions come in three different types:

  • Data Object Creation Instruction: creates a new data object that can then be used elsewhere in the MXE (e.g. passed to other Computations), see the Data Provisioning section.

  • Custom Dynamic Instruction: executes complex bespoke on-chain actions (on another program) using the outputs from the successful Computation.

  • Off-Chain Callback Instruction: uses a specified list of Middlelayer nodes to execute an off-chain action, see the Middlelayer Nodes section for more.

Failure Instructions

Callback instructions for the failure case are always static since no output is generated. However, they can be either static on-chain or static off-chain — performing parameter-less Off-Chain Callback Instructions via Middlelayer nodes (see Success Instructions above).

Last updated