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§
- host
- Wasm virtual machine specific to the Substrate/Polkadot Runtime Environment.
- runtime_
call - Wasm virtual machine, with automatic storage overlay.
- storage_
diff - “Diff” between a trie and the next.
- trie_
root_ calculator - Given as input a partial base trie and a diff, calculates the new root of the trie.
- vm
- General-purpose WebAssembly virtual machine.
Enums§
- Invalid
Heap Pages Error - Error potentially returned by
storage_heap_pages_to_value.
Constants§
- DEFAULT_
HEAP_ PAGES - Default number of heap pages if the storage doesn’t specify otherwise.
Functions§
- storage_
heap_ pages_ to_ value - Converts a value of the key
:heappagesfound in the storage to an actual number of heap pages.