Regular off-chain computing refers to offloading on-chain computation tasks to off-chain when they are expensive. However, the chain needs to be able to verify that the computation is legit. Our trusted Off-chain Workers (TOCW) are doing more than that and should not be confused with parity substrate’s off-chain workers. Our TOCW execute a custom operation in a TEE, and the chain can be assured that this operation has been executed correctly. This enables many more operations to be off-loaded off-chain, not only those that can be verified on-chain.
- ) Operations that should be executed confidentiality
- ) Any operation that is too computationally complex and does not need to be executed within one block.
- ) Operations that need to interact with other ecosystems, e.g., bridges to other blockchains or the Web2 (like oracles). See the chapter on the oracle framework below as an example.
We will go a bit more into detail here for case 1.). Those state transitions are triggered through on-chain extrinsics with encrypted payloads (indirect invocation).
\
Indirect Invocation
With indirect invocation, a requester calls a confidential dispatchable function (state transition) by signing a trusted call and encrypting it with the worker enclave’s shielding key. She then wraps the ciphertext into an extrinsic which she sends to the chain. The worker forwards all new blocks to the light client within the worker enclave where the ciphertext gets decrypted and the trusted call is executed in an encrypted state.
When using indirect invocation, all trusted calls need to pass through the chain to gain consensus on the ordering of transactions.