Module runtime_call

Module runtime_call 

Source
Expand description

Wasm virtual machine, with automatic storage overlay.

The code in this module builds upon the functionalities of the host module and implements some of the host function calls. In other words, it is an easier-to-use version of the host module.

Most of the documentation of the host module also applies here.

In addition to the functionalities provided by the host module, the runtime_call module:

  • Keeps track of the changes to the storage and off-chain storage made by the execution, and provides them at the end. Any storage access takes into account the intermediary list of changes.
  • Automatically handles some externalities, such as calculating the Merkle root or storage transactions.

These additional features considerably reduces the number of externals concepts to plug to the virtual machine.

Re-exports§

pub use host::Error as ErrorDetail;
pub use host::LogEmitInfo;
pub use host::LogEmitInfoHex;
pub use host::LogEmitInfoStr;
pub use host::StorageProofSizeBehavior;
pub use trie::Nibble;
pub use trie::TrieEntryVersion;

Structs§

ClosestDescendantMerkleValue
Obtaining the Merkle value of the closest descendant of a trie node is required in order to continue.
Config
Configuration for run.
Error
Error that can happen during the execution.
LogEmit
Report about a log entry being emitted.
NextKey
Fetching the key that follows a given one is required in order to continue.
OffchainRandomSeed
Providing a random number is required in order to continue.
OffchainStorageCompareSet
Setting the value of an offchain storage value is required.
OffchainStorageGet
Loading an offchain storage value is required in order to continue.
OffchainStorageSet
Setting the value of an offchain storage value is required.
OffchainSubmitTransaction
The runtime requests submitting a transaction.
OffchainTimestamp
Providing the current UNIX timestamp is required in order to continue.
SignatureVerification
Verifying whether a signature is correct is required in order to continue.
StorageChanges
See Success::storage_changes.
StorageGet
Loading a storage value is required in order to continue.
Success
Execution is successful.
SuccessVirtualMachine
Function execution has succeeded. Contains the return value of the call.

Enums§

OffchainContext
RuntimeCall
Current state of the execution.
TrieChange
TrieChangeStorageValue

Functions§

run
Start running the WebAssembly virtual machine.