forked from aptos-labs/aptos-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
103 lines (103 loc) · 21.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The VM runtime"><meta name="keywords" content="rust, rustlang, rust-lang, diem_vm"><title>diem_vm - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings" ></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../diem_vm/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Crate diem_vm</h2><div class="block version"><div class="narrow-helper"></div><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all diem_vm's items</p></a><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#macros">Macros</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="diem_vm" data-ty="mod" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="#">diem_vm</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/diem_vm/lib.rs.html#4-169" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h1 id="the-vm-runtime" class="section-header"><a href="#the-vm-runtime">The VM runtime</a></h1><h2 id="transaction-flow" class="section-header"><a href="#transaction-flow">Transaction flow</a></h2>
<p>This is the path taken to process a single transaction.</p>
<div class="example-wrap"><pre class="language-text"><code> 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 |
| |
+-----------------------------+</code></pre></div></div></details><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
<div class="item-table"><div class="item-left import-item"><code>pub use crate::diem_vm::<a class="struct" href="diem_vm/struct.DiemVM.html" title="struct diem_vm::diem_vm::DiemVM">DiemVM</a>;</code></div><div class="item-right docblock-short"></div></div><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<div class="item-table"><div class="item-left module-item"><a class="mod" href="data_cache/index.html" title="diem_vm::data_cache mod">data_cache</a></div><div class="item-right docblock-short"><p>Scratchpad for on chain values during the execution.</p>
</div><div class="item-left module-item"><a class="mod" href="diem_vm/index.html" title="diem_vm::diem_vm mod">diem_vm</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="mod" href="logging/index.html" title="diem_vm::logging mod">logging</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="mod" href="natives/index.html" title="diem_vm::natives mod">natives</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="mod" href="parallel_executor/index.html" title="diem_vm::parallel_executor mod">parallel_executor</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="mod" href="read_write_set_analysis/index.html" title="diem_vm::read_write_set_analysis mod">read_write_set_analysis</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="mod" href="script_to_script_function/index.html" title="diem_vm::script_to_script_function mod">script_to_script_function</a></div><div class="item-right docblock-short"><p>Module containing remapping information between script hashes and their remapped script
function</p>
</div><div class="item-left module-item"><a class="mod" href="system_module_names/index.html" title="diem_vm::system_module_names mod">system_module_names</a></div><div class="item-right docblock-short"><p>Names of modules, functions, and types used by Diem System.</p>
</div><div class="item-left module-item"><a class="mod" href="transaction_metadata/index.html" title="diem_vm::transaction_metadata mod">transaction_metadata</a></div><div class="item-right docblock-short"></div></div><h2 id="macros" class="section-header"><a href="#macros">Macros</a></h2>
<div class="item-table"><div class="item-left module-item"><a class="macro" href="macro.ADD_CURRENCY_TO_ACCOUNT_BYTES.html" title="diem_vm::ADD_CURRENCY_TO_ACCOUNT_BYTES macro">ADD_CURRENCY_TO_ACCOUNT_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.ADD_RECOVERY_ROTATION_CAPABILITY_BYTES.html" title="diem_vm::ADD_RECOVERY_ROTATION_CAPABILITY_BYTES macro">ADD_RECOVERY_ROTATION_CAPABILITY_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.ADD_TO_SCRIPT_ALLOW_LIST_BYTES.html" title="diem_vm::ADD_TO_SCRIPT_ALLOW_LIST_BYTES macro">ADD_TO_SCRIPT_ALLOW_LIST_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.ADD_VALIDATOR_AND_RECONFIGURE_BYTES.html" title="diem_vm::ADD_VALIDATOR_AND_RECONFIGURE_BYTES macro">ADD_VALIDATOR_AND_RECONFIGURE_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.BURN_BYTES.html" title="diem_vm::BURN_BYTES macro">BURN_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.BURN_TXN_FEES_BYTES.html" title="diem_vm::BURN_TXN_FEES_BYTES macro">BURN_TXN_FEES_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.CANCEL_BURN_BYTES.html" title="diem_vm::CANCEL_BURN_BYTES macro">CANCEL_BURN_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.CREATE_CHILD_VASP_ACCOUNT_BYTES.html" title="diem_vm::CREATE_CHILD_VASP_ACCOUNT_BYTES macro">CREATE_CHILD_VASP_ACCOUNT_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.CREATE_DESIGNATED_DEALER_BYTES.html" title="diem_vm::CREATE_DESIGNATED_DEALER_BYTES macro">CREATE_DESIGNATED_DEALER_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.CREATE_PARENT_VASP_ACCOUNT_BYTES.html" title="diem_vm::CREATE_PARENT_VASP_ACCOUNT_BYTES macro">CREATE_PARENT_VASP_ACCOUNT_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.CREATE_RECOVERY_ADDRESS_BYTES.html" title="diem_vm::CREATE_RECOVERY_ADDRESS_BYTES macro">CREATE_RECOVERY_ADDRESS_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.CREATE_VALIDATOR_ACCOUNT_BYTES.html" title="diem_vm::CREATE_VALIDATOR_ACCOUNT_BYTES macro">CREATE_VALIDATOR_ACCOUNT_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.CREATE_VALIDATOR_OPERATOR_ACCOUNT_BYTES.html" title="diem_vm::CREATE_VALIDATOR_OPERATOR_ACCOUNT_BYTES macro">CREATE_VALIDATOR_OPERATOR_ACCOUNT_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.FREEZE_ACCOUNT_BYTES.html" title="diem_vm::FREEZE_ACCOUNT_BYTES macro">FREEZE_ACCOUNT_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.PEER_TO_PEER_WITH_METADATA_BYTES.html" title="diem_vm::PEER_TO_PEER_WITH_METADATA_BYTES macro">PEER_TO_PEER_WITH_METADATA_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.PREBURN_BYTES.html" title="diem_vm::PREBURN_BYTES macro">PREBURN_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.PUBLISH_SHARED_ED25519_PUBLIC_KEY_BYTES.html" title="diem_vm::PUBLISH_SHARED_ED25519_PUBLIC_KEY_BYTES macro">PUBLISH_SHARED_ED25519_PUBLIC_KEY_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.REGISTER_VALIDATOR_CONFIG_BYTES.html" title="diem_vm::REGISTER_VALIDATOR_CONFIG_BYTES macro">REGISTER_VALIDATOR_CONFIG_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.REMOVE_VALIDATOR_AND_RECONFIGURE_BYTES.html" title="diem_vm::REMOVE_VALIDATOR_AND_RECONFIGURE_BYTES macro">REMOVE_VALIDATOR_AND_RECONFIGURE_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.ROTATE_AUTHENTICATION_KEY_BYTES.html" title="diem_vm::ROTATE_AUTHENTICATION_KEY_BYTES macro">ROTATE_AUTHENTICATION_KEY_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.ROTATE_AUTHENTICATION_KEY_WITH_NONCE_ADMIN_BYTES.html" title="diem_vm::ROTATE_AUTHENTICATION_KEY_WITH_NONCE_ADMIN_BYTES macro">ROTATE_AUTHENTICATION_KEY_WITH_NONCE_ADMIN_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.ROTATE_AUTHENTICATION_KEY_WITH_NONCE_BYTES.html" title="diem_vm::ROTATE_AUTHENTICATION_KEY_WITH_NONCE_BYTES macro">ROTATE_AUTHENTICATION_KEY_WITH_NONCE_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.ROTATE_AUTHENTICATION_KEY_WITH_RECOVERY_ADDRESS_BYTES.html" title="diem_vm::ROTATE_AUTHENTICATION_KEY_WITH_RECOVERY_ADDRESS_BYTES macro">ROTATE_AUTHENTICATION_KEY_WITH_RECOVERY_ADDRESS_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.ROTATE_DUAL_ATTESTATION_INFO_BYTES.html" title="diem_vm::ROTATE_DUAL_ATTESTATION_INFO_BYTES macro">ROTATE_DUAL_ATTESTATION_INFO_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.ROTATE_SHARED_ED25519_PUBLIC_KEY_BYTES.html" title="diem_vm::ROTATE_SHARED_ED25519_PUBLIC_KEY_BYTES macro">ROTATE_SHARED_ED25519_PUBLIC_KEY_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.SET_VALIDATOR_CONFIG_AND_RECONFIGURE_BYTES.html" title="diem_vm::SET_VALIDATOR_CONFIG_AND_RECONFIGURE_BYTES macro">SET_VALIDATOR_CONFIG_AND_RECONFIGURE_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.SET_VALIDATOR_OPERATOR_BYTES.html" title="diem_vm::SET_VALIDATOR_OPERATOR_BYTES macro">SET_VALIDATOR_OPERATOR_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.SET_VALIDATOR_OPERATOR_WITH_NONCE_ADMIN_BYTES.html" title="diem_vm::SET_VALIDATOR_OPERATOR_WITH_NONCE_ADMIN_BYTES macro">SET_VALIDATOR_OPERATOR_WITH_NONCE_ADMIN_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.TIERED_MINT_BYTES.html" title="diem_vm::TIERED_MINT_BYTES macro">TIERED_MINT_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.UNFREEZE_ACCOUNT_BYTES.html" title="diem_vm::UNFREEZE_ACCOUNT_BYTES macro">UNFREEZE_ACCOUNT_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.UPDATE_DIEM_VERSION_BYTES.html" title="diem_vm::UPDATE_DIEM_VERSION_BYTES macro">UPDATE_DIEM_VERSION_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.UPDATE_DUAL_ATTESTATION_LIMIT_BYTES.html" title="diem_vm::UPDATE_DUAL_ATTESTATION_LIMIT_BYTES macro">UPDATE_DUAL_ATTESTATION_LIMIT_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.UPDATE_EXCHANGE_RATE_BYTES.html" title="diem_vm::UPDATE_EXCHANGE_RATE_BYTES macro">UPDATE_EXCHANGE_RATE_BYTES</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="macro" href="macro.UPDATE_MINTING_ABILITY_BYTES.html" title="diem_vm::UPDATE_MINTING_ABILITY_BYTES macro">UPDATE_MINTING_ABILITY_BYTES</a></div><div class="item-right docblock-short"></div></div><h2 id="traits" class="section-header"><a href="#traits">Traits</a></h2>
<div class="item-table"><div class="item-left module-item"><a class="trait" href="trait.VMExecutor.html" title="diem_vm::VMExecutor trait">VMExecutor</a></div><div class="item-right docblock-short"><p>This trait describes the VM’s execution interface.</p>
</div><div class="item-left module-item"><a class="trait" href="trait.VMValidator.html" title="diem_vm::VMValidator trait">VMValidator</a></div><div class="item-right docblock-short"><p>This trait describes the VM’s validation interfaces.</p>
</div></div><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<div class="item-table"><div class="item-left module-item"><a class="fn" href="fn.convert_changeset_and_events.html" title="diem_vm::convert_changeset_and_events fn">convert_changeset_and_events</a></div><div class="item-right docblock-short"></div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="diem_vm" data-search-index-js="../search-index.js" data-search-js="../search.js"></div>
<script src="../main.js"></script>
</body></html>