Expand description
WebAssembly runtime code execution.
WebAssembly (often abbreviated Wasm) plays a big role in Substrate/Polkadot. The storage of
each block in the chain has a special key named :code
which contains the WebAssembly code
of what we call the runtime.
The runtime is a program (in WebAssembly) that decides, amongst other things, whether transactions are valid and how to apply them on the storage, and whether blocks themselves are valid.
This module contains everything necessary to execute runtime code. The highest-level
sub-module is runtime_call
.
Re-exports§
pub use host::CoreVersion;
pub use host::CoreVersionError;
pub use host::CoreVersionRef;
Modules§
- Wasm virtual machine specific to the Substrate/Polkadot Runtime Environment.
- Wasm virtual machine, with automatic storage overlay.
- “Diff” between a trie and the next.
- Given as input a partial base trie and a diff, calculates the new root of the trie.
- General-purpose WebAssembly virtual machine.
Enums§
- Error potentially returned by
storage_heap_pages_to_value
.
Constants§
- Default number of heap pages if the storage doesn’t specify otherwise.
Functions§
- Converts a value of the key
:heappages
found in the storage to an actual number of heap pages.