Integrate the markdown book into the codebase
This implies that the book should describe exactly what is implemented, and will not lead the way and eventually bitrot as the RFCs do.
This commit is contained in:
27
src/SUMMARY.md
Normal file
27
src/SUMMARY.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Solana Architecture
|
||||
|
||||
- [Introduction](introduction.md)
|
||||
|
||||
- [Synchronization](synchronization.md)
|
||||
- [Introduction to VDFs](vdf.md)
|
||||
- [Proof of History](poh.md)
|
||||
|
||||
- [Fullnode](fullnode.md)
|
||||
- [Tpu](tpu.md)
|
||||
- [Tvu](tvu.md)
|
||||
- [Ncp](ncp.md)
|
||||
- [JsonRpcService](jsonrpc-service.md)
|
||||
|
||||
- [Avalanche replication](avalanche.md)
|
||||
- [Proof of replication](porep.md)
|
||||
|
||||
- [On-chain programs](programs.md)
|
||||
- [The Runtime](runtime.md)
|
||||
- [Ledger format](ledger.md)
|
||||
|
||||
## Appendix
|
||||
|
||||
- [Appendix](appendix.md)
|
||||
- [Terminology](terminology.md)
|
||||
- [JSON RPC API](jsonrpc-api.md)
|
||||
|
||||
4
src/appendix.md
Normal file
4
src/appendix.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# Appendix
|
||||
|
||||
The following sections contain reference material you may find useful in your
|
||||
Solana journey.
|
||||
22
src/avalanche.md
Normal file
22
src/avalanche.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Avalanche replication
|
||||
|
||||
The [Avalance explainer video](https://www.youtube.com/watch?v=qt_gDRXHrHQ) is
|
||||
a conceptual overview of how a Solana leader can continuously process a gigabit
|
||||
of transaction data per second and then get that same data, after being
|
||||
recorded on the ledger, out to multiple validators on a single gigabit
|
||||
backplane.
|
||||
|
||||
In practice, we found that just one level of the Avalanche validator tree is
|
||||
sufficient for at least 150 validators. We anticipate adding the second level
|
||||
to solve one of two problems:
|
||||
|
||||
1. To transmit ledger segments to slower "replicator" nodes.
|
||||
2. To scale up the number of validators nodes.
|
||||
|
||||
Both problems justify the additional level, but you won't find it implemented
|
||||
in the reference design just yet, because Solana's gossip implementation is
|
||||
currently the bottleneck on the number of nodes per Solana cluster. That work
|
||||
is being actively developed here:
|
||||
|
||||
[Scalable Gossip](https://github.com/solana-labs/solana/pull/1546)
|
||||
|
||||
7
src/fullnode.md
Normal file
7
src/fullnode.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Fullnode
|
||||
|
||||
<img alt="Fullnode block diagrams" src="img/fullnode.svg" class="center"/>
|
||||
|
||||
## Pipelining
|
||||
|
||||
## Pipeline Stages
|
||||
475
src/img/fullnode.svg
Normal file
475
src/img/fullnode.svg
Normal file
@@ -0,0 +1,475 @@
|
||||
<svg class="bob" font-family="arial" font-size="14" height="736" width="520" 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"/>
|
||||
</marker>
|
||||
<marker id="clear_triangle" markerHeight="10" markerWidth="10" orient="auto" refX="1" refY="7" viewBox="0 0 20 14">
|
||||
<polygon fill="none" points="2,2 2,12 18,7 2,2" stroke="black" stroke-width="2"/>
|
||||
</marker>
|
||||
<marker id="circle" markerHeight="5" markerWidth="5" orient="auto" refX="10" refY="10" viewBox="0 0 20 20">
|
||||
<circle cx="10" cy="10" fill="black" r="8"/>
|
||||
</marker>
|
||||
<marker id="square" markerHeight="5" markerWidth="5" orient="auto" refX="10" refY="10" viewBox="0 0 20 20">
|
||||
<rect fill="black" height="20" width="20" x="0" y="0"/>
|
||||
</marker>
|
||||
<marker id="open_circle" markerHeight="10" markerWidth="10" orient="auto" refX="10" refY="10" viewBox="0 0 20 20">
|
||||
<circle cx="10" cy="10" fill="white" r="4" stroke="black" stroke-width="2"/>
|
||||
</marker>
|
||||
<marker id="big_open_circle" markerHeight="20" markerWidth="20" orient="auto" refX="20" refY="20" viewBox="0 0 40 40">
|
||||
<circle cx="20" cy="20" fill="white" r="6" stroke="black" stroke-width="2"/>
|
||||
</marker>
|
||||
</defs>
|
||||
<style type="text/css">
|
||||
|
||||
line,path {
|
||||
stroke: black;
|
||||
stroke-width: 2;
|
||||
stroke-opacity: 1;
|
||||
fill-opacity: 1;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: miter;
|
||||
}
|
||||
line.dashed {
|
||||
stroke-dasharray: 5;
|
||||
}
|
||||
circle.solid {
|
||||
fill:black;
|
||||
stroke: black;
|
||||
stroke-width: 2;
|
||||
stroke-opacity: 1;
|
||||
fill-opacity: 1;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: miter;
|
||||
}
|
||||
circle.open {
|
||||
fill:none;
|
||||
stroke: black;
|
||||
stroke-width: 2;
|
||||
stroke-opacity: 1;
|
||||
fill-opacity: 1;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: miter;
|
||||
}
|
||||
tspan.head{
|
||||
fill: none;
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
<rect fill="white" height="736" width="520" 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"/>
|
||||
<path d="M 16 56 A 4 4 0 0 0 12 60" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="16" x2="80" y1="56" y2="56"/>
|
||||
<path d="M 84 60 A 4 4 0 0 0 80 56" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="16" x2="52" y1="120" y2="120"/>
|
||||
<line x1="52" x2="52" y1="120" y2="260"/>
|
||||
<line x1="52" x2="80" y1="120" y2="120"/>
|
||||
<path d="M 52 260 A 4 4 0 0 0 56 264" fill="none"/>
|
||||
<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>
|
||||
<line x1="84" x2="84" y1="60" y2="116"/>
|
||||
</g>
|
||||
<g>
|
||||
<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>
|
||||
<g>
|
||||
<line x1="108" x2="108" y1="80" y2="96"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="108" x2="108" y1="112" y2="256"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="108" x2="108" y1="272" y2="308"/>
|
||||
<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"/>
|
||||
</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"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="132" x2="132" y1="60" y2="116"/>
|
||||
<path d="M 132 116 A 4 4 0 0 0 136 120" fill="none"/>
|
||||
<path d="M 136 56 A 4 4 0 0 0 132 60" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="132" x2="132" y1="172" y2="196"/>
|
||||
<path d="M 132 196 A 4 4 0 0 0 136 200" fill="none"/>
|
||||
<path d="M 136 168 A 4 4 0 0 0 132 172" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="132" x2="132" y1="252" y2="276"/>
|
||||
<path d="M 132 276 A 4 4 0 0 0 136 280" fill="none"/>
|
||||
<path d="M 136 248 A 4 4 0 0 0 132 252" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="136" x2="264" y1="56" y2="56"/>
|
||||
<path d="M 268 60 A 4 4 0 0 0 264 56" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="136" x2="264" y1="120" y2="120"/>
|
||||
<path d="M 264 120 A 4 4 0 0 0 268 116" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="136" x2="156" y1="168" y2="168"/>
|
||||
<line x1="156" x2="156" y1="144" y2="168"/>
|
||||
<line x1="156" x2="184" y1="168" y2="168"/>
|
||||
<path d="M 188 172 A 4 4 0 0 0 184 168" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="136" x2="184" y1="200" y2="200"/>
|
||||
<path d="M 184 200 A 4 4 0 0 0 188 196" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="136" x2="156" y1="248" y2="248"/>
|
||||
<line x1="156" x2="156" y1="224" y2="248"/>
|
||||
<line x1="156" x2="176" y1="248" y2="248"/>
|
||||
<path d="M 180 252 A 4 4 0 0 0 176 248" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="136" x2="176" y1="280" y2="280"/>
|
||||
<path d="M 176 280 A 4 4 0 0 0 180 276" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="156" x2="156" y1="144" y2="132"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="156" x2="156" y1="224" y2="212"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="180" x2="180" y1="252" y2="264"/>
|
||||
<line x1="180" x2="180" y1="264" y2="276"/>
|
||||
<line marker-end="url(#triangle)" x1="180" x2="204" y1="264" y2="264"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="188" x2="188" y1="172" y2="196"/>
|
||||
</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"/>
|
||||
<path d="M 260 252 A 4 4 0 0 0 256 248" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="216" x2="256" y1="280" y2="280"/>
|
||||
<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"/>
|
||||
</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"/>
|
||||
</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"/>
|
||||
</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"/>
|
||||
</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"/>
|
||||
</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"/>
|
||||
</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"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="276" x2="276" y1="508" y2="532"/>
|
||||
</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"/>
|
||||
</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"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="284" x2="284" y1="12" y2="256"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="284" x2="284" y1="272" y2="308"/>
|
||||
</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"/>
|
||||
</g>
|
||||
<g>
|
||||
<text x="25" y="92">
|
||||
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
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="145" y="92">
|
||||
JsonRpcService
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="145" y="188">
|
||||
Bank
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="145" y="268">
|
||||
Tpu
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="225" y="268">
|
||||
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">
|
||||
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">
|
||||
Validators
|
||||
</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 12 KiB |
211
src/img/lamport.svg
Normal file
211
src/img/lamport.svg
Normal file
@@ -0,0 +1,211 @@
|
||||
<svg class="bob" font-family="arial" font-size="14" height="144" width="656" 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"/>
|
||||
</marker>
|
||||
<marker id="clear_triangle" markerHeight="10" markerWidth="10" orient="auto" refX="1" refY="7" viewBox="0 0 20 14">
|
||||
<polygon fill="none" points="2,2 2,12 18,7 2,2" stroke="black" stroke-width="2"/>
|
||||
</marker>
|
||||
<marker id="circle" markerHeight="5" markerWidth="5" orient="auto" refX="10" refY="10" viewBox="0 0 20 20">
|
||||
<circle cx="10" cy="10" fill="black" r="8"/>
|
||||
</marker>
|
||||
<marker id="square" markerHeight="5" markerWidth="5" orient="auto" refX="10" refY="10" viewBox="0 0 20 20">
|
||||
<rect fill="black" height="20" width="20" x="0" y="0"/>
|
||||
</marker>
|
||||
<marker id="open_circle" markerHeight="10" markerWidth="10" orient="auto" refX="10" refY="10" viewBox="0 0 20 20">
|
||||
<circle cx="10" cy="10" fill="white" r="4" stroke="black" stroke-width="2"/>
|
||||
</marker>
|
||||
<marker id="big_open_circle" markerHeight="20" markerWidth="20" orient="auto" refX="20" refY="20" viewBox="0 0 40 40">
|
||||
<circle cx="20" cy="20" fill="white" r="6" stroke="black" stroke-width="2"/>
|
||||
</marker>
|
||||
</defs>
|
||||
<style type="text/css">
|
||||
|
||||
line,path {
|
||||
stroke: black;
|
||||
stroke-width: 2;
|
||||
stroke-opacity: 1;
|
||||
fill-opacity: 1;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: miter;
|
||||
}
|
||||
line.dashed {
|
||||
stroke-dasharray: 5;
|
||||
}
|
||||
circle.solid {
|
||||
fill:black;
|
||||
stroke: black;
|
||||
stroke-width: 2;
|
||||
stroke-opacity: 1;
|
||||
fill-opacity: 1;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: miter;
|
||||
}
|
||||
circle.open {
|
||||
fill:none;
|
||||
stroke: black;
|
||||
stroke-width: 2;
|
||||
stroke-opacity: 1;
|
||||
fill-opacity: 1;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: miter;
|
||||
}
|
||||
tspan.head{
|
||||
fill: none;
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
<rect fill="white" height="144" width="656" x="0" y="0"/>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="0" x2="28" y1="104" y2="104"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="4" x2="4" y1="24" y2="56"/>
|
||||
<line x1="4" x2="100" y1="24" y2="24"/>
|
||||
<line x1="4" x2="100" y1="56" y2="56"/>
|
||||
<line x1="100" x2="100" y1="24" y2="56"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="36" x2="36" y1="88" y2="120"/>
|
||||
<line x1="36" x2="140" y1="88" y2="88"/>
|
||||
<line x1="36" x2="140" y1="120" y2="120"/>
|
||||
<line x1="140" x2="140" y1="88" y2="120"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="100" x2="132" y1="40" y2="40"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="140" x2="140" y1="24" y2="56"/>
|
||||
<line x1="140" x2="252" y1="24" y2="24"/>
|
||||
<line x1="140" x2="252" y1="56" y2="56"/>
|
||||
<line x1="252" x2="252" y1="24" y2="56"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="140" x2="172" y1="104" y2="104"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="180" x2="180" y1="88" y2="120"/>
|
||||
<line x1="180" x2="260" y1="88" y2="88"/>
|
||||
<line x1="180" x2="260" y1="120" y2="120"/>
|
||||
<line x1="260" x2="260" y1="88" y2="120"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="252" x2="284" y1="40" y2="40"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="260" x2="292" y1="104" y2="104"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="292" x2="292" y1="24" y2="56"/>
|
||||
<line x1="292" x2="412" y1="24" y2="24"/>
|
||||
<line x1="292" x2="412" y1="56" y2="56"/>
|
||||
<line x1="412" x2="412" y1="24" y2="56"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="300" x2="300" y1="88" y2="120"/>
|
||||
<line x1="300" x2="312" y1="88" y2="88"/>
|
||||
<line x1="300" x2="420" y1="120" y2="120"/>
|
||||
<line x1="420" x2="420" y1="88" y2="120"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="312" x2="320" y1="86" y2="86"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="312" x2="320" y1="90" y2="90"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="320" x2="420" y1="88" y2="88"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="412" x2="444" y1="40" y2="40"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="420" x2="444" y1="104" y2="104"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="452" x2="452" y1="24" y2="56"/>
|
||||
<line x1="452" x2="620" y1="24" y2="24"/>
|
||||
<line x1="452" x2="620" y1="56" y2="56"/>
|
||||
<line x1="620" x2="620" y1="24" y2="56"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="452" x2="452" y1="88" y2="120"/>
|
||||
<line x1="452" x2="572" y1="88" y2="88"/>
|
||||
<line x1="452" x2="572" y1="120" y2="120"/>
|
||||
<line x1="572" x2="572" y1="88" y2="120"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="620" x2="652" y1="40" y2="40"/>
|
||||
</g>
|
||||
<g>
|
||||
<text x="17" y="44">
|
||||
sigverify
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="49" y="108">
|
||||
load
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="89" y="108">
|
||||
data
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="153" y="44">
|
||||
lock
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="193" y="44">
|
||||
memory
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="193" y="108">
|
||||
execute
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="305" y="44">
|
||||
validate
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="313" y="108">
|
||||
commit
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="369" y="108">
|
||||
data
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="377" y="44">
|
||||
fee
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="457" y="108">
|
||||
unlock
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="465" y="44">
|
||||
allocate
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="513" y="108">
|
||||
memory
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="537" y="44">
|
||||
accounts
|
||||
</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.8 KiB |
164
src/img/sdk-tools.svg
Normal file
164
src/img/sdk-tools.svg
Normal file
@@ -0,0 +1,164 @@
|
||||
<svg class="bob" font-family="arial" font-size="14" height="384" width="440" 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"/>
|
||||
</marker>
|
||||
<marker id="clear_triangle" markerHeight="10" markerWidth="10" orient="auto" refX="1" refY="7" viewBox="0 0 20 14">
|
||||
<polygon fill="none" points="2,2 2,12 18,7 2,2" stroke="black" stroke-width="2"/>
|
||||
</marker>
|
||||
<marker id="circle" markerHeight="5" markerWidth="5" orient="auto" refX="10" refY="10" viewBox="0 0 20 20">
|
||||
<circle cx="10" cy="10" fill="black" r="8"/>
|
||||
</marker>
|
||||
<marker id="square" markerHeight="5" markerWidth="5" orient="auto" refX="10" refY="10" viewBox="0 0 20 20">
|
||||
<rect fill="black" height="20" width="20" x="0" y="0"/>
|
||||
</marker>
|
||||
<marker id="open_circle" markerHeight="10" markerWidth="10" orient="auto" refX="10" refY="10" viewBox="0 0 20 20">
|
||||
<circle cx="10" cy="10" fill="white" r="4" stroke="black" stroke-width="2"/>
|
||||
</marker>
|
||||
<marker id="big_open_circle" markerHeight="20" markerWidth="20" orient="auto" refX="20" refY="20" viewBox="0 0 40 40">
|
||||
<circle cx="20" cy="20" fill="white" r="6" stroke="black" stroke-width="2"/>
|
||||
</marker>
|
||||
</defs>
|
||||
<style type="text/css">
|
||||
|
||||
line,path {
|
||||
stroke: black;
|
||||
stroke-width: 2;
|
||||
stroke-opacity: 1;
|
||||
fill-opacity: 1;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: miter;
|
||||
}
|
||||
line.dashed {
|
||||
stroke-dasharray: 5;
|
||||
}
|
||||
circle.solid {
|
||||
fill:black;
|
||||
stroke: black;
|
||||
stroke-width: 2;
|
||||
stroke-opacity: 1;
|
||||
fill-opacity: 1;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: miter;
|
||||
}
|
||||
circle.open {
|
||||
fill:none;
|
||||
stroke: black;
|
||||
stroke-width: 2;
|
||||
stroke-opacity: 1;
|
||||
fill-opacity: 1;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: miter;
|
||||
}
|
||||
tspan.head{
|
||||
fill: none;
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
<rect fill="white" height="384" width="440" 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"/>
|
||||
</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"/>
|
||||
</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"/>
|
||||
</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"/>
|
||||
</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"/>
|
||||
</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"/>
|
||||
</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"/>
|
||||
</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"/>
|
||||
</g>
|
||||
<g>
|
||||
<text x="73" y="76">
|
||||
frontend
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="89" y="188">
|
||||
llvm
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="89" y="300">
|
||||
ELF
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="89" y="364">
|
||||
client
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="313" y="76">
|
||||
verifier
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="321" y="188">
|
||||
loader
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="321" y="300">
|
||||
runtime
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="321" y="364">
|
||||
solana
|
||||
</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.5 KiB |
323
src/img/tpu.svg
Normal file
323
src/img/tpu.svg
Normal file
@@ -0,0 +1,323 @@
|
||||
<svg class="bob" font-family="arial" font-size="14" height="336" width="664" 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"/>
|
||||
</marker>
|
||||
<marker id="clear_triangle" markerHeight="10" markerWidth="10" orient="auto" refX="1" refY="7" viewBox="0 0 20 14">
|
||||
<polygon fill="none" points="2,2 2,12 18,7 2,2" stroke="black" stroke-width="2"/>
|
||||
</marker>
|
||||
<marker id="circle" markerHeight="5" markerWidth="5" orient="auto" refX="10" refY="10" viewBox="0 0 20 20">
|
||||
<circle cx="10" cy="10" fill="black" r="8"/>
|
||||
</marker>
|
||||
<marker id="square" markerHeight="5" markerWidth="5" orient="auto" refX="10" refY="10" viewBox="0 0 20 20">
|
||||
<rect fill="black" height="20" width="20" x="0" y="0"/>
|
||||
</marker>
|
||||
<marker id="open_circle" markerHeight="10" markerWidth="10" orient="auto" refX="10" refY="10" viewBox="0 0 20 20">
|
||||
<circle cx="10" cy="10" fill="white" r="4" stroke="black" stroke-width="2"/>
|
||||
</marker>
|
||||
<marker id="big_open_circle" markerHeight="20" markerWidth="20" orient="auto" refX="20" refY="20" viewBox="0 0 40 40">
|
||||
<circle cx="20" cy="20" fill="white" r="6" stroke="black" stroke-width="2"/>
|
||||
</marker>
|
||||
</defs>
|
||||
<style type="text/css">
|
||||
|
||||
line,path {
|
||||
stroke: black;
|
||||
stroke-width: 2;
|
||||
stroke-opacity: 1;
|
||||
fill-opacity: 1;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: miter;
|
||||
}
|
||||
line.dashed {
|
||||
stroke-dasharray: 5;
|
||||
}
|
||||
circle.solid {
|
||||
fill:black;
|
||||
stroke: black;
|
||||
stroke-width: 2;
|
||||
stroke-opacity: 1;
|
||||
fill-opacity: 1;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: miter;
|
||||
}
|
||||
circle.open {
|
||||
fill:none;
|
||||
stroke: black;
|
||||
stroke-width: 2;
|
||||
stroke-opacity: 1;
|
||||
fill-opacity: 1;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: miter;
|
||||
}
|
||||
tspan.head{
|
||||
fill: none;
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
<rect fill="white" height="336" width="664" x="0" y="0"/>
|
||||
<g>
|
||||
<line x1="12" x2="12" y1="124" y2="148"/>
|
||||
<path d="M 12 148 A 4 4 0 0 0 16 152" fill="none"/>
|
||||
<path d="M 16 120 A 4 4 0 0 0 12 124" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="16" x2="88" y1="120" y2="120"/>
|
||||
<path d="M 92 124 A 4 4 0 0 0 88 120" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="16" x2="88" y1="152" y2="152"/>
|
||||
<path d="M 88 152 A 4 4 0 0 0 92 148" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="92" x2="92" y1="124" y2="148"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="92" x2="124" y1="136" y2="136"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="108" x2="108" y1="12" y2="128"/>
|
||||
<path d="M 112 8 A 4 4 0 0 0 108 12" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="108" x2="108" y1="144" y2="244"/>
|
||||
<path d="M 108 244 A 4 4 0 0 0 112 248" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="112" x2="528" y1="8" y2="8"/>
|
||||
<path d="M 532 12 A 4 4 0 0 0 528 8" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="112" x2="380" y1="248" y2="248"/>
|
||||
<line x1="380" x2="484" y1="248" y2="248"/>
|
||||
<line x1="484" x2="528" y1="248" y2="248"/>
|
||||
<path d="M 528 248 A 4 4 0 0 0 532 244" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="132" x2="132" y1="108" y2="164"/>
|
||||
<path d="M 132 164 A 4 4 0 0 0 136 168" fill="none"/>
|
||||
<path d="M 136 104 A 4 4 0 0 0 132 108" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="136" x2="192" y1="104" y2="104"/>
|
||||
<path d="M 196 108 A 4 4 0 0 0 192 104" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="136" x2="192" y1="168" y2="168"/>
|
||||
<path d="M 192 168 A 4 4 0 0 0 196 164" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="196" x2="196" y1="108" y2="164"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="196" x2="212" y1="136" y2="136"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="220" x2="220" y1="108" y2="164"/>
|
||||
<path d="M 220 164 A 4 4 0 0 0 224 168" fill="none"/>
|
||||
<path d="M 224 104 A 4 4 0 0 0 220 108" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="224" x2="312" y1="104" y2="104"/>
|
||||
<path d="M 316 108 A 4 4 0 0 0 312 104" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="224" x2="312" y1="168" y2="168"/>
|
||||
<path d="M 312 168 A 4 4 0 0 0 316 164" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="316" x2="316" y1="108" y2="164"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="316" x2="332" y1="136" y2="136"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="332" x2="332" y1="28" y2="52"/>
|
||||
<path d="M 332 52 A 4 4 0 0 0 336 56" fill="none"/>
|
||||
<path d="M 336 24 A 4 4 0 0 0 332 28" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="336" x2="432" y1="24" y2="24"/>
|
||||
<path d="M 436 28 A 4 4 0 0 0 432 24" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="336" x2="396" y1="56" y2="56"/>
|
||||
<line marker-end="url(#triangle)" x1="396" x2="396" y1="56" y2="92"/>
|
||||
<line x1="396" x2="432" y1="56" y2="56"/>
|
||||
<path d="M 432 56 A 4 4 0 0 0 436 52" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="340" x2="340" y1="108" y2="164"/>
|
||||
<path d="M 340 164 A 4 4 0 0 0 344 168" fill="none"/>
|
||||
<path d="M 344 104 A 4 4 0 0 0 340 108" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="344" x2="356" y1="104" y2="104"/>
|
||||
<line x1="356" x2="356" y1="80" y2="104"/>
|
||||
<line x1="356" x2="416" y1="104" y2="104"/>
|
||||
<path d="M 420 108 A 4 4 0 0 0 416 104" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="344" x2="380" y1="168" y2="168"/>
|
||||
<line marker-end="url(#triangle)" x1="380" x2="380" y1="168" y2="284"/>
|
||||
<line x1="380" x2="416" y1="168" y2="168"/>
|
||||
<path d="M 416 168 A 4 4 0 0 0 420 164" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="356" x2="356" y1="80" y2="68"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="356" x2="356" y1="300" y2="324"/>
|
||||
<path d="M 356 324 A 4 4 0 0 0 360 328" fill="none"/>
|
||||
<path d="M 360 296 A 4 4 0 0 0 356 300" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="360" x2="408" y1="296" y2="296"/>
|
||||
<path d="M 412 300 A 4 4 0 0 0 408 296" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="360" x2="408" y1="328" y2="328"/>
|
||||
<path d="M 408 328 A 4 4 0 0 0 412 324" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="412" x2="412" y1="300" y2="324"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="420" x2="420" y1="108" y2="164"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="420" x2="444" y1="136" y2="136"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="436" x2="436" y1="28" y2="52"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="452" x2="452" y1="108" y2="164"/>
|
||||
<path d="M 452 164 A 4 4 0 0 0 456 168" fill="none"/>
|
||||
<path d="M 456 104 A 4 4 0 0 0 452 108" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="452" x2="452" y1="300" y2="324"/>
|
||||
<path d="M 452 324 A 4 4 0 0 0 456 328" fill="none"/>
|
||||
<path d="M 456 296 A 4 4 0 0 0 452 300" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="456" x2="512" y1="104" y2="104"/>
|
||||
<path d="M 516 108 A 4 4 0 0 0 512 104" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="456" x2="484" y1="168" y2="168"/>
|
||||
<line marker-end="url(#triangle)" x1="484" x2="484" y1="168" y2="284"/>
|
||||
<line x1="484" x2="512" y1="168" y2="168"/>
|
||||
<path d="M 512 168 A 4 4 0 0 0 516 164" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="456" x2="520" y1="296" y2="296"/>
|
||||
<path d="M 524 300 A 4 4 0 0 0 520 296" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="456" x2="520" y1="328" y2="328"/>
|
||||
<path d="M 520 328 A 4 4 0 0 0 524 324" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="516" x2="516" y1="108" y2="136"/>
|
||||
<line x1="516" x2="516" y1="136" y2="164"/>
|
||||
<line marker-end="url(#triangle)" x1="516" x2="548" y1="136" y2="136"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="524" x2="524" y1="300" y2="324"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="532" x2="532" y1="12" y2="128"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="532" x2="532" y1="144" y2="244"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="556" x2="556" y1="124" y2="148"/>
|
||||
<path d="M 556 148 A 4 4 0 0 0 560 152" fill="none"/>
|
||||
<path d="M 560 120 A 4 4 0 0 0 556 124" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="560" x2="656" y1="120" y2="120"/>
|
||||
<path d="M 660 124 A 4 4 0 0 0 656 120" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="560" x2="656" y1="152" y2="152"/>
|
||||
<path d="M 656 152 A 4 4 0 0 0 660 148" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="660" x2="660" y1="124" y2="148"/>
|
||||
</g>
|
||||
<g>
|
||||
<text x="25" y="140">
|
||||
Clients
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="129" y="28">
|
||||
Tpu
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="145" y="124">
|
||||
Fetch
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="145" y="140">
|
||||
Stage
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="233" y="124">
|
||||
SigVerify
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="249" y="140">
|
||||
Stage
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="345" y="44">
|
||||
PohService
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="353" y="124">
|
||||
Banking
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="361" y="140">
|
||||
Stage
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="369" y="316">
|
||||
Bank
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="465" y="124">
|
||||
Write
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="465" y="140">
|
||||
Stage
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="465" y="316">
|
||||
Ledger
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="569" y="140">
|
||||
Validators
|
||||
</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.9 KiB |
306
src/img/tvu.svg
Normal file
306
src/img/tvu.svg
Normal file
@@ -0,0 +1,306 @@
|
||||
<svg class="bob" font-family="arial" font-size="14" height="368" width="680" 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"/>
|
||||
</marker>
|
||||
<marker id="clear_triangle" markerHeight="10" markerWidth="10" orient="auto" refX="1" refY="7" viewBox="0 0 20 14">
|
||||
<polygon fill="none" points="2,2 2,12 18,7 2,2" stroke="black" stroke-width="2"/>
|
||||
</marker>
|
||||
<marker id="circle" markerHeight="5" markerWidth="5" orient="auto" refX="10" refY="10" viewBox="0 0 20 20">
|
||||
<circle cx="10" cy="10" fill="black" r="8"/>
|
||||
</marker>
|
||||
<marker id="square" markerHeight="5" markerWidth="5" orient="auto" refX="10" refY="10" viewBox="0 0 20 20">
|
||||
<rect fill="black" height="20" width="20" x="0" y="0"/>
|
||||
</marker>
|
||||
<marker id="open_circle" markerHeight="10" markerWidth="10" orient="auto" refX="10" refY="10" viewBox="0 0 20 20">
|
||||
<circle cx="10" cy="10" fill="white" r="4" stroke="black" stroke-width="2"/>
|
||||
</marker>
|
||||
<marker id="big_open_circle" markerHeight="20" markerWidth="20" orient="auto" refX="20" refY="20" viewBox="0 0 40 40">
|
||||
<circle cx="20" cy="20" fill="white" r="6" stroke="black" stroke-width="2"/>
|
||||
</marker>
|
||||
</defs>
|
||||
<style type="text/css">
|
||||
|
||||
line,path {
|
||||
stroke: black;
|
||||
stroke-width: 2;
|
||||
stroke-opacity: 1;
|
||||
fill-opacity: 1;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: miter;
|
||||
}
|
||||
line.dashed {
|
||||
stroke-dasharray: 5;
|
||||
}
|
||||
circle.solid {
|
||||
fill:black;
|
||||
stroke: black;
|
||||
stroke-width: 2;
|
||||
stroke-opacity: 1;
|
||||
fill-opacity: 1;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: miter;
|
||||
}
|
||||
circle.open {
|
||||
fill:none;
|
||||
stroke: black;
|
||||
stroke-width: 2;
|
||||
stroke-opacity: 1;
|
||||
fill-opacity: 1;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: miter;
|
||||
}
|
||||
tspan.head{
|
||||
fill: none;
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
<rect fill="white" height="368" width="680" x="0" y="0"/>
|
||||
<g>
|
||||
<line x1="12" x2="12" y1="140" y2="164"/>
|
||||
<path d="M 12 164 A 4 4 0 0 0 16 168" fill="none"/>
|
||||
<path d="M 16 136 A 4 4 0 0 0 12 140" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="12" x2="12" y1="188" y2="212"/>
|
||||
<path d="M 12 212 A 4 4 0 0 0 16 216" fill="none"/>
|
||||
<path d="M 16 184 A 4 4 0 0 0 12 188" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="16" x2="52" y1="136" y2="136"/>
|
||||
<line x1="52" x2="80" y1="136" y2="136"/>
|
||||
<path d="M 84 140 A 4 4 0 0 0 80 136" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="16" x2="80" y1="168" y2="168"/>
|
||||
<path d="M 80 168 A 4 4 0 0 0 84 164" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="16" x2="112" y1="184" y2="184"/>
|
||||
<path d="M 116 188 A 4 4 0 0 0 112 184" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="16" x2="112" y1="216" y2="216"/>
|
||||
<path d="M 112 216 A 4 4 0 0 0 116 212" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="52" x2="52" y1="12" y2="124"/>
|
||||
<path d="M 56 8 A 4 4 0 0 0 52 12" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="56" x2="440" y1="8" y2="8"/>
|
||||
<path d="M 444 12 A 4 4 0 0 0 440 8" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="84" x2="84" y1="140" y2="164"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="84" x2="164" y1="152" y2="152"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="116" x2="116" y1="188" y2="212"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="116" x2="164" y1="200" y2="200"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="148" x2="148" y1="44" y2="144"/>
|
||||
<path d="M 152 40 A 4 4 0 0 0 148 44" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="148" x2="148" y1="160" y2="192"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="148" x2="148" y1="208" y2="276"/>
|
||||
<path d="M 148 276 A 4 4 0 0 0 152 280" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="152" x2="444" y1="40" y2="40"/>
|
||||
<line x1="444" x2="444" y1="12" y2="40"/>
|
||||
<line x1="444" x2="444" y1="40" y2="104"/>
|
||||
<line x1="444" x2="544" y1="40" y2="40"/>
|
||||
<line x1="444" x2="444" y1="104" y2="136"/>
|
||||
<line marker-end="url(#triangle)" x1="444" x2="564" y1="104" y2="104"/>
|
||||
<line x1="444" x2="520" y1="136" y2="136"/>
|
||||
<path d="M 524 140 A 4 4 0 0 0 520 136" fill="none"/>
|
||||
<path d="M 548 44 A 4 4 0 0 0 544 40" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="152" x2="444" y1="280" y2="280"/>
|
||||
<line x1="444" x2="544" y1="280" y2="280"/>
|
||||
<path d="M 544 280 A 4 4 0 0 0 548 276" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="172" x2="172" y1="124" y2="212"/>
|
||||
<path d="M 172 212 A 4 4 0 0 0 176 216" fill="none"/>
|
||||
<path d="M 176 120 A 4 4 0 0 0 172 124" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="176" x2="232" y1="120" y2="120"/>
|
||||
<path d="M 236 124 A 4 4 0 0 0 232 120" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="176" x2="232" y1="216" y2="216"/>
|
||||
<path d="M 232 216 A 4 4 0 0 0 236 212" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="236" x2="236" y1="124" y2="212"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="236" x2="260" y1="168" y2="168"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="268" x2="268" y1="140" y2="196"/>
|
||||
<path d="M 268 196 A 4 4 0 0 0 272 200" fill="none"/>
|
||||
<path d="M 272 136 A 4 4 0 0 0 268 140" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="272" x2="308" y1="136" y2="136"/>
|
||||
<line x1="308" x2="308" y1="108" y2="136"/>
|
||||
<line x1="308" x2="368" y1="136" y2="136"/>
|
||||
<path d="M 312 104 A 4 4 0 0 0 308 108" fill="none"/>
|
||||
<path d="M 372 140 A 4 4 0 0 0 368 136" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="272" x2="368" y1="200" y2="200"/>
|
||||
<path d="M 368 200 A 4 4 0 0 0 372 196" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="312" x2="444" y1="104" y2="104"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="372" x2="372" y1="140" y2="196"/>
|
||||
</g>
|
||||
<g>
|
||||
<line marker-end="url(#triangle)" x1="372" x2="396" y1="168" y2="168"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="404" x2="404" y1="140" y2="196"/>
|
||||
<path d="M 404 196 A 4 4 0 0 0 408 200" fill="none"/>
|
||||
<path d="M 408 136 A 4 4 0 0 0 404 140" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="408" x2="444" y1="136" y2="136"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="408" x2="444" y1="200" y2="200"/>
|
||||
<line marker-end="url(#triangle)" x1="444" x2="444" y1="200" y2="316"/>
|
||||
<line x1="444" x2="520" y1="200" y2="200"/>
|
||||
<path d="M 520 200 A 4 4 0 0 0 524 196" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="420" x2="420" y1="332" y2="356"/>
|
||||
<path d="M 420 356 A 4 4 0 0 0 424 360" fill="none"/>
|
||||
<path d="M 424 328 A 4 4 0 0 0 420 332" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="424" x2="472" y1="328" y2="328"/>
|
||||
<path d="M 476 332 A 4 4 0 0 0 472 328" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="424" x2="472" y1="360" y2="360"/>
|
||||
<path d="M 472 360 A 4 4 0 0 0 476 356" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="464" x2="472" y1="176" y2="160"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="476" x2="476" y1="332" y2="356"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="524" x2="524" y1="140" y2="196"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="548" x2="548" y1="44" y2="96"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="548" x2="548" y1="112" y2="276"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="572" x2="572" y1="92" y2="116"/>
|
||||
<path d="M 572 116 A 4 4 0 0 0 576 120" fill="none"/>
|
||||
<path d="M 576 88 A 4 4 0 0 0 572 92" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="576" x2="672" y1="88" y2="88"/>
|
||||
<path d="M 676 92 A 4 4 0 0 0 672 88" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="576" x2="672" y1="120" y2="120"/>
|
||||
<path d="M 672 120 A 4 4 0 0 0 676 116" fill="none"/>
|
||||
</g>
|
||||
<g>
|
||||
<line x1="676" x2="676" y1="92" y2="116"/>
|
||||
</g>
|
||||
<g>
|
||||
<text x="25" y="156">
|
||||
Leader
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="25" y="204">
|
||||
Validators
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="169" y="60">
|
||||
Tvu
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="185" y="156">
|
||||
Blob
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="185" y="172">
|
||||
Fetch
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="185" y="188">
|
||||
Stage
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="281" y="156">
|
||||
Retransmit
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="297" y="172">
|
||||
Stage
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="417" y="156">
|
||||
Replicate
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="417" y="172">
|
||||
Stage
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="417" y="188">
|
||||
Vote
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="433" y="348">
|
||||
Bank
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="457" y="188">
|
||||
Stage
|
||||
</text>
|
||||
</g>
|
||||
<g>
|
||||
<text x="585" y="108">
|
||||
Validators
|
||||
</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.3 KiB |
31
src/introduction.md
Normal file
31
src/introduction.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Introduction
|
||||
|
||||
This document defines the architecture of Solana, a blockchain built from the
|
||||
ground up for scale. The goal of the architecture is to demonstrate there
|
||||
exists a set of software algorithms that in combination, removes software as a
|
||||
performance bottleneck, allowing transaction throughput to scale proportionally
|
||||
with network bandwidth. The architecture goes on to satisfy all three desirable
|
||||
properties of a proper blockchain, that it not only be scalable, but that it is
|
||||
also secure and decentralized.
|
||||
|
||||
With this architecture, we calculate a theoretical upper bound of 710 thousand
|
||||
transactions per second (tps) on a standard gigabit network and 28.4 million
|
||||
tps on 40 gigabit. In practice, our focus has been on gigabit. We soak-tested
|
||||
a 150 node permissioned testnet and it is able to maintain a mean transaction
|
||||
throughput of approximately 200 thousand tps with peaks over 400 thousand.
|
||||
|
||||
Furthermore, we have found high throughput extends beyond simple payments, and
|
||||
that this architecture is also able to perform safe, concurrent execution of
|
||||
programs authored in a general purpose programming language, such as C. We feel
|
||||
the extension warrants industry focus on an additional performance metric
|
||||
already common in the CPU industry, millions of *instructions* per second or
|
||||
mips. By measuring mips, we see that batching instructions within a transaction
|
||||
amortizes the cost of signature verification, lifting the maximum theoretical
|
||||
instruction throughput up to almost exactly that of centralized databases.
|
||||
|
||||
Lastly, we discuss the relationships between high throughput, security and
|
||||
transaction fees. Solana's efficient use hardware drives transaction fees into
|
||||
the ballpark of 1/1000th of a cent. The drop in fees in turn makes certain
|
||||
denial of service attacks cheaper. We discuss what these attacks look like and
|
||||
Solana's techniques to defend against them.
|
||||
|
||||
339
src/jsonrpc-api.md
Normal file
339
src/jsonrpc-api.md
Normal file
@@ -0,0 +1,339 @@
|
||||
JSON RPC API
|
||||
===
|
||||
|
||||
Solana nodes accept HTTP requests using the [JSON-RPC 2.0](https://www.jsonrpc.org/specification) specification.
|
||||
|
||||
To interact with a Solana node inside a JavaScript application, use the [solana-web3.js](https://github.com/solana-labs/solana-web3.js) library, which gives a convenient interface for the RPC methods.
|
||||
|
||||
RPC HTTP Endpoint
|
||||
---
|
||||
|
||||
**Default port:** 8899
|
||||
eg. http://localhost:8899, http://192.168.1.88:8899
|
||||
|
||||
RPC PubSub WebSocket Endpoint
|
||||
---
|
||||
|
||||
**Default port:** 8900
|
||||
eg. ws://localhost:8900, http://192.168.1.88:8900
|
||||
|
||||
|
||||
Methods
|
||||
---
|
||||
|
||||
* [confirmTransaction](#confirmtransaction)
|
||||
* [getBalance](#getbalance)
|
||||
* [getAccountInfo](#getaccountinfo)
|
||||
* [getLastId](#getlastid)
|
||||
* [getSignatureStatus](#getsignaturestatus)
|
||||
* [getTransactionCount](#gettransactioncount)
|
||||
* [requestAirdrop](#requestairdrop)
|
||||
* [sendTransaction](#sendtransaction)
|
||||
* [startSubscriptionChannel](#startsubscriptionchannel)
|
||||
|
||||
* [Subscription Websocket](#subscription-websocket)
|
||||
* [accountSubscribe](#accountsubscribe)
|
||||
* [accountUnsubscribe](#accountunsubscribe)
|
||||
* [signatureSubscribe](#signaturesubscribe)
|
||||
* [signatureUnsubscribe](#signatureunsubscribe)
|
||||
|
||||
Request Formatting
|
||||
---
|
||||
|
||||
To make a JSON-RPC request, send an HTTP POST request with a `Content-Type: application/json` header. The JSON request data should contain 4 fields:
|
||||
|
||||
* `jsonrpc`, set to `"2.0"`
|
||||
* `id`, a unique client-generated identifying integer
|
||||
* `method`, a string containing the method to be invoked
|
||||
* `params`, a JSON array of ordered parameter values
|
||||
|
||||
Example using curl:
|
||||
```bash
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getBalance", "params":["83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri"]}' 192.168.1.88:8899
|
||||
```
|
||||
|
||||
The response output will be a JSON object with the following fields:
|
||||
|
||||
* `jsonrpc`, matching the request specification
|
||||
* `id`, matching the request identifier
|
||||
* `result`, requested data or success confirmation
|
||||
|
||||
Requests can be sent in batches by sending an array of JSON-RPC request objects as the data for a single POST.
|
||||
|
||||
Definitions
|
||||
---
|
||||
|
||||
* Hash: A SHA-256 hash of a chunk of data.
|
||||
* Pubkey: The public key of a Ed25519 key-pair.
|
||||
* Signature: An Ed25519 signature of a chunk of data.
|
||||
* Transaction: A Solana instruction signed by a client key-pair.
|
||||
|
||||
JSON RPC API Reference
|
||||
---
|
||||
|
||||
### confirmTransaction
|
||||
Returns a transaction receipt
|
||||
|
||||
##### Parameters:
|
||||
* `string` - Signature of Transaction to confirm, as base-58 encoded string
|
||||
|
||||
##### Results:
|
||||
* `boolean` - Transaction status, true if Transaction is confirmed
|
||||
|
||||
##### Example:
|
||||
```bash
|
||||
// Request
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"confirmTransaction", "params":["5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"]}' http://localhost:8899
|
||||
|
||||
// Result
|
||||
{"jsonrpc":"2.0","result":true,"id":1}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### getBalance
|
||||
Returns the balance of the account of provided Pubkey
|
||||
|
||||
##### Parameters:
|
||||
* `string` - Pubkey of account to query, as base-58 encoded string
|
||||
|
||||
##### Results:
|
||||
* `integer` - quantity, as a signed 64-bit integer
|
||||
|
||||
##### Example:
|
||||
```bash
|
||||
// Request
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getBalance", "params":["83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri"]}' http://localhost:8899
|
||||
|
||||
// Result
|
||||
{"jsonrpc":"2.0","result":0,"id":1}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### getAccountInfo
|
||||
Returns all information associated with the account of provided Pubkey
|
||||
|
||||
##### Parameters:
|
||||
* `string` - Pubkey of account to query, as base-58 encoded string
|
||||
|
||||
##### Results:
|
||||
The result field will be a JSON object with the following sub fields:
|
||||
|
||||
* `tokens`, number of tokens assigned to this account, as a signed 64-bit integer
|
||||
* `program_id`, array of 32 bytes representing the program this account has been assigned to
|
||||
* `userdata`, array of bytes representing any userdata associated with the account
|
||||
|
||||
##### Example:
|
||||
```bash
|
||||
// Request
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getAccountInfo", "params":["FVxxngPx368XvMCoeskdd6U8cZJFsfa1BEtGWqyAxRj4"]}' http://localhost:8899
|
||||
|
||||
// Result
|
||||
{"jsonrpc":"2.0","result":{"program_id":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"tokens":1,"userdata":[3,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,50,48,53,48,45,48,49,45,48,49,84,48,48,58,48,48,58,48,48,90,252,10,7,28,246,140,88,177,98,82,10,227,89,81,18,30,194,101,199,16,11,73,133,20,246,62,114,39,20,113,189,32,50,0,0,0,0,0,0,0,247,15,36,102,167,83,225,42,133,127,82,34,36,224,207,130,109,230,224,188,163,33,213,13,5,117,211,251,65,159,197,51,0,0,0,0,0,0]},"id":1}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### getLastId
|
||||
Returns the last entry ID from the ledger
|
||||
|
||||
##### Parameters:
|
||||
None
|
||||
|
||||
##### Results:
|
||||
* `string` - the ID of last entry, a Hash as base-58 encoded string
|
||||
|
||||
##### Example:
|
||||
```bash
|
||||
// Request
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getLastId"}' http://localhost:8899
|
||||
|
||||
// Result
|
||||
{"jsonrpc":"2.0","result":"GH7ome3EiwEr7tu9JuTh2dpYWBJK3z69Xm1ZE3MEE6JC","id":1}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### getSignatureStatus
|
||||
Returns the status of a given signature. This method is similar to
|
||||
[confirmTransaction](#confirmtransaction) but provides more resolution for error
|
||||
events.
|
||||
|
||||
##### Parameters:
|
||||
* `string` - Signature of Transaction to confirm, as base-58 encoded string
|
||||
|
||||
##### Results:
|
||||
* `string` - Transaction status:
|
||||
* `Confirmed` - Transaction was successful
|
||||
* `SignatureNotFound` - Unknown transaction
|
||||
* `ProgramRuntimeError` - An error occurred in the program that processed this Transaction
|
||||
* `AccountInUse` - Another Transaction had a write lock one of the Accounts specified in this Transaction. The Transaction may succeed if retried
|
||||
* `GenericFailure` - Some other error occurred. **Note**: In the future new Transaction statuses may be added to this list. It's safe to assume that all new statuses will be more specific error conditions that previously presented as `GenericFailure`
|
||||
|
||||
##### Example:
|
||||
```bash
|
||||
// Request
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getSignatureStatus", "params":["5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"]}' http://localhost:8899
|
||||
|
||||
// Result
|
||||
{"jsonrpc":"2.0","result":"SignatureNotFound","id":1}
|
||||
```
|
||||
|
||||
---
|
||||
### getTransactionCount
|
||||
Returns the current Transaction count from the ledger
|
||||
|
||||
##### Parameters:
|
||||
None
|
||||
|
||||
##### Results:
|
||||
* `integer` - count, as unsigned 64-bit integer
|
||||
|
||||
##### Example:
|
||||
```bash
|
||||
// Request
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getTransactionCount"}' http://localhost:8899
|
||||
|
||||
// Result
|
||||
{"jsonrpc":"2.0","result":268,"id":1}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### requestAirdrop
|
||||
Requests an airdrop of tokens to a Pubkey
|
||||
|
||||
##### Parameters:
|
||||
* `string` - Pubkey of account to receive tokens, as base-58 encoded string
|
||||
* `integer` - token quantity, as a signed 64-bit integer
|
||||
|
||||
##### Results:
|
||||
* `string` - Transaction Signature of airdrop, as base-58 encoded string
|
||||
|
||||
##### Example:
|
||||
```bash
|
||||
// Request
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"requestAirdrop", "params":["83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri", 50]}' http://localhost:8899
|
||||
|
||||
// Result
|
||||
{"jsonrpc":"2.0","result":"5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW","id":1}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### sendTransaction
|
||||
Creates new transaction
|
||||
|
||||
##### Parameters:
|
||||
* `array` - array of octets containing a fully-signed Transaction
|
||||
|
||||
##### Results:
|
||||
* `string` - Transaction Signature, as base-58 encoded string
|
||||
|
||||
##### Example:
|
||||
```bash
|
||||
// Request
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"sendTransaction", "params":[[61, 98, 55, 49, 15, 187, 41, 215, 176, 49, 234, 229, 228, 77, 129, 221, 239, 88, 145, 227, 81, 158, 223, 123, 14, 229, 235, 247, 191, 115, 199, 71, 121, 17, 32, 67, 63, 209, 239, 160, 161, 2, 94, 105, 48, 159, 235, 235, 93, 98, 172, 97, 63, 197, 160, 164, 192, 20, 92, 111, 57, 145, 251, 6, 40, 240, 124, 194, 149, 155, 16, 138, 31, 113, 119, 101, 212, 128, 103, 78, 191, 80, 182, 234, 216, 21, 121, 243, 35, 100, 122, 68, 47, 57, 13, 39, 0, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 40, 240, 124, 194, 149, 155, 16, 138, 31, 113, 119, 101, 212, 128, 103, 78, 191, 80, 182, 234, 216, 21, 121, 243, 35, 100, 122, 68, 47, 57, 11, 12, 106, 49, 74, 226, 201, 16, 161, 192, 28, 84, 124, 97, 190, 201, 171, 186, 6, 18, 70, 142, 89, 185, 176, 154, 115, 61, 26, 163, 77, 1, 88, 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]}' http://localhost:8899
|
||||
|
||||
// Result
|
||||
{"jsonrpc":"2.0","result":"2EBVM6cB8vAAD93Ktr6Vd8p67XPbQzCJX47MpReuiCXJAtcjaxpvWpcg9Ege1Nr5Tk3a2GFrByT7WPBjdsTycY9b","id":1}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Subscription Websocket
|
||||
After connect to the RPC PubSub websocket at `ws://<ADDRESS>/`:
|
||||
- Submit subscription requests to the websocket using the methods below
|
||||
- Multiple subscriptions may be active at once
|
||||
|
||||
---
|
||||
|
||||
### accountSubscribe
|
||||
Subscribe to an account to receive notifications when the userdata for a given account public key changes
|
||||
|
||||
##### Parameters:
|
||||
* `string` - account Pubkey, as base-58 encoded string
|
||||
|
||||
##### Results:
|
||||
* `integer` - Subscription id (needed to unsubscribe)
|
||||
|
||||
##### Example:
|
||||
```bash
|
||||
// Request
|
||||
{"jsonrpc":"2.0", "id":1, "method":"accountSubscribe", "params":["CM78CPUeXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNH12"]}
|
||||
|
||||
// Result
|
||||
{"jsonrpc": "2.0","result": 0,"id": 1}
|
||||
```
|
||||
|
||||
##### Notification Format:
|
||||
```bash
|
||||
{"jsonrpc": "2.0","method": "accountNotification", "params": {"result": {"program_id":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"tokens":1,"userdata":[3,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,50,48,53,48,45,48,49,45,48,49,84,48,48,58,48,48,58,48,48,90,252,10,7,28,246,140,88,177,98,82,10,227,89,81,18,30,194,101,199,16,11,73,133,20,246,62,114,39,20,113,189,32,50,0,0,0,0,0,0,0,247,15,36,102,167,83,225,42,133,127,82,34,36,224,207,130,109,230,224,188,163,33,213,13,5,117,211,251,65,159,197,51,0,0,0,0,0,0]},"subscription":0}}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### accountUnsubscribe
|
||||
Unsubscribe from account userdata change notifications
|
||||
|
||||
##### Parameters:
|
||||
* `integer` - id of account Subscription to cancel
|
||||
|
||||
##### Results:
|
||||
* `bool` - unsubscribe success message
|
||||
|
||||
##### Example:
|
||||
```bash
|
||||
// Request
|
||||
{"jsonrpc":"2.0", "id":1, "method":"accountUnsubscribe", "params":[0]}
|
||||
|
||||
// Result
|
||||
{"jsonrpc": "2.0","result": true,"id": 1}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### signatureSubscribe
|
||||
Subscribe to a transaction signature to receive notification when the transaction is confirmed
|
||||
On `signatureNotification`, the subscription is automatically cancelled
|
||||
|
||||
##### Parameters:
|
||||
* `string` - Transaction Signature, as base-58 encoded string
|
||||
|
||||
##### Results:
|
||||
* `integer` - subscription id (needed to unsubscribe)
|
||||
|
||||
##### Example:
|
||||
```bash
|
||||
// Request
|
||||
{"jsonrpc":"2.0", "id":1, "method":"signatureSubscribe", "params":["2EBVM6cB8vAAD93Ktr6Vd8p67XPbQzCJX47MpReuiCXJAtcjaxpvWpcg9Ege1Nr5Tk3a2GFrByT7WPBjdsTycY9b"]}
|
||||
|
||||
// Result
|
||||
{"jsonrpc": "2.0","result": 0,"id": 1}
|
||||
```
|
||||
|
||||
##### Notification Format:
|
||||
```bash
|
||||
{"jsonrpc": "2.0","method": "signatureNotification", "params": {"result": "Confirmed","subscription":0}}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### signatureUnsubscribe
|
||||
Unsubscribe from account userdata change notifications
|
||||
|
||||
##### Parameters:
|
||||
* `integer` - id of account subscription to cancel
|
||||
|
||||
##### Results:
|
||||
* `bool` - unsubscribe success message
|
||||
|
||||
##### Example:
|
||||
```bash
|
||||
// Request
|
||||
{"jsonrpc":"2.0", "id":1, "method":"signatureUnsubscribe", "params":[0]}
|
||||
|
||||
// Result
|
||||
{"jsonrpc": "2.0","result": true,"id": 1}
|
||||
```
|
||||
1
src/jsonrpc-service.md
Normal file
1
src/jsonrpc-service.md
Normal file
@@ -0,0 +1 @@
|
||||
# JsonRpcService
|
||||
1
src/ledger.md
Normal file
1
src/ledger.md
Normal file
@@ -0,0 +1 @@
|
||||
# Ledger format
|
||||
3
src/ncp.md
Normal file
3
src/ncp.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Ncp
|
||||
|
||||
The Network Control Plane implements a gossip network between all nodes on in the cluster.
|
||||
43
src/poh.md
Normal file
43
src/poh.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Proof of History
|
||||
|
||||
[Proof of History overview](https://medium.com/solana-labs/proof-of-history-a-clock-for-blockchain-cf47a61a9274)
|
||||
|
||||
## Relationship to consensus mechanisms
|
||||
|
||||
Most confusingly, a Proof of History (PoH) is more similar to a Verifiable
|
||||
Delay Function (VDF) than a Proof of Work or Proof of Stake consensus
|
||||
mechanism. The name unfortunately requires some historical context to
|
||||
understand. Proof of History was developed by Anatoly Yakovenko in November of
|
||||
2017, roughly 6 months before we saw a [paper using the term
|
||||
VDF](https://eprint.iacr.org/2018/601.pdf). At that time, it was commonplace to
|
||||
publish new proofs of some desirable property used to build most any blockchain
|
||||
component. Some time shortly after, the crypto community began charting out all
|
||||
the different consensus mechanisms and because most of them started with "Proof
|
||||
of", the prefix became synonymous with a "consensus" suffix. Proof of History
|
||||
is not a consensus mechanism, but it is used to improve the performance of
|
||||
Solana's Proof of Stake consensus. It is also used to improve the performance
|
||||
of the replication and storage protocols. To minimize confusion, Solana may
|
||||
rebrand PoH to some flavor of the term VDF.
|
||||
|
||||
|
||||
## Relationship to VDFs
|
||||
|
||||
A desirable property of a VDF is that verification time is very fast. Solana's
|
||||
approach to verifying its delay function is proportional to the time it took to
|
||||
create it. Split over a 4000 core GPU, it is sufficiently fast for Solana's
|
||||
needs, but if you asked the authors the paper cited above, they might tell you
|
||||
(and have) that Solana's approach is algorithmically slow it shouldn't be
|
||||
called a VDF. We argue the term VDF should represent the category of verifiable
|
||||
delay functions and not just the subset with certain performance
|
||||
characteristics. Until that's resolved, Solana will likely continue using the
|
||||
term PoH for its application-specific VDF.
|
||||
|
||||
Another difference between PoH and VDFs used only for tracking duration, is
|
||||
that PoH's hash chain includes hashes of any data the application observed.
|
||||
That data is a double-edged sword. On one side, the data "proves history" -
|
||||
that the data most certainly existed before hashes after it. On the side, it
|
||||
means the application can manipulate the hash chain by changing *when* the data
|
||||
is hashed. The PoH chain therefore does not serve as a good source of
|
||||
randomness whereas a VDF without that data could. Solana's leader selection
|
||||
algorithm (TODO: add link), for example, is derived only from the VDF *height*
|
||||
and not its hash at that height.
|
||||
1
src/porep.md
Normal file
1
src/porep.md
Normal file
@@ -0,0 +1 @@
|
||||
# Proof of replication
|
||||
26
src/programs.md
Normal file
26
src/programs.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# The LAMPORT execution environment
|
||||
|
||||
## 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:
|
||||
|
||||
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
|
||||
|
||||
<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.
|
||||
|
||||
94
src/runtime.md
Normal file
94
src/runtime.md
Normal file
@@ -0,0 +1,94 @@
|
||||
# Runtime
|
||||
|
||||
The goal with the runtime is to have a general purpose execution environment
|
||||
that is highly parallelizable. To achieve this goal the runtime forces each
|
||||
Instruction to specify all of its memory dependencies up front, and therefore a
|
||||
single Instruction cannot cause a dynamic memory allocation. An explicit
|
||||
Instruction for memory allocation from the `SystemProgram::CreateAccount` is
|
||||
the only way to allocate new memory in the engine. A Transaction may compose
|
||||
multiple Instruction, including `SystemProgram::CreateAccount`, into a single
|
||||
atomic sequence which allows for memory allocation to achieve a result that is
|
||||
similar to dynamic allocation.
|
||||
|
||||
|
||||
### State
|
||||
|
||||
State is addressed by an Account which is at the moment simply the Pubkey. Our
|
||||
goal is to eliminate memory allocation from within the program itself. Thus
|
||||
the client of the program provides all the state that is necessary for the
|
||||
program to execute in the transaction itself. The runtime interacts with the
|
||||
program through an entry point with a well defined interface. The userdata
|
||||
stored in an Account is an opaque type to the runtime, a `Vec<u8>`, the
|
||||
contents of which the program code has full control over.
|
||||
|
||||
The Transaction structure specifies a list of Pubkey's and signatures for those
|
||||
keys and a sequential list of instructions that will operate over the state's
|
||||
associated with the `account_keys`. For the transaction to be committed all
|
||||
the instructions must execute successfully, if any abort the whole transaction
|
||||
fails to commit.
|
||||
|
||||
### Account structure Accounts maintain token state as well as program specific
|
||||
memory.
|
||||
|
||||
# Transaction Engine
|
||||
|
||||
At its core, the engine looks up all the Pubkeys maps them to accounts and
|
||||
routs them to the `program_id` entry point.
|
||||
|
||||
## Execution
|
||||
|
||||
Transactions are batched and processed in a pipeline
|
||||
|
||||
<img alt="LAMPORT pipeline" src="img/lamport.svg" class="center"/>
|
||||
|
||||
At the `execute` stage, the loaded pages have no data dependencies, so all the
|
||||
programs can be executed in parallel.
|
||||
|
||||
The runtime enforces the following rules:
|
||||
|
||||
1. The `program_id` code is the only code that will modify the contents of
|
||||
`Account::userdata` of Account's that have been assigned to it. This means
|
||||
that upon assignment userdata vector is guaranteed to be `0`.
|
||||
2. Total balances on all the accounts is equal before and after execution of a
|
||||
Transaction.
|
||||
3. Balances of each of the accounts not assigned to `program_id` must be equal
|
||||
to or greater after the Transaction than before the transaction.
|
||||
4. All Instructions in the Transaction executed without a failure.
|
||||
|
||||
## Entry Point Execution of the program involves mapping the Program's public
|
||||
key to an entry point which takes a pointer to the transaction, and an array of
|
||||
loaded pages.
|
||||
|
||||
## System Interface
|
||||
|
||||
The interface is best described by the `Instruction::userdata` that the
|
||||
user encodes.
|
||||
* `CreateAccount` - This allows the user to create and assign an Account to a
|
||||
Program.
|
||||
* `Assign` - allows the user to assign an existing account to a `Program`.
|
||||
* `Move` - moves tokens between `Account`s that are associated with
|
||||
`SystemProgram`. This cannot be used to move tokens of other `Account`s.
|
||||
Programs need to implement their own version of Move.
|
||||
|
||||
## Notes
|
||||
|
||||
1. There is no dynamic memory allocation. Client's need to call the
|
||||
`SystemProgram` to create memory before passing it to another program. This
|
||||
Instruction can be composed into a single Transaction with the call to the
|
||||
program itself.
|
||||
2. Runtime guarantees that when memory is assigned to the `Program` it is zero
|
||||
initialized.
|
||||
3. Runtime guarantees that `Program`'s code is the only thing that can modify
|
||||
memory that its assigned to
|
||||
4. Runtime guarantees that the `Program` can only spend tokens that are in
|
||||
`Account`s that are assigned to it
|
||||
5. Runtime guarantees the balances belonging to `Account`s are balanced before
|
||||
and after the transaction
|
||||
6. Runtime guarantees that multiple instructions all executed successfully when
|
||||
a transaction is committed.
|
||||
|
||||
# Future Work
|
||||
|
||||
* [Continuations and Signals for long running
|
||||
Transactions](https://github.com/solana-labs/solana/issues/1485)
|
||||
|
||||
38
src/synchronization.md
Normal file
38
src/synchronization.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# Synchronization
|
||||
|
||||
It's possible for a centralized database to process 710,000 transactions per
|
||||
second on a standard gigabit network if the transactions are, on average, no
|
||||
more than 176 bytes. A centralized database can also replicate itself and
|
||||
maintain high availability without significantly compromising that transaction
|
||||
rate using the distributed system technique known as Optimistic Concurrency
|
||||
Control [\[H.T.Kung, J.T.Robinson
|
||||
(1981)\]](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.65.4735). At
|
||||
Solana, we're demonstrating that these same theoretical limits apply just as
|
||||
well to blockchain on an adversarial network. The key ingredient? Finding a way
|
||||
to share time when nodes can't trust one-another. Once nodes can trust time,
|
||||
suddenly ~40 years of distributed systems research becomes applicable to
|
||||
blockchain!
|
||||
|
||||
> Perhaps the most striking difference between algorithms obtained by our
|
||||
> method and ones based upon timeout is that using timeout produces a
|
||||
> traditional distributed algorithm in which the processes operate
|
||||
> asynchronously, while our method produces a globally synchronous one in which
|
||||
> every process does the same thing at (approximately) the same time. Our
|
||||
> method seems to contradict the whole purpose of distributed processing, which
|
||||
> is to permit different processes to operate independently and perform
|
||||
> different functions. However, if a distributed system is really a single
|
||||
> system, then the processes must be synchronized in some way. Conceptually,
|
||||
> the easiest way to synchronize processes is to get them all to do the same
|
||||
> thing at the same time. Therefore, our method is used to implement a kernel
|
||||
> that performs the necessary synchronization--for example, making sure that
|
||||
> two different processes do not try to modify a file at the same time.
|
||||
> Processes might spend only a small fraction of their time executing the
|
||||
> synchronizing kernel; the rest of the time, they can operate
|
||||
> independently--e.g., accessing different files. This is an approach we have
|
||||
> advocated even when fault-tolerance is not required. The method's basic
|
||||
> simplicity makes it easier to understand the precise properties of a system,
|
||||
> which is crucial if one is to know just how fault-tolerant the system is.
|
||||
> [\[L.Lamport
|
||||
> (1984)\]](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.71.1078)
|
||||
|
||||
|
||||
33
src/terminology.md
Normal file
33
src/terminology.md
Normal file
@@ -0,0 +1,33 @@
|
||||
## Appendix A: Terminology
|
||||
|
||||
### Teminology Currently in Use
|
||||
|
||||
The following list contains words commonly used throughout the Solana architecture.
|
||||
|
||||
* account - a persistent file addressed by pubkey and with tokens tracking its lifetime
|
||||
* cluster - a set of fullnodes maintaining a single ledger
|
||||
* finality - the wallclock duration between a leader creating a tick entry and recoginizing
|
||||
a supermajority of validator votes with a ledger interpretation that matches the leader's
|
||||
* fullnode - a full participant in the cluster - either a leader or validator node
|
||||
* 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
|
||||
* tick - a ledger entry that estimates wallclock duration
|
||||
* tick height - the Nth tick in the ledger
|
||||
* tps - transactions per second
|
||||
* transaction - one or more instructions signed by the client and executed atomically
|
||||
* transactions entry - a set of transactions that may be executed in parallel
|
||||
|
||||
|
||||
### Terminology Reserved for Future Use
|
||||
|
||||
The following keywords do not have any functionality but are reserved by Solana
|
||||
for potential future use.
|
||||
|
||||
* mips - millions of instructions per second
|
||||
* public key - We currently use `pubkey`
|
||||
* secret key - Users currently only use `keypair`
|
||||
5
src/tpu.md
Normal file
5
src/tpu.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# The Tpu
|
||||
|
||||
<img alt="Tpu block diagram" src="img/tpu.svg" class="center"/>
|
||||
|
||||
The Transaction Processing Unit
|
||||
5
src/tvu.md
Normal file
5
src/tvu.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Tvu
|
||||
|
||||
<img alt="Tvu block diagram" src="img/tvu.svg" class="center"/>
|
||||
|
||||
The Transaction Validation Unit
|
||||
18
src/vdf.md
Normal file
18
src/vdf.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Introduction to VDFs
|
||||
|
||||
A Verifiable Delay Function is conceptually a water clock where its water marks
|
||||
can be recorded and later verified that the water most certainly passed
|
||||
through. Anatoly describes the water clock analogy in detail here:
|
||||
|
||||
[water clock analogy](https://medium.com/solana-labs/proof-of-history-explained-by-a-water-clock-e682183417b8)
|
||||
|
||||
The same technique has been used in Bitcoin since day one. The Bitcoin feature
|
||||
is called nLocktime and it can be used to postdate transactions using block
|
||||
height instead of a timestamp. As a Bitcoin client, you'd use block height
|
||||
instead of a timestamp if you don't trust the network. Block height turns out
|
||||
to be an instance of what's being called a Verifiable Delay Function in
|
||||
cryptography circles. It's a cryptographically secure way to say time has
|
||||
passed. In Solana, we use a far more granular verifiable delay function, a SHA
|
||||
256 hash chain, to checkpoint the ledger and coordinate consensus. With it, we
|
||||
implement Optimistic Concurrency Control and are now well en route towards that
|
||||
theoretical limit of 710,000 transactions per second.
|
||||
Reference in New Issue
Block a user