Various book cleanup
* Merge Leader and Validator diagrams * New sdk-tools diagram * Move terminology to just after introduction * Purge use of LAMPORT as an acronym * Add notes about persistent storage
This commit is contained in:
parent
0e33773e92
commit
2c11bf2e66
|
@ -1,46 +1,21 @@
|
|||
.---------------------.
|
||||
| Leader |
|
||||
| |
|
||||
.--------. | .----------------. |
|
||||
| |---->| | |
|
||||
| Client | | | JsonRpcService | |
|
||||
| |<----| | |
|
||||
`----+---` | `----------------` |
|
||||
| | ^ |
|
||||
| | | |
|
||||
| | .--+---. |
|
||||
| | | Bank | |
|
||||
| | `------` |
|
||||
| | ^ |
|
||||
| | | | .------------.
|
||||
| | .--+--. .-----. | | |
|
||||
`-------->| Tpu +-->| Ncp +------>| Validators |
|
||||
| `-----` `-----` | | |
|
||||
| | `------------`
|
||||
`---------------------`
|
||||
.------------------------.
|
||||
| Fullnode |
|
||||
| |
|
||||
.--------. | .----------------. |
|
||||
| |---->| | |
|
||||
| Client | | | JsonRpcService | |
|
||||
| |<----| | |
|
||||
`----+---` | `----------------` |
|
||||
| | ^ |
|
||||
| | | |
|
||||
| | .--+---. .-----. |
|
||||
| | | Bank |<--| Tvu | |
|
||||
| | `------` `-----` |
|
||||
| | ^ ^ |
|
||||
| | | | | .------------.
|
||||
| | .--+--. .--+--. | | |
|
||||
`-------->| Tpu +-->| Ncp |<-------->| Validators |
|
||||
| `-----` `-----` | | |
|
||||
| | `------------`
|
||||
`------------------------`
|
||||
|
||||
.-------------------------------.
|
||||
| Validator |
|
||||
| |
|
||||
.--------. | .----------------. |
|
||||
| |-------------->| | |
|
||||
| Client | | | JsonRpcService | |
|
||||
| |<--------------| | |
|
||||
`--------` | `----------------` |
|
||||
| ^ |
|
||||
| | |
|
||||
| .--+---. |
|
||||
| | Bank | |
|
||||
| `------` |
|
||||
| ^ |
|
||||
.--------. | | | .------------.
|
||||
| | | .--+--. | | |
|
||||
| Leader |<------------->| Tvu +<--------------->| |
|
||||
| | | `-----` | | Validators |
|
||||
| | | ^ | | |
|
||||
| | | | | | |
|
||||
| | | .--+--. | | |
|
||||
| |<------------->| Ncp +<--------------->| |
|
||||
| | | `-----` | | |
|
||||
`--------` | | `------------`
|
||||
`-------------------------------`
|
||||
|
|
|
@ -1,24 +1,20 @@
|
|||
+---------------------+ +---------------------+
|
||||
| | | |
|
||||
| +------------+ | | +------------+ |
|
||||
| | | | | | | |
|
||||
| | frontend | | | | verifier | |
|
||||
| | | | | | | |
|
||||
| +-----+------+ | | +-----+------+ |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| +-----+------+ | | +-----+------+ |
|
||||
| | | | | | | |
|
||||
| | llvm | | | | loader | |
|
||||
| | | +------>+ | | |
|
||||
| +-----+------+ | | +-----+------+ |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| +-----+------+ | | +-----+------+ |
|
||||
| | | | | | | |
|
||||
| | ELF | | | | runtime | |
|
||||
| | | | | | | |
|
||||
| +------------+ | | +------------+ |
|
||||
| | | |
|
||||
| client | | solana |
|
||||
+---------------------+ +---------------------+
|
||||
|
||||
.----------------------------------------.
|
||||
| Solana Runtime |
|
||||
| |
|
||||
| .------------. .------------. |
|
||||
| | | | | |
|
||||
.-------->| Verifier +-->| Accounts | |
|
||||
| | | | | | |
|
||||
.----------. | | `------------` `------------` |
|
||||
| +--------` | ^ |
|
||||
| Client | | LoadAccounts | |
|
||||
| +--------. | .----------------` |
|
||||
`----------` | | | |
|
||||
| | .------+-----. .-------------. |
|
||||
| | | | | | |
|
||||
`-------->| Loader +-->| Interpreter | |
|
||||
| | | | | |
|
||||
| `------------` `-------------` |
|
||||
| |
|
||||
`----------------------------------------`
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
- [Introduction](introduction.md)
|
||||
|
||||
- [Terminology](terminology.md)
|
||||
|
||||
- [Synchronization](synchronization.md)
|
||||
- [Introduction to VDFs](vdf.md)
|
||||
- [Proof of History](poh.md)
|
||||
|
@ -22,7 +24,6 @@
|
|||
## Appendix
|
||||
|
||||
- [Appendix](appendix.md)
|
||||
- [Terminology](terminology.md)
|
||||
- [JSON RPC API](jsonrpc-api.md)
|
||||
- [solana-wallet CLI](wallet.md)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<svg class="bob" font-family="arial" font-size="14" height="736" width="520" xmlns="http://www.w3.org/2000/svg">
|
||||
<svg class="bob" font-family="arial" font-size="14" height="336" width="456" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<marker id="triangle" markerHeight="8" markerWidth="8" orient="auto" refX="4" refY="2" viewBox="0 0 8 4">
|
||||
<polygon fill="black" points="0,0 0,4 8,2 0,0"/>
|
||||
|
@ -56,7 +56,7 @@
|
|||
}
|
||||
|
||||
</style>
|
||||
<rect fill="white" height="736" width="520" x="0" y="0"/>
|
||||
<rect fill="white" height="336" width="456" x="0" y="0"/>
|
||||
<g>
|
||||
<line x1="12" x2="12" y1="60" y2="116"/>
|
||||
<path d="M 12 116 A 4 4 0 0 0 16 120" fill="none"/>
|
||||
|
@ -74,32 +74,6 @@
|
|||
<path d="M 80 120 A 4 4 0 0 0 84 116" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="20" x2="20" y1="396" y2="452"/>
|
||||
<path d="M 20 452 A 4 4 0 0 0 24 456" fill="none"/>
|
||||
<path d="M 24 392 A 4 4 0 0 0 20 396" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="20" x2="20" y1="572" y2="708"/>
|
||||
<path d="M 20 708 A 4 4 0 0 0 24 712" fill="none"/>
|
||||
<path d="M 24 568 A 4 4 0 0 0 20 572" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="24" x2="88" y1="392" y2="392"/>
|
||||
<path d="M 92 396 A 4 4 0 0 0 88 392" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="24" x2="88" y1="456" y2="456"/>
|
||||
<path d="M 88 456 A 4 4 0 0 0 92 452" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="24" x2="88" y1="568" y2="568"/>
|
||||
<path d="M 92 572 A 4 4 0 0 0 88 568" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="24" x2="88" y1="712" y2="712"/>
|
||||
<path d="M 88 712 A 4 4 0 0 0 92 708" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="56" x2="124" y1="264" y2="264"/>
|
||||
</g>
|
||||
<g>
|
||||
|
@ -109,31 +83,10 @@
|
|||
<line marker-end="url(#triangle)" x1="84" x2="124" y1="72" y2="72"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="92" x2="92" y1="396" y2="452"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="92" x2="212" y1="408" y2="408"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="92" x2="92" y1="572" y2="708"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="96" x2="92" y1="104" y2="104"/>
|
||||
<line x1="96" x2="132" y1="104" y2="104"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="104" x2="100" y1="440" y2="440"/>
|
||||
<line x1="104" x2="220" y1="440" y2="440"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="104" x2="100" y1="600" y2="600"/>
|
||||
<line marker-end="url(#triangle)" x1="104" x2="212" y1="600" y2="600"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="104" x2="100" y1="680" y2="680"/>
|
||||
<line marker-end="url(#triangle)" x1="104" x2="212" y1="680" y2="680"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="108" x2="108" y1="12" y2="64"/>
|
||||
<path d="M 112 8 A 4 4 0 0 0 108 12" fill="none"/>
|
||||
</g>
|
||||
|
@ -148,37 +101,12 @@
|
|||
<path d="M 108 308 A 4 4 0 0 0 112 312" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="112" x2="280" y1="8" y2="8"/>
|
||||
<path d="M 284 12 A 4 4 0 0 0 280 8" fill="none"/>
|
||||
<line x1="112" x2="304" y1="8" y2="8"/>
|
||||
<path d="M 308 12 A 4 4 0 0 0 304 8" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="112" x2="280" y1="312" y2="312"/>
|
||||
<path d="M 280 312 A 4 4 0 0 0 284 308" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="116" x2="116" y1="348" y2="400"/>
|
||||
<path d="M 120 344 A 4 4 0 0 0 116 348" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="116" x2="116" y1="416" y2="432"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="116" x2="116" y1="448" y2="592"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="116" x2="116" y1="608" y2="672"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="116" x2="116" y1="688" y2="724"/>
|
||||
<path d="M 116 724 A 4 4 0 0 0 120 728" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="120" x2="368" y1="344" y2="344"/>
|
||||
<path d="M 372 348 A 4 4 0 0 0 368 344" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="120" x2="368" y1="728" y2="728"/>
|
||||
<path d="M 368 728 A 4 4 0 0 0 372 724" fill="none"/>
|
||||
<line x1="112" x2="304" y1="312" y2="312"/>
|
||||
<path d="M 304 312 A 4 4 0 0 0 308 308" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="132" x2="132" y1="60" y2="116"/>
|
||||
|
@ -238,12 +166,18 @@
|
|||
<line x1="188" x2="188" y1="172" y2="196"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="200" x2="196" y1="184" y2="184"/>
|
||||
<line x1="200" x2="220" y1="184" y2="184"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="212" x2="212" y1="252" y2="276"/>
|
||||
<path d="M 212 276 A 4 4 0 0 0 216 280" fill="none"/>
|
||||
<path d="M 216 248 A 4 4 0 0 0 212 252" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="216" x2="256" y1="248" y2="248"/>
|
||||
<line x1="216" x2="236" y1="248" y2="248"/>
|
||||
<line x1="236" x2="236" y1="224" y2="248"/>
|
||||
<line x1="236" x2="256" y1="248" y2="248"/>
|
||||
<path d="M 260 252 A 4 4 0 0 0 256 248" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
|
@ -251,151 +185,55 @@
|
|||
<path d="M 256 280 A 4 4 0 0 0 260 276" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="220" x2="220" y1="396" y2="452"/>
|
||||
<path d="M 220 452 A 4 4 0 0 0 224 456" fill="none"/>
|
||||
<path d="M 224 392 A 4 4 0 0 0 220 396" fill="none"/>
|
||||
<line x1="220" x2="220" y1="172" y2="196"/>
|
||||
<path d="M 220 196 A 4 4 0 0 0 224 200" fill="none"/>
|
||||
<path d="M 224 168 A 4 4 0 0 0 220 172" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="220" x2="220" y1="508" y2="532"/>
|
||||
<path d="M 220 532 A 4 4 0 0 0 224 536" fill="none"/>
|
||||
<path d="M 224 504 A 4 4 0 0 0 220 508" fill="none"/>
|
||||
<line x1="224" x2="264" y1="168" y2="168"/>
|
||||
<path d="M 268 172 A 4 4 0 0 0 264 168" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="220" x2="220" y1="588" y2="612"/>
|
||||
<path d="M 220 612 A 4 4 0 0 0 224 616" fill="none"/>
|
||||
<path d="M 224 584 A 4 4 0 0 0 220 588" fill="none"/>
|
||||
<line x1="224" x2="264" y1="200" y2="200"/>
|
||||
<path d="M 264 200 A 4 4 0 0 0 268 196" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="220" x2="220" y1="668" y2="692"/>
|
||||
<path d="M 220 692 A 4 4 0 0 0 224 696" fill="none"/>
|
||||
<path d="M 224 664 A 4 4 0 0 0 220 668" fill="none"/>
|
||||
<line marker-end="url(#triangle)" x1="236" x2="236" y1="224" y2="212"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="224" x2="352" y1="392" y2="392"/>
|
||||
<path d="M 356 396 A 4 4 0 0 0 352 392" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="224" x2="352" y1="456" y2="456"/>
|
||||
<path d="M 352 456 A 4 4 0 0 0 356 452" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="224" x2="244" y1="504" y2="504"/>
|
||||
<line x1="244" x2="244" y1="480" y2="504"/>
|
||||
<line x1="244" x2="272" y1="504" y2="504"/>
|
||||
<path d="M 276 508 A 4 4 0 0 0 272 504" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="224" x2="272" y1="536" y2="536"/>
|
||||
<path d="M 272 536 A 4 4 0 0 0 276 532" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="224" x2="244" y1="584" y2="584"/>
|
||||
<line x1="244" x2="244" y1="560" y2="584"/>
|
||||
<line x1="244" x2="244" y1="584" y2="592"/>
|
||||
<line x1="244" x2="264" y1="584" y2="584"/>
|
||||
<path d="M 268 588 A 4 4 0 0 0 264 584" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="224" x2="264" y1="616" y2="616"/>
|
||||
<path d="M 264 616 A 4 4 0 0 0 268 612" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="224" x2="244" y1="664" y2="664"/>
|
||||
<line x1="244" x2="244" y1="640" y2="664"/>
|
||||
<line x1="244" x2="264" y1="664" y2="664"/>
|
||||
<path d="M 268 668 A 4 4 0 0 0 264 664" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="224" x2="264" y1="696" y2="696"/>
|
||||
<path d="M 264 696 A 4 4 0 0 0 268 692" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="244" x2="244" y1="480" y2="468"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="244" x2="244" y1="560" y2="548"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="244" x2="244" y1="640" y2="628"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="260" x2="260" y1="252" y2="264"/>
|
||||
<line x1="260" x2="260" y1="264" y2="276"/>
|
||||
<line marker-end="url(#triangle)" x1="260" x2="316" y1="264" y2="264"/>
|
||||
<line x1="260" x2="260" y1="252" y2="276"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="268" x2="268" y1="60" y2="116"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="268" x2="268" y1="588" y2="600"/>
|
||||
<line x1="268" x2="268" y1="600" y2="612"/>
|
||||
<line x1="268" x2="272" y1="600" y2="600"/>
|
||||
<line x1="268" x2="268" y1="172" y2="196"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="268" x2="268" y1="668" y2="680"/>
|
||||
<line x1="268" x2="268" y1="680" y2="692"/>
|
||||
<line x1="268" x2="272" y1="680" y2="680"/>
|
||||
<line marker-end="url(#triangle)" x1="272" x2="268" y1="264" y2="264"/>
|
||||
<line marker-end="url(#triangle)" x1="272" x2="340" y1="264" y2="264"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="276" x2="276" y1="508" y2="532"/>
|
||||
<line x1="308" x2="308" y1="12" y2="256"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="280" x2="276" y1="600" y2="600"/>
|
||||
<line marker-end="url(#triangle)" x1="280" x2="404" y1="600" y2="600"/>
|
||||
<line x1="308" x2="308" y1="272" y2="308"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="280" x2="276" y1="680" y2="680"/>
|
||||
<line marker-end="url(#triangle)" x1="280" x2="404" y1="680" y2="680"/>
|
||||
<line x1="348" x2="348" y1="236" y2="292"/>
|
||||
<path d="M 348 292 A 4 4 0 0 0 352 296" fill="none"/>
|
||||
<path d="M 352 232 A 4 4 0 0 0 348 236" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="284" x2="284" y1="12" y2="256"/>
|
||||
<line x1="352" x2="448" y1="232" y2="232"/>
|
||||
<path d="M 452 236 A 4 4 0 0 0 448 232" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="284" x2="284" y1="272" y2="308"/>
|
||||
<line x1="352" x2="448" y1="296" y2="296"/>
|
||||
<path d="M 448 296 A 4 4 0 0 0 452 292" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="324" x2="324" y1="236" y2="292"/>
|
||||
<path d="M 324 292 A 4 4 0 0 0 328 296" fill="none"/>
|
||||
<path d="M 328 232 A 4 4 0 0 0 324 236" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="328" x2="424" y1="232" y2="232"/>
|
||||
<path d="M 428 236 A 4 4 0 0 0 424 232" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="328" x2="424" y1="296" y2="296"/>
|
||||
<path d="M 424 296 A 4 4 0 0 0 428 292" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="356" x2="356" y1="396" y2="452"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="372" x2="372" y1="348" y2="592"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="372" x2="372" y1="608" y2="672"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="372" x2="372" y1="688" y2="724"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="412" x2="412" y1="572" y2="708"/>
|
||||
<path d="M 412 708 A 4 4 0 0 0 416 712" fill="none"/>
|
||||
<path d="M 416 568 A 4 4 0 0 0 412 572" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="416" x2="512" y1="568" y2="568"/>
|
||||
<path d="M 516 572 A 4 4 0 0 0 512 568" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="416" x2="512" y1="712" y2="712"/>
|
||||
<path d="M 512 712 A 4 4 0 0 0 516 708" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="428" x2="428" y1="236" y2="292"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="516" x2="516" y1="572" y2="708"/>
|
||||
<line x1="452" x2="452" y1="236" y2="292"/>
|
||||
</g>
|
||||
<g>
|
||||
<text x="25" y="92">
|
||||
|
@ -403,23 +241,8 @@ Client
|
|||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="33" y="428">
|
||||
Client
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="33" y="604">
|
||||
Leader
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="129" y="28">
|
||||
Leader
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="129" y="364">
|
||||
Validator
|
||||
Fullnode
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
|
@ -443,32 +266,12 @@ Ncp
|
|||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="233" y="428">
|
||||
JsonRpcService
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="233" y="524">
|
||||
Bank
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="233" y="604">
|
||||
<text x="233" y="188">
|
||||
Tvu
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="233" y="684">
|
||||
Ncp
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="337" y="268">
|
||||
Validators
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="425" y="620">
|
||||
<text x="361" y="268">
|
||||
Validators
|
||||
</text>
|
||||
</g>
|
||||
|
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
@ -1,4 +1,4 @@
|
|||
<svg class="bob" font-family="arial" font-size="14" height="384" width="440" xmlns="http://www.w3.org/2000/svg">
|
||||
<svg class="bob" font-family="arial" font-size="14" height="320" width="560" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<marker id="triangle" markerHeight="8" markerWidth="8" orient="auto" refX="4" refY="2" viewBox="0 0 8 4">
|
||||
<polygon fill="black" points="0,0 0,4 8,2 0,0"/>
|
||||
|
@ -56,109 +56,182 @@
|
|||
}
|
||||
|
||||
</style>
|
||||
<rect fill="white" height="384" width="440" x="0" y="0"/>
|
||||
<rect fill="white" height="320" width="560" x="0" y="0"/>
|
||||
<g>
|
||||
<line x1="20" x2="20" y1="8" y2="376"/>
|
||||
<line x1="20" x2="196" y1="8" y2="8"/>
|
||||
<line x1="20" x2="196" y1="376" y2="376"/>
|
||||
<line x1="196" x2="196" y1="8" y2="200"/>
|
||||
<line x1="196" x2="196" y1="200" y2="376"/>
|
||||
<line marker-end="url(#triangle)" x1="196" x2="252" y1="200" y2="200"/>
|
||||
<line x1="20" x2="20" y1="140" y2="196"/>
|
||||
<path d="M 20 196 A 4 4 0 0 0 24 200" fill="none"/>
|
||||
<path d="M 24 136 A 4 4 0 0 0 20 140" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="52" x2="52" y1="40" y2="104"/>
|
||||
<line x1="52" x2="156" y1="40" y2="40"/>
|
||||
<line x1="52" x2="100" y1="104" y2="104"/>
|
||||
<line x1="100" x2="100" y1="104" y2="152"/>
|
||||
<line x1="100" x2="156" y1="104" y2="104"/>
|
||||
<line x1="100" x2="156" y1="152" y2="152"/>
|
||||
<line x1="156" x2="156" y1="40" y2="104"/>
|
||||
<line x1="156" x2="156" y1="152" y2="216"/>
|
||||
<line x1="24" x2="104" y1="136" y2="136"/>
|
||||
<path d="M 108 140 A 4 4 0 0 0 104 136" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="52" x2="52" y1="152" y2="216"/>
|
||||
<line x1="52" x2="100" y1="152" y2="152"/>
|
||||
<line x1="52" x2="100" y1="216" y2="216"/>
|
||||
<line x1="100" x2="100" y1="216" y2="264"/>
|
||||
<line x1="100" x2="156" y1="216" y2="216"/>
|
||||
<line x1="100" x2="156" y1="264" y2="264"/>
|
||||
<line x1="156" x2="156" y1="264" y2="328"/>
|
||||
<line x1="24" x2="104" y1="200" y2="200"/>
|
||||
<path d="M 104 200 A 4 4 0 0 0 108 196" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="52" x2="52" y1="264" y2="328"/>
|
||||
<line x1="52" x2="100" y1="264" y2="264"/>
|
||||
<line x1="52" x2="156" y1="328" y2="328"/>
|
||||
<line x1="108" x2="108" y1="140" y2="152"/>
|
||||
<line x1="108" x2="108" y1="152" y2="184"/>
|
||||
<line x1="108" x2="176" y1="152" y2="152"/>
|
||||
<line x1="108" x2="108" y1="184" y2="196"/>
|
||||
<line x1="108" x2="176" y1="184" y2="184"/>
|
||||
<path d="M 176 152 A 4 4 0 0 0 180 148" fill="none"/>
|
||||
<path d="M 180 188 A 4 4 0 0 0 176 184" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="260" x2="260" y1="8" y2="200"/>
|
||||
<line x1="260" x2="436" y1="8" y2="8"/>
|
||||
<line x1="260" x2="256" y1="200" y2="200"/>
|
||||
<line x1="260" x2="260" y1="200" y2="376"/>
|
||||
<line x1="260" x2="436" y1="376" y2="376"/>
|
||||
<line x1="436" x2="436" y1="8" y2="376"/>
|
||||
<line x1="180" x2="180" y1="108" y2="148"/>
|
||||
<path d="M 184 104 A 4 4 0 0 0 180 108" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="292" x2="292" y1="40" y2="104"/>
|
||||
<line x1="292" x2="396" y1="40" y2="40"/>
|
||||
<line x1="292" x2="340" y1="104" y2="104"/>
|
||||
<line x1="340" x2="340" y1="104" y2="152"/>
|
||||
<line x1="340" x2="396" y1="104" y2="104"/>
|
||||
<line x1="340" x2="396" y1="152" y2="152"/>
|
||||
<line x1="396" x2="396" y1="40" y2="104"/>
|
||||
<line x1="396" x2="396" y1="152" y2="216"/>
|
||||
<line x1="180" x2="180" y1="188" y2="244"/>
|
||||
<path d="M 180 244 A 4 4 0 0 0 184 248" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="292" x2="292" y1="152" y2="216"/>
|
||||
<line x1="292" x2="340" y1="152" y2="152"/>
|
||||
<line x1="292" x2="340" y1="216" y2="216"/>
|
||||
<line x1="340" x2="340" y1="216" y2="264"/>
|
||||
<line x1="340" x2="396" y1="216" y2="216"/>
|
||||
<line x1="340" x2="396" y1="264" y2="264"/>
|
||||
<line x1="396" x2="396" y1="264" y2="328"/>
|
||||
<line marker-end="url(#triangle)" x1="184" x2="252" y1="104" y2="104"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="292" x2="292" y1="264" y2="328"/>
|
||||
<line x1="292" x2="340" y1="264" y2="264"/>
|
||||
<line x1="292" x2="396" y1="328" y2="328"/>
|
||||
<line marker-end="url(#triangle)" x1="184" x2="252" y1="248" y2="248"/>
|
||||
</g>
|
||||
<g>
|
||||
<text x="73" y="76">
|
||||
frontend
|
||||
<line x1="228" x2="228" y1="28" y2="96"/>
|
||||
<path d="M 232 24 A 4 4 0 0 0 228 28" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="228" x2="228" y1="112" y2="240"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="228" x2="228" y1="256" y2="308"/>
|
||||
<path d="M 228 308 A 4 4 0 0 0 232 312" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="232" x2="552" y1="24" y2="24"/>
|
||||
<path d="M 556 28 A 4 4 0 0 0 552 24" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="232" x2="552" y1="312" y2="312"/>
|
||||
<path d="M 552 312 A 4 4 0 0 0 556 308" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="260" x2="260" y1="76" y2="132"/>
|
||||
<path d="M 260 132 A 4 4 0 0 0 264 136" fill="none"/>
|
||||
<path d="M 264 72 A 4 4 0 0 0 260 76" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="260" x2="260" y1="220" y2="276"/>
|
||||
<path d="M 260 276 A 4 4 0 0 0 264 280" fill="none"/>
|
||||
<path d="M 264 216 A 4 4 0 0 0 260 220" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="264" x2="360" y1="72" y2="72"/>
|
||||
<path d="M 364 76 A 4 4 0 0 0 360 72" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="264" x2="360" y1="136" y2="136"/>
|
||||
<path d="M 360 136 A 4 4 0 0 0 364 132" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="264" x2="316" y1="216" y2="216"/>
|
||||
<line x1="316" x2="316" y1="188" y2="216"/>
|
||||
<line x1="316" x2="360" y1="216" y2="216"/>
|
||||
<path d="M 320 184 A 4 4 0 0 0 316 188" fill="none"/>
|
||||
<path d="M 364 220 A 4 4 0 0 0 360 216" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="264" x2="360" y1="280" y2="280"/>
|
||||
<path d="M 360 280 A 4 4 0 0 0 364 276" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="320" x2="448" y1="184" y2="184"/>
|
||||
<path d="M 448 184 A 4 4 0 0 0 452 180" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="364" x2="364" y1="76" y2="104"/>
|
||||
<line x1="364" x2="364" y1="104" y2="132"/>
|
||||
<line marker-end="url(#triangle)" x1="364" x2="388" y1="104" y2="104"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="364" x2="364" y1="220" y2="248"/>
|
||||
<line x1="364" x2="364" y1="248" y2="276"/>
|
||||
<line marker-end="url(#triangle)" x1="364" x2="388" y1="248" y2="248"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="396" x2="396" y1="76" y2="132"/>
|
||||
<path d="M 396 132 A 4 4 0 0 0 400 136" fill="none"/>
|
||||
<path d="M 400 72 A 4 4 0 0 0 396 76" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="396" x2="396" y1="220" y2="276"/>
|
||||
<path d="M 396 276 A 4 4 0 0 0 400 280" fill="none"/>
|
||||
<path d="M 400 216 A 4 4 0 0 0 396 220" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="400" x2="496" y1="72" y2="72"/>
|
||||
<path d="M 500 76 A 4 4 0 0 0 496 72" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="400" x2="496" y1="136" y2="136"/>
|
||||
<path d="M 496 136 A 4 4 0 0 0 500 132" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="400" x2="504" y1="216" y2="216"/>
|
||||
<path d="M 508 220 A 4 4 0 0 0 504 216" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="400" x2="504" y1="280" y2="280"/>
|
||||
<path d="M 504 280 A 4 4 0 0 0 508 276" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="452" x2="452" y1="160" y2="148"/>
|
||||
<line x1="452" x2="452" y1="160" y2="180"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="500" x2="500" y1="76" y2="132"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="508" x2="508" y1="220" y2="276"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="556" x2="556" y1="28" y2="308"/>
|
||||
</g>
|
||||
<g>
|
||||
<text x="41" y="172">
|
||||
Client
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="89" y="188">
|
||||
llvm
|
||||
<text x="281" y="108">
|
||||
Verifier
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="89" y="300">
|
||||
ELF
|
||||
<text x="281" y="252">
|
||||
Loader
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="89" y="364">
|
||||
client
|
||||
<text x="329" y="44">
|
||||
Solana
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="313" y="76">
|
||||
verifier
|
||||
<text x="337" y="172">
|
||||
LoadAccounts
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="321" y="188">
|
||||
loader
|
||||
<text x="385" y="44">
|
||||
Runtime
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="321" y="300">
|
||||
runtime
|
||||
<text x="409" y="252">
|
||||
Interpreter
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="321" y="364">
|
||||
solana
|
||||
<text x="417" y="108">
|
||||
Accounts
|
||||
</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 6.2 KiB |
|
@ -1,26 +1,34 @@
|
|||
# The LAMPORT execution environment
|
||||
# The Solana SDK
|
||||
|
||||
## Introduction
|
||||
|
||||
With LAMPORT (Language-Agnostic, Memory-oriented, Parallel-friendly, Optimized
|
||||
Run-Time), we can execute smart contracts concurrently, and written in the
|
||||
client’s choice of programming language. Furthermore, we demonstrate Solana’s
|
||||
built-in smart contract language Budget can target LAMPORT without any loss in
|
||||
performance. The two features that allow LAMPORT to work:
|
||||
With the Solana runtime, we can execute on-chain programs concurrently, and
|
||||
written in the client’s choice of programming language.
|
||||
|
||||
Client-owned memory identified by public keys. By declaring ownership upfront
|
||||
and separating the program’s state from the program, the runtime knows which
|
||||
contracts can safely be executed concurrently. Solana’s blockchain-encoded VDF
|
||||
tells validator nodes at precisely what times they need to end up in the same
|
||||
state. Between those times, they are free to introduce non-deterministic
|
||||
behavior as-needed to improve execution times.
|
||||
|
||||
## Toolchain Stack
|
||||
## Client interactions with Solana
|
||||
|
||||
<img alt="SDK tools" src="img/sdk-tools.svg" class="center"/>
|
||||
|
||||
As shown in the diagram above an untrusted client, creates a program in the
|
||||
front-end language of her choice, (like C/C++/Rust/Lua), and compiles it with
|
||||
LLVM to a position independent shared object ELF, targeting BPF bytecode.
|
||||
Solana will safely load and execute the ELF.
|
||||
language of their choice, (i.e. C/C++/Rust/Lua), and compiles it with LLVM to a
|
||||
position independent shared object ELF, targeting BPF bytecode, and sends it to
|
||||
the Solana cluster. Next, the client sends messages to the Solana cluster,
|
||||
which target that program. The Solana runtime loads the previously submitted
|
||||
ELF and passes it the client's message for interpretation.
|
||||
|
||||
## Persistent Storage
|
||||
|
||||
Solana supports several kinds of persistent storage, called *accounts*:
|
||||
|
||||
1. Executable
|
||||
2. Writable by a client
|
||||
3. Writable by a program
|
||||
4. Read-only
|
||||
|
||||
All accounts are identified by public keys and may hold arbirary data.
|
||||
When the client sends messages to programs, it requests access to storage
|
||||
using those keys. The runtime loads the account data and passes it to the
|
||||
program. The runtime also ensures accounts aren't written to if not owned
|
||||
by the client or program. Any writes to read-only accounts are discarded
|
||||
unless the write was to credit tokens. Any user may credit other accounts
|
||||
tokens, regardless of account permission.
|
||||
|
|
|
@ -39,7 +39,7 @@ routs them to the `program_id` entry point.
|
|||
|
||||
Transactions are batched and processed in a pipeline
|
||||
|
||||
<img alt="LAMPORT pipeline" src="img/lamport.svg" class="center"/>
|
||||
<img alt="Runtime pipeline" src="img/runtime.svg" class="center"/>
|
||||
|
||||
At the `execute` stage, the loaded pages have no data dependencies, so all the
|
||||
programs can be executed in parallel.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
## Appendix A: Terminology
|
||||
## Terminology
|
||||
|
||||
### Teminology Currently in Use
|
||||
|
||||
|
@ -12,7 +12,6 @@ The following list contains words commonly used throughout the Solana architectu
|
|||
* entry - an entry on the ledger - either a tick or a transactions entry
|
||||
* instruction - the smallest unit of a program that a client can include in a transaction
|
||||
* keypair - a public and secret key
|
||||
* mips - millions of instructions per second
|
||||
* node count - the number of fullnodes participating in a cluster
|
||||
* program - the code that interprets instructions
|
||||
* pubkey - the public key of a keypair
|
||||
|
@ -28,6 +27,8 @@ The following list contains words commonly used throughout the Solana architectu
|
|||
The following keywords do not have any functionality but are reserved by Solana
|
||||
for potential future use.
|
||||
|
||||
* epoch - the time in which a leader schedule is valid
|
||||
* mips - millions of instructions per second
|
||||
* public key - We currently use `pubkey`
|
||||
* slot - the time in which a single leader may produce entries
|
||||
* secret key - Users currently only use `keypair`
|
||||
|
|
Loading…
Reference in New Issue