Stub out architecture book (#1674)
* Stub out architecture documentation * Add book HTML generation and book tests to CI * Add heading * Better table of contents * Reference existing documentation Move ASCII art from code comments into rendered SVG * Attempt to fix CI * Add lamport docs And truncate lines to 80 characters * Fix links And reference shorter, newer description of PoH. * Replace ASCII art with SVG * Streamline for Pillbox * Update path before optional install * Use $CARGO_HOME instead of $HOME * Delete code Attempt to describe all data structures without code. * Boot RPU from docs, add JsonRpcService Also, use Rust naming conventions in the block diagrams to minimize the jump from docs to code. * Latest code uses tick_height * Rename bob/ folder to art/ A home for any ASCII art * Import JSON RPC API * More mdbook docs * Add Ncp * Cleanup links * Move pipelining description into fullnode description * Move high-level transaction docs into top-level doc * Delete unused files
This commit is contained in:
parent
d7ea66b6a1
commit
8be7c13d2d
|
@ -1,5 +1,6 @@
|
||||||
Cargo.lock
|
Cargo.lock
|
||||||
/target/
|
/target/
|
||||||
|
/doc/book/
|
||||||
|
|
||||||
**/*.rs.bk
|
**/*.rs.bk
|
||||||
.cargo
|
.cargo
|
||||||
|
|
|
@ -11,6 +11,18 @@ _() {
|
||||||
"$@"
|
"$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
maybe_install() {
|
||||||
|
for cmd in "$@"; do
|
||||||
|
set +e
|
||||||
|
"$cmd" --help > /dev/null 2>&1
|
||||||
|
declare exitcode=$?
|
||||||
|
set -e
|
||||||
|
if [[ $exitcode -ne 0 ]]; then
|
||||||
|
_ cargo install "$cmd"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
_ cargo fmt -- --check
|
_ cargo fmt -- --check
|
||||||
_ cargo build --verbose
|
_ cargo build --verbose
|
||||||
_ cargo test --verbose --lib
|
_ cargo test --verbose --lib
|
||||||
|
@ -33,6 +45,14 @@ for program in programs/native/*; do
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Build the HTML
|
||||||
|
export PATH=$CARGO_HOME/bin:$PATH
|
||||||
|
maybe_install mdbook
|
||||||
|
_ cd doc
|
||||||
|
_ mdbook test
|
||||||
|
_ mdbook build
|
||||||
|
_ cd -
|
||||||
|
|
||||||
echo --- ci/localnet-sanity.sh
|
echo --- ci/localnet-sanity.sh
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
## Building the Solana book
|
||||||
|
|
||||||
|
Install mdbook:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo install mdbook
|
||||||
|
```
|
||||||
|
|
||||||
|
Run any Rust tests in the markdown:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mdbook test
|
||||||
|
```
|
||||||
|
|
||||||
|
Render markdown as HTML:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mdbook build
|
||||||
|
```
|
||||||
|
|
||||||
|
Render and view the book:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mdbook build --open
|
||||||
|
```
|
|
@ -0,0 +1,46 @@
|
||||||
|
.---------------------.
|
||||||
|
| Leader |
|
||||||
|
| |
|
||||||
|
.--------. | .----------------. |
|
||||||
|
| |---->| | |
|
||||||
|
| Client | | | JsonRpcService | |
|
||||||
|
| |<----| | |
|
||||||
|
`----+---` | `----------------` |
|
||||||
|
| | ^ |
|
||||||
|
| | | |
|
||||||
|
| | .--+---. |
|
||||||
|
| | | Bank | |
|
||||||
|
| | `------` |
|
||||||
|
| | ^ |
|
||||||
|
| | | | .------------.
|
||||||
|
| | .--+--. .-----. | | |
|
||||||
|
`-------->| Tpu +-->| Ncp +------>| Validators |
|
||||||
|
| `-----` `-----` | | |
|
||||||
|
| | `------------`
|
||||||
|
`---------------------`
|
||||||
|
|
||||||
|
.-------------------------------.
|
||||||
|
| Validator |
|
||||||
|
| |
|
||||||
|
.--------. | .----------------. |
|
||||||
|
| |-------------->| | |
|
||||||
|
| Client | | | JsonRpcService | |
|
||||||
|
| |<--------------| | |
|
||||||
|
`--------` | `----------------` |
|
||||||
|
| ^ |
|
||||||
|
| | |
|
||||||
|
| .--+---. |
|
||||||
|
| | Bank | |
|
||||||
|
| `------` |
|
||||||
|
| ^ |
|
||||||
|
.--------. | | | .------------.
|
||||||
|
| | | .--+--. | | |
|
||||||
|
| Leader |<------------->| Tvu +<--------------->| |
|
||||||
|
| | | `-----` | | Validators |
|
||||||
|
| | | ^ | | |
|
||||||
|
| | | | | | |
|
||||||
|
| | | .--+--. | | |
|
||||||
|
| |<------------->| Ncp +<--------------->| |
|
||||||
|
| | | `-----` | | |
|
||||||
|
`--------` | | `------------`
|
||||||
|
`-------------------------------`
|
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
+-----------+ +-------------+ +--------------+ +--------------------+
|
||||||
|
| sigverify |--->| lock memory |--->| validate fee |--->| allocate accounts |--->
|
||||||
|
+-----------+ +-------------+ +--------------+ +--------------------+
|
||||||
|
|
||||||
|
+------------+ +---------+ +-=------------+ +--------------+
|
||||||
|
--->| load data |--->| execute |--->| commit data |-->|unlock memory |
|
||||||
|
+------------+ +---------+ +--------------+ +--------------+
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
+---------------------+ +---------------------+
|
||||||
|
| | | |
|
||||||
|
| +------------+ | | +------------+ |
|
||||||
|
| | | | | | | |
|
||||||
|
| | frontend | | | | verifier | |
|
||||||
|
| | | | | | | |
|
||||||
|
| +-----+------+ | | +-----+------+ |
|
||||||
|
| | | | | |
|
||||||
|
| | | | | |
|
||||||
|
| +-----+------+ | | +-----+------+ |
|
||||||
|
| | | | | | | |
|
||||||
|
| | llvm | | | | loader | |
|
||||||
|
| | | +------>+ | | |
|
||||||
|
| +-----+------+ | | +-----+------+ |
|
||||||
|
| | | | | |
|
||||||
|
| | | | | |
|
||||||
|
| +-----+------+ | | +-----+------+ |
|
||||||
|
| | | | | | | |
|
||||||
|
| | ELF | | | | runtime | |
|
||||||
|
| | | | | | | |
|
||||||
|
| +------------+ | | +------------+ |
|
||||||
|
| | | |
|
||||||
|
| client | | solana |
|
||||||
|
+---------------------+ +---------------------+
|
|
@ -0,0 +1,21 @@
|
||||||
|
.----------------------------------------------------.
|
||||||
|
| Tpu .------------. |
|
||||||
|
| | PohService | |
|
||||||
|
| `-------+----` |
|
||||||
|
| ^ | |
|
||||||
|
| | v |
|
||||||
|
| .-------. .-----------. .-+-------. .-------. |
|
||||||
|
.---------. | | Fetch | | SigVerify | | Banking | | Write | | .------------.
|
||||||
|
| Clients |--->| Stage |->| Stage |->| Stage |-->| Stage +--->| Validators |
|
||||||
|
`---------` | | | | | | | | | | `------------`
|
||||||
|
| `-------` `-----------` `----+----` `---+---` |
|
||||||
|
| | | |
|
||||||
|
| | | |
|
||||||
|
| | | |
|
||||||
|
| | | |
|
||||||
|
`---------------------------------|------------|-----`
|
||||||
|
| |
|
||||||
|
v v
|
||||||
|
.------. .--------.
|
||||||
|
| Bank | | Ledger |
|
||||||
|
`------` `--------`
|
|
@ -0,0 +1,23 @@
|
||||||
|
.------------------------------------------------.
|
||||||
|
| |
|
||||||
|
| .------------------------------------+------------.
|
||||||
|
| | Tvu | |
|
||||||
|
| | | |
|
||||||
|
| | | | .------------.
|
||||||
|
| | .----------------+-------------->| Validators |
|
||||||
|
v | .-------. | | | `------------`
|
||||||
|
.----+---. | | | .----+-------. .----+---------. |
|
||||||
|
| Leader |--------->| Blob | | Retransmit | | Replicate | |
|
||||||
|
`--------` | | Fetch |-->| Stage |-->| Stage / | |
|
||||||
|
.------------. | | Stage | | | | Vote Stage | |
|
||||||
|
| Validators |----->| | `------------` `----+---------` |
|
||||||
|
`------------` | `-------` | |
|
||||||
|
| | |
|
||||||
|
| | |
|
||||||
|
| | |
|
||||||
|
`------------------------------------|------------`
|
||||||
|
|
|
||||||
|
v
|
||||||
|
.------.
|
||||||
|
| Bank |
|
||||||
|
`------`
|
|
@ -0,0 +1,27 @@
|
||||||
|
# Solana Architecture
|
||||||
|
|
||||||
|
- [Introduction](ch00-00-introduction.md)
|
||||||
|
|
||||||
|
- [Synchronization](ch01-00-synchronization.md)
|
||||||
|
- [Introduction to VDFs](ch01-01-vdf.md)
|
||||||
|
- [Proof of History](ch01-02-poh.md)
|
||||||
|
|
||||||
|
- [Fullnode](ch02-00-fullnode.md)
|
||||||
|
- [Tpu](ch02-02-tpu.md)
|
||||||
|
- [Tvu](ch02-03-tvu.md)
|
||||||
|
- [Ncp](ch02-04-ncp.md)
|
||||||
|
- [JsonRpcService](ch02-05-jsonrpc-service.md)
|
||||||
|
|
||||||
|
- [Avalanche replication](ch03-00-avalanche.md)
|
||||||
|
- [Proof of replication](ch03-01-porep.md)
|
||||||
|
|
||||||
|
- [On-chain programs](ch04-00-scaling-programs.md)
|
||||||
|
- [The Runtime](ch04-01-runtime.md)
|
||||||
|
- [Ledger format](ch04-02-ledger.md)
|
||||||
|
|
||||||
|
## Appendix
|
||||||
|
|
||||||
|
- [Appendix](appendix-00.md)
|
||||||
|
- [Terminology](appendix-01-terminology.md)
|
||||||
|
- [JSON RPC API](appendix-02-jsonrpc-api.md)
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
# Appendix
|
||||||
|
|
||||||
|
The following sections contain reference material you may find useful in your
|
||||||
|
Solana journey.
|
|
@ -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`
|
|
@ -1,4 +1,4 @@
|
||||||
Solana JSON RPC API
|
JSON RPC API
|
||||||
===
|
===
|
||||||
|
|
||||||
Solana nodes accept HTTP requests using the [JSON-RPC 2.0](https://www.jsonrpc.org/specification) specification.
|
Solana nodes accept HTTP requests using the [JSON-RPC 2.0](https://www.jsonrpc.org/specification) specification.
|
|
@ -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.
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -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.
|
|
@ -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.
|
|
@ -0,0 +1,7 @@
|
||||||
|
# Fullnode
|
||||||
|
|
||||||
|
<img alt="Fullnode block diagrams" src="img/fullnode.svg" class="center"/>
|
||||||
|
|
||||||
|
## Pipelining
|
||||||
|
|
||||||
|
## Pipeline Stages
|
|
@ -0,0 +1,5 @@
|
||||||
|
# The Tpu
|
||||||
|
|
||||||
|
<img alt="Tpu block diagram" src="img/tpu.svg" class="center"/>
|
||||||
|
|
||||||
|
The Transaction Processing Unit
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Tvu
|
||||||
|
|
||||||
|
<img alt="Tvu block diagram" src="img/tvu.svg" class="center"/>
|
||||||
|
|
||||||
|
The Transaction Validation Unit
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Ncp
|
||||||
|
|
||||||
|
The Network Control Plane implements a gossip network between all nodes on in the cluster.
|
|
@ -0,0 +1 @@
|
||||||
|
# JsonRpcService
|
|
@ -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)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
# Proof of replication
|
|
@ -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.
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
# Ledger format
|
|
@ -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 |
|
@ -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 |
|
@ -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 |
|
@ -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 |
|
@ -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 |
|
@ -185,55 +185,6 @@ impl Fullnode {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a fullnode instance acting as a leader or validator.
|
/// Create a fullnode instance acting as a leader or validator.
|
||||||
///
|
|
||||||
/// ```text
|
|
||||||
/// .---------------------.
|
|
||||||
/// | Leader |
|
|
||||||
/// | |
|
|
||||||
/// .--------. | .-----. |
|
|
||||||
/// | |---->| | |
|
|
||||||
/// | Client | | | RPU | |
|
|
||||||
/// | |<----| | |
|
|
||||||
/// `----+---` | `-----` |
|
|
||||||
/// | | ^ |
|
|
||||||
/// | | | |
|
|
||||||
/// | | .--+---. |
|
|
||||||
/// | | | Bank | |
|
|
||||||
/// | | `------` |
|
|
||||||
/// | | ^ |
|
|
||||||
/// | | | | .------------.
|
|
||||||
/// | | .--+--. .-----. | | |
|
|
||||||
/// `-------->| TPU +-->| NCP +------>| Validators |
|
|
||||||
/// | `-----` `-----` | | |
|
|
||||||
/// | | `------------`
|
|
||||||
/// `---------------------`
|
|
||||||
///
|
|
||||||
/// .-------------------------------.
|
|
||||||
/// | Validator |
|
|
||||||
/// | |
|
|
||||||
/// .--------. | .-----. |
|
|
||||||
/// | |-------------->| | |
|
|
||||||
/// | Client | | | RPU | |
|
|
||||||
/// | |<--------------| | |
|
|
||||||
/// `--------` | `-----` |
|
|
||||||
/// | ^ |
|
|
||||||
/// | | |
|
|
||||||
/// | .--+---. |
|
|
||||||
/// | | Bank | |
|
|
||||||
/// | `------` |
|
|
||||||
/// | ^ |
|
|
||||||
/// .--------. | | | .------------.
|
|
||||||
/// | | | .--+--. | | |
|
|
||||||
/// | Leader |<------------->| TVU +<--------------->| |
|
|
||||||
/// | | | `-----` | | Validators |
|
|
||||||
/// | | | ^ | | |
|
|
||||||
/// | | | | | | |
|
|
||||||
/// | | | .--+--. | | |
|
|
||||||
/// | |<------------->| NCP +<--------------->| |
|
|
||||||
/// | | | `-----` | | |
|
|
||||||
/// `--------` | | `------------`
|
|
||||||
/// `-------------------------------`
|
|
||||||
/// ```
|
|
||||||
#[cfg_attr(feature = "cargo-clippy", allow(too_many_arguments))]
|
#[cfg_attr(feature = "cargo-clippy", allow(too_many_arguments))]
|
||||||
pub fn new_with_bank(
|
pub fn new_with_bank(
|
||||||
keypair: Arc<Keypair>,
|
keypair: Arc<Keypair>,
|
||||||
|
|
24
src/tpu.rs
24
src/tpu.rs
|
@ -1,29 +1,5 @@
|
||||||
//! The `tpu` module implements the Transaction Processing Unit, a
|
//! The `tpu` module implements the Transaction Processing Unit, a
|
||||||
//! 5-stage transaction processing pipeline in software.
|
//! 5-stage transaction processing pipeline in software.
|
||||||
//!
|
|
||||||
//! ```text
|
|
||||||
//! .----------------------------------------------------.
|
|
||||||
//! | TPU .-------------. |
|
|
||||||
//! | | PoH Service | |
|
|
||||||
//! | `-------+-----` |
|
|
||||||
//! | ^ | |
|
|
||||||
//! | | v |
|
|
||||||
//! | .-------. .-----------. .-+-------. .-------. |
|
|
||||||
//! .---------. | | Fetch | | SigVerify | | Banking | | Write | | .------------.
|
|
||||||
//! | Clients |--->| Stage |->| Stage |->| Stage |-->| Stage +--->| Validators |
|
|
||||||
//! `---------` | | | | | | | | | | `------------`
|
|
||||||
//! | `-------` `-----------` `----+----` `---+---` |
|
|
||||||
//! | | | |
|
|
||||||
//! | | | |
|
|
||||||
//! | | | |
|
|
||||||
//! | | | |
|
|
||||||
//! `---------------------------------|------------|-----`
|
|
||||||
//! | |
|
|
||||||
//! v v
|
|
||||||
//! .------. .--------.
|
|
||||||
//! | Bank | | Ledger |
|
|
||||||
//! `------` `--------`
|
|
||||||
//! ```
|
|
||||||
|
|
||||||
use bank::Bank;
|
use bank::Bank;
|
||||||
use banking_stage::{BankingStage, BankingStageReturnType};
|
use banking_stage::{BankingStage, BankingStageReturnType};
|
||||||
|
|
26
src/tvu.rs
26
src/tvu.rs
|
@ -1,32 +1,6 @@
|
||||||
//! The `tvu` module implements the Transaction Validation Unit, a
|
//! The `tvu` module implements the Transaction Validation Unit, a
|
||||||
//! 3-stage transaction validation pipeline in software.
|
//! 3-stage transaction validation pipeline in software.
|
||||||
//!
|
//!
|
||||||
//! ```text
|
|
||||||
//! .------------------------------------------------.
|
|
||||||
//! | |
|
|
||||||
//! | .------------------------------------+------------.
|
|
||||||
//! | | TVU | |
|
|
||||||
//! | | | |
|
|
||||||
//! | | | | .------------.
|
|
||||||
//! | | .----------------+-------------->| Validators |
|
|
||||||
//! v | .-------. | | | `------------`
|
|
||||||
//! .----+---. | | | .----+-------. .----+---------. |
|
|
||||||
//! | Leader |--------->| Blob | | Retransmit | | Replicate | |
|
|
||||||
//! `--------` | | Fetch |-->| Stage |-->| Stage / | |
|
|
||||||
//! .------------. | | Stage | | | | Vote Stage | |
|
|
||||||
//! | Validators |----->| | `------------` `----+---------` |
|
|
||||||
//! `------------` | `-------` | |
|
|
||||||
//! | | |
|
|
||||||
//! | | |
|
|
||||||
//! | | |
|
|
||||||
//! `------------------------------------|------------`
|
|
||||||
//! |
|
|
||||||
//! v
|
|
||||||
//! .------.
|
|
||||||
//! | Bank |
|
|
||||||
//! `------`
|
|
||||||
//! ```
|
|
||||||
//!
|
|
||||||
//! 1. Fetch Stage
|
//! 1. Fetch Stage
|
||||||
//! - Incoming blobs are picked up from the replicate socket and repair socket.
|
//! - Incoming blobs are picked up from the replicate socket and repair socket.
|
||||||
//! 2. SharedWindow Stage
|
//! 2. SharedWindow Stage
|
||||||
|
|
Loading…
Reference in New Issue