[−][src]Crate solana_libra_vm_runtime
The VM runtime
Transaction flow
This is the path taken to process a single transaction.
SignedTransaction
+
|
+--------------------------|-------------------+
| Validate +--------------+--------------+ |
| | | |
| | check signature | |
| | | |
| +--------------+--------------+ |
| | |
| | |
| v |
| +--------------+--------------+ |
| | | |
| | check size and gas | |
| | | +---------------------------------+
| +--------------+--------------+ | validation error |
| | | |
| | | |
| v | |
| +--------------+--------------+ | |
| | | | |
| | run prologue | | |
| | | | |
| +--------------+--------------+ | |
| | | |
+--------------------------|-------------------+ |
| |
+--------------------------|-------------------+ |
| v | |
| Verify +--------------+--------------+ | |
| | | | |
| | deserialize script, | | |
| | verify arguments | | |
| | | | |
| +--------------+--------------+ | |
| | | |
| | | v
| v | +----------------+------+
| +--------------+--------------+ | | |
| | | +------------------->+ discard, no write set |
| | deserialize modules | | verification error | |
| | | | +----------------+------+
| +--------------+--------------+ | ^
| | | |
| | | |
| v | |
| +--------------+--------------+ | |
| | | | |
| | verify scripts and modules | | |
| | | | |
| +--------------+--------------+ | |
| | | |
+--------------------------|-------------------+ |
| |
+--------------------------|-------------------+ |
| v | |
| Execute +--------------+--------------+ | |
| | | | |
| | execute main | | |
| | | | |
| +--------------+--------------+ | |
| | | |
| success or failure | | |
| v | |
| +--------------+--------------+ | |
| | | +---------------------------------+
| | run epilogue | | invariant violation (internal panic)
| | | |
| +--------------+--------------+ |
| | |
| | |
| v |
| +--------------+--------------+ | +-----------------------+
| | | | execution failure | |
| | make write set +------------------------>+ keep, only charge gas |
| | | | | |
| +--------------+--------------+ | +-----------------------+
| | |
+--------------------------|-------------------+
|
v
+--------------+--------------+
| |
| keep, transaction executed |
| + gas charged |
| |
+-----------------------------+
Re-exports
pub use txn_executor::execute_function; |
Modules
code_cache | Caches for code data stored on chain. |
data_cache | Scratchpad for on chain values during the execution. |
identifier | A bunch of helper functions to fetch the storage key for move resources and values. |
loaded_data | Loaded definition of code data used in runtime. |
txn_executor | Processor for a single transaction. |
value |
Structs
MoveVM | A wrapper to make VMRuntime standalone and thread safe. |
Traits
VMExecutor | This trait describes the VM's execution interface. |
VMVerifier | This trait describes the VM's verification interfaces. |
Functions
static_verify_program | Run static checks on a program directly. Provided as an alternative API for tests. |