Compare commits

...

1624 Commits

Author SHA1 Message Date
c54b23b9d5 Additional tests for should_retransmit_and_persist (#6062) (#6070)
automerge
2019-09-24 17:48:39 -07:00
04aaa714e6 Revert back to reqwest, using rustls feature (bp #6041) (#6064)
automerge
2019-09-24 15:35:07 -07:00
2cc0ab2c5f Tweak Bank Slot Distance graph 2019-09-24 14:52:50 -07:00
aac0d7f2f5 Window service is filtering out coding shreds (#6052) (#6059)
automerge
2019-09-24 13:48:13 -07:00
9fd29b0575 Fix vote metrics (#6038) (#6040)
automerge
2019-09-24 13:20:27 -07:00
6abe3c2804 Fix race between observing tick height being set to last tick and blockhash being observed on a bank (#6013) (#6056)
automerge
2019-09-24 12:20:46 -07:00
01ce5beb19 Support primordial accounts with no data (#6053) (#6055)
automerge
2019-09-24 11:52:57 -07:00
2bd72318f6 Remove dead code from cluster_info (#6051) (#6054)
automerge
2019-09-24 11:29:52 -07:00
68a9224604 Fix race between observing tick height being set to last tick and blockhash being observed on a bank (#6013) 2019-09-24 11:16:24 -07:00
181cad233c rename balance (#5984) 2019-09-24 11:15:15 -07:00
0b66529f11 Fix BPF program static linking (#5992) (#6049)
automerge
2019-09-24 09:40:33 -07:00
e20e4180a9 Flip order of arg to ensure -t sticks 2019-09-23 22:21:12 -07:00
de4309a905 Avoid hardlinking as that confuses tar (#6042) (#6045)
(cherry picked from commit 7fa809c16d)
2019-09-23 21:40:09 -07:00
d5248c936f Skip considering banks older than the latest vote slot (#6037) (#6043)
automerge
2019-09-23 20:44:47 -07:00
40bc37266d Don't recover coding shreds (#6034) (#6039)
automerge
2019-09-23 18:35:50 -07:00
1819f263f1 ' => " (#6035) (#6036)
automerge
2019-09-23 17:31:05 -07:00
24a055e490 Upgrade to ReedSolomon 4.0 release (#6026) (#6030)
automerge
2019-09-23 15:29:52 -07:00
dfbd77f18d Fix really old banks triggering log spam (#6025) (#6029)
automerge
2019-09-23 15:27:38 -07:00
7c5557d69b Dump tar stdout/err on failure for better debug (#6024) (#6027)
automerge
2019-09-23 13:57:39 -07:00
d180eedd17 Remove the _/deps symlink, just copy instead (#6020) (#6021)
automerge
2019-09-23 09:50:07 -07:00
3b274ca8db GitBook: [v0.19] 79 pages and 12 assets modified 2019-09-23 03:38:36 +00:00
aacead62c0 Move images from img/ to .gitbook/assets 2019-09-21 22:26:45 -07:00
ae5a6a06bb Revert "GitBook: [master] 156 pages and 8 assets modified"
This reverts commit 60320e6b6e.
2019-09-21 22:24:11 -07:00
60320e6b6e GitBook: [master] 156 pages and 8 assets modified 2019-09-22 04:31:10 +00:00
169ece8226 Rename client.sh to bench-tps.sh (#6014) 2019-09-21 21:12:10 -07:00
5020a4aa6b Add required port to --entrypoint arg in docs. (#6015) 2019-09-21 21:12:01 -07:00
4c49566a89 Enable nvidia persistence mode on instance reboots 2019-09-21 10:45:20 -07:00
ab60c578b9 Unconditionally redeploy the edge testnet hourly to better exercise snapshot restarts 2019-09-21 09:28:59 -07:00
050021cf77 Add SVGs for Gitbook (#6009) 2019-09-21 07:59:36 -07:00
8240d1fe0a Confidence implementation (#5993)
* Change confidence parameters

* Add status_cache_ancestors to get all relevant ancestors of a bank including roots from status cache

* Fix and add tests

* Clippy
2019-09-20 19:38:56 -07:00
fd6e7020eb Fix bank overlapping another bank's broadcast (#6012) 2019-09-20 19:37:40 -07:00
261b869e27 Update book links to gitbook 2019-09-20 16:06:36 -07:00
d6d5b4429c Remove \r 2019-09-20 16:04:55 -07:00
67d7375ab9 Add more descriptive error on a stuck blockhash (#6010)
automerge
2019-09-20 15:50:43 -07:00
020d34187c Fetch logs on redeploy failure 2019-09-20 15:45:47 -07:00
5486e4c364 Inline BPF log functions (#6007) 2019-09-20 15:40:41 -07:00
33e2af341a Add deps/ symlink so solana-validator-cuda can find native programs 2019-09-20 15:26:49 -07:00
cca08c3923 Sort terminology in book (#6008) 2019-09-20 15:16:35 -07:00
bb9f07183b Only fetch logs on sanity failure 2019-09-20 14:47:56 -07:00
22e807c212 Bump jsonrpc-ws-server from 13.1.0 to 13.2.0 (#5976)
Bumps [jsonrpc-ws-server](https://github.com/paritytech/jsonrpc) from 13.1.0 to 13.2.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v13.1.0...v13.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-20 15:16:59 -06:00
a60a3efc1a Revert "require stake, vote and executable accounts to be rent exempt (#5928)" (#6005)
This reverts commit 11e6197a83.
2019-09-20 14:10:39 -07:00
558a362c46 Replace blob with shred in book (#6004) 2019-09-20 13:27:09 -07:00
19ae556857 hash account state on store (#5573) 2019-09-20 13:21:12 -07:00
5dd3a07a23 Avoid changing the current working directory 2019-09-20 12:46:29 -07:00
58a6c9a5f0 Adjust path to perf-libs 2019-09-20 12:27:09 -07:00
7053978861 Fix cp src 2019-09-20 12:15:05 -07:00
3d44cffcda Beautify metrics datapoint logging (#5998) 2019-09-20 12:00:43 -07:00
4b1de02bbb solana-validator-cuda wrapper is now net.sh compatible 2019-09-20 11:37:45 -07:00
078a3aeccd Properly build solana-validator-cuda (#5999) 2019-09-20 11:36:57 -07:00
abaccd6882 Pull in Rust-BPF v0.1.6 (#5997)
automerge
2019-09-20 11:21:01 -07:00
3fe54206aa Btc spv - variable int improvements (#5990)
* var_int tests

* variable int fix

* moved tests
2019-09-20 10:57:57 -06:00
debee350f8 Remove whitespace 2019-09-20 08:20:19 -07:00
890be36fd3 Fix check 2019-09-20 08:19:57 -07:00
c9be9acd14 log snapshot time (#5996) 2019-09-20 08:03:00 -07:00
8eab673b1c Bump serde from 1.0.100 to 1.0.101 (#5994)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.100 to 1.0.101.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.100...v1.0.101)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-20 07:05:16 -06:00
e5806d07a6 Bump jsonrpc-pubsub from 13.1.0 to 13.2.0 (#5995)
Bumps [jsonrpc-pubsub](https://github.com/paritytech/jsonrpc) from 13.1.0 to 13.2.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v13.1.0...v13.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-20 07:04:14 -06:00
11e6197a83 require stake, vote and executable accounts to be rent exempt (#5928)
* require vote account to be exempt

* make stake account rent exempt

* add rent exempted system instruction

* use rent exemption instruction in vote and stake api

* use rent exempted account while creating executable account

* updating chacha golden hash as instruction data has changed

* rent will be initialized for genesis bank too
2019-09-20 16:52:17 +05:30
accd49f2e4 Remove unneeded --all 2019-09-19 23:30:08 -07:00
54cf9aaa1e Preserve public network flag when testnet-edge is restarted 2019-09-19 23:02:47 -07:00
8bbc8343ff Place verison.yml in the right location 2019-09-19 22:41:27 -07:00
a4e72ac037 Avoid airdropping to a validator that's already configured 2019-09-19 22:33:41 -07:00
1d0be265d9 Add explicit validator-cuda crate (#5985) 2019-09-19 20:50:34 -07:00
d379786c90 Fix bind errors (#5986)
* Add ability to bind to a common tcp/udp port

* Extend port range for local-net sanity and fix validator executable
2019-09-19 17:16:22 -07:00
ca9d4e34df Broadcast stage tuning (#5989) 2019-09-19 16:29:52 -07:00
6657312f44 dyn for runtime benches (#5983) 2019-09-19 14:21:09 -07:00
2636a9c9f1 Add script for managing colo resourse ala gce.sh (#5854)
automerge
2019-09-19 14:08:22 -07:00
05ada97d00 Clean up log folding 2019-09-19 13:44:59 -07:00
4c54245969 net/gce.sh: Sync cloud_CreateInstances docs and usage (#5982)
automerge
2019-09-19 13:28:25 -07:00
5157bdd8ce Bump jsonrpc-http-server from 13.1.0 to 13.2.0 (#5975)
Bumps [jsonrpc-http-server](https://github.com/paritytech/jsonrpc) from 13.1.0 to 13.2.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v13.1.0...v13.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-19 13:10:54 -06:00
8fa28f965c clear config (#5980) 2019-09-19 12:10:29 -07:00
51b3451e20 feat: use redis version 5+ via ppa:chris-lea (#5981) 2019-09-19 12:04:06 -07:00
fee5c6c057 testnet-edge/testnet-beta now update while preserving the ledger (#5979)
* Check if an update is current before deploying it again

* Add (new) update command to deploy testnet updates

* Add --deploy-if-newer flag to permit conditional net updates
2019-09-19 12:03:47 -07:00
9917ece826 Kill the old blockexplorer harder 2019-09-19 10:37:27 -07:00
8d94972d88 Publish version information as stand-alone file for easy access 2019-09-19 10:26:51 -07:00
5cbd1190b2 transaction batch (#5962)
* transaction batch

* fixup
2019-09-19 10:06:08 -07:00
1a71804ef2 Bump bs58 from 0.2.5 to 0.3.0 (#5974)
Bumps [bs58](https://github.com/mycorrhiza/bs58-rs) from 0.2.5 to 0.3.0.
- [Release notes](https://github.com/mycorrhiza/bs58-rs/releases)
- [Commits](https://github.com/mycorrhiza/bs58-rs/compare/0.2.5...0.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-19 10:39:37 -06:00
1650519962 SOLANA_CUDA=1 works again (#5968)
* SOLANA_CUDA=1 works again

* Minor comment reformat

* Set SOLANA_CUDA=1 explictly
2019-09-19 08:52:00 -07:00
355564e486 net/net.sh start --skip-setup ... now works again (#5977) 2019-09-19 08:31:22 -07:00
1e3543e953 Ignore tests (#5972) 2019-09-18 23:57:50 -07:00
e83f6332bf Bump serde_derive from 1.0.100 to 1.0.101 (#5945)
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.100 to 1.0.101.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.100...v1.0.101)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-18 21:29:40 -07:00
0dbf7995b5 Remove unnecessary serialize of shred data (#5967)
* Remove unnecessary serialize of shred data

* remove obsolete code

* fix golden hash
2019-09-18 20:08:27 -07:00
0d16db2d1b Remove bloat due to test symbols (#5965) 2019-09-18 19:54:10 -07:00
10565277d6 btc-spv transaction parsing (#5858)
* Transaction and input parsing/decoding + utils

* Transaction input & output parsing

* public struct members, tx parsing test

* format and clippy fixes

* update block data/test material fetching utils

* update tx parsing tests

* format changes

* rename for consistency
2019-09-18 20:30:27 -06:00
e0858cfe06 Add parallel shred signing to shredder (#5964) 2019-09-18 18:00:07 -07:00
48d754220b Add verifying snapshots book entry (#5885) 2019-09-18 17:19:19 -07:00
958cbe688b Dump debug version of BPF shared object (#5937) 2019-09-18 16:34:22 -07:00
783e8672e7 Removed Shred enum (#5963)
* Remove shred enum and it's references

* rename ShredInfo to Shred

* clippy
2019-09-18 16:24:30 -07:00
d93b552e8c move cluster economics to implemented (#5953) 2019-09-18 16:17:42 -07:00
365fe70f77 Delete dead code (#5948) 2019-09-18 16:09:10 -06:00
6c4e656795 Remove obsoleted code from shred (#5954)
* Remove obsoleted code from shred

* fix broken test
2019-09-18 13:56:44 -07:00
86213d38fe Release builds for local cluster tests (#5891)
* Release builds for test

* Remove setting thread count in local cluster

* Increase timeout

* Move local cluster to separate job

* Extract out local cluster test from bench-tps

* Make local cluster inaccessible from outside crate

* Update test-stable.sh to exclude local_cluster in stable, include it in local-cluster CI job

* Move bench-exchange to local cluster

* Remove local cluster from coverage
2019-09-18 13:10:50 -07:00
b757294864 Add minor performance bump to shredding (#5956) 2019-09-18 12:35:52 -07:00
8b99e6dfbe Narrow wildcard matching for solana tarball (#5950) 2019-09-18 12:28:13 -07:00
0d4a2c5eb0 simplify poh recorder => broadcast channel (#5940)
* simplify poh recorder broadcast channel

* fixup

* fixup
2019-09-18 12:16:22 -07:00
64f23ab26a Remove old accepted design proposals (#5951)
* remove passive-stake-delegation-and-rewards from summary

* Delete passive-stake-delegation-and-rewards.md
2019-09-18 12:01:16 -07:00
31a276b628 Bump jsonrpc-core from 13.1.0 to 13.2.0 (#5894)
Bumps [jsonrpc-core](https://github.com/paritytech/jsonrpc) from 13.1.0 to 13.2.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v13.1.0...v13.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-18 11:44:47 -06:00
742562fc2e Set maintenance policy to terminate and restart for GCE (#5935) 2019-09-18 10:38:38 -07:00
ce65604154 Rewrite wallet sanity test to use the ping command (#5946)
automerge
2019-09-18 10:03:54 -07:00
75c0a268e0 Bump jsonrpc-derive from 13.1.0 to 13.2.0 (#5893)
Bumps [jsonrpc-derive](https://github.com/paritytech/jsonrpc) from 13.1.0 to 13.2.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v13.1.0...v13.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-18 10:48:37 -06:00
badcb8b0e3 Clarify runtime vs program rules (#5934)
* Clarify runtime vs program rules

And define "smart contract"

* Apply review feedback

* Rename secret key to private key

* Rename pubkey to public key in book

"pubkey" is a great shorthand in code, but it's not common in the
industry or something we want to spend time explaining to users.
2019-09-18 10:47:50 -06:00
c48c9be913 Add solana-cli uptime subcommand (#5944)
automerge
2019-09-18 09:29:57 -07:00
92295dea4f Exit cleanly with error message when the user supplies a bad cluster entrypoint (#5947)
automerge
2019-09-18 08:44:22 -07:00
76223f5ae7 Print airdrop request in proper units (#5941)
* Make airdrop msg units consistent

* Make sol prints prettier
2019-09-17 23:59:35 -06:00
ea015ccbe8 Update Gitbook YAML to add summary 2019-09-17 20:50:15 -06:00
2f50d0e145 Refactor confidence from replay stage (#5938) 2019-09-17 19:43:40 -07:00
268beb3489 Revert "GitBook: [master] 82 pages and 4 assets modified"
This reverts commit 20d13f51a9.
2019-09-17 20:39:15 -06:00
20d13f51a9 GitBook: [master] 82 pages and 4 assets modified 2019-09-18 02:22:18 +00:00
ffdf36c65b remove grants from inflation (#5936) 2019-09-17 18:52:39 -07:00
ff608992ee Replace Shred usage with ShredInfo (#5939)
* Replace Shred usage with ShredInfo

* Fix tests

* fix clippy
2019-09-17 18:22:46 -07:00
7e31a67d81 Ignore release branches that exist only for gitbook 2019-09-17 15:31:13 -07:00
c0ec2ca27a Add gitbook configuration 2019-09-17 15:20:19 -07:00
a2595b44c6 test randomize with error (#5916)
* test randomize with error

* update magic numbers

* fixup

* fixup

* fixup

* no more blobs

* fixup
2019-09-17 15:11:29 -07:00
180f415736 Update release instructions (#5933) 2019-09-17 14:01:33 -07:00
6541d9fbb0 Bump hex from 0.3.2 to 0.4.0 (#5930)
Bumps [hex](https://github.com/KokaKiwi/rust-hex) from 0.3.2 to 0.4.0.
- [Release notes](https://github.com/KokaKiwi/rust-hex/releases)
- [Commits](https://github.com/KokaKiwi/rust-hex/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-17 14:04:28 -06:00
de4f564780 fix test name (#5932) 2019-09-18 01:14:44 +05:30
14cb6353c0 Change erasure ratio to 0.25 and increase data shreds to 16 (#5931)
* Change erasure ratio to 0.25 and increase data shreds to 16

* Fix case where no coding shreds are requested
2019-09-17 11:59:14 -07:00
9e680112e7 Exclude GitBook synchronization commits from CI (#5929) 2019-09-17 11:15:21 -07:00
c90595cba1 Cleanup nits (#5914) 2019-09-17 10:21:22 -07:00
de1636c792 Enable --limit-ledger-size on testnets (#5927)
automerge
2019-09-17 10:05:41 -07:00
e26f68fe62 Get transactions from LockedAccountsResults when possible (#5923) 2019-09-17 08:41:56 -07:00
39ba9cb489 fix broken link to rent description (#5925) 2019-09-17 07:21:57 -07:00
08d4570ce5 Bump sys-info from 0.5.7 to 0.5.8 for rayon-threadlimit (#5924) 2019-09-17 07:21:16 -07:00
084706c5ea Bump pretty-hex from 0.1.0 to 0.1.1 (#5926)
Bumps [pretty-hex](https://github.com/wolandr/pretty-hex) from 0.1.0 to 0.1.1.
- [Release notes](https://github.com/wolandr/pretty-hex/releases)
- [Commits](https://github.com/wolandr/pretty-hex/compare/v0.1.0...v0.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-17 07:20:39 -07:00
d63518a835 Rent tangential stuff (#5910)
* rename rent.rs to rent_calculator.rs

* add rent sysvar

* integrate rent_calculator with bank

* rent_calculator integration with genesis

* add test for rent sysvar
2019-09-17 17:12:55 +05:30
b31d334ef4 update economics section to provide detail on expected inflation parameters (#5615) 2019-09-17 10:39:23 +02:00
5c4c562a2d Update validator-stake.md (#5922)
* Update validator-stake.md

* Update validator-stake.md
2019-09-16 21:54:44 -07:00
f10438d530 Respect randomized transaction order when unlocking accounts (#5918) 2019-09-16 21:45:16 -07:00
7459eb15c3 A new data-structure in shreds for partial deserialization (#5915)
* A new datastructure in shreds for partial deserialization

* fix chacha golden hash

* fix clippy and address review comments
2019-09-16 20:28:54 -07:00
c44e7ce184 Leaders should not broadcast to replicators (#5917) 2019-09-16 17:56:34 -07:00
bd19fe5909 add custodian to stake (#5900)
* add custodian to stake

* nits
2019-09-16 17:47:42 -07:00
82615c703b Switch erasure to solana-reed-solomon-erasure (#5913)
* Switch to solana-reed-solomon-erasure

* Disable Rayon for solana-reed-solomon-erasure
2019-09-16 16:14:55 -07:00
bc2141fbe0 Bump ureq from 0.11.0 to 0.11.1 (#5905)
Bumps [ureq](https://github.com/algesten/ureq) from 0.11.0 to 0.11.1.
- [Release notes](https://github.com/algesten/ureq/releases)
- [Commits](https://github.com/algesten/ureq/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-16 16:51:45 -06:00
f5964b4f3c unable to reproduce linkage issue (#5912) 2019-09-16 14:35:58 -07:00
d5ba90d375 Don't verify blobs that are less than root in window service (#5901) 2019-09-16 13:13:53 -07:00
167adff22c Strip ELF files (#5898) 2019-09-16 11:11:33 -07:00
5f54573613 More shred related cleanup (#5909)
* More shred related cleanup

* fix uncle
2019-09-16 10:28:28 -07:00
2b43b117dc Demote vote-native datapoint from warn to info (#5911) 2019-09-16 10:12:55 -07:00
1aec9e38fa Restore default time range to now-5m 2019-09-16 08:45:27 -07:00
c1880e3f3e Reduce number of shreds per FEC block (#5908) 2019-09-15 10:37:12 -07:00
c490a50c91 Restore blocktree_error graph 2019-09-14 21:41:48 -07:00
ee791e2e3e Optimizations to shred writing and signing (#5890)
* Optimizations to shred writing and signing

* fix broken tests

* fixes
2019-09-14 21:05:54 -07:00
140d4ccf77 Add dead slot table to stablity section 2019-09-14 20:54:23 -07:00
ceacc42126 Call gpu init earlier to force compilation. (#5902) 2019-09-14 12:32:57 -07:00
a6479eb6e9 Data points are now logged according to their level, instead of always debug! (#5906)
Note that Counters remain at debug! to avoid excessive default logging
2019-09-14 08:52:09 -07:00
84c8a5bbec Add replay-stage-mark_dead_slot datapoint (#5907) 2019-09-14 08:50:53 -07:00
e1f4e8a84a Add solana-crate-features workaround to avoid cargo feature thrashing (#5904)
automerge
2019-09-13 23:46:21 -07:00
8135279335 Reduce serialize/deserialize in shred recovery (#5887) 2019-09-12 21:52:13 -07:00
5dceeec1ca Add authorize_staker functionality (#5880)
* Add authorized_staker functionality

* Generalize authorize names; implement for Lockup

* Fix authorize() usage and improve tests
2019-09-12 20:03:28 -06:00
8f5a1535af Add mnenomic keypair generation and recovery to cli (#5889)
* Add mnenomic keypair generation and recovery to cli

* Use password input to retrieve mnemonic phrase

* Direct users without keypair file to use solana-keygen
2019-09-12 18:37:29 -07:00
92a5979558 net/config/ is now shellcheck compliant (#5888)
automerge
2019-09-12 16:11:13 -07:00
8b64de0a3c Add restart-explorer script, to easily restart the network explorer on a testnet (#5886) 2019-09-12 15:12:10 -07:00
9c30e98df6 Fix cargo lock (#5881) 2019-09-12 12:07:06 -07:00
c1d788880d Limit Rayon threadpool threads (#5871) 2019-09-12 11:39:39 -07:00
385086359c Reduce serializations/deserializations of shreds (#5879) 2019-09-12 10:10:25 -07:00
176c7d8b13 Pull all the Rust BPF tests into a single workspace so they share dependencies (#5878) 2019-09-11 14:55:58 -07:00
a85604b2ba Bump sys-info from 0.5.7 to 0.5.8 (#5877)
Bumps [sys-info](https://github.com/FillZpp/sys-info-rs) from 0.5.7 to 0.5.8.
- [Release notes](https://github.com/FillZpp/sys-info-rs/releases)
- [Commits](https://github.com/FillZpp/sys-info-rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-11 10:53:23 -07:00
bf1ecc2441 Remove ledger verification, it's racy and essentially globaly disabled already (#5867) 2019-09-11 10:53:10 -07:00
92d2452f33 redelegate stake (#5868)
* redelegate stake

* boil this down to just delegate(), which can be offered any number of times
2019-09-11 09:48:29 -07:00
1853771930 Add support for SDK sysvar types (#5876) 2019-09-10 18:53:02 -07:00
772ee4b29d Add num_lamports_per_account as a configurable argument (#5869) 2019-09-10 16:24:43 -07:00
c62a4a1c13 Interpret Solana-CLI amount requests in SOL by default (#5866)
automerge
2019-09-10 16:16:40 -07:00
008dcd71b9 BPF loader message nits (#5870) 2019-09-10 16:13:23 -07:00
ee4266bc59 Remove banks in locktower not in bank_forks (#5837)
* Remove unnecessary calculations from collect_vote_lockouts

* Add test for locktower startup from snapshot
2019-09-10 13:58:27 -07:00
294d531e0b Bump serde_derive from 1.0.99 to 1.0.100 (#5864)
automerge
2019-09-10 13:31:11 -07:00
e05f8faa74 Print account balances in SOL by default (#5857)
* Print account balances in SOL by default

* Review comments

* Fix wallet-sanity
2019-09-10 13:36:59 -06:00
fc4aa71193 GCE-based nodes now reboot on maintenance events instead of terminating (#5861) 2019-09-10 12:30:06 -07:00
0d7efe5176 Bump serde from 1.0.99 to 1.0.100 (#5862)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.99 to 1.0.100.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.99...v1.0.100)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-10 12:27:41 -07:00
b426dfb2c0 Change tx batching in banking process and record (#5832)
* Change tx batching in banking process and record

* Change batching to reduce impact on replay stage
2019-09-10 11:04:03 -07:00
fd33b27af1 Fix coding shred generator (#5865) 2019-09-10 09:35:07 -07:00
39f89e5a56 Fix bench clients reading primordial account files (#5860)
* Fix bench-tps balance lookup

* Also fix bench-exchange
2019-09-09 19:48:43 -07:00
b881029de3 make voter_pubkey a function of epoch (#5830)
* make voter_pubkey a function of epoch

* fixups
2019-09-09 18:17:32 -07:00
7682db4826 Generate coding shreds on the fly based on erasure limits (#5852)
* Generate coding shreds on the fly based on erasure limits

* fix uncle
2019-09-09 17:26:51 -07:00
61fe1aa9cf SDK cleanup to reduce featurization (#5856) 2019-09-09 16:38:52 -07:00
468095ede2 Update project to use new account serialization format (#5848) 2019-09-09 16:17:10 -07:00
9dc5da7dbd net/net.sh: Add flag to skip build (#5853)
automerge
2019-09-09 15:40:12 -07:00
a18cd29411 Remove unsigned division from FeeCalculator (#5851) 2019-09-09 15:07:32 -07:00
b13c690f0c Bump indicatif from 0.11.0 to 0.12.0 (#5844)
automerge
2019-09-09 12:26:34 -07:00
a7fd726872 Bump console from 0.8.0 to 0.9.0 (#5843)
Bumps [console](https://github.com/mitsuhiko/console) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Commits](https://github.com/mitsuhiko/console/compare/0.8.0...0.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 11:15:24 -07:00
6a082d2310 Bump cc from 1.0.41 to 1.0.45 (#5842)
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.41 to 1.0.45.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.41...1.0.45)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 11:15:13 -07:00
a317e9513f Add sysvar support (#5838) 2019-09-09 10:55:35 -07:00
ee0c570d54 Rework solana-validator-cuda to automatically prepare the perf-libs env (#5849)
automerge
2019-09-08 21:20:08 -07:00
7607800d47 Refactor restart function in local cluster to support separate exit and restart functions (#5845) 2019-09-08 17:53:34 -07:00
b35c022629 More types (#5846)
automerge
2019-09-08 11:13:59 -07:00
11cec8f24e Move appveyor off the system drive 2019-09-08 10:05:58 -07:00
df205f8752 Use ureq instead of influx_db_client (#5839) 2019-09-07 12:48:45 -07:00
affcb5ec43 remove hashmap from stake_history (#5834) 2019-09-07 10:33:06 -07:00
bdda79343e scripts/cargo-install-all.sh: Ensure solana-genesis is built last (#5827)
Workaround for #5826
2019-09-06 20:00:24 -07:00
1833db51a5 Cleanup program account def (#5833) 2019-09-06 17:32:14 -07:00
81c36699c4 Add support for BPF program custom errors (#5743)
* Add support for BPF program custom errors

* Rename SOL_SUCCESS -> SUCCESS
2019-09-06 16:05:01 -07:00
d3052d094c fmt does not work with cfg_if (#5829) 2019-09-06 15:33:58 -07:00
4c4b7d39b8 Cleanup program's ProcessInstruction (#5828) 2019-09-06 14:44:41 -07:00
e8d88f3237 Split SDK's timing.rs (#5823) 2019-09-06 14:30:56 -07:00
cc8575dd96 multinode-demo/validator.sh: Don't exit from kill_node (#5825)
That's `kill_node_and_exit`'s job
2019-09-06 15:08:30 -06:00
f28782cb84 Bump chrono from 0.4.8 to 0.4.9 (#5775)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.8 to 0.4.9.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/master/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/commits/v0.4.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-06 13:55:36 -06:00
c58e7dd631 [Security] Bump blake2 from 0.8.0 to 0.8.1 (#5824)
Bumps [blake2](https://github.com/RustCrypto/hashes) from 0.8.0 to 0.8.1. **This update includes a security fix.**
- [Release notes](https://github.com/RustCrypto/hashes/releases)
- [Commits](https://github.com/RustCrypto/hashes/compare/blake2-v0.8.0...sha1-v0.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-06 13:55:06 -06:00
d9817c153a Switch programs to use Pubkey from SolPubkey (#5821) 2019-09-06 12:40:01 -07:00
6057768fdc Support arbitrary account creation in genesis (#5799) 2019-09-06 23:45:23 +05:30
4a20c2aa1b add stake and vote errors (#5814)
* add stake errors

* remove self from type_of

* sheesh

* better

* add stake errors

* update wallet error handling

* fixup
2019-09-06 10:55:03 -07:00
e5f902369c Rust BPF programs depend on Solana SDK (#5819) 2019-09-06 09:20:14 -07:00
1f9fde5f7b ThinClient internal name grooming (#5800) 2019-09-06 09:07:40 -07:00
c3782082bc Add retries to smooth over ThinClient internal experiments (#5813) 2019-09-06 07:24:04 -07:00
a452249bf3 Use retain on Packets instead of creating new ones (#5804)
* Use remove on Packets instead of creating a new one

* Fix compile after rebase
2019-09-05 19:16:18 -07:00
3d3b03a123 Verify signature of recovered shred before adding them to blocktree (#5811)
* Verify signature of recovered shred before adding them to blocktree

* fix failing tests, and review comments
2019-09-05 18:20:30 -07:00
719c03d33f Update stake-delegation-and-rewards.md (#5801) 2019-09-05 17:48:40 -07:00
609b18c2cd multinode-demo/validator.sh: Correct new_genesis_block() logic (#5812)
automerge
2019-09-05 16:14:15 -07:00
5279b83d34 multinode-demo/validator.sh: Sync CLI options with solana-validator (#5810)
automerge
2019-09-05 14:57:35 -07:00
05d2eec45c Remove unnecessary erasure config references (#5809) 2019-09-05 14:46:41 -07:00
0cbc0dc79c Update solana validator-info commands for testnets (#5806) 2019-09-05 13:20:38 -07:00
9210f40c38 Update RELEASE.md 2019-09-05 14:34:52 -04:00
3237e897d7 Adjust packet batching post-decoupling from blobs (#5783) 2019-09-05 11:22:39 -07:00
f1110f2e85 Ignore test_snapshots_blocktree_floor (#5798)
automerge
2019-09-05 10:49:19 -07:00
5ffb6b874b cli: get command now shows default values instead of 'not set' (#5796)
* get command now shows default values instead of 'not set'

* Add default indicator
2019-09-05 10:14:23 -07:00
c4a5442146 Confirm validator ports are reachable by the entrypoint at startup (#5795) 2019-09-04 23:10:35 -07:00
bd74e63702 Offload remaining confidence cache computation to separate thread (#5792)
* Move remaining confidence cache computation to separate thread

* Move confidence cache out of bank forks
2019-09-04 23:10:25 -07:00
f78b865cba Cleanup shreds to remove FirstShred data structure (#5789)
* Cleanup shreds to remove FirstShred data structure

* Also reduce size used by parent slot information in shred header

* clippy

* fixes

* fix chacha test
2019-09-04 21:06:47 -07:00
7062fe4b47 Refactor Blocktree for clarity and correctness (#5700)
* Refactor shreds to prevent insertion of any metadata on bad shreds

* Refactor fetching Index in blocktree

* Refactor get_slot_meta_entry

* Re-enable local cluster test

* cleanup

* Add tests for success/fail insertion of coding/data shreds

* Remove assert

* Fix and add tests for should_insert coding and data blobs
2019-09-04 17:14:42 -07:00
b6da5a3f47 build all tests (#5785)
* build all tests

* try again

* try again
2019-09-04 17:01:38 -07:00
5fb2d7a98f Add libstd support to Rust BPF (#5788) 2019-09-04 16:00:11 -07:00
ceaf4781b0 Pull in rbpf v0.1.15 (#5787) 2019-09-04 14:37:51 -07:00
933e835838 add stake lockup (#5782)
* add stake lockup

* fixup
2019-09-04 13:34:09 -07:00
94eb78d399 Update stake-delegation-and-rewards.md (#5774) 2019-09-04 13:19:05 -07:00
02ee2a601c Further cleanup of blocktree after Blob deprecation (#5780) 2019-09-04 12:47:09 -07:00
b19d9a50d3 Transition to ureq http client (#5777)
* Transition to ureq http client

* Remove unwrap
2019-09-04 12:11:44 -07:00
355640b5db increase stake warmup cooldown rate to 0.25 (#5772) 2019-09-04 10:57:42 -07:00
dfa6238342 Remove unnecessary construction of descendants (#5742) 2019-09-04 01:49:42 -07:00
3b0d48e3b8 Remove blocktree blob references (#5691)
* Remove blocktree blob references

* fixes and cleanup

* replace uninitialized() call with MaybeUninit

* fix bench
2019-09-03 21:32:51 -07:00
2b696ac8dc Bitcoin Payment Verification Program (#5153)
* btc_spv program directories

* add spv-instruction spv-state

* added spv_processor file

* cargo.tomls - bump versions, rm unneccessary deps

* add btc_spv_bin and top lvl workspace entry

* hex_decode util & errors

* add header parsing test

* update dependencies

* rustfmt

* refactor Requests

* fix dependencies/versions

* clippy fixes

* test improvements

* add gitignores

Add framework for the rest of the BTC-SPV stuff to be built on top of. This PR defines the components, data structures, accessors, etc. but is not quite complete. It still needs the headerstore component finished along with some of the validation utils, hashing stuff, and more tests.
2019-09-03 19:16:02 -06:00
8362b408d9 Move testnet ssh key (#5770)
* Factor out hardcoded testnet ssh key path

* Build/create test net ssh key path

* Rename testnet ssh dir

* Give testnetSSHDir a more generic name

* shellcheck

* favor hardcoded paths over `paths.sh`

* Put instance-startup-complete stamp in the scratch dir as well

* Rename `/solana` > `/solana-scratch`
2019-09-03 18:51:16 -06:00
62f6a78ccd Make data plane shred filter parallel again (#5740) 2019-09-03 21:50:57 +00:00
f7e039e7ac Bump chrono from 0.4.7 to 0.4.8 (#5761)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.7 to 0.4.8.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/master/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-03 14:49:48 -07:00
61bd14c40a Bump rayon from 1.1.0 to 1.2.0 (#5758)
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.1.0...v1.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-03 13:39:58 -06:00
5dd85f1533 Propose design for rent (#5160)
* Create rent.md

* Update SUMMARY.md

* Update rent.md

* Update rent.md

* Update rent.md

* Update rent.md

* Update rent.md

* Update rent.md

* Update rent.md

* Update rent.md

* Update rent.md
2019-09-03 12:38:34 -07:00
0d20bc5e14 Move solana-validator-info into cli (#5768)
* Move solana-validator-info into cli

* Remove solana-validator-info and update docs

* Update test to use app()
2019-09-03 10:38:12 -07:00
a82754913f Partner node setup tweaks (#5715)
automerge
2019-09-03 07:45:20 -07:00
5840e3bbdf Decrease instruction count in BPF Rust SDK entrypoint helper (#5760) 2019-09-03 08:38:59 -04:00
e8ab599bae Add keypair print (#5766)
automerge
2019-09-02 12:53:13 -07:00
85e5fbeb35 Add absoluteSlot to getEpochInfo (#5765) 2019-09-02 12:21:06 -07:00
475f6fe666 votes only need slots and the last bank hash (#5499)
churn

cleanup

reverse test slot hashes

test check_slots_are_valid

updates

only send the minimum bank vote difference

fixup! only send the minimum bank vote difference

some banks may not have a voting account setup

fixup! votes only need slots and the last bank hash

fixup! fixup! votes only need slots and the last bank hash

fmt

fixed compare

fixed vote

fixup! fixed vote

poke ci

filter the local votes via the last bank vote
2019-09-02 12:01:09 -07:00
9f354522a7 Make bench_tps_local_cluster tests serial (#5762)
-
2019-08-31 16:53:56 -07:00
0c2a49391a Disable pinned gpu memory (#5753) 2019-08-31 16:44:07 -07:00
e3a6c9234a Entrypoint RPC service discovery now blocks until the entrypoint is actually found (#5756)
automerge
2019-08-30 16:12:58 -07:00
6089c8030b Validator/replicator metrics host id is no longer set by bash (#5755)
automerge
2019-08-30 15:33:30 -07:00
643d0b0868 Make the world flat again; remove utils/ subdirectory (#5752)
automerge
2019-08-30 11:57:39 -07:00
3cc5d8df7f Mark global arguments as such (#5751)
automerge
2019-08-30 11:13:23 -07:00
34155fc36f Long-running banking benchmark (#5075) 2019-08-30 11:10:32 -07:00
f840eefcbf Bump bs58 from 0.2.4 to 0.2.5 (#5747)
Bumps [bs58](https://github.com/mycorrhiza/bs58-rs) from 0.2.4 to 0.2.5.
- [Release notes](https://github.com/mycorrhiza/bs58-rs/releases)
- [Commits](https://github.com/mycorrhiza/bs58-rs/compare/0.2.4...0.2.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-30 11:41:41 -06:00
e1f3e33bfb Bump jsonrpc-pubsub from 13.0.0 to 13.1.0 (#5708)
Bumps [jsonrpc-pubsub](https://github.com/paritytech/jsonrpc) from 13.0.0 to 13.1.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v13.0.0...v13.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-30 11:40:58 -06:00
36fcb4fbca Add trent's workstation pubkey to authorized keys script (#5748)
automerge
2019-08-30 10:13:55 -07:00
22667d64d1 Add various missing cli validators (#5745)
automerge
2019-08-30 09:27:35 -07:00
4786143524 Add a more helpful error on genesis block mismatch (#5744)
automerge
2019-08-30 09:10:22 -07:00
f78baf80e4 Move drone arguments under the airdrop command (#5741) 2019-08-29 20:45:53 -07:00
33e7e23484 Update ubuntu image 2019-08-29 14:40:08 -07:00
50214f059f Pull in LLVM with stack location fixes (#5732) 2019-08-29 11:25:22 -07:00
57f778bcdb Bump winapi from 0.3.7 to 0.3.8 (#5705)
Bumps [winapi](https://github.com/retep998/winapi-rs) from 0.3.7 to 0.3.8.
- [Release notes](https://github.com/retep998/winapi-rs/releases)
- [Commits](https://github.com/retep998/winapi-rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-29 10:02:29 -06:00
c3f07eb85a Bump jsonrpc-ws-server from 13.0.0 to 13.1.0 (#5721)
Bumps [jsonrpc-ws-server](https://github.com/paritytech/jsonrpc) from 13.0.0 to 13.1.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v13.0.0...v13.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-29 09:12:02 -06:00
8adac30c05 Integrate shreds to the replicators (#5711)
* Integrate shreds to the replicators

* fix cuda stuff

* fix cuda tests
2019-08-28 22:34:47 -07:00
5a5a6b3840 Add Interchain SPV book section (#5632)
* Add Interchain SPV book section

* hyphenate interchain

* spv -> SPV

* improve header store explanation

* networks -> platforms

* bump spin subdep versions
2019-08-28 19:46:26 -06:00
2803eb0d72 Use LLVM's C builtins for BPF (#5717) 2019-08-28 17:19:40 -07:00
f41fb7d772 Ignore cargo audit advisory RUSTSEC-2019-0013 (#5713) 2019-08-28 14:38:46 -07:00
156399e8aa Bump jsonrpc-http-server from 13.0.0 to 13.1.0 (#5707)
Bumps [jsonrpc-http-server](https://github.com/paritytech/jsonrpc) from 13.0.0 to 13.1.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v13.0.0...v13.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-28 14:21:17 -06:00
5745a54d4c Bump indexmap from 1.0.2 to 1.1.0 (#5706)
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.0.2 to 1.1.0.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Commits](https://github.com/bluss/indexmap/compare/1.0.2...v1.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-28 14:20:45 -06:00
3548d42a6c Bump cc from 1.0.40 to 1.0.41 (#5699)
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.40 to 1.0.41.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.40...1.0.41)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-28 14:19:33 -06:00
7dfb735db9 randomize tx ordering (#4978)
Summary of Changes:
This change adds functionality to randomize tx execution for every entry. It does this by implementing OrderedIterator that iterates tx slice as per the order specified. The order is generated randomly for every entry.
2019-08-28 21:08:32 +05:30
1609765740 Adjust snapshot metrics layout 2019-08-27 20:56:15 -07:00
2510f3d352 Remove extra call to serialize in shred verify (#5698) 2019-08-27 19:28:00 -07:00
50ab34ad92 Install bzip2 in solana docker file (#5701) 2019-08-27 22:10:05 -04:00
47535b9ff1 Use serialize_into to fill in shreds instead of writing one byte at a time (#5695)
automerge
2019-08-27 17:11:24 -07:00
ffc748becb Disable LocalVoteSignerService. It's grabbing an TCP port that's causing CI to fail occasionally (#5690) 2019-08-27 15:34:23 -07:00
34ab25a88b feat: getInflation() endpoint (#5681) 2019-08-27 18:17:03 -04:00
8b9c3a2561 Blocktree last_root to enforce a slot floor (#5593)
* Add last_root to blocktree

* Don't repair earlier than last_root

* Add integration test to make sure blocktree floor is enforced
2019-08-27 15:09:41 -07:00
362a39a941 Don't unwrap get_balance immediately in bench-tps move mode (#5685)
automerge
2019-08-27 14:36:48 -07:00
9f2119920c Revert "Add debug to help track down ci/localnet-sanity.sh instability"
This reverts commit 7aaf5bc02c.
2019-08-27 14:28:22 -07:00
afb24d28ca Disable cargo caching. Travis is timing itself out as it updates the cache at the end of a build 2019-08-27 14:19:54 -07:00
0c62cf8980 Add metrics for snapshot generation (#5677) 2019-08-27 13:04:20 -07:00
f1d58f980b Ignore retransmit channel error (#5680)
automerge
2019-08-27 12:41:04 -07:00
b1dfbf0ac4 Rename solana badges to solana-core in README (#5682) 2019-08-27 13:40:23 -06:00
12ad95eb5e Erasure statistics for shreds (#5676) 2019-08-27 11:22:06 -07:00
7aaf5bc02c Add debug to help track down ci/localnet-sanity.sh instability 2019-08-27 08:49:04 -07:00
85f03b590d Bump jsonrpc-derive from 13.0.0 to 13.1.0 (#5668)
Bumps [jsonrpc-derive](https://github.com/paritytech/jsonrpc) from 13.0.0 to 13.1.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v13.0.0...v13.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-27 08:48:34 -07:00
a29f0484dc Add newline before cluster info log (#5671) 2019-08-27 08:33:48 -07:00
8e6e72babd Bump jsonrpc-core from 13.0.0 to 13.1.0 (#5669)
Bumps [jsonrpc-core](https://github.com/paritytech/jsonrpc) from 13.0.0 to 13.1.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v13.0.0...v13.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-27 07:49:16 -07:00
def71164f4 Bump cbindgen from 0.9.0 to 0.9.1 (#5670)
Bumps [cbindgen](https://github.com/eqrion/cbindgen) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/eqrion/cbindgen/releases)
- [Changelog](https://github.com/eqrion/cbindgen/blob/master/CHANGES)
- [Commits](https://github.com/eqrion/cbindgen/compare/v0.9.0...v0.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-27 07:49:00 -07:00
eda46d30bb Bump console from 0.7.7 to 0.8.0 (#5631)
automerge
2019-08-26 22:44:09 -07:00
d87910eb15 Log bind error (#5666) 2019-08-26 21:59:40 -07:00
7257d2845d Bump hex-literal from 0.2.0 to 0.2.1 (#5638)
Bumps [hex-literal](https://github.com/RustCrypto/utils) from 0.2.0 to 0.2.1.
- [Release notes](https://github.com/RustCrypto/utils/releases)
- [Commits](https://github.com/RustCrypto/utils/compare/hex-literal-v0.2.0...hex-literal-v0.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-26 21:32:42 -07:00
9744eb0ccd Bump lazy_static from 1.3.0 to 1.4.0 (#5640)
Bumps [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/rust-lang-nursery/lazy-static.rs/releases)
- [Commits](https://github.com/rust-lang-nursery/lazy-static.rs/compare/1.3.0...1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-26 21:32:31 -07:00
a273ddcd97 Rename fixed_buf to fixed-buf (#5665)
automerge
2019-08-26 20:31:59 -07:00
99a97b7008 Add more details to error log (#5637) 2019-08-26 19:51:17 -07:00
3d098d2ed9 turn cargo audit version back on (#5651) 2019-08-26 19:50:56 -07:00
db768b4c3a Log contact info every 10 seconds (#5663) 2019-08-26 18:31:14 -07:00
4ac1213c9c Integrate coding shreds and recovery (#5625)
* Integrate coding shreds and recovery

* More tests for shreds and some fixes

* address review comments

* fixes to code shred generation

* unignore tests

* fixes to recovery
2019-08-26 18:27:45 -07:00
a0f3208828 Ignore flaky test_banking_stage_entryfication (#5659)
automerge
2019-08-26 16:49:34 -07:00
97db802be3 Add net-tools for netstat 2019-08-26 16:17:04 -07:00
28f2c75137 Add bigger buffers for shred column families in rocks (#5653)
automerge
2019-08-26 15:58:26 -07:00
81bb208a62 Add open file descriptor monitoring (#5655) 2019-08-26 15:17:19 -07:00
6979a17674 Enabling building for bpf stack bug test program (#5654) 2019-08-26 17:23:21 -04:00
bd20c5e791 Add test case for u128 panic (#5601)
* u128 panic

* Add test case for u128 memory out of bounds error

* Fix check
2019-08-26 16:31:06 -04:00
b4935ff4ed Re enable c tests (#5634) 2019-08-26 12:52:16 -07:00
e1dd74f1bf Ignore flaky test_ledger_cleanup_service (#5649) 2019-08-26 12:33:42 -07:00
e2ecacc141 runtime checks for rent_epoch (#5629)
* runtime checks for rent_epoch

* add actual test

* bigger timeout

* backout 90 min timeout

* new noop
2019-08-26 11:04:20 -07:00
6512aced21 Add warmup, cooldown to definitions (#5647) 2019-08-26 10:01:33 -07:00
615da845cd remove replicode in run_purge_batch() (#5630)
* remove replicode

* bigger timeout

* backout 90 min timeout
2019-08-26 09:47:48 -07:00
2c7f49c3e6 Cargo.lock 2019-08-25 22:55:37 -07:00
ba59741b60 Bump to 0.19.0-pre0 2019-08-25 21:47:29 -07:00
52da207f83 test_snapshots_restart_validity now passes (#5644)
automerge
2019-08-25 21:33:41 -07:00
ef8eff69e4 Upgrade to debian:buster (#5639) 2019-08-24 21:41:04 -07:00
1abdeca4c1 Add TESTNET_DB_HOST default 2019-08-24 07:38:19 -07:00
6e82978931 Fix race with LedgerCleanupService (#5622) 2019-08-23 23:40:20 -07:00
4e827af392 Remove unnecessary trailing semicolons (#5636) 2019-08-23 22:47:54 -07:00
f6b63a7dbc Decode SOLANA_METRICS_CONFIG instead of relying on some bash to do it (#5633) 2019-08-23 21:17:10 -07:00
6bb22902cc net: net.sh - Enable deploying testnets on debug binaries (#5627)
automerge
2019-08-23 18:31:18 -07:00
881a6dc0f7 Revert "Bump stable timeout"
This reverts commit bde4ba04af.
2019-08-23 17:14:08 -07:00
877e7a3893 Disable C test (#5628) 2019-08-23 16:11:34 -07:00
bb80116605 Log build branch/commit on startup (#5626) 2019-08-23 15:45:55 -07:00
0ffe7a9c8f plumb some rent (#5610)
* plumb some rent

* nits

* fixups

* fixups

* fixups
2019-08-23 14:04:53 -07:00
9b8d59d2e9 Revert "Bump indexmap from 1.0.2 to 1.1.0 (#5565)" (#5624)
This reverts commit f1ad69c84e.
2019-08-23 13:20:31 -07:00
f7bd7a41d2 update staking rewards with points and warmup (#5623) 2019-08-23 13:11:25 -07:00
3fc5009ef2 Snapshot pipefitting through the validator cli (#5617)
* Handle 404 errors better

* Snapshot pipefitting through the validator cli

* Add download progress bar

* Log the current entrypoint slot
2019-08-23 13:02:07 -07:00
bde4ba04af Bump stable timeout 2019-08-23 11:44:08 -07:00
f1ad69c84e Bump indexmap from 1.0.2 to 1.1.0 (#5565)
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.0.2 to 1.1.0.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Commits](https://github.com/bluss/indexmap/compare/1.0.2...v1.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-23 11:06:24 -07:00
97ea75a890 Pull in solana_rbpf v0.1.14 (#5609) 2019-08-23 11:03:53 -07:00
52f6da5cee upgrade rust to 1.37 (#5611) 2019-08-23 08:55:51 -07:00
aeaa0feb61 Add range lookups for erasure set indexes (#5612) 2019-08-22 16:32:38 -07:00
1207664bbb Rename solana-wallet program to just solana (#5604)
* Rename wallet/ to cli/

* Rename the solana-wallet crate to solana-cli

* Rename solana-wallet program to solana

* cargo fmt
2019-08-22 13:51:16 -07:00
19d16e75c6 Fix clippy and lint issues in BPF test program (#5607)
* Revert "Add test program for BPF memory corruption bug (#5603)"

This reverts commit 63d62c33c6.

* Revert "Revert "Add test program for BPF memory corruption bug (#5603)""

This reverts commit 9502082cda.

* Fix clippy and fmt issues
2019-08-22 15:38:46 -04:00
51cf559ce1 Add datacenter node setup scripts (#5517)
automerge
2019-08-22 12:19:48 -07:00
63d62c33c6 Add test program for BPF memory corruption bug (#5603)
* Add test program for BPF memory corruption bug

* @jackcmay feedback
2019-08-22 14:25:23 -04:00
919c066e5a update book with more of current staking details (#5571)
* Update validator-stake.md

* trailing whitespace

* update staking rewards with points and warmup

* update

* Update stake-delegation-and-rewards.md

* Update validator-stake.md
2019-08-22 09:35:52 -07:00
4125d01668 Bump reqwest from 0.9.19 to 0.9.20 (#5598)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.19 to 0.9.20.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/v0.9.20/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.19...v0.9.20)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-22 07:57:33 -07:00
087c43b9ef Add snapshotting integration test (#5519)
* Add snapshotting integration test

* Update ContactInfo on restart in local cluster nodes
2019-08-21 23:59:11 -07:00
c18ea3ccc9 Fix ignored tests in blocktree (#5591) 2019-08-21 20:07:51 -07:00
564b590c89 README: Bump min rustc (#5595)
automerge
2019-08-21 19:56:43 -07:00
d36ecb5c91 Add backport labels for upcoming releases 2019-08-21 18:25:20 -07:00
e2d6f01ad3 solana-validator now verifies its genesis blockhash against the cluster entrypoint (#5589) 2019-08-21 18:16:40 -07:00
5034331131 net: init-metrics.sh - urlencode influx password (#5594)
* net: init-metrics.sh - urlencode influx password

* old backticks bad!

* Move urlencode() to common.sh

* Make urlencode() vars local

Co-Authored-By: Michael Vines <mvines@gmail.com>
2019-08-21 19:06:09 -06:00
faafee6b42 to to/the the (#5590) 2019-08-21 17:46:59 -07:00
80f618f011 Add info logging around snapshot tarball generation (#5592)
automerge
2019-08-21 16:36:21 -07:00
84f763d079 net: init-metrics.sh no longer supports -c flag (#5588)
automerge
2019-08-21 15:35:07 -07:00
0dc0594aaa Fixes to repair and orphan logic for data shreds (#5587) 2019-08-21 15:27:42 -07:00
d651cb7a25 Adjust |ulimit -n| automatically, no bash required (#5586) 2019-08-21 14:55:58 -07:00
f18aa4e423 Tuning net.inet.udp.maxdgram on mac OS is no longer required (#5585) 2019-08-21 13:17:01 -07:00
ab4f370e15 Bump serde_derive from 1.0.98 to 1.0.99 (#5539)
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.98 to 1.0.99.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.98...v1.0.99)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-21 12:14:58 -07:00
d6f824abc0 Bump bs58 from 0.2.2 to 0.2.4 (#5560)
Bumps [bs58](https://github.com/mycorrhiza/bs58-rs) from 0.2.2 to 0.2.4.
- [Release notes](https://github.com/mycorrhiza/bs58-rs/releases)
- [Commits](https://github.com/mycorrhiza/bs58-rs/compare/0.2.2...0.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-21 12:13:52 -07:00
3450b9a44d Rename solana to solana-core (#5583) 2019-08-21 10:23:33 -07:00
afaf95cf53 Refine error message when ledger can't be opened (#5582) 2019-08-21 09:44:12 -07:00
8c371dd2fb Update performance metrics page in the book (#5581) 2019-08-21 09:59:23 -04:00
bb558acdf0 Change JsonRpc exit to use wait->close (#5566)
* Add wait-close-join pattern to rpc_service

* Create ValidatorExit struct
2019-08-20 23:59:31 -07:00
159e518671 Update LLVM to v0.0.13 and Rust-BPF to v0.1.4 (#5580) 2019-08-20 20:25:29 -07:00
4798e7fa73 Integrate data shreds (#5541)
* Insert data shreds in blocktree and database

* Integrate data shreds with rest of the code base

* address review comments, and some clippy fixes

* Fixes to some tests

* more test fixes

* ignore some local cluster tests

* ignore replicator local cluster tests
2019-08-20 17:16:06 -07:00
f4534ef12d Only update first version field in a Cargo.toml 2019-08-20 17:05:28 -07:00
8e0f41a790 Cargo.lock 2019-08-20 16:59:44 -07:00
b1203da82c Bump to 0.18.0-pre2 2019-08-20 16:56:00 -07:00
e366fb6328 Update to v0.18.0 2019-08-20 16:53:12 -07:00
32de5e6e7a Add is_keypair argument validator to wallet (#5567)
automerge
2019-08-20 13:59:31 -07:00
93ae98812b change DEFAULT_NUM_TICKS_PER_SECOND to DEFAULT_TICKS_PER_SECOND (#5559) 2019-08-19 23:22:56 -07:00
2c2de12e88 Update secure variable 2019-08-19 20:04:30 -07:00
bd193535c9 Cap CrdsFilter sizes such that PullRequest no longer exceeds MTU (#5561) 2019-08-19 18:14:10 -07:00
d4d1e5e15b Update secure variables 2019-08-19 15:43:23 -07:00
f7a670596f Drop os version to resolve Appveyor Server build failure 2019-08-19 13:32:29 -07:00
a8b82a0b68 optimize store_accounts (#5557) 2019-08-19 13:00:37 -07:00
bb25a06baa Remove mvines workspace path (#5556) 2019-08-19 12:17:24 -07:00
8b7cca986a Bump serde from 1.0.98 to 1.0.99 (#5540)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.98 to 1.0.99.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.98...v1.0.99)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-19 10:06:15 -06:00
626e16a177 moar coverage in stake_state (#5554)
* moar coverage in stake_state

* nits
2019-08-18 15:41:49 -07:00
814af378a7 stake cooldown (#5553)
* stake cooldown

* fixups

* sheesh
2019-08-17 18:12:30 -07:00
a252acf539 move netutil (#5552) 2019-08-17 15:52:12 -07:00
01eb7600d9 use stake config to defeat warmup in local_cluster (#5549)
* use stake config to defeat warmup in local_cluster

* fixups
2019-08-17 12:28:36 -07:00
52c2191545 improve local cluster stake verification (#5551) 2019-08-17 12:28:20 -07:00
25403e61ed add fixed_buf (#5546) 2019-08-17 11:11:59 -07:00
f402b477b2 🐌 Publish crates for even longer 2019-08-16 21:52:12 -07:00
8df8f84701 publish fixes 2019-08-16 17:28:09 -07:00
ccee6241a6 Revert "publish fixes"
This reverts commit 4d13d3871d.
2019-08-16 17:28:07 -07:00
4d13d3871d publish fixes 2019-08-16 17:03:57 -07:00
bb0c9d6145 Log more info at the start of PoH (#5550) 2019-08-16 16:20:20 -07:00
8d105042ea Update getEpochVoteAccounts to getVoteAccounts (#5543)
* Rework getEpochVoteAccounts into getVoteAccounts

* Update client apis

* Update docs

* Review comments
2019-08-16 17:02:19 -06:00
84304cb0fc Display vote pubkey at startup (#5548) 2019-08-16 15:56:06 -07:00
89fe297416 improve local cluster stake verification (#5547) 2019-08-16 15:46:19 -07:00
d853b20d7f Remove airdrop balance (in)sanity checks (#5542) 2019-08-16 15:23:59 -07:00
b28407d98a Permit keypair for deactivate-stake vote pubkey too (#5544)
automerge
2019-08-16 15:06:59 -07:00
4fa795b026 bank slot distance (#5545) 2019-08-16 15:00:12 -07:00
c298474e6f Add validator-info for net/ managed nodes (#5538) 2019-08-16 11:39:58 -07:00
d925902b3f Set default wallet/validator-info url to localhost (#5537)
automerge
2019-08-16 10:22:22 -07:00
99eeb63f71 move the rest of cluster to local_cluster (#5535) 2019-08-16 00:00:38 -07:00
ff95f6dcfa Remove bad ! 2019-08-15 21:41:14 -07:00
8258532791 System program is now registered like all other native programs (#5526) 2019-08-15 21:07:00 -07:00
e73cbdda61 Reduce log level for known issue (#5536)
automerge
2019-08-15 19:42:27 -07:00
94f1132fb6 fix single node testnet, remove bootstrap vote (#5534) 2019-08-15 18:58:46 -07:00
4ee212ae4c Coalesce gossip pull requests and serve them in batches (#5501)
* Coalesce gossip pull requests and serve them in batches

* batch all filters and immediately respond to messages in gossip

* Fix tests

* make download_from_replicator perform a greedy recv
2019-08-15 17:04:45 -07:00
d5fb493aa4 Change recv to try_recv (#5533) 2019-08-15 15:17:46 -07:00
88ea950652 add stake_api config account (#5531) 2019-08-15 14:35:48 -07:00
e4519d6447 Use check_unique_pubkeys helper to prevent DuplicateAccountIndex errors earlier (#5532) 2019-08-15 14:16:05 -06:00
471bc73a23 Fix Rust 1.37.0 compiler warnings (#5530)
Looks like most usages of trait objects should have introduced
a type variable instead.
2019-08-15 14:00:09 -06:00
75a2b74751 Delete append_vec_serialize 2019-08-15 11:02:30 -07:00
4e69408f54 Bump cc from 1.0.38 to 1.0.40 (#5502)
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.38 to 1.0.40.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.38...1.0.40)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-15 11:43:32 -06:00
38602d60b3 Reverse .travis.yml fix
_It didn't work!_
2019-08-15 11:15:34 -06:00
1fe1550a30 Update docs wrt new wallet and rpc functionality (#5528) 2019-08-15 11:05:34 -06:00
827f2b3a5c Add update manifest as signer 2019-08-15 09:23:55 -07:00
a948c9b7f9 Bump libc from 0.2.61 to 0.2.62 (#5527)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.61 to 0.2.62.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.61...0.2.62)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-15 09:49:14 -06:00
1363841f32 Fix testnet deployment 2019-08-15 08:32:10 -07:00
4688f9821f Snapshot optimizations (#5525)
* Change serializing snapshot tar to use shell command
2019-08-14 23:14:40 -07:00
0c90c889cd Add travis_wait to .travis.yml to fix timeout 2019-08-14 23:04:53 -06:00
9f6c9c428b Move genesis/snapshot archive download into Rust (#5515) 2019-08-14 19:25:22 -07:00
fd443d85c4 update config_api with initialization and recovery utilities (#5523)
* update config_api with initialization and recovery utilities

* nits

* move tests to config_tests to eliminate config_api solana_runtime dependency

* fixups
2019-08-14 15:54:31 -07:00
b4f0f4abcc Disable rocksdb bzip2 compression 2019-08-14 15:39:30 -07:00
d22848f9b1 use live stakes for consensus (#5426)
* use live stakes for consensus

* lint

* re-enable leader_failure_4

* fixups

* re-ignore leader_failure_4
2019-08-14 13:30:21 -07:00
79416381dc Add pubkey setup for datacenter nodes (#5514) 2019-08-14 14:25:56 -06:00
d791c70d90 Snapshot optimizations (#5518)
* Limit slots_since_snapshot size, only package latest snapshot, refactor tests

* Add test checking status_cache.roots == bank_forks.slots_since_snapshot after bank_forks.set_root()
2019-08-13 22:39:29 -07:00
802537564b Update stale.yml 2019-08-13 22:21:53 -07:00
1d0608200c Restore blob size fix (#5516)
* Revert "Revert "Fix gossip messages growing beyond blob size  (#5460)" (#5512)"

This reverts commit 97d57d168b.

* Fix Crds filters
2019-08-13 18:04:14 -07:00
cd14a940d8 Allow process_blocktree() to start processing from any root (#5484)
* Remove unnecessary entry_height from BankInfo

* Refactor process_blocktree to support process_blocktree_from_root

* Refactor to process blocktree after loading from snapshot

* On restart make sure bank_forks contains all the banks between the root and the tip of each fork, not just the head of each fork

* Account for 1 tick_per_slot in bank 0 so that blockhash of bank0 matches the tick
2019-08-13 17:20:14 -07:00
58d4e32c97 Remove serialization of future AppendVecs and serialize AccountStorage correctly (#5510) 2019-08-13 16:05:37 -07:00
1b6a200d6f Enable automation to close stale pull requests (#5511) 2019-08-13 13:07:33 -07:00
08f6a2ea3e debash: Add solana-gossip get-rpc-url command to avoid hard coding (#5513) 2019-08-13 10:49:48 -07:00
97d57d168b Revert "Fix gossip messages growing beyond blob size (#5460)" (#5512)
This reverts commit a8eb0409b7.
2019-08-13 10:29:26 -07:00
2b219228ce Add wallet ping command (#5508) 2019-08-12 21:33:13 -07:00
07d11be6ab add global stake warmup (#5483)
* add global stake warmup

* integrate stake history into runtime

* fixup core tests

* fixup

* remove existing cooldown tests for now
2019-08-12 20:59:57 -07:00
7981431f09 --entrypoint is a global arg 2019-08-12 16:08:45 -07:00
a43922ccbf Boot hashbrown (#5505)
As of Rust 1.36.0, hashbrown now implements the HashMap in std (which
implements HashSet).

https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html#a-new-hashmapk,-v%3E-implementation
2019-08-12 16:46:49 -06:00
687818aad6 Run sdk-c through clippy separately (#5504) 2019-08-12 16:41:17 -06:00
b7a5136136 Helper functions for shreds (#5493) 2019-08-12 15:27:58 -07:00
0fde19239b Rate limit counter metrics points to one per second (#5496)
* Rate limit counter metrics points to one per second

* Remove old env var

* Test that metrics counter is incrementing

* Fix typo
2019-08-12 18:15:34 -04:00
771d1a78fd Bump libc from 0.2.60 to 0.2.61 (#5491)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.60 to 0.2.61.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.60...0.2.61)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-12 15:39:26 -06:00
a8eb0409b7 Fix gossip messages growing beyond blob size (#5460)
* fixed bloom filter math

* Add split each pull request into multiple pulls with different filters

* Rework CrdsFilter to generate all possible masks to cover the keyspace

* Limit the bloom sizes such that each pull request is no larger than mtu
2019-08-12 13:51:29 -07:00
b6151b5200 Solana-wallet: prevent duplicate pubkeys (#5497)
* Add helper function to compare wallet pubkey args for uniqueness

* Fix test
2019-08-12 14:01:55 -06:00
c68ebbb0a6 Parse system custom errors (#5494) 2019-08-12 14:00:55 -06:00
1b84092b94 Fix slots_since_snapshot in BankForks.add_root() (#5489) 2019-08-12 11:56:03 -07:00
b1d43ace14 Add columns for data and code shreds (#5461) 2019-08-12 10:03:57 -07:00
6085109171 Delete terminated GCP instances (#5490)
automerge
2019-08-12 08:28:58 -07:00
cd89f280b7 Remove decimal point from node count 2019-08-11 09:28:59 -07:00
54f4d13350 Validator log filter may now be reconfigured at runtime (#5473)
* Log filter may now be reconfigured at runtime

* Add RPC API and bash script to reconfigure the log filter
2019-08-10 22:54:46 -07:00
799d3b1575 Bump nix from 0.14.1 to 0.15.0 (#5488)
Bumps [nix](https://github.com/nix-rust/nix) from 0.14.1 to 0.15.0.
- [Release notes](https://github.com/nix-rust/nix/releases)
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-10 18:48:36 -06:00
b3b782988c Remove extra e 2019-08-10 14:38:41 -07:00
5e128f8cc2 Simplify commands by using keypair files 2019-08-10 13:16:06 -07:00
c8c0815144 Permit keypair files for create-validator-storage-account 2019-08-10 13:16:06 -07:00
d59aae4849 Disable validator sanity for edge/beta 2019-08-10 13:16:06 -07:00
342733be54 Correct arg 2019-08-10 13:16:06 -07:00
2da7601084 Update validator-stake.md 2019-08-10 01:50:03 -06:00
958c345f0c Add show-account command (#5485) 2019-08-09 22:48:57 -07:00
fe83c66686 Adjust staking instructions 2019-08-09 22:15:42 -07:00
5884469d11 count commitable in banking_stage (#5477) 2019-08-09 21:14:20 -07:00
9ee5f36068 Solana-wallet: print JSON RPC endpoint (#5482)
* Print RPC endpoint in use

* Fixup wallet-sanity
2019-08-09 20:23:53 -06:00
c02373493b Add print-slot subcommand (#5478)
automerge
2019-08-09 15:57:31 -07:00
4090600717 Remove deprecated arg (#5479)
automerge
2019-08-09 15:02:27 -07:00
8a4179da67 Add balance check to all wallet transactions (#5474)
* Add payer balance check to all wallet transactions

* Fix tests
2019-08-09 15:52:06 -06:00
ed093f86f9 harmonize percentage members (#5459)
* harmonize percentage members

* update tests

* update capitalization when burning fees

* verify capitalization in fee burn

* fixup
2019-08-09 13:58:46 -07:00
07a049aa59 include vote account in deactivate (#5476) 2019-08-09 12:55:21 -07:00
7b77fbd525 add stake_history sysvar (#5475) 2019-08-09 12:31:56 -07:00
e1e295e1b6 Solana-wallet: enable keypair use for pubkey args (#5470)
* Make clap value_names more verbose for positional args

* Update clap validation to check for pubkey|keypair file

* Update helper functions to process pubkey|keypair file

* Add parse pubkey|keypair file test

* Fix vote-account instruction

* Fix vote-account instruction moar
2019-08-08 18:10:09 -06:00
5b4ee36cfd Log more socket addresses at validator startup (#5471) 2019-08-08 15:38:23 -07:00
784943ecab unignore RUSTSEC 2019 0011 (#5365) 2019-08-08 14:53:02 -07:00
4f86c0b74a Rate limit transaction counters (#5447)
* Rate limit transaction counters

* @sakridge feedback

* Set default high metrics rate for multinode demo

* Fix tests

* Swap defaults and fix env var tests

* Only set metrics rate if not already set
2019-08-08 17:05:06 -04:00
5b4f24eabd economic design update 2019-08-08 21:12:25 +02:00
a2986d3b6b Bump solana_libra packages to v0.0.0 (#5469)
automerge
2019-08-08 12:00:34 -07:00
032d523737 Increase the amount of lamports a validator starts with (#5466)
automerge
2019-08-08 11:13:22 -07:00
238aa2133d Move local_cluster tests into own crate (#5465) 2019-08-08 11:04:33 -07:00
eaf1b91148 Expand testnet validator section in book (#5293)
* Expand validator section

* Add rpc-checks command suggestions

* Update commands; populate stake page; add testnet choice info

* Specify software version to download

* Filler text for empty sections
2019-08-08 11:42:17 -06:00
4ae48b56f3 Add cluster-version subcommand to return entrypoint versions (#5464) 2019-08-08 11:13:06 -06:00
8c15214923 Add --dev-halt-at-slot option (#5453) 2019-08-08 09:14:30 -07:00
7a603d72bf disallow withdraw of stake unless deactivated (#5457) 2019-08-07 20:29:22 -07:00
5b51bb27b6 Rpc to return software version (#5456)
* Add getSoftwareVersion rpc

* Add getSoftwareVersion to doc

* Rename to getVersion and return object

* Update jsonrpc-api.md
2019-08-07 20:06:27 -06:00
8231d2b672 Unfinalized program format is now same as mvir compiler outputs (#5458) 2019-08-07 17:16:42 -07:00
6597c71e23 Implement shred erasure recovery and reassembly (#5444)
* Implement shred erasure recovery and reassembly

* fixes and unit test

* clippy

* review comments, additional tests, and some fixes

* address review comments

* more tests and cleanup
2019-08-07 17:02:49 -07:00
e30ca01999 Only create more append_vecs when the account number grows (#5454)
We only need many append_vecs if the number of accounts is high,
so only create opportunistic ones as accounts are created.
2019-08-07 16:43:52 -07:00
12bb05c320 Fix dashboard mean tx/s stat (#5455) 2019-08-07 16:50:58 -04:00
8aa7a851ca Fix hardlinking across filesystem boundaries (#5449)
* Fix hardlinking across filesystem boundaries

* create output dir for snapshot tar
2019-08-07 13:12:53 -07:00
2a17e90b7b Add config get/set functionality to wallet (#5452)
automerge
2019-08-07 12:17:11 -07:00
f154a53e5e Bump socket2 from 0.3.10 to 0.3.11 (#5451)
Bumps [socket2](https://github.com/alexcrichton/socket2-rs) from 0.3.10 to 0.3.11.
- [Release notes](https://github.com/alexcrichton/socket2-rs/releases)
- [Commits](https://github.com/alexcrichton/socket2-rs/compare/0.3.10...0.3.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-07 10:18:17 -07:00
7911895b67 Improve bench-tps funding in move mode (#5442) 2019-08-07 08:55:01 -07:00
d6aaab0b2c Remove --snapshot-path 2019-08-07 07:59:28 -07:00
be9fa22db7 Bump hashbrown from 0.3.1 to 0.5.0 (#5450)
Bumps [hashbrown](https://github.com/rust-lang/hashbrown) from 0.3.1 to 0.5.0.
- [Release notes](https://github.com/rust-lang/hashbrown/releases)
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.3.1...v0.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-07 08:35:54 -06:00
b72c5689c9 Blow away snapshots directory on start (#5446) 2019-08-06 21:41:38 -07:00
9dcf3347f5 Refactor status cache and remove complex serialize/deserialize (#5335)
automerge
2019-08-06 18:47:30 -07:00
72e9492ca6 Handle new active_release_dir, even if semver already downloaded (#5431) 2019-08-06 12:58:50 -06:00
572e942413 Bump url from 2.0.0 to 2.1.0 (#5421)
Bumps [url](https://github.com/servo/rust-url) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.0.0...v2.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-06 10:16:40 -06:00
3ae9357a36 Bump hashbrown from 0.2.2 to 0.3.1 (#5381)
Bumps [hashbrown](https://github.com/rust-lang/hashbrown) from 0.2.2 to 0.3.1.
- [Release notes](https://github.com/rust-lang/hashbrown/releases)
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.2.2...v0.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-06 10:16:18 -06:00
1dbb5c8647 Deserialize snapshots (#5417)
* Deserialize snapshots
2019-08-05 22:53:19 -07:00
06d8c06119 Allow TdS CHANNEL_OR_TAG to be overridden from buildkite UI 2019-08-05 17:22:06 -07:00
cc0e455a51 Skip sanity on blockstreamer node at cluster boot.
It may not have caught up to the bootstrap leader yet...
2019-08-05 17:11:28 -07:00
a01520e694 Cargo.lock 2019-08-05 16:38:56 -07:00
c524d62ce0 Implement coding shred generation (#5415)
* Implemenet coding shred generation

* address review comments
2019-08-05 16:32:34 -07:00
dd4640e1ed Revert "Revert "Bump version to 0.18.0-pre1""
This reverts commit 42c7d57fc0.
2019-08-05 15:55:13 -07:00
42c7d57fc0 Revert "Bump version to 0.18.0-pre1"
This reverts commit 14f6d5c82b.
2019-08-05 15:53:55 -07:00
efd09ecd37 Revert fork metrics (#5427)
* Revert "Remove duplicate row (#5419)"

This reverts commit a81dd80d60.

* Revert "Log fork stake-percentage in metrics, and display (#5406)"

This reverts commit 92e419f1c7.
2019-08-05 15:53:36 -07:00
14f6d5c82b Bump version to 0.18.0-pre1 2019-08-05 15:11:44 -07:00
c7710fdd24 Add wallet get-slot command and document how to use it (#5424)
* Add wallet get-slot command and document how to use it

* ,
2019-08-05 13:17:03 -07:00
b5aa03dd7c Rename --config-dir to --ledger (progress towards deleting validator.sh) (#5423) 2019-08-05 12:42:52 -07:00
a81dd80d60 Remove duplicate row (#5419) 2019-08-05 11:45:52 -06:00
09ca92d416 Surface --voting-keypair to release users (#5420)
* Remove 'configured_flag' for vote/storage account, instead detect if they exist with the wallet

* Require --voting-keypair when using release binaries
2019-08-05 10:39:16 -07:00
56ed033233 Remove unused var 2019-08-04 21:29:20 -07:00
e56efe237c Move testnet from ec2 tp gcp 2019-08-04 21:02:27 -07:00
3f0ff45de0 Move edge/beta testnets from ec2 to gcp 2019-08-04 20:42:28 -07:00
3709dc6558 Reduce size of cpu-only gcp instances 2019-08-04 20:36:23 -07:00
6ec0318bae Reduce AWS node count 2019-08-03 23:50:52 -07:00
92e419f1c7 Log fork stake-percentage in metrics, and display (#5406)
* Log fork stake percentage data

* Add fork stake percentage to dashboard

* Call out parent slot
2019-08-02 19:16:23 -06:00
ccc0f2d956 show-stake-account now works for reward pool accounts (#5416)
automerge
2019-08-02 17:15:26 -07:00
80bb0158b7 Initial implementation of packet shredder (#5401)
* Initial implementation of packet shredder

* tests

* clippy

* review comments
2019-08-02 15:53:42 -07:00
f12592826f Disable snapshots #5411 2019-08-02 15:48:51 -07:00
8d38777c1f Remove stray --stake 0 2019-08-02 15:06:40 -07:00
832dfd4ab0 Change bank to not create default (#5409) 2019-08-02 14:46:53 -07:00
04d2db4dbb Force boot_from_snapshot=0 for now 2019-08-02 14:21:45 -07:00
6f269e5a0e Improve error messages when a vote account is rejected for delegation (#5407) 2019-08-02 10:09:09 -07:00
eb3991b9ba Replay stage log message nits (#5408) 2019-08-02 10:08:42 -07:00
aee63f15c2 Rename state.tgz to snapshot.tgz to match rpc service 2019-08-02 10:07:29 -07:00
aced847735 validator-info --help text tweaks (#5402) 2019-08-02 08:30:08 -07:00
e360e63b74 getProgramAccounts to check for existing validator-info (#5404) 2019-08-02 07:40:54 -07:00
a6c4525998 RPC to the bootstrap leader instead of the local node, which may not yet be fully initialized 2019-08-01 23:34:55 -07:00
77b196a226 Show vote account details 2019-08-01 23:34:25 -07:00
b6b9c2cf56 Delegate stake from the pre-created identity keypair if it exists 2019-08-01 23:00:15 -07:00
59d900977d Avoid airdroping when airdrops are disabled 2019-08-01 22:43:09 -07:00
0f5acb86d3 wallet: Refuse to delegate stake to a vote account with a stale root slot (#5282)
* Refuse to delegate stake to a vote account with a stale root slot

* Remove sdk-c from the virtual manifest temporarily

For an unknown reason |cargo clippy| is getting stuck in CI
intermittently when trying to build this crate.
2019-08-01 21:08:24 -07:00
911dee24c5 Give a unique port range for each validator node (#5397)
automerge
2019-08-01 14:37:59 -07:00
f03e066ec5 Bump log from 0.4.7 to 0.4.8 (#5382)
Bumps [log](https://github.com/rust-lang/log) from 0.4.7 to 0.4.8.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang-nursery/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-01 14:31:18 -07:00
f7d3f55566 fix epoch_stakes again (#5396) 2019-08-01 14:27:47 -07:00
4298b1f595 Document the --limit-ledger-size flag (#5393) 2019-08-01 14:06:40 -07:00
870503ee36 Introduce delegate-stake.sh for adding stake to a validator.sh (#5380) 2019-08-01 13:48:00 -07:00
4d14abbd04 Document getSlot 2019-08-01 13:16:23 -07:00
5212b2716c Don't rebuild/retest release tags (#5385) 2019-08-01 13:11:42 -07:00
97c0573c7d Change default location of solana.h to OUT_DIR (#5389)
automerge
2019-08-01 12:33:30 -07:00
43cc9fcb1d Update mean tx/s to use the correct counter (#5390) 2019-08-01 15:30:36 -04:00
47b5ba44e9 Add tag suffix to remaining metrics host_id queries (#5388) 2019-08-01 14:43:13 -04:00
e95397e0a8 Clarify that host_id is a tag in metrics influx queries (#5387) 2019-08-01 14:34:07 -04:00
c7cdf8ba93 Bump winreg from 0.6.1 to 0.6.2 (#5367)
Bumps [winreg](https://github.com/gentoo90/winreg-rs) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/gentoo90/winreg-rs/releases)
- [Commits](https://github.com/gentoo90/winreg-rs/compare/v0.6.1...v0.6.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-01 08:48:29 -07:00
6ee734e1b4 Depersonalize paths 2019-08-01 08:36:54 -07:00
3ab1b46ef7 Fix vote metrics (#5377) 2019-08-01 09:11:49 -04:00
22891b39d6 bench-exc: readme changes (#5373)
replace token pair, direction
replace "swapper" with "matcher"
2019-07-31 23:08:56 -06:00
b6ce7ec782 Default to solana=info log level for drone (#5374)
Otherwise prints nothing..
2019-07-31 20:00:52 -07:00
a41c7451f1 Add testnet prefix to the metrics queries without it (#5376) 2019-07-31 21:07:25 -04:00
6cb2040a1b Snapshot Packaging Service (#5262)
* Snapshot serialization and packaging
2019-07-31 17:58:10 -07:00
937f9ad049 Teach solana-install about release channels (#5372)
$ solana-install init edge  # <-- setup an install using the edge channel
$ solana-install update     # <-- update to the latest edge channel release
2019-07-31 17:30:17 -07:00
c2fc0f2418 Plumb libra accounts to genesis (#5333)
* Plumb move_loader to genesis

* Remove core dependency on genesis-programs
2019-07-31 16:10:55 -07:00
9278201198 fix epoch_stakes (#5355)
* fix epoch_stakes

* fix stake_state to use stakers_epoch

* don't allow withdrawal before deactivation
2019-07-31 15:13:26 -07:00
149a63100d remove no-snapshot option from tds testnet (#5368) 2019-07-31 14:51:54 -07:00
d09afdbefe Synchronize and cleanup instruction processor lists (#5356) 2019-07-31 14:28:14 -07:00
1d6bafbc77 Move tds to edge (#5366) 2019-07-31 14:18:05 -07:00
01d2b4e952 Bump jsonrpc-http-server from 12.1.0 to 13.0.0 (#5361)
* Bump jsonrpc-http-server from 12.1.0 to 13.0.0

Bumps [jsonrpc-http-server](https://github.com/paritytech/jsonrpc) from 12.1.0 to 13.0.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v12.1.0...v13.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Update all jsonrpc crates to v13.0.0
2019-07-31 14:30:47 -06:00
05f3437601 Handle paying for move transactions with unique solana system transactions (#5317) 2019-07-31 11:15:14 -07:00
f859243191 Remove unused var 2019-07-31 10:51:30 -07:00
9ddc25283c Adapt validator sanity args 2019-07-31 10:46:25 -07:00
388d4a8592 Remove obsolete --generate-snapshots argument 2019-07-31 10:26:22 -07:00
0b0b679120 exchange update: replace direction (#5362)
* replace direction with OrderSide

* bench exchange: update direction uses to OrderSide
2019-07-31 11:19:09 -06:00
3b752876ac Bump ws from 0.8.1 to 0.9.0 (#5360)
Bumps [ws](https://github.com/housleyjk/ws-rs) from 0.8.1 to 0.9.0.
- [Release notes](https://github.com/housleyjk/ws-rs/releases)
- [Changelog](https://github.com/housleyjk/ws-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/housleyjk/ws-rs/compare/v0.8.1...v0.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-31 10:13:52 -07:00
9b8b7dbfd7 Avoid setting RUST_LOG to the empty string (#5338) 2019-07-31 10:13:30 -07:00
c209e14e40 validator.sh now supports an --entrypoint arg, mimicking the solana-validator CLI API (#5363) 2019-07-31 09:54:39 -07:00
6df1f6450f Drop rsync address 2019-07-31 09:24:49 -07:00
6d7cb23c61 Add command to create genesis accounts (#5343) 2019-07-30 23:43:12 -07:00
bd7e269280 Kill rsync (#5336)
automerge
2019-07-30 22:43:47 -07:00
b05b42d74d Reduce max blob size (#5345)
* Reduce max blob size

* ignore test_star_network_push_rstar_200
2019-07-30 22:15:07 -07:00
af733a678a Bump serde_derive from 1.0.97 to 1.0.98 (#5314)
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.97 to 1.0.98.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.97...v1.0.98)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-30 21:45:34 -07:00
8a5045f05c Bump timeouts for publish docker/tarball builds 2019-07-30 20:09:47 -07:00
4a336eb5ff ValidatorConfig path reform: use Path/PathBuf for paths (#5353) 2019-07-30 19:47:24 -07:00
b7e08052ae Bump serde from 1.0.97 to 1.0.98 (#5315)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.97 to 1.0.98.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.97...v1.0.98)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-30 19:46:50 -07:00
f6a4acfac3 Bump dirs from 2.0.1 to 2.0.2 (#5312)
Bumps [dirs](https://github.com/soc/dirs-rs) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/soc/dirs-rs/releases)
- [Commits](https://github.com/soc/dirs-rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-30 19:46:39 -07:00
68eff230f0 Fix name-id reporting dependency (#5354) 2019-07-30 16:22:20 -07:00
c78db6a94b ledger path reform: use Path/PathBuf instead of strings (#5344) 2019-07-30 15:53:41 -07:00
294d9288d2 Update remote-node.sh to use bootstrap-leader.sh (#5352) 2019-07-30 15:53:03 -07:00
7dc5cc26a6 Make max_epoch check in next_leader_at in leader schedule (#5342) 2019-07-30 15:51:02 -07:00
d7a2b790dc Limit the size of gossip push and gossip pull response (#5348)
* Limit the size of gossip push and gossip pull response

* Remove Default::default

* Rename var
2019-07-30 15:43:17 -07:00
a7a10e12c7 Forward transactions as packets instead of blobs (#5334)
* Forward transactions as packets instead of blobs

* clippy
2019-07-30 14:50:02 -07:00
8d243221f0 Ignore flaky local cluster tests (#5347)
* Add logging to local_cluster tests

* Ignore flaky test_leader_failure_4, test_repairman_catchup

And crashing banking benchmarks.
2019-07-30 13:48:46 -07:00
84368697af Fix metrics when leader does not report metrics (#5291) 2019-07-30 16:18:33 -04:00
4a57cd3300 Update bank.rs 2019-07-30 11:33:06 -07:00
2214d2dbb5 Eject bootstrap-leader support from fullnode.sh (#5301) 2019-07-29 21:25:28 -07:00
50a991fdf9 add executable checks to verify_instruction (#5326) 2019-07-29 15:29:20 -07:00
4e093525c7 Default to error logs, override with info only for those programs that need it (#5321)
* Revert "Revert "Default log level to to RUST_LOG=solana=info (#5296)" (#5302)"

This reverts commit 7796e87814.

* Default to error logs, override with info only for those programs that need it
2019-07-29 10:57:00 -07:00
506b305959 Move coverage back to the default queue (#5318) 2019-07-28 22:20:54 -07:00
e83efcfc80 Tidy test-checks.sh (#5319) 2019-07-28 22:19:03 -07:00
4f1c881227 Add --use_move mode to bench-tps (#5311)
* Add --use_move mode to bench-tps

substitute for global flag.

* Use cuda queue for coverage build.
2019-07-28 10:43:42 -07:00
a642168369 Add move to bench-tps (#5250) 2019-07-27 15:28:00 -07:00
8d296d0969 Move credit-only and Move proposals to the implemented section of the book (#5308)
automerge
2019-07-27 15:08:44 -07:00
68b11c1c29 Pull all libra crates from crates.io (#5306) 2019-07-27 15:06:27 -06:00
c209718a6f Add libray_api (#5304)
Simple move-based payment api
2019-07-27 12:11:51 -07:00
b8835312bb Update cargo.toml files to 0.18.0-pre0 (#5303) 2019-07-27 11:42:06 -06:00
7796e87814 Revert "Default log level to to RUST_LOG=solana=info (#5296)" (#5302)
This reverts commit c63a38ae57.
2019-07-27 07:46:45 -07:00
64c770275b Integrate Move VM into main build (#5229)
* Integrate Move VM into top-level build

* Switch to protoc-free libra
2019-07-27 06:59:46 -06:00
855f7ff352 Move Move deps from a branch to a tag (#5300) 2019-07-26 23:51:42 -06:00
b59a99111c Bump url from 1.7.2 to 2.0.0 (#5247)
* Bump url from 1.7.2 to 2.0.0

Bumps [url](https://github.com/servo/rust-url) from 1.7.2 to 2.0.0.
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v1.7.2...v2.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Adapt to url 2.0.0
2019-07-26 21:46:38 -07:00
252257fe66 Rewrite multinode-demo/replicator.sh to avoid fullnode.sh (#5299) 2019-07-26 19:00:34 -07:00
e2c9d87d91 Move verify to finalize (#5297)
automerge
2019-07-26 17:51:07 -07:00
9d34b80ed6 Upgrade to all the latest packages our existing Cargo.toml will allow (#5298)
automerge
2019-07-26 17:21:01 -07:00
c63a38ae57 Default log level to to RUST_LOG=solana=info (#5296) 2019-07-26 16:29:16 -07:00
20da2604f8 storage-keypair argument should not be required (#5295)
automerge
2019-07-26 15:18:55 -07:00
33de2cad6d Replace TokenPair in exchange (#5292)
* simplify token pair representation, rename to AssetPair for forward compat.

* update bench exchange TokenPair use
2019-07-26 14:31:08 -06:00
aef7bae60d Let grace ticks to roll over into multiple leader slots (#5268)
* Let grace ticks to roll over into multiple leader slots

* address review comments
2019-07-26 11:33:51 -07:00
54ac7ed1ea Voting/storage keypair can now be provided by the user (#5288) 2019-07-26 11:05:02 -07:00
0180246680 Clean up argument parsing (#5290)
automerge
2019-07-26 10:37:03 -07:00
dab7de7496 Add confidence cache to BankForks (#5066)
* Add confidence cache to BankForks

* Include stake-weighted lockouts in cache

* Add cache test

* Move confidence cache updates to handle_votable_bank

* Prune confidence cache on prune_non_root()

* Spin thread to process aggregate_stake_lockouts

* Add long-running thread for stake_weighted_lockouts computation
2019-07-26 11:27:57 -06:00
feaf29792f Error cleanly on show vote/stake/storage account pubkey mismatch (#5289)
Also deverb vote/stake account variables
2019-07-26 09:34:12 -07:00
5f09aa36b3 Drop code supporting no leader rotation (#5286) 2019-07-26 09:26:27 -07:00
d6c74f438a Delete vestigal --vote-account argument (#5287)
automerge
2019-07-26 08:42:48 -07:00
349ebec629 Bump serde from 1.0.94 to 1.0.97 (#5285)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.94 to 1.0.97.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.94...v1.0.97)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-26 07:22:25 -06:00
f4554be72c add vote withdraw (#5284) 2019-07-25 23:20:47 -07:00
8537da19bb groom accounts_db (#5283) 2019-07-25 22:59:28 -07:00
d1eff5d607 Merge create-stake-account into delegate-stake (#5280) 2019-07-25 16:53:43 -07:00
19e4f70244 Change default behavior to remove a prerelease tag if present instead of a minor version bump 2019-07-25 16:33:24 -07:00
a233a1c822 Fix poh recorder not flushing virtual ticks immediately (#5277)
* Fix poh not flushing virtual ticks immediately

* Fix test_would_be_leader_soon
2019-07-25 11:08:44 -07:00
27bc0a22dd Add support for invoking and publishing Move modules (#5278) 2019-07-25 09:30:24 -07:00
7ee8383e02 Bump serde_derive from 1.0.94 to 1.0.97 (#5279)
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.94 to 1.0.97.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.94...v1.0.97)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-25 06:47:24 -06:00
bab0f6be1e Store Move account data in a deterministic order (#5276) 2019-07-24 21:43:14 -07:00
535df0026d Fixes for Blocktree space amplification and slot deletion (#5266)
* Fixes for Blocktree space amplification and slot deletion
2019-07-24 17:28:08 -07:00
3bd35dd7cc Remove usage of api.testnet.solana.com (#5274) 2019-07-24 17:06:26 -07:00
39d29fab82 Exchange update cont. (#5272)
* Trade -> Order for keyedAcct indices

* rename deserialize_trade -> deserialize_order

* rename do_order_cancel params

* rename vars *_trade -> *_order
2019-07-24 17:49:10 -06:00
fbfe1a59a6 bump timeout 2019-07-24 13:53:08 -07:00
77c79effc1 Update github token 2019-07-24 13:50:49 -07:00
83540087c3 Switch to forked libra packages (#5270)
* Switch to forked libra packages

* Don't Cargo.lock lib crates
2019-07-24 14:21:22 -06:00
937816e67b Post warning if window service isn't receiving any data (#5269)
automerge
2019-07-24 12:46:10 -07:00
c3a941086d Remove more unwraps (#5267)
automerge
2019-07-24 12:30:43 -07:00
1046c5e32c Adjust log levels (#5265)
automerge
2019-07-24 10:15:49 -07:00
baac8d2590 Upgrade libra (#5264)
automerge
2019-07-24 09:56:29 -07:00
610a02c518 Bump jsonrpc-ws-server from 12.0.0 to 12.1.0 (#5261)
Bumps [jsonrpc-ws-server](https://github.com/paritytech/jsonrpc) from 12.0.0 to 12.1.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v12.0.0...v12.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-24 10:52:44 -06:00
444bd7a702 Bump semver from 0.7.0 to 0.9.0 (#5260)
Bumps [semver](https://github.com/steveklabnik/semver) from 0.7.0 to 0.9.0.
- [Release notes](https://github.com/steveklabnik/semver/releases)
- [Commits](https://github.com/steveklabnik/semver/compare/v0.7.0...v0.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-24 10:52:20 -06:00
7afc61e0b9 Cap Move program's execution (#5259) 2019-07-24 08:06:03 -07:00
d4d9bec2a9 NDEBUG=1 2019-07-24 07:28:16 -07:00
d647a4ec57 Bump publish-crate.sh timeout 2019-07-23 22:12:34 -07:00
536b4c1a25 Export genesis creation function (#5252) 2019-07-23 21:34:17 -07:00
547a7a345f Add logs to indicate when the leader changes (#5253) 2019-07-23 22:19:20 -04:00
26e380e53c Sort bench-tps keypairs (#5254)
automerge
2019-07-23 17:46:33 -07:00
8a12ed029c make accounts_db own the directory paths (#5230)
* change paths to something accounts_db (the singleton) owns, fixes SIGILL

* fail deserialize if paths don't work
serialize paths, too

* test that paths are populated from a bank snapshot
2019-07-23 13:47:48 -07:00
b41e8333b1 Add support to install a specific Solana version directly from the Github releases (#5248) 2019-07-23 12:51:10 -07:00
8f646e21d7 Bump cc from 1.0.37 to 1.0.38 (#5245)
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.37 to 1.0.38.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.37...1.0.38)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-23 10:51:50 -07:00
5608af0246 Cleanup and fix Move account invoking (#5244)
* Remove deps, geneerate genesis, cleanup

* Fix tests, specify sender in ix data

* nits
2019-07-23 08:54:34 -06:00
17b9ea3e3b Update buildkite-secondary.yml 2019-07-23 07:33:13 -07:00
88d4d1db7a Update buildkite.yml 2019-07-23 00:20:05 -07:00
cab4c88c71 Bump timeouts 2019-07-22 23:52:30 -07:00
4ec5a899f5 Check longer 2019-07-22 23:41:42 -07:00
c2f74330ef Drop ring crate (#5242) 2019-07-22 23:11:40 -07:00
2c8e0bcf87 Introduce --config-dir to avoid shipping clear-config.sh (#5241) 2019-07-22 22:59:02 -07:00
4966ab528e validator.sh: Add --reset-ledger option (#5235)
* Add --recreate-ledger option

* --reset-ledger
2019-07-22 22:20:54 -07:00
5f81a67298 Add --no-deploy option to allow restarting nodes without a software update (#5182) 2019-07-22 21:38:26 -07:00
a0ccdccff1 Call book/build.sh from docker (#5237)
* Call book/build.sh from docker

* debug

* Revert "debug"

This reverts commit 32986b73b7.
2019-07-22 21:37:43 -07:00
735c7c9841 Add manual publish for book and create book-beta (#5112) 2019-07-22 17:45:00 -06:00
3a69459645 Surface validator pubkey in metrics (#5227) 2019-07-22 16:08:21 -07:00
21cef2fe21 Do not attempt to create solana user multiple times (#5228)
* Do not attempt to create solana user multiple times
2019-07-22 16:13:08 -06:00
038c6ea0a7 Bump solana_libra to v0.0.0.1 (#5225)
automerge
2019-07-22 14:17:06 -07:00
81f4fd56c7 Log the repairee pubkey when unable to serve them (#5222)
automerge
2019-07-22 14:13:29 -07:00
264a3d7dde Increase ticks_per_slot for banking benchmark (#5221) 2019-07-22 13:57:28 -07:00
43bf176fab more granular check for memoffset ignore in audit (#5219)
* more granular check for memoffset ignore in audit

* debugggin

* debugggin

* debugggin

* debugggin

* debugggin
2019-07-22 13:36:27 -07:00
baec17fdf4 Fix some nightly warnings (#5218) 2019-07-22 12:51:02 -07:00
186b514ebb Embed Move (#5150)
automerge
2019-07-22 12:01:52 -07:00
2d42c1e33e add root to terminology (#5209)
* add root to terminology

* review feedback
2019-07-22 09:36:20 -07:00
9cef522eee Bump walkdir from 2.2.8 to 2.2.9 (#5204)
Bumps [walkdir](https://github.com/BurntSushi/walkdir) from 2.2.8 to 2.2.9.
- [Release notes](https://github.com/BurntSushi/walkdir/releases)
- [Commits](https://github.com/BurntSushi/walkdir/compare/2.2.8...2.2.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-22 09:35:46 -07:00
a6302acfd5 Bump jsonrpc-http-server from 12.0.0 to 12.1.0 (#5211)
Bumps [jsonrpc-http-server](https://github.com/paritytech/jsonrpc) from 12.0.0 to 12.1.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v12.0.0...v12.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-22 10:34:27 -06:00
ac72265c6b Request a uniform timezone 2019-07-22 09:25:36 -07:00
09da6b4b48 Encourage setting an RPC port 2019-07-22 08:23:36 -07:00
0d8f5379a0 Add time units 2019-07-22 08:22:21 -07:00
02c7b89a8f Update location of TdS external accounts file url 2019-07-21 17:38:15 -07:00
90ae33c200 Update incoming_webhook 2019-07-21 11:27:19 -07:00
55c879ce2d Update S3 key 2019-07-21 11:18:17 -07:00
1b5a332239 Adjustments for appveyor server 2019-07-21 09:21:28 -07:00
595017499e accounts_index: RwLock per-account (#5198)
* accounts_index: RwLock per-account

Lots of lock contention on the accounts_index lock,
only take write-lock on accounts_index if we need to insert/remove an
account.
For updates, take a read-lock and then write-lock on the individual
account.

* Remove unneeded enumerate and add comments.
2019-07-20 17:58:39 -07:00
9b1471acae Upgrade to Rust 1.36.0 (#5206)
* Upgrade to Rust 1.36.0

* Move test-checks.sh back to stable

* update nightly version to 2019-07-19

* use both nightly and stable for checks
2019-07-20 18:53:16 -06:00
b766ac0899 rent (#5205) 2019-07-20 16:28:17 -07:00
e6b525a614 disable audit until crossbeam epoch release (#5208) 2019-07-20 15:50:26 -07:00
a07b17b9b5 Drop older slots in the ledger (#5188)
* Add facility to delete blocktree columns in range

* Add ledger cleanup service

* Add local_cluster test
2019-07-20 13:13:55 -07:00
9d2940d487 Show wallet commands for better log debugging 2019-07-19 20:21:51 -07:00
6969ece2dd Ensure CI_OS_NAME is set for appveyor server 2019-07-19 20:06:32 -07:00
48fc35884c Add Transaction Documentation (#5115) 2019-07-19 16:42:50 -06:00
0958905df8 Bump reqwest from 0.9.18 to 0.9.19 (#5201)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.18 to 0.9.19.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.18...v0.9.19)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-19 16:13:34 -06:00
c95cda51c9 Fix internal node lamport funding and staking allocation logic (#5192)
* Plumb node funding from genesis

* Cleanup naming convention

*  Fix balance vs stake yml file logic

* Lamps not Stakes
2019-07-19 12:51:38 -06:00
3f54c0f1a6 Update struct order arbitrarily to match rpc output (#5197) 2019-07-19 11:45:04 -06:00
4684faa5e8 Bump jsonrpc-core from 12.0.0 to 12.1.0 (#5143)
Bumps [jsonrpc-core](https://github.com/paritytech/jsonrpc) from 12.0.0 to 12.1.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v12.0.0...v12.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-19 09:59:56 -07:00
111d0eb89b runtime: Add bench for accounts::hash_internal_state (#5157)
* runtime: Add bench for accounts::hash_internal_state

* fixup! cargo fmt

* fixup! cargo clippy

* fixup! Use a more representitive number of accounts

* fixup! More descriptive name for accounts creation helper
2019-07-19 10:32:29 -06:00
8b69998379 Lower recovery messages (#5181) 2019-07-19 09:20:14 -07:00
a21251dfea Fix up signal handling 2019-07-19 08:35:22 -07:00
06cd7c1020 Disable restart 2019-07-19 08:35:22 -07:00
782846f295 Document fetch-perf-libs.sh when building with CUDA 2019-07-19 08:35:22 -07:00
19e131d710 Bump jsonrpc-derive from 12.0.0 to 12.1.0 (#5193)
Bumps [jsonrpc-derive](https://github.com/paritytech/jsonrpc) from 12.0.0 to 12.1.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v12.0.0...v12.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-19 07:34:48 -07:00
9fd34cd985 Bump untrusted from 0.6.2 to 0.7.0 (#5194)
Bumps [untrusted](https://github.com/briansmith/untrusted) from 0.6.2 to 0.7.0.
- [Release notes](https://github.com/briansmith/untrusted/releases)
- [Commits](https://github.com/briansmith/untrusted/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-19 07:34:04 -07:00
adfb8ff2a1 Add getEpochInfo() and getLeaderSchedule() RPC methods (#5189)
* Add getLeaderSchedule() RPC method

* Add getEpochInfo() RPC method

* Add JSON RPC docs
2019-07-19 07:31:18 -07:00
83aa609540 Bump winreg from 0.6.0 to 0.6.1 (#5149)
Bumps [winreg](https://github.com/gentoo90/winreg-rs) from 0.6.0 to 0.6.1.
- [Release notes](https://github.com/gentoo90/winreg-rs/releases)
- [Commits](https://github.com/gentoo90/winreg-rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-18 21:24:40 -07:00
1e1cb7c57c Select stable rust version (#5180) 2019-07-18 21:19:07 -07:00
cdbd1b908a Ensure validator process is kill when stdout/stderr are redirected (#5179) 2019-07-18 21:18:48 -07:00
a12e7a2e33 Separate build and deploy steps in net/net.sh (#5184)
So one can keep the network up while a new experiment is building
2019-07-18 18:59:47 -07:00
25080f1a33 fix book typos (#5185) 2019-07-18 17:24:22 -07:00
afa05acb32 more replay_stage grooming (#5163) 2019-07-18 14:54:27 -07:00
d47caf2af8 add information to panic (#5177) 2019-07-18 14:41:32 -07:00
a3a91ba222 Fix misleading variable name (#5176)
automerge
2019-07-18 14:07:32 -07:00
751b54b60b Skip sleeping in replay stage if a bank was recently processed (#5161)
* Skip sleeping in replay stage if a bank was recently processed

* Remove return
2019-07-18 12:04:53 -07:00
488dd0e563 Keybase: s/id/username (#5165) 2019-07-18 12:16:13 -06:00
b58558ea4e net/: startnode/stopnode now works for blockstreamer/replicator nodes (#5146)
* startnode/stopnode now works for blockstreamer/replicator nodes

* Plumb --skip-ledger-verify through net/
2019-07-17 19:26:23 -07:00
6ad9dc18d8 Add ability to prune ledger (#5128)
* Add utility to prune the ledger

* Add tests

* Fix clippy

* Fix off by one

* Rework to force delete every column

* Minor fixup
2019-07-17 14:42:29 -07:00
027ebb6670 no more OUT_DIR (#5139)
* no more OUT_DIR

* no more OUT_DIR

* more information about failure
2019-07-17 14:27:58 -07:00
0ffd91df27 groom poh_recorder (#5127)
* groom poh_recorder

* fixup

* nits

* slot() from the outside means "the slot the recorder is working on"

* remove redundant check

* review comments, put next_tick back in the "is reset" check

* remove redundant check
2019-07-17 14:10:15 -07:00
10d85f8366 Add weighted shuffle support for values upto u64::MAX (#5151)
automerge
2019-07-17 12:44:28 -07:00
7aad427511 Bump libloading from 0.5.1 to 0.5.2 (#4950)
Bumps [libloading](https://github.com/nagisa/rust_libloading) from 0.5.1 to 0.5.2.
- [Release notes](https://github.com/nagisa/rust_libloading/releases)
- [Commits](https://github.com/nagisa/rust_libloading/compare/0.5.1...0.5.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-17 09:29:45 -06:00
bbd0455418 Bump log from 0.4.6 to 0.4.7 (#5144)
Bumps [log](https://github.com/rust-lang/log) from 0.4.6 to 0.4.7.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang-nursery/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.6...0.4.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-17 09:25:57 -06:00
5174b3bc3f use precalculated max_tick_height (#5134) 2019-07-17 00:19:38 -07:00
f88c72c41e stress tweaks (#5140) 2019-07-16 22:04:40 -07:00
9f678cc32a Show stake pubkey 2019-07-16 20:10:15 -07:00
57036fbcc1 Check harder on crates.io for recently published crates (#5136) 2019-07-16 19:09:49 -07:00
349e5001d6 clear-config.sh now works with a secondary disk (#5135) 2019-07-16 19:09:14 -07:00
94db9cd412 Reduce banking_stage bench copy-paste code and fix programs bench (#4926) 2019-07-16 18:28:18 -07:00
b505a0df22 Throw more threads at hash_internal_state (#5023) 2019-07-16 16:58:30 -07:00
acf096c5f7 Add cross-program invocation proposal (#4922)
automerge
2019-07-16 16:36:05 -07:00
e8583f5cfe Bump tokio from 0.1.21 to 0.1.22 (#4935)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 0.1.21 to 0.1.22.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-16 16:48:11 -06:00
5825b967d2 Check for valid pid before kill in node stop script (#5126) 2019-07-16 14:31:15 -07:00
bf5bce50a4 Fix stake pruning test (#5124) 2019-07-16 13:20:03 -04:00
77ea8b9b3e Add LoaderInstruction::InvokeMain (#5116)
* Remove unreachable, untested runtime check

* tx_data -> ix_data

* Add LoaderInstruction::InvokeMain

* Add test and allow loaders to be registered statically.

* Fix clippy error
2019-07-16 10:45:32 -06:00
176cec6215 Update Rust-BPF Sysroot (#5122) 2019-07-16 07:42:22 -08:00
5ab4975c44 Improve validator-info CLI (#5121)
* Fix index OOB panic

* Handle 'get' empty validator-info responses properly

* Improve 'get' argument flow

* Improve arg help text

* Improve 'publish' argument flow

* Update book doc
2019-07-16 09:22:55 -06:00
7e60ee39d9 Add missing dash 2019-07-16 07:27:35 -07:00
3ea2933e2d It's 2019 2019-07-15 20:58:21 -07:00
fe87c05423 fix transaction_count (#5110)
* fix transaction_count

* add sig count to bank hash
2019-07-15 13:42:59 -07:00
6b86f85916 Add C API (#5072) 2019-07-15 13:17:17 -06:00
04649de6a6 Boot remote native loads, take 2 (#5106)
* Drop dependencies on remote native loads

* Remove remote native loads
2019-07-15 13:16:09 -06:00
92d78451b1 Update expected keybase-pubkey location (#5104)
automerge
2019-07-15 09:28:06 -07:00
0c87928132 Keybase pubkey file instructions and verification for validators (#5090)
* Document publishing a pubkey on keybase

* Verify keybase-pubkey
2019-07-14 23:48:50 -06:00
db7e78bf99 Add node zone and count to ENV (#5100)
* Add node zone and count to ENV
2019-07-14 22:40:18 -06:00
adecd4cfdc Pull testnet vars up to buildkite env (#5098) 2019-07-14 20:27:49 -06:00
40faaef9da Revert "Logging (#5017)" (#5096)
This reverts commit b50a3bae72.
2019-07-14 18:48:15 -07:00
9b54528c8e Fix some nightly warnings (#5093)
ONCE_INIT => Once::new
Box<Error> => Box<dyn Error>
2019-07-14 13:37:55 -07:00
440d006ec1 Plumb --no-snapshot in from CI (#5077)
* Plumb --no-snapshot in from CI
2019-07-14 13:17:30 -06:00
6c49b10784 Purge remaining uses of Locktower (#5076)
automerge
2019-07-13 00:24:15 -07:00
c858d1dbb3 Bump tempfile from 3.0.8 to 3.1.0 (#4882)
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.0.8 to 3.1.0.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.0.8...v3.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-12 23:57:35 -07:00
741a0a8a4e Correctly decode update manifest (#5086)
automerge
2019-07-12 22:55:55 -07:00
16b6576839 use precalculated max_tick_height (#5084) 2019-07-12 22:25:48 -07:00
6accf21229 Add epoch voting history to show-vote-account (#5080) (#5085)
automerge
2019-07-12 22:01:12 -07:00
d2b21ce8d0 Stop trying to publish crates that are unpublishable 2019-07-12 21:53:09 -07:00
b01990d480 Avoid trying to republish crates already on crates.io 2019-07-12 21:43:16 -07:00
d7fdfb7e21 Give publish-crate more time 2019-07-12 20:28:10 -07:00
19fe468dbc Add design proposal to embed Libra's Move (#5067)
* Add design proposal to embed Libra's Move

* Apply review feedback

* Pipeline VM -> the runtime
* defines -> define
2019-07-12 21:12:55 -06:00
259a5130a8 whoops (#5083) 2019-07-12 19:08:51 -07:00
0d27515d09 tmp dirs target to farf (#5079) 2019-07-12 18:28:42 -07:00
1c966aac25 Facility to generate a blocktree prune list using ledger tool (#5041)
automerge
2019-07-12 16:58:13 -07:00
d2b6c2e0ce syscall work, rename syscall to sysvar, rename current to clock (#5074)
* syscall work, rename syscall to sysvar, rename current to clock

* missed one

* nit
2019-07-12 16:38:15 -07:00
7aecb87bce Add a version field to blobs (#5057) 2019-07-12 13:43:19 -07:00
4a02914b30 Add pub key authorized list 2019-07-12 12:34:17 -07:00
7c12ecbe81 Fix unnecessary computation (#5055) 2019-07-12 11:30:37 -07:00
f093377805 apt-get update before installing certbot (#5054)
* apt-get update before installing certbot
2019-07-12 11:50:40 -06:00
5ac173d208 Enable GPUs and secondary disks for TdS net, pull external account file (#5031)
* Enable V100 GPUs over 3 regions for TdS cluster

* Turn on secondary config-local drive for tds net

* Enable long args bypass for GPU machine details

* bypass quoted long arg

* Pull external account file from wget

* typo

* Symlink config-local instead of changing the path variables

* Fix link path
2019-07-12 09:38:47 -06:00
9f58318fc5 Add --no-snapshot to disable booting a validator from a snapshot (#5050)
automerge
2019-07-11 21:03:17 -07:00
ebcdc06dc3 Restore ledger-tool print and json commands (#5048)
* Restore ledger-tool print and  json commands

* Remove obsolete read_ledger()
2019-07-11 20:33:36 -07:00
22315d88e7 Fix credit only commit_credits race (#5028)
* Fix credit only drain race

* Refactor commit credits for tests

* Fix tests to use commit_credits_unsafe
2019-07-11 18:46:49 -07:00
0a36a78133 Fix replicator segment selection (#5046) 2019-07-11 18:31:41 -07:00
a25446f045 Pull in more Rust-BPF compatible built-ins (#5043) 2019-07-11 15:16:30 -08:00
2860d2fe27 Pull in support for Rust-BPF stack argument passing (#5038) 2019-07-11 14:27:18 -08:00
e4861f52e0 Add support for additional disks for config-local (#5030)
* Add support for additional disks for config-local

* Restore wrongly deleted lines

* Shellcheck

* add args in the right place dummy

* Fix nits

* typo

* var naming cleanup

* Add stub function for remaining cloud providers
2019-07-11 16:23:32 -06:00
5698d48dc8 merkle-tree: Make instantiation a little less painful (#5037)
automerge
2019-07-11 15:15:08 -07:00
5b95685e12 Add rewards to is_syscall_id() (#5035) 2019-07-11 13:47:22 -08:00
4c90898f0b Dynamic erasure set configuration (#5018)
* Use local erasure session to create/broadcast coding blobs

* Individual session for each recovery (as the config might be different)

* address review comments

* new constructors for session and coding generator

* unit test for dynamic erasure config
2019-07-11 13:58:33 -07:00
a191f3fd90 add node_pubkey to vote warning (#5033) 2019-07-11 13:12:26 -07:00
b2c776eabc Fix getProgramAccounts RPC (#5024)
* Use scan_accounts to load accounts by program_id

* Add bank test

* Use get_program_accounts in RPC
2019-07-11 12:58:28 -06:00
2c8d6f87e6 Add validator-info CLI (#4970)
* Add validator-info CLI

* Add GetProgramAccounts method to solana-client

* Update validator-info args, and add get subcommand

* Update ValidatorInfo lengths

* Add account filter for get --all

* Update testnet participation doc to reflect validator-info

* Flesh out tests

* Review comments
2019-07-11 12:38:52 -06:00
08f6de0acd Plumb scan_accounts into accounts_db, adding load from storage (#5029) 2019-07-11 12:16:02 -06:00
bd92f37553 Terminology (#4995)
* update exchange program: tradeOrder->Order, tradeRequest->OrderRequest, tradeCancel->OrderCancel

* Update bench-exchange: tradeOrder -> Order

* update bench exchange Readme
2019-07-10 23:22:33 -06:00
2abbc89dcd add accounts_index_scan_accounts (#5020) 2019-07-10 22:06:32 -07:00
8cad992170 reduce replicode in accounts, fix cast to i64 (#5025) 2019-07-10 21:22:58 -07:00
41d0db078e Wait for bootstrap leader to initialize before starting other validators (#5027) 2019-07-10 21:03:48 -07:00
8781aebe06 Pass SOLANA_METRICS_CONFIG along to oom-monitor.sh (#5021) 2019-07-10 20:11:55 -07:00
727c15ef8a start from random point in fork stores (#5010) 2019-07-10 18:44:49 -07:00
e4926e4110 Set exit when replicator run exits (#5016) 2019-07-10 16:27:18 -07:00
b50a3bae72 Logging (#5017)
* Add logging to replay_stage

* locktower logging
2019-07-10 15:52:31 -07:00
35ec7a5156 Decouple turns from segments in PoRep (#5004)
* Decouple Segments from Turns in Storage

* Get replicator local cluster tests running in a reasonable amount of time

* Fix unused imports

* Document new RPC APIs

* Check for exit while polling
2019-07-10 13:33:29 -07:00
a383ea532f Implement new Index Column (#4827)
* Implement new Index Column

* Correct slicing of blobs

* Mark coding blobs as coding when they're recovered

* Prevent broadcast stages from mixing coding and data blobs in blocktree

* Mark recovered blobs as present in the index

* Fix indexing error in recovery

* Fix broken tests, and some bug fixes

* increase min stack size for coverage runs
2019-07-10 11:08:17 -07:00
b1a678b2db Document getSlotsPerSegment in rpc api doc (#5005)
* Document getSlotsPerSegment in rpc api doc
2019-07-10 10:05:11 -07:00
e563a4dda3 Rename tds-testnet to tds (#5008) 2019-07-10 10:26:24 -06:00
dbe533385e Improve signature checks in config_api (#5001)
automerge
2019-07-10 01:00:49 -07:00
f537482c86 remove set_leader from cluster_info (#4998) 2019-07-09 22:06:47 -07:00
aebd70ddce Move letsencrypt arg to create_args 2019-07-09 21:27:12 -07:00
7d80cfb17a Include --letsencrypt ($1) 2019-07-09 20:54:11 -07:00
b8e7736af2 Move SLOTS_PER_SEGMENT to genesis (#4992)
automerge
2019-07-09 16:48:40 -07:00
32b55e6703 Fund solana-install deployments from the mint keypair to avoid airdrops (#4997) 2019-07-09 16:45:28 -07:00
0a949677f0 net/ plumbing to manage LetsEncrypt TLS certificates (#4985)
automerge
2019-07-09 15:45:46 -07:00
f777a1a74c groom replay_stage and poh_recorder (#4961)
* groom replay_stage and poh_recorder

* fixup

* fixup

* don't freeze() parent, need to review bank_forks and maybe vote...
2019-07-09 15:36:30 -07:00
d111223085 Fix always passing in remote filename, even if no accounts file (#4993)
* Fix always passing in remote filename, even if no accounts file

* typo
2019-07-09 16:07:31 -06:00
1ca7e9f67b Add testnet-tds support to testnet manager (#4762)
* Add testnet-tds support to testnet scripts
2019-07-09 14:39:55 -06:00
bc8f435d45 Shell script nits (#4982) 2019-07-09 12:09:13 -08:00
5e221bf219 Make config_api more robust (#4980)
* Make config_api more robust

* Add test and update store instruction
2019-07-09 13:37:18 -06:00
fc58b3e8c3 Fix typos 2019-07-09 09:35:52 -06:00
1033f52877 Add pubkey (#4971) 2019-07-09 00:54:22 -07:00
4771177f9d Update LLVM to v0.0.11 (#4976) 2019-07-08 23:22:49 -08:00
50c6b5d62d Work around missing lib on linux (Issue #4972) (#4975) 2019-07-08 22:24:57 -08:00
f9a2254688 Split out Rust BPF no-std stuff (#4968) 2019-07-08 20:28:05 -08:00
49250f62aa make commit_credits one trip through the rwlock (#4969) 2019-07-08 20:46:21 -07:00
22ef3c7c54 Blob verify (#4951)
* Ensure signable data is not out of range

* Add a broadcast stage that puts bad sizes in blobs

* Resign blob after modifyign size

* Remove assertions that fail when size != meta.size
2019-07-08 18:21:52 -07:00
417e8d5064 fix blocktree_processor test_process_entries_stress (#4967) 2019-07-08 18:11:58 -07:00
1feb9bea21 Harden Merkle Tree against second pre-image attacks (#4925)
* merkle-tree: Harden against second pre-image attacks

* core/chacha: Bump test golden hash
2019-07-08 19:00:06 -06:00
563c42b829 Consistant message format (#4965) 2019-07-08 16:07:45 -08:00
841e5e326c Program mutable lamports (#4964) 2019-07-08 15:52:25 -08:00
281deae102 Update config program to accommodate multiple signers (#4946)
* Update config program to accommodate multiple signers

* Update install CLI

* Remove account_type u32; add handling for unsigned keys in list

* ConfigKeys doc
2019-07-08 18:33:56 -05:00
c5ba2e0883 bank_forks test stability (#4959)
automerge
2019-07-08 15:55:49 -07:00
eb4edd75e6 make bank commit_credits non public (#4944)
* make bank commit_credits non pub

* track down create() failure

* move bank_client to process_transaction(), which commits credits
2019-07-08 15:37:54 -07:00
bb6bcd79c0 Handle replicator errors without panicking (#4955)
* Handle replicator errors without panicking

* Unwelcome println
2019-07-08 12:43:35 -07:00
ef7022d638 Refactor replicators to not block on startup (#4932)
* Refactor replicators to not block on startup

* Ignore setup failure
2019-07-08 10:17:25 -07:00
2aac094f63 Ensure blobs are deserializable without unwrapping (#4948)
* Return result from deserializing blobs in blocktree instead of assuming deserialization will succeed

* Mark bad deserialization as dead fork

* Add test for corrupted blobs in blocktree and replay_stage
2019-07-07 14:37:12 -07:00
fc180f4cbf Halve stake of malicious validator (#4937) 2019-07-05 15:45:39 -07:00
e26a0bf840 Bump env_logger from 0.6.1 to 0.6.2 (#4879)
Bumps [env_logger](https://github.com/sebasmagri/env_logger) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/sebasmagri/env_logger/releases)
- [Changelog](https://github.com/sebasmagri/env_logger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebasmagri/env_logger/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-05 14:11:10 -06:00
3557975c1f install: more little window fixes (#4930)
* Only add .exe extension if no extension was given

* Switch to ctrlc crate for freebie Windows ^C handling
2019-07-03 17:45:08 -07:00
b4aebbd991 Increment InfluxDB to 1.7 (#4931) 2019-07-03 17:44:49 -07:00
db13b52e6a Bump serde_json from 1.0.39 to 1.0.40 (#4881)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.39 to 1.0.40.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.39...v1.0.40)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-03 16:15:56 -06:00
f1f6537837 Reduce default commission from 100% to 50% (#4929) 2019-07-03 14:18:08 -07:00
2ec5d2c7f5 start local_cluster nodes from genesis blocks (#4928) 2019-07-03 14:03:52 -07:00
42e5623e26 Update rust-bpf-sysroot to v0.5 (#4920) 2019-07-03 11:20:21 -08:00
ab9f2adc69 [Security] Bump smallvec from 0.6.9 to 0.6.10 (#4921)
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 0.6.9 to 0.6.10. **This update includes security fixes.**
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-03 12:12:48 -07:00
f551b34725 Fix issue in polling for transaction signatures (#4923)
- Specifically if multiple confirmation for the signature is requested
2019-07-02 20:56:10 -07:00
55b8ff72d0 Enable parallel tests to reduce test time (#4919)
* Add crate to serialize some tests

* Ignore unused attribute warning

* Enable parallel run in CI

* Try to fix lograte tests

* Fix interdependent counter tests
2019-07-02 17:35:03 -07:00
bf319ab06d Convert syscall accounts to credit only accounts (#4915) 2019-07-02 15:17:28 -07:00
12ef0c25b5 change vote commission to u8 (from u32) (#4887)
automerge
2019-07-02 14:18:11 -07:00
8620d0a3b2 Add curl retries 2019-07-02 08:37:18 -07:00
933ae51fcc Add .exe extension before checking for a program file on windows (#4902) 2019-07-02 08:04:27 -07:00
c1201e54fa Avoid signal-hook crate on windows (#4900) 2019-07-01 22:52:55 -07:00
3615445a12 Broadcast run for injecting fake blobs in turbine (#4889)
* Broadcast run for injecting fake blobs in turbine

* address review comments

* new local cluster test that uses fake blob broadcast

* added a test to make sure tvu_peers ordering is guaranteed
2019-07-01 17:54:03 -07:00
091999a17e fix Instruction and CompiledInstruction field names (#4895)
* s/program_ids_index/program_id for Instruction

* s/program_ids_index/program_id_index for CompiledInstruction
2019-07-01 18:34:22 -06:00
417066ad30 Fix bench-tps funding math; make generate_keypairs() and fund_keys() algorithms consistent (#4841)
* Fix funding math; make generate_keypairs and fund_keys consistent

* Add test, and fix inconsistencies it exposes

* De-pow math, and use assert_eq in tests for better failure msgs
2019-07-01 18:32:03 -06:00
2abe051a1f run command now kills child process on SIGTERM to cleanly exit (#4896)
automerge
2019-07-01 17:10:14 -07:00
65adce65fa Always send pull responses to the origin addr (#4894) 2019-07-01 16:49:05 -07:00
0c8f187993 remove syscall tick height (#4891) 2019-07-01 16:21:51 -07:00
cbd2938035 update book with stake stuff (#4893) 2019-07-01 15:16:41 -07:00
0999225794 Try to gracefully terminal child process before using SIGKILL (#4890) 2019-07-01 14:08:30 -07:00
38b44f2496 Reduce slot duration and consecutive leader slots (#4838)
* change consecutive leader slots to 4

* reduce polling frequency for transaction signature confirmation

* adjust wait time for transaction signature confirmation

* fix nominal test

* fix flakiness in wallet pay test
2019-07-01 13:21:00 -07:00
c1953dca8f Cleanup some of banking stage (#4878)
* Add committable transactions that cause errors like InstructionErrors back to retryable list on MaxHeightReached

* Remove unnecessary logic

* Add comments/renaming for clarity
2019-07-01 12:14:40 -07:00
19ea5fe0c0 Rework fullnode.sh to recover better from genesis block resets (#4884) 2019-07-01 11:54:00 -07:00
d7ed3b8024 Add RPC api to return program accounts (#4876)
automerge
2019-06-29 09:59:07 -07:00
a89589a1d5 Add Measure abstraction over measuring time intervals (#4851)
Allows one to swap in different implementations. This provides
the normal Insant::now() -> .elapsed() path.
2019-06-29 15:34:49 +02:00
41bda18046 Disable Enter prompt when stdin is not a tty (#4874) 2019-06-28 17:43:43 -07:00
0c832f4668 Don't prompt the user to update their PATH if --no-modify-path was supplied (#4872) 2019-06-28 16:45:01 -07:00
75b494d4a3 Lower warn to info, fetch from validator root instead of root + 1 (#4870)
* Lower warn to info, fetch from validator root instead of root + 1

* b/c -> because
2019-06-28 16:17:20 -07:00
f0191a98ab Bump serde from 1.0.93 to 1.0.94 (#4864)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.93 to 1.0.94.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.93...v1.0.94)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-28 15:07:16 -07:00
76413cbfac Ensure validator process is killed when fullnode.sh is killed (#4869)
automerge
2019-06-28 14:24:44 -07:00
0fa1af5d47 Cleanup num_threads() and batch_limit numbers (#4852) 2019-06-28 10:55:24 +02:00
af1c70f032 book: Add simple payment and state verification proposal (#4200)
automerge
2019-06-27 17:08:10 -07:00
278614fc7c Impl credit-only accounts in Budget (#4862) 2019-06-27 19:22:21 -04:00
baca35ef4d book: Make build a little less annoying (#4861)
automerge
2019-06-27 15:20:37 -07:00
66552d7047 Credit-Only Accounts: Cache account balance for thread-safe load/store (#4691)
* Implement CreditOnlyLocks

* Update credit-only atomic on account load

* Update credit-only atomic after bank.freeze_lock; store credits if all credit-only lock references are dropped

* Commit credit-only credits on bank freeze

* Update core to CreditAccountLocks

* Impl credit-only in System Transfer

* Rework CreditAccountLocks, test, and fix bugs

* Review comments: Pass CreditAccountLocks by reference; Tighten up insert block

* Only store credits on completed slot

* Check balance in bench_exchange funding to ensure commit_credits has completed

* Add is_debitable info to KeyedAccount meta to pass into programs

* Reinstate CreditOnlyLocks check on lock_account

* Rework CreditAccountLocks to remove strong_count usage

* Add multi-threaded credit-only locks test

* Improve RwLocks usage

* Review comments: panic if bad things happen; tighter code

* Assert lock_accounts race does not happen

* Revert panic if bad things happen; not a bad thing
2019-06-27 17:25:10 -04:00
979df17328 Bump serde_derive from 1.0.93 to 1.0.94 (#4856)
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.93 to 1.0.94.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.93...v1.0.94)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-27 13:18:19 -07:00
6cec61dcfc Re-enable tests (#4848) 2019-06-27 12:09:14 -07:00
a9b044f0ab Fix banking_stage benchmark sends (#4850)
Only one big batch was being sent so only 1
thread active at a time in the benchmark.
2019-06-27 10:37:33 +02:00
fbea9d8621 Page-pin packet memory for cuda (#4250)
* Page-pin packet memory for cuda

Bring back recyclers and pin offset buffers

* Add packet recycler to streamer

* Add set_pinnable to sigverify vecs to pin them

* Add packets reset test

* Add test for recycler and reduce the gc lock critical section
* Add comments/tests to cuda_runtime

* Add recycler to recv_blobs path.

* Add trace/names for debug and PacketsRecycler to bench-streamer

* Predict realloc and unpin beforehand.

* Add helper to reserve and pin

* Cap buffered packets length

* Call cuda wrapper functions
2019-06-27 09:32:32 +02:00
44a572416d Save snapshots followed by accounts to avoid stale account data (#4847)
* save snapshots before account stores

* update comment
2019-06-26 23:19:55 -07:00
97c97db97e Fix early exit clearing all buffered packets (#4810) 2019-06-26 22:39:50 -07:00
b8ae025f90 rsync of ledger/ and state.tgz now works on both macOS and Linux (#4845)
automerge
2019-06-26 22:10:24 -07:00
27221e28f6 Use default pubkey for solana-install sanity check 2019-06-26 21:49:22 -07:00
9a52b01171 Change to crossbeam channel in banking_threads VerifiedReceiver (#4822)
* Add crossbeam channel instead of channel in banking_stage
2019-06-26 18:42:27 -07:00
8cea650535 Handle NaN and inifinite point values (#4839) 2019-06-26 18:33:52 -07:00
531679eeaf Bump generic-array from 0.13.0 to 0.13.1 (#4801)
Bumps [generic-array](https://github.com/fizyk20/generic-array) from 0.13.0 to 0.13.1.
- [Release notes](https://github.com/fizyk20/generic-array/releases)
- [Changelog](https://github.com/fizyk20/generic-array/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fizyk20/generic-array/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-26 17:47:12 -06:00
850f77ab3b Minor refactor of duplicated reward claim logic (#4835)
automerge
2019-06-26 15:01:45 -07:00
4a10fd3272 Upload all artifacts 2019-06-26 14:37:18 -07:00
9e2eb9e4f9 Set CI_REPO_SLUG correctly for the solana-secondary pipeline 2019-06-26 14:37:18 -07:00
8120b57f17 Setup reward pools in genesis (#4831)
automerge
2019-06-26 13:51:17 -07:00
f651c0922a Airdrop more token in wallet sanity due to fee (#4830)
automerge
2019-06-26 13:32:58 -07:00
8d2ec20201 Tidied up intro paragraph (#4819)
I tidied up the intro paragraph!
2019-06-26 12:12:25 -07:00
dce1f80aac Made tiny change to second paragraph (#4820)
Replaced 'it's' with 'Solana
2019-06-26 12:12:11 -07:00
df1c473341 Add storage point tracking and tie in storage rewards to economics (#4824)
* Add storage point tracking and tie in storage rewards to epochs and economics

* Prevent validators from updating their validations for a segment

* Fix test

* Retain syscall scoping for readability

* Update Credits to own epoch tracking
2019-06-26 10:40:03 -07:00
8a64e1ddc3 add fee burning (#4818) 2019-06-26 10:13:21 -07:00
eb47538a82 Bump chrono from 0.4.6 to 0.4.7 (#4812)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.6 to 0.4.7.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/master/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.6...v0.4.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-26 07:58:41 -06:00
861d6468ca Stake weighted pruning for the gossip network (#4769)
* Stake weighted pruning

* Fix compile error

* Fix clippy errors

* Add helper for creating a connected staked network

* Bug fixes and test groundwork

* Small refactor

* Anatoly's feedback and tests

* Doc updates

* @rob-solana's feedback

* Fix test bug and add log trace

* @rob-solana's feedback
2019-06-26 00:30:16 -07:00
d6737b8cc9 Set epoch schedule in set_root in leader schedule cache (#4821) 2019-06-26 00:19:48 -07:00
30592f2b12 Integration tests for stake API (#4811)
* more tests for rewards redemption

* break circular deps

* code review
2019-06-25 23:00:35 -07:00
1f950781c2 Use temp path for append_vec tests (#4765)
* Use temp path for serialize test

* set account path
2019-06-25 16:11:57 -07:00
f20ba423ca Merklize PoH TX mixin hash (#4644) 2019-06-25 14:44:27 -06:00
c5e6ebb496 Create snapshots sparsely (#4815) 2019-06-25 12:10:17 -07:00
9e7f618cff Set proper count value for account stores (#4797)
* set count values for store accounts

* Use AppendVecId type
2019-06-25 07:21:45 -07:00
74a06e4230 Update thinclient to resend the same tx until its blockhash expires (#4807) 2019-06-24 16:46:34 -07:00
70f93cc126 remove mining_pool from stake_state (#4804) 2019-06-24 16:01:02 -07:00
3f8ff23125 Forward transactions to the leader for next Nth slot (#4806)
* review comments
2019-06-24 15:56:50 -07:00
29611fb61d tower consensus naming (#4598)
s/locktower/tower/g
2019-06-24 13:41:23 -07:00
407b1d3e6f Bump console from 0.7.5 to 0.7.7 (#4798)
Bumps [console](https://github.com/mitsuhiko/console) from 0.7.5 to 0.7.7.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Commits](https://github.com/mitsuhiko/console/compare/0.7.5...0.7.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-24 05:40:15 -07:00
206e62271b Ignore flaky test_two_unbalanced_stakes (#4794)
automerge
2019-06-23 20:55:43 -07:00
4e78354ab6 Bump serde_derive from 1.0.92 to 1.0.93 (#4790)
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.92 to 1.0.93.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.92...v1.0.93)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-23 20:23:41 -07:00
1561d9c8d4 Remove --storage-mining-pool-lamports (#4792) 2019-06-23 20:19:53 -07:00
0e1480b84e Bump serde from 1.0.92 to 1.0.93 (#4791)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.92 to 1.0.93.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.92...v1.0.93)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-23 17:23:41 -07:00
fd6047d1c5 Add validation tip 2019-06-23 09:10:39 -07:00
b0467be393 Add quotes 2019-06-23 09:09:12 -07:00
1b0b095813 Setup v0.1[78] backport label 2019-06-23 09:04:43 -07:00
bd43724dfc Don't set automerge label the PR has status failures 2019-06-22 20:52:32 -07:00
11992946a4 Add storage reward pools (#4779) 2019-06-22 17:18:35 -07:00
0cc8a841ab set automerge label on mergify backport PRs (#4788) 2019-06-22 09:00:00 -07:00
23b6b85bf0 Prevent Travis/Appveyor from trying to build mergify branches (#4786) 2019-06-22 08:42:27 -07:00
96b56fa6f7 Update authorized public key (#4783) 2019-06-22 08:33:39 -07:00
405ca1bcb2 Add instructions and processor for stake deactivation (#4781)
automerge
2019-06-21 23:45:03 -07:00
c6316bb24b Initial mergify config 2019-06-21 22:50:17 -07:00
b7f169e06e Program instruction to withdraw un-staked lamports from stake account (#4780) 2019-06-21 22:28:34 -07:00
e4b466874c Remove storage-mining-pool-keypair arg 2019-06-21 21:38:03 -07:00
9911942dbd Increment cargo.toml files to v0.17.0 2019-06-22 04:35:25 +00:00
8acbb4ab2f Bank cap rpc (#4774)
* core/rpc: Name magic number for minted lamports in tests genesis block

* core/rpc: Expose bank::capitalization() via getSolTotalSupply RPC method

* book: Add entry for getTotalSupply RPC method
2019-06-21 21:00:26 -07:00
a49f5378e2 rewrite vote credits redemption to eat from rewards_pools on an epoch-sensitive basis (#4775)
* move redemption to rewards pools

* rewrite redemption, touch a few other things

* re-establish test coverage
2019-06-21 20:43:24 -07:00
f39e74f0d7 serde the full FeeCalculator (#4778)
automerge
2019-06-21 17:23:26 -07:00
22b767308a Add insturctions to run a replicator on testnet (#4733) 2019-06-21 16:32:23 -07:00
36aa876833 Avoid linking with CUDA directly 2019-06-21 15:26:22 -07:00
06ba0b7279 Remove holding cluster_info lock while forwarding packets (#4773) 2019-06-21 15:21:49 -07:00
a38e1a81ef Call do.sh from anywhere (#4771) 2019-06-21 12:26:17 -07:00
da925142d1 Update replicator ports and silence socket timeout on windows (#4770)
automerge
2019-06-21 11:28:52 -07:00
5feeb257bb Seperate out BPF Loader helpers (#4768) 2019-06-21 11:08:50 -07:00
06c547094a Add Merkle Tree implementation (#4749)
automerge
2019-06-21 10:22:21 -07:00
a40c5cf185 Update storage contract to use a deterministic BTreeMap (#4763) 2019-06-21 09:51:05 -07:00
deb83cdef6 Bump rayon from 1.0.3 to 1.1.0 (#4729)
automerge
2019-06-21 09:32:41 -07:00
20db335aed Bump reqwest from 0.9.17 to 0.9.18
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.17 to 0.9.18.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.17...v0.9.18)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-21 08:50:49 -07:00
407db65336 Add 128bit Rust BPF test (#4766)
automerge
2019-06-21 02:43:50 -07:00
9c5a3cd277 Update Rust BPF to v0.1.2 (#4767) 2019-06-21 02:15:42 -07:00
138a49e820 Fix paths (#4764) 2019-06-21 00:08:02 -07:00
36c9e22e3d Revert "Dynamic erasure (#4653)"
This reverts commit ada4d16c4c.
2019-06-20 20:53:03 -07:00
aa0f8538ed Fix client script arguments in the book (#4760) 2019-06-20 19:59:20 -07:00
4177c56c51 Use real panic that reports file/line (#4758) 2019-06-20 19:10:03 -07:00
425ac8d520 Remove need to use null when passing Rust strings (#4756) 2019-06-20 19:09:50 -07:00
ada4d16c4c Dynamic erasure (#4653)
Remove erasure-related constants

Remove unneeded `Iterator::collect` call

Document erasure module

Randomize coding blobs used for repair
2019-06-20 20:27:41 -05:00
4069ef2e02 Install xargo once (#4753) 2019-06-20 16:49:33 -07:00
ace98bba08 Upgrade BPF sysroot to v0.4 (#4754) 2019-06-20 16:41:49 -07:00
e59b53dfa8 BPF rust language updates (#4752) 2019-06-20 16:07:12 -07:00
aacb38864c Mark dead forks in replay stage (#4715)
* Add DeadSlots column family

* Filter dead forks from get_slots_since

* Mark erroring slots as dead in replay stage, add test

* Mark dead forks in progress instead of removing them

* Fix logging process_entries failures in replay_stage

* Unignore test_fail_entry_verification_leader
2019-06-20 15:50:41 -07:00
33d13a3aea Update inflation.rs 2019-06-20 12:37:24 -07:00
1f0f947ed2 add validator rewards pools (#4742)
* add validator rewards pools

* populate rewards syscall
2019-06-20 12:22:29 -07:00
6854c64a09 Bump coverage build timeout 2019-06-20 09:24:11 -07:00
4a32bc48d2 ignore unstable test_repairman_catchup 2019-06-20 09:24:11 -07:00
b430762a23 check rust programs (#4688) 2019-06-20 07:43:31 -07:00
f8523db51d Revert "remove build --all (#4737)" (#4745)
This reverts commit 63503ad589.
2019-06-19 23:21:10 -07:00
48b11d1841 Initialize paths for non existent accounts (#4744) 2019-06-19 23:15:22 -07:00
3600a926df protect against corruption (#4741) 2019-06-19 21:29:36 -07:00
c228792967 Add blocktree and repair_service to SUMMARY.md (#4738) 2019-06-19 20:10:04 -07:00
7ea522e851 add rewards syscall, groom some others (#4740) 2019-06-19 19:46:47 -07:00
63503ad589 remove build --all (#4737)
* remove build  all

* Update test-stable.sh
2019-06-19 17:36:25 -07:00
9800e09431 Thread pool for par_iter in EntrySlice::verify (#4732)
* Use thread pool for entry verify par iter

* some performance metrics

* check batch size and use CPU for smaller batches
2019-06-19 16:31:32 -07:00
2e2b1881f5 move genesis_block to builder pattern (#4736) 2019-06-19 15:40:39 -07:00
61483c18ca Change seed for retransmit to use blob signature (#4727)
* Switch seed for retransmit to use blob signature

* Use seed_len

* Use last bytes of signature as seed instead of first bytes
2019-06-19 15:36:06 -07:00
a5279bb835 Don't ship bench-streamer 2019-06-19 12:37:35 -07:00
357554b209 Cache target/ 2019-06-19 12:37:35 -07:00
41fbdc6e08 use stake (#4721) 2019-06-19 11:54:52 -07:00
8bd1c57448 Defer CUDA selection to env.sh, also always create env.sh 2019-06-19 08:47:27 -07:00
2562e48b9d Check for non zero count value 2019-06-19 08:47:12 -07:00
46bb79df29 Support for custom BroadcastStage in local cluster tests (#4716)
* Refactor BroadcastStage to support custom implementations, add FailEntryVerificationBroadcastRun implementation

* Plumb switch on broadcast type through validator

* Add test for validator generating non-verifiable entries to local_cluster

* Fix bad initializers

* Refactor broadcast run code into utils
2019-06-19 00:13:19 -07:00
6bc0d2a0cb exit with success even if no CUDA version detected 2019-06-18 21:18:13 -07:00
465cd45833 Various Snapshot generation improvements
* Only a single snapshot is maintained to avoid unbounded disk growth
* Snapshot is stored as a compressed tar archive for faster rsyncing
* Any validator node may now generate snapshots
* Updated testnet scripts to generate snapshots on the blockstreamer node
2019-06-18 20:11:09 -07:00
b4484b89c3 ' 2019-06-18 19:13:44 -07:00
c029f069f0 Cache .cargo for faster builds 2019-06-18 19:11:36 -07:00
fdb57bc5db Add Rust BPF Tick Height test (#4718) 2019-06-18 15:56:24 -07:00
e43a634944 Calculate bench client lamports based on signature fee (#4713)
* use fee calculator to compute max fee

* review comments

* shellcheck
2019-06-18 14:44:53 -07:00
2da7c7fbd3 Bump nix from 0.14.0 to 0.14.1 (#4642)
automerge
2019-06-18 11:36:26 -07:00
5683282c94 Update to solana-perf-libs v0.14.0, with support for both CUDA 10.0 and 10.1 2019-06-18 10:41:03 -07:00
44967abd1c update storage len 2019-06-17 22:48:27 -07:00
8b41a5d725 periodically save config in separate folders 2019-06-17 22:48:27 -07:00
07c183bb84 Fix test 2019-06-17 22:48:27 -07:00
7fd879b417 Restart validator nodes from snapshots 2019-06-17 22:48:27 -07:00
dc5c6e7cf8 validator restart 2019-06-17 22:48:27 -07:00
bd633d2b81 Add CI_REPO_SLUG (#4714)
automerge
2019-06-17 20:42:09 -07:00
feeaad619a Avoid panic if no rpc peers exist 2019-06-17 19:47:45 -07:00
b44d8c394e Only add --mining-pool arg when a mining pool keypair exists 2019-06-17 19:47:45 -07:00
0ff9c4cd8e add stake warmup and cool down (#4711) 2019-06-17 19:34:21 -07:00
9cafd1f85e Change check_txs to ignore recv errors and re-enable test (#4593)
Use more chunks to avoid duplicate signature failures:
Duplicate signatures can occur because bank.clear_signatures()
can occur before the bank has actually committed the signatures
to the status cache and then error out on the next set of transactions.
2019-06-17 19:04:21 -07:00
7fe10ba060 Don't start drone if primordial accounts are created for nodes (#4704)
* disable wallet sanity if no airdrops
2019-06-17 18:15:22 -07:00
cc48773b03 Add "download from replicator" utility (#4709)
automerge
2019-06-17 18:12:13 -07:00
8fbf0e2d9f Update replicators to use the storage blockhash to generate offsets (#4712) 2019-06-17 16:39:26 -07:00
d86358eedc add Account::new_data (#4701)
* add account_new_data

* fixup

* fixup
2019-06-17 15:58:05 -07:00
fe04fb4cd3 Refetch perf-libs when the release version is changed (#4706)
automerge
2019-06-17 14:31:41 -07:00
de3f7e9634 Update Rust program build script paths (#4707) 2019-06-17 14:24:00 -07:00
5e8fcdbe1d Set {min,max}_lamports_per_signature correctly when fees don't adjust (#4705)
automerge
2019-06-17 13:18:12 -07:00
3ee7256c0c Add cuda docs 2019-06-17 12:42:59 -07:00
2a7a9fdf03 Re-org SDK dir (#4690) 2019-06-17 11:04:38 -07:00
5bf87de136 Add obvious log message indicating CUDA feature state 2019-06-17 11:01:55 -07:00
97a136ea20 Set rustc-cfg=cuda explicitly, also code cleanup 2019-06-17 11:01:55 -07:00
735dfab02e decomma 2019-06-17 11:01:55 -07:00
b5f65ce49c Link cuda feature validator/ to core/ 2019-06-17 11:01:55 -07:00
a283863694 Add storage-mining-pool genesis params 2019-06-14 20:25:39 -07:00
25908feef9 Fund accounts with the worst-case fee 2019-06-14 19:52:44 -07:00
b91ad6fd96 Clear C dependency files from cache (#4692) 2019-06-14 19:11:16 -07:00
02abf422df Serialize genesis block using bincode (#4687)
* use mmap to read the genesis block, and deserialize
2019-06-14 14:22:52 -07:00
3fe5f886d7 change store to store_account (#4689) 2019-06-14 13:34:15 -07:00
4c6a6d63bf add MiningPools, fund validator MiningPools from inflation (#4676)
* add MiningPool fund validator MinigPools from inflation

* fixup

* finish rename of MINIMUM_SLOT_LENGTH to MINIMUM_SLOTS_PER_EPOCH

* deterministic miningpool location

* point_value, not credit_value... use f64
2019-06-14 11:38:37 -07:00
589a9d3a72 Create aligned number of keypairs so they all get funded (#4685) 2019-06-14 11:11:52 -07:00
bd884a56bf Install libssl1.1 better 2019-06-14 08:01:22 -07:00
119467df59 Add storage mining pool to genesis and implement automatic reward redeeming (#4683)
* Add storage mining pool to genesis and implement automatic reward collection

* Address review comments
2019-06-13 22:30:51 -07:00
ee68b9800e Wait for nodes to boot up before launching other nodes and client (#4682)
* Wait for nodes to bootup in testnet

* increase timeout (as with multiple clients it takes even longer)
2019-06-13 19:37:36 -07:00
c6b4a3a706 Witness account data in Budget (#4650)
* Add support for contracts based on account data to Budget

* Add program_id to account constraints

* No longer require a signature for the account data witness

* Rename bank::store to store_account

* fmt

* Add a doc

* clippy
2019-06-13 18:20:28 -07:00
b1ac8f933b Fix storage program space issues and limit storage transaction data (#4677) 2019-06-13 17:53:54 -07:00
9e3758983d Find max root and purge roots below it. (#4645)
* Test for forking accounts

* Find max root and purge roots below it.
2019-06-13 17:35:16 -07:00
34c0537e9b update book with staking changes (#4679) 2019-06-13 16:24:03 -07:00
8628f33d0b Fix HostId field in the testnet dashboard 2019-06-13 16:09:09 -07:00
ed05aeaef8 Permit datapoints with no fields 2019-06-13 16:09:09 -07:00
e1444a9b00 Add curl retries 2019-06-13 15:05:07 -07:00
9514169bf6 Ensure volume mountpoints exist 2019-06-13 15:05:07 -07:00
fa8394f526 Initial documentation for validator metrics 2019-06-13 15:05:07 -07:00
1cd8c1865e Generate random passwords and keep them out of the environment/program args 2019-06-13 12:37:39 -07:00
e3f895d7d4 Create bench exchange accounts in genesis block (#4655)
* fix script

* review comments
2019-06-13 11:51:35 -07:00
8abf22f34b Temporarily revert: Convert System Transfer accounts to credit-only (#4670) 2019-06-13 11:01:09 -06:00
a016bc2736 Add infra to publish metrics tarball 2019-06-13 10:00:24 -07:00
470debef16 Inline metrics/scripts dependencies 2019-06-13 10:00:24 -07:00
c147dc3028 Update README 2019-06-13 10:00:24 -07:00
bdd95b2286 Generate local dashboard to avoid duplication 2019-06-13 10:00:24 -07:00
efe676bc94 Minor script refactoring/refinement 2019-06-13 10:00:24 -07:00
fc34687687 Create write-only user, default to custom grafana 2019-06-13 10:00:24 -07:00
6042ccf496 Streamline grafana.ini 2019-06-13 10:00:24 -07:00
f1197e1b1f Adjust datasource name 2019-06-13 10:00:24 -07:00
8c1b9a0b67 Data plane verification (#4639)
* Add signature to blob

* Change Signable trait to support returning references to signable data

* Add signing to broadcast

* Verify signatures in window_service

* Add testing for signatures to erasure

* Add RPC for getting current slot, consume RPC call in test_repairman_catchup for more deterministic results
2019-06-12 16:43:05 -07:00
0da9ac1a47 Remove unnecessary parameter element (#4666)
* Stop passing pubkey ref unnecessarily

* Cargo.lock
2019-06-12 16:18:27 -06:00
c1f316721a Clean up some error handling (#4667)
Shouldn't call exit from a library function.
2019-06-12 15:01:59 -07:00
8e86014311 Update stakers_slot_offset if slots_per_epoch is adjusted (#4660) 2019-06-12 14:12:17 -07:00
d807217be7 Simplify and camelCase getEpochVoteAccounts RPC API (#4658)
* Simplify and camelCase getEpochVoteAccounts RPC API

* Set a commission for testing
2019-06-12 14:12:08 -07:00
bc44516eb4 Add test to exercise more args then registers (#4661) 2019-06-12 13:04:53 -07:00
b78a13d42c Nits (#4662) 2019-06-12 13:04:24 -07:00
0dcdc37fec Split BPF loader to match the rest of the programs (#4636) 2019-06-12 08:49:59 -07:00
dd1c3514a8 Use auto hashes-per-tick config for testnet testnet 2019-06-12 08:40:56 -07:00
767efab941 add inflation to genesis (#4652)
* add inflation to genesis

* avoid having to write new()
2019-06-11 21:42:31 -07:00
288a3bdcd9 Provision bench client accounts in genesis block (#4648)
* fixes to script

* shellcheck

* address review comments
2019-06-11 18:47:35 -07:00
8019bff391 Fixes for storage program and rework storage stage (#4654)
automerge
2019-06-11 18:27:47 -07:00
575a897ffc track market cap (#4643)
* track market cap

* fixup, rebase

* prettier
2019-06-11 17:04:13 -07:00
697228a484 rpc vote_accounts by ecurrent pocch, not stakers epoch (#4651) 2019-06-11 16:57:47 -07:00
ca907f37c3 fix cuda testnet compilation errors (#4649) 2019-06-11 15:30:39 -07:00
439e7cc26a Add dependent crate test (#4647)
automerge
2019-06-11 11:45:12 -07:00
3217a1d70c use highest staked node as bootstrap leader, remove bootstrap_leader from genesis_block (#4635)
* use highest staked node as bootstrap leader, remove bootstrap_leader from genesis_block

* clippy

* fixup

* fixup
2019-06-11 11:44:58 -07:00
6dbba86cc6 Cleanup rust-utils (#4646)
automerge
2019-06-11 11:42:30 -07:00
8cc863ea6c Bump libloading from 0.5.0 to 0.5.1 (#4640)
Bumps [libloading](https://github.com/nagisa/rust_libloading) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/nagisa/rust_libloading/releases)
- [Commits](https://github.com/nagisa/rust_libloading/compare/0.5.0...0.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-11 11:21:45 -07:00
1d957b6b80 Bump byteorder from 1.3.1 to 1.3.2 (#4641)
Bumps [byteorder](https://github.com/BurntSushi/byteorder) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/BurntSushi/byteorder/releases)
- [Changelog](https://github.com/BurntSushi/byteorder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/byteorder/compare/1.3.1...1.3.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-11 11:21:26 -07:00
e56430c9fb make runtime depend on bpf_loader (#4601)
* make runtime depend on bpf_loader

* remove vote redundancy, move bpf_loader to genesis, export program\! from bpf_loader crate

* move bpf_loader specification into genesis

* bpf tests to use genesis with bpf

* need to avoid depending on programs, except for macros
2019-06-11 10:27:22 -07:00
e4d8ea11ac Make lamports_per_signature dynamic based on cluster load (#4562)
* Make lamports_per_signature dynamic based on cluster load

* Move transaction-fees.md to implemented
2019-06-10 22:18:32 -07:00
a4035a3c65 Remove record locks and parent locks from accounts (#4633)
* Revert "Fix parent record locks usage in child banks (#4159)"

This reverts commit 69eeb7cf08.

* Revert "Fix DuplicateSignatures caused by races on frozen banks (#3819)"

This reverts commit 083090817a.

* Remove unused imports
2019-06-10 22:05:46 -07:00
807c69d97c Slimmer implementation of credit-only accounts (#4592)
* Add credit-only debit/data check to verify_instruction

* Store credits and pass to accounts_db

* Add InstructionErrors and tests

* Relax account locks for credit-only accounts

* Collect credit-only account credits before passing to accounts_db to store properly

* Convert System Transfer  accounts to credit-only, and fixup test

* Functionalize collect_accounts to unit test

* Review comments

* Rebase
2019-06-10 20:50:02 -06:00
9259d342ac Facility to provision primordial accounts for fullnodes in genesis block (#4631)
* updated usage

* shellcheck

* support replicators

* disable airdrops if primordial accounts are used

* review comments
2019-06-10 19:42:49 -07:00
b4d4edb645 Restore cargo install to work around --features= 'feature' (#4627) 2019-06-10 18:49:08 -07:00
966b6999d1 Accounts index opt (#4621)
* Add accounts_index bench

* Don't take the accounts index lock unless needed

* Accounts_index remove insert return vec and add capacity stats

* Use hashbrown hashmap for accounts_index
2019-06-10 18:15:39 -07:00
73491e3ca1 bump libssl (#4634) 2019-06-10 18:03:13 -07:00
d1d53c3fb6 calculate stake from activated amount (#4630) 2019-06-10 16:17:29 -07:00
a77e576cd9 void key 2019-06-10 15:54:32 -07:00
9e14cde461 Revert "Fix roots never being purged (#4134)" (#4628)
automerge
2019-06-10 14:08:09 -07:00
a2a7c86c0d Move Testnet Participation under Getting Started 2019-06-10 13:53:31 -07:00
38aeed02fc Ignore dependabot branches 2019-06-10 12:50:48 -07:00
64d63966c7 Bump jsonrpc crates to 12.0.0 (#4553)
* Bump jsonrpc-pubsub from 11.0.0 to 12.0.0

Bumps [jsonrpc-pubsub](https://github.com/paritytech/jsonrpc) from 11.0.0 to 12.0.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/commits/v12.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Update all jsonrpc crates
2019-06-10 13:22:57 -06:00
38ae54b720 Bump walkdir from 2.2.7 to 2.2.8 (#4615)
Bumps [walkdir](https://github.com/BurntSushi/walkdir) from 2.2.7 to 2.2.8.
- [Release notes](https://github.com/BurntSushi/walkdir/releases)
- [Commits](https://github.com/BurntSushi/walkdir/compare/2.2.7...2.2.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-10 12:19:45 -07:00
a18c0e34f4 add activate_stake to stake_api (#4600) 2019-06-10 12:17:29 -07:00
be3a0b6b10 Build/clean all (#4626)
automerge
2019-06-10 11:15:28 -07:00
9f6496d38a Panic filename (#4625)
automerge
2019-06-10 11:00:15 -07:00
1fa31c9410 .iter fixed, drop enumerate where not needed (#4624)
automerge
2019-06-10 10:19:58 -07:00
2b5e757d57 Adjust slack notification 2019-06-10 07:44:31 -07:00
0dbe5ee559 Add chacha-sys crate (#4620)
* af9ff9c7f9/src/cpu-crypt

* Add chacha-sys crate

* Remove chacha feature

* Remove erasure feature

* Add .gitignore
2019-06-10 07:14:02 -07:00
6926e89e86 Minor doc update 2019-06-08 19:36:37 -07:00
ec0007217d Modify HKEY_CURRENT_USER\Environment\PATH on Windows (#4614)
Thanks for the Windows registry editing code rustup.rs!
2019-06-08 19:25:02 -07:00
91b23f8316 Switch from solana-install to solana-install-init 2019-06-08 19:24:36 -07:00
2fd8d57504 Print path normally to avoid forward slash escaping 2019-06-08 19:22:17 -07:00
0595109f98 Add solana-install-init binary (#4613)
* Add solana-install-init binary

* Add Enter prompt on solana-install-init exit for Windows users
2019-06-08 19:01:22 -07:00
9f46b2a6ce Avoid weird paths on Windows (#4612)
automerge
2019-06-08 17:23:34 -07:00
a357d08524 Avoid unnecessary re-downloading if |solana-install init| is invoked repeatedly (#4611) 2019-06-08 17:15:16 -07:00
177c9cc026 -f 2019-06-08 16:33:22 -07:00
0c4cb76acf Add GPU based PoH verification (#4524)
* Add GPU poh verify

* Switch to single PoH verify function

* Add EntrySlice verify tests with hashes and txs

* Add poh-verify benchmarks
2019-06-08 10:21:43 -06:00
8676b5d40c Use more -f 2019-06-07 22:18:55 -07:00
efab896c9e Ignore unencrypted file 2019-06-07 21:38:30 -07:00
97b9d57b62 shellcheck 2019-06-07 21:35:51 -07:00
487826a539 Deploy windows updates 2019-06-07 20:46:58 -07:00
4acb764589 Pick up .exe extension 2019-06-07 20:13:47 -07:00
9de4c1dcd9 Add slack notification 2019-06-07 19:58:52 -07:00
e8c4302d6d Add Appveyor CI for Windows release artifacts 2019-06-07 19:47:26 -07:00
a9f73ea321 solana-keygen no longer blindly overwrites a keypair, or assumes "new" (#4599)
automerge
2019-06-07 17:54:54 -07:00
66c41b3e8c Enable iter test (#4542)
automerge
2019-06-07 16:44:14 -07:00
8435fbfa0b Travis window support is too unstable, disable for now 2019-06-07 15:17:27 -07:00
9a4c449135 Builtins (#4594)
automerge
2019-06-07 14:38:49 -07:00
ac6dbf8f04 Broadcast blobs even if the peers have no stake (#4597) 2019-06-07 14:12:27 -07:00
b55927370b Restore OS -> TARGET map 2019-06-07 13:22:40 -07:00
002fbc4d53 Add |wallet fees| subcommand for easy viewing of the current cluster fees (#4596) 2019-06-07 13:11:56 -07:00
53deb7919c Update book for Turbine (#4583) 2019-06-07 13:03:05 -07:00
8e46c44f3e Deploy mac OS solana-install update package to testnets (#4595) 2019-06-07 12:59:58 -07:00
37c2fa1d8d add current to bank syscalls (#4581) 2019-06-07 11:41:34 -07:00
fdaa939892 Bring in Travis CI to build Windows and mac OS release binaries (#4591)
* Bring in Travis CI to build Windows and mac OS release binaries

* Update .travis.yml
2019-06-07 11:32:47 -07:00
c9d63204eb Replace unneeded seqcst with relaxed on atomic operations (#4587) 2019-06-06 23:53:21 -07:00
cfab54511b Ignore bench_banking_stage_multi_accounts (#4590)
automerge
2019-06-06 21:47:07 -07:00
492cc93850 Limit short_vec length to u16, usize is overkill for our usage (#4588) 2019-06-06 20:18:41 -07:00
fd9fd43e83 add solana_name_id, reassociate names with modules, modularize id tests (#4580) 2019-06-06 19:27:49 -07:00
191483f4ee Facility to add accounts with specific balance to genesis block (#4585)
* Facility to add accounts with specific balance to genesis block

* address review comments
2019-06-06 19:24:09 -07:00
688f8a669a Add a storage accounts cache to Bank (#4578) 2019-06-06 17:40:01 -07:00
46eea85022 Improve error message 2019-06-06 17:06:56 -07:00
1c765124e7 Clean up .configured flag handling to work with an external identity keypair (#4579)
automerge
2019-06-06 14:51:48 -07:00
194491ae96 Removed some dead code (#4563)
* Removed some dead code

* remove dead code from Replicator
2019-06-06 14:26:12 -07:00
2ae595294c fullnode.rs: restart the node correctly on non-zero exit 2019-06-06 13:46:46 -07:00
ead947e710 Change default setting for real PoH in testnet scripts (#4573) 2019-06-06 12:49:46 -07:00
82df267ec9 s/avalanche/turbine (#4561)
* s/avalanche/turbine/g
2019-06-06 12:48:40 -07:00
53275cc678 Introduce normalized CI environment vars: ci/env.sh (#4571) 2019-06-06 12:20:47 -07:00
44835a91db Update PoRep entry in the book (#4560)
* Rework PoRep design doc

* Define the stages of the PoRep game

* Add that the stages are really transactions

* Update turn count

* Review comment + clarification

* More clarification

* Rephrase for clarity
2019-06-06 12:16:54 -07:00
ee42040e6b Give coverage build more time (#4572)
automerge
2019-06-06 11:07:32 -07:00
2b98a16ec6 Upgrade to rust stable 1.35.0 (#4568) 2019-06-06 09:24:38 -07:00
aa4a7b0c73 Disable |solana-install| check for edge/beta testnets (#4564)
The release tarball URL changes for these testnets, which causes the
normal |solana-install| check to fail and the testnet is unnecessarily
rebooted.
2019-06-05 15:31:29 -07:00
8f50c3dd2e Be explicit about return status 2019-06-05 14:12:06 -07:00
9c47ce30a7 shift 2019-06-05 12:06:54 -07:00
3433b08b8c remove unnecessary wrapper (#4559) 2019-06-05 11:43:41 -07:00
d26fd27bf9 Avoid sudo in tune-system.sh unless requested by the user (#4556) 2019-06-05 09:10:23 -07:00
5c98c1d306 Sanity check that runs on the blockstreamer node now checks that node instead of the bootstrap leader (#4551)
automerge
2019-06-04 22:46:48 -07:00
51aacfe3ca Use pure-rust reed-solomon-erasure for windows (#4548) 2019-06-04 21:49:27 -07:00
82bd2df986 Use Library::new() for windows (#4544) 2019-06-04 21:49:05 -07:00
aa88c40a9e multi_bind_in_range(): limit to 1 socket in windows (#4549) 2019-06-04 20:55:02 -07:00
8ec5a47027 Add EntryWriter::write() stub for windows (#4546) 2019-06-04 20:15:37 -07:00
5bd3eb4557 Up number of threads (#4541) 2019-06-04 18:01:28 -07:00
e9cb4a12dc Bump serde_derive from 1.0.91 to 1.0.92 (#4505)
automerge
2019-06-04 15:48:23 -07:00
de5cad9211 Add account owner to Storage Accounts (#4537)
* Add account owner to Storage Accounts

* Fix tests
2019-06-04 14:52:52 -07:00
e3365529de Enable transaction fees for multinode-demo/ and net/ (#4527)
* Collect fees at the end of a slot

* Enable transaction fees for multinode-demo/ and net/
2019-06-04 14:51:52 -07:00
ce2ce76958 Bump serde from 1.0.91 to 1.0.92 (#4504)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.91 to 1.0.92.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.91...v1.0.92)
2019-06-04 14:32:09 -07:00
16f2fb5c09 Bump tokio from 0.1.20 to 0.1.21 (#4489)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 0.1.20 to 0.1.21.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-0.1.20...tokio-0.1.21)
2019-06-04 14:31:29 -07:00
d77c98530f Bump libc from 0.2.55 to 0.2.58 (#4514)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.55 to 0.2.58.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.55...0.2.58)
2019-06-04 14:31:06 -07:00
fe40b75ac6 Bench TPS tweaks for transaction fees (#4538)
* use lamports_per_signature instead of hard coding it in bench client
2019-06-04 13:56:11 -07:00
e7129757c9 store_accounts to use try_available (#4523)
* store_accounts to use try_available

* tighter

* clippy
2019-06-04 11:21:12 -07:00
3635a68129 solana-install now compiles for Windows (#4531)
automerge
2019-06-04 08:51:20 -07:00
70a16e91a5 Randomize avalanche broadcast peer table for each blob (#4529)
* fix clippy warnings
2019-06-03 20:38:05 -07:00
41daf1ef0c Wait for crate to be locatable on crates.io after uploading (#4526)
* Wait for crate to be locatable on crates.io after uploading

* Fix nits and shellcheck

* shellchecker
2019-06-03 19:54:41 -06:00
ff77789718 Collect fees at the end of a slot (#4525) 2019-06-03 18:40:20 -07:00
a77775cb58 Move validation submissions into its own fn (#4528)
automerge
2019-06-03 18:27:06 -07:00
167e15a5ae Update replicator sampling and proof generation (#4522)
* Update replicator sampling and proof generation

* Clippy
2019-06-03 17:27:28 -07:00
dea663d509 Storage arranged by fork (#4518) 2019-06-03 15:34:32 -07:00
9754e551cb Fund vote accounts with 1 lamport only (#4512) 2019-06-03 14:48:01 -07:00
40a4ac15f1 Remove per transaction fee (#4521)
automerge
2019-06-03 13:00:08 -07:00
c56052ff16 remove from_account from stake_instruction (#4502) 2019-06-03 09:04:51 -07:00
482ef51502 register_tick() on the correct bank (#4506)
* skip syscall_id in hash and delta

* add more tests, skip syscalls
2019-06-03 09:04:26 -07:00
e4ca3900ae Reduce default validators from 5 to 2 2019-06-02 22:58:59 -07:00
3574469052 Add random distribution for avalanche peers (#4493)
* Add random distribution for avalanche peers

* fix clippy warnings

* bug fixes

* nits
2019-06-01 07:55:43 -07:00
e15246746d Enable non-zero fees for all testnets (#4513)
automerge
2019-05-31 22:33:55 -07:00
ec5cca41bc Separate bootstrap leader's stake lamports from its identity lamports (#4510)
* Revert "Prevent run.sh from running beyond the first epoch under normal use (#4498)"

This reverts commit d343c409e6.

* Separate bootstrap leader's stake lamports from its identity lamports
2019-05-31 19:58:52 -07:00
bc1368ba3e Make run.sh compatible with multinode-demo/validator.sh (#4507)
automerge
2019-05-31 16:51:09 -07:00
c0a161afe8 Enable fees in ci/localnet-sanity.sh (#4508)
automerge
2019-05-31 16:50:39 -07:00
d343c409e6 Prevent run.sh from running beyond the first epoch under normal use (#4498)
The local cluster that run.sh starts will typically only have a single
node, the bootstrap leader.  With epoch warmup enabled, run.sh will fail
after ~90 seconds once the warmup period has been exceeded due to lack
of votes from other validators.

As a workaround, disable epoch warmup and set slots-per-epoch to 1
million to keep run.sh alive for more than a fortnight.
2019-05-31 15:42:32 -07:00
64e8a21d73 Add tick height syscall (#4497)
* Remove tick_height from entrypoint signature

* Impl tick_height syscall and use in storage program

* Properly remove tick height from bpf handling
2019-05-31 16:29:21 -06:00
ce04d2bfc2 Add replicator support to net/ (#4494) 2019-05-31 15:27:31 -07:00
1c1d83bd56 skip syscall_id in hash and delta (#4500)
* skip syscall_id in hash and delta

* add more tests, skip syscalls
2019-05-31 12:26:45 -07:00
028e111fbc remove payer from vote instructions (#4475) 2019-05-31 11:45:17 -07:00
9670788bf5 Bump dirs from 1.0.5 to 2.0.1 (#4490)
Bumps [dirs](https://github.com/soc/dirs-rs) from 1.0.5 to 2.0.1.
- [Release notes](https://github.com/soc/dirs-rs/releases)
- [Commits](https://github.com/soc/dirs-rs/commits)
2019-05-31 08:57:35 -07:00
d2f9625878 minor update 2019-05-31 07:36:59 -07:00
182096dc1a Create bank snapshots (#4244)
* Revert "Revert "Create bank snapshots (#3671)" (#4243)"

This reverts commit 81fa69d347.

* keep saved and unsaved copies of status cache

* fix format check

* bench for status cache serialize

* misc cleanup

* remove appendvec storage on purge

* fix accounts restore

* cleanup

* Pass snapshot path as args

* Fix clippy
2019-05-30 21:31:35 -07:00
2d284ba6db Fix clear-config.sh 2019-05-30 15:31:41 -07:00
1de805e7cd Add fees syscall to expose cluster fees into programs (#4472) 2019-05-30 15:18:48 -07:00
d642125f68 publish-crate fixups 2019-05-30 15:15:58 -07:00
b8aff218e2 Shutdown all services before bailing replicator init (#4487)
automerge
2019-05-30 14:36:47 -07:00
045d4d5294 Unignore test test_repairman_catchup (#4484) 2019-05-30 13:21:12 -07:00
d67dd8ce1f Fix stable metrics dashboard for current channel use (#4483) 2019-05-30 13:16:26 -06:00
4d6679906b Clean up crates.io publishing (#4478)
* Clean up crates.io publishing

* Cargo.lock
2019-05-30 11:53:41 -07:00
4537f54532 Break noop_program -> runtime dependency (#4481) 2019-05-30 11:20:49 -07:00
39b40dfff8 Remove runtime dependency on storage (#4480) 2019-05-30 10:54:28 -07:00
c82f4a1b6d Unignore test_repairman_catchup 2019-05-29 21:59:41 -07:00
7a021dff05 Beautify Cargo.tomls with |cargo tomlfmt| (#4477) 2019-05-29 18:30:49 -07:00
348c2263ba Remove genesis blockhash (#4471)
* Remove genesis blockhash

* Remove genesis blockhash from tests

* Fix golden
2019-05-29 17:29:02 -07:00
b5324063f1 Use thread pools for rayon par_iter (#4473)
* Use thread pools for rayon par_iter

* address review comments

* cleanup
2019-05-29 17:16:36 -07:00
6ed071c4dd Fix storage stage operating on empty slots (#4474)
* Fix storage stage operating on empty slots

* Reduce fn argument count

* Fix tests
2019-05-29 15:01:20 -07:00
4404634b14 Coalesce packets better (#4456) 2019-05-29 12:17:50 -07:00
6a1de33138 tighten up packets_to_blobs (#4464)
* tighten up packets_to_blobs

* missed a test
2019-05-29 10:08:35 -07:00
c05c3e69ca add tests and groom naming (#4467) 2019-05-29 10:08:03 -07:00
534244b322 Fix set_roots to use cached bank parents instead of searching blocktree (#4466) 2019-05-29 09:43:22 -07:00
335dfdc4d5 Fix Gossip skipping push for some values (#4463)
* Make gossip skip over values from Pruned nodes

* Add test and init blooms to contain the origin
2019-05-28 18:39:40 -07:00
a7ef409c2b Drop influxcloud (#4460)
automerge
2019-05-28 16:26:59 -07:00
14594217db undelete votestate etc (#4457) 2019-05-28 16:01:27 -07:00
c8a03c7b3d Save RNG for generating random storage sampling offsets (#4450)
* Save RNG for generating random storage sampling offsets

* fix clippy

* fix stable-perf

* fix chacha
2019-05-28 14:14:46 -07:00
9fcd162412 update book with passive staking (#4451) 2019-05-28 14:02:04 -07:00
441fed7a5b check freeze before updating slot_hashes (#4448)
* check freeze before updating slot_hashes

* fixup
2019-05-28 12:25:55 -07:00
ff31ffbd54 add more information to dropped vote warning (#4449)
* add more information to dropped vote warning

* fixup
2019-05-28 12:25:34 -07:00
0e26ee854b Add test indicating need for credit-only account handling (#4441)
* Add test indicating need for credit-only account handling

* Add commented correct future test lines
2019-05-28 11:57:22 -04:00
5340800cea Add some optimizing to ThinClient (#4112)
Can create a multi-socketed ThinClient which will use request time
from get_recent_blockhash to tune for the best node to talk to.
2019-05-27 20:54:44 -07:00
13c2e50b38 Bump sys-info from 0.5.6 to 0.5.7 (#4445)
automerge
2019-05-27 20:31:12 -07:00
dd39b2b056 Revert --retry-on-http-error usage, Travis CI's wget doesn't recognize it 2019-05-27 19:35:04 -07:00
65f89d6729 Bump logging level of validator procsesing errors (#4442) 2019-05-27 16:19:38 -07:00
1eceb4831d Use nohup and sleep a little to improve stability when launching a node 2019-05-27 13:57:40 -07:00
50303c9ede data_dir -> data-dir 2019-05-27 07:31:50 -07:00
ed6a438c51 v0.16.0 2019-05-26 19:42:15 -07:00
2adb98a4a0 Ignore flaky test_repairman_catchup (#4439)
automerge
2019-05-26 12:24:20 -07:00
471465a5f4 net/: Add solana-install test to sanity (#4438)
* Add instance creation date to motd

* Setup localtime

* Add solana-install test
2019-05-26 11:17:07 -07:00
942785b626 sdk/bpf/scripts/install.sh: Retry downloads on transient 403 S3 failures seen in CI (#4436)
* Avoid caching perf-libs in CI

* Retry downloads on transient 403 S3 failures seen in CI
2019-05-25 14:41:09 -07:00
aa3c00231a Fix should_update check to update EpochSlots in gossip (#4435)
automerge
2019-05-25 06:44:40 -07:00
d772a27936 Plumb ClusterInfoRepairListener (#4428)
automerge
2019-05-24 19:20:09 -07:00
0302f13b97 add datapoint for corrupt vote_account (#4424) 2019-05-24 18:34:56 -07:00
16b25d0874 Clone with https for Travis/repo with submodules (#4431) 2019-05-24 21:18:31 -04:00
c2dcbee6af cd within the subshell 2019-05-24 18:10:25 -07:00
1f71d05299 remove copying of forwarded packets (#4425)
automerge
2019-05-24 17:35:09 -07:00
bfa1c025fd Add rust bpf allocator (#4426) 2019-05-24 16:21:42 -07:00
8611b40074 Add argument to net/net to specify number of nodes (#4429)
Allows for testing different node counts without recreating the network.
2019-05-24 16:20:14 -07:00
916844d399 Fix replicator account setup in fullnode.sh (#4430) 2019-05-24 15:40:49 -07:00
4c9b7c9d2b Submit all incoming proofs as valid (#4377) 2019-05-24 14:49:10 -07:00
9843c3a5cb Restrict transaction fee payers to system accounts (#4198)
automerge
2019-05-24 13:06:55 -07:00
f56955a17c Use absolute path to env.sh 2019-05-24 12:27:12 -07:00
9784bbf154 Pay for storage transactions with a system account (#4423)
automerge
2019-05-24 11:04:05 -07:00
45642c4da1 Add path to env.sh 2019-05-24 09:56:07 -07:00
8eac199e8b Include perf-libs in release tarball (#4422) 2019-05-24 09:28:52 -07:00
2e251ccc5c De-fullnode variable names (#4420) 2019-05-24 04:31:39 -07:00
cf4bb70d80 Rename id to pubkey in cluster_info_repair_listener (#4421) 2019-05-24 04:31:32 -07:00
57f8a15b96 Fix issues in ClusterInfoRepairListener (#4418)
* Sort repairmen before shuffling so order is the same across all validators

* Reduce repair redundancy to 1 for now

* Fix local cache of roots so that 1) Timestamps are only updated to acknowledge a repair was sent 2) Roots are updated even when timestamps aren't updated to keep in sync with network

* Refactor code, add test
2019-05-24 00:47:51 -07:00
cfe5afd34c _id => _pubkey variable renaming (#4419)
* wallet: rename *_account_id to *_account_pubkey

* s/from_id/from_pubkey/g

* s/node_id/node_pubkey/g

* s/stake_id/stake_pubkey/g

* s/voter_id/voter_pubkey/g

* s/vote_id/vote_pubkey/g

* s/delegate_id/delegate_pubkey/g

* s/account_id/account_pubkey/g

* s/to_id/to_pubkey/g

* s/my_id/my_pubkey/g

* cargo fmt

* s/staker_id/staker_pubkey/g

* s/mining_pool_id/mining_pool_pubkey/g

* s/leader_id/leader_pubkey/g

* cargo fmt

* s/funding_id/funding_pubkey/g
2019-05-23 23:20:04 -07:00
94beb4b8c2 More fullnode -> validator renaming (#4414)
* s/fullnode_config/validator_config/g

* s/FullnodeConfig/ValidatorConfig/g

* mv core/lib/fullnode.rs core/lib/validator.rs

* s/Fullnode/Validator/g

* Add replicator-x.sh

* Rename fullnode.md to validator.md

* cargo fmt
2019-05-23 22:05:16 -07:00
50207a30ef Rename solana-fullnode to solana-validator redux (#4417) 2019-05-23 21:28:18 -07:00
35e8f966e3 add freeze_lock() and fix par_process_entries() failure to detect self conflict (#4415)
* add freeze_lock and fix par_process_entries failure to detect self conflict

* fixup

* fixup
2019-05-23 17:35:15 -07:00
943cd0a24a Add credit-only info to AccountMetadata (#4405)
* Add credit-only flag to AccountMeta, default to false

* Sort keys by is_credit_only within signed/unsigned groupings

* Process and de-dupe program keys along with other account keys

* Add message helper functions

* Fix test

* Improve comment

* s/is_credit_only/is_debitable

* Add InstructionKeys helper struct, and simplify program_position method
2019-05-23 18:19:53 -04:00
0b892b2579 Reduce 100ms to 1ms. (#4412)
automerge
2019-05-23 15:15:26 -07:00
fb2eac20bb Rename solana-fullnode to solana-validator (#4411) 2019-05-23 15:06:01 -07:00
b37d2fde3d Add storage mining pool (#4364)
* Add storage mining pool

* Set gossip port

* Add create-storage-mining-pool-account wallet command

* Add claim-storage-reward wallet command

* Create storage account upfront

* Add storage program to genesis

* Use STORAGE_ACCOUNT_SPACE

* Fix tests

* Add wallet commands to create validator/replicator storage accounts

* Add create_validator_storage_account()

* Storage stage no longer implicitly creates a storage account
2019-05-23 14:50:23 -07:00
6b35e16676 Turn on real PoH in perf testnets (#4407)
* Turn on real PoH in perf testnets

* enable real PoH for all testnets except "testnet"
2019-05-23 13:22:52 -07:00
6a9e0bc593 Change EpochSlots to use BtreeSet so that serialization/deserialization returns the same order (#4404)
automerge
2019-05-23 03:50:41 -07:00
591fd72e0b Implement listener for serving repairs through Repairman protocol (#4306)
* Make listener for serving repairs through Repairman protocol
2019-05-23 03:10:16 -07:00
2ed77b040a create_genesis_block() now returns a struct (#4403) 2019-05-22 20:39:00 -07:00
7ada8510c4 add slot_hashes to bank, remove phony slot_hashes_from_vote_instruction (#4401) 2019-05-22 19:07:56 -07:00
b8f6c17dee Don't filter transactions if we are buffering it locally (#4395)
automerge
2019-05-22 17:54:28 -07:00
2f976ae460 Dashboard update for real PoH performance (#4397) 2019-05-22 16:18:57 -07:00
36019cb1e3 Tweaks to real PoH based on perf testing (#4396)
* Some counters for real poh perf analysis

* more metrics

* Comment on CPU affinity change, and reduce hash batch size based on TPS perf

* review comments
2019-05-22 15:54:24 -07:00
99d2428041 Transaction format changes toward Credit-Only accounts (#4386)
* Add num_readonly_accounts slice

* Impl programs in account_keys

* Emulate current account-loading functionality using program-account_keys (breaks exchange_program_api tests)

* Fix test

* Add temporary exchange faucet id

* Update chacha golden

* Split num_credit_only_accounts into separate fields

* Improve readability

* Move message field constants into Message

* Add MessageHeader struct and fixup comments
2019-05-22 18:23:16 -04:00
c121498b5b Check that Rust project exists (#4393) 2019-05-22 15:09:59 -07:00
eef2bdf690 Add CPU affinity for PoH service thread (#4394)
automerge
2019-05-22 14:21:43 -07:00
190656967d Bump nix from 0.13.0 to 0.14.0 (#4382)
Bumps [nix](https://github.com/nix-rust/nix) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/nix-rust/nix/releases)
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.13.0...v0.14.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-22 14:07:35 -07:00
90e73515ed Remove ls which is innacurate since we never clean up the logs (#4392)
automerge
2019-05-22 13:11:20 -07:00
1d7a758c97 Bump perf libs version to fix out buffer sizing (#4385) 2019-05-22 13:00:03 -07:00
e5b7aead12 Cargo watch ignores local metrics (#4384) 2019-05-22 00:08:18 -07:00
578c2ad3ea add bank hash to votes (#4381) 2019-05-21 21:45:38 -07:00
de6838da78 change unwrap to expect where WSL sometimes aborts (#4375)
* change unwrap to expect where WSL sometimes aborts

* clippy
2019-05-21 21:34:51 -07:00
604071c5d8 Bump num-traits from 0.2.7 to 0.2.8 (#4379)
Bumps [num-traits](https://github.com/rust-num/num-traits) from 0.2.7 to 0.2.8.
- [Release notes](https://github.com/rust-num/num-traits/releases)
- [Changelog](https://github.com/rust-num/num-traits/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-traits/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-21 21:27:00 -07:00
41a377013f fix spelling (#4378)
automerge
2019-05-21 17:13:21 -07:00
52d453d06f Reduce broadcast prints (#4368) 2019-05-21 17:02:19 -07:00
58295b825d introduce syscalls (#4373) 2019-05-21 15:19:41 -07:00
f6c7812fcc Rename Broker to Swapper (#4371) 2019-05-21 14:21:41 -07:00
2f7561e4ee Split SDK's BPF Rust-utils (#4369) 2019-05-21 13:39:27 -07:00
1cbd2372fc Revert 4271 workaround (#4367)
* Revert "#4271 not reproducable, remove workaround (#4363)"

This reverts commit ef0580bd3d.

* Remove old comment
2019-05-21 11:53:53 -07:00
28f948aa7f Multi rust projects (#4362) 2019-05-21 11:22:33 -07:00
c9ba9e4eb7 Add storage space constant (#4366)
automerge
2019-05-21 11:07:13 -07:00
f877fb8c8f Don't print leader update message unless leader actually updates (#4365) 2019-05-21 11:06:56 -07:00
772ba41ede Cargo.lock 2019-05-21 08:08:07 -07:00
6374e69a69 Add mining pool wallet commands (#4360)
automerge
2019-05-21 07:32:38 -07:00
ef0580bd3d #4271 not reproducable, remove workaround (#4363) 2019-05-20 23:45:09 -07:00
1a77486f8e Make RootedSlotsIterator for traversing slots on the root fork (#4361) 2019-05-20 23:09:00 -07:00
ead15d294e add get_epoch_vote_accounts rpc (#4317)
* add get_epoch_vote_accounts rpc

* fixups

* documentation and type updates
2019-05-20 22:21:13 -07:00
1acfcf3acf Fix storage-keypair 2019-05-20 19:54:37 -07:00
d15e248cdb Add bootstrap storage account to genesis (#4359)
* Add bootstrap storage account to genesis

* Add storage account genesis command to run.sh

* Update airdrop for all validators

* Remove unhelpful Short for arg

* Set the correct program owner
2019-05-20 19:46:15 -07:00
f1e5edee14 Modify Roots Column To Support Multiple Roots (#4321)
* Fix 1) Roots column family to handle storing multiple slots, 2) Store all slots on the rooted path in the roots column family
2019-05-20 19:04:18 -07:00
7153abd483 Revert "Performance tweaks (#4340)" (#4350)
* Revert "Performance tweaks (#4340)"

This reverts commit 55cee5742f.

* Revert Rc change
2019-05-20 17:48:42 -07:00
90fb5d074d Bump num-traits from 0.2.6 to 0.2.7 (#4355)
Bumps [num-traits](https://github.com/rust-num/num-traits) from 0.2.6 to 0.2.7.
- [Release notes](https://github.com/rust-num/num-traits/releases)
- [Changelog](https://github.com/rust-num/num-traits/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-traits/compare/num-traits-0.2.6...num-traits-0.2.7)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-20 16:35:14 -06:00
af82b0dce9 Fix sending root slots instead of current slot (#4354)
automerge
2019-05-20 15:01:55 -07:00
d4da2fbacd fix bench warnings (#4356) 2019-05-20 14:32:23 -07:00
77efe95730 Order "install" correctly 2019-05-20 13:54:15 -07:00
86e03a6d1b support issuing vote instructions from system account (#4338)
* issue vote instructions from system account

* fixup

* bring back KeypairUtil
2019-05-20 13:32:32 -07:00
114e2989fa Improve PoH unit test asserts (#4351)
automerge
2019-05-20 13:02:44 -07:00
7024c73e9b Revert banking threads increase which seems to be slower in testing. (#4349) 2019-05-20 11:42:37 -07:00
6d418aa3f1 Use rust_stable 2019-05-20 10:48:48 -07:00
f079a78c5e Remove fee arg from system_transaction::* (#4346)
automerge
2019-05-20 10:03:19 -07:00
6365c4c061 Use cleanup (#4347) 2019-05-20 09:58:27 -07:00
55cee5742f Performance tweaks (#4340)
* Use Rc to prevent clone of Packets

* Fix min => max in banking_stage threads.

Coalesce packet buffers better since a larger batch will
be faster through banking and sigverify.

Deconstruct batches into banking_stage from sigverify since
sigverify likes to accumulate batches but then a single banking_stage
thread will be stuck with a large batch. Maximize parallelism by
creating more chunks of work for banking_stage.
2019-05-20 09:15:00 -07:00
034eda4546 Fix a couple replicator nits (#4345)
automerge
2019-05-20 08:55:45 -07:00
44ff25d044 Update readme
* rustfmt no longer in preview
* since virtual manifest, cargo commands no longer require `--all`
2019-05-19 19:41:15 -06:00
a7e160e5c4 Add datapoint metrics to dashboard (#4343)
automerge
2019-05-19 15:07:03 -07:00
6283cc916d Add SOLANA_METRICS_MAX_POINTS_PER_SECOND env var (#4342) 2019-05-19 13:56:52 -07:00
4b6aca6120 Bump tempfile from 3.0.7 to 3.0.8 (#4341)
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.0.7 to 3.0.8.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.0.7...v3.0.8)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-18 19:56:51 -07:00
20b2be6e0b Enable real PoH on beta testnet as well 2019-05-18 19:45:00 -07:00
cbebc7a80c Expand shortArgs correctly 2019-05-18 19:00:48 -07:00
06eb2364f2 Handle missed slots in storage stage (#4337)
* Handle missed slots in storage stage

* Fix test compile

* Make test use the new missed slot support
2019-05-18 15:24:50 -07:00
167890ca63 Set rust_version 2019-05-18 14:48:53 -07:00
392a39dd54 Poh subsystem cleanup, genesis plumbing, enable real PoH on edge testnet (#4292)
* Remove unused PohServiceConfig::Step

* Clarify variable name

* Poh::hash() now takes an iteration counter

* man -> max

* Inline functions with single call site

* Move PohServiceConfig into GenesisBlock

* Add plumbing to enable real PoH on testnets

* Batch hashes to improve PoH hash rate

* Ensure a constant hashes_per_tick

* Remove PohEntry mixin field

* Poh/PohEntry no longer maintains tick_height

* Ensure a constant hashes_per_tick

* ci/localnet-sanity.sh: Use real PoH

* Rework Poh/PohService to keep PohRecorder unlocked as much as possible while hashing
2019-05-18 14:01:36 -07:00
7e1a7862db test_process_store_ok() now pays with a system account (#4339)
automerge
2019-05-17 20:17:50 -07:00
458ae3fdac Switch to instances with AVX-512 if possible for better interop with dev machines (#4328)
automerge
2019-05-17 20:06:07 -07:00
431cc82032 add Transaction::partial_sign() (#4333)
* add partial sign

* nits
2019-05-17 18:55:57 -07:00
18c6729d6c Bump tar from 0.4.25 to 0.4.26 (#4330)
Bumps [tar](https://github.com/alexcrichton/tar-rs) from 0.4.25 to 0.4.26.
- [Release notes](https://github.com/alexcrichton/tar-rs/releases)
- [Commits](https://github.com/alexcrichton/tar-rs/compare/0.4.25...0.4.26)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-17 17:46:12 -07:00
9476fe5ce3 Use log levels for datapoint metrics (#4335)
* Use log levels for datapoint metrics

* address review comments

* fix cyclomatic complexity
2019-05-17 17:34:05 -07:00
788290ad82 Rework Storage Program to accept multiple proofs per segment (#4319)
automerge
2019-05-17 14:52:54 -07:00
6b5bcfaa58 Bump libc from 0.2.54 to 0.2.55 (#4324)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.54 to 0.2.55.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.54...0.2.55)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-17 13:24:12 -07:00
4ed0cded9c Rm metrics docker even if not running (#4329) 2019-05-17 13:13:38 -07:00
035a364122 Add expect to get better errors on crash (#4327) 2019-05-17 12:49:41 -07:00
b114bc3674 Add benchmark for sigverify stage (#4320) 2019-05-17 11:09:42 -07:00
bc74ee7117 Common Rust-BPF utilities and types (#4325) 2019-05-17 11:04:29 -07:00
b2ce5dc9f5 Adjust log level for counter metrics (#4323) 2019-05-17 07:00:06 -07:00
e920191de0 Rate limit metrics per log level (#4313)
* Rate limit metrics per log level

* fix tests
2019-05-16 22:27:05 -07:00
39e85a3e53 kill some bs58 (#4316)
* kill some bs58

* fixup
2019-05-16 21:43:18 -07:00
41156da4ca Sync run.sh with fd3f2cb (#4322)
automerge
2019-05-16 21:32:23 -07:00
9271ba0039 Cleanup Rust BPF program building (#4318) 2019-05-16 17:35:42 -07:00
b3e45fd6b7 Add erroring tx to unexpected validator error logging (#4314)
* Add tx logging to error

* Add tx logging to unexpected validator errors
2019-05-16 14:59:22 -07:00
7bfb60f82e add impl FromStr for Signature (#4315)
automerge
2019-05-16 14:54:31 -07:00
359c50f1b3 cp -a includes -r (#4312) 2019-05-16 12:24:04 -07:00
fff1631a8b Return a better error when a program account isn't found (#4310) 2019-05-16 11:32:27 -06:00
7d42ae30d9 Update Rust-BPF to 2018 Edition (#4307) 2019-05-16 09:12:33 -07:00
87414de3e2 switch over to passive stakes (#4295)
* add failing test

* switch over to passive stakes

* test multiple stakers
2019-05-16 08:23:31 -07:00
a0ffbf50a5 Correctly remove replicator from data plane after its done repairing (#4301)
* Correctly remove replicator from data plane after its done repairing

* Update discover to report nodes and replicators separately

* Fix print and condition to be spy
2019-05-16 07:14:58 -07:00
d40b66ff7b Bump solana_rbpf from 0.1.10 to 0.1.11 (#4304)
Bumps [solana_rbpf](https://github.com/solana-labs/rbpf) from 0.1.10 to 0.1.11.
- [Release notes](https://github.com/solana-labs/rbpf/releases)
- [Commits](https://github.com/solana-labs/rbpf/commits/v0.1.11)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 01:07:10 -07:00
abd7f6b090 Change slot_meta_iterator() to return an iterator not a cursor (#4303)
automerge
2019-05-15 18:28:23 -07:00
d8735df1de Update replicator to use cluster_info instead of cached client (#4302) 2019-05-15 18:14:04 -07:00
481853e1b1 Bump reqwest from 0.9.16 to 0.9.17 (#4296)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.16 to 0.9.17.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.16...v0.9.17)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-15 16:02:17 -07:00
778bcbce50 Reduce log level for frequent log message and frequency for metrics datapoint (#4300)
automerge
2019-05-15 16:01:17 -07:00
fd3f2cb910 Add Storage accounts for all nodes (#4298)
* Setup storage keypairs for all nodes

* Clean up naming

* clippy

* Update arg value_names
2019-05-15 15:19:29 -07:00
915956b94b Remove disable leader rotation option (#4299)
automerge
2019-05-15 15:16:45 -07:00
4576250342 Fix bug in storage processor and remove duplicate Constant (#4294)
* Fix bug in storage processor and remove duplicate Constant

* Add test

* Bump replicator timeout
2019-05-15 13:28:56 -07:00
2bef1b0433 Use rust-bpf-sysroot release branches (#4293) 2019-05-15 12:45:48 -07:00
628128b376 add passive staking to local_cluster (#4285)
* add passive staking to local_cluster

* add stake_program to genesis

* use equal stakes in local_cluster tests
2019-05-15 12:15:31 -07:00
916017ca2c Fix repair for a range of slots (#4286)
* Fix repair for a range of slots

* Delete RepairInfo
2019-05-15 11:37:20 -07:00
3204a00e73 Update rust-bpf-sysroot to latest (#4291) 2019-05-15 09:53:44 -07:00
1d327a5167 Bump bincode from 1.1.3 to 1.1.4 (#4290)
Bumps [bincode](https://github.com/TyOverby/bincode) from 1.1.3 to 1.1.4.
- [Release notes](https://github.com/TyOverby/bincode/releases)
- [Commits](https://github.com/TyOverby/bincode/compare/v1.1.3...v1.1.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-15 09:47:55 -06:00
6e4f9cedf2 Fix Plum Tree link 2019-05-15 08:15:22 -07:00
a79fbbafc9 SlotMeta is incorrectly updated on insertion of erasure blobs (#4289)
* Fix put_coding_blob_bytes to properly update slotmetas and chaining
2019-05-15 00:28:31 -07:00
1d54d29076 Fix reading ledger for chacha encrypt (#4288) 2019-05-14 16:59:17 -07:00
10b9a4806b Fix incorrect genesis blockhashes on restart (#4287) 2019-05-14 16:32:44 -07:00
0c1191c3ee rework staking_utils (#4283) 2019-05-14 16:15:51 -07:00
18b386cd10 remove unused make_active_set_entries (#4284) 2019-05-14 15:08:49 -07:00
714b8c7fc8 Bump tokio from 0.1.18 to 0.1.20 (#4280)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 0.1.18 to 0.1.20.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-0.1.18...tokio-0.1.20)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-14 15:30:56 -06:00
216e9a61a0 expose stake directly from bank (#4281) 2019-05-14 13:35:14 -07:00
0f498e6265 remove unused filter_zero_balance (#4279) 2019-05-14 10:44:29 -07:00
e8ad822111 get program names from programs (#4273)
* get program names from programs

* fixup
2019-05-14 10:44:16 -07:00
65a82ebf50 Fix broken tip (#4278)
automerge
2019-05-14 02:35:32 -07:00
727802684c Use 20 bytes signature slice for cache purposes (#4260) 2019-05-13 22:53:10 -07:00
e20a8329d3 Add API to iterate over slot's blobs (#4276) 2019-05-13 22:04:54 -07:00
88c2d0fad4 Add genesis blockhash to replicators and blob filter for window (#4275)
* Add genesis blockhash to replicators and blob filter for window

* Fixes to mining submission and ledger download

* Add todo over sleep

* Update log
2019-05-13 21:19:51 -07:00
3bd921264a Move EpochSchedule into own module (#4272) 2019-05-13 16:24:32 -07:00
7501ed65e5 Initialize and Update EpochSlots in RepairService (#4255)
* Initialize EpochSlots in RepairService

* Fix flaky test
2019-05-13 15:37:50 -07:00
2eaa64c4e8 valhashators -> validators 2019-05-13 15:29:23 -07:00
c9b86018c6 Filter out all unprocessed transactions before forwarding them (#4266)
* Filter out all unprocessed transactions before forwarding them

* fix clippy
2019-05-13 14:40:05 -07:00
a4fb01b42b Add +x 2019-05-13 14:30:44 -07:00
0d2574f8f0 get DLL names from programs that made the DLL (#4269)
* get program names from programs

* fixup
2019-05-13 14:17:44 -07:00
796000e96f Improve erasure metrics (#4268)
* Improve erasure metrics

* Simplify metrics submission
2019-05-13 16:04:43 -05:00
e2f00dc205 Cargo.toml implied (#4270)
automerge
2019-05-13 13:51:42 -07:00
5e91f8f59d Update reported tx count to exclude errors (#4201) 2019-05-13 13:23:52 -07:00
e2830f5b0e Add rate limit to metrics datapoint submission (#4237)
Cleanup

Raise limit on submission threshold

Pick nits and add metrics point

fmt

Fixup compiler warning

Cleanup if-else

Append new point to vec rather than submit
2019-05-13 14:17:25 -06:00
a2e3a92b01 Extend GetBlockHash RPC API to include the fee scehdule for using the returned blockhash (#4222) 2019-05-13 12:49:37 -07:00
23c696706b add stake_accounts to banks' caches (#4267) 2019-05-13 12:33:23 -07:00
1393d26f63 Remove obsolete internal multinode-demo/ logging (#4265) 2019-05-13 10:51:18 -07:00
1b68da7572 Use solana-ed25519-dalek v0.2.0 (#4264)
automerge
2019-05-13 09:51:59 -07:00
8542006259 Config instructions now only require one key (#4258) 2019-05-12 22:47:12 -07:00
426d06b89b Improve target/ cache logging 2019-05-12 22:16:23 -07:00
06378d6db6 Refine killNode logging 2019-05-12 21:21:31 -07:00
dccfe31e8c Increase target cache size for coverage build 2019-05-12 21:21:31 -07:00
1dce5976cf Disable node restart in localnet-sanity.sh 2019-05-12 21:21:31 -07:00
340d01665c Avoid generating default keypair 2019-05-12 21:21:31 -07:00
50f79e495e net/ improvements (#4257)
automerge
2019-05-11 22:54:50 -07:00
dd12db2f06 Correctly handle more zones than additional nodes 2019-05-11 14:47:27 -07:00
1afccb7351 Add more regions to the testnet 2019-05-11 14:12:13 -07:00
bfc65e829e Use zone[0] for any left over nodes 2019-05-11 14:07:36 -07:00
eb4515525d Bump ws from 0.8.0 to 0.8.1 (#4251)
Bumps [ws](https://github.com/housleyjk/ws-rs) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/housleyjk/ws-rs/releases)
- [Changelog](https://github.com/housleyjk/ws-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/housleyjk/ws-rs/compare/v0.8.0...v0.8.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-10 21:06:33 -07:00
55f5f6a033 Make links clickable 2019-05-10 19:49:45 -07:00
7ae421eaf6 Update release version in book (#4254) 2019-05-10 18:43:08 -06:00
e7da2c0931 Add validator registration link (#4229) 2019-05-10 15:14:03 -07:00
133be2df51 Check for transaction forwarding delay to detect an expired transaction before forwarding it (#4249)
Also refactored code for forwarding packets, and added test for it
2019-05-10 14:28:38 -07:00
06a93dcb43 Move to solana-ed25519-dalek (#4248) 2019-05-10 15:26:46 -06:00
ad7f04a245 Add genesis_blockhash to erasure blobs so they don't get filtered out by window_service (#4247) 2019-05-10 14:06:31 -07:00
0da6e1af14 Repair Design Proposal (#3402)
* Update information about existing repair protocol + new repairman proposal
2019-05-10 13:50:23 -07:00
576524f13b Updates to storage proposal with more storage contract details (#3373) 2019-05-10 09:19:06 -07:00
f567877d1d Cleanup metrics (#4230) 2019-05-10 08:33:58 -07:00
9881820444 RepairService saves db_iterator instead of reconstructing on every search (#4242) 2019-05-09 19:57:51 -07:00
ba8f49366d passive staking 4 (#4240)
* support passive staking with wallet, use it

* fixups

* clippy

* cleanup app generation in wallet, finish fullnode.sh staking

* _id and _keypair => pubkey
use keygen, not wallet to get pubkey

* found 'em
2019-05-09 19:31:42 -07:00
81fa69d347 Revert "Create bank snapshots (#3671)" (#4243)
This reverts commit abf2b300da.
2019-05-09 19:27:27 -07:00
abf2b300da Create bank snapshots (#3671)
* Be able to create bank snapshots

* fix clippy

* load snapshot on start

* regenerate account index from the storage

* Remove rc feature dependency

* cleanup

* save snapshot for slot 0
2019-05-09 19:27:06 -07:00
a8254fd258 Clear stale ledger on fullnode startup if necessary (#4238) 2019-05-09 17:09:36 -07:00
b15848de3b Bump tar from 0.4.24 to 0.4.25 (#4239)
Bumps [tar](https://github.com/alexcrichton/tar-rs) from 0.4.24 to 0.4.25.
- [Release notes](https://github.com/alexcrichton/tar-rs/releases)
- [Commits](https://github.com/alexcrichton/tar-rs/compare/0.4.24...0.4.25)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-09 17:07:31 -07:00
ab3c988146 API for getting first and last slots in epoch (#4241)
automerge
2019-05-09 16:06:57 -07:00
575a0e318b Add newly completed slots signal to Blocktree (#4225)
* Add channel to blocktree for communicating when slots are completed

* Refactor RepairService options into a RepairStrategy
2019-05-09 14:10:04 -07:00
a031b09190 Add replicator support to multinode demo (#4221)
automerge
2019-05-09 13:43:39 -07:00
df43e721e3 Exit 1 on ledger verification failure 2019-05-09 12:05:51 -07:00
5f72650c7f add derive Debug to Keypair (#4236) 2019-05-09 11:41:11 -07:00
5d0d467287 fix banking_stage benches (#4231) 2019-05-09 11:20:26 -07:00
994515d0f2 add impl PartialEq for Keypair (#4233)
* add-impl-PartialEq-for-Keypair

* clippy

* do the TODO, improve wrapper comments
2019-05-09 11:03:14 -07:00
1e949caa7f Move airdrop retries fully out of bash (#4234)
automerge
2019-05-09 09:48:27 -07:00
f2b727b534 Update mint keypair filename 2019-05-09 07:27:13 -07:00
f7680752e7 make gen_keypair_file take &str (#4232)
automerge
2019-05-08 23:00:48 -07:00
da4c37beec multinode-demo/ grooming (#4226)
* Rename leader to entrypoint

* The fullnode identity keypair can now be provided

* Rename _id to _keypair
2019-05-08 19:59:22 -07:00
d486d2b8ce Consolidate default arg parsing (#4224)
automerge
2019-05-08 19:12:43 -07:00
bba94c43b9 Add BankForks to RepairService (#4223)
automerge
2019-05-08 18:51:43 -07:00
9cdffc7d64 Don't push empty vecs into the unprocessed buffers (#4214) 2019-05-08 17:58:07 -07:00
5a86f2506d Remove unnecessary retrying (#4219) 2019-05-08 16:20:37 -07:00
518227eac0 add-rpc_client.get_account (#4218) 2019-05-08 15:50:23 -07:00
b8fd51e97d Add new gossip structure for supporting repairs (#4205)
* Add Epoch Slots to gossip

* Add new gossip structure to support Repair

* remove unnecessary clones

* Setup dummy fast repair in repair_service

* PR comments
2019-05-08 13:50:32 -07:00
965c1e0000 staking plumbing part 3, 3.5 (#4216) 2019-05-08 12:56:11 -07:00
a80176496d add /target/ to .gitignore files for all crates (#4217)
* add /target/ to .gitignore files for all crates

* shellcheck
2019-05-08 12:15:05 -07:00
5719b8f251 Change remote node's ssh config to allow more login retries (#4215)
automerge
2019-05-08 11:20:06 -07:00
1a2b131ceb Don't forward transactions that are expired or failed signature check (#4199) 2019-05-08 10:32:25 -07:00
349306ddf7 Bump proc-macro2 from 0.4.27 to 0.4.29 (#4180)
Bumps [proc-macro2](https://github.com/alexcrichton/proc-macro2) from 0.4.27 to 0.4.29.
- [Release notes](https://github.com/alexcrichton/proc-macro2/releases)
- [Commits](https://github.com/alexcrichton/proc-macro2/compare/0.4.27...0.4.29)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-08 09:03:30 -07:00
791ee411a5 Add root to bank forks (#4206) 2019-05-07 23:34:10 -07:00
f690c64375 Disable solana-upload-perf until performance can be debugged (#4210) 2019-05-07 23:02:09 -07:00
427963f554 Core depends on vote and budget program directly (#4204) 2019-05-07 22:41:47 -07:00
b0f2220ef6 Fix solana-upload-perf log folding. Upload bench output too (#4208) 2019-05-07 22:30:42 -07:00
908b48bf0e Increase test-stable build timeout 2019-05-07 22:23:43 -07:00
b49f8c0984 reduce replicode, introduce passive staking support (#4207) 2019-05-07 22:22:43 -07:00
7609a007c6 Add FeeCalculator to the genesis block (#4196) 2019-05-07 20:28:41 -07:00
674a49f8d7 Bump serde_derive from 1.0.90 to 1.0.91 (#4172)
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.90 to 1.0.91.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.90...v1.0.91)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-07 20:05:41 -07:00
d10bde656a Pass payer key into get_keys() (#4203) 2019-05-07 18:48:31 -07:00
401764ddb1 add create_delegate_stake_account (#4197) 2019-05-07 17:08:49 -07:00
69eeb7cf08 Fix parent record locks usage in child banks (#4159)
* Introduce record locks on txs that will be recorded

* Add tests for LockedAccountsResults

* Fix broken bench

* Exit process_entries on detecting conflicting locks within same entry
2019-05-07 15:51:35 -07:00
55e3b7d380 Storage transactions are now paid for by a system account (#4193)
* Pay program loading fees from a system account

* Pay transaction fees from a system account
2019-05-07 15:01:10 -07:00
d9e18a71ec Pay program loading fees from a system account (#4190) 2019-05-07 15:00:54 -07:00
2107e15bd3 Reduce Avalanche redundancy and implement traditional fanout (#4174)
* Reduce Avalanche redundancy and implement traditional fanout

* Revert tiny fanout

* Update diagrams and docs based on review comments
2019-05-07 13:24:58 -07:00
4f3b22d04e Minor code restyling, no functional changes 2019-05-07 12:35:29 -07:00
2c78a93001 GenesisBlock::new(X) => create_genesis_block(X) 2019-05-07 12:34:17 -07:00
2621aeee82 Set default wallet rpc port correctly 2019-05-07 11:37:51 -07:00
8e400fc4bd rework genesis (passive staking groundwork) (#4187)
* rework genesis

* fixup
2019-05-07 11:16:22 -07:00
29c2a63c8b Retry transactions that failed due to account lock (#4184)
* added test
2019-05-07 10:23:02 -07:00
736ada4e21 Bump dtoa from 0.4.3 to 0.4.4 (#4178)
Bumps [dtoa](https://github.com/dtolnay/dtoa) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/dtolnay/dtoa/releases)
- [Commits](https://github.com/dtolnay/dtoa/compare/0.4.3...0.4.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-07 07:31:57 -07:00
3df9b44d4c Bump nom from 4.2.2 to 4.2.3 (#4182)
Bumps [nom](https://github.com/Geal/nom) from 4.2.2 to 4.2.3.
- [Release notes](https://github.com/Geal/nom/releases)
- [Changelog](https://github.com/Geal/nom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Geal/nom/compare/4.2.2...4.2.3)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-07 07:31:48 -07:00
7225b89142 Bump globset from 0.4.2 to 0.4.3 (#4176)
Bumps [globset](https://github.com/BurntSushi/ripgrep) from 0.4.2 to 0.4.3.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/ripgrep/compare/globset-0.4.2...globset-0.4.3)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-07 07:15:34 -07:00
0cc0d3ab7a Bump socket2 from 0.3.8 to 0.3.9 (#4186)
Bumps [socket2](https://github.com/alexcrichton/socket2-rs) from 0.3.8 to 0.3.9.
- [Release notes](https://github.com/alexcrichton/socket2-rs/releases)
- [Commits](https://github.com/alexcrichton/socket2-rs/compare/0.3.8...0.3.9)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-07 07:15:04 -07:00
88d9618788 Bump futures from 0.1.25 to 0.1.26 (#4179)
Bumps [futures](https://github.com/rust-lang-nursery/futures-rs) from 0.1.25 to 0.1.26.
- [Release notes](https://github.com/rust-lang-nursery/futures-rs/releases)
- [Changelog](https://github.com/rust-lang-nursery/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang-nursery/futures-rs/compare/0.1.25...0.1.26)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-07 07:14:48 -07:00
57038529e0 Bump hex-literal from 0.1.4 to 0.2.0 (#4185)
Bumps [hex-literal](https://github.com/RustCrypto/utils) from 0.1.4 to 0.2.0.
- [Release notes](https://github.com/RustCrypto/utils/releases)
- [Commits](https://github.com/RustCrypto/utils/compare/hex-literal-v0.1.4...hex-literal-v0.2.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-07 07:14:16 -07:00
5c25eae631 Bump tokio-sync from 0.1.4 to 0.1.5 (#4177)
Bumps [tokio-sync](https://github.com/tokio-rs/tokio) from 0.1.4 to 0.1.5.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-sync-0.1.4...tokio-sync-0.1.5)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-06 22:06:09 -07:00
b8b4d33f72 Bump h2 from 0.1.17 to 0.1.18 (#4175)
Bumps [h2](https://github.com/carllerche/h2) from 0.1.17 to 0.1.18.
- [Release notes](https://github.com/carllerche/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/carllerche/h2/compare/v0.1.17...v0.1.18)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-06 21:42:22 -07:00
673a9417ef Bump serde from 1.0.90 to 1.0.91 (#4171)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.90 to 1.0.91.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.90...v1.0.91)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-06 21:41:30 -07:00
3fd9aada8b Add missing modules to workspace (#4183) 2019-05-06 22:40:54 -06:00
453fdb9e28 Add support for local metric collection/viewing (#4170) 2019-05-06 16:44:06 -07:00
3f6a79b078 Add a validator node proposal (#3035)
automerge
2019-05-06 13:41:28 -07:00
e9f80e5542 Don't use default ticks per slot in calculating next slot leader (#4169) 2019-05-06 11:23:06 -07:00
694d28acf8 remove some boilerplate (#4143) 2019-05-06 10:11:18 -07:00
88fdba5aca Temp: bump test-bench timeout 2019-05-06 10:00:00 -07:00
a19df7a36c Add type annotations for external crates (#4125) 2019-05-06 10:11:50 -06:00
9b50583641 wallet: add --url, remove --host/--rpc-host/--rpc-port/-rpc-tls (#4153)
Also by default the wallet now talks to testnet.solana.com instead of
localhost
2019-05-06 07:38:26 -07:00
71f9b44687 Add Confirmations parameter to RPC Subscriptions (#4154)
* Add optional depth parameter to pubsub, and store in subscriptions

* Pass bank_forks into rpc_subscription; add method to check depth before notify and impl for account subscriptions

* Impl check-depth for signature subscriptions

* Impl check-depth for program subscriptions

* Plumb fork id through accounts

* Use fork id and root to prevent repeated account notifications; also s/Depth/Confirmations

* Write tests in terms of bank_forks

* Fixup accounts tests

* Add pubsub-confirmations tests

* Update pubsub documentation
2019-05-06 08:31:50 -06:00
0139e5db21 Correct blockstreamer node args 2019-05-04 08:22:36 -07:00
586fb15c2c fullnode positional arguments may now be mixed with optional arguments (#4151) 2019-05-03 20:49:24 -07:00
297328ff9a Fix improper tick sleeping time in test (#4155)
automerge
2019-05-03 20:15:10 -07:00
6b3384c205 Bump serde_yaml from 0.8.8 to 0.8.9 (#4127)
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.8.8 to 0.8.9.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.8.8...0.8.9)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-03 19:45:09 -07:00
3ef961fe37 Record poh ticks even when the node is not in leader schedule (#4148)
* remove obsolete test
2019-05-03 16:41:19 -07:00
a7b695c27a Change replicators to slot-based (#4118) 2019-05-03 16:27:53 -07:00
5bb75a5894 Fix roots never being purged (#4134) 2019-05-03 15:17:37 -07:00
f3f416b7ba Rename --network argument to --entrypoint (#4149) 2019-05-03 15:00:19 -07:00
31b74bdf0b Display release date in the local timezone (#4144) 2019-05-03 14:54:25 -07:00
ed48d8323c Reduce locking in Blocktree (#4075)
* Reduce lock contention in blocktree

* Store root slot in separate column
2019-05-03 16:46:02 -05:00
f91627a230 Remove extra-fullnode-args.sh (#4142) 2019-05-03 13:32:59 -07:00
f9c093022c multinode-demo/: Merge bootstrap-leader.sh into fullnode.sh (#4139) 2019-05-03 12:33:48 -07:00
7fe3c75c6b Add a node-specific ip echo service to remove dependency on ifconfig.co (#4137) 2019-05-03 11:01:35 -07:00
c8ed41167a Factor tune_system() out of multinode-demo/ (#4138)
* Remove x bit from ulimit-n.sh

* Factor tune_system() out of multinode-demo/
2019-05-03 10:40:02 -07:00
5b2a82a951 Fix validator confirmation graph y axis scale (#4136) 2019-05-02 19:51:56 -07:00
441e76ebeb Index buffered transactions at the correct offset (#4126)
* tests
2019-05-02 19:05:53 -07:00
c2dfb9900e Revert "Change forwarded metrics to be in line with fetch stage metrics (#4068)" (#4135)
automerge
2019-05-02 17:36:19 -07:00
916458e132 Change erasure set size to 8:8 (#4129)
* Change erasure set size to 8:8

* Change tests to be agnostic to exact set size and ratio

* Add convenience methods for setting presence
2019-05-02 19:04:40 -05:00
ffb15578ce remove cargo install cargo-audit from CI (#4123) 2019-05-02 15:35:47 -07:00
abcbbb925f push latest, too (#4131) 2019-05-02 15:33:08 -07:00
059755fe59 install mdbook and svgbob_cli (#4128) 2019-05-02 15:32:31 -07:00
ae12dc2c75 Add specs to testnet participation guide (#4078) 2019-05-02 15:21:05 -07:00
37b5c6afaa install cargo audit (#4122) 2019-05-02 13:16:21 -07:00
92ed7b36a2 Bump libc from 0.2.53 to 0.2.54 (#4124)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.53 to 0.2.54.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.53...0.2.54)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-02 13:11:29 -06:00
379d2e6d95 add support for single-crate coverage to help iterate, update to latest grcov (#4085)
* add support for single-crate coverage to help iterate, update to latest grcov

* shellcheck

* fixup

* remove unused

* install grcov before setting RUSTFLAGS ;)

* rely on nightly having grcov installed
2019-05-01 23:33:28 -07:00
7f75cc8906 update nightly to 2019-05-01 (#4111)
* update nightly to 2019-05-01

* cargo fmt

* cargo fmt

* increase bench timeout
2019-05-01 20:08:42 -07:00
1ab5098576 Move get_clients into gossip_service (#4109) 2019-05-01 17:14:01 -07:00
598f765960 Fix net.sh for running on macos (#4107)
automerge
2019-05-01 16:03:35 -07:00
aac626c2c2 Add sample_txs function to perf_utils shared crate (#4104)
Shared code between bench-tps and bench-exchange
2019-05-01 15:58:35 -07:00
3eec3cfac2 Cleanup banking stage in lieu of recent transaction forwarding changes (#4101) 2019-05-01 15:13:10 -07:00
5eee9e62e5 Add swapper back-off (#4088)
* Add swapper back-off

* Reset back-off if bench-exchange suspects back-log

* nudge

* nudge
2019-05-01 14:29:57 -07:00
a7d18125d3 install grcov (#4097) 2019-05-01 14:27:17 -07:00
8202310073 Minor update to gossip spy command (#4103) 2019-05-01 14:25:26 -07:00
1e2ba110eb Bump reqwest from 0.9.15 to 0.9.16 (#4089)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.15 to 0.9.16.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.15...v0.9.16)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-01 14:24:59 -06:00
62c9b7d850 Fix and un-ignore bench-tps local_cluster test (#4019)
* un-ignore bench-tps local_cluster test

And add bench_tps_fund_keys test.

* Unify generate_and_airdrop logic for tests
2019-05-01 13:21:45 -07:00
4f18fc836f Forward transactions to the next slot leader (#4092)
- this ensures that transactions will reach in time for the next node to process them
2019-05-01 11:37:29 -07:00
950d8494ba earlyoom: Stop using unsupported -k option (#4096)
automerge
2019-05-01 11:29:02 -07:00
cb528af4e2 fix accounts_db storage.reset() (#4094)
* fix accounts_db storage.reset()

* fix compilation errors, remove unused, fix test_accounts_grow() failure
2019-05-01 09:27:13 -07:00
ad27c30623 Cleanup bench-exchange messages (#4093) 2019-04-30 23:09:33 -07:00
9add8d0afc Add alternative to Spy Nodes that can fully participate in Gossip (#4087)
automerge
2019-04-30 16:42:56 -07:00
af2e7ea285 Add 1 decimal to validator confirmation (#4084) 2019-04-30 16:37:03 -07:00
675a78aaa1 get vote_instruction off bank for tests (#4086)
* get vote_instruction off bank for tests

* clippy
2019-04-30 15:11:08 -07:00
408bdbce7a Add non_default_stream parameter to cuda_verify (#4079) 2019-04-30 13:34:46 -07:00
1a259d4a3f Prevent Requests/Caching of leader schedules for epochs beyond confirmed roots (#4033)
automerge
2019-04-30 13:23:21 -07:00
c5f8b4960c Stop nodes in parallel 2019-04-30 10:42:59 -07:00
21f845ed39 Use more -w 2019-04-30 09:57:14 -07:00
7a369df9a7 Add flag to skip slow extras when deploying a large testnet 2019-04-30 09:26:50 -07:00
f02ec31c68 Flip if/else 2019-04-30 08:56:53 -07:00
d21fa4a177 v0.14: various net/ fixes for large clusters (#4080)
* net.sh: Add -F to discard validator nodes that didn't bootup successfully

* Relax sanity node count when validator bootup failure is permitted

* Less sanity for testnet-demo

* net.sh: Add -F to discard validator nodes that didn't bootup successfully
2019-04-29 21:38:32 -07:00
bd0871cbe7 Update release doc to include testnet update instuctions (#4066)
* Update release doc to include testnet update instuctions

* Fixup headers and pick nits

* Remove outdated testnet behavior
2019-04-29 19:40:18 -06:00
2604f8ac0a Move implemented functionality into the Implemented Proposals section (#4057) 2019-04-29 17:29:41 -06:00
a7574f8657 Cleanup metrics dashboard (#4072) 2019-04-29 15:52:04 -07:00
73f250f03a Make minimum warmup period 32 slots long (#4031)
* Make minimum warmup period 32 slots long

* PR fixes
2019-04-29 15:26:52 -07:00
bae0aadafa Remove Bench Exchange Contract Execution graph 2019-04-29 14:29:54 -07:00
5524146ddf push down noop's messages (#4069)
automerge
2019-04-29 14:10:36 -07:00
3b2adbc9df Change forwarded metrics to be in line with fetch stage metrics (#4068)
automerge
2019-04-29 13:50:14 -07:00
4e41c81bc7 Fix the output from Gossip Discovery (#4067)
automerge
2019-04-29 13:19:24 -07:00
c545e812d0 Expand bank benches to include async/sync and native_loader (#4026) 2019-04-29 13:09:11 -07:00
c2193a37ce cleanup unused function (#4064) 2019-04-29 12:45:14 -07:00
fabba82173 ignore non-descendants of roots in blocktree (#4032) 2019-04-29 12:29:14 -07:00
c3ec5ad846 testnet-demo: use more low quota nodes 2019-04-29 12:18:39 -07:00
c4945cc04a Bump tar from 0.4.23 to 0.4.24 (#4060)
Bumps [tar](https://github.com/alexcrichton/tar-rs) from 0.4.23 to 0.4.24.
- [Release notes](https://github.com/alexcrichton/tar-rs/releases)
- [Commits](https://github.com/alexcrichton/tar-rs/compare/0.4.23...0.4.24)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-29 10:34:30 -06:00
e2e55f81d0 Increase testnet-demo node count a little 2019-04-29 09:09:55 -07:00
d862565b16 Move Transact proposal to implemented (#4055)
And update names to reflect what was implemented.
2019-04-29 09:13:39 -06:00
0cc3956693 testnet-demo now runs across more GCE zones (#4053)
* testnet-demo now runs across more GCE zones

* Save zone info to config file

* Add geoip whitelist for common data centers

* Skip more of start

* Include -x for config

* Fetch private key from first validator node if necessary

* Correct -r propagation
2019-04-28 19:50:52 -07:00
4e5677f116 Sample random trade_infos for success (#4043)
Just looking at a single trade_info which may or may not succeed
can fail often.
2019-04-28 11:00:16 -07:00
acba1d6f9e Roots are added out of order to the accounts index (#4051)
* fix root race

* assert root order

* fixup! assert root order

* last root test

* update

* fix tests
2019-04-28 10:27:37 -07:00
3e14af5033 bast bank ancestor check (#4050) 2019-04-28 10:27:09 -07:00
6f56501034 Correctly terminate instances across multiple zones 2019-04-28 09:09:02 -07:00
0b7269b64e Switch testnet-demo to influxcloud 2019-04-27 22:12:50 -07:00
457a2d948b Correct us-central1-b zone name 2019-04-27 21:43:18 -07:00
528bdf34fd testnet-demo: skip over validator nodes that fail to boot 2019-04-27 21:34:23 -07:00
697cd17b59 Use GPU nodes for blockstreamer as well if rest of testnet has GPUs (#4046)
- The blockstreamer crashes otherwise, as sigverify() looks for CUDA libs
2019-04-27 20:45:38 -07:00
13fcfcb964 Blockstreamer annotation fix for non buildkite deployments (#4045) 2019-04-27 20:37:36 -07:00
9c1fd55768 testnet-demo: add more GCE zones, remove client 2019-04-27 16:52:09 -07:00
7f9a476660 Performance metrics computation methodology (#4041) 2019-04-27 16:37:51 -07:00
b07290df81 Add usage to net.sh when it encounters an invalid argument (#4042)
automerge
2019-04-27 16:12:13 -07:00
4b599a95b3 Bump libc from 0.2.51 to 0.2.53 (#4009)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.51 to 0.2.53.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.51...0.2.53)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-27 14:04:23 -06:00
64222cfff7 update lock file for 0.15 (#4039)
automerge
2019-04-27 11:43:12 -07:00
e81d434903 Add DNS resolution for network/drone arguments (#4038)
automerge
2019-04-27 10:06:58 -07:00
bf0dd158de Avoid inaccurate PATH nagging (#4034)
automerge
2019-04-27 09:11:02 -07:00
18e398131d Fix issues with bench-tps (#4005) 2019-04-27 08:39:29 -07:00
4a5837a286 Add " 2019-04-27 07:41:21 -07:00
656e2649a7 v0.15.0 2019-04-27 07:38:46 -07:00
d36af917ea Swap testnet-beta and testnet configuration 2019-04-26 23:24:35 -07:00
c81733b41a Add testnet-demo configuration 2019-04-26 22:59:26 -07:00
b6558a2ef3 Remove created lockfile 2019-04-26 21:36:20 -07:00
634d8e25ee testnet-deploy.sh updates 2019-04-26 21:29:42 -07:00
fea212e64e Initialize stopNetwork var 2019-04-26 21:10:36 -07:00
e3ab76f1a7 Pin recommended release version (#4021) 2019-04-26 21:10:31 -07:00
87f1bd58b9 Reduce submit frequency of counters that are very frequent and killing metrics DB (#4027) 2019-04-26 20:37:40 -07:00
a056c1f18f Don't send packets when msgs len is 0 (#4030)
And don't send metrics every iteration.
2019-04-26 17:27:31 -07:00
8b34fd2c75 Fix warnings on nightly (#4028) 2019-04-26 16:25:13 -07:00
b912ee7fdf Nit: Spelling (#4025) 2019-04-26 16:02:37 -07:00
3cf708f019 nit: remove copyposta (#4024) 2019-04-26 16:02:13 -07:00
070e0e9613 Skip *de*serializing too 2019-04-26 14:43:07 -07:00
3e678511d2 Add enable/disable key value pairs into the steps block (#4018) 2019-04-26 14:26:05 -06:00
4ce2105548 Switch from a S3 URL to release.solana.com for release assets (#4017)
automerge
2019-04-26 13:06:55 -07:00
721c6a7e2d Update metrics dashboard (#4012)
automerge
2019-04-26 10:32:49 -07:00
08f0fb1e14 Implement working lockfile for testnet lockout (#4013) 2019-04-26 11:22:23 -06:00
f5f5281f85 Add on-demand functionality to all testnets (#4003)
* Add on-demand functionality to all testnets
2019-04-26 10:02:23 -06:00
1684a7bd18 Move validators from testnet-beta to testnet (#4011)
* Move validators from testnet-beta to testnet

* Move testnet influxdb datasource to influxcloud
2019-04-26 09:02:12 -07:00
8b1724bb70 Serialize blocktree writes by locking the database (#4008)
Move several private methods to free functions
2019-04-26 10:52:10 -05:00
eebdfe8d73 wait for network recovery after restart (#4000) 2019-04-26 07:30:52 -07:00
82776b333d Merge the "cloud" grafana dashboard into the normal dashboard (#4007)
automerge
2019-04-25 21:14:36 -07:00
e71ab55288 Rename in-tree program_ids to be base-58 human readable (#4001) 2019-04-25 17:58:49 -07:00
fd60ef8a8d Allow metrics rate to differ from log rate (#3993)
And reduce metrics rate for exchange contract counters.
Since we can go 10s-100s thousands of contracts per second,
some metrics would be dropped if submitting every time.
2019-04-25 16:58:49 -07:00
aa0b67c93c Use newer blockhash for recent_confirmed_blockhash api (#3995)
Oldest blockhash is sometimes too old and does not allow
for transactions to go through.
2019-04-25 16:57:25 -07:00
15aa07f2a0 Fix node count metrics (#3997)
- the count was truncated to avalanche neighborhood size
2019-04-25 13:47:38 -07:00
e4536621df Log all uncommittable errors on validator (#3999) 2019-04-25 13:37:30 -07:00
a3c302c36a Add signature polling to SyncClient (#3996)
automerge
2019-04-25 12:46:40 -07:00
d12705f9b0 Remove wait loops in non-GPU instance creation and add SSD option as default disk type (#3992) 2019-04-25 13:43:42 -06:00
0add5c1dc8 Move testnet buildkite env variables back into the tree (#3989) 2019-04-25 11:44:58 -07:00
a9e63455a1 Get blockhash every batch and don't wait for tx threads (#3994)
* Get blockhash every batch and don't wait for tx threads

* nudge
2019-04-25 11:20:08 -07:00
4dc0495a1b Fix tar version check 2019-04-25 11:16:49 -07:00
5a79676b8a Custom error decoder (#3783)
automerge
2019-04-25 10:29:44 -07:00
b67b0bff05 Do not enable rpc exit on the blockstreamer node (#3977) 2019-04-25 09:30:59 -07:00
4c200635b7 Shuffle initial mention of solana-gossip (#3991)
automerge
2019-04-25 09:30:30 -07:00
b98200aca4 Use rm -rf (#3990) 2019-04-25 08:58:34 -07:00
d59c1cd412 Expose Rpc methods to rpc_request (#3988)
* Add new rpc methods to rpc-request

* A-Z
2019-04-25 08:52:53 -06:00
c4d9dff590 Cherry-pick #3934 (#3982)
* Fix inserting bogus is_last blobs into blocktree

* Check for pre-existing blob before insert

* Ignore test that performs concurrent writes on blocktree as that is not supported
2019-04-25 00:04:49 -07:00
cf91ff8694 Remove Thin Client from storage stage (#3976)
automerge
2019-04-24 22:34:10 -07:00
e867ce0944 Find unique zones and delete nodes in each zone (#3978) 2019-04-24 17:50:42 -07:00
29a25990d3 Add provision in testnet scripts to ignore validator nodes that failed to bootup (#3972)
* Skip writing to config file if the node didn't bootup
* Detect dead nodes quicker
2019-04-24 16:23:26 -07:00
9a40ad76bd Fix race in erasure metadata tracking (#3962)
* Fix erasure metadata race condition

* make erasure return the underlying error without wrapping it in the `solana::Error` type

* Add metric for erasure failures

* add tests to `ErasureMeta` indexing logic

* Add test to ensure erasure recovery failures don't cause panics
2019-04-24 17:53:01 -05:00
54b44977e0 Lower test time (#3967) 2019-04-24 12:19:31 -07:00
9c7ccc0e2b More metrics to track memory usage (#3966)
automerge
2019-04-24 11:11:30 -07:00
7710ef8b2b Bump num-derive from 0.2.4 to 0.2.5 (#3960)
Bumps [num-derive](https://github.com/rust-num/num-derive) from 0.2.4 to 0.2.5.
- [Release notes](https://github.com/rust-num/num-derive/releases)
- [Changelog](https://github.com/rust-num/num-derive/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-derive/compare/num-derive-0.2.4...num-derive-0.2.5)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-24 11:50:26 -06:00
c969975fde lockfree storage (#3963) 2019-04-24 11:51:57 -05:00
3eed6a6090 Annotate testnet buildkite logs with blockexplorer URL (#3964)
automerge
2019-04-24 08:09:37 -07:00
1661a7a55f Correct variable name 2019-04-24 07:39:29 -07:00
6293d324db Spellnig 2019-04-24 07:39:29 -07:00
c1ecfec3b0 Bump stable build timeout 2019-04-23 20:29:14 -07:00
05b4dbf148 Document an alternative mechanism to locate the validator's vote id 2019-04-23 19:35:20 -07:00
4efada6d84 Update keygen.rs 2019-04-23 19:24:42 -07:00
23c01473a0 Use cache for dll symbols (#3950)
Speeds up loaded programs.
2019-04-23 17:25:03 -07:00
f2e2106f62 Bench exchange tweaks (#3957) 2019-04-23 16:48:17 -07:00
0cbac26591 Add genesis blockhash to blobs (#3953) 2019-04-23 16:24:44 -07:00
4e7e5ace9d Add support for Azure instances in testnet creation (#3905)
* Add support for Azure instances in testnet creation

* Fixup

* Fix shellcheck errors

* More shellcheck and cleanup node creation and deletion

* More shellcheck and cleanup node creation and deletion

* Fixup instance wait API

* Fix revieew comments and add GPU installation extension
2019-04-23 16:41:45 -06:00
ab11327e34 Fix mismatch between leader/validator bank votability (#3942)
* Fix mismatch between leader/validator bank votability
2019-04-23 15:32:19 -07:00
3ba93aa8fe Facility to pass extra arguments to bench clients from net.sh command (#3952)
automerge
2019-04-23 15:13:29 -07:00
c309cd80aa Add getClusterNodes/getSlotLeader JSON RPC API (#3940)
* Minor cleanup

* Include _this_ node in the contact info trace

* Add getClusterNodes/getSlotLeader RPC API
2019-04-23 14:46:41 -07:00
d22a1c9b1f Use smaller batch size in sigverify stage if CUDA is not available (#3951) 2019-04-23 12:41:50 -07:00
29698fcd38 Cleanup stragglers from move-to-transfer rename (#3947) 2019-04-23 13:30:42 -06:00
7372ec9e1a Use poh would_be_leader check in banking stage to hold or forward txs (#3948) 2019-04-23 11:56:30 -07:00
840a64ee8b Optimize exchange contract (#3926) 2019-04-23 11:39:53 -07:00
524bc2b9a6 Bump hashbrown from 0.2.2 to 0.3.0 (#3931)
Bumps [hashbrown](https://github.com/Amanieu/hashbrown) from 0.2.2 to 0.3.0.
- [Release notes](https://github.com/Amanieu/hashbrown/releases)
- [Changelog](https://github.com/Amanieu/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/hashbrown/compare/v0.2.2...v0.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-23 10:15:33 -07:00
62a29a41d1 Bump tar from 0.4.22 to 0.4.23 (#3944)
Bumps [tar](https://github.com/alexcrichton/tar-rs) from 0.4.22 to 0.4.23.
- [Release notes](https://github.com/alexcrichton/tar-rs/releases)
- [Commits](https://github.com/alexcrichton/tar-rs/compare/0.4.22...0.4.23)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-23 10:15:12 -07:00
5406d82d89 fix race in get_exclusive_storage() and load() (#3941)
* Revert "Revert "account storage is not in sync with the index after gc (#3914)" (#3936)"

This reverts commit 4f47fc00bc.

* fix get_exclusive_storage

* clippy
2019-04-23 09:56:36 -07:00
de6af95061 Process forwarded packets only when the node is about to be the leader (#3935)
* Tests and metrics
2019-04-22 19:49:32 -07:00
43f7cd8149 Fix Retransmit slamming the leader with its own blobs (#3938) 2019-04-22 18:41:01 -07:00
69e67d06a7 Default to Docker based testnet deployment on unsupported Ubuntu versions (#3937)
* Run docker if Ubuntu version is unsupported

* ShellCheck fixes
2019-04-22 18:22:43 -07:00
4f47fc00bc Revert "account storage is not in sync with the index after gc (#3914)" (#3936)
This reverts commit 101d6b92ee.
2019-04-22 17:14:41 -07:00
4b04c37c36 verify that blobs match a known leader for the slot (#3927)
* validate that blobs match a known leader for the slot

* clippy
2019-04-22 15:21:10 -07:00
b27b515186 Add more dashboard text to metrics readme (#3925) 2019-04-22 14:55:19 -07:00
05bcb7f292 Add stop node command to solana-gossip (#3928) 2019-04-22 14:51:20 -07:00
95a16426f3 Cleanup bench-exchange (#3919)
* bench-exchange changes

Generate new keypair for each bench-exchange
Add metrics
Tweak network sleep parameters for better reliability.

* Bench-exchange contract metrics
2019-04-22 13:16:28 -07:00
bec094bb3e Start bench tps clients as default (#3917) 2019-04-21 20:18:52 -07:00
af9ebf1d1a Add status logging while processing a ledger (#3916) 2019-04-20 20:17:57 -07:00
6f2f7018e8 Update testnet-participation.md 2019-04-20 19:14:07 -07:00
101d6b92ee account storage is not in sync with the index after gc (#3914)
* account storage is not in sync with the index after gc

* builds

* clippy fmt

* test

* purge dead forks on store

* rm println

* also fixed count_stores

* comments
2019-04-20 20:50:50 -05:00
349e8a9462 Ensure forwarded Blobs don't break Erasure (#3907) 2019-04-20 16:44:06 -07:00
c0bffb56df Update Avalanche to use Epoch Stakes (#3900) 2019-04-19 22:31:40 -07:00
970cc32e65 Fix Data Plane computation when stakes are equal (#3913) 2019-04-19 21:07:21 -07:00
3ab492ccf8 save erasure set size, initialize coding blob erasures with that size (#3910)
* save erasure set size, initialize coding blob erasures with that size

* fixup

* fixup
2019-04-19 20:22:51 -07:00
d83a71d89f More AWS regions for testnet deployment (#3911)
- also some minor fixes to gce.sh
2019-04-19 17:46:14 -07:00
efbb573316 add an env::var driven localcluster test (#3906) 2019-04-19 15:47:03 -07:00
85554087d1 treat negatives like zero instead of crashing out (#3899) 2019-04-19 15:46:39 -07:00
c3155a6e39 silence sigverify disabled, make disabling sigverify easier (#3901)
* silence sigverify disabled, make disabling sigverify easier

* fixup
2019-04-19 14:18:19 -07:00
4abe95abec Helper function for filtering/creating clients in bench-exchange (#3903) 2019-04-19 14:05:07 -07:00
e0acd48944 Write bench-tps in terms of client (#3904)
* Write bench-tps in terms of client

* Add transactions_addr method for logging

* Move cluster config outside do_bench_tps

* Add BankClient test
2019-04-19 15:04:36 -06:00
afb00432d4 Add BankClient support to bench-exchange (#3902) 2019-04-19 13:18:20 -07:00
320bd66c84 handle zero num_will_fit (#3892)
* handle zero num_will_fit

* clippy
2019-04-19 12:02:33 -07:00
1a9ac62f60 Add bench-exchange support to the net framework (#3893) 2019-04-19 09:56:01 -07:00
809b051f10 Allow thin clients to be passed across thread boundaries (#3887)
* Remove ThinClient wrapper

* Allow RpcClient (and ThinClient) to be passed across thread boundaries

* Pass clients, not constructors

* Fix bad rebase
2019-04-19 08:54:21 -06:00
baac21209e Recreate SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_unknown_linux_gnu (#3895) 2019-04-19 07:39:41 -07:00
5fb8baed04 Process async BankClient transactions in batches (#3738)
* Process async transactions in batches

This aims to process transactions at least as fast as LocalCluster

* Add benchmark
2019-04-19 07:29:07 -06:00
512bfc93cb Add a cache for leader schedules (#3841)
* Add a cache for leader schedules
2019-04-19 02:39:44 -07:00
0f88872650 Compatible network is now default (#3896) 2019-04-18 23:19:03 -07:00
f4e40d2c41 Add bench-exchange tx send metrics (#3890) 2019-04-18 22:31:25 -07:00
6eac5951ed Revert "Revert "revert-revert-erasure and erasure fixes (#3833)" (#3855)" (#3889)
This reverts commit 596f611ede.
2019-04-18 21:56:43 -07:00
475a74d37f Reduce packet recv batches (#3894)
* Reduce packet recv batches

* Fix type
2019-04-18 19:24:37 -07:00
b8ee952135 Dedup drone code (#3885) 2019-04-18 19:06:56 -06:00
15bed29afa Add rpc request debug to make_rpc_request (#3888) 2019-04-18 17:04:40 -07:00
6dbe7e8bee Better drone error when cap is hit. (#3884)
* Better drone error when cap is hit.

* Update drone/src/drone.rs

Co-Authored-By: sakridge <sakridge@gmail.com>
2019-04-18 16:05:45 -07:00
2cd556e43c Add drone cap parameter (#3876) 2019-04-18 15:42:20 -07:00
060793f451 Fix testnet automation scripts (#3886)
- missing machine type since change in gce.sh
2019-04-18 15:12:35 -07:00
7e409a13cd Ack on empty Gossip Pull Responses and keep Entrypoint around (#3881)
* Ack on empty Gossip Pull Responses and keep Entrypoint around

* Address comments and fix test

* Update core/src/cluster_info.rs

Co-Authored-By: sagar-solana <sagar@solana.com>

* Update core/src/cluster_info.rs

Co-Authored-By: sagar-solana <sagar@solana.com>
2019-04-18 15:12:17 -07:00
aab410380e Fix net for macos and local (#3872) 2019-04-18 14:49:35 -07:00
67b8ad6a0f fix entries.to_blobs() (#3882)
* * rename Entry::serialized_size() to Entry::to_blob_size() to better
    reduce confusion with bincode, et al. and to better reflect its
    real meaning

* fix implementation of to_blob_size() to actually return what happens
    when we do entries.to_blobs() (i.e. we serialize Vec<Entry>, not Entry)

* update tests to be more rigorous

* clippy
2019-04-18 14:45:41 -07:00
c1e39a3b98 git ignore more (#3870) 2019-04-18 14:23:34 -07:00
7e1a7b1f64 Add bench-exchange to installed bins (#3883)
Need to run exchange clients on remote machines.
2019-04-18 13:55:41 -07:00
a9cfae486c Revert-revert migrate to ed25519-dalek crate (#3877)
* Revert "Revert "Migrate from ring to ed25519-dalek, take 2 (#3844)" (#3868)"

This reverts commit 6a878602f2.

* Fix Signature::verify method
2019-04-18 14:37:20 -06:00
8514d27c2f Update testnet-participation.md 2019-04-18 13:16:15 -07:00
8999bfef65 Try to delete nodes in all cloud zones (#3874) 2019-04-18 13:16:14 -07:00
96425fb520 Don't panic the drone on a request that ends in error. (#3869) 2019-04-18 12:18:31 -07:00
ce505d24b1 Bump ws from 0.7.9 to 0.8.0 (#3866)
Bumps [ws](https://github.com/housleyjk/ws-rs) from 0.7.9 to 0.8.0.
- [Release notes](https://github.com/housleyjk/ws-rs/releases)
- [Changelog](https://github.com/housleyjk/ws-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/housleyjk/ws-rs/compare/v0.7.9...v0.8.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-18 13:16:30 -06:00
f2187780d2 Do not forward vote transactions (#3871) 2019-04-18 11:18:49 -07:00
6a878602f2 Revert "Migrate from ring to ed25519-dalek, take 2 (#3844)" (#3868)
This reverts commit e9b82bacda.
2019-04-18 11:47:34 -06:00
f8543a268f solana-gossip now displays other spy nodes and contact info age (#3867) 2019-04-18 09:48:21 -07:00
e9b82bacda Migrate from ring to ed25519-dalek, take 2 (#3844)
* Migrate from ring to ed25519-dalek

* Move gen_keypair_file test to a more appropriate location

* Fixup bench-exchange and add helper fn for single deterministic keypair

* Update golden
2019-04-18 10:38:32 -06:00
684e1c73dd Allow for custom cpu config on gce and use 20gb ram for clients (#3856) 2019-04-18 09:36:11 -07:00
901c74b653 Add packages and fix publish script (#3839)
* Add packages and fix publish script

* Fixup
2019-04-18 09:24:18 -06:00
2c0afe71b2 minor grooming 2019-04-18 07:31:42 -07:00
2f4a3ed190 Use a separate channel to process votes in banking stage (#3861)
- This will help expedite the vote processing on peer nodes
2019-04-17 21:07:45 -07:00
26a7eb6fa5 Don't use barrier transaction in testnet for perf testing (#3862) 2019-04-17 20:29:36 -07:00
aa21f5343a Remove broken read().unwrap() call to a non-shared packet 2019-04-17 21:24:40 -05:00
9c2809db21 Delete SharedPackets (#3843)
* Delete SharedPackets

* Fix bench and sigverify
2019-04-17 18:15:50 -07:00
9ccd362461 Correct ./net.sh sanity argument order 2019-04-17 18:10:38 -07:00
596f611ede Revert "revert-revert-erasure and erasure fixes (#3833)" (#3855)
This reverts commit 6bef16a6a1.
2019-04-17 18:04:30 -07:00
78d5ace754 Refactor multinode-demo/ scripts to avoid shipping fullnode-x.sh (#3835) 2019-04-17 18:03:58 -07:00
2b3218b5f2 Fix flaky tests by waiting for test node to boot (#3845) 2019-04-17 17:50:34 -07:00
d0fb55d9b1 Allow testnet creation with no validator nodes (#3846) 2019-04-17 17:38:18 -07:00
a2c8e3952f Fixes to TPS calculation and reporting (#3836)
Fixes to TPS calculations and reporting
2019-04-17 15:37:01 -07:00
beb8c7914e Disable testnet-sanity ledger verification, too slow 2019-04-17 15:19:37 -07:00
6bef16a6a1 revert-revert-erasure and erasure fixes (#3833)
* fix erasure, more tests for full blobs, more metrics

* Revert "Revert "Use Rust erasure library and turn on erasure (#3768)" (#3827)"

This reverts commit 4b8cb72977.
2019-04-17 15:13:54 -07:00
e03215c4c0 Remove iterations with leader rotation disabled 2019-04-17 15:07:51 -07:00
8d1fd29fa6 Add readme (#3838) 2019-04-17 14:42:04 -07:00
46f655eddd Add .gitignore to bench-exchange (#3837) 2019-04-17 14:34:04 -07:00
ca36a6f4e0 Run sanity only in the zone that contains the bootstrap leader and blockstreamer nodes (#3828) 2019-04-17 14:25:40 -07:00
fdb12b54fa Run multinode-demo from anywhere (#3831) 2019-04-17 14:23:32 -07:00
09dd4bb702 Fix build (#3834) 2019-04-17 15:17:04 -06:00
01657ddfe7 packet.rs optimizations (#3818)
* packet.rs optimizations

* remove redundant and aggressive metric submission

* remove metrics submit(), get compiling again, honor log level in inc()
2019-04-17 14:14:57 -07:00
51a2988bb2 Revert "Rename programs to instruction_processors (#3789)" (#3824)
This reverts commit 34344982a9.
2019-04-17 15:05:49 -06:00
083090817a Fix DuplicateSignatures caused by races on frozen banks (#3819)
* Duplicate parent account locks into children in new_from_parent, check parent locks in lock_account()
2019-04-17 13:45:33 -07:00
f3676e2d03 Enable bench exchange test (#3830) 2019-04-17 13:37:02 -07:00
4b8cb72977 Revert "Use Rust erasure library and turn on erasure (#3768)" (#3827)
This reverts commit b9bb5af4a5.
2019-04-17 12:52:12 -07:00
2518e95fb0 Add bench-exchange (#3826) 2019-04-17 11:28:26 -07:00
bc17edcda3 Add --keypair to avoid writing a new one to ~ in CI 2019-04-17 10:12:18 -07:00
eb185b9ea5 testnet-beta sanity no longer tries to check inactive zones 2019-04-17 09:30:41 -07:00
aa6c82cfdc Add show-vote-account command (#3814) 2019-04-17 07:45:07 -07:00
b9bb5af4a5 Use Rust erasure library and turn on erasure (#3768)
* split out erasure into new crate; add implementation using rust reed-solomon-library

* Track erasures with a &[bool] instead of indexes

* fix bug that reported the number of erasures incorrectly

* Introduce erasure `Session` for consistent config

* Increase test coverage; fix bugs

* Add ability to remove blobs from erasure meta tracking. test added

* Track deletion of coding blobs in blocktree via ErasureMeta. Added to
test

* Remove unused functions in blocktree

* add randomness to recovery thread to exercise recovery due to either new
data or coding blobs

* Add unit test for ErasureMeta index handling

* Re-enable test in broadcast stage
2019-04-16 23:00:24 -05:00
1e20d449ce bank_height / slot is the block drop rate (#3816)
* bank_height/slot would give is the block drop rate

* use metrics
2019-04-16 19:35:38 -07:00
e94f268346 reduce sigverify verbosity (#3813) 2019-04-16 18:25:53 -07:00
7ec198b9cc Minor doc fixes++ 2019-04-16 17:45:48 -07:00
b2e762ccc6 Minor doc fixes 2019-04-16 17:43:52 -07:00
bee411e826 Preserve extra dependency annotations (optional=,features=) during version bump (#3810) 2019-04-16 15:12:10 -07:00
34344982a9 Rename programs to instruction_processors (#3789)
* Rename programs to instruction_processors

* Updates around the code base to support instruction_processors rename

* Kabab instruction_processors

* Update Cargo.toml files and scripts to use instruction-processors

* Update Cargo.toml to use instruction-processors

* Update CI scripts to use instruction-processors
2019-04-16 22:39:00 +02:00
f73d38739a Split AccountsDB from Accounts (#3808)
Split AccountsDB from Accounts
2019-04-16 13:32:22 -07:00
63d66ece57 net/ testnet nodes now stake more lamports (#3812)
* Add --bootstrap-leader-lamports

* Generalize --no-stake into --stake NUM

* Use a large stake for net/ fullnodes

* Setup vote account before starting fullnode to avoid mixed log output
2019-04-16 13:03:01 -07:00
a4b5493ba1 Document unsafe usage in AppendVec (#3804)
* document unsafe usage

* clippy
2019-04-16 10:53:37 -07:00
8d613f3977 Selectively deploy beta testnet to GCE/AWS or both clouds (#3805) 2019-04-16 10:40:30 -07:00
0ff2bfdd0c Fewer unsafe hacks for AppendVec (#3801)
* storage account changes

* cleanup

* checks

* comments

* clippy

* tests

* woot!

* comments

* benches
2019-04-16 08:50:05 -07:00
141e25d567 Bump hashbrown from 0.2.1 to 0.2.2 (#3800)
Bumps [hashbrown](https://github.com/Amanieu/hashbrown) from 0.2.1 to 0.2.2.
- [Release notes](https://github.com/Amanieu/hashbrown/releases)
- [Changelog](https://github.com/Amanieu/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/hashbrown/compare/v0.2.1...v0.2.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-16 06:49:02 -07:00
c67cc694ae Remove stake from ./net sanity ephemeral validator (#3797) 2019-04-15 21:42:25 -07:00
d77359914f Log the spy node id by default for better debug (#3796) 2019-04-15 20:58:37 -07:00
9293a54234 Remove stray + 2019-04-15 20:28:11 -07:00
d9983905b3 Cargo.lock 2019-04-15 20:28:07 -07:00
3dc47a46d5 Revert "Revert "disable staking of blockstreamer node""
This reverts commit 03da63b41b.
2019-04-15 20:11:00 -07:00
8638b3bb19 Update Cargo.toml files for version = 0.14.0 2019-04-16 02:50:20 +00:00
859 changed files with 89067 additions and 27502 deletions

42
.appveyor.yml Normal file
View File

@ -0,0 +1,42 @@
version: '{build}'
branches:
only:
- master
- /^v[0-9.]+\.[0-9.]+/
cache:
- '%USERPROFILE%\.cargo'
- '%APPVEYOR_BUILD_FOLDER%\target'
clone_folder: d:\projects\solana
build_script:
- bash ci/publish-tarball.sh
notifications:
- provider: Slack
incoming_webhook:
secure: GJsBey+F5apAtUm86MHVJ68Uqa6WN1SImcuIc4TsTZrDhA8K1QWUNw9FFQPybUWDyOcS5dly3kubnUqlGt9ux6Ad2efsfRIQYWv0tOVXKeY=
channel: ci-status
on_build_success: false
on_build_failure: true
on_build_status_changed: true
deploy:
- provider: S3
access_key_id:
secure: fTbJl6JpFebR40J7cOWZ2mXBa3kIvEiXgzxAj6L3N7A=
secret_access_key:
secure: vItsBXb2rEFLvkWtVn/Rcxu5a5+2EwC+b7GsA0waJy9hXh6XuBAD0lnHd9re3g/4
bucket: release.solana.com
region: us-west-1
set_public: true
- provider: GitHub
auth_token:
secure: 81fEmPZ0cV1wLtNuUrcmtgxKF6ROQF1+/ft5m+fHX21z6PoeCbaNo8cTyLioWBj7
draft: false
prerelease: false
on:
appveyor_repo_tag: true

1
.buildkite/env/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/secrets_unencrypted.ejson

View File

@ -1,12 +1,14 @@
{
"_public_key": "ae29f4f7ad2fc92de70d470e411c8426d5d48db8817c9e3dae574b122192335f",
"environment": {
"CODECOV_TOKEN": "EJ[1:+7nLVR8NlnN48zgaJPPXF9JOZDXVNHDZLeARlCFHyRk=:rHBSqXK7uSnveA4qwUxARZjTNZcA0hXU:ko8lLGwPECpVm19znWBRxKEpMF7xpTHBCEzVOxRar2wDThw4lNDAKqTS61vtkJLtdkHtug==]",
"CRATES_IO_TOKEN": "EJ[1:+7nLVR8NlnN48zgaJPPXF9JOZDXVNHDZLeARlCFHyRk=:NzN6y0ooXJBYvxB589khepthSxhKFkLB:ZTTFZh2A/kB2SAgjJJAMbwAfanRlzxOCNMVcA2MXBCpQHJeeZGULg+0MLACYswfS]",
"GITHUB_TOKEN": "EJ[1:+7nLVR8NlnN48zgaJPPXF9JOZDXVNHDZLeARlCFHyRk=:iy0Fnxeo0aslTCvgXc5Ddj2ly6ZsQ8gK:GNOOj/kZUJ2rYKxTbLyVKtajWNoGQ3PcChwfEB4HdN18qDHlB96Z7gx01Pcf0qeIHODOWRtxlH4=]",
"INFLUX_DATABASE": "EJ[1:+7nLVR8NlnN48zgaJPPXF9JOZDXVNHDZLeARlCFHyRk=:Ly/TpIRF0oCxmiBWv225S3mX8s6pfQR+:+tXGB2c9rRCVDcgNO1IDOo89]",
"INFLUX_PASSWORD": "EJ[1:+7nLVR8NlnN48zgaJPPXF9JOZDXVNHDZLeARlCFHyRk=:ycrq1uQLoSfI932czD+krUOaJeLWpeq6:2iS7ukp/C7wVD3IT0GvQVcwccWGyLr4UocStF/XiDi0OB/N3YKIKN8SQU4ob1b6StAPZ/XOHmag=]",
"INFLUX_USERNAME": "EJ[1:+7nLVR8NlnN48zgaJPPXF9JOZDXVNHDZLeARlCFHyRk=:35hBKofakZ4Db/u0TOW53RXoNWzJTIcl:HWREcMTrgZ8DGB0ZupgSzNWr/tVyE06P]",
"SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_unknown_linux_gnu": "EJ[1:+7nLVR8NlnN48zgaJPPXF9JOZDXVNHDZLeARlCFHyRk=:kRz8CyJYKAg/AiwgLrcRNDJAmlRX2zvX:uV1XV6y2Fb+dN4Z9BIMPBRiNS3n+NL8GlJXyu1i7meIsph1DzfLg4Thcp5Mj9nUsFNLgqQgjnsa5C4XNY/h5AgMSzRrJxVj7RhVTRmDJ5/Vjq6v7wCMRfBOvF3rITsV4zTwWSV8yafFmS+ZQ+QJTRgtYsuoYAUNZ06IEebfDHcuNwws72hEGoD9w43hOLSpyEOmXbtZ9h1lIRxrgsrhYDpBlU5LkhDeTXAX5M5dwYxyquJFRwd5quGDV5DYsCh9bAkbjAyjWYymVJ78U9YJIQHT9izzQqTDlMQN49EbLo7MDIaC7O7HVtb7unDJs+DRejbHacoyWVulqVVwu3GRiZezu8zdjwzGHphMMxOtKQaidnqYgflNp/O01I8wZRgR1alsGcmIhEhI8YV/IvQ==]"
"CODECOV_TOKEN": "EJ[1:8iZ6baJB4fbBV+XDsrUooyGAnGL/8Ol+4Qd0zKh5YjI=:ks2/ElgxwgxqgmFcxTHANNLmj23YH74h:U4uzRONRfiQyqy6HrPQ/e7OnBUY4HkW37R0iekkF3KJ9UGnHqT1UvwgVbDqLahtDIJ4rWw==]",
"CRATES_IO_TOKEN": "EJ[1:8iZ6baJB4fbBV+XDsrUooyGAnGL/8Ol+4Qd0zKh5YjI=:lKMh3aLW+jyRrfS/c7yvkpB+TaPhXqLq:j0v27EbaPgwRdHZAbsM0FlAnt3r9ScQrFbWJYOAZtM3qestEiByTlKpZ0eyF/823]",
"GITHUB_TOKEN": "EJ[1:8iZ6baJB4fbBV+XDsrUooyGAnGL/8Ol+4Qd0zKh5YjI=:Ll78c3jGpYqnTwR7HJq3mNNUC7pOv9Lu:GrInO2r8MjmP5c54szkyygdsrW5KQYkDgJQUVyFEPyG8SWfchyM9Gur8RV0a+cdwuxNkHLi4U2M=]",
"INFLUX_DATABASE": "EJ[1:8iZ6baJB4fbBV+XDsrUooyGAnGL/8Ol+4Qd0zKh5YjI=:IlH/ZLTXv3SwlY3TVyAPCX2KzLRY6iG3:gGmUGSU/kCfR/mTwKONaUC/X]",
"INFLUX_PASSWORD": "EJ[1:8iZ6baJB4fbBV+XDsrUooyGAnGL/8Ol+4Qd0zKh5YjI=:o2qm95GU4VrrcC4OU06jjPvCwKZy/CZF:OW2ga3kLOQJvaDEdGRJ+gn3L2ckFm8AJZtv9wj/GeUIKDH2A4uBPTHsAH9PMe6zujpuHGk3qbeg=]",
"INFLUX_USERNAME": "EJ[1:8iZ6baJB4fbBV+XDsrUooyGAnGL/8Ol+4Qd0zKh5YjI=:yDWW/uIHsJqOTDYskZoSx3pzoB1vztWY:2z31oTA3g0Xs9fCczGNJRcx8xf/hFCed]",
"SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_unknown_linux_gnu": "EJ[1:8iZ6baJB4fbBV+XDsrUooyGAnGL/8Ol+4Qd0zKh5YjI=:RqRaHlYUvGPNFJa6gmciaYM3tRJTURUH:q78/3GTHCN3Uqx9z4nOBjPZcO1lOazNoB/mdhGRDFsnAqVd2hU8zbKkqLrZfLlGqyD8WQOFuw5oTJR9qWg6L9LcOyj3pGL8jWF2yjgZxdtNMXnkbSrCWLooWBBLT61jYQnEwg73gT8ld3Q8EVv3T+MeSMu6FnPz+0+bqQCAGgfqksP4hsUAJGzgZu+i0tNOdlT7fxnh5KJK/yFM/CKgN2sRwEjukA9hXsffyB61g2zqzTDJxCUDLbCVrCkA/bfUk7Of/t0W5t0nK1H3oyGZEc/lRMauCknDBka3Gz11dVss2QT19WQNh0u7bHVaT/U4lepX1j9Zv]",
"SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_apple_darwin": "EJ[1:8iZ6baJB4fbBV+XDsrUooyGAnGL/8Ol+4Qd0zKh5YjI=:wFDl3INEnA3EQDHRX40avqGe1OMoJxyy:6ncCRVRTIRuYI5o/gayeuWCudWvmKNYr8KEHAWeTq34a5bdcKInBdKhjmjX+wLHqsEwQ5gcyhcxy4Ri2mbuN6AHazfZOZlubQkGlyUOAIYO5D5jkbyIh40DAtjVzo1MD/0HsW9zdGOzqUKp5xJJeDsbR4F153jbxa7fvwF90Q4UQjYFTKAtExEmHtDGSJG48ToVwTabTV/OnISMIggDZBviIv2QWHvXgK07b2mUj34rHJywEDGN1nj5rITTDdUeRcB1x4BAMOe94kTFPSTaj/OszvYlGECt8rkKFqbm092qL+XLfiBaImqe/WJHRCnAj6Don]",
"SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_pc_windows_msvc": "EJ[1:8iZ6baJB4fbBV+XDsrUooyGAnGL/8Ol+4Qd0zKh5YjI=:wAh+dBuZopv6vruVOYegUcq/aBnbksT1:qIJfCfDvDWiqicMOkmbJs/0n7UJLKNmgMQaKzeQ8J7Q60YpXbtWzKVW3tS6lzlgf64m3MrPXyo1C+mWh6jkjsb18T/OfggZy1ZHM4AcsOC6/ldUkV5YtuxUQuAmd5jCuV/R7iuYY8Z66AcfAevlb+bnLpgIifdA8fh/IktOo58nZUQwZDdppAacmftsLc6Frn5Er6A6+EXpxK1nmnlmLJ4AJztqlh6X0r+JvE2O7qeoZUXrIegnkxo7Aay7I/dd8zdYpp7ICSiTEtfVN/xNIu/5QmTRU7gWoz7cPl9epq4aiEALzPOzb6KVOiRcsOg+TlFvLQ71Ik5o=]"
}
}

View File

@ -1,6 +1,8 @@
CI_BUILD_START=$(date +%s)
export CI_BUILD_START
source ci/env.sh
#
# Kill any running docker containers, which are potentially left over from the
# previous CI job
@ -31,3 +33,10 @@ export CI_BUILD_START
kill -9 "$victim" || true
done
)
# HACK: These are in our docker images, need to be removed from CARGO_HOME
# because we try to cache downloads across builds with CARGO_HOME
# cargo lacks a facility for "system" tooling, always tries CARGO_HOME first
cargo uninstall cargo-audit || true
cargo uninstall svgbob_cli || true
cargo uninstall mdbook || true

View File

@ -10,6 +10,8 @@
set -x
rsync -a --delete --link-dest="$PWD" target "$d"
du -hs "$d"
read -r cacheSizeInGB _ < <(du -s --block-size=1800000000 "$d")
echo "--- ${cacheSizeInGB}GB: $d"
)
#

View File

@ -14,14 +14,18 @@ export PS4="++"
(
set -x
d=$HOME/cargo-target-cache/"$BUILDKITE_LABEL"
MAX_CACHE_SIZE=18 # gigabytes
if [[ -d $d ]]; then
du -hs "$d"
read -r cacheSizeInGB _ < <(du -s --block-size=1000000000 "$d")
if [[ $cacheSizeInGB -gt 10 ]]; then
echo "$d has gotten too large, removing it"
read -r cacheSizeInGB _ < <(du -s --block-size=1800000000 "$d")
echo "--- ${cacheSizeInGB}GB: $d"
if [[ $cacheSizeInGB -gt $MAX_CACHE_SIZE ]]; then
echo "--- $d is too large, removing it"
rm -rf "$d"
fi
else
echo "--- $d not present"
fi
mkdir -p "$d"/target

View File

@ -10,11 +10,22 @@
set -e
cd "$(dirname "$0")"/..
buildkite-agent pipeline upload ci/buildkite.yml
if [[ -n $BUILDKITE_TAG ]]; then
buildkite-agent annotate --style info --context release-tag \
"https://github.com/solana-labs/solana/releases/$BUILDKITE_TAG"
buildkite-agent pipeline upload ci/buildkite-release.yml
else
if [[ $BUILDKITE_BRANCH =~ ^pull ]]; then
# Add helpful link back to the corresponding Github Pull Request
buildkite-agent annotate --style info --context pr-backlink \
"Github Pull Request: https://github.com/solana-labs/solana/$BUILDKITE_BRANCH"
fi
if [[ $BUILDKITE_BRANCH =~ ^pull ]]; then
# Add helpful link back to the corresponding Github Pull Request
buildkite-agent annotate --style info --context pr-backlink \
"Github Pull Request: https://github.com/solana-labs/solana/$BUILDKITE_BRANCH"
if [[ $BUILDKITE_MESSAGE =~ GitBook: ]]; then
buildkite-agent annotate --style info --context gitbook-ci-skip \
"GitBook commit detected, CI skipped"
exit
fi
buildkite-agent pipeline upload ci/buildkite.yml
fi

5
.gitbook.yaml Normal file
View File

@ -0,0 +1,5 @@
root: ./book/src
structure:
readme: introduction.md
summary: SUMMARY.md

24
.github/stale.yml vendored Normal file
View File

@ -0,0 +1,24 @@
only: pulls
# Number of days of inactivity before a pull request becomes stale
daysUntilStale: 30
# Number of days of inactivity before a stale pull request is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- security
# Label to use when marking a pull request as stale
staleLabel: stale
# Comment to post when marking a pull request as stale. Set to `false` to disable
markComment: >
This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.
# Comment to post when closing a stale pull request. Set to `false` to disable
closeComment: >
This stale pull request has been automatically closed.
Thank you for your contributions.

15
.gitignore vendored
View File

@ -1,18 +1,16 @@
/target/
/ledger-tool/target/
/wallet/target/
/core/target/
/book/html/
/book/src/img/
/book/src/tests.ok
/farf/
/solana-release/
/solana-release.tar.bz2
/solana-metrics/
/solana-metrics.tar.bz2
/target/
**/*.rs.bk
.cargo
# node config that is rsynced
/config/
# node config that remains local
/config-local/
# log files
*.log
@ -21,3 +19,4 @@ log-*.txt
# intellij files
/.idea/
/solana.iml
/.vscode/

77
.mergify.yml Normal file
View File

@ -0,0 +1,77 @@
# Validate your changes with:
#
# $ curl -F 'data=@.mergify.yml' https://gh.mergify.io/validate
#
# https://doc.mergify.io/
pull_request_rules:
- name: remove outdated reviews
conditions:
- base=master
actions:
dismiss_reviews:
changes_requested: true
- name: set automerge label on mergify backport PRs
conditions:
- author=mergify[bot]
- head~=^mergify/bp/
- "#status-failure=0"
actions:
label:
add:
- automerge
- name: v0.16 backport
conditions:
- base=master
- label=v0.16
actions:
backport:
branches:
- v0.16
- name: v0.17 backport
conditions:
- base=master
- label=v0.17
actions:
backport:
branches:
- v0.17
- name: v0.18 backport
conditions:
- base=master
- label=v0.18
actions:
backport:
branches:
- v0.18
- name: v0.19 backport
conditions:
- base=master
- label=v0.19
actions:
backport:
branches:
- v0.19
- name: v0.20 backport
conditions:
- base=master
- label=v0.20
actions:
backport:
branches:
- v0.20
- name: v0.21 backport
conditions:
- base=master
- label=v0.21
actions:
backport:
branches:
- v0.21
- name: v0.22 backport
conditions:
- base=master
- label=v0.22
actions:
backport:
branches:
- v0.22

43
.travis.yml Normal file
View File

@ -0,0 +1,43 @@
os:
- osx
language: rust
rust:
- 1.37.0
install:
- source ci/rust-version.sh
- test $rust_stable = $TRAVIS_RUST_VERSION # Update .travis.yml rust version above when this fails
script:
- source ci/env.sh
- ci/publish-tarball.sh
branches:
only:
- master
- /^v\d+\.\d+$/
notifications:
slack:
on_success: change
secure: F4IjOE05MyaMOdPRL+r8qhs7jBvv4yDM3RmFKE1zNXnfUOqV4X38oQM1EI+YVsgpMQLj/pxnEB7wcTE4Bf86N6moLssEULCpvAuMVoXj4QbWdomLX+01WbFa6fLVeNQIg45NHrz2XzVBhoKOrMNnl+QI5mbR2AlS5oqsudHsXDnyLzZtd4Y5SDMdYG1zVWM01+oNNjgNfjcCGmOE/K0CnOMl6GPi3X9C34tJ19P2XT7MTDsz1/IfEF7fro2Q8DHEYL9dchJMoisXSkem5z7IDQkGzXsWdWT4NnndUvmd1MlTCE9qgoXDqRf95Qh8sB1Dz08HtvgfaosP2XjtNTfDI9BBYS15Ibw9y7PchAJE1luteNjF35EOy6OgmCLw/YpnweqfuNViBZz+yOPWXVC0kxnPIXKZ1wyH9ibeH6E4hr7a8o9SV/6SiWIlbYF+IR9jPXyTCLP/cc3sYljPWxDnhWFwFdRVIi3PbVAhVu7uWtVUO17Oc9gtGPgs/GrhOMkJfwQPXaudRJDpVZowxTX4x9kefNotlMAMRgq+Drbmgt4eEBiCNp0ITWgh17BiE1U09WS3myuduhoct85+FoVeaUkp1sxzHVtGsNQH0hcz7WcpZyOM+AwistJA/qzeEDQao5zi1eKWPbO2xAhi2rV1bDH6bPf/4lDBwLRqSiwvlWU=
deploy:
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: release.solana.com
region: us-west-1
skip_cleanup: true
acl: public_read
local_dir: travis-s3-upload
on:
all_branches: true
- provider: releases
api_key: $GITHUB_TOKEN
skip_cleanup: true
file_glob: true
file: travis-release-upload/*
on:
tags: true

View File

@ -103,7 +103,7 @@ Solana's architecture is described by a book generated from markdown files in
the `book/src/` directory, maintained by an *editor* (currently @garious). To
add a design proposal, you'll need to at least propose a change the content
under the [Accepted Design
Proposals](https://solana-labs.github.io/book-edge/proposals.html) chapter.
Proposals](https://docs.solana.com/book/v/master/proposals) chapter.
Here's the full process:
1. Propose a design by creating a PR that adds a markdown document to the

4837
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,40 +1,127 @@
[workspace]
members = [
".",
# The members list excluding the `validator-cuda` crate
default-members = [
"bench-exchange",
"bench-streamer",
"bench-tps",
"banking_bench",
"chacha-sys",
"client",
"core",
"drone",
"fullnode",
"validator",
"genesis",
"genesis_programs",
"gossip",
"install",
"keygen",
"kvstore",
"ledger-tool",
"local_cluster",
"logger",
"merkle-tree",
"measure",
"metrics",
"programs/bpf",
"programs/bpf_loader",
"programs/bpf_loader_api",
"programs/bpf_loader_program",
"programs/budget_api",
"programs/budget_program",
"programs/btc_spv_program",
"programs/btc_spv_api",
"programs/btc_spv_bin",
"programs/config_api",
"programs/config_program",
"programs/config_tests",
"programs/exchange_api",
"programs/exchange_program",
"programs/token_api",
"programs/token_program",
"programs/failure_program",
"programs/move_loader_api",
"programs/move_loader_program",
"programs/librapay_api",
"programs/noop_program",
"programs/stake_api",
"programs/stake_program",
"programs/stake_tests",
"programs/storage_api",
"programs/storage_program",
"programs/token_api",
"programs/token_program",
"programs/vote_api",
"programs/vote_program",
"replicator",
"runtime",
"sdk",
"sdk-c",
"upload-perf",
"netutil",
"fixed-buf",
"vote-signer",
"wallet",
"cli",
"rayon-threadlimit",
]
# The default-members list and the `validator-cuda` crate
members = [
"bench-exchange",
"bench-streamer",
"bench-tps",
"banking_bench",
"chacha-sys",
"client",
"core",
"drone",
"validator",
"genesis",
"genesis_programs",
"gossip",
"install",
"keygen",
"kvstore",
"ledger-tool",
"local_cluster",
"logger",
"merkle-tree",
"measure",
"metrics",
"programs/bpf_loader_api",
"programs/bpf_loader_program",
"programs/budget_api",
"programs/budget_program",
"programs/btc_spv_program",
"programs/btc_spv_api",
"programs/btc_spv_bin",
"programs/config_api",
"programs/config_program",
"programs/config_tests",
"programs/exchange_api",
"programs/exchange_program",
"programs/failure_program",
"programs/move_loader_api",
"programs/move_loader_program",
"programs/librapay_api",
"programs/noop_program",
"programs/stake_api",
"programs/stake_program",
"programs/stake_tests",
"programs/storage_api",
"programs/storage_program",
"programs/token_api",
"programs/token_program",
"programs/vote_api",
"programs/vote_program",
"replicator",
"runtime",
"sdk",
"sdk-c",
"upload-perf",
"netutil",
"fixed-buf",
"vote-signer",
"cli",
"rayon-threadlimit",
"validator-cuda",
]
exclude = [
"programs/bpf",
]
exclude = ["programs/bpf/rust/noop"]

View File

@ -1,5 +1,5 @@
[![Solana crate](https://img.shields.io/crates/v/solana.svg)](https://crates.io/crates/solana)
[![Solana documentation](https://docs.rs/solana/badge.svg)](https://docs.rs/solana)
[![Solana crate](https://img.shields.io/crates/v/solana-core.svg)](https://crates.io/crates/solana-core)
[![Solana documentation](https://docs.rs/solana-core/badge.svg)](https://docs.rs/solana-core)
[![Build status](https://badge.buildkite.com/8cc350de251d61483db98bdfc895b9ea0ac8ffa4a32ee850ed.svg?branch=master)](https://buildkite.com/solana-labs/solana/builds?branch=master)
[![codecov](https://codecov.io/gh/solana-labs/solana/branch/master/graph/badge.svg)](https://codecov.io/gh/solana-labs/solana)
@ -26,9 +26,43 @@ Furthermore, and much to our surprise, it can be implemented using a mechanism t
Architecture
===
Before you jump into the code, review the online book [Solana: Blockchain Rebuilt for Scale](https://solana-labs.github.io/book/).
Before you jump into the code, review the online book [Solana: Blockchain Rebuilt for Scale](https://docs.solana.com/book/).
(The _latest_ development version of the online book is also [available here](https://solana-labs.github.io/book-edge/).)
(The _latest_ development version of the online book is also [available here](https://docs.solana.com/book/v/master/).)
Release Binaries
===
Official release binaries are available at [Github Releases](https://github.com/solana-labs/solana/releases).
Additionally we provide pre-release binaries for the latest code on the edge and
beta channels. Note that these pre-release binaries may be less stable than an
official release.
### Edge channel
#### Linux (x86_64-unknown-linux-gnu)
* [solana.tar.bz2](http://release.solana.com/edge/solana-release-x86_64-unknown-linux-gnu.tar.bz2)
* [solana-install-init](http://release.solana.com/edge/solana-install-init-x86_64-unknown-linux-gnu) as a stand-alone executable
#### mac OS (x86_64-apple-darwin)
* [solana.tar.bz2](http://release.solana.com/edge/solana-release-x86_64-apple-darwin.tar.bz2)
* [solana-install-init](http://release.solana.com/edge/solana-install-init-x86_64-apple-darwin) as a stand-alone executable
#### Windows (x86_64-pc-windows-msvc)
* [solana.tar.bz2](http://release.solana.com/edge/solana-release-x86_64-pc-windows-msvc.tar.bz2)
* [solana-install-init.exe](http://release.solana.com/edge/solana-install-init-x86_64-pc-windows-msvc.exe) as a stand-alone executable
#### All platforms
* [solana-metrics.tar.bz2](http://release.solana.com.s3.amazonaws.com/edge/solana-metrics.tar.bz2)
### Beta channel
#### Linux (x86_64-unknown-linux-gnu)
* [solana.tar.bz2](http://release.solana.com/beta/solana-release-x86_64-unknown-linux-gnu.tar.bz2)
* [solana-install-init](http://release.solana.com/beta/solana-install-init-x86_64-unknown-linux-gnu) as a stand-alone executable
#### mac OS (x86_64-apple-darwin)
* [solana.tar.bz2](http://release.solana.com/beta/solana-release-x86_64-apple-darwin.tar.bz2)
* [solana-install-init](http://release.solana.com/beta/solana-install-init-x86_64-apple-darwin) as a stand-alone executable
#### Windows (x86_64-pc-windows-msvc)
* [solana.tar.bz2](http://release.solana.com/beta/solana-release-x86_64-pc-windows-msvc.tar.bz2)
* [solana-install-init.exe](http://release.solana.com/beta/solana-install-init-x86_64-pc-windows-msvc.exe) as a stand-alone executable
#### All platforms
* [solana-metrics.tar.bz2](http://release.solana.com.s3.amazonaws.com/beta/solana-metrics.tar.bz2)
Developing
===
@ -41,10 +75,10 @@ Install rustc, cargo and rustfmt:
```bash
$ curl https://sh.rustup.rs -sSf | sh
$ source $HOME/.cargo/env
$ rustup component add rustfmt-preview
$ rustup component add rustfmt
```
If your rustc version is lower than 1.34.0, please update it:
If your rustc version is lower than 1.37.0, please update it:
```bash
$ rustup update
@ -66,7 +100,7 @@ $ cd solana
Build
```bash
$ cargo build --all
$ cargo build
```
Then to run a minimal local cluster
@ -80,25 +114,22 @@ Testing
Run the test suite:
```bash
$ cargo test --all
$ cargo test
```
Local Testnet
---
Start your own testnet locally, instructions are in the book [Solana: Blockchain Rebuild for Scale: Getting Started](https://solana-labs.github.io/book/getting-started.html).
Start your own testnet locally, instructions are in the book [Solana: Blockchain Rebuild for Scale: Getting Started](https://docs.solana.com/book/getting-started).
Remote Testnets
---
We maintain several testnets:
* `testnet` - public stable testnet accessible via testnet.solana.com, with an https proxy for web apps at api.testnet.solana.com. Runs 24/7
* `testnet` - public stable testnet accessible via testnet.solana.com. Runs 24/7
* `testnet-beta` - public beta channel testnet accessible via beta.testnet.solana.com. Runs 24/7
* `testnet-edge` - public edge channel testnet accessible via edge.testnet.solana.com. Runs 24/7
* `testnet-perf` - permissioned stable testnet running a 24/7 soak test
* `testnet-beta-perf` - permissioned beta channel testnet running a multi-hour soak test weekday mornings
* `testnet-edge-perf` - permissioned edge channel testnet running a multi-hour soak test weekday mornings
## Deploy process
@ -209,5 +240,3 @@ problem is solved by this code?" On the other hand, if a test does fail and you
better way to solve the same problem, a Pull Request with your solution would most certainly be
welcome! Likewise, if rewriting a test can better communicate what code it's protecting, please
send us that patch!

View File

@ -59,53 +59,146 @@ There are three release channels that map to branches as follows:
* beta - tracks the largest (and latest) `vX.Y` stabilization branch, more stable.
* stable - tracks the second largest `vX.Y` stabilization branch, most stable.
## Release Steps
## Steps to Create a Branch
### Changing channels
#### Create the new branch
1. Pick your branch point for release on master.
1. Create the branch. The name should be "v" + the first 2 "version" fields
### Create the new branch
1. Check out the latest commit on `master` branch:
```
git fetch --all
git checkout upstream/master
```
1. Determine the new branch name. The name should be "v" + the first 2 version fields
from Cargo.toml. For example, a Cargo.toml with version = "0.9.0" implies
the next branch name is "v0.9".
1. Note the Cargo.toml in the repo root directory does not contain a version. Look at any other Cargo.toml file.
1. Create a new branch and push this branch to the solana repository.
1. `git checkout -b <branchname>`
1. `git push -u origin <branchname>`
1. Create the new branch and push this branch to the `solana` repository:
```
git checkout -b <branchname>
git push -u origin <branchname>
```
#### Update master with the next version
### Update master branch with the next version
1. After the new branch has been created and pushed, update Cargo.toml on **master** to the next semantic version (e.g. 0.9.0 -> 0.10.0)
by running `./scripts/increment-cargo-version.sh`, then rebuild with
`cargo build` to cause a refresh of `Cargo.lock`.
1. Push your Cargo.toml change and the autogenerated Cargo.lock changes to the
master branch
1. After the new branch has been created and pushed, update the Cargo.toml files on **master** to the next semantic version (e.g. 0.9.0 -> 0.10.0) with:
```
scripts/increment-cargo-version.sh minor
```
1. Rebuild to get an updated version of `Cargo.lock`:
```
cargo build
```
1. Push all the changed Cargo.toml and Cargo.lock files to the `master` branch with something like:
```
git co -b version_update
git ls-files -m | xargs git add
git commit -m 'Update Cargo.toml versions from X.Y to X.Y+1'
git push -u origin version_update
```
1. Confirm that your freshly cut release branch is shown as `BETA_CHANNEL` and the previous release branch as `STABLE_CHANNEL`:
```
ci/channel_info.sh
```
At this point, `ci/channel-info.sh` should show your freshly cut release branch as
"BETA_CHANNEL" and the previous release branch as "STABLE_CHANNEL".
## Steps to Create a Release
### Updating channels (i.e. "making a release")
### Create the Release Tag on GitHub
We use [github's Releases UI](https://github.com/solana-labs/solana/releases) for tagging a release.
1. Go [there ;)](https://github.com/solana-labs/solana/releases).
1. Go to [GitHub's Releases UI](https://github.com/solana-labs/solana/releases) for tagging a release.
1. Click "Draft new release". The release tag must exactly match the `version`
field in `/Cargo.toml` prefixed by `v` (ie, `<branchname>.X`).
field in `/Cargo.toml` prefixed by `v`.
1. If the Cargo.toml verion field is **0.12.3**, then the release tag must be **v0.12.3**
1. Make sure the Target Branch field matches the branch you want to make a release on.
1. If you want to release v0.12.0, the target branch must be v0.12
1. If this is the first release on the branch (e.g. v0.13.**0**), paste in [this
template](https://raw.githubusercontent.com/solana-labs/solana/master/.github/RELEASE_TEMPLATE.md)
and fill it in.
1. Test the release by generating a tag using semver's rules. First try at a
release should be `<branchname>.X-rc.0`.
1. Verify release automation:
1. [Crates.io](https://crates.io/crates/solana) should have an updated Solana version.
1. ...
1. After testnet deployment, verify that testnets are running correct software.
http://metrics.solana.com should show testnet running on a hash from your
newly created branch.
1. Once the release has been made, update Cargo.toml on the release branch to the next
semantic version (e.g. 0.9.0 -> 0.9.1) by running
`./scripts/increment-cargo-version.sh patch`, then rebuild with `cargo
build` to cause a refresh of `Cargo.lock`.
1. Push your Cargo.toml change and the autogenerated Cargo.lock changes to the
release branch.
template](https://raw.githubusercontent.com/solana-labs/solana/master/.github/RELEASE_TEMPLATE.md). Engineering Lead can provide summary contents for release notes if needed.
1. Click "Save Draft", then confirm the release notes look good and the tag name and branch are correct. Go back into edit the release and click "Publish release" when ready.
### Update release branch with the next patch version
1. After the new release has been tagged, update the Cargo.toml files on **release branch** to the next semantic version (e.g. 0.9.0 -> 0.9.1) with:
```
scripts/increment-cargo-version.sh patch
```
1. Rebuild to get an updated version of `Cargo.lock`:
```
cargo build
```
1. Push all the changed Cargo.toml and Cargo.lock files to the **release branch** with something like:
```
git co -b version_update
git ls-files -m | xargs git add
git commit -m 'Update Cargo.toml versions from X.Y.Z to X.Y.Z+1'
git push -u origin version_update
```
### Verify release automation success
1. Go to [Solana Releases](https://github.com/solana-labs/solana/releases) and click on the latest release that you just published. Verify that all of the build artifacts are present. This can take up to 90 minutes after creating the tag.
1. The `solana-secondary` Buildkite pipeline handles creating the binary tarballs and updated crates. Look for a job under the tag name of the release: https://buildkite.com/solana-labs/solana-secondary
1. [Crates.io](https://crates.io/crates/solana) should have an updated Solana version.
### Update documentation
TODO: Documentation update procedure is WIP as we move to gitbook
Document the new recommended version by updating `book/src/running-replicator.md` and `book/src/validator-testnet.md` on the release (beta) branch to point at the `solana-install` for the upcoming release version.
#### Publish updated Book
We maintain three copies of the "book" as official documentation:
1) "Book" is the documentation for the latest official release. This should get manually updated whenever a new release is made. It is published here:
https://solana-labs.github.io/book/
2) "Book-edge" tracks the tip of the master branch and updates automatically.
https://solana-labs.github.io/book-edge/
3) "Book-beta" tracks the tip of the beta branch and updates automatically.
https://solana-labs.github.io/book-beta/
To manually trigger an update of the "Book", create a new job of the manual-update-book pipeline.
Set the tag of the latest release as the PUBLISH_BOOK_TAG environment variable.
```bash
PUBLISH_BOOK_TAG=v0.16.6
```
https://buildkite.com/solana-labs/manual-update-book
### Update software on testnet.solana.com
The testnet running on testnet.solana.com is set to use a fixed release tag
which is set in the Buildkite testnet-management pipeline.
This tag needs to be updated and the testnet restarted after a new release
tag is created.
#### Update testnet schedules
Go to https://buildkite.com/solana-labs and click through: Pipelines ->
testnet-management -> Pipeline Settings -> Schedules
Or just click here:
https://buildkite.com/solana-labs/testnet-management/settings/schedules
There are two scheduled jobs for testnet: a daily restart and an hourly sanity-or-restart. \
https://buildkite.com/solana-labs/testnet-management/settings/schedules/0efd7856-7143-4713-8817-47e6bdb05387
https://buildkite.com/solana-labs/testnet-management/settings/schedules/2a926646-d972-42b5-aeb9-bb6759592a53
On each schedule:
1. Set TESTNET_TAG environment variable to the desired release tag.
1. Example, TESTNET_TAG=v0.13.2
1. Set the Build Branch to the branch that TESTNET_TAG is from.
1. Example: v0.13
#### Restart the testnet
Trigger a TESTNET_OP=create-and-start to refresh the cluster with the new version
1. Go to https://buildkite.com/solana-labs/testnet-management
2. Click "New Build" and use the following settings, then click "Create Build"
1. Commit: HEAD
1. Branch: [channel branch as set in the schedules]
1. Environment Variables:
```
TESTNET=testnet
TESTNET_TAG=[same value as used in TESTNET_TAG in the schedules]
TESTNET_OP=create-and-start
```
### Alert the community
Notify Discord users on #validator-support that a new release for
testnet.solana.com is available

2
banking_bench/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/target/
/farf/

19
banking_bench/Cargo.toml Normal file
View File

@ -0,0 +1,19 @@
[package]
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-banking-bench"
version = "0.19.0-pre0"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
[dependencies]
log = "0.4.6"
rayon = "1.2.0"
solana-core = { path = "../core", version = "0.19.0-pre0" }
solana-logger = { path = "../logger", version = "0.19.0-pre0" }
solana-runtime = { path = "../runtime", version = "0.19.0-pre0" }
solana-measure = { path = "../measure", version = "0.19.0-pre0" }
solana-sdk = { path = "../sdk", version = "0.19.0-pre0" }
rand = "0.6.5"
crossbeam-channel = "0.3"

319
banking_bench/src/main.rs Normal file
View File

@ -0,0 +1,319 @@
#[macro_use]
extern crate solana_core;
extern crate crossbeam_channel;
use crossbeam_channel::unbounded;
use log::*;
use rand::{thread_rng, Rng};
use rayon::prelude::*;
use solana_core::bank_forks::BankForks;
use solana_core::banking_stage::{create_test_recorder, BankingStage};
use solana_core::blocktree::{get_tmp_ledger_path, Blocktree};
use solana_core::cluster_info::ClusterInfo;
use solana_core::cluster_info::Node;
use solana_core::genesis_utils::{create_genesis_block, GenesisBlockInfo};
use solana_core::packet::to_packets_chunked;
use solana_core::poh_recorder::PohRecorder;
use solana_core::poh_recorder::WorkingBankEntry;
use solana_core::service::Service;
use solana_measure::measure::Measure;
use solana_runtime::bank::Bank;
use solana_sdk::hash::Hash;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::Keypair;
use solana_sdk::signature::Signature;
use solana_sdk::system_transaction;
use solana_sdk::timing::{duration_as_us, timestamp};
use solana_sdk::transaction::Transaction;
use std::iter;
use std::sync::atomic::Ordering;
use std::sync::mpsc::Receiver;
use std::sync::{Arc, Mutex, RwLock};
use std::thread::sleep;
use std::time::{Duration, Instant};
fn check_txs(
receiver: &Arc<Receiver<WorkingBankEntry>>,
ref_tx_count: usize,
poh_recorder: &Arc<Mutex<PohRecorder>>,
) -> bool {
let mut total = 0;
let now = Instant::now();
let mut no_bank = false;
loop {
if let Ok((_bank, (entry, _tick_count))) = receiver.recv_timeout(Duration::from_millis(10))
{
total += entry.transactions.len();
}
if total >= ref_tx_count {
break;
}
if now.elapsed().as_secs() > 60 {
break;
}
if poh_recorder.lock().unwrap().bank().is_none() {
trace!("no bank");
no_bank = true;
break;
}
}
if !no_bank {
assert!(total >= ref_tx_count);
}
no_bank
}
fn make_accounts_txs(txes: usize, mint_keypair: &Keypair, hash: Hash) -> Vec<Transaction> {
let to_pubkey = Pubkey::new_rand();
let dummy = system_transaction::transfer(mint_keypair, &to_pubkey, 1, hash);
(0..txes)
.into_par_iter()
.map(|_| {
let mut new = dummy.clone();
let sig: Vec<u8> = (0..64).map(|_| thread_rng().gen()).collect();
new.message.account_keys[0] = Pubkey::new_rand();
new.message.account_keys[1] = Pubkey::new_rand();
new.signatures = vec![Signature::new(&sig[0..64])];
new
})
.collect()
}
struct Config {
packets_per_batch: usize,
chunk_len: usize,
num_threads: usize,
}
impl Config {
fn get_transactions_index(&self, chunk_index: usize) -> usize {
chunk_index * (self.chunk_len / self.num_threads) * self.packets_per_batch
}
}
fn bytes_as_usize(bytes: &[u8]) -> usize {
bytes[0] as usize | (bytes[1] as usize) << 8
}
fn main() {
solana_logger::setup();
let num_threads = BankingStage::num_threads() as usize;
// a multiple of packet chunk duplicates to avoid races
const CHUNKS: usize = 8 * 2;
const PACKETS_PER_BATCH: usize = 192;
let txes = PACKETS_PER_BATCH * num_threads * CHUNKS;
let mint_total = 1_000_000_000_000;
let GenesisBlockInfo {
genesis_block,
mint_keypair,
..
} = create_genesis_block(mint_total);
let (verified_sender, verified_receiver) = unbounded();
let (vote_sender, vote_receiver) = unbounded();
let bank0 = Bank::new(&genesis_block);
let mut bank_forks = BankForks::new(0, bank0);
let mut bank = bank_forks.working_bank();
info!("threads: {} txs: {}", num_threads, txes);
let mut transactions = make_accounts_txs(txes, &mint_keypair, genesis_block.hash());
// fund all the accounts
transactions.iter().for_each(|tx| {
let fund = system_transaction::transfer(
&mint_keypair,
&tx.message.account_keys[0],
mint_total / txes as u64,
genesis_block.hash(),
);
let x = bank.process_transaction(&fund);
x.unwrap();
});
//sanity check, make sure all the transactions can execute sequentially
transactions.iter().for_each(|tx| {
let res = bank.process_transaction(&tx);
assert!(res.is_ok(), "sanity test transactions");
});
bank.clear_signatures();
//sanity check, make sure all the transactions can execute in parallel
let res = bank.process_transactions(&transactions);
for r in res {
assert!(r.is_ok(), "sanity parallel execution");
}
bank.clear_signatures();
let mut verified: Vec<_> = to_packets_chunked(&transactions.clone(), PACKETS_PER_BATCH)
.into_iter()
.map(|x| {
let len = x.packets.len();
(x, iter::repeat(1).take(len).collect())
})
.collect();
let ledger_path = get_tmp_ledger_path!();
{
let blocktree = Arc::new(
Blocktree::open(&ledger_path).expect("Expected to be able to open database ledger"),
);
let (exit, poh_recorder, poh_service, signal_receiver) =
create_test_recorder(&bank, &blocktree);
let cluster_info = ClusterInfo::new_with_invalid_keypair(Node::new_localhost().info);
let cluster_info = Arc::new(RwLock::new(cluster_info));
let _banking_stage = BankingStage::new(
&cluster_info,
&poh_recorder,
verified_receiver,
vote_receiver,
);
poh_recorder.lock().unwrap().set_bank(&bank);
let chunk_len = verified.len() / CHUNKS;
let mut start = 0;
// This is so that the signal_receiver does not go out of scope after the closure.
// If it is dropped before poh_service, then poh_service will error when
// calling send() on the channel.
let signal_receiver = Arc::new(signal_receiver);
let signal_receiver2 = signal_receiver.clone();
let mut total = 0;
let mut tx_total = 0;
let mut txs_processed = 0;
let mut root = 1;
let collector = Pubkey::new_rand();
const ITERS: usize = 1_000;
let config = Config {
packets_per_batch: PACKETS_PER_BATCH,
chunk_len,
num_threads,
};
for _ in 0..ITERS {
let now = Instant::now();
let mut sent = 0;
for (i, v) in verified[start..start + chunk_len]
.chunks(chunk_len / num_threads)
.enumerate()
{
let mut byte = 0;
let index = config.get_transactions_index(start + i);
if index < transactions.len() {
byte = bytes_as_usize(transactions[index].signatures[0].as_ref());
}
trace!(
"sending... {}..{} {} v.len: {} sig: {} transactions.len: {} index: {}",
start + i,
start + chunk_len,
timestamp(),
v.len(),
byte,
transactions.len(),
index,
);
for xv in v {
sent += xv.0.packets.len();
}
verified_sender.send(v.to_vec()).unwrap();
}
let start_tx_index = config.get_transactions_index(start);
let end_tx_index = config.get_transactions_index(start + chunk_len);
for tx in &transactions[start_tx_index..end_tx_index] {
loop {
if bank.get_signature_status(&tx.signatures[0]).is_some() {
break;
}
if poh_recorder.lock().unwrap().bank().is_none() {
break;
}
sleep(Duration::from_millis(5));
}
}
if check_txs(&signal_receiver2, txes / CHUNKS, &poh_recorder) {
debug!(
"resetting bank {} tx count: {} txs_proc: {}",
bank.slot(),
bank.transaction_count(),
txs_processed
);
assert!(txs_processed < bank.transaction_count());
txs_processed = bank.transaction_count();
tx_total += duration_as_us(&now.elapsed());
let mut poh_time = Measure::start("poh_time");
poh_recorder.lock().unwrap().reset(
bank.last_blockhash(),
bank.slot(),
Some((bank.slot(), bank.slot() + 1)),
);
poh_time.stop();
let mut new_bank_time = Measure::start("new_bank");
let new_bank = Bank::new_from_parent(&bank, &collector, bank.slot() + 1);
new_bank_time.stop();
let mut insert_time = Measure::start("insert_time");
bank_forks.insert(new_bank);
bank = bank_forks.working_bank();
insert_time.stop();
poh_recorder.lock().unwrap().set_bank(&bank);
assert!(poh_recorder.lock().unwrap().bank().is_some());
if bank.slot() > 32 {
bank_forks.set_root(root, &None);
root += 1;
}
debug!(
"new_bank_time: {}us insert_time: {}us poh_time: {}us",
new_bank_time.as_us(),
insert_time.as_us(),
poh_time.as_us(),
);
} else {
tx_total += duration_as_us(&now.elapsed());
}
// This signature clear may not actually clear the signatures
// in this chunk, but since we rotate between CHUNKS then
// we should clear them by the time we come around again to re-use that chunk.
bank.clear_signatures();
total += duration_as_us(&now.elapsed());
debug!(
"time: {} us checked: {} sent: {}",
duration_as_us(&now.elapsed()),
txes / CHUNKS,
sent,
);
if bank.slot() > 0 && bank.slot() % 16 == 0 {
for tx in transactions.iter_mut() {
tx.message.recent_blockhash = bank.last_blockhash();
let sig: Vec<u8> = (0..64).map(|_| thread_rng().gen()).collect();
tx.signatures[0] = Signature::new(&sig[0..64]);
}
verified = to_packets_chunked(&transactions.clone(), PACKETS_PER_BATCH)
.into_iter()
.map(|x| {
let len = x.packets.len();
(x, iter::repeat(1).take(len).collect())
})
.collect();
}
start += chunk_len;
start %= verified.len();
}
eprintln!(
"{{'name': 'banking_bench_total', 'median': '{}'}}",
total / ITERS as u64,
);
eprintln!(
"{{'name': 'banking_bench_tx_total', 'median': '{}'}}",
tx_total / ITERS as u64,
);
drop(vote_sender);
exit.store(true, Ordering::Relaxed);
poh_service.join().unwrap();
sleep(Duration::from_secs(1));
debug!("waited for poh_service");
}
let _unused = Blocktree::destroy(&ledger_path);
}

4
bench-exchange/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
/target/
/config/
/config-local/
/farf/

39
bench-exchange/Cargo.toml Normal file
View File

@ -0,0 +1,39 @@
[package]
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-bench-exchange"
version = "0.19.0-pre0"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
publish = false
[dependencies]
bincode = "1.1.4"
bs58 = "0.3.0"
clap = "2.32.0"
env_logger = "0.6.2"
itertools = "0.8.0"
log = "0.4.8"
num-derive = "0.2"
num-traits = "0.2"
rand = "0.6.5"
rayon = "1.2.0"
serde = "1.0.101"
serde_derive = "1.0.101"
serde_json = "1.0.40"
serde_yaml = "0.8.9"
# solana-runtime = { path = "../solana/runtime"}
solana-core = { path = "../core", version = "0.19.0-pre0" }
solana-genesis = { path = "../genesis", version = "0.19.0-pre0" }
solana-client = { path = "../client", version = "0.19.0-pre0" }
solana-drone = { path = "../drone", version = "0.19.0-pre0" }
solana-exchange-api = { path = "../programs/exchange_api", version = "0.19.0-pre0" }
solana-exchange-program = { path = "../programs/exchange_program", version = "0.19.0-pre0" }
solana-logger = { path = "../logger", version = "0.19.0-pre0" }
solana-metrics = { path = "../metrics", version = "0.19.0-pre0" }
solana-netutil = { path = "../netutil", version = "0.19.0-pre0" }
solana-runtime = { path = "../runtime", version = "0.19.0-pre0" }
solana-sdk = { path = "../sdk", version = "0.19.0-pre0" }
untrusted = "0.7.0"
ws = "0.9.0"

479
bench-exchange/README.md Normal file
View File

@ -0,0 +1,479 @@
# token-exchange
Solana Token Exchange Bench
If you can't wait; jump to [Running the exchange](#Running-the-exchange) to
learn how to start and interact with the exchange.
### Table of Contents
[Overview](#Overview)<br>
[Premise](#Premise)<br>
[Exchange startup](#Exchange-startup)<br>
[Order Requests](#Trade-requests)<br>
[Order Cancellations](#Trade-cancellations)<br>
[Trade swap](#Trade-swap)<br>
[Exchange program operations](#Exchange-program-operations)<br>
[Quotes and OHLCV](#Quotes-and-OHLCV)<br>
[Investor strategies](#Investor-strategies)<br>
[Running the exchange](#Running-the-exchange)<br>
## Overview
An exchange is a marketplace where one asset can be traded for another. This
demo demonstrates one way to host an exchange on the Solana blockchain by
emulating a currency exchange.
The assets are virtual tokens held by investors who may post order requests to
the exchange. A Matcher monitors the exchange and posts swap requests for
matching orders. All the transactions can execute concurrently.
## Premise
- Exchange
- An exchange is a marketplace where one asset can be traded for another.
The exchange in this demo is the on-chain program that implements the
tokens and the policies for trading those tokens.
- Token
- A virtual asset that can be owned, traded, and holds virtual intrinsic value
compared to other assets. There are four types of tokens in this demo, A,
B, C, D. Each one may be traded for another.
- Token account
- An account owned by the exchange that holds a quantity of one type of token.
- Account request
- A request to create a token account
- Token request
- A request to deposit tokens of a particular type into a token account.
- Asset pair
- A struct with fields Base and Quote, representing the two assets which make up a
trading pair, which themselves are Tokens. The Base or 'primary' asset is the
numerator and the Quote is the denominator for pricing purposes.
- Order side
- Describes which side of the market an investor wants to place a trade on. Options
are "Bid" or "Ask", where a bid represents an offer to purchase the Base asset of
the AssetPair for a sum of the Quote Asset and an Ask is an offer to sell Base asset
for the Quote asset.
- Price ratio
- An expression of the relative prices of two tokens. Calculated with the Base
Asset as the numerator and the Quote Asset as the denominator. Ratios are
represented as fixed point numbers. The fixed point scaler is defined in
[exchange_state.rs](https://github.com/solana-labs/solana/blob/c2fdd1362a029dcf89c8907c562d2079d977df11/programs/exchange_api/src/exchange_state.rs#L7)
- Order request
- A Solana transaction sent by a trader to the exchange to submit an order.
Order requests are made up of the token pair, the order side (bid or ask),
quantity of the primary token, the price ratio, and the two token accounts
to be credited/deducted. An example trade request looks like "T AB 5 2"
which reads "Exchange 5 A tokens to B tokens at a price ratio of 1:2" A fulfilled trade would result in 5 A tokens
deducted and 10 B tokens credited to the trade initiator's token accounts.
Successful order requests result in an order.
- Order
- The result of a successful order request. orders are stored in
accounts owned by the submitter of the order request. They can only be
canceled by their owner but can be used by anyone in a trade swap. They
contain the same information as the order request.
- Price spread
- The difference between the two matching orders. The spread is the
profit of the Matcher initiating the swap request.
- Match requirements
- Policies that result in a successful trade swap.
- Match request
- A request to fill two complementary orders (bid/ask), resulting if successful,
in a trade being created.
- Trade
- A successful trade is created from two matching orders that meet
swap requirements which are submitted in a Match Request by a Matcher and
executed by the exchange. A trade may not wholly satisfy one or both of the
orders in which case the orders are adjusted appropriately. Upon execution,
tokens are distributed to the traders' accounts and any overlap or
"negative spread" between orders is deposited into the Matcher's profit
account. All successful trades are recorded in the data of a new solana
account for posterity.
- Investor
- Individual investors who hold a number of tokens and wish to trade them on
the exchange. Investors operate as Solana thin clients who own a set of
accounts containing tokens and/or order requests. Investors post
transactions to the exchange in order to request tokens and post or cancel
order requests.
- Matcher
- An agent who facilitates trading between investors. Matchers operate as
Solana thin clients who monitor all the orders looking for a trade
match. Once found, the Matcher issues a swap request to the exchange.
Matchers are the engine of the exchange and are rewarded for their efforts by
accumulating the price spreads of the swaps they initiate. Matchers also
provide current bid/ask price and OHLCV (Open, High, Low, Close, Volume)
information on demand via a public network port.
- Transaction fees
- Solana transaction fees are paid for by the transaction submitters who are
the Investors and Matchers.
## Exchange startup
The exchange is up and running when it reaches a state where it can take
investors' trades and Matchers' match requests. To achieve this state the
following must occur in order:
- Start the Solana blockchain
- Start the thin-client
- The Matcher subscribes to change notifications for all the accounts owned by
the exchange program id. The subscription is managed via Solana's JSON RPC
interface.
- The Matcher starts responding to queries for bid/ask price and OHLCV
The Matcher responding successfully to price and OHLCV requests is the signal to
the investors that trades submitted after that point will be analyzed. <!--This
is not ideal, and instead investors should be able to submit trades at any time,
and the Matcher could come and go without missing a trade. One way to achieve
this is for the Matcher to read the current state of all accounts looking for all
open orders.-->
Investors will initially query the exchange to discover their current balance
for each type of token. If the investor does not already have an account for
each type of token, they will submit account requests. Matcher as well will
request accounts to hold the tokens they earn by initiating trade swaps.
```rust
/// Supported token types
pub enum Token {
A,
B,
C,
D,
}
/// Supported token pairs
pub enum TokenPair {
AB,
AC,
AD,
BC,
BD,
CD,
}
pub enum ExchangeInstruction {
/// New token account
/// key 0 - Signer
/// key 1 - New token account
AccountRequest,
}
/// Token accounts are populated with this structure
pub struct TokenAccountInfo {
/// Investor who owns this account
pub owner: Pubkey,
/// Current number of tokens this account holds
pub tokens: Tokens,
}
```
For this demo investors or Matcher can request more tokens from the exchange at
any time by submitting token requests. In non-demos, an exchange of this type
would provide another way to exchange a 3rd party asset into tokens.
To request tokens, investors submit transfer requests:
```rust
pub enum ExchangeInstruction {
/// Transfer tokens between two accounts
/// key 0 - Account to transfer tokens to
/// key 1 - Account to transfer tokens from. This can be the exchange program itself,
/// the exchange has a limitless number of tokens it can transfer.
TransferRequest(Token, u64),
}
```
## Order Requests
When an investor decides to exchange a token of one type for another, they
submit a transaction to the Solana Blockchain containing an order request, which,
if successful, is turned into an order. orders do not expire but are
cancellable. <!-- orders should have a timestamp to enable trade
expiration --> When an order is created, tokens are deducted from a token
account and the order acts as an escrow. The tokens are held until the
order is fulfilled or canceled. If the direction is `To`, then the number
of `tokens` are deducted from the primary account, if `From` then `tokens`
multiplied by `price` are deducted from the secondary account. orders are
no longer valid when the number of `tokens` goes to zero, at which point they
can no longer be used. <!-- Could support refilling orders, so order
accounts are refilled rather than accumulating -->
```rust
/// Direction of the exchange between two tokens in a pair
pub enum Direction {
/// Trade first token type (primary) in the pair 'To' the second
To,
/// Trade first token type in the pair 'From' the second (secondary)
From,
}
pub struct OrderRequestInfo {
/// Direction of trade
pub direction: Direction,
/// Token pair to trade
pub pair: TokenPair,
/// Number of tokens to exchange; refers to the primary or the secondary depending on the direction
pub tokens: u64,
/// The price ratio the primary price over the secondary price. The primary price is fixed
/// and equal to the variable `SCALER`.
pub price: u64,
/// Token account to deposit tokens on successful swap
pub dst_account: Pubkey,
}
pub enum ExchangeInstruction {
/// order request
/// key 0 - Signer
/// key 1 - Account in which to record the swap
/// key 2 - Token account associated with this trade
TradeRequest(TradeRequestInfo),
}
/// Trade accounts are populated with this structure
pub struct TradeOrderInfo {
/// Owner of the order
pub owner: Pubkey,
/// Direction of the exchange
pub direction: Direction,
/// Token pair indicating two tokens to exchange, first is primary
pub pair: TokenPair,
/// Number of tokens to exchange; primary or secondary depending on direction
pub tokens: u64,
/// Scaled price of the secondary token given the primary is equal to the scale value
/// If scale is 1 and price is 2 then ratio is 1:2 or 1 primary token for 2 secondary tokens
pub price: u64,
/// account which the tokens were source from. The trade account holds the tokens in escrow
/// until either one or more part of a swap or the trade is canceled.
pub src_account: Pubkey,
/// account which the tokens the tokens will be deposited into on a successful trade
pub dst_account: Pubkey,
}
```
## Order cancellations
An investor may cancel a trade at anytime, but only trades they own. If the
cancellation is successful, any tokens held in escrow are returned to the
account from which they came.
```rust
pub enum ExchangeInstruction {
/// order cancellation
/// key 0 - Signer
/// key 1 -order to cancel
TradeCancellation,
}
```
## Trade swaps
The Matcher is monitoring the accounts assigned to the exchange program and
building a trade-order table. The order table is used to identify
matching orders which could be fulfilled. When a match is found the
Matcher should issue a swap request. Swap requests may not satisfy the entirety
of either order, but the exchange will greedily fulfill it. Any leftover tokens
in either account will keep the order valid for further swap requests in
the future.
Matching orders are defined by the following swap requirements:
- Opposite polarity (one `To` and one `From`)
- Operate on the same token pair
- The price ratio of the `From` order is greater than or equal to the `To` order
- There are sufficient tokens to perform the trade
Orders can be written in the following format:
`investor direction pair quantity price-ratio`
For example:
- `1 T AB 2 1`
- Investor 1 wishes to exchange 2 A tokens to B tokens at a ratio of 1 A to 1
B
- `2 F AC 6 1.2`
- Investor 2 wishes to exchange A tokens from 6 B tokens at a ratio of 1 A
from 1.2 B
An order table could look something like the following. Notice how the columns
are sorted low to high and high to low, respectively. Prices are dramatic and
whole for clarity.
|Row| To | From |
|---|-------------|------------|
| 1 | 1 T AB 2 4 | 2 F AB 2 8 |
| 2 | 1 T AB 1 4 | 2 F AB 2 8 |
| 3 | 1 T AB 6 6 | 2 F AB 2 7 |
| 4 | 1 T AB 2 8 | 2 F AB 3 6 |
| 5 | 1 T AB 2 10 | 2 F AB 1 5 |
As part of a successful swap request, the exchange will credit tokens to the
Matcher's account equal to the difference in the price ratios or the two orders.
These tokens are considered the Matcher's profit for initiating the trade.
The Matcher would initiate the following swap on the order table above:
- Row 1, To: Investor 1 trades 2 A tokens to 8 B tokens
- Row 1, From: Investor 2 trades 2 A tokens from 8 B tokens
- Matcher takes 8 B tokens as profit
Both row 1 trades are fully realized, table becomes:
|Row| To | From |
|---|-------------|------------|
| 1 | 1 T AB 1 4 | 2 F AB 2 8 |
| 2 | 1 T AB 6 6 | 2 F AB 2 7 |
| 3 | 1 T AB 2 8 | 2 F AB 3 6 |
| 4 | 1 T AB 2 10 | 2 F AB 1 5 |
The Matcher would initiate the following swap:
- Row 1, To: Investor 1 trades 1 A token to 4 B tokens
- Row 1, From: Investor 2 trades 1 A token from 4 B tokens
- Matcher takes 4 B tokens as profit
Row 1 From is not fully realized, table becomes:
|Row| To | From |
|---|-------------|------------|
| 1 | 1 T AB 6 6 | 2 F AB 1 8 |
| 2 | 1 T AB 2 8 | 2 F AB 2 7 |
| 3 | 1 T AB 2 10 | 2 F AB 3 6 |
| 4 | | 2 F AB 1 5 |
The Matcher would initiate the following swap:
- Row 1, To: Investor 1 trades 1 A token to 6 B tokens
- Row 1, From: Investor 2 trades 1 A token from 6 B tokens
- Matcher takes 2 B tokens as profit
Row 1 To is now fully realized, table becomes:
|Row| To | From |
|---|-------------|------------|
| 1 | 1 T AB 5 6 | 2 F AB 2 7 |
| 2 | 1 T AB 2 8 | 2 F AB 3 5 |
| 3 | 1 T AB 2 10 | 2 F AB 1 5 |
The Matcher would initiate the following last swap:
- Row 1, To: Investor 1 trades 2 A token to 12 B tokens
- Row 1, From: Investor 2 trades 2 A token from 12 B tokens
- Matcher takes 4 B tokens as profit
Table becomes:
|Row| To | From |
|---|-------------|------------|
| 1 | 1 T AB 3 6 | 2 F AB 3 5 |
| 2 | 1 T AB 2 8 | 2 F AB 1 5 |
| 3 | 1 T AB 2 10 | |
At this point the lowest To's price is larger than the largest From's price so
no more swaps would be initiated until new orders came in.
```rust
pub enum ExchangeInstruction {
/// Trade swap request
/// key 0 - Signer
/// key 1 - Account in which to record the swap
/// key 2 - 'To' order
/// key 3 - `From` order
/// key 4 - Token account associated with the To Trade
/// key 5 - Token account associated with From trade
/// key 6 - Token account in which to deposit the Matcher profit from the swap.
SwapRequest,
}
/// Swap accounts are populated with this structure
pub struct TradeSwapInfo {
/// Pair swapped
pub pair: TokenPair,
/// `To` order
pub to_trade_order: Pubkey,
/// `From` order
pub from_trade_order: Pubkey,
/// Number of primary tokens exchanged
pub primary_tokens: u64,
/// Price the primary tokens were exchanged for
pub primary_price: u64,
/// Number of secondary tokens exchanged
pub secondary_tokens: u64,
/// Price the secondary tokens were exchanged for
pub secondary_price: u64,
}
```
## Exchange program operations
Putting all the commands together from above, the following operations will be
supported by the on-chain exchange program:
```rust
pub enum ExchangeInstruction {
/// New token account
/// key 0 - Signer
/// key 1 - New token account
AccountRequest,
/// Transfer tokens between two accounts
/// key 0 - Account to transfer tokens to
/// key 1 - Account to transfer tokens from. This can be the exchange program itself,
/// the exchange has a limitless number of tokens it can transfer.
TransferRequest(Token, u64),
/// order request
/// key 0 - Signer
/// key 1 - Account in which to record the swap
/// key 2 - Token account associated with this trade
TradeRequest(TradeRequestInfo),
/// order cancellation
/// key 0 - Signer
/// key 1 -order to cancel
TradeCancellation,
/// Trade swap request
/// key 0 - Signer
/// key 1 - Account in which to record the swap
/// key 2 - 'To' order
/// key 3 - `From` order
/// key 4 - Token account associated with the To Trade
/// key 5 - Token account associated with From trade
/// key 6 - Token account in which to deposit the Matcher profit from the swap.
SwapRequest,
}
```
## Quotes and OHLCV
The Matcher will provide current bid/ask price quotes based on trade actively and
also provide OHLCV based on some time window. The details of how the bid/ask
price quotes are calculated are yet to be decided.
## Investor strategies
To make a compelling demo, the investors needs to provide interesting trade
behavior. Something as simple as a randomly twiddled baseline would be a
minimum starting point.
## Running the exchange
The exchange bench posts trades and swaps matches as fast as it can.
You might want to bump the duration up
to 60 seconds and the batch size to 1000 for better numbers. You can modify those
in client_demo/src/demo.rs::test_exchange_local_cluster.
The following command runs the bench:
```bash
$ RUST_LOG=solana_bench_exchange=info cargo test --release -- --nocapture test_exchange_local_cluster
```
To also see the cluster messages:
```bash
$ RUST_LOG=solana_bench_exchange=info,solana=info cargo test --release -- --nocapture test_exchange_local_cluster
```

971
bench-exchange/src/bench.rs Normal file
View File

@ -0,0 +1,971 @@
#![allow(clippy::useless_attribute)]
use crate::order_book::*;
use itertools::izip;
use log::*;
use rand::{thread_rng, Rng};
use rayon::prelude::*;
use solana_client::perf_utils::{sample_txs, SampleStats};
use solana_core::gen_keys::GenKeys;
use solana_drone::drone::request_airdrop_transaction;
use solana_exchange_api::exchange_instruction;
use solana_exchange_api::exchange_state::*;
use solana_exchange_api::id;
use solana_genesis::PrimordialAccountDetails;
use solana_metrics::datapoint_info;
use solana_sdk::client::Client;
use solana_sdk::client::SyncClient;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::timing::{duration_as_ms, duration_as_s};
use solana_sdk::transaction::Transaction;
use solana_sdk::{system_instruction, system_program};
use std::cmp;
use std::collections::{HashMap, VecDeque};
use std::fs::File;
use std::io::prelude::*;
use std::mem;
use std::net::SocketAddr;
use std::path::Path;
use std::process::exit;
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
use std::sync::mpsc::{channel, Receiver, Sender};
use std::sync::{Arc, RwLock};
use std::thread::{sleep, Builder};
use std::time::{Duration, Instant};
// TODO Chunk length as specified results in a bunch of failures, divide by 10 helps...
// Assume 4MB network buffers, and 512 byte packets
const FUND_CHUNK_LEN: usize = 4 * 1024 * 1024 / 512;
// Maximum system transfers per transaction
const MAX_TRANSFERS_PER_TX: u64 = 4;
pub type SharedTransactions = Arc<RwLock<VecDeque<Vec<Transaction>>>>;
pub struct Config {
pub identity: Keypair,
pub threads: usize,
pub duration: Duration,
pub transfer_delay: u64,
pub fund_amount: u64,
pub batch_size: usize,
pub chunk_size: usize,
pub account_groups: usize,
pub client_ids_and_stake_file: String,
pub read_from_client_file: bool,
}
impl Default for Config {
fn default() -> Self {
Self {
identity: Keypair::new(),
threads: 4,
duration: Duration::new(u64::max_value(), 0),
transfer_delay: 0,
fund_amount: 100_000,
batch_size: 10,
chunk_size: 10,
account_groups: 100,
client_ids_and_stake_file: String::new(),
read_from_client_file: false,
}
}
}
pub fn create_client_accounts_file(
client_ids_and_stake_file: &str,
batch_size: usize,
account_groups: usize,
fund_amount: u64,
) {
let accounts_in_groups = batch_size * account_groups;
const NUM_KEYPAIR_GROUPS: u64 = 2;
let total_keys = accounts_in_groups as u64 * NUM_KEYPAIR_GROUPS;
let keypairs = generate_keypairs(total_keys);
let mut accounts = HashMap::new();
keypairs.iter().for_each(|keypair| {
accounts.insert(
serde_json::to_string(&keypair.to_bytes().to_vec()).unwrap(),
PrimordialAccountDetails {
balance: fund_amount,
executable: false,
owner: system_program::id().to_string(),
data: String::new(),
},
);
});
let serialized = serde_yaml::to_string(&accounts).unwrap();
let path = Path::new(&client_ids_and_stake_file);
let mut file = File::create(path).unwrap();
file.write_all(&serialized.into_bytes()).unwrap();
}
pub fn do_bench_exchange<T>(clients: Vec<T>, config: Config)
where
T: 'static + Client + Send + Sync,
{
let Config {
identity,
threads,
duration,
transfer_delay,
fund_amount,
batch_size,
chunk_size,
account_groups,
client_ids_and_stake_file,
read_from_client_file,
} = config;
info!(
"Exchange client: threads {} duration {} fund_amount {}",
threads,
duration_as_s(&duration),
fund_amount
);
info!(
"Exchange client: transfer delay {} batch size {} chunk size {}",
transfer_delay, batch_size, chunk_size
);
let accounts_in_groups = batch_size * account_groups;
const NUM_KEYPAIR_GROUPS: u64 = 2;
let total_keys = accounts_in_groups as u64 * NUM_KEYPAIR_GROUPS;
let mut signer_keypairs = if read_from_client_file {
let path = Path::new(&client_ids_and_stake_file);
let file = File::open(path).unwrap();
let accounts: HashMap<String, PrimordialAccountDetails> =
serde_yaml::from_reader(file).unwrap();
accounts
.into_iter()
.map(|(keypair, _)| {
let bytes: Vec<u8> = serde_json::from_str(keypair.as_str()).unwrap();
Keypair::from_bytes(&bytes).unwrap()
})
.collect()
} else {
info!("Generating {:?} signer keys", total_keys);
generate_keypairs(total_keys)
};
let trader_signers: Vec<_> = signer_keypairs
.drain(0..accounts_in_groups)
.map(Arc::new)
.collect();
let swapper_signers: Vec<_> = signer_keypairs
.drain(0..accounts_in_groups)
.map(Arc::new)
.collect();
let clients: Vec<_> = clients.into_iter().map(Arc::new).collect();
let client = clients[0].as_ref();
if !read_from_client_file {
info!("Fund trader accounts");
fund_keys(client, &identity, &trader_signers, fund_amount);
info!("Fund swapper accounts");
fund_keys(client, &identity, &swapper_signers, fund_amount);
}
info!("Generating {:?} account keys", total_keys);
let mut account_keypairs = generate_keypairs(total_keys);
let src_pubkeys: Vec<_> = account_keypairs
.drain(0..accounts_in_groups)
.map(|keypair| keypair.pubkey())
.collect();
let profit_pubkeys: Vec<_> = account_keypairs
.drain(0..accounts_in_groups)
.map(|keypair| keypair.pubkey())
.collect();
info!("Create {:?} source token accounts", src_pubkeys.len());
create_token_accounts(client, &trader_signers, &src_pubkeys);
info!("Create {:?} profit token accounts", profit_pubkeys.len());
create_token_accounts(client, &swapper_signers, &profit_pubkeys);
// Collect the max transaction rate and total tx count seen (single node only)
let sample_stats = Arc::new(RwLock::new(Vec::new()));
let sample_period = 1; // in seconds
info!("Sampling clients for tps every {} s", sample_period);
info!(
"Requesting and swapping trades with {} ms delay per thread...",
transfer_delay
);
let exit_signal = Arc::new(AtomicBool::new(false));
let shared_txs: SharedTransactions = Arc::new(RwLock::new(VecDeque::new()));
let total_txs_sent_count = Arc::new(AtomicUsize::new(0));
let s_threads: Vec<_> = (0..threads)
.map(|_| {
let exit_signal = exit_signal.clone();
let shared_txs = shared_txs.clone();
let total_txs_sent_count = total_txs_sent_count.clone();
let client = clients[0].clone();
Builder::new()
.name("solana-exchange-transfer".to_string())
.spawn(move || {
do_tx_transfers(&exit_signal, &shared_txs, &total_txs_sent_count, &client)
})
.unwrap()
})
.collect();
trace!("Start swapper thread");
let (swapper_sender, swapper_receiver) = channel();
let swapper_thread = {
let exit_signal = exit_signal.clone();
let shared_txs = shared_txs.clone();
let client = clients[0].clone();
Builder::new()
.name("solana-exchange-swapper".to_string())
.spawn(move || {
swapper(
&exit_signal,
&swapper_receiver,
&shared_txs,
&swapper_signers,
&profit_pubkeys,
transfer_delay,
batch_size,
chunk_size,
account_groups,
&client,
)
})
.unwrap()
};
trace!("Start trader thread");
let trader_thread = {
let exit_signal = exit_signal.clone();
let shared_txs = shared_txs.clone();
let client = clients[0].clone();
Builder::new()
.name("solana-exchange-trader".to_string())
.spawn(move || {
trader(
&exit_signal,
&swapper_sender,
&shared_txs,
&trader_signers,
&src_pubkeys,
transfer_delay,
batch_size,
chunk_size,
account_groups,
&client,
)
})
.unwrap()
};
let sample_threads: Vec<_> = clients
.iter()
.map(|client| {
let exit_signal = exit_signal.clone();
let sample_stats = sample_stats.clone();
let client = client.clone();
Builder::new()
.name("solana-exchange-sample".to_string())
.spawn(move || sample_txs(&exit_signal, &sample_stats, sample_period, &client))
.unwrap()
})
.collect();
sleep(duration);
info!("Stopping threads");
exit_signal.store(true, Ordering::Relaxed);
info!("Wait for trader thread");
let _ = trader_thread.join();
info!("Waiting for swapper thread");
let _ = swapper_thread.join();
info!("Wait for tx threads");
for t in s_threads {
let _ = t.join();
}
info!("Wait for sample threads");
for t in sample_threads {
let _ = t.join();
}
compute_and_report_stats(
&sample_stats,
total_txs_sent_count.load(Ordering::Relaxed) as u64,
);
}
fn do_tx_transfers<T>(
exit_signal: &Arc<AtomicBool>,
shared_txs: &SharedTransactions,
total_txs_sent_count: &Arc<AtomicUsize>,
client: &Arc<T>,
) where
T: Client,
{
loop {
let txs;
{
let mut shared_txs_wl = shared_txs.write().unwrap();
txs = shared_txs_wl.pop_front();
}
if let Some(txs0) = txs {
let n = txs0.len();
let now = Instant::now();
for tx in txs0 {
client.async_send_transaction(tx).expect("Transfer");
}
let duration = now.elapsed();
total_txs_sent_count.fetch_add(n, Ordering::Relaxed);
datapoint_info!(
"bench-exchange-do_tx_transfers",
("duration", duration_as_ms(&duration), i64),
("count", n, i64)
);
}
if exit_signal.load(Ordering::Relaxed) {
return;
}
}
}
struct TradeInfo {
trade_account: Pubkey,
order_info: OrderInfo,
}
#[allow(clippy::too_many_arguments)]
fn swapper<T>(
exit_signal: &Arc<AtomicBool>,
receiver: &Receiver<Vec<TradeInfo>>,
shared_txs: &SharedTransactions,
signers: &[Arc<Keypair>],
profit_pubkeys: &[Pubkey],
transfer_delay: u64,
batch_size: usize,
chunk_size: usize,
account_groups: usize,
client: &Arc<T>,
) where
T: Client,
{
let mut order_book = OrderBook::default();
let mut account_group: usize = 0;
let mut txs = 0;
let mut total_txs = 0;
let mut now = Instant::now();
let start_time = now;
let mut total_elapsed = start_time.elapsed();
// Chunks may have been dropped and we don't want to wait a long time
// for each time, Back-off each time we fail to confirm a chunk
const CHECK_TX_TIMEOUT_MAX_MS: u64 = 15000;
const CHECK_TX_DELAY_MS: u64 = 100;
let mut max_tries = CHECK_TX_TIMEOUT_MAX_MS / CHECK_TX_DELAY_MS;
// If we dump too many chunks maybe we are just waiting on a back-log
// rather than a series of dropped packets, reset to max waits
const MAX_DUMPS: u64 = 50;
let mut dumps = 0;
'outer: loop {
if let Ok(trade_infos) = receiver.try_recv() {
let mut tries = 0;
let mut trade_index = 0;
while client
.get_balance(&trade_infos[trade_index].trade_account)
.unwrap_or(0)
== 0
{
tries += 1;
if tries >= max_tries {
if exit_signal.load(Ordering::Relaxed) {
break 'outer;
}
error!("Give up and dump batch");
if dumps >= MAX_DUMPS {
error!("Max batches dumped, reset wait back-off");
max_tries = CHECK_TX_TIMEOUT_MAX_MS / CHECK_TX_DELAY_MS;
dumps = 0;
} else {
dumps += 1;
max_tries /= 2;
}
continue 'outer;
}
debug!("{} waiting for trades batch to clear", tries);
sleep(Duration::from_millis(CHECK_TX_DELAY_MS));
trade_index = thread_rng().gen_range(0, trade_infos.len());
}
max_tries = CHECK_TX_TIMEOUT_MAX_MS / CHECK_TX_DELAY_MS;
dumps = 0;
trade_infos.iter().for_each(|info| {
order_book
.push(info.trade_account, info.order_info)
.expect("Failed to push to order_book");
});
let mut swaps = Vec::new();
while let Some((to, from)) = order_book.pop() {
swaps.push((to, from));
if swaps.len() >= batch_size {
break;
}
}
let swaps_size = swaps.len();
let mut to_swap = vec![];
let start = account_group * swaps_size as usize;
let end = account_group * swaps_size as usize + batch_size as usize;
for (signer, swap, profit) in izip!(
signers[start..end].iter(),
swaps,
profit_pubkeys[start..end].iter(),
) {
to_swap.push((signer, swap, profit));
}
account_group = (account_group + 1) % account_groups as usize;
let (blockhash, _fee_calculator) = client
.get_recent_blockhash()
.expect("Failed to get blockhash");
let to_swap_txs: Vec<_> = to_swap
.par_iter()
.map(|(signer, swap, profit)| {
let s: &Keypair = &signer;
let owner = &signer.pubkey();
Transaction::new_signed_instructions(
&[s],
vec![exchange_instruction::swap_request(
owner,
&swap.0.pubkey,
&swap.1.pubkey,
&profit,
)],
blockhash,
)
})
.collect();
txs += to_swap_txs.len() as u64;
total_txs += to_swap_txs.len() as u64;
total_elapsed = start_time.elapsed();
let duration = now.elapsed();
if duration_as_s(&duration) >= 1_f32 {
now = Instant::now();
let tps = txs as f32 / duration_as_s(&duration);
info!(
"Swapper {:9.2} TPS, Transactions: {:6}, Total transactions: {} over {} s",
tps,
txs,
total_txs,
total_elapsed.as_secs(),
);
txs = 0;
}
datapoint_info!("bench-exchange-swaps", ("count", to_swap_txs.len(), i64));
let chunks: Vec<_> = to_swap_txs.chunks(chunk_size).collect();
{
let mut shared_txs_wl = shared_txs.write().unwrap();
for chunk in chunks {
shared_txs_wl.push_back(chunk.to_vec());
}
}
// Throttle the swapper so it doesn't try to catchup unbridled
sleep(Duration::from_millis(transfer_delay / 2));
}
if exit_signal.load(Ordering::Relaxed) {
break 'outer;
}
}
info!(
"Swapper sent {} at {:9.2} TPS",
total_txs,
total_txs as f32 / duration_as_s(&total_elapsed)
);
assert_eq!(
order_book.get_num_outstanding().0 + order_book.get_num_outstanding().1,
0
);
}
#[allow(clippy::too_many_arguments)]
fn trader<T>(
exit_signal: &Arc<AtomicBool>,
sender: &Sender<Vec<TradeInfo>>,
shared_txs: &SharedTransactions,
signers: &[Arc<Keypair>],
srcs: &[Pubkey],
transfer_delay: u64,
batch_size: usize,
chunk_size: usize,
account_groups: usize,
client: &Arc<T>,
) where
T: Client,
{
// TODO Hard coded for now
let pair = AssetPair::default();
let tokens = 1;
let price = 1000;
let mut account_group: usize = 0;
let mut txs = 0;
let mut total_txs = 0;
let mut now = Instant::now();
let start_time = now;
let mut total_elapsed = start_time.elapsed();
loop {
let trade_keys = generate_keypairs(batch_size as u64);
let mut trades = vec![];
let mut trade_infos = vec![];
let start = account_group * batch_size as usize;
let end = account_group * batch_size as usize + batch_size as usize;
let mut side = OrderSide::Ask;
for (signer, trade, src) in izip!(
signers[start..end].iter(),
trade_keys,
srcs[start..end].iter(),
) {
side = if side == OrderSide::Ask {
OrderSide::Bid
} else {
OrderSide::Ask
};
let order_info = OrderInfo {
/// Owner of the trade order
owner: Pubkey::default(), // don't care
side,
pair,
tokens,
price,
tokens_settled: 0,
};
trade_infos.push(TradeInfo {
trade_account: trade.pubkey(),
order_info,
});
trades.push((signer, trade.pubkey(), side, src));
}
account_group = (account_group + 1) % account_groups as usize;
let (blockhash, _fee_calculator) = client
.get_recent_blockhash()
.expect("Failed to get blockhash");
trades.chunks(chunk_size).for_each(|chunk| {
let trades_txs: Vec<_> = chunk
.par_iter()
.map(|(signer, trade, side, src)| {
let s: &Keypair = &signer;
let owner = &signer.pubkey();
let space = mem::size_of::<ExchangeState>() as u64;
Transaction::new_signed_instructions(
&[s],
vec![
system_instruction::create_account(owner, trade, 1, space, &id()),
exchange_instruction::trade_request(
owner, trade, *side, pair, tokens, price, src,
),
],
blockhash,
)
})
.collect();
{
txs += chunk_size as u64;
total_txs += chunk_size as u64;
total_elapsed = start_time.elapsed();
let duration = now.elapsed();
if duration_as_s(&duration) >= 1_f32 {
now = Instant::now();
let tps = txs as f32 / duration_as_s(&duration);
info!(
"Trader {:9.2} TPS, Transactions: {:6}, Total transactions: {} over {} s",
tps,
txs,
total_txs,
total_elapsed.as_secs(),
);
txs = 0;
}
datapoint_info!("bench-exchange-trades", ("count", trades_txs.len(), i64));
{
let mut shared_txs_wl = shared_txs
.write()
.expect("Failed to send tx to transfer threads");
shared_txs_wl.push_back(trades_txs);
}
}
if transfer_delay > 0 {
sleep(Duration::from_millis(transfer_delay));
}
});
if exit_signal.load(Ordering::Relaxed) {
info!(
"Trader sent {} at {:9.2} TPS",
total_txs,
total_txs as f32 / duration_as_s(&total_elapsed)
);
return;
}
// TODO chunk the trade infos and send them when the batch is sent
sender
.send(trade_infos)
.expect("Failed to send trades to swapper");
}
}
fn verify_transfer<T>(sync_client: &T, tx: &Transaction) -> bool
where
T: SyncClient + ?Sized,
{
for s in &tx.signatures {
if let Ok(Some(r)) = sync_client.get_signature_status(s) {
match r {
Ok(_) => {
return true;
}
Err(e) => {
info!("error: {:?}", e);
}
}
}
}
false
}
fn verify_funding_transfer<T: SyncClient + ?Sized>(
client: &T,
tx: &Transaction,
amount: u64,
) -> bool {
for a in &tx.message().account_keys[1..] {
if client.get_balance(a).unwrap_or(0) >= amount {
return true;
}
}
false
}
pub fn fund_keys(client: &dyn Client, source: &Keypair, dests: &[Arc<Keypair>], lamports: u64) {
let total = lamports * (dests.len() as u64 + 1);
let mut funded: Vec<(&Keypair, u64)> = vec![(source, total)];
let mut notfunded: Vec<&Arc<Keypair>> = dests.iter().collect();
info!(
" Funding {} keys with {} lamports each",
dests.len(),
lamports
);
while !notfunded.is_empty() {
if funded.is_empty() {
panic!("No funded accounts left to fund remaining");
}
let mut new_funded: Vec<(&Keypair, u64)> = vec![];
let mut to_fund = vec![];
debug!(" Creating from... {}", funded.len());
for f in &mut funded {
let max_units = cmp::min(
cmp::min(notfunded.len() as u64, MAX_TRANSFERS_PER_TX),
(f.1 - lamports) / lamports,
);
if max_units == 0 {
continue;
}
let per_unit = ((f.1 - lamports) / lamports / max_units) * lamports;
f.1 -= per_unit * max_units;
let start = notfunded.len() - max_units as usize;
let moves: Vec<_> = notfunded[start..]
.iter()
.map(|k| (k.pubkey(), per_unit))
.collect();
notfunded[start..]
.iter()
.for_each(|k| new_funded.push((k, per_unit)));
notfunded.truncate(start);
if !moves.is_empty() {
to_fund.push((f.0, moves));
}
}
to_fund.chunks(FUND_CHUNK_LEN).for_each(|chunk| {
#[allow(clippy::clone_double_ref)] // sigh
let mut to_fund_txs: Vec<_> = chunk
.par_iter()
.map(|(k, m)| {
(
k.clone(),
Transaction::new_unsigned_instructions(system_instruction::transfer_many(
&k.pubkey(),
&m,
)),
)
})
.collect();
let mut retries = 0;
let amount = chunk[0].1[0].1;
while !to_fund_txs.is_empty() {
let receivers = to_fund_txs
.iter()
.fold(0, |len, (_, tx)| len + tx.message().instructions.len());
debug!(
" {} to {} in {} txs",
if retries == 0 {
" Transferring"
} else {
" Retrying"
},
receivers,
to_fund_txs.len(),
);
let (blockhash, _fee_calculator) =
client.get_recent_blockhash().expect("blockhash");
to_fund_txs.par_iter_mut().for_each(|(k, tx)| {
tx.sign(&[*k], blockhash);
});
to_fund_txs.iter().for_each(|(_, tx)| {
client.async_send_transaction(tx.clone()).expect("transfer");
});
let mut waits = 0;
loop {
sleep(Duration::from_millis(200));
to_fund_txs.retain(|(_, tx)| !verify_funding_transfer(client, &tx, amount));
if to_fund_txs.is_empty() {
break;
}
debug!(
" {} transactions outstanding, {:?} waits",
to_fund_txs.len(),
waits
);
waits += 1;
if waits >= 5 {
break;
}
}
if !to_fund_txs.is_empty() {
retries += 1;
debug!(" Retry {:?}", retries);
if retries >= 10 {
error!("fund_keys: Too many retries ({}), give up", retries);
exit(1);
}
}
}
});
funded.append(&mut new_funded);
funded.retain(|(k, b)| {
client.get_balance(&k.pubkey()).unwrap_or(0) > lamports && *b > lamports
});
debug!(" Funded: {} left: {}", funded.len(), notfunded.len());
}
}
pub fn create_token_accounts(client: &dyn Client, signers: &[Arc<Keypair>], accounts: &[Pubkey]) {
let mut notfunded: Vec<(&Arc<Keypair>, &Pubkey)> = signers.iter().zip(accounts).collect();
while !notfunded.is_empty() {
notfunded.chunks(FUND_CHUNK_LEN).for_each(|chunk| {
let mut to_create_txs: Vec<_> = chunk
.par_iter()
.map(|(signer, new)| {
let owner_pubkey = &signer.pubkey();
let space = mem::size_of::<ExchangeState>() as u64;
let create_ix =
system_instruction::create_account(owner_pubkey, new, 1, space, &id());
let request_ix = exchange_instruction::account_request(owner_pubkey, new);
(
signer,
Transaction::new_unsigned_instructions(vec![create_ix, request_ix]),
)
})
.collect();
let accounts = to_create_txs
.iter()
.fold(0, |len, (_, tx)| len + tx.message().instructions.len() / 2);
debug!(
" Creating {} accounts in {} txs",
accounts,
to_create_txs.len(),
);
let mut retries = 0;
while !to_create_txs.is_empty() {
let (blockhash, _fee_calculator) = client
.get_recent_blockhash()
.expect("Failed to get blockhash");
to_create_txs.par_iter_mut().for_each(|(k, tx)| {
let kp: &Keypair = k;
tx.sign(&[kp], blockhash);
});
to_create_txs.iter().for_each(|(_, tx)| {
client.async_send_transaction(tx.clone()).expect("transfer");
});
let mut waits = 0;
while !to_create_txs.is_empty() {
sleep(Duration::from_millis(200));
to_create_txs.retain(|(_, tx)| !verify_transfer(client, &tx));
if to_create_txs.is_empty() {
break;
}
debug!(
" {} transactions outstanding, waits {:?}",
to_create_txs.len(),
waits
);
waits += 1;
if waits >= 5 {
break;
}
}
if !to_create_txs.is_empty() {
retries += 1;
debug!(" Retry {:?}", retries);
if retries >= 20 {
error!(
"create_token_accounts: Too many retries ({}), give up",
retries
);
exit(1);
}
}
}
});
let mut new_notfunded: Vec<(&Arc<Keypair>, &Pubkey)> = vec![];
for f in &notfunded {
if client.get_balance(&f.1).unwrap_or(0) == 0 {
new_notfunded.push(*f)
}
}
notfunded = new_notfunded;
debug!(" Left: {}", notfunded.len());
}
}
fn compute_and_report_stats(maxes: &Arc<RwLock<Vec<(String, SampleStats)>>>, total_txs_sent: u64) {
let mut max_txs = 0;
let mut max_elapsed = Duration::new(0, 0);
info!("| Max TPS | Total Transactions");
info!("+---------------+--------------------");
for (_sock, stats) in maxes.read().unwrap().iter() {
let maybe_flag = match stats.txs {
0 => "!!!!!",
_ => "",
};
info!("| {:13.2} | {} {}", stats.tps, stats.txs, maybe_flag);
if stats.elapsed > max_elapsed {
max_elapsed = stats.elapsed;
}
if stats.txs > max_txs {
max_txs = stats.txs;
}
}
info!("+---------------+--------------------");
if max_txs >= total_txs_sent {
info!(
"Warning: Average TPS might be under reported, there were no txs sent for a portion of the duration"
);
max_txs = total_txs_sent;
}
info!(
"{} txs outstanding when test ended (lag) ({:.2}%)",
total_txs_sent - max_txs,
(total_txs_sent - max_txs) as f64 / total_txs_sent as f64 * 100_f64
);
info!(
"\tAverage TPS: {:.2}",
max_txs as f32 / max_elapsed.as_secs() as f32
);
}
fn generate_keypairs(num: u64) -> Vec<Keypair> {
let mut seed = [0_u8; 32];
seed.copy_from_slice(&Keypair::new().pubkey().as_ref());
let mut rnd = GenKeys::new(seed);
rnd.gen_n_keypairs(num)
}
pub fn airdrop_lamports(client: &dyn Client, drone_addr: &SocketAddr, id: &Keypair, amount: u64) {
let balance = client.get_balance(&id.pubkey());
let balance = balance.unwrap_or(0);
if balance >= amount {
return;
}
let amount_to_drop = amount - balance;
info!(
"Airdropping {:?} lamports from {} for {}",
amount_to_drop,
drone_addr,
id.pubkey(),
);
let mut tries = 0;
loop {
let (blockhash, _fee_calculator) = client
.get_recent_blockhash()
.expect("Failed to get blockhash");
match request_airdrop_transaction(&drone_addr, &id.pubkey(), amount_to_drop, blockhash) {
Ok(transaction) => {
let signature = client.async_send_transaction(transaction).unwrap();
for _ in 0..30 {
if let Ok(Some(_)) = client.get_signature_status(&signature) {
break;
}
sleep(Duration::from_millis(100));
}
if client.get_balance(&id.pubkey()).unwrap_or(0) >= amount {
break;
}
}
Err(err) => {
panic!(
"Error requesting airdrop: {:?} to addr: {:?} amount: {}",
err, drone_addr, amount
);
}
};
debug!(" Retry...");
tries += 1;
if tries > 50 {
error!("airdrop_lamports: Too many retries ({}), give up", tries);
exit(1);
}
sleep(Duration::from_secs(2));
}
}

218
bench-exchange/src/cli.rs Normal file
View File

@ -0,0 +1,218 @@
use clap::{crate_description, crate_name, crate_version, value_t, App, Arg, ArgMatches};
use solana_core::gen_keys::GenKeys;
use solana_drone::drone::DRONE_PORT;
use solana_sdk::signature::{read_keypair, Keypair, KeypairUtil};
use std::net::SocketAddr;
use std::process::exit;
use std::time::Duration;
pub struct Config {
pub entrypoint_addr: SocketAddr,
pub drone_addr: SocketAddr,
pub identity: Keypair,
pub threads: usize,
pub num_nodes: usize,
pub duration: Duration,
pub transfer_delay: u64,
pub fund_amount: u64,
pub batch_size: usize,
pub chunk_size: usize,
pub account_groups: usize,
pub client_ids_and_stake_file: String,
pub write_to_client_file: bool,
pub read_from_client_file: bool,
}
impl Default for Config {
fn default() -> Self {
Self {
entrypoint_addr: SocketAddr::from(([127, 0, 0, 1], 8001)),
drone_addr: SocketAddr::from(([127, 0, 0, 1], DRONE_PORT)),
identity: Keypair::new(),
num_nodes: 1,
threads: 4,
duration: Duration::new(u64::max_value(), 0),
transfer_delay: 0,
fund_amount: 100_000,
batch_size: 100,
chunk_size: 100,
account_groups: 100,
client_ids_and_stake_file: String::new(),
write_to_client_file: false,
read_from_client_file: false,
}
}
}
pub fn build_args<'a, 'b>() -> App<'a, 'b> {
App::new(crate_name!())
.about(crate_description!())
.version(crate_version!())
.arg(
Arg::with_name("entrypoint")
.short("n")
.long("entrypoint")
.value_name("HOST:PORT")
.takes_value(true)
.required(false)
.default_value("127.0.0.1:8001")
.help("Cluster entry point; defaults to 127.0.0.1:8001"),
)
.arg(
Arg::with_name("drone")
.short("d")
.long("drone")
.value_name("HOST:PORT")
.takes_value(true)
.required(false)
.default_value("127.0.0.1:9900")
.help("Location of the drone; defaults to 127.0.0.1:9900"),
)
.arg(
Arg::with_name("identity")
.short("i")
.long("identity")
.value_name("PATH")
.takes_value(true)
.help("File containing a client identity (keypair)"),
)
.arg(
Arg::with_name("threads")
.long("threads")
.value_name("<threads>")
.takes_value(true)
.required(false)
.default_value("1")
.help("Number of threads submitting transactions"),
)
.arg(
Arg::with_name("num-nodes")
.long("num-nodes")
.value_name("NUM")
.takes_value(true)
.required(false)
.default_value("1")
.help("Wait for NUM nodes to converge"),
)
.arg(
Arg::with_name("duration")
.long("duration")
.value_name("SECS")
.takes_value(true)
.default_value("60")
.help("Seconds to run benchmark, then exit; default is forever"),
)
.arg(
Arg::with_name("transfer-delay")
.long("transfer-delay")
.value_name("<delay>")
.takes_value(true)
.required(false)
.default_value("0")
.help("Delay between each chunk"),
)
.arg(
Arg::with_name("fund-amount")
.long("fund-amount")
.value_name("<fund>")
.takes_value(true)
.required(false)
.default_value("100000")
.help("Number of lamports to fund to each signer"),
)
.arg(
Arg::with_name("batch-size")
.long("batch-size")
.value_name("<batch>")
.takes_value(true)
.required(false)
.default_value("1000")
.help("Number of transactions before the signer rolls over"),
)
.arg(
Arg::with_name("chunk-size")
.long("chunk-size")
.value_name("<cunk>")
.takes_value(true)
.required(false)
.default_value("500")
.help("Number of transactions to generate and send at a time"),
)
.arg(
Arg::with_name("account-groups")
.long("account-groups")
.value_name("<groups>")
.takes_value(true)
.required(false)
.default_value("10")
.help("Number of account groups to cycle for each batch"),
)
.arg(
Arg::with_name("write-client-keys")
.long("write-client-keys")
.value_name("FILENAME")
.takes_value(true)
.help("Generate client keys and stakes and write the list to YAML file"),
)
.arg(
Arg::with_name("read-client-keys")
.long("read-client-keys")
.value_name("FILENAME")
.takes_value(true)
.help("Read client keys and stakes from the YAML file"),
)
}
pub fn extract_args<'a>(matches: &ArgMatches<'a>) -> Config {
let mut args = Config::default();
args.entrypoint_addr = solana_netutil::parse_host_port(matches.value_of("entrypoint").unwrap())
.unwrap_or_else(|e| {
eprintln!("failed to parse entrypoint address: {}", e);
exit(1)
});
args.drone_addr = solana_netutil::parse_host_port(matches.value_of("drone").unwrap())
.unwrap_or_else(|e| {
eprintln!("failed to parse drone address: {}", e);
exit(1)
});
if matches.is_present("identity") {
args.identity = read_keypair(matches.value_of("identity").unwrap())
.expect("can't read client identity");
} else {
args.identity = {
let seed = [42_u8; 32];
let mut rnd = GenKeys::new(seed);
rnd.gen_keypair()
};
}
args.threads = value_t!(matches.value_of("threads"), usize).expect("Failed to parse threads");
args.num_nodes =
value_t!(matches.value_of("num-nodes"), usize).expect("Failed to parse num-nodes");
let duration = value_t!(matches.value_of("duration"), u64).expect("Failed to parse duration");
args.duration = Duration::from_secs(duration);
args.transfer_delay =
value_t!(matches.value_of("transfer-delay"), u64).expect("Failed to parse transfer-delay");
args.fund_amount =
value_t!(matches.value_of("fund-amount"), u64).expect("Failed to parse fund-amount");
args.batch_size =
value_t!(matches.value_of("batch-size"), usize).expect("Failed to parse batch-size");
args.chunk_size =
value_t!(matches.value_of("chunk-size"), usize).expect("Failed to parse chunk-size");
args.account_groups = value_t!(matches.value_of("account-groups"), usize)
.expect("Failed to parse account-groups");
if let Some(s) = matches.value_of("write-client-keys") {
args.write_to_client_file = true;
args.client_ids_and_stake_file = s.to_string();
}
if let Some(s) = matches.value_of("read-client-keys") {
assert!(!args.write_to_client_file);
args.read_from_client_file = true;
args.client_ids_and_stake_file = s.to_string();
}
args
}

View File

@ -0,0 +1,3 @@
pub mod bench;
pub mod cli;
mod order_book;

View File

@ -0,0 +1,83 @@
pub mod bench;
mod cli;
pub mod order_book;
use crate::bench::{airdrop_lamports, create_client_accounts_file, do_bench_exchange, Config};
use log::*;
use solana_core::gossip_service::{discover_cluster, get_multi_client};
use solana_sdk::signature::KeypairUtil;
fn main() {
solana_logger::setup();
solana_metrics::set_panic_hook("bench-exchange");
let matches = cli::build_args().get_matches();
let cli_config = cli::extract_args(&matches);
let cli::Config {
entrypoint_addr,
drone_addr,
identity,
threads,
num_nodes,
duration,
transfer_delay,
fund_amount,
batch_size,
chunk_size,
account_groups,
client_ids_and_stake_file,
write_to_client_file,
read_from_client_file,
..
} = cli_config;
let config = Config {
identity,
threads,
duration,
transfer_delay,
fund_amount,
batch_size,
chunk_size,
account_groups,
client_ids_and_stake_file,
read_from_client_file,
};
if write_to_client_file {
create_client_accounts_file(
&config.client_ids_and_stake_file,
config.batch_size,
config.account_groups,
config.fund_amount,
);
} else {
info!("Connecting to the cluster");
let (nodes, _replicators) =
discover_cluster(&entrypoint_addr, num_nodes).unwrap_or_else(|_| {
panic!("Failed to discover nodes");
});
let (client, num_clients) = get_multi_client(&nodes);
info!("{} nodes found", num_clients);
if num_clients < num_nodes {
panic!("Error: Insufficient nodes discovered");
}
if !read_from_client_file {
info!("Funding keypair: {}", config.identity.pubkey());
let accounts_in_groups = batch_size * account_groups;
const NUM_SIGNERS: u64 = 2;
airdrop_lamports(
&client,
&drone_addr,
&config.identity,
fund_amount * (accounts_in_groups + 1) as u64 * NUM_SIGNERS,
);
}
do_bench_exchange(vec![client], config);
}
}

View File

@ -0,0 +1,134 @@
use itertools::EitherOrBoth::{Both, Left, Right};
use itertools::Itertools;
use log::*;
use solana_exchange_api::exchange_state::*;
use solana_sdk::pubkey::Pubkey;
use std::cmp::Ordering;
use std::collections::BinaryHeap;
use std::{error, fmt};
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ToOrder {
pub pubkey: Pubkey,
pub info: OrderInfo,
}
impl Ord for ToOrder {
fn cmp(&self, other: &Self) -> Ordering {
other.info.price.cmp(&self.info.price)
}
}
impl PartialOrd for ToOrder {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(self.cmp(other))
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct FromOrder {
pub pubkey: Pubkey,
pub info: OrderInfo,
}
impl Ord for FromOrder {
fn cmp(&self, other: &Self) -> Ordering {
self.info.price.cmp(&other.info.price)
}
}
impl PartialOrd for FromOrder {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(self.cmp(other))
}
}
#[derive(Default)]
pub struct OrderBook {
// TODO scale to x token types
to_ab: BinaryHeap<ToOrder>,
from_ab: BinaryHeap<FromOrder>,
}
impl fmt::Display for OrderBook {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
writeln!(
f,
"+-Order Book--------------------------+-------------------------------------+"
)?;
for (i, it) in self
.to_ab
.iter()
.zip_longest(self.from_ab.iter())
.enumerate()
{
match it {
Both(to, from) => writeln!(
f,
"| T AB {:8} for {:8}/{:8} | F AB {:8} for {:8}/{:8} |{}",
to.info.tokens,
SCALER,
to.info.price,
from.info.tokens,
SCALER,
from.info.price,
i
)?,
Left(to) => writeln!(
f,
"| T AB {:8} for {:8}/{:8} | |{}",
to.info.tokens, SCALER, to.info.price, i
)?,
Right(from) => writeln!(
f,
"| | F AB {:8} for {:8}/{:8} |{}",
from.info.tokens, SCALER, from.info.price, i
)?,
}
}
write!(
f,
"+-------------------------------------+-------------------------------------+"
)?;
Ok(())
}
}
impl OrderBook {
// TODO
// pub fn cancel(&mut self, pubkey: Pubkey) -> Result<(), Box<dyn error::Error>> {
// Ok(())
// }
pub fn push(&mut self, pubkey: Pubkey, info: OrderInfo) -> Result<(), Box<dyn error::Error>> {
check_trade(info.side, info.tokens, info.price)?;
match info.side {
OrderSide::Ask => {
self.to_ab.push(ToOrder { pubkey, info });
}
OrderSide::Bid => {
self.from_ab.push(FromOrder { pubkey, info });
}
}
Ok(())
}
pub fn pop(&mut self) -> Option<(ToOrder, FromOrder)> {
if let Some(pair) = Self::pop_pair(&mut self.to_ab, &mut self.from_ab) {
return Some(pair);
}
None
}
pub fn get_num_outstanding(&self) -> (usize, usize) {
(self.to_ab.len(), self.from_ab.len())
}
fn pop_pair(
to_ab: &mut BinaryHeap<ToOrder>,
from_ab: &mut BinaryHeap<FromOrder>,
) -> Option<(ToOrder, FromOrder)> {
let to = to_ab.peek()?;
let from = from_ab.peek()?;
if from.info.price < to.info.price {
debug!("Trade not viable");
return None;
}
let to = to_ab.pop()?;
let from = from_ab.pop()?;
Some((to, from))
}
}

2
bench-streamer/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/target/
/farf/

View File

@ -2,17 +2,13 @@
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-bench-streamer"
version = "0.13.0"
version = "0.19.0-pre0"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
[dependencies]
clap = "2.33.0"
solana = { path = "../core", version = "0.13.0" }
solana-logger = { path = "../logger", version = "0.13.0" }
solana-netutil = { path = "../netutil", version = "0.13.0" }
[features]
cuda = ["solana/cuda"]
erasure = []
solana-core = { path = "../core", version = "0.19.0-pre0" }
solana-logger = { path = "../logger", version = "0.19.0-pre0" }
solana-netutil = { path = "../netutil", version = "0.19.0-pre0" }

View File

@ -1,7 +1,8 @@
use clap::{crate_description, crate_name, crate_version, App, Arg};
use solana::packet::{Packet, SharedPackets, BLOB_SIZE, PACKET_DATA_SIZE};
use solana::result::Result;
use solana::streamer::{receiver, PacketReceiver};
use solana_core::packet::PacketsRecycler;
use solana_core::packet::{Packet, Packets, BLOB_SIZE, PACKET_DATA_SIZE};
use solana_core::result::Result;
use solana_core::streamer::{receiver, PacketReceiver};
use std::cmp::max;
use std::net::{IpAddr, Ipv4Addr, SocketAddr, UdpSocket};
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
@ -14,19 +15,19 @@ use std::time::SystemTime;
fn producer(addr: &SocketAddr, exit: Arc<AtomicBool>) -> JoinHandle<()> {
let send = UdpSocket::bind("0.0.0.0:0").unwrap();
let msgs = SharedPackets::default();
let msgs_ = msgs.clone();
msgs.write().unwrap().packets.resize(10, Packet::default());
for w in &mut msgs.write().unwrap().packets {
let mut msgs = Packets::default();
msgs.packets.resize(10, Packet::default());
for w in msgs.packets.iter_mut() {
w.meta.size = PACKET_DATA_SIZE;
w.meta.set_addr(&addr);
}
let msgs = Arc::new(msgs);
spawn(move || loop {
if exit.load(Ordering::Relaxed) {
return;
}
let mut num = 0;
for p in &msgs_.read().unwrap().packets {
for p in &msgs.packets {
let a = p.meta.addr();
assert!(p.meta.size < BLOB_SIZE);
send.send_to(&p.data[..p.meta.size], &a).unwrap();
@ -43,7 +44,7 @@ fn sink(exit: Arc<AtomicBool>, rvs: Arc<AtomicUsize>, r: PacketReceiver) -> Join
}
let timer = Duration::new(1, 0);
if let Ok(msgs) = r.recv_timeout(timer) {
rvs.fetch_add(msgs.read().unwrap().packets.len(), Ordering::Relaxed);
rvs.fetch_add(msgs.packets.len(), Ordering::Relaxed);
}
})
}
@ -74,6 +75,7 @@ fn main() -> Result<()> {
let mut read_channels = Vec::new();
let mut read_threads = Vec::new();
let recycler = PacketsRecycler::default();
for _ in 0..num_sockets {
let read = solana_netutil::bind_to(port, false).unwrap();
read.set_read_timeout(Some(Duration::new(1, 0))).unwrap();
@ -83,7 +85,13 @@ fn main() -> Result<()> {
let (s_reader, r_reader) = channel();
read_channels.push(r_reader);
read_threads.push(receiver(Arc::new(read), &exit, s_reader, "bench-streamer"));
read_threads.push(receiver(
Arc::new(read),
&exit,
s_reader,
recycler.clone(),
"bench-streamer-test",
));
}
let t_producer1 = producer(&addr, exit.clone());

4
bench-tps/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
/target/
/config/
/config-local/
/farf/

View File

@ -2,23 +2,34 @@
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-bench-tps"
version = "0.13.0"
version = "0.19.0-pre0"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
[dependencies]
bincode = "1.1.4"
clap = "2.33.0"
rayon = "1.0.3"
serde_json = "1.0.39"
solana = { path = "../core", version = "0.13.0" }
solana-client = { path = "../client", version = "0.13.0" }
solana-drone = { path = "../drone", version = "0.13.0" }
solana-logger = { path = "../logger", version = "0.13.0" }
solana-metrics = { path = "../metrics", version = "0.13.0" }
solana-netutil = { path = "../netutil", version = "0.13.0" }
solana-sdk = { path = "../sdk", version = "0.13.0" }
log = "0.4.8"
rayon = "1.2.0"
serde = "1.0.101"
serde_derive = "1.0.101"
serde_json = "1.0.40"
serde_yaml = "0.8.9"
solana-core = { path = "../core", version = "0.19.0-pre0" }
solana-genesis = { path = "../genesis", version = "0.19.0-pre0" }
solana-client = { path = "../client", version = "0.19.0-pre0" }
solana-drone = { path = "../drone", version = "0.19.0-pre0" }
solana-librapay-api = { path = "../programs/librapay_api", version = "0.19.0-pre0" }
solana-logger = { path = "../logger", version = "0.19.0-pre0" }
solana-metrics = { path = "../metrics", version = "0.19.0-pre0" }
solana-measure = { path = "../measure", version = "0.19.0-pre0" }
solana-netutil = { path = "../netutil", version = "0.19.0-pre0" }
solana-runtime = { path = "../runtime", version = "0.19.0-pre0" }
solana-sdk = { path = "../sdk", version = "0.19.0-pre0" }
solana-move-loader-program = { path = "../programs/move_loader_program", version = "0.19.0-pre0" }
solana-move-loader-api = { path = "../programs/move_loader_api", version = "0.19.0-pre0" }
[features]
cuda = ["solana/cuda"]
erasure = []
[dev-dependencies]
serial_test = "0.2.0"
serial_test_derive = "0.2.0"

File diff suppressed because it is too large Load Diff

View File

@ -4,11 +4,14 @@ use std::time::Duration;
use clap::{crate_description, crate_name, crate_version, App, Arg, ArgMatches};
use solana_drone::drone::DRONE_PORT;
use solana_sdk::fee_calculator::FeeCalculator;
use solana_sdk::signature::{read_keypair, Keypair, KeypairUtil};
const NUM_LAMPORTS_PER_ACCOUNT_DEFAULT: u64 = 64 * 1024;
/// Holds the configuration for a single run of the benchmark
pub struct Config {
pub network_addr: SocketAddr,
pub entrypoint_addr: SocketAddr,
pub drone_addr: SocketAddr,
pub id: Keypair,
pub threads: usize,
@ -17,12 +20,18 @@ pub struct Config {
pub tx_count: usize,
pub thread_batch_sleep_ms: usize,
pub sustained: bool,
pub client_ids_and_stake_file: String,
pub write_to_client_file: bool,
pub read_from_client_file: bool,
pub target_lamports_per_signature: u64,
pub use_move: bool,
pub num_lamports_per_account: u64,
}
impl Default for Config {
fn default() -> Config {
Config {
network_addr: SocketAddr::from(([127, 0, 0, 1], 8001)),
entrypoint_addr: SocketAddr::from(([127, 0, 0, 1], 8001)),
drone_addr: SocketAddr::from(([127, 0, 0, 1], DRONE_PORT)),
id: Keypair::new(),
threads: 4,
@ -31,6 +40,12 @@ impl Default for Config {
tx_count: 500_000,
thread_batch_sleep_ms: 0,
sustained: false,
client_ids_and_stake_file: String::new(),
write_to_client_file: false,
read_from_client_file: false,
target_lamports_per_signature: FeeCalculator::default().target_lamports_per_signature,
use_move: false,
num_lamports_per_account: NUM_LAMPORTS_PER_ACCOUNT_DEFAULT,
}
}
}
@ -40,12 +55,12 @@ pub fn build_args<'a, 'b>() -> App<'a, 'b> {
App::new(crate_name!()).about(crate_description!())
.version(crate_version!())
.arg(
Arg::with_name("network")
Arg::with_name("entrypoint")
.short("n")
.long("network")
.long("entrypoint")
.value_name("HOST:PORT")
.takes_value(true)
.help("Rendezvous with the network at this gossip entry point; defaults to 127.0.0.1:8001"),
.help("Rendezvous with the cluster at this entry point; defaults to 127.0.0.1:8001"),
)
.arg(
Arg::with_name("drone")
@ -53,7 +68,7 @@ pub fn build_args<'a, 'b>() -> App<'a, 'b> {
.long("drone")
.value_name("HOST:PORT")
.takes_value(true)
.help("Location of the drone; defaults to network:DRONE_PORT"),
.help("Location of the drone; defaults to entrypoint:DRONE_PORT"),
)
.arg(
Arg::with_name("identity")
@ -91,6 +106,11 @@ pub fn build_args<'a, 'b>() -> App<'a, 'b> {
.long("sustained")
.help("Use sustained performance mode vs. peak mode. This overlaps the tx generation with transfers."),
)
.arg(
Arg::with_name("use-move")
.long("use-move")
.help("Use Move language transactions to perform transfers."),
)
.arg(
Arg::with_name("tx_count")
.long("tx_count")
@ -106,6 +126,39 @@ pub fn build_args<'a, 'b>() -> App<'a, 'b> {
.takes_value(true)
.help("Per-thread-per-iteration sleep in ms"),
)
.arg(
Arg::with_name("write-client-keys")
.long("write-client-keys")
.value_name("FILENAME")
.takes_value(true)
.help("Generate client keys and stakes and write the list to YAML file"),
)
.arg(
Arg::with_name("read-client-keys")
.long("read-client-keys")
.value_name("FILENAME")
.takes_value(true)
.help("Read client keys and stakes from the YAML file"),
)
.arg(
Arg::with_name("target_lamports_per_signature")
.long("target-lamports-per-signature")
.value_name("LAMPORTS")
.takes_value(true)
.help(
"The cost in lamports that the cluster will charge for signature \
verification when the cluster is operating at target-signatures-per-slot",
),
)
.arg(
Arg::with_name("num_lamports_per_account")
.long("num-lamports-per-account")
.value_name("LAMPORTS")
.takes_value(true)
.help(
"Number of lamports per account.",
),
)
}
/// Parses a clap `ArgMatches` structure into a `Config`
@ -116,9 +169,9 @@ pub fn build_args<'a, 'b>() -> App<'a, 'b> {
pub fn extract_args<'a>(matches: &ArgMatches<'a>) -> Config {
let mut args = Config::default();
if let Some(addr) = matches.value_of("network") {
args.network_addr = solana_netutil::parse_host_port(addr).unwrap_or_else(|e| {
eprintln!("failed to parse network address: {}", e);
if let Some(addr) = matches.value_of("entrypoint") {
args.entrypoint_addr = solana_netutil::parse_host_port(addr).unwrap_or_else(|e| {
eprintln!("failed to parse entrypoint address: {}", e);
exit(1)
});
}
@ -163,5 +216,26 @@ pub fn extract_args<'a>(matches: &ArgMatches<'a>) -> Config {
args.sustained = matches.is_present("sustained");
if let Some(s) = matches.value_of("write-client-keys") {
args.write_to_client_file = true;
args.client_ids_and_stake_file = s.to_string();
}
if let Some(s) = matches.value_of("read-client-keys") {
assert!(!args.write_to_client_file);
args.read_from_client_file = true;
args.client_ids_and_stake_file = s.to_string();
}
if let Some(v) = matches.value_of("target_lamports_per_signature") {
args.target_lamports_per_signature = v.to_string().parse().expect("can't parse lamports");
}
args.use_move = matches.is_present("use-move");
if let Some(v) = matches.value_of("num_lamports_per_account") {
args.num_lamports_per_account = v.to_string().parse().expect("can't parse lamports");
}
args
}

2
bench-tps/src/lib.rs Normal file
View File

@ -0,0 +1,2 @@
pub mod bench;
pub mod cli;

View File

@ -1,15 +1,126 @@
mod bench;
mod cli;
use solana_bench_tps::bench::{do_bench_tps, generate_and_fund_keypairs, generate_keypairs};
use solana_bench_tps::cli;
use solana_core::gossip_service::{discover_cluster, get_multi_client};
use solana_genesis::PrimordialAccountDetails;
use solana_sdk::fee_calculator::FeeCalculator;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::system_program;
use std::collections::HashMap;
use std::fs::File;
use std::io::prelude::*;
use std::path::Path;
use std::process::exit;
use crate::bench::do_bench_tps;
/// Number of signatures for all transactions in ~1 week at ~100K TPS
pub const NUM_SIGNATURES_FOR_TXS: u64 = 100_000 * 60 * 60 * 24 * 7;
fn main() {
solana_logger::setup();
solana_logger::setup_with_filter("solana=info");
solana_metrics::set_panic_hook("bench-tps");
let matches = cli::build_args().get_matches();
let cli_config = cli::extract_args(&matches);
let cfg = cli::extract_args(&matches);
let cli::Config {
entrypoint_addr,
drone_addr,
id,
num_nodes,
tx_count,
client_ids_and_stake_file,
write_to_client_file,
read_from_client_file,
target_lamports_per_signature,
use_move,
num_lamports_per_account,
..
} = &cli_config;
do_bench_tps(cfg);
if *write_to_client_file {
let (keypairs, _) = generate_keypairs(&id, *tx_count as u64 * 2);
let num_accounts = keypairs.len() as u64;
let max_fee = FeeCalculator::new(*target_lamports_per_signature).max_lamports_per_signature;
let num_lamports_per_account = (num_accounts - 1 + NUM_SIGNATURES_FOR_TXS * max_fee)
/ num_accounts
+ num_lamports_per_account;
let mut accounts = HashMap::new();
keypairs.iter().for_each(|keypair| {
accounts.insert(
serde_json::to_string(&keypair.to_bytes().to_vec()).unwrap(),
PrimordialAccountDetails {
balance: num_lamports_per_account,
executable: false,
owner: system_program::id().to_string(),
data: String::new(),
},
);
});
let serialized = serde_yaml::to_string(&accounts).unwrap();
let path = Path::new(&client_ids_and_stake_file);
let mut file = File::create(path).unwrap();
file.write_all(&serialized.into_bytes()).unwrap();
return;
}
println!("Connecting to the cluster");
let (nodes, _replicators) =
discover_cluster(&entrypoint_addr, *num_nodes).unwrap_or_else(|err| {
eprintln!("Failed to discover {} nodes: {:?}", num_nodes, err);
exit(1);
});
let (client, num_clients) = get_multi_client(&nodes);
if nodes.len() < num_clients {
eprintln!(
"Error: Insufficient nodes discovered. Expecting {} or more",
num_nodes
);
exit(1);
}
let (keypairs, move_keypairs, keypair_balance) = if *read_from_client_file && !use_move {
let path = Path::new(&client_ids_and_stake_file);
let file = File::open(path).unwrap();
let accounts: HashMap<String, PrimordialAccountDetails> =
serde_yaml::from_reader(file).unwrap();
let mut keypairs = vec![];
let mut last_balance = 0;
accounts
.into_iter()
.for_each(|(keypair, primordial_account)| {
let bytes: Vec<u8> = serde_json::from_str(keypair.as_str()).unwrap();
keypairs.push(Keypair::from_bytes(&bytes).unwrap());
last_balance = primordial_account.balance;
});
// Sort keypairs so that do_bench_tps() uses the same subset of accounts for each run.
// This prevents the amount of storage needed for bench-tps accounts from creeping up
// across multiple runs.
keypairs.sort_by(|x, y| x.pubkey().to_string().cmp(&y.pubkey().to_string()));
(keypairs, None, last_balance)
} else {
generate_and_fund_keypairs(
&client,
Some(*drone_addr),
&id,
*tx_count,
*num_lamports_per_account,
*use_move,
)
.unwrap_or_else(|e| {
eprintln!("Error could not fund keys: {:?}", e);
exit(1);
})
};
do_bench_tps(
vec![client],
cli_config,
keypairs,
keypair_balance,
move_keypairs,
);
}

View File

@ -0,0 +1,19 @@
+------------------------------------------------------------------+
| |
| +-----------------+ Neighborhood 0 +-----------------+ |
| | +--------------------->+ | |
| | Validator 1 | | Validator 2 | |
| | +<---------------------+ | |
| +--------+-+------+ +------+-+--------+ |
| | | | | |
| | +-----------------------------+ | | |
| | +------------------------+------+ | |
| | | | | |
+------------------------------------------------------------------+
| | | |
v v v v
+---------+------+---+ +-+--------+---------+
| | | |
| Neighborhood 1 | | Neighborhood 2 |
| | | |
+--------------------+ +--------------------+

View File

@ -0,0 +1,15 @@
+--------------+
| |
+------------+ Leader +------------+
| | | |
| +--------------+ |
v v
+------------+----------------------------------------+------------+
| |
| +-----------------+ Neighborhood 0 +-----------------+ |
| | +--------------------->+ | |
| | Validator 1 | | Validator 2 | |
| | +<---------------------+ | |
| +-----------------+ +-----------------+ |
| |
+------------------------------------------------------------------+

View File

@ -1,28 +1,18 @@
+--------------+
| |
+------------+ Leader +------------+
| | | |
| +--------------+ |
v v
+--------+--------+ +--------+--------+
| +--------------------->+ |
+-----------------+ Validator 1 | | Validator 2 +-------------+
| | +<---------------------+ | |
| +------+-+-+------+ +---+-+-+---------+ |
| | | | | | | |
| | | | | | | |
| +---------------------------------------------+ | | |
| | | | | | | |
| | | | | +----------------------+ | |
| | | | | | | |
| | | | +--------------------------------------------+ |
| | | | | | | |
| | | +----------------------+ | | |
| | | | | | | |
v v v v v v v v
+--------------------+ +--------------------+ +--------------------+ +--------------------+
| | | | | | | |
| Neighborhood 1 | | Neighborhood 2 | | Neighborhood 3 | | Neighborhood 4 |
| | | | | | | |
+--------------------+ +--------------------+ +--------------------+ +--------------------+
+--------------------+
| |
+--------+ Neighborhood 0 +----------+
| | | |
| +--------------------+ |
v v
+---------+----------+ +----------+---------+
| | | |
| Neighborhood 1 | | Neighborhood 2 |
| | | |
+---+-----+----------+ +----------+-----+---+
| | | |
v v v v
+------------------+-+ +-+------------------+ +------------------+-+ +-+------------------+
| | | | | | | |
| Neighborhood 3 | | Neighborhood 4 | | Neighborhood 5 | | Neighborhood 6 |
| | | | | | | |
+--------------------+ +--------------------+ +--------------------+ +--------------------+

View File

@ -0,0 +1,18 @@
+------------+
| Bank-Merkle|
+------------+
^ ^
/ \
+-----------------+ +-------------+
| Bank-Diff-Merkle| | Block-Merkle|
+-----------------+ +-------------+
^ ^
/ \
+------+ +--------------------------+
| Hash | | Previous Bank-Diff-Merkle|
+------+ +--------------------------+
^ ^
/ \
+---------------+ +---------------+
| Hash(Account1)| | Hash(Account2)|
+---------------+ +---------------+

View File

@ -0,0 +1,19 @@
+---------------+
| Block-Merkle |
+---------------+
^ ^
/ \
+-------------+ +-------------+
| Entry-Merkle| | Entry-Merkle|
+-------------+ +-------------+
^ ^
/ \
+-------+ +-------+
| Hash | | Hash |
+-------+ +-------+
^ ^ ^ ^
/ | | \
+-----------------+ +-----------------+ +-----------------+ +---+
| Hash(T1, status)| | Hash(T2, status)| | Hash(T3, status)| | 0 |
+-----------------+ +-----------------+ +-----------------+ +---+

View File

@ -0,0 +1,60 @@
.------------.
| Upstream |
| Validators |
`----+-------`
|
|
.-----------------------------------.
| Validator | |
| v |
| .-----------. .------------. |
.--------. | | Fetch | | Repair | |
| Client +---->| Stage | | Stage | |
`--------` | `---+-------` `----+-------` |
| | | |
| v v |
| .-----------. .------------. |
| | TPU |<-->| Blockstore | |
| | | | | |
| `-----------` `----+-------` |
| | |
| v |
| .------------. |
| | Multicast | |
| | Stage | |
| `----+-------` |
| | |
`-----------------------------------`
|
v
.------------.
| Downstream |
| Validators |
`------------`
.------------.
| PoH |
| Service |
`-------+----`
^ |
| |
.-----------------------------------.
| TPU | | |
| | v |
.-------. | .-----------. .---+--------. | .------------.
| Fetch +---->| SigVerify +--->| Banking |<--->| Blockstore |
| Stage | | | Stage | | Stage | | | |
`-------` | `-----------` `-----+------` | `------------`
| | |
| | |
`-----------------------------------`
|
v
.------------.
| Banktree |
| |
`------------`

View File

@ -1,5 +1,5 @@
.--------------------------------------.
| Fullnode |
| Validator |
| |
.--------. | .-------------------. |
| |---->| | |

11
book/build-svg.sh Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")"
make -j"$(nproc)" -B svg
if [[ -n $CI ]]; then
# In CI confirm that no svgs need to be built
git diff --exit-code
fi

View File

@ -3,16 +3,4 @@ set -e
cd "$(dirname "$0")"
cargo_install_unless() {
declare crate=$1
shift
"$@" > /dev/null 2>&1 || \
cargo install "$crate"
}
export PATH=$CARGO_HOME/bin:$PATH
cargo_install_unless mdbook mdbook --help
cargo_install_unless svgbob_cli svgbob --help
make -j"$(nproc)"
make -j"$(nproc)" test

View File

@ -1,31 +1,41 @@
BOB_SRCS=$(wildcard art/*.bob)
MSC_SRCS=$(wildcard art/*.msc)
MD_SRCS=$(wildcard src/*.md)
SVG_IMGS=$(BOB_SRCS:art/%.bob=src/img/%.svg)
SVG_IMGS=$(BOB_SRCS:art/%.bob=src/.gitbook/assets/%.svg) $(MSC_SRCS:art/%.msc=src/.gitbook/assets/%.svg)
all: html/index.html
TARGET=html/index.html
TEST_STAMP=src/tests.ok
test: src/tests.ok
all: $(TARGET)
open: all
svg: $(SVG_IMGS)
test: $(TEST_STAMP)
open: $(TEST_STAMP)
mdbook build --open
watch: $(SVG_IMGS)
mdbook watch
src/img/%.svg: art/%.bob
src/.gitbook/assets/%.svg: art/%.bob
@mkdir -p $(@D)
svgbob < $< > $@
src/.gitbook/assets/%.svg: art/%.msc
@mkdir -p $(@D)
mscgen -T svg -i $< -o $@
src/%.md: %.md
@mkdir -p $(@D)
@cp $< $@
src/tests.ok: $(SVG_IMGS) $(MD_SRCS)
$(TEST_STAMP): $(TARGET)
mdbook test
touch $@
html/index.html: src/tests.ok
$(TARGET): $(SVG_IMGS) $(MD_SRCS)
mdbook build
clean:

View File

@ -0,0 +1,183 @@
<svg class="bob" font-family="arial" font-size="14" height="304" width="544" 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="304" width="544" x="0" y="0"/>
<g>
<line x1="4" x2="4" y1="8" y2="184"/>
<line x1="4" x2="540" y1="8" y2="8"/>
<line x1="4" x2="540" y1="184" y2="184"/>
<line x1="540" x2="540" y1="8" y2="184"/>
</g>
<g>
<line x1="28" x2="28" y1="232" y2="296"/>
<line x1="28" x2="108" y1="232" y2="232"/>
<line x1="28" x2="196" y1="296" y2="296"/>
<line x1="108" x2="164" y1="232" y2="232"/>
<line x1="164" x2="196" y1="232" y2="232"/>
<line x1="196" x2="196" y1="232" y2="296"/>
</g>
<g>
<line x1="36" x2="36" y1="40" y2="104"/>
<line x1="36" x2="180" y1="40" y2="40"/>
<line x1="36" x2="108" y1="104" y2="104"/>
<line x1="108" x2="108" y1="104" y2="176"/>
<line x1="108" x2="124" y1="104" y2="104"/>
<line x1="124" x2="124" y1="104" y2="136"/>
<line x1="124" x2="180" y1="104" y2="104"/>
<line x1="124" x2="364" y1="136" y2="136"/>
<line x1="180" x2="180" y1="40" y2="56"/>
<line x1="180" x2="180" y1="56" y2="88"/>
<line marker-end="url(#triangle)" x1="180" x2="356" y1="56" y2="56"/>
<line x1="180" x2="180" y1="88" y2="104"/>
<line x1="180" x2="184" y1="88" y2="88"/>
<line x1="364" x2="364" y1="136" y2="152"/>
<line x1="364" x2="364" y1="152" y2="176"/>
<line x1="364" x2="420" y1="152" y2="152"/>
<line x1="420" x2="420" y1="104" y2="152"/>
<line x1="420" x2="436" y1="104" y2="104"/>
<line x1="436" x2="436" y1="104" y2="176"/>
<line x1="436" x2="508" y1="104" y2="104"/>
<line x1="508" x2="508" y1="40" y2="104"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="108" x2="108" y1="192" y2="220"/>
</g>
<g>
<line x1="164" x2="164" y1="152" y2="176"/>
<line x1="164" x2="364" y1="152" y2="152"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="164" x2="164" y1="192" y2="220"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="192" x2="188" y1="88" y2="88"/>
<line x1="192" x2="364" y1="88" y2="88"/>
<line x1="364" x2="364" y1="56" y2="88"/>
<line x1="364" x2="364" y1="88" y2="104"/>
<line x1="364" x2="420" y1="104" y2="104"/>
</g>
<g>
<line x1="348" x2="348" y1="232" y2="296"/>
<line x1="348" x2="364" y1="232" y2="232"/>
<line x1="348" x2="516" y1="296" y2="296"/>
<line x1="364" x2="436" y1="232" y2="232"/>
<line x1="436" x2="516" y1="232" y2="232"/>
<line x1="516" x2="516" y1="232" y2="296"/>
</g>
<g>
<line x1="364" x2="364" y1="40" y2="56"/>
<line x1="364" x2="508" y1="40" y2="40"/>
<line x1="364" x2="360" y1="56" y2="56"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="364" x2="364" y1="192" y2="220"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="436" x2="436" y1="192" y2="220"/>
</g>
<g>
<text x="57" y="268">
Neighborhood
</text>
</g>
<g>
<text x="65" y="76">
Validator
</text>
</g>
<g>
<text x="145" y="76">
1
</text>
</g>
<g>
<text x="161" y="268">
1
</text>
</g>
<g>
<text x="217" y="44">
Neighborhood
</text>
</g>
<g>
<text x="321" y="44">
0
</text>
</g>
<g>
<text x="377" y="268">
Neighborhood
</text>
</g>
<g>
<text x="393" y="76">
Validator
</text>
</g>
<g>
<text x="473" y="76">
2
</text>
</g>
<g>
<text x="481" y="268">
2
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -0,0 +1,322 @@
<svg class="bob" font-family="arial" font-size="14" height="400" width="856" 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="400" width="856" x="0" y="0"/>
<g>
<line x1="4" x2="4" y1="8" y2="152"/>
<line x1="4" x2="852" y1="8" y2="8"/>
<line x1="4" x2="852" y1="152" y2="152"/>
<line x1="852" x2="852" y1="8" y2="152"/>
</g>
<g>
<line x1="4" x2="4" y1="248" y2="392"/>
<line x1="4" x2="852" y1="248" y2="248"/>
<line x1="4" x2="852" y1="392" y2="392"/>
<line x1="852" x2="852" y1="248" y2="392"/>
</g>
<g>
<line x1="60" x2="60" y1="56" y2="120"/>
<line x1="60" x2="196" y1="56" y2="56"/>
<line x1="60" x2="84" y1="120" y2="120"/>
<line x1="84" x2="84" y1="120" y2="144"/>
<line x1="84" x2="196" y1="120" y2="120"/>
<line x1="196" x2="196" y1="56" y2="72"/>
<line x1="196" x2="196" y1="72" y2="104"/>
<line marker-end="url(#triangle)" x1="196" x2="252" y1="72" y2="72"/>
<line x1="196" x2="196" y1="104" y2="120"/>
<line x1="196" x2="200" y1="104" y2="104"/>
</g>
<g>
<line x1="60" x2="60" y1="296" y2="360"/>
<line x1="60" x2="84" y1="296" y2="296"/>
<line x1="60" x2="196" y1="360" y2="360"/>
<line x1="84" x2="196" y1="296" y2="296"/>
<line x1="196" x2="196" y1="296" y2="312"/>
<line x1="196" x2="196" y1="312" y2="344"/>
<line marker-end="url(#triangle)" x1="196" x2="252" y1="312" y2="312"/>
<line x1="196" x2="196" y1="344" y2="360"/>
<line x1="196" x2="200" y1="344" y2="344"/>
</g>
<g>
<line x1="84" x2="84" y1="160" y2="240"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="84" x2="84" y1="256" y2="284"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="208" x2="204" y1="104" y2="104"/>
<line x1="208" x2="260" y1="104" y2="104"/>
<line x1="260" x2="260" y1="72" y2="104"/>
<line x1="260" x2="260" y1="104" y2="120"/>
<line x1="260" x2="284" y1="120" y2="120"/>
<line x1="284" x2="284" y1="120" y2="144"/>
<line x1="284" x2="396" y1="120" y2="120"/>
<line x1="396" x2="396" y1="104" y2="120"/>
<line x1="396" x2="400" y1="104" y2="104"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="208" x2="204" y1="344" y2="344"/>
<line x1="208" x2="260" y1="344" y2="344"/>
<line x1="260" x2="260" y1="312" y2="344"/>
<line x1="260" x2="260" y1="344" y2="360"/>
<line x1="260" x2="396" y1="360" y2="360"/>
<line x1="396" x2="396" y1="344" y2="360"/>
<line x1="396" x2="400" y1="344" y2="344"/>
</g>
<g>
<line x1="260" x2="260" y1="56" y2="72"/>
<line x1="260" x2="396" y1="56" y2="56"/>
<line x1="260" x2="256" y1="72" y2="72"/>
<line x1="396" x2="396" y1="56" y2="72"/>
<line x1="396" x2="396" y1="72" y2="104"/>
<line marker-end="url(#triangle)" x1="396" x2="452" y1="72" y2="72"/>
</g>
<g>
<line x1="260" x2="260" y1="296" y2="312"/>
<line x1="260" x2="284" y1="296" y2="296"/>
<line x1="260" x2="256" y1="312" y2="312"/>
<line x1="284" x2="396" y1="296" y2="296"/>
<line x1="396" x2="396" y1="296" y2="312"/>
<line x1="396" x2="396" y1="312" y2="344"/>
<line marker-end="url(#triangle)" x1="396" x2="452" y1="312" y2="312"/>
</g>
<g>
<line x1="284" x2="284" y1="160" y2="240"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="284" x2="284" y1="256" y2="284"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="408" x2="404" y1="104" y2="104"/>
<line x1="408" x2="460" y1="104" y2="104"/>
<line x1="460" x2="460" y1="72" y2="104"/>
<line x1="460" x2="460" y1="104" y2="120"/>
<line x1="460" x2="508" y1="120" y2="120"/>
<line x1="508" x2="508" y1="120" y2="144"/>
<line x1="508" x2="596" y1="120" y2="120"/>
<line x1="596" x2="596" y1="104" y2="120"/>
<line x1="596" x2="600" y1="104" y2="104"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="408" x2="404" y1="344" y2="344"/>
<line x1="408" x2="460" y1="344" y2="344"/>
<line x1="460" x2="460" y1="312" y2="344"/>
<line x1="460" x2="460" y1="344" y2="360"/>
<line x1="460" x2="596" y1="360" y2="360"/>
<line x1="596" x2="596" y1="344" y2="360"/>
<line x1="596" x2="600" y1="344" y2="344"/>
</g>
<g>
<line x1="460" x2="460" y1="56" y2="72"/>
<line x1="460" x2="596" y1="56" y2="56"/>
<line x1="460" x2="456" y1="72" y2="72"/>
<line x1="596" x2="596" y1="56" y2="72"/>
<line x1="596" x2="596" y1="72" y2="104"/>
<line marker-end="url(#triangle)" x1="596" x2="652" y1="72" y2="72"/>
</g>
<g>
<line x1="460" x2="460" y1="296" y2="312"/>
<line x1="460" x2="508" y1="296" y2="296"/>
<line x1="460" x2="456" y1="312" y2="312"/>
<line x1="508" x2="596" y1="296" y2="296"/>
<line x1="596" x2="596" y1="296" y2="312"/>
<line x1="596" x2="596" y1="312" y2="344"/>
<line marker-end="url(#triangle)" x1="596" x2="652" y1="312" y2="312"/>
</g>
<g>
<line x1="508" x2="508" y1="160" y2="240"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="508" x2="508" y1="256" y2="284"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="608" x2="604" y1="104" y2="104"/>
<line x1="608" x2="660" y1="104" y2="104"/>
<line x1="660" x2="660" y1="72" y2="104"/>
<line x1="660" x2="660" y1="104" y2="120"/>
<line x1="660" x2="684" y1="120" y2="120"/>
<line x1="684" x2="684" y1="120" y2="144"/>
<line x1="684" x2="796" y1="120" y2="120"/>
<line x1="796" x2="796" y1="56" y2="120"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="608" x2="604" y1="344" y2="344"/>
<line x1="608" x2="660" y1="344" y2="344"/>
<line x1="660" x2="660" y1="312" y2="344"/>
<line x1="660" x2="660" y1="344" y2="360"/>
<line x1="660" x2="796" y1="360" y2="360"/>
<line x1="796" x2="796" y1="296" y2="360"/>
</g>
<g>
<line x1="660" x2="660" y1="56" y2="72"/>
<line x1="660" x2="796" y1="56" y2="56"/>
<line x1="660" x2="656" y1="72" y2="72"/>
</g>
<g>
<line x1="660" x2="660" y1="296" y2="312"/>
<line x1="660" x2="684" y1="296" y2="296"/>
<line x1="660" x2="656" y1="312" y2="312"/>
<line x1="684" x2="796" y1="296" y2="296"/>
</g>
<g>
<line x1="684" x2="684" y1="160" y2="240"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="684" x2="684" y1="256" y2="284"/>
</g>
<g>
<text x="89" y="92">
Neighbor
</text>
</g>
<g>
<text x="89" y="332">
Neighbor
</text>
</g>
<g>
<text x="161" y="92">
1
</text>
</g>
<g>
<text x="161" y="332">
1
</text>
</g>
<g>
<text x="289" y="92">
Neighbor
</text>
</g>
<g>
<text x="289" y="332">
Neighbor
</text>
</g>
<g>
<text x="353" y="28">
Neighborhood
</text>
</g>
<g>
<text x="353" y="268">
Neighborhood
</text>
</g>
<g>
<text x="361" y="92">
2
</text>
</g>
<g>
<text x="361" y="332">
2
</text>
</g>
<g>
<text x="457" y="28">
Above
</text>
</g>
<g>
<text x="457" y="268">
Below
</text>
</g>
<g>
<text x="489" y="92">
Neighbor
</text>
</g>
<g>
<text x="489" y="332">
Neighbor
</text>
</g>
<g>
<text x="561" y="92">
3
</text>
</g>
<g>
<text x="561" y="332">
3
</text>
</g>
<g>
<text x="689" y="92">
Neighbor
</text>
</g>
<g>
<text x="689" y="332">
Neighbor
</text>
</g>
<g>
<text x="761" y="92">
4
</text>
</g>
<g>
<text x="761" y="332">
4
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

@ -0,0 +1,138 @@
<svg class="bob" font-family="arial" font-size="14" height="240" width="544" 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="240" width="544" x="0" y="0"/>
<g>
<line x1="4" x2="4" y1="104" y2="232"/>
<line x1="4" x2="108" y1="104" y2="104"/>
<line x1="4" x2="540" y1="232" y2="232"/>
<line x1="108" x2="436" y1="104" y2="104"/>
<line x1="436" x2="540" y1="104" y2="104"/>
<line x1="540" x2="540" y1="104" y2="232"/>
</g>
<g>
<line x1="36" x2="36" y1="136" y2="200"/>
<line x1="36" x2="180" y1="136" y2="136"/>
<line x1="36" x2="180" y1="200" y2="200"/>
<line x1="180" x2="180" y1="136" y2="152"/>
<line x1="180" x2="180" y1="152" y2="184"/>
<line marker-end="url(#triangle)" x1="180" x2="356" y1="152" y2="152"/>
<line x1="180" x2="180" y1="184" y2="200"/>
<line x1="180" x2="184" y1="184" y2="184"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="108" x2="108" y1="40" y2="92"/>
<line x1="108" x2="212" y1="40" y2="40"/>
<line x1="212" x2="212" y1="8" y2="40"/>
<line x1="212" x2="332" y1="8" y2="8"/>
<line x1="212" x2="212" y1="40" y2="72"/>
<line x1="212" x2="332" y1="72" y2="72"/>
<line x1="332" x2="332" y1="8" y2="40"/>
<line x1="332" x2="332" y1="40" y2="72"/>
<line x1="332" x2="436" y1="40" y2="40"/>
<line marker-end="url(#triangle)" x1="436" x2="436" y1="40" y2="92"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="192" x2="188" y1="184" y2="184"/>
<line x1="192" x2="364" y1="184" y2="184"/>
<line x1="364" x2="364" y1="152" y2="184"/>
<line x1="364" x2="364" y1="184" y2="200"/>
<line x1="364" x2="508" y1="200" y2="200"/>
<line x1="508" x2="508" y1="136" y2="200"/>
</g>
<g>
<line x1="364" x2="364" y1="136" y2="152"/>
<line x1="364" x2="508" y1="136" y2="136"/>
<line x1="364" x2="360" y1="152" y2="152"/>
</g>
<g>
<text x="65" y="172">
Validator
</text>
</g>
<g>
<text x="145" y="172">
1
</text>
</g>
<g>
<text x="217" y="140">
Neighborhood
</text>
</g>
<g>
<text x="249" y="44">
Leader
</text>
</g>
<g>
<text x="321" y="140">
0
</text>
</g>
<g>
<text x="393" y="172">
Validator
</text>
</g>
<g>
<text x="473" y="172">
2
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -0,0 +1,192 @@
<svg class="bob" font-family="arial" font-size="14" height="288" width="736" 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="288" width="736" x="0" y="0"/>
<g>
<line x1="4" x2="4" y1="216" y2="280"/>
<line x1="4" x2="156" y1="216" y2="216"/>
<line x1="4" x2="172" y1="280" y2="280"/>
<line x1="156" x2="172" y1="216" y2="216"/>
<line x1="172" x2="172" y1="216" y2="280"/>
</g>
<g>
<line x1="124" x2="124" y1="104" y2="168"/>
<line x1="124" x2="204" y1="104" y2="104"/>
<line x1="124" x2="156" y1="168" y2="168"/>
<line marker-end="url(#triangle)" x1="156" x2="156" y1="168" y2="204"/>
<line x1="156" x2="204" y1="168" y2="168"/>
<line x1="204" x2="292" y1="104" y2="104"/>
<line marker-end="url(#triangle)" x1="204" x2="204" y1="168" y2="204"/>
<line x1="204" x2="292" y1="168" y2="168"/>
<line x1="292" x2="292" y1="104" y2="168"/>
</g>
<g>
<line x1="188" x2="188" y1="216" y2="280"/>
<line x1="188" x2="204" y1="216" y2="216"/>
<line x1="188" x2="356" y1="280" y2="280"/>
<line x1="204" x2="356" y1="216" y2="216"/>
<line x1="356" x2="356" y1="216" y2="280"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="204" x2="204" y1="40" y2="92"/>
<line x1="204" x2="276" y1="40" y2="40"/>
<line x1="276" x2="276" y1="8" y2="40"/>
<line x1="276" x2="444" y1="8" y2="8"/>
<line x1="276" x2="276" y1="40" y2="72"/>
<line x1="276" x2="444" y1="72" y2="72"/>
<line x1="444" x2="444" y1="8" y2="40"/>
<line x1="444" x2="444" y1="40" y2="72"/>
<line x1="444" x2="532" y1="40" y2="40"/>
<line marker-end="url(#triangle)" x1="532" x2="532" y1="40" y2="92"/>
</g>
<g>
<line x1="380" x2="380" y1="216" y2="280"/>
<line x1="380" x2="532" y1="216" y2="216"/>
<line x1="380" x2="548" y1="280" y2="280"/>
<line x1="532" x2="548" y1="216" y2="216"/>
<line x1="548" x2="548" y1="216" y2="280"/>
</g>
<g>
<line x1="444" x2="444" y1="104" y2="168"/>
<line x1="444" x2="532" y1="104" y2="104"/>
<line x1="444" x2="532" y1="168" y2="168"/>
<line x1="532" x2="612" y1="104" y2="104"/>
<line marker-end="url(#triangle)" x1="532" x2="532" y1="168" y2="204"/>
<line x1="532" x2="580" y1="168" y2="168"/>
<line marker-end="url(#triangle)" x1="580" x2="580" y1="168" y2="204"/>
<line x1="580" x2="612" y1="168" y2="168"/>
<line x1="612" x2="612" y1="104" y2="168"/>
</g>
<g>
<line x1="564" x2="564" y1="216" y2="280"/>
<line x1="564" x2="580" y1="216" y2="216"/>
<line x1="564" x2="732" y1="280" y2="280"/>
<line x1="580" x2="732" y1="216" y2="216"/>
<line x1="732" x2="732" y1="216" y2="280"/>
</g>
<g>
<text x="33" y="252">
Neighborhood
</text>
</g>
<g>
<text x="137" y="252">
3
</text>
</g>
<g>
<text x="153" y="140">
Neighborhood
</text>
</g>
<g>
<text x="217" y="252">
Neighborhood
</text>
</g>
<g>
<text x="257" y="140">
1
</text>
</g>
<g>
<text x="305" y="44">
Neighborhood
</text>
</g>
<g>
<text x="321" y="252">
4
</text>
</g>
<g>
<text x="409" y="44">
0
</text>
</g>
<g>
<text x="409" y="252">
Neighborhood
</text>
</g>
<g>
<text x="473" y="140">
Neighborhood
</text>
</g>
<g>
<text x="513" y="252">
5
</text>
</g>
<g>
<text x="577" y="140">
2
</text>
</g>
<g>
<text x="593" y="252">
Neighborhood
</text>
</g>
<g>
<text x="697" y="252">
6
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -0,0 +1,330 @@
<svg class="bob" font-family="arial" font-size="14" height="208" width="768" 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="208" width="768" x="0" y="0"/>
<g>
<line marker-end="url(#triangle)" x1="76" x2="76" y1="32" y2="172"/>
</g>
<g>
<line x1="124" x2="124" y1="24" y2="56"/>
<line x1="124" x2="164" y1="24" y2="24"/>
<line x1="124" x2="124" y1="56" y2="88"/>
<line x1="124" x2="164" y1="56" y2="56"/>
<line x1="124" x2="124" y1="88" y2="120"/>
<line x1="124" x2="164" y1="88" y2="88"/>
<line x1="124" x2="124" y1="120" y2="152"/>
<line x1="124" x2="164" y1="120" y2="120"/>
<line x1="124" x2="124" y1="152" y2="184"/>
<line x1="124" x2="164" y1="152" y2="152"/>
<line x1="124" x2="164" y1="184" y2="184"/>
<line x1="164" x2="164" y1="24" y2="56"/>
<line x1="164" x2="164" y1="56" y2="88"/>
<line x1="164" x2="164" y1="88" y2="120"/>
<line x1="164" x2="164" y1="120" y2="152"/>
<line x1="164" x2="164" y1="152" y2="184"/>
</g>
<g>
<line x1="188" x2="188" y1="144" y2="160"/>
</g>
<g>
<line x1="200" x2="208" y1="128" y2="112"/>
</g>
<g>
<line x1="224" x2="236" y1="112" y2="136"/>
</g>
<g>
<line x1="232" x2="240" y1="96" y2="80"/>
</g>
<g>
<line x1="236" x2="236" y1="144" y2="160"/>
</g>
<g>
<line x1="260" x2="260" y1="144" y2="160"/>
</g>
<g>
<line x1="264" x2="272" y1="64" y2="48"/>
</g>
<g>
<line x1="272" x2="280" y1="80" y2="96"/>
</g>
<g>
<line x1="272" x2="280" y1="128" y2="112"/>
</g>
<g>
<line x1="304" x2="316" y1="112" y2="136"/>
</g>
<g>
<line x1="316" x2="316" y1="144" y2="160"/>
</g>
<g>
<line x1="348" x2="360" y1="136" y2="112"/>
</g>
<g>
<line x1="348" x2="348" y1="144" y2="160"/>
</g>
<g>
<line x1="368" x2="376" y1="96" y2="80"/>
</g>
<g>
<line x1="376" x2="384" y1="48" y2="64"/>
</g>
<g>
<line x1="376" x2="388" y1="112" y2="136"/>
</g>
<g>
<line x1="388" x2="388" y1="144" y2="160"/>
</g>
<g>
<line x1="416" x2="424" y1="80" y2="96"/>
</g>
<g>
<line x1="420" x2="420" y1="144" y2="160"/>
</g>
<g>
<line x1="436" x2="420" y1="104" y2="136"/>
</g>
<g>
<line x1="448" x2="460" y1="112" y2="136"/>
</g>
<g>
<line x1="460" x2="460" y1="144" y2="160"/>
</g>
<g>
<line x1="512" x2="640" y1="24" y2="24"/>
</g>
<g>
<text x="17" y="108">
time
</text>
</g>
<g>
<text x="137" y="44">
L1
</text>
</g>
<g>
<text x="137" y="76">
L2
</text>
</g>
<g>
<text x="137" y="108">
L3
</text>
</g>
<g>
<text x="137" y="140">
L4
</text>
</g>
<g>
<text x="137" y="172">
L5
</text>
</g>
<g>
<text x="185" y="140">
x
</text>
</g>
<g>
<text x="185" y="172">
xx
</text>
</g>
<g>
<text x="209" y="108">
E3
</text>
</g>
<g>
<text x="225" y="172">
xx
</text>
</g>
<g>
<text x="249" y="76">
E2
</text>
</g>
<g>
<text x="257" y="140">
E4
</text>
</g>
<g>
<text x="257" y="172">
xx
</text>
</g>
<g>
<text x="289" y="108">
x
</text>
</g>
<g>
<text x="305" y="172">
E5
</text>
</g>
<g>
<text x="313" y="44">
E1
</text>
</g>
<g>
<text x="337" y="172">
xx
</text>
</g>
<g>
<text x="361" y="108">
E3&#39;
</text>
</g>
<g>
<text x="377" y="172">
xx
</text>
</g>
<g>
<text x="393" y="76">
x
</text>
</g>
<g>
<text x="409" y="172">
xx
</text>
</g>
<g>
<text x="449" y="172">
xx
</text>
</g>
<g>
<text x="513" y="12">
validator
</text>
</g>
<g>
<text x="513" y="60">
vote(E1)
</text>
</g>
<g>
<text x="513" y="92">
vote(E2)
</text>
</g>
<g>
<text x="513" y="124">
slash(E3)
</text>
</g>
<g>
<text x="513" y="156">
vote(E4)
</text>
</g>
<g>
<text x="513" y="188">
hang
</text>
</g>
<g>
<text x="553" y="188">
on
</text>
</g>
<g>
<text x="577" y="188">
to
</text>
</g>
<g>
<text x="593" y="12">
action
</text>
</g>
<g>
<text x="601" y="188">
E4
</text>
</g>
<g>
<text x="625" y="188">
and
</text>
</g>
<g>
<text x="657" y="188">
E5
</text>
</g>
<g>
<text x="681" y="188">
for
</text>
</g>
<g>
<text x="713" y="188">
more...
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -0,0 +1,92 @@
<svg class="bob" font-family="arial" font-size="14" height="144" width="48" 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="48" x="0" y="0"/>
<g>
<line x1="20" x2="24" y1="88" y2="80"/>
<line x1="20" x2="20" y1="96" y2="88"/>
<line x1="20" x2="20" y1="96" y2="128"/>
<line x1="24" x2="40" y1="80" y2="48"/>
</g>
<g>
<line x1="44" x2="44" y1="16" y2="32"/>
</g>
<g>
<line x1="44" x2="44" y1="48" y2="96"/>
</g>
<g>
<text x="17" y="140">
5
</text>
</g>
<g>
<text x="41" y="12">
1
</text>
</g>
<g>
<text x="41" y="44">
2
</text>
</g>
<g>
<text x="41" y="108">
4
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,92 @@
<svg class="bob" font-family="arial" font-size="14" height="176" width="40" 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="176" width="40" x="0" y="0"/>
<g>
<line x1="12" x2="12" y1="16" y2="32"/>
</g>
<g>
<line x1="12" x2="12" y1="48" y2="128"/>
</g>
<g>
<line x1="16" x2="32" y1="48" y2="80"/>
<line x1="36" x2="32" y1="88" y2="80"/>
<line x1="36" x2="36" y1="96" y2="88"/>
<line x1="36" x2="36" y1="96" y2="160"/>
</g>
<g>
<text x="9" y="12">
1
</text>
</g>
<g>
<text x="9" y="44">
3
</text>
</g>
<g>
<text x="9" y="140">
6
</text>
</g>
<g>
<text x="33" y="172">
7
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,122 @@
<svg class="bob" font-family="arial" font-size="14" height="208" width="96" 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="208" width="96" x="0" y="0"/>
<g>
<line x1="20" x2="24" y1="88" y2="80"/>
<line x1="20" x2="20" y1="96" y2="88"/>
<line x1="20" x2="20" y1="96" y2="128"/>
<line x1="24" x2="40" y1="80" y2="48"/>
</g>
<g>
<line x1="44" x2="44" y1="16" y2="32"/>
</g>
<g>
<line x1="44" x2="44" y1="48" y2="96"/>
</g>
<g>
<line x1="48" x2="64" y1="16" y2="48"/>
<line x1="68" x2="64" y1="56" y2="48"/>
<line x1="68" x2="68" y1="64" y2="56"/>
</g>
<g>
<line x1="68" x2="68" y1="80" y2="160"/>
</g>
<g>
<line x1="72" x2="80" y1="80" y2="96"/>
<line x1="80" x2="88" y1="96" y2="112"/>
<line x1="92" x2="88" y1="120" y2="112"/>
<line x1="92" x2="92" y1="128" y2="120"/>
<line x1="92" x2="92" y1="128" y2="192"/>
</g>
<g>
<text x="17" y="140">
5
</text>
</g>
<g>
<text x="41" y="12">
1
</text>
</g>
<g>
<text x="41" y="44">
2
</text>
</g>
<g>
<text x="41" y="108">
4
</text>
</g>
<g>
<text x="65" y="76">
3
</text>
</g>
<g>
<text x="65" y="172">
6
</text>
</g>
<g>
<text x="89" y="204">
7
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

View File

@ -0,0 +1,238 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1"
width="1320px" height="487px"
viewBox="0 0 1320 487"
xmlns="http://www.w3.org/2000/svg" shape-rendering="crispEdges"
stroke-width="1" text-rendering="geometricPrecision">
<polygon fill="white" points="101,7 161,7 161,16 101,16"/>
<text x="132" y="16" textLength="59" font-family="Helvetica" font-size="12" fill="black" text-anchor="middle">
VoteSigner
</text>
<polygon fill="white" points="371,7 419,7 419,16 371,16"/>
<text x="396" y="16" textLength="47" font-family="Helvetica" font-size="12" fill="black" text-anchor="middle">
Validator
</text>
<polygon fill="white" points="639,7 679,7 679,16 639,16"/>
<text x="660" y="16" textLength="38" font-family="Helvetica" font-size="12" fill="black" text-anchor="middle">
Cluster
</text>
<polygon fill="white" points="901,7 945,7 945,16 901,16"/>
<text x="924" y="16" textLength="43" font-family="Helvetica" font-size="12" fill="black" text-anchor="middle">
StakerX
</text>
<polygon fill="white" points="1165,7 1209,7 1209,16 1165,16"/>
<text x="1188" y="16" textLength="43" font-family="Helvetica" font-size="12" fill="black" text-anchor="middle">
StakerY
</text>
<line x1="132" y1="22" x2="132" y2="39" stroke="black"/>
<line x1="396" y1="22" x2="396" y2="39" stroke="black"/>
<line x1="660" y1="22" x2="660" y2="39" stroke="black"/>
<line x1="924" y1="22" x2="924" y2="39" stroke="black"/>
<line x1="1188" y1="22" x2="1188" y2="39" stroke="black"/>
<line x1="132" y1="39" x2="132" y2="67" stroke="black"/>
<line x1="396" y1="39" x2="396" y2="67" stroke="black"/>
<line x1="660" y1="39" x2="660" y2="67" stroke="black"/>
<line x1="924" y1="39" x2="924" y2="67" stroke="black"/>
<line x1="1188" y1="39" x2="1188" y2="67" stroke="black"/>
<polygon fill="white" points="272,39 520,39 520,61 272,61"/>
<line x1="272" y1="39" x2="520" y2="39" stroke="black"/>
<line x1="272" y1="61" x2="520" y2="61" stroke="black"/>
<line x1="272" y1="39" x2="272" y2="61" stroke="black"/>
<line x1="520" y1="39" x2="520" y2="61" stroke="black"/>
<polygon fill="white" points="379,46 411,46 411,55 379,55"/>
<text x="380" y="55" textLength="30" font-family="Helvetica" font-size="12" fill="black">
boot..
</text>
<line x1="132" y1="67" x2="132" y2="106" stroke="black"/>
<line x1="396" y1="67" x2="396" y2="106" stroke="black"/>
<line x1="660" y1="67" x2="660" y2="106" stroke="black"/>
<line x1="924" y1="67" x2="924" y2="106" stroke="black"/>
<line x1="1188" y1="67" x2="1188" y2="106" stroke="black"/>
<line x1="132" y1="82" x2="396" y2="82" stroke="black"/>
<line x1="132" y1="84" x2="396" y2="84" stroke="black"/>
<polygon fill="black" points="396,83 386,89 386,77"/>
<polygon fill="black" points="132,83 142,89 142,77"/>
<polygon fill="white" points="242,68 284,68 284,77 242,77"/>
<text x="243" y="77" textLength="40" font-family="Helvetica" font-size="12" fill="black">
register
</text>
<polygon fill="white" points="262,79 264,79 264,88 262,88"/>
<text x="263" y="88" textLength="0" font-family="Helvetica" font-size="12" fill="black">
</text>
<polygon fill="white" points="237,90 289,90 289,99 237,99"/>
<text x="238" y="99" textLength="50" font-family="Helvetica" font-size="12" fill="black">
(optional)
</text>
<line x1="132" y1="106" x2="132" y2="134" stroke="black"/>
<line x1="396" y1="106" x2="396" y2="134" stroke="black"/>
<line x1="660" y1="106" x2="660" y2="134" stroke="black"/>
<line x1="924" y1="106" x2="924" y2="134" stroke="black"/>
<line x1="1188" y1="106" x2="1188" y2="134" stroke="black"/>
<line x1="396" y1="117" x2="660" y2="117" stroke="black"/>
<polygon fill="black" points="660,117 650,123 650,111"/>
<polygon fill="white" points="441,107 613,107 613,116 441,116"/>
<text x="442" y="116" textLength="170" font-family="Helvetica" font-size="12" fill="black">
VoteState::Initialize(VoteSigner)
</text>
<line x1="132" y1="134" x2="132" y2="162" stroke="black"/>
<line x1="396" y1="134" x2="396" y2="162" stroke="black"/>
<line x1="660" y1="134" x2="660" y2="162" stroke="black"/>
<line x1="924" y1="134" x2="924" y2="162" stroke="black"/>
<line x1="1188" y1="134" x2="1188" y2="162" stroke="black"/>
<line x1="924" y1="145" x2="660" y2="145" stroke="black"/>
<polygon fill="black" points="660,145 670,151 670,139"/>
<polygon fill="white" points="706,135 877,135 877,144 706,144"/>
<text x="707" y="144" textLength="169" font-family="Helvetica" font-size="12" fill="black">
StakeState::Delegate(Validator)
</text>
<line x1="132" y1="162" x2="132" y2="190" stroke="black"/>
<line x1="396" y1="162" x2="396" y2="190" stroke="black"/>
<line x1="660" y1="162" x2="660" y2="190" stroke="black"/>
<line x1="924" y1="162" x2="924" y2="190" stroke="black"/>
<line x1="1188" y1="162" x2="1188" y2="190" stroke="black"/>
<line x1="1188" y1="173" x2="660" y2="173" stroke="black"/>
<polygon fill="black" points="660,173 670,179 670,167"/>
<polygon fill="white" points="838,163 1009,163 1009,172 838,172"/>
<text x="839" y="172" textLength="169" font-family="Helvetica" font-size="12" fill="black">
StakeState::Delegate(Validator)
</text>
<line x1="132" y1="190" x2="132" y2="207" stroke="black"/>
<line x1="396" y1="190" x2="396" y2="207" stroke="black"/>
<line x1="660" y1="190" x2="660" y2="207" stroke="black"/>
<line x1="924" y1="190" x2="924" y2="207" stroke="black"/>
<line x1="1188" y1="190" x2="1188" y2="207" stroke="black"/>
<line x1="132" y1="207" x2="132" y2="246" stroke="black"/>
<line x1="396" y1="207" x2="396" y2="246" stroke="black"/>
<line x1="660" y1="207" x2="660" y2="246" stroke="black"/>
<line x1="924" y1="207" x2="924" y2="246" stroke="black"/>
<line x1="1188" y1="207" x2="1188" y2="246" stroke="black"/>
<polygon fill="white" points="272,207 784,207 784,240 272,240"/>
<line x1="272" y1="207" x2="784" y2="207" stroke="black"/>
<line x1="272" y1="240" x2="784" y2="240" stroke="black"/>
<line x1="272" y1="207" x2="272" y2="240" stroke="black"/>
<line x1="784" y1="207" x2="784" y2="240" stroke="black"/>
<polygon fill="white" points="526,208 528,208 528,217 526,217"/>
<text x="527" y="217" textLength="0" font-family="Helvetica" font-size="12" fill="black">
</text>
<polygon fill="white" points="506,219 549,219 549,228 506,228"/>
<text x="507" y="228" textLength="41" font-family="Helvetica" font-size="12" fill="black">
validate
</text>
<polygon fill="white" points="526,230 528,230 528,239 526,239"/>
<text x="527" y="239" textLength="0" font-family="Helvetica" font-size="12" fill="black">
</text>
<line x1="132" y1="246" x2="132" y2="274" stroke="black"/>
<line x1="396" y1="246" x2="396" y2="274" stroke="black"/>
<line x1="660" y1="246" x2="660" y2="274" stroke="black"/>
<line x1="924" y1="246" x2="924" y2="274" stroke="black"/>
<line x1="1188" y1="246" x2="1188" y2="274" stroke="black"/>
<line x1="396" y1="257" x2="132" y2="257" stroke="black"/>
<polygon fill="black" points="132,257 142,263 142,251"/>
<polygon fill="white" points="236,247 291,247 291,256 236,256"/>
<text x="237" y="256" textLength="53" font-family="Helvetica" font-size="12" fill="black">
sign(vote)
</text>
<line x1="132" y1="274" x2="132" y2="302" stroke="black"/>
<line x1="396" y1="274" x2="396" y2="302" stroke="black"/>
<line x1="660" y1="274" x2="660" y2="302" stroke="black"/>
<line x1="924" y1="274" x2="924" y2="302" stroke="black"/>
<line x1="1188" y1="274" x2="1188" y2="302" stroke="black"/>
<line x1="132" y1="285" x2="396" y2="285" stroke="black" stroke-dasharray="2,2"/>
<polygon fill="black" points="396,285 386,291 386,279"/>
<polygon fill="white" points="232,275 295,275 295,284 232,284"/>
<text x="233" y="284" textLength="61" font-family="Helvetica" font-size="12" fill="black">
signed vote
</text>
<line x1="132" y1="302" x2="132" y2="330" stroke="black"/>
<line x1="396" y1="302" x2="396" y2="330" stroke="black"/>
<line x1="660" y1="302" x2="660" y2="330" stroke="black"/>
<line x1="924" y1="302" x2="924" y2="330" stroke="black"/>
<line x1="1188" y1="302" x2="1188" y2="330" stroke="black"/>
<line x1="396" y1="313" x2="660" y2="313" stroke="black"/>
<polygon fill="black" points="660,313 650,319 650,307"/>
<polygon fill="white" points="494,303 561,303 561,312 494,312"/>
<text x="495" y="312" textLength="65" font-family="Helvetica" font-size="12" fill="black">
gossip(vote)
</text>
<line x1="132" y1="330" x2="132" y2="347" stroke="black" stroke-dasharray="2,2"/>
<line x1="396" y1="330" x2="396" y2="347" stroke="black" stroke-dasharray="2,2"/>
<line x1="660" y1="330" x2="660" y2="347" stroke="black" stroke-dasharray="2,2"/>
<line x1="924" y1="330" x2="924" y2="347" stroke="black" stroke-dasharray="2,2"/>
<line x1="1188" y1="330" x2="1188" y2="347" stroke="black" stroke-dasharray="2,2"/>
<line x1="132" y1="347" x2="132" y2="364" stroke="black" stroke-dasharray="2,2"/>
<line x1="396" y1="347" x2="396" y2="364" stroke="black" stroke-dasharray="2,2"/>
<line x1="660" y1="347" x2="660" y2="364" stroke="black" stroke-dasharray="2,2"/>
<line x1="924" y1="347" x2="924" y2="364" stroke="black" stroke-dasharray="2,2"/>
<line x1="1188" y1="347" x2="1188" y2="364" stroke="black" stroke-dasharray="2,2"/>
<line x1="132" y1="364" x2="132" y2="414" stroke="black"/>
<line x1="396" y1="364" x2="396" y2="414" stroke="black"/>
<line x1="660" y1="364" x2="660" y2="414" stroke="black"/>
<line x1="924" y1="364" x2="924" y2="414" stroke="black"/>
<line x1="1188" y1="364" x2="1188" y2="414" stroke="black"/>
<polygon fill="white" points="278,364 514,364 514,408 278,408"/>
<polygon fill="white" points="278,364 278,408 272,386"/>
<polygon fill="white" points="514,364 514,408 520,386"/>
<line x1="278" y1="364" x2="514" y2="364" stroke="black"/>
<line x1="278" y1="408" x2="514" y2="408" stroke="black"/>
<line x1="278" y1="364" x2="272" y2="386" stroke="black"/>
<line x1="272" y1="386" x2="278" y2="408" stroke="black"/>
<line x1="514" y1="364" x2="520" y2="386" stroke="black"/>
<line x1="520" y1="386" x2="514" y2="408" stroke="black"/>
<polygon fill="white" points="394,365 396,365 396,374 394,374"/>
<text x="395" y="374" textLength="0" font-family="Helvetica" font-size="12" fill="black">
</text>
<polygon fill="white" points="383,376 408,376 408,385 383,385"/>
<text x="384" y="385" textLength="23" font-family="Helvetica" font-size="12" fill="black">
max
</text>
<polygon fill="white" points="375,387 415,387 415,396 375,396"/>
<text x="376" y="396" textLength="38" font-family="Helvetica" font-size="12" fill="black">
lockout
</text>
<polygon fill="white" points="394,398 396,398 396,407 394,407"/>
<text x="395" y="407" textLength="0" font-family="Helvetica" font-size="12" fill="black">
</text>
<line x1="132" y1="414" x2="132" y2="431" stroke="black"/>
<line x1="396" y1="414" x2="396" y2="431" stroke="black"/>
<line x1="660" y1="414" x2="660" y2="431" stroke="black"/>
<line x1="924" y1="414" x2="924" y2="431" stroke="black"/>
<line x1="1188" y1="414" x2="1188" y2="431" stroke="black"/>
<line x1="132" y1="431" x2="132" y2="459" stroke="black"/>
<line x1="396" y1="431" x2="396" y2="459" stroke="black"/>
<line x1="660" y1="431" x2="660" y2="459" stroke="black"/>
<line x1="924" y1="431" x2="924" y2="459" stroke="black"/>
<line x1="1188" y1="431" x2="1188" y2="459" stroke="black"/>
<line x1="924" y1="442" x2="660" y2="442" stroke="black"/>
<polygon fill="black" points="660,442 670,448 670,436"/>
<polygon fill="white" points="712,432 871,432 871,441 712,441"/>
<text x="713" y="441" textLength="157" font-family="Helvetica" font-size="12" fill="black">
StakeState::RedeemCredits()
</text>
<line x1="132" y1="459" x2="132" y2="487" stroke="black"/>
<line x1="396" y1="459" x2="396" y2="487" stroke="black"/>
<line x1="660" y1="459" x2="660" y2="487" stroke="black"/>
<line x1="924" y1="459" x2="924" y2="487" stroke="black"/>
<line x1="1188" y1="459" x2="1188" y2="487" stroke="black"/>
<line x1="1188" y1="470" x2="660" y2="470" stroke="black"/>
<polygon fill="black" points="660,470 670,476 670,464"/>
<polygon fill="white" points="844,460 1003,460 1003,469 844,469"/>
<text x="845" y="469" textLength="157" font-family="Helvetica" font-size="12" fill="black">
StakeState::RedeemCredits()
</text>
<line x1="132" y1="481" x2="132" y2="487" stroke="black"/>
<line x1="396" y1="481" x2="396" y2="487" stroke="black"/>
<line x1="660" y1="481" x2="660" y2="487" stroke="black"/>
<line x1="924" y1="481" x2="924" y2="487" stroke="black"/>
<line x1="1188" y1="481" x2="1188" y2="487" stroke="black"/>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,346 @@
<svg class="bob" font-family="arial" font-size="14" height="160" width="848" 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="160" width="848" 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="12" y2="52"/>
<path d="M 4 52 A 4 4 0 0 0 8 56" fill="none"/>
<path d="M 8 8 A 4 4 0 0 0 4 12" fill="none"/>
</g>
<g>
<line x1="8" x2="104" y1="8" y2="8"/>
<path d="M 108 12 A 4 4 0 0 0 104 8" fill="none"/>
</g>
<g>
<line x1="8" x2="104" y1="56" y2="56"/>
<path d="M 104 56 A 4 4 0 0 0 108 52" fill="none"/>
</g>
<g>
<line x1="36" x2="36" y1="92" y2="116"/>
<path d="M 36 116 A 4 4 0 0 0 40 120" fill="none"/>
<path d="M 40 88 A 4 4 0 0 0 36 92" fill="none"/>
</g>
<g>
<line x1="40" x2="160" y1="88" y2="88"/>
<path d="M 164 92 A 4 4 0 0 0 160 88" fill="none"/>
</g>
<g>
<line x1="40" x2="160" y1="120" y2="120"/>
<path d="M 160 120 A 4 4 0 0 0 164 116" fill="none"/>
</g>
<g>
<line x1="108" x2="108" y1="12" y2="24"/>
<line x1="108" x2="108" y1="24" y2="52"/>
<line marker-end="url(#triangle)" x1="108" x2="140" y1="24" y2="24"/>
</g>
<g>
<line x1="156" x2="156" y1="12" y2="36"/>
<path d="M 156 36 A 4 4 0 0 0 160 40" fill="none"/>
<path d="M 160 8 A 4 4 0 0 0 156 12" fill="none"/>
</g>
<g>
<line x1="160" x2="248" y1="8" y2="8"/>
<path d="M 252 12 A 4 4 0 0 0 248 8" fill="none"/>
</g>
<g>
<line x1="160" x2="248" y1="40" y2="40"/>
<path d="M 248 40 A 4 4 0 0 0 252 36" fill="none"/>
</g>
<g>
<line x1="164" x2="164" y1="92" y2="104"/>
<line x1="164" x2="164" y1="104" y2="116"/>
<line marker-end="url(#triangle)" x1="164" x2="196" y1="104" y2="104"/>
</g>
<g>
<line x1="204" x2="204" y1="92" y2="116"/>
<path d="M 204 116 A 4 4 0 0 0 208 120" fill="none"/>
<path d="M 208 88 A 4 4 0 0 0 204 92" fill="none"/>
</g>
<g>
<line x1="208" x2="280" y1="88" y2="88"/>
<path d="M 284 92 A 4 4 0 0 0 280 88" fill="none"/>
</g>
<g>
<line x1="208" x2="280" y1="120" y2="120"/>
<path d="M 280 120 A 4 4 0 0 0 284 116" fill="none"/>
</g>
<g>
<line x1="252" x2="252" y1="12" y2="24"/>
<line x1="252" x2="252" y1="24" y2="36"/>
<line marker-end="url(#triangle)" x1="252" x2="284" y1="24" y2="24"/>
</g>
<g>
<line x1="284" x2="284" y1="92" y2="104"/>
<line x1="284" x2="284" y1="104" y2="116"/>
<line marker-end="url(#triangle)" x1="284" x2="316" y1="104" y2="104"/>
</g>
<g>
<line x1="292" x2="292" y1="12" y2="36"/>
<path d="M 292 36 A 4 4 0 0 0 296 40" fill="none"/>
<path d="M 296 8 A 4 4 0 0 0 292 12" fill="none"/>
</g>
<g>
<line x1="296" x2="416" y1="8" y2="8"/>
<path d="M 420 12 A 4 4 0 0 0 416 8" fill="none"/>
</g>
<g>
<line x1="296" x2="416" y1="40" y2="40"/>
<path d="M 416 40 A 4 4 0 0 0 420 36" fill="none"/>
</g>
<g>
<line x1="324" x2="324" y1="92" y2="132"/>
<path d="M 324 132 A 4 4 0 0 0 328 136" fill="none"/>
<path d="M 328 88 A 4 4 0 0 0 324 92" fill="none"/>
</g>
<g>
<line x1="328" x2="424" y1="88" y2="88"/>
<path d="M 428 92 A 4 4 0 0 0 424 88" fill="none"/>
</g>
<g>
<line x1="328" x2="424" y1="136" y2="136"/>
<path d="M 424 136 A 4 4 0 0 0 428 132" fill="none"/>
</g>
<g>
<line x1="420" x2="420" y1="12" y2="24"/>
<line x1="420" x2="420" y1="24" y2="36"/>
<line marker-end="url(#triangle)" x1="420" x2="452" y1="24" y2="24"/>
</g>
<g>
<line x1="428" x2="428" y1="92" y2="104"/>
<line x1="428" x2="428" y1="104" y2="132"/>
<line marker-end="url(#triangle)" x1="428" x2="460" y1="104" y2="104"/>
</g>
<g>
<line x1="460" x2="460" y1="12" y2="36"/>
<path d="M 460 36 A 4 4 0 0 0 464 40" fill="none"/>
<path d="M 464 8 A 4 4 0 0 0 460 12" fill="none"/>
</g>
<g>
<line x1="464" x2="576" y1="8" y2="8"/>
<path d="M 580 12 A 4 4 0 0 0 576 8" fill="none"/>
</g>
<g>
<line x1="464" x2="576" y1="40" y2="40"/>
<path d="M 576 40 A 4 4 0 0 0 580 36" fill="none"/>
</g>
<g>
<line x1="468" x2="468" y1="92" y2="116"/>
<path d="M 468 116 A 4 4 0 0 0 472 120" fill="none"/>
<path d="M 472 88 A 4 4 0 0 0 468 92" fill="none"/>
</g>
<g>
<line x1="472" x2="608" y1="88" y2="88"/>
<path d="M 612 92 A 4 4 0 0 0 608 88" fill="none"/>
</g>
<g>
<line x1="472" x2="608" y1="120" y2="120"/>
<path d="M 608 120 A 4 4 0 0 0 612 116" fill="none"/>
</g>
<g>
<line x1="580" x2="580" y1="12" y2="24"/>
<line x1="580" x2="580" y1="24" y2="36"/>
<line marker-end="url(#triangle)" x1="580" x2="612" y1="24" y2="24"/>
</g>
<g>
<line x1="612" x2="612" y1="92" y2="104"/>
<line x1="612" x2="612" y1="104" y2="116"/>
<line marker-end="url(#triangle)" x1="612" x2="636" y1="104" y2="104"/>
</g>
<g>
<line x1="620" x2="620" y1="12" y2="36"/>
<path d="M 620 36 A 4 4 0 0 0 624 40" fill="none"/>
<path d="M 624 8 A 4 4 0 0 0 620 12" fill="none"/>
</g>
<g>
<line x1="624" x2="808" y1="8" y2="8"/>
<path d="M 812 12 A 4 4 0 0 0 808 8" fill="none"/>
</g>
<g>
<line x1="624" x2="808" y1="40" y2="40"/>
<path d="M 808 40 A 4 4 0 0 0 812 36" fill="none"/>
</g>
<g>
<line x1="644" x2="644" y1="92" y2="116"/>
<path d="M 644 116 A 4 4 0 0 0 648 120" fill="none"/>
<path d="M 648 88 A 4 4 0 0 0 644 92" fill="none"/>
</g>
<g>
<line x1="648" x2="784" y1="88" y2="88"/>
<path d="M 788 92 A 4 4 0 0 0 784 88" fill="none"/>
</g>
<g>
<line x1="648" x2="784" y1="120" y2="120"/>
<path d="M 784 120 A 4 4 0 0 0 788 116" fill="none"/>
</g>
<g>
<line x1="788" x2="788" y1="92" y2="116"/>
</g>
<g>
<line x1="812" x2="812" y1="12" y2="24"/>
<line x1="812" x2="812" y1="24" y2="36"/>
<line marker-end="url(#triangle)" x1="812" x2="844" y1="24" y2="24"/>
</g>
<g>
<text x="17" y="28">
PoH
</text>
</g>
<g>
<text x="49" y="28">
verify
</text>
</g>
<g>
<text x="49" y="44">
TVU
</text>
</g>
<g>
<text x="49" y="108">
load
</text>
</g>
<g>
<text x="89" y="108">
accounts
</text>
</g>
<g>
<text x="169" y="28">
sigverify
</text>
</g>
<g>
<text x="217" y="108">
execute
</text>
</g>
<g>
<text x="305" y="28">
lock
</text>
</g>
<g>
<text x="337" y="108">
PoH
</text>
</g>
<g>
<text x="345" y="28">
accounts
</text>
</g>
<g>
<text x="361" y="124">
TPU
</text>
</g>
<g>
<text x="369" y="108">
record
</text>
</g>
<g>
<text x="473" y="28">
validate
</text>
</g>
<g>
<text x="481" y="108">
commit
</text>
</g>
<g>
<text x="537" y="108">
accounts
</text>
</g>
<g>
<text x="545" y="28">
fee
</text>
</g>
<g>
<text x="633" y="28">
allocate
</text>
</g>
<g>
<text x="657" y="108">
unlock
</text>
</g>
<g>
<text x="705" y="28">
new
</text>
</g>
<g>
<text x="713" y="108">
accounts
</text>
</g>
<g>
<text x="737" y="28">
accounts
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -0,0 +1,237 @@
<svg class="bob" font-family="arial" font-size="14" height="320" width="560" xmlns="http://www.w3.org/2000/svg">
<defs>
<marker id="triangle" markerHeight="8" markerWidth="8" orient="auto" refX="4" refY="2" viewBox="0 0 8 4">
<polygon fill="black" points="0,0 0,4 8,2 0,0"/>
</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="320" width="560" x="0" y="0"/>
<g>
<line x1="20" x2="20" y1="140" y2="196"/>
<path d="M 20 196 A 4 4 0 0 0 24 200" fill="none"/>
<path d="M 24 136 A 4 4 0 0 0 20 140" fill="none"/>
</g>
<g>
<line x1="24" x2="104" y1="136" y2="136"/>
<path d="M 108 140 A 4 4 0 0 0 104 136" fill="none"/>
</g>
<g>
<line x1="24" x2="104" y1="200" y2="200"/>
<path d="M 104 200 A 4 4 0 0 0 108 196" fill="none"/>
</g>
<g>
<line x1="108" x2="108" y1="140" y2="152"/>
<line x1="108" x2="108" y1="152" y2="184"/>
<line x1="108" x2="176" y1="152" y2="152"/>
<line x1="108" x2="108" y1="184" y2="196"/>
<line x1="108" x2="176" y1="184" y2="184"/>
<path d="M 176 152 A 4 4 0 0 0 180 148" fill="none"/>
<path d="M 180 188 A 4 4 0 0 0 176 184" fill="none"/>
</g>
<g>
<line x1="180" x2="180" y1="108" y2="148"/>
<path d="M 184 104 A 4 4 0 0 0 180 108" fill="none"/>
</g>
<g>
<line x1="180" x2="180" y1="188" y2="244"/>
<path d="M 180 244 A 4 4 0 0 0 184 248" fill="none"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="184" x2="252" y1="104" y2="104"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="184" x2="252" y1="248" y2="248"/>
</g>
<g>
<line x1="228" x2="228" y1="28" y2="96"/>
<path d="M 232 24 A 4 4 0 0 0 228 28" fill="none"/>
</g>
<g>
<line x1="228" x2="228" y1="112" y2="240"/>
</g>
<g>
<line x1="228" x2="228" y1="256" y2="308"/>
<path d="M 228 308 A 4 4 0 0 0 232 312" fill="none"/>
</g>
<g>
<line x1="232" x2="552" y1="24" y2="24"/>
<path d="M 556 28 A 4 4 0 0 0 552 24" fill="none"/>
</g>
<g>
<line x1="232" x2="552" y1="312" y2="312"/>
<path d="M 552 312 A 4 4 0 0 0 556 308" fill="none"/>
</g>
<g>
<line x1="260" x2="260" y1="76" y2="132"/>
<path d="M 260 132 A 4 4 0 0 0 264 136" fill="none"/>
<path d="M 264 72 A 4 4 0 0 0 260 76" fill="none"/>
</g>
<g>
<line x1="260" x2="260" y1="220" y2="276"/>
<path d="M 260 276 A 4 4 0 0 0 264 280" fill="none"/>
<path d="M 264 216 A 4 4 0 0 0 260 220" fill="none"/>
</g>
<g>
<line x1="264" x2="360" y1="72" y2="72"/>
<path d="M 364 76 A 4 4 0 0 0 360 72" fill="none"/>
</g>
<g>
<line x1="264" x2="360" y1="136" y2="136"/>
<path d="M 360 136 A 4 4 0 0 0 364 132" fill="none"/>
</g>
<g>
<line x1="264" x2="316" y1="216" y2="216"/>
<line x1="316" x2="316" y1="188" y2="216"/>
<line x1="316" x2="360" y1="216" y2="216"/>
<path d="M 320 184 A 4 4 0 0 0 316 188" fill="none"/>
<path d="M 364 220 A 4 4 0 0 0 360 216" fill="none"/>
</g>
<g>
<line x1="264" x2="360" y1="280" y2="280"/>
<path d="M 360 280 A 4 4 0 0 0 364 276" fill="none"/>
</g>
<g>
<line x1="320" x2="448" y1="184" y2="184"/>
<path d="M 448 184 A 4 4 0 0 0 452 180" fill="none"/>
</g>
<g>
<line x1="364" x2="364" y1="76" y2="104"/>
<line x1="364" x2="364" y1="104" y2="132"/>
<line marker-end="url(#triangle)" x1="364" x2="388" y1="104" y2="104"/>
</g>
<g>
<line x1="364" x2="364" y1="220" y2="248"/>
<line x1="364" x2="364" y1="248" y2="276"/>
<line marker-end="url(#triangle)" x1="364" x2="388" y1="248" y2="248"/>
</g>
<g>
<line x1="396" x2="396" y1="76" y2="132"/>
<path d="M 396 132 A 4 4 0 0 0 400 136" fill="none"/>
<path d="M 400 72 A 4 4 0 0 0 396 76" fill="none"/>
</g>
<g>
<line x1="396" x2="396" y1="220" y2="276"/>
<path d="M 396 276 A 4 4 0 0 0 400 280" fill="none"/>
<path d="M 400 216 A 4 4 0 0 0 396 220" fill="none"/>
</g>
<g>
<line x1="400" x2="496" y1="72" y2="72"/>
<path d="M 500 76 A 4 4 0 0 0 496 72" fill="none"/>
</g>
<g>
<line x1="400" x2="496" y1="136" y2="136"/>
<path d="M 496 136 A 4 4 0 0 0 500 132" fill="none"/>
</g>
<g>
<line x1="400" x2="504" y1="216" y2="216"/>
<path d="M 508 220 A 4 4 0 0 0 504 216" fill="none"/>
</g>
<g>
<line x1="400" x2="504" y1="280" y2="280"/>
<path d="M 504 280 A 4 4 0 0 0 508 276" fill="none"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="452" x2="452" y1="160" y2="148"/>
<line x1="452" x2="452" y1="160" y2="180"/>
</g>
<g>
<line x1="500" x2="500" y1="76" y2="132"/>
</g>
<g>
<line x1="508" x2="508" y1="220" y2="276"/>
</g>
<g>
<line x1="556" x2="556" y1="28" y2="308"/>
</g>
<g>
<text x="41" y="172">
Client
</text>
</g>
<g>
<text x="281" y="108">
Verifier
</text>
</g>
<g>
<text x="281" y="252">
Loader
</text>
</g>
<g>
<text x="329" y="44">
Solana
</text>
</g>
<g>
<text x="337" y="172">
LoadAccounts
</text>
</g>
<g>
<text x="385" y="44">
Runtime
</text>
</g>
<g>
<text x="409" y="252">
Interpreter
</text>
</g>
<g>
<text x="417" y="108">
Accounts
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -0,0 +1,163 @@
<svg class="bob" font-family="arial" font-size="14" height="288" width="432" 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="288" width="432" x="0" y="0"/>
<g>
<line x1="12" x2="12" y1="248" y2="280"/>
<line x1="12" x2="140" y1="248" y2="248"/>
<line x1="12" x2="140" y1="280" y2="280"/>
<line x1="140" x2="140" y1="248" y2="280"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="112" x2="126" y1="240" y2="212"/>
</g>
<g>
<line x1="124" x2="124" y1="88" y2="120"/>
<line x1="124" x2="268" y1="88" y2="88"/>
<line x1="124" x2="268" y1="120" y2="120"/>
<line x1="268" x2="268" y1="88" y2="120"/>
</g>
<g>
<line x1="124" x2="124" y1="168" y2="200"/>
<line x1="124" x2="180" y1="168" y2="168"/>
<line x1="124" x2="180" y1="200" y2="200"/>
<line x1="180" x2="180" y1="168" y2="200"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="160" x2="174" y1="160" y2="132"/>
</g>
<g>
<line x1="172" x2="172" y1="248" y2="280"/>
<line x1="172" x2="300" y1="248" y2="248"/>
<line x1="172" x2="300" y1="280" y2="280"/>
<line x1="300" x2="300" y1="248" y2="280"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="184" x2="178" y1="224" y2="212"/>
<line x1="184" x2="192" y1="224" y2="240"/>
</g>
<g>
<line x1="212" x2="212" y1="168" y2="200"/>
<line x1="212" x2="428" y1="168" y2="168"/>
<line x1="212" x2="428" y1="200" y2="200"/>
<line x1="428" x2="428" y1="168" y2="200"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="224" x2="218" y1="144" y2="132"/>
<line x1="224" x2="232" y1="144" y2="160"/>
</g>
<g>
<line x1="236" x2="236" y1="8" y2="40"/>
<line x1="236" x2="340" y1="8" y2="8"/>
<line x1="236" x2="340" y1="40" y2="40"/>
<line x1="340" x2="340" y1="8" y2="40"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="248" x2="262" y1="80" y2="52"/>
</g>
<g>
<line x1="308" x2="308" y1="88" y2="120"/>
<line x1="308" x2="420" y1="88" y2="88"/>
<line x1="308" x2="420" y1="120" y2="120"/>
<line x1="420" x2="420" y1="88" y2="120"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="320" x2="314" y1="64" y2="52"/>
<line x1="320" x2="328" y1="64" y2="80"/>
</g>
<g>
<text x="25" y="268">
Hash(Account1)
</text>
</g>
<g>
<text x="137" y="108">
Bank-Diff-Merkle
</text>
</g>
<g>
<text x="137" y="188">
Hash
</text>
</g>
<g>
<text x="185" y="268">
Hash(Account2)
</text>
</g>
<g>
<text x="225" y="188">
Previous
</text>
</g>
<g>
<text x="249" y="28">
Bank-Merkle
</text>
</g>
<g>
<text x="297" y="188">
Bank-Diff-Merkle
</text>
</g>
<g>
<text x="321" y="108">
Block-Merkle
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,203 @@
<svg class="bob" font-family="arial" font-size="14" height="304" width="584" 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="304" width="584" x="0" y="0"/>
<g>
<line x1="12" x2="12" y1="248" y2="280"/>
<line x1="12" x2="156" y1="248" y2="248"/>
<line x1="12" x2="156" y1="280" y2="280"/>
<line x1="156" x2="156" y1="248" y2="280"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="128" x2="142" y1="240" y2="212"/>
</g>
<g>
<line x1="148" x2="148" y1="168" y2="200"/>
<line x1="148" x2="212" y1="168" y2="168"/>
<line x1="148" x2="212" y1="200" y2="200"/>
<line x1="212" x2="212" y1="168" y2="200"/>
</g>
<g>
<line x1="180" x2="180" y1="88" y2="120"/>
<line x1="180" x2="292" y1="88" y2="88"/>
<line x1="180" x2="292" y1="120" y2="120"/>
<line x1="292" x2="292" y1="88" y2="120"/>
</g>
<g>
<line x1="188" x2="188" y1="248" y2="280"/>
<line x1="188" x2="332" y1="248" y2="248"/>
<line x1="188" x2="332" y1="280" y2="280"/>
<line x1="332" x2="332" y1="248" y2="280"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="192" x2="206" y1="160" y2="132"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="212" x2="212" y1="224" y2="212"/>
<line x1="212" x2="212" y1="224" y2="240"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="264" x2="278" y1="80" y2="52"/>
</g>
<g>
<line x1="284" x2="284" y1="8" y2="40"/>
<line x1="284" x2="412" y1="8" y2="8"/>
<line x1="284" x2="412" y1="40" y2="40"/>
<line x1="412" x2="412" y1="8" y2="40"/>
</g>
<g>
<line x1="364" x2="364" y1="248" y2="280"/>
<line x1="364" x2="508" y1="248" y2="248"/>
<line x1="364" x2="508" y1="280" y2="280"/>
<line x1="508" x2="508" y1="248" y2="280"/>
</g>
<g>
<line x1="396" x2="396" y1="88" y2="120"/>
<line x1="396" x2="508" y1="88" y2="88"/>
<line x1="396" x2="508" y1="120" y2="120"/>
<line x1="508" x2="508" y1="88" y2="120"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="416" x2="410" y1="64" y2="52"/>
<line x1="416" x2="424" y1="64" y2="80"/>
</g>
<g>
<line x1="468" x2="468" y1="168" y2="200"/>
<line x1="468" x2="532" y1="168" y2="168"/>
<line x1="468" x2="532" y1="200" y2="200"/>
<line x1="532" x2="532" y1="168" y2="200"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="476" x2="476" y1="224" y2="212"/>
<line x1="476" x2="476" y1="224" y2="240"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="480" x2="474" y1="144" y2="132"/>
<line x1="480" x2="488" y1="144" y2="160"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="536" x2="530" y1="224" y2="212"/>
<line x1="536" x2="544" y1="224" y2="240"/>
</g>
<g>
<line x1="540" x2="540" y1="248" y2="280"/>
<line x1="540" x2="572" y1="248" y2="248"/>
<line x1="540" x2="572" y1="280" y2="280"/>
<line x1="572" x2="572" y1="248" y2="280"/>
</g>
<g>
<text x="25" y="268">
Hash(T1,
</text>
</g>
<g>
<text x="97" y="268">
status)
</text>
</g>
<g>
<text x="169" y="188">
Hash
</text>
</g>
<g>
<text x="193" y="108">
Entry-Merkle
</text>
</g>
<g>
<text x="201" y="268">
Hash(T2,
</text>
</g>
<g>
<text x="273" y="268">
status)
</text>
</g>
<g>
<text x="305" y="28">
Block-Merkle
</text>
</g>
<g>
<text x="377" y="268">
Hash(T3,
</text>
</g>
<g>
<text x="409" y="108">
Entry-Merkle
</text>
</g>
<g>
<text x="449" y="268">
status)
</text>
</g>
<g>
<text x="489" y="188">
Hash
</text>
</g>
<g>
<text x="553" y="268">
0
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -0,0 +1,312 @@
<svg class="bob" font-family="arial" font-size="14" height="304" width="696" 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="304" width="696" 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="16" x2="88" y1="136" y2="136"/>
<path d="M 92 140 A 4 4 0 0 0 88 136" fill="none"/>
</g>
<g>
<line x1="16" x2="88" y1="168" y2="168"/>
<path d="M 88 168 A 4 4 0 0 0 92 164" fill="none"/>
</g>
<g>
<line x1="92" x2="92" y1="140" y2="164"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="92" x2="124" y1="152" y2="152"/>
</g>
<g>
<line x1="108" x2="108" y1="92" y2="144"/>
<path d="M 112 88 A 4 4 0 0 0 108 92" fill="none"/>
</g>
<g>
<line x1="108" x2="108" y1="160" y2="212"/>
<path d="M 108 212 A 4 4 0 0 0 112 216" fill="none"/>
</g>
<g>
<line x1="112" x2="356" y1="88" y2="88"/>
<line x1="356" x2="396" y1="88" y2="88"/>
<line x1="396" x2="560" y1="88" y2="88"/>
<path d="M 564 92 A 4 4 0 0 0 560 88" fill="none"/>
</g>
<g>
<line x1="112" x2="380" y1="216" y2="216"/>
<line x1="380" x2="560" y1="216" y2="216"/>
<path d="M 560 216 A 4 4 0 0 0 564 212" fill="none"/>
</g>
<g>
<line x1="132" x2="132" y1="124" y2="180"/>
<path d="M 132 180 A 4 4 0 0 0 136 184" fill="none"/>
<path d="M 136 120 A 4 4 0 0 0 132 124" fill="none"/>
</g>
<g>
<line x1="136" x2="192" y1="120" y2="120"/>
<path d="M 196 124 A 4 4 0 0 0 192 120" fill="none"/>
</g>
<g>
<line x1="136" x2="192" y1="184" y2="184"/>
<path d="M 192 184 A 4 4 0 0 0 196 180" fill="none"/>
</g>
<g>
<line x1="196" x2="196" y1="124" y2="180"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="196" x2="212" y1="152" y2="152"/>
</g>
<g>
<line x1="220" x2="220" y1="124" y2="180"/>
<path d="M 220 180 A 4 4 0 0 0 224 184" fill="none"/>
<path d="M 224 120 A 4 4 0 0 0 220 124" fill="none"/>
</g>
<g>
<line x1="224" x2="312" y1="120" y2="120"/>
<path d="M 316 124 A 4 4 0 0 0 312 120" fill="none"/>
</g>
<g>
<line x1="224" x2="312" y1="184" y2="184"/>
<path d="M 312 184 A 4 4 0 0 0 316 180" fill="none"/>
</g>
<g>
<line x1="316" x2="316" y1="124" y2="180"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="316" x2="332" y1="152" y2="152"/>
</g>
<g>
<line x1="324" x2="324" y1="28" y2="52"/>
<path d="M 324 52 A 4 4 0 0 0 328 56" fill="none"/>
<path d="M 328 24 A 4 4 0 0 0 324 28" fill="none"/>
</g>
<g>
<line x1="328" 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="328" x2="396" y1="56" y2="56"/>
<line marker-end="url(#triangle)" x1="396" x2="396" y1="56" y2="108"/>
<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="124" y2="180"/>
<path d="M 340 180 A 4 4 0 0 0 344 184" fill="none"/>
<path d="M 344 120 A 4 4 0 0 0 340 124" fill="none"/>
</g>
<g>
<line x1="344" x2="356" y1="120" y2="120"/>
<line x1="356" x2="356" y1="80" y2="120"/>
<line x1="356" x2="416" y1="120" y2="120"/>
<path d="M 420 124 A 4 4 0 0 0 416 120" fill="none"/>
</g>
<g>
<line x1="344" x2="380" y1="184" y2="184"/>
<line marker-end="url(#triangle)" x1="380" x2="380" y1="184" y2="252"/>
<line x1="380" x2="416" y1="184" y2="184"/>
<path d="M 416 184 A 4 4 0 0 0 420 180" 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="268" y2="292"/>
<path d="M 356 292 A 4 4 0 0 0 360 296" fill="none"/>
<path d="M 360 264 A 4 4 0 0 0 356 268" fill="none"/>
</g>
<g>
<line x1="360" x2="408" y1="264" y2="264"/>
<path d="M 412 268 A 4 4 0 0 0 408 264" fill="none"/>
</g>
<g>
<line x1="360" x2="408" y1="296" y2="296"/>
<path d="M 408 296 A 4 4 0 0 0 412 292" fill="none"/>
</g>
<g>
<line x1="412" x2="412" y1="268" y2="292"/>
</g>
<g>
<line x1="420" x2="420" y1="124" y2="180"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="420" x2="436" y1="152" y2="152"/>
</g>
<g>
<line x1="436" x2="436" y1="28" y2="52"/>
</g>
<g>
<line x1="444" x2="444" y1="124" y2="180"/>
<path d="M 444 180 A 4 4 0 0 0 448 184" fill="none"/>
<path d="M 448 120 A 4 4 0 0 0 444 124" fill="none"/>
</g>
<g>
<line x1="448" x2="536" y1="120" y2="120"/>
<path d="M 540 124 A 4 4 0 0 0 536 120" fill="none"/>
</g>
<g>
<line x1="448" x2="536" y1="184" y2="184"/>
<path d="M 536 184 A 4 4 0 0 0 540 180" fill="none"/>
</g>
<g>
<line x1="540" x2="540" y1="124" y2="180"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="540" x2="580" y1="152" y2="152"/>
</g>
<g>
<line x1="564" x2="564" y1="92" y2="144"/>
</g>
<g>
<line x1="564" x2="564" y1="160" y2="212"/>
</g>
<g>
<line x1="588" x2="588" y1="124" y2="180"/>
<path d="M 588 180 A 4 4 0 0 0 592 184" fill="none"/>
<path d="M 592 120 A 4 4 0 0 0 588 124" fill="none"/>
</g>
<g>
<line x1="592" x2="688" y1="120" y2="120"/>
<path d="M 692 124 A 4 4 0 0 0 688 120" fill="none"/>
</g>
<g>
<line x1="592" x2="688" y1="184" y2="184"/>
<path d="M 688 184 A 4 4 0 0 0 692 180" fill="none"/>
</g>
<g>
<line x1="692" x2="692" y1="124" y2="180"/>
</g>
<g>
<text x="25" y="156">
Clients
</text>
</g>
<g>
<text x="121" y="108">
TPU
</text>
</g>
<g>
<text x="145" y="140">
Fetch
</text>
</g>
<g>
<text x="145" y="156">
Stage
</text>
</g>
<g>
<text x="233" y="140">
SigVerify
</text>
</g>
<g>
<text x="233" y="156">
Stage
</text>
</g>
<g>
<text x="337" y="44">
PoH
</text>
</g>
<g>
<text x="353" y="140">
Banking
</text>
</g>
<g>
<text x="353" y="156">
Stage
</text>
</g>
<g>
<text x="369" y="44">
Service
</text>
</g>
<g>
<text x="369" y="284">
Bank
</text>
</g>
<g>
<text x="457" y="140">
Broadcast
</text>
</g>
<g>
<text x="457" y="156">
Stage
</text>
</g>
<g>
<text x="601" y="140">
Downstream
</text>
</g>
<g>
<text x="601" y="156">
Validators
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@ -0,0 +1,311 @@
<svg class="bob" font-family="arial" font-size="14" height="352" width="616" 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="352" width="616" x="0" y="0"/>
<g>
<line x1="12" x2="12" y1="156" y2="196"/>
<path d="M 12 196 A 4 4 0 0 0 16 200" fill="none"/>
<path d="M 16 152 A 4 4 0 0 0 12 156" fill="none"/>
</g>
<g>
<line x1="16" x2="112" y1="152" y2="152"/>
<path d="M 116 156 A 4 4 0 0 0 112 152" fill="none"/>
</g>
<g>
<line x1="16" x2="112" y1="200" y2="200"/>
<path d="M 112 200 A 4 4 0 0 0 116 196" fill="none"/>
</g>
<g>
<line x1="116" x2="116" y1="156" y2="168"/>
<line x1="116" x2="116" y1="168" y2="196"/>
<line marker-end="url(#triangle)" x1="116" x2="164" y1="168" y2="168"/>
</g>
<g>
<line x1="148" x2="148" y1="92" y2="160"/>
<path d="M 152 88 A 4 4 0 0 0 148 92" fill="none"/>
</g>
<g>
<line x1="148" x2="148" y1="176" y2="244"/>
<path d="M 148 244 A 4 4 0 0 0 152 248" fill="none"/>
</g>
<g>
<line x1="152" x2="444" y1="88" y2="88"/>
<line x1="444" x2="608" y1="88" y2="88"/>
<path d="M 612 92 A 4 4 0 0 0 608 88" fill="none"/>
</g>
<g>
<line x1="152" x2="220" y1="248" y2="248"/>
<line x1="220" x2="308" y1="248" y2="248"/>
<line x1="308" x2="444" y1="248" y2="248"/>
<line x1="444" x2="608" y1="248" y2="248"/>
<path d="M 608 248 A 4 4 0 0 0 612 244" fill="none"/>
</g>
<g>
<line x1="172" x2="172" y1="140" y2="196"/>
<path d="M 172 196 A 4 4 0 0 0 176 200" fill="none"/>
<path d="M 176 136 A 4 4 0 0 0 172 140" fill="none"/>
</g>
<g>
<line x1="176" x2="232" y1="136" y2="136"/>
<path d="M 236 140 A 4 4 0 0 0 232 136" fill="none"/>
</g>
<g>
<line x1="176" x2="232" y1="200" y2="200"/>
<path d="M 232 200 A 4 4 0 0 0 236 196" fill="none"/>
</g>
<g>
<line x1="212" x2="212" y1="300" y2="340"/>
<path d="M 212 340 A 4 4 0 0 0 216 344" fill="none"/>
<path d="M 216 296 A 4 4 0 0 0 212 300" fill="none"/>
</g>
<g>
<line x1="216" x2="312" y1="344" y2="344"/>
<path d="M 312 344 A 4 4 0 0 0 316 340" fill="none"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="220" x2="220" y1="224" y2="212"/>
<line x1="220" x2="220" y1="224" y2="296"/>
<line x1="220" x2="216" y1="296" y2="296"/>
<line x1="220" x2="312" y1="296" y2="296"/>
<path d="M 316 300 A 4 4 0 0 0 312 296" fill="none"/>
</g>
<g>
<line x1="236" x2="236" y1="140" y2="168"/>
<line x1="236" x2="236" y1="168" y2="196"/>
<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="368" y1="136" y2="136"/>
<path d="M 372 140 A 4 4 0 0 0 368 136" fill="none"/>
</g>
<g>
<line x1="272" x2="308" y1="200" y2="200"/>
<line marker-end="url(#triangle)" x1="308" x2="308" y1="200" y2="284"/>
<line x1="308" 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="316" x2="316" y1="300" y2="340"/>
</g>
<g>
<line x1="372" x2="372" y1="140" y2="168"/>
<line x1="372" x2="372" y1="168" y2="196"/>
<line marker-end="url(#triangle)" x1="372" x2="396" y1="168" y2="168"/>
</g>
<g>
<line x1="404" x2="404" y1="12" y2="36"/>
<path d="M 404 36 A 4 4 0 0 0 408 40" fill="none"/>
<path d="M 408 8 A 4 4 0 0 0 404 12" fill="none"/>
</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="472" y1="8" y2="8"/>
<path d="M 476 12 A 4 4 0 0 0 472 8" fill="none"/>
</g>
<g>
<line x1="408" x2="472" y1="40" y2="40"/>
<path d="M 472 40 A 4 4 0 0 0 476 36" fill="none"/>
</g>
<g>
<line x1="408" x2="444" y1="136" y2="136"/>
<line x1="444" x2="444" y1="64" y2="136"/>
<line x1="444" x2="472" y1="136" y2="136"/>
<path d="M 476 140 A 4 4 0 0 0 472 136" fill="none"/>
</g>
<g>
<line x1="408" x2="444" y1="200" y2="200"/>
<line marker-end="url(#triangle)" x1="444" x2="444" y1="200" y2="284"/>
<line x1="444" x2="472" y1="200" y2="200"/>
<path d="M 472 200 A 4 4 0 0 0 476 196" fill="none"/>
</g>
<g>
<line x1="420" x2="420" y1="300" y2="324"/>
<path d="M 420 324 A 4 4 0 0 0 424 328" fill="none"/>
<path d="M 424 296 A 4 4 0 0 0 420 300" fill="none"/>
</g>
<g>
<line x1="424" x2="472" y1="296" y2="296"/>
<path d="M 476 300 A 4 4 0 0 0 472 296" fill="none"/>
</g>
<g>
<line x1="424" x2="472" y1="328" y2="328"/>
<path d="M 472 328 A 4 4 0 0 0 476 324" fill="none"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="444" x2="444" y1="64" y2="52"/>
</g>
<g>
<line x1="476" x2="476" y1="12" y2="36"/>
</g>
<g>
<line x1="476" x2="476" y1="140" y2="168"/>
<line x1="476" x2="476" y1="168" y2="196"/>
<line marker-end="url(#triangle)" x1="476" x2="500" y1="168" y2="168"/>
</g>
<g>
<line x1="476" x2="476" y1="300" y2="324"/>
</g>
<g>
<line x1="508" x2="508" y1="140" y2="196"/>
<path d="M 508 196 A 4 4 0 0 0 512 200" fill="none"/>
<path d="M 512 136 A 4 4 0 0 0 508 140" fill="none"/>
</g>
<g>
<line x1="512" x2="584" y1="136" y2="136"/>
<path d="M 588 140 A 4 4 0 0 0 584 136" fill="none"/>
</g>
<g>
<line x1="512" x2="584" y1="200" y2="200"/>
<path d="M 584 200 A 4 4 0 0 0 588 196" fill="none"/>
</g>
<g>
<line x1="588" x2="588" y1="140" y2="196"/>
</g>
<g>
<line x1="612" x2="612" y1="92" y2="244"/>
</g>
<g>
<text x="25" y="172">
Upstream
</text>
</g>
<g>
<text x="25" y="188">
Validators
</text>
</g>
<g>
<text x="169" y="108">
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="225" y="316">
Gossip
</text>
</g>
<g>
<text x="225" y="332">
Service
</text>
</g>
<g>
<text x="281" y="156">
Retransmit
</text>
</g>
<g>
<text x="281" y="172">
Stage
</text>
</g>
<g>
<text x="417" y="28">
Leader
</text>
</g>
<g>
<text x="417" y="156">
Replay
</text>
</g>
<g>
<text x="417" y="172">
Stage
</text>
</g>
<g>
<text x="433" y="316">
Bank
</text>
</g>
<g>
<text x="521" y="156">
Storage
</text>
</g>
<g>
<text x="521" y="172">
Stage
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -0,0 +1,496 @@
<svg class="bob" font-family="arial" font-size="14" height="960" width="528" 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="960" width="528" x="0" y="0"/>
<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="80" y1="184" y2="184"/>
<path d="M 84 188 A 4 4 0 0 0 80 184" fill="none"/>
</g>
<g>
<line x1="16" x2="80" y1="216" y2="216"/>
<path d="M 80 216 A 4 4 0 0 0 84 212" fill="none"/>
</g>
<g>
<line x1="20" x2="20" y1="748" y2="788"/>
<path d="M 20 788 A 4 4 0 0 0 24 792" fill="none"/>
<path d="M 24 744 A 4 4 0 0 0 20 748" fill="none"/>
</g>
<g>
<line x1="24" x2="80" y1="744" y2="744"/>
<path d="M 84 748 A 4 4 0 0 0 80 744" fill="none"/>
</g>
<g>
<line x1="24" x2="80" y1="792" y2="792"/>
<path d="M 80 792 A 4 4 0 0 0 84 788" fill="none"/>
</g>
<g>
<line x1="84" x2="84" y1="188" y2="200"/>
<line x1="84" x2="84" y1="200" y2="212"/>
<line marker-end="url(#triangle)" x1="84" x2="124" y1="200" y2="200"/>
</g>
<g>
<line x1="84" x2="84" y1="748" y2="760"/>
<line x1="84" x2="84" y1="760" y2="788"/>
<line marker-end="url(#triangle)" x1="84" x2="124" y1="760" y2="760"/>
</g>
<g>
<line x1="108" x2="108" y1="124" y2="192"/>
<path d="M 112 120 A 4 4 0 0 0 108 124" fill="none"/>
</g>
<g>
<line x1="108" x2="108" y1="208" y2="436"/>
<path d="M 108 436 A 4 4 0 0 0 112 440" fill="none"/>
</g>
<g>
<line x1="108" x2="108" y1="700" y2="752"/>
<path d="M 112 696 A 4 4 0 0 0 108 700" fill="none"/>
</g>
<g>
<line x1="108" x2="108" y1="768" y2="836"/>
<path d="M 108 836 A 4 4 0 0 0 112 840" fill="none"/>
</g>
<g>
<line x1="112" x2="392" y1="120" y2="120"/>
<path d="M 396 124 A 4 4 0 0 0 392 120" fill="none"/>
</g>
<g>
<line x1="112" x2="392" y1="440" y2="440"/>
<path d="M 392 440 A 4 4 0 0 0 396 436" fill="none"/>
</g>
<g>
<line x1="112" x2="392" y1="696" y2="696"/>
<path d="M 396 700 A 4 4 0 0 0 392 696" fill="none"/>
</g>
<g>
<line x1="112" x2="392" y1="840" y2="840"/>
<path d="M 392 840 A 4 4 0 0 0 396 836" fill="none"/>
</g>
<g>
<line x1="132" x2="132" y1="172" y2="212"/>
<path d="M 132 212 A 4 4 0 0 0 136 216" 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="268" y2="308"/>
<path d="M 132 308 A 4 4 0 0 0 136 312" fill="none"/>
<path d="M 136 264 A 4 4 0 0 0 132 268" fill="none"/>
</g>
<g>
<line x1="132" x2="132" y1="748" y2="788"/>
<path d="M 132 788 A 4 4 0 0 0 136 792" fill="none"/>
<path d="M 136 744 A 4 4 0 0 0 132 748" fill="none"/>
</g>
<g>
<line x1="136" x2="224" y1="168" y2="168"/>
<path d="M 228 172 A 4 4 0 0 0 224 168" fill="none"/>
</g>
<g>
<line x1="136" x2="164" y1="216" y2="216"/>
<line marker-end="url(#triangle)" x1="164" x2="164" y1="216" y2="252"/>
<line x1="164" x2="224" y1="216" y2="216"/>
<path d="M 224 216 A 4 4 0 0 0 228 212" fill="none"/>
</g>
<g>
<line x1="136" x2="224" y1="264" y2="264"/>
<path d="M 228 268 A 4 4 0 0 0 224 264" fill="none"/>
</g>
<g>
<line x1="136" x2="224" y1="312" y2="312"/>
<path d="M 224 312 A 4 4 0 0 0 228 308" fill="none"/>
</g>
<g>
<line x1="136" x2="224" y1="744" y2="744"/>
<path d="M 228 748 A 4 4 0 0 0 224 744" fill="none"/>
</g>
<g>
<line x1="136" x2="224" y1="792" y2="792"/>
<path d="M 224 792 A 4 4 0 0 0 228 788" fill="none"/>
</g>
<g>
<line x1="228" x2="228" y1="172" y2="212"/>
</g>
<g>
<line x1="228" x2="228" y1="268" y2="308"/>
</g>
<g>
<line x1="228" x2="228" y1="748" y2="760"/>
<line x1="228" x2="228" y1="760" y2="788"/>
<line marker-end="url(#triangle)" x1="228" x2="260" y1="760" y2="760"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="240" x2="236" y1="280" y2="280"/>
<line marker-end="url(#triangle)" x1="240" x2="260" y1="280" y2="280"/>
</g>
<g>
<line x1="268" x2="268" y1="28" y2="68"/>
<path d="M 268 68 A 4 4 0 0 0 272 72" fill="none"/>
<path d="M 272 24 A 4 4 0 0 0 268 28" fill="none"/>
</g>
<g>
<line x1="268" x2="268" y1="172" y2="212"/>
<path d="M 268 212 A 4 4 0 0 0 272 216" fill="none"/>
<path d="M 272 168 A 4 4 0 0 0 268 172" fill="none"/>
</g>
<g>
<line x1="268" x2="268" y1="268" y2="308"/>
<path d="M 268 308 A 4 4 0 0 0 272 312" fill="none"/>
<path d="M 272 264 A 4 4 0 0 0 268 268" fill="none"/>
</g>
<g>
<line x1="268" x2="268" y1="364" y2="404"/>
<path d="M 268 404 A 4 4 0 0 0 272 408" fill="none"/>
<path d="M 272 360 A 4 4 0 0 0 268 364" fill="none"/>
</g>
<g>
<line x1="268" x2="268" y1="492" y2="532"/>
<path d="M 268 532 A 4 4 0 0 0 272 536" fill="none"/>
<path d="M 272 488 A 4 4 0 0 0 268 492" fill="none"/>
</g>
<g>
<line x1="268" x2="268" y1="604" y2="644"/>
<path d="M 268 644 A 4 4 0 0 0 272 648" fill="none"/>
<path d="M 272 600 A 4 4 0 0 0 268 604" fill="none"/>
</g>
<g>
<line x1="268" x2="268" y1="748" y2="788"/>
<path d="M 268 788 A 4 4 0 0 0 272 792" fill="none"/>
<path d="M 272 744 A 4 4 0 0 0 268 748" fill="none"/>
</g>
<g>
<line x1="268" x2="268" y1="892" y2="932"/>
<path d="M 268 932 A 4 4 0 0 0 272 936" fill="none"/>
<path d="M 272 888 A 4 4 0 0 0 268 892" fill="none"/>
</g>
<g>
<line x1="272" x2="368" y1="24" y2="24"/>
<path d="M 372 28 A 4 4 0 0 0 368 24" fill="none"/>
</g>
<g>
<line x1="272" x2="308" y1="72" y2="72"/>
<line x1="308" x2="308" y1="72" y2="112"/>
<line x1="308" x2="368" y1="72" y2="72"/>
<path d="M 368 72 A 4 4 0 0 0 372 68" fill="none"/>
</g>
<g>
<line x1="272" x2="368" y1="168" y2="168"/>
<path d="M 372 172 A 4 4 0 0 0 368 168" fill="none"/>
</g>
<g>
<line x1="272" x2="308" y1="216" y2="216"/>
<line marker-end="url(#triangle)" x1="308" x2="308" y1="216" y2="252"/>
<line x1="308" x2="368" y1="216" y2="216"/>
<path d="M 368 216 A 4 4 0 0 0 372 212" fill="none"/>
</g>
<g>
<line x1="272" x2="368" y1="264" y2="264"/>
<path d="M 372 268 A 4 4 0 0 0 368 264" fill="none"/>
</g>
<g>
<line x1="272" x2="308" y1="312" y2="312"/>
<line marker-end="url(#triangle)" x1="308" x2="308" y1="312" y2="348"/>
<line x1="308" x2="368" y1="312" y2="312"/>
<path d="M 368 312 A 4 4 0 0 0 372 308" fill="none"/>
</g>
<g>
<line x1="272" x2="368" y1="360" y2="360"/>
<path d="M 372 364 A 4 4 0 0 0 368 360" fill="none"/>
</g>
<g>
<line x1="272" x2="308" y1="408" y2="408"/>
<line x1="308" x2="308" y1="408" y2="432"/>
<line x1="308" x2="368" y1="408" y2="408"/>
<path d="M 368 408 A 4 4 0 0 0 372 404" fill="none"/>
</g>
<g>
<line x1="272" x2="368" y1="488" y2="488"/>
<path d="M 372 492 A 4 4 0 0 0 368 488" fill="none"/>
</g>
<g>
<line x1="272" x2="368" y1="536" y2="536"/>
<path d="M 368 536 A 4 4 0 0 0 372 532" fill="none"/>
</g>
<g>
<line x1="272" x2="368" y1="600" y2="600"/>
<path d="M 372 604 A 4 4 0 0 0 368 600" fill="none"/>
</g>
<g>
<line x1="272" x2="332" y1="648" y2="648"/>
<line x1="332" x2="332" y1="648" y2="688"/>
<line x1="332" x2="368" y1="648" y2="648"/>
<path d="M 368 648 A 4 4 0 0 0 372 644" fill="none"/>
</g>
<g>
<line x1="272" x2="300" y1="744" y2="744"/>
<line x1="300" x2="300" y1="704" y2="744"/>
<line x1="300" x2="368" y1="744" y2="744"/>
<path d="M 372 748 A 4 4 0 0 0 368 744" fill="none"/>
</g>
<g>
<line x1="272" x2="316" y1="792" y2="792"/>
<line x1="316" x2="316" y1="792" y2="832"/>
<line x1="316" x2="368" y1="792" y2="792"/>
<path d="M 368 792 A 4 4 0 0 0 372 788" fill="none"/>
</g>
<g>
<line x1="272" x2="368" y1="888" y2="888"/>
<path d="M 372 892 A 4 4 0 0 0 368 888" fill="none"/>
</g>
<g>
<line x1="272" x2="368" y1="936" y2="936"/>
<path d="M 368 936 A 4 4 0 0 0 372 932" fill="none"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="300" x2="300" y1="672" y2="660"/>
<line x1="300" x2="300" y1="672" y2="688"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="308" x2="308" y1="128" y2="156"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="308" x2="308" y1="448" y2="476"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="316" x2="316" y1="848" y2="876"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="332" x2="332" y1="704" y2="732"/>
</g>
<g>
<line x1="372" x2="372" y1="28" y2="68"/>
</g>
<g>
<line x1="372" x2="372" y1="172" y2="212"/>
</g>
<g>
<line x1="372" x2="372" y1="268" y2="308"/>
</g>
<g>
<line x1="372" x2="372" y1="364" y2="404"/>
</g>
<g>
<line x1="372" x2="372" y1="492" y2="532"/>
</g>
<g>
<line x1="372" x2="372" y1="604" y2="644"/>
</g>
<g>
<line x1="372" x2="372" y1="748" y2="788"/>
</g>
<g>
<line x1="372" x2="372" y1="892" y2="932"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="384" x2="380" y1="760" y2="760"/>
<line marker-end="url(#triangle)" x1="384" x2="412" y1="760" y2="760"/>
</g>
<g>
<line x1="396" x2="396" y1="124" y2="436"/>
</g>
<g>
<line x1="396" x2="396" y1="700" y2="752"/>
</g>
<g>
<line x1="396" x2="396" y1="768" y2="836"/>
</g>
<g>
<line x1="420" x2="420" y1="748" y2="788"/>
<path d="M 420 788 A 4 4 0 0 0 424 792" fill="none"/>
<path d="M 424 744 A 4 4 0 0 0 420 748" fill="none"/>
</g>
<g>
<line x1="424" x2="520" y1="744" y2="744"/>
<path d="M 524 748 A 4 4 0 0 0 520 744" fill="none"/>
</g>
<g>
<line x1="424" x2="520" y1="792" y2="792"/>
<path d="M 520 792 A 4 4 0 0 0 524 788" fill="none"/>
</g>
<g>
<line x1="524" x2="524" y1="748" y2="788"/>
</g>
<g>
<text x="25" y="204">
Client
</text>
</g>
<g>
<text x="33" y="764">
Fetch
</text>
</g>
<g>
<text x="33" y="780">
Stage
</text>
</g>
<g>
<text x="121" y="140">
Validator
</text>
</g>
<g>
<text x="121" y="716">
TPU
</text>
</g>
<g>
<text x="145" y="188">
Fetch
</text>
</g>
<g>
<text x="145" y="204">
Stage
</text>
</g>
<g>
<text x="145" y="284">
TPU
</text>
</g>
<g>
<text x="145" y="764">
SigVerify
</text>
</g>
<g>
<text x="145" y="780">
Stage
</text>
</g>
<g>
<text x="281" y="44">
Upstream
</text>
</g>
<g>
<text x="281" y="60">
Validators
</text>
</g>
<g>
<text x="281" y="188">
Repair
</text>
</g>
<g>
<text x="281" y="204">
Stage
</text>
</g>
<g>
<text x="281" y="284">
Blockstore
</text>
</g>
<g>
<text x="281" y="380">
Multicast
</text>
</g>
<g>
<text x="281" y="396">
Stage
</text>
</g>
<g>
<text x="281" y="508">
Downstream
</text>
</g>
<g>
<text x="281" y="524">
Validators
</text>
</g>
<g>
<text x="281" y="620">
PoH
</text>
</g>
<g>
<text x="281" y="636">
Service
</text>
</g>
<g>
<text x="281" y="764">
Banking
</text>
</g>
<g>
<text x="281" y="780">
Stage
</text>
</g>
<g>
<text x="281" y="908">
Banktree
</text>
</g>
<g>
<text x="433" y="764">
Blockstore
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,456 @@
<svg class="bob" font-family="arial" font-size="14" height="480" width="592" 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="480" width="592" 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="420"/>
<line x1="52" x2="80" y1="120" y2="120"/>
<path d="M 52 420 A 4 4 0 0 0 56 424" fill="none"/>
<path d="M 80 120 A 4 4 0 0 0 84 116" fill="none"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="56" x2="124" y1="424" y2="424"/>
</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 marker-end="url(#triangle)" x1="96" x2="92" y1="104" y2="104"/>
<line x1="96" x2="132" y1="104" y2="104"/>
</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="416"/>
</g>
<g>
<line x1="108" x2="108" y1="432" y2="468"/>
<path d="M 108 468 A 4 4 0 0 0 112 472" fill="none"/>
</g>
<g>
<line x1="112" x2="416" y1="8" y2="8"/>
<path d="M 420 12 A 4 4 0 0 0 416 8" fill="none"/>
</g>
<g>
<line x1="112" x2="416" y1="472" y2="472"/>
<path d="M 416 472 A 4 4 0 0 0 420 468" fill="none"/>
</g>
<g>
<line x1="124" x2="124" y1="236" y2="276"/>
<path d="M 124 276 A 4 4 0 0 0 128 280" fill="none"/>
<path d="M 128 232 A 4 4 0 0 0 124 236" fill="none"/>
</g>
<g>
<line x1="128" x2="156" y1="232" y2="232"/>
<line x1="156" x2="156" y1="144" y2="232"/>
<line x1="156" x2="184" y1="232" y2="232"/>
<path d="M 188 236 A 4 4 0 0 0 184 232" fill="none"/>
</g>
<g>
<line x1="128" x2="184" y1="280" y2="280"/>
<path d="M 184 280 A 4 4 0 0 0 188 276" 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="412" y2="436"/>
<path d="M 132 436 A 4 4 0 0 0 136 440" fill="none"/>
<path d="M 136 408 A 4 4 0 0 0 132 412" fill="none"/>
</g>
<g>
<line x1="136" x2="288" y1="56" y2="56"/>
<path d="M 292 60 A 4 4 0 0 0 288 56" fill="none"/>
</g>
<g>
<line x1="136" x2="288" y1="120" y2="120"/>
<path d="M 288 120 A 4 4 0 0 0 292 116" fill="none"/>
</g>
<g>
<line x1="136" x2="156" y1="408" y2="408"/>
<line x1="156" x2="156" y1="304" y2="408"/>
<line x1="156" x2="176" y1="408" y2="408"/>
<path d="M 180 412 A 4 4 0 0 0 176 408" fill="none"/>
</g>
<g>
<line x1="136" x2="176" y1="440" y2="440"/>
<path d="M 176 440 A 4 4 0 0 0 180 436" 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="304" y2="292"/>
</g>
<g>
<line x1="180" x2="180" y1="412" y2="424"/>
<line x1="180" x2="180" y1="424" y2="436"/>
<line marker-end="url(#triangle)" x1="180" x2="220" y1="424" y2="424"/>
</g>
<g>
<line x1="188" x2="188" y1="236" y2="276"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="200" x2="196" y1="248" y2="248"/>
<line x1="200" x2="212" y1="248" y2="248"/>
<line x1="212" x2="212" y1="236" y2="248"/>
<line x1="212" x2="212" y1="248" y2="276"/>
<path d="M 212 276 A 4 4 0 0 0 216 280" fill="none"/>
<path d="M 216 232 A 4 4 0 0 0 212 236" fill="none"/>
</g>
<g>
<line x1="204" x2="204" y1="156" y2="180"/>
<path d="M 204 180 A 4 4 0 0 0 208 184" fill="none"/>
<path d="M 208 152 A 4 4 0 0 0 204 156" fill="none"/>
</g>
<g>
<line x1="208" x2="336" y1="152" y2="152"/>
<path d="M 340 156 A 4 4 0 0 0 336 152" fill="none"/>
</g>
<g>
<line x1="208" x2="336" y1="184" y2="184"/>
<path d="M 336 184 A 4 4 0 0 0 340 180" fill="none"/>
</g>
<g>
<line x1="216" x2="252" y1="232" y2="232"/>
<line x1="252" x2="252" y1="208" y2="232"/>
<line x1="252" x2="280" y1="232" y2="232"/>
<path d="M 284 236 A 4 4 0 0 0 280 232" fill="none"/>
</g>
<g>
<line x1="216" x2="280" y1="280" y2="280"/>
<path d="M 280 280 A 4 4 0 0 0 284 276" fill="none"/>
</g>
<g>
<line x1="228" x2="228" y1="412" y2="452"/>
<path d="M 228 452 A 4 4 0 0 0 232 456" fill="none"/>
<path d="M 232 408 A 4 4 0 0 0 228 412" fill="none"/>
</g>
<g>
<line x1="232" x2="292" y1="408" y2="408"/>
<line x1="292" x2="292" y1="384" y2="408"/>
<line x1="292" x2="320" y1="408" y2="408"/>
<path d="M 324 412 A 4 4 0 0 0 320 408" fill="none"/>
</g>
<g>
<line x1="232" x2="320" y1="456" y2="456"/>
<path d="M 320 456 A 4 4 0 0 0 324 452" fill="none"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="252" x2="252" y1="208" y2="196"/>
</g>
<g>
<line x1="252" x2="252" y1="332" y2="356"/>
<path d="M 252 356 A 4 4 0 0 0 256 360" fill="none"/>
<path d="M 256 328 A 4 4 0 0 0 252 332" fill="none"/>
</g>
<g>
<line x1="256" x2="276" y1="328" y2="328"/>
<line x1="276" x2="276" y1="304" y2="328"/>
<line x1="276" x2="344" y1="328" y2="328"/>
<path d="M 348 332 A 4 4 0 0 0 344 328" fill="none"/>
</g>
<g>
<line x1="256" x2="344" y1="360" y2="360"/>
<path d="M 344 360 A 4 4 0 0 0 348 356" fill="none"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="276" x2="276" y1="304" y2="292"/>
</g>
<g>
<line x1="284" x2="284" y1="236" y2="276"/>
</g>
<g>
<line x1="292" x2="292" y1="60" y2="116"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="292" x2="292" y1="384" y2="372"/>
</g>
<g>
<line x1="300" x2="300" y1="236" y2="276"/>
<path d="M 300 276 A 4 4 0 0 0 304 280" fill="none"/>
<path d="M 304 232 A 4 4 0 0 0 300 236" fill="none"/>
</g>
<g>
<line x1="304" x2="392" y1="232" y2="232"/>
<path d="M 396 236 A 4 4 0 0 0 392 232" fill="none"/>
</g>
<g>
<line x1="304" x2="324" y1="280" y2="280"/>
<line marker-end="url(#triangle)" x1="324" x2="324" y1="280" y2="316"/>
<line x1="324" x2="392" y1="280" y2="280"/>
<path d="M 392 280 A 4 4 0 0 0 396 276" fill="none"/>
</g>
<g>
<line x1="324" x2="324" y1="412" y2="424"/>
<line x1="324" x2="324" y1="424" y2="452"/>
<line marker-end="url(#triangle)" x1="324" x2="452" y1="424" y2="424"/>
</g>
<g>
<line x1="340" x2="340" y1="156" y2="180"/>
</g>
<g>
<line x1="348" x2="348" y1="332" y2="356"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="352" x2="348" y1="168" y2="168"/>
<line x1="352" x2="436" y1="168" y2="168"/>
</g>
<g>
<line x1="396" x2="396" y1="236" y2="276"/>
</g>
<g>
<line marker-end="url(#triangle)" x1="408" x2="404" y1="248" y2="248"/>
<line x1="408" x2="460" y1="248" y2="248"/>
<line x1="460" x2="460" y1="220" y2="248"/>
<line x1="460" x2="460" y1="248" y2="292"/>
<path d="M 460 292 A 4 4 0 0 0 464 296" fill="none"/>
<path d="M 464 216 A 4 4 0 0 0 460 220" fill="none"/>
</g>
<g>
<line x1="420" x2="420" y1="12" y2="160"/>
</g>
<g>
<line x1="420" x2="420" y1="176" y2="240"/>
</g>
<g>
<line x1="420" x2="420" y1="256" y2="416"/>
</g>
<g>
<line x1="420" x2="420" y1="432" y2="468"/>
</g>
<g>
<line x1="436" x2="436" y1="156" y2="240"/>
<path d="M 440 152 A 4 4 0 0 0 436 156" fill="none"/>
</g>
<g>
<line x1="436" x2="436" y1="256" y2="416"/>
</g>
<g>
<line x1="436" x2="436" y1="432" y2="452"/>
<path d="M 436 452 A 4 4 0 0 0 440 456" fill="none"/>
</g>
<g>
<line x1="440" x2="584" y1="152" y2="152"/>
<path d="M 588 156 A 4 4 0 0 0 584 152" fill="none"/>
</g>
<g>
<line x1="440" x2="584" y1="456" y2="456"/>
<path d="M 584 456 A 4 4 0 0 0 588 452" fill="none"/>
</g>
<g>
<line x1="460" x2="460" y1="364" y2="436"/>
<path d="M 460 436 A 4 4 0 0 0 464 440" fill="none"/>
<path d="M 464 360 A 4 4 0 0 0 460 364" fill="none"/>
</g>
<g>
<line x1="464" x2="560" y1="216" y2="216"/>
<path d="M 564 220 A 4 4 0 0 0 560 216" fill="none"/>
</g>
<g>
<line x1="464" x2="560" y1="296" y2="296"/>
<path d="M 560 296 A 4 4 0 0 0 564 292" fill="none"/>
</g>
<g>
<line x1="464" x2="560" y1="360" y2="360"/>
<path d="M 564 364 A 4 4 0 0 0 560 360" fill="none"/>
</g>
<g>
<line x1="464" x2="560" y1="440" y2="440"/>
<path d="M 560 440 A 4 4 0 0 0 564 436" fill="none"/>
</g>
<g>
<line x1="564" x2="564" y1="220" y2="292"/>
</g>
<g>
<line x1="564" x2="564" y1="364" y2="436"/>
</g>
<g>
<line x1="588" x2="588" y1="156" y2="452"/>
</g>
<g>
<text x="25" y="92">
Client
</text>
</g>
<g>
<text x="129" y="28">
Validator
</text>
</g>
<g>
<text x="137" y="252">
Bank
</text>
</g>
<g>
<text x="137" y="268">
Forks
</text>
</g>
<g>
<text x="145" y="92">
JSON
</text>
</g>
<g>
<text x="145" y="428">
TPU
</text>
</g>
<g>
<text x="185" y="92">
RPC
</text>
</g>
<g>
<text x="217" y="92">
Service
</text>
</g>
<g>
<text x="217" y="172">
Gossip
</text>
</g>
<g>
<text x="225" y="252">
Replay
</text>
</g>
<g>
<text x="225" y="268">
Stage
</text>
</g>
<g>
<text x="241" y="428">
Broadcast
</text>
</g>
<g>
<text x="241" y="444">
Stage
</text>
</g>
<g>
<text x="265" y="348">
Blocktree
</text>
</g>
<g>
<text x="273" y="172">
Service
</text>
</g>
<g>
<text x="313" y="252">
BlobFetch
</text>
</g>
<g>
<text x="321" y="268">
Stage
</text>
</g>
<g>
<text x="449" y="172">
Validators
</text>
</g>
<g>
<text x="473" y="252">
Upstream
</text>
</g>
<g>
<text x="473" y="268">
Validators
</text>
</g>
<g>
<text x="473" y="396">
Downstream
</text>
</g>
<g>
<text x="473" y="412">
Validators
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,67 +1,81 @@
# Solana Architecture
# Table of contents
- [Introduction](introduction.md)
* [Introduction](introduction.md)
* [Terminology](terminology.md)
* [Getting Started](getting-started/README.md)
* [Testnet Participation](getting-started/testnet-participation.md)
* [Example Client: Web Wallet](getting-started/webwallet.md)
* [Programming Model](programs/README.md)
* [Example: Tic-Tac-Toe](programs/tictactoe.md)
* [Drones](programs/drones.md)
* [A Solana Cluster](cluster/README.md)
* [Synchronization](cluster/synchronization.md)
* [Leader Rotation](cluster/leader-rotation.md)
* [Fork Generation](cluster/fork-generation.md)
* [Managing Forks](cluster/managing-forks.md)
* [Turbine Block Propagation](cluster/turbine-block-propagation.md)
* [Ledger Replication](cluster/ledger-replication.md)
* [Secure Vote Signing](cluster/vote-signing.md)
* [Stake Delegation and Rewards](cluster/stake-delegation-and-rewards.md)
* [Performance Metrics](cluster/performance-metrics.md)
* [Anatomy of a Validator](validator/README.md)
* [TPU](validator/tpu.md)
* [TVU](validator/tvu/README.md)
* [Blocktree](validator/tvu/blocktree.md)
* [Gossip Service](validator/gossip.md)
* [The Runtime](validator/runtime.md)
* [Anatomy of a Transaction](transaction.md)
* [Running a Validator](running-validator/README.md)
* [Hardware Requirements](running-validator/validator-hardware.md)
* [Choosing a Testnet](running-validator/validator-testnet.md)
* [Installing the Validator Software](running-validator/validator-software.md)
* [Starting a Validator](running-validator/validator-start.md)
* [Staking](running-validator/validator-stake.md)
* [Monitoring a Validator](running-validator/validator-monitor.md)
* [Publishing Validator Info](running-validator/validator-info.md)
* [Troubleshooting](running-validator/validator-troubleshoot.md)
* [FAQ](running-validator/validator-faq.md)
* [Running a Replicator](running-replicator.md)
* [API Reference](api-reference/README.md)
* [Transaction](api-reference/transaction-api.md)
* [Instruction](api-reference/instruction-api.md)
* [Blockstreamer](api-reference/blockstreamer.md)
* [JSON RPC API](api-reference/jsonrpc-api.md)
* [JavaScript API](api-reference/javascript-api.md)
* [solana CLI](api-reference/cli.md)
* [Accepted Design Proposals](proposals/README.md)
* [Ledger Replication](proposals/ledger-replication-to-implement.md)
* [Secure Vote Signing](proposals/vote-signing-to-implement.md)
* [Staking Rewards](proposals/staking-rewards.md)
* [Cluster Economics](proposals/ed_overview/README.md)
* [Validation-client Economics](proposals/ed_overview/ed_validation_client_economics/README.md)
* [State-validation Protocol-based Rewards](proposals/ed_overview/ed_validation_client_economics/ed_vce_state_validation_protocol_based_rewards.md)
* [State-validation Transaction Fees](proposals/ed_overview/ed_validation_client_economics/ed_vce_state_validation_transaction_fees.md)
* [Replication-validation Transaction Fees](proposals/ed_overview/ed_validation_client_economics/ed_vce_replication_validation_transaction_fees.md)
* [Validation Stake Delegation](proposals/ed_overview/ed_validation_client_economics/ed_vce_validation_stake_delegation.md)
* [Replication-client Economics](proposals/ed_overview/ed_replication_client_economics/README.md)
* [Storage-replication Rewards](proposals/ed_overview/ed_replication_client_economics/ed_rce_storage_replication_rewards.md)
* [Replication-client Reward Auto-delegation](proposals/ed_overview/ed_replication_client_economics/ed_rce_replication_client_reward_auto_delegation.md)
* [Economic Sustainability](proposals/ed_overview/ed_economic_sustainability.md)
* [Attack Vectors](proposals/ed_overview/ed_attack_vectors.md)
* [Economic Design MVP](proposals/ed_overview/ed_mvp.md)
* [References](proposals/ed_overview/ed_references.md)
* [Cluster Test Framework](proposals/cluster-test-framework.md)
* [Validator](proposals/validator-proposal.md)
* [Simple Payment and State Verification](proposals/simple-payment-and-state-verification.md)
* [Cross-Program Invocation](proposals/cross-program-invocation.md)
* [Implemented Design Proposals](implemented-proposals/README.md)
* [Blocktree](implemented-proposals/blocktree.md)
* [Cluster Software Installation and Updates](implemented-proposals/installer.md)
* [Deterministic Transaction Fees](implemented-proposals/transaction-fees.md)
* [Tower BFT](implemented-proposals/tower-bft.md)
* [Leader-to-Leader Transition](implemented-proposals/leader-leader-transition.md)
* [Leader-to-Validator Transition](implemented-proposals/leader-validator-transition.md)
* [Passive Stake Delegation and Rewards](implemented-proposals/passive-stake-delegation-and-rewards.md)
* [Persistent Account Storage](implemented-proposals/persistent-account-storage.md)
* [Reliable Vote Transmission](implemented-proposals/reliable-vote-transmission.md)
* [Repair Service](implemented-proposals/repair-service.md)
* [Testing Programs](implemented-proposals/testing-programs.md)
* [Credit-only Accounts](implemented-proposals/credit-only-credit-debit-accounts.md)
* [Embedding the Move Langauge](implemented-proposals/embedding-move.md)
- [Terminology](terminology.md)
- [Getting Started](getting-started.md)
- [Example: Web Wallet](webwallet.md)
- [Programming Model](programs.md)
- [Example: Tic-Tac-Toe](tictactoe.md)
- [Drones](drones.md)
- [A Solana Cluster](cluster.md)
- [Synchronization](synchronization.md)
- [Leader Rotation](leader-rotation.md)
- [Fork Generation](fork-generation.md)
- [Managing Forks](managing-forks.md)
- [Data Plane Fanout](data-plane-fanout.md)
- [Ledger Replication](ledger-replication.md)
- [Secure Vote Signing](vote-signing.md)
- [Staking Delegation and Rewards](stake-delegation-and-rewards.md)
- [Anatomy of a Fullnode](fullnode.md)
- [TPU](tpu.md)
- [TVU](tvu.md)
- [Blocktree](blocktree.md)
- [Gossip Service](gossip.md)
- [The Runtime](runtime.md)
- [API Reference](api-reference.md)
- [Blockstreamer](blockstreamer.md)
- [JSON RPC API](jsonrpc-api.md)
- [JavaScript API](javascript-api.md)
- [solana-wallet CLI](wallet.md)
- [Accepted Design Proposals](proposals.md)
- [Ledger Replication](ledger-replication-to-implement.md)
- [Secure Vote Signing](vote-signing-to-implement.md)
- [Staking Rewards](staking-rewards.md)
- [Passive Stake Delegation and Rewards](passive-stake-delegation-and-rewards.md)
- [Reliable Vote Transmission](reliable-vote-transmission.md)
- [Persistent Account Storage](persistent-account-storage.md)
- [Cluster Economics](ed_overview.md)
- [Validation-client Economics](ed_validation_client_economics.md)
- [State-validation Protocol-based Rewards](ed_vce_state_validation_protocol_based_rewards.md)
- [State-validation Transaction Fees](ed_vce_state_validation_transaction_fees.md)
- [Replication-validation Transaction Fees](ed_vce_replication_validation_transaction_fees.md)
- [Validation Stake Delegation](ed_vce_validation_stake_delegation.md)
- [Replication-client Economics](ed_replication_client_economics.md)
- [Storage-replication Rewards](ed_rce_storage_replication_rewards.md)
- [Replication-client Reward Auto-delegation](ed_rce_replication_client_reward_auto_delegation.md)
- [Economic Sustainability](ed_economic_sustainability.md)
- [Attack Vectors](ed_attack_vectors.md)
- [Economic Design MVP](ed_mvp.md)
- [References](ed_references.md)
- [Cluster Test Framework](cluster-test-framework.md)
- [Testing Programs](testing-programs.md)
- [Credit-only Accounts](credit-only-credit-debit-accounts.md)
- [Cluster Software Installation and Updates](installer.md)
- [Deterministic Transaction Fees](transaction-fees.md)
- [Implemented Design Proposals](implemented-proposals.md)
- [Fork Selection](fork-selection.md)
- [Leader-to-Leader Transition](leader-leader-transition.md)
- [Leader-to-Validator Transition](leader-validator-transition.md)
- [Testnet Participation](testnet-participation.md)

View File

@ -0,0 +1,4 @@
# API Reference
The following sections contain API references material you may find useful when developing applications utilizing a Solana cluster.

View File

@ -0,0 +1,28 @@
# Blockstreamer
Solana supports a node type called an _blockstreamer_. This fullnode variation is intended for applications that need to observe the data plane without participating in transaction validation or ledger replication.
A blockstreamer runs without a vote signer, and can optionally stream ledger entries out to a Unix domain socket as they are processed. The JSON-RPC service still functions as on any other node.
To run a blockstreamer, include the argument `no-signer` and \(optional\) `blockstream` socket location:
```bash
$ ./multinode-demo/validator-x.sh --no-signer --blockstream <SOCKET>
```
The stream will output a series of JSON objects:
* An Entry event JSON object is sent when each ledger entry is processed, with the following fields:
* `dt`, the system datetime, as RFC3339-formatted string
* `t`, the event type, always "entry"
* `s`, the slot height, as unsigned 64-bit integer
* `h`, the tick height, as unsigned 64-bit integer
* `entry`, the entry, as JSON object
* A Block event JSON object is sent when a block is complete, with the following fields:
* `dt`, the system datetime, as RFC3339-formatted string
* `t`, the event type, always "block"
* `s`, the slot height, as unsigned 64-bit integer
* `h`, the tick height, as unsigned 64-bit integer
* `l`, the slot leader id, as base-58 encoded string
* `id`, the block id, as base-58 encoded string

View File

@ -1,98 +1,100 @@
## solana-wallet CLI
# solana CLI
The [solana crate](https://crates.io/crates/solana) is distributed with a command-line interface tool
The [solana-cli crate](https://crates.io/crates/solana-cli) provides a command-line interface tool for Solana
### Examples
## Examples
#### Get Pubkey
### Get Pubkey
```sh
```bash
// Command
$ solana-wallet address
$ solana address
// Return
<PUBKEY>
```
#### Airdrop Lamports
### Airdrop Lamports
```sh
```bash
// Command
$ solana-wallet airdrop 123
$ solana airdrop 123
// Return
"Your balance is: 123"
```
#### Get Balance
### Get Balance
```sh
```bash
// Command
$ solana-wallet balance
$ solana balance
// Return
"Your balance is: 123"
```
#### Confirm Transaction
### Confirm Transaction
```sh
```bash
// Command
$ solana-wallet confirm <TX_SIGNATURE>
$ solana confirm <TX_SIGNATURE>
// Return
"Confirmed" / "Not found" / "Transaction failed with error <ERR>"
```
#### Deploy program
### Deploy program
```sh
```bash
// Command
$ solana-wallet deploy <PATH>
$ solana deploy <PATH>
// Return
<PROGRAM_ID>
```
#### Unconditional Immediate Transfer
### Unconditional Immediate Transfer
```sh
```bash
// Command
$ solana-wallet pay <PUBKEY> 123
$ solana pay <PUBKEY> 123
// Return
<TX_SIGNATURE>
```
#### Post-Dated Transfer
### Post-Dated Transfer
```sh
```bash
// Command
$ solana-wallet pay <PUBKEY> 123 \
$ solana pay <PUBKEY> 123 \
--after 2018-12-24T23:59:00 --require-timestamp-from <PUBKEY>
// Return
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
```
*`require-timestamp-from` is optional. If not provided, the transaction will expect a timestamp signed by this wallet's secret key*
#### Authorized Transfer
_`require-timestamp-from` is optional. If not provided, the transaction will expect a timestamp signed by this wallet's secret key_
### Authorized Transfer
A third party must send a signature to unlock the lamports.
```sh
```bash
// Command
$ solana-wallet pay <PUBKEY> 123 \
$ solana pay <PUBKEY> 123 \
--require-signature-from <PUBKEY>
// Return
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
```
#### Post-Dated and Authorized Transfer
### Post-Dated and Authorized Transfer
```sh
```bash
// Command
$ solana-wallet pay <PUBKEY> 123 \
$ solana pay <PUBKEY> 123 \
--after 2018-12-24T23:59 --require-timestamp-from <PUBKEY> \
--require-signature-from <PUBKEY>
@ -100,11 +102,11 @@ $ solana-wallet pay <PUBKEY> 123 \
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
```
#### Multiple Witnesses
### Multiple Witnesses
```sh
```bash
// Command
$ solana-wallet pay <PUBKEY> 123 \
$ solana pay <PUBKEY> 123 \
--require-signature-from <PUBKEY> \
--require-signature-from <PUBKEY>
@ -112,11 +114,11 @@ $ solana-wallet pay <PUBKEY> 123 \
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
```
#### Cancelable Transfer
### Cancelable Transfer
```sh
```bash
// Command
$ solana-wallet pay <PUBKEY> 123 \
$ solana pay <PUBKEY> 123 \
--require-signature-from <PUBKEY> \
--cancelable
@ -124,32 +126,33 @@ $ solana-wallet pay <PUBKEY> 123 \
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
```
#### Cancel Transfer
### Cancel Transfer
```sh
```bash
// Command
$ solana-wallet cancel <PROCESS_ID>
$ solana cancel <PROCESS_ID>
// Return
<TX_SIGNATURE>
```
#### Send Signature
### Send Signature
```sh
```bash
// Command
$ solana-wallet send-signature <PUBKEY> <PROCESS_ID>
$ solana send-signature <PUBKEY> <PROCESS_ID>
// Return
<TX_SIGNATURE>
```
#### Indicate Elapsed Time
### Indicate Elapsed Time
Use the current system time:
```sh
```bash
// Command
$ solana-wallet send-timestamp <PUBKEY> <PROCESS_ID>
$ solana send-timestamp <PUBKEY> <PROCESS_ID>
// Return
<TX_SIGNATURE>
@ -157,21 +160,21 @@ $ solana-wallet send-timestamp <PUBKEY> <PROCESS_ID>
Or specify some other arbitrary timestamp:
```sh
```bash
// Command
$ solana-wallet send-timestamp <PUBKEY> <PROCESS_ID> --date 2018-12-24T23:59:00
$ solana send-timestamp <PUBKEY> <PROCESS_ID> --date 2018-12-24T23:59:00
// Return
<TX_SIGNATURE>
```
### Usage
## Usage
```manpage
solana-wallet 0.12.0
```text
solana 0.12.0
USAGE:
solana-wallet [FLAGS] [OPTIONS] [SUBCOMMAND]
solana [FLAGS] [OPTIONS] [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
@ -200,24 +203,24 @@ SUBCOMMANDS:
send-timestamp Send a timestamp to unlock a transfer
```
```manpage
solana-wallet-address
```text
solana-address
Get your public key
USAGE:
solana-wallet address
solana address
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
```
```manpage
solana-wallet-airdrop
```text
solana-airdrop
Request a batch of lamports
USAGE:
solana-wallet airdrop <NUM>
solana airdrop <NUM>
FLAGS:
-h, --help Prints help information
@ -227,24 +230,24 @@ ARGS:
<NUM> The number of lamports to request
```
```manpage
solana-wallet-balance
```text
solana-balance
Get your balance
USAGE:
solana-wallet balance
solana balance
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
```
```manpage
solana-wallet-cancel
```text
solana-cancel
Cancel a transfer
USAGE:
solana-wallet cancel <PROCESS_ID>
solana cancel <PROCESS_ID>
FLAGS:
-h, --help Prints help information
@ -254,12 +257,12 @@ ARGS:
<PROCESS_ID> The process id of the transfer to cancel
```
```manpage
solana-wallet-confirm
```text
solana-confirm
Confirm transaction by signature
USAGE:
solana-wallet confirm <SIGNATURE>
solana confirm <SIGNATURE>
FLAGS:
-h, --help Prints help information
@ -269,12 +272,12 @@ ARGS:
<SIGNATURE> The transaction signature to confirm
```
```manpage
solana-wallet-deploy
```text
solana-deploy
Deploy a program
USAGE:
solana-wallet deploy <PATH>
solana deploy <PATH>
FLAGS:
-h, --help Prints help information
@ -284,24 +287,36 @@ ARGS:
<PATH> /path/to/program.o
```
```manpage
solana-wallet-get-transaction-count
Get current transaction count
```text
solana-fees
Display current cluster fees
USAGE:
solana-wallet get-transaction-count
solana fees
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
```
```manpage
solana-wallet-pay
```text
solana-get-transaction-count
Get current transaction count
USAGE:
solana get-transaction-count
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
```
```text
solana-pay
Send a payment
USAGE:
solana-wallet pay [FLAGS] [OPTIONS] <PUBKEY> <NUM>
solana pay [FLAGS] [OPTIONS] <PUBKEY> <NUM>
FLAGS:
--cancelable
@ -318,12 +333,12 @@ ARGS:
<NUM> The number of lamports to send
```
```manpage
solana-wallet-send-signature
```text
solana-send-signature
Send a signature to authorize a transfer
USAGE:
solana-wallet send-signature <PUBKEY> <PROCESS_ID>
solana send-signature <PUBKEY> <PROCESS_ID>
FLAGS:
-h, --help Prints help information
@ -334,12 +349,12 @@ ARGS:
<PROCESS_ID> The process id of the transfer to authorize
```
```manpage
solana-wallet-send-timestamp
```text
solana-send-timestamp
Send a timestamp to unlock a transfer
USAGE:
solana-wallet send-timestamp [OPTIONS] <PUBKEY> <PROCESS_ID>
solana send-timestamp [OPTIONS] <PUBKEY> <PROCESS_ID>
FLAGS:
-h, --help Prints help information
@ -352,3 +367,4 @@ ARGS:
<PUBKEY> The pubkey of recipient
<PROCESS_ID> The process id of the transfer to unlock
```

View File

@ -0,0 +1,38 @@
# Instruction
For the purposes of building a [Transaction](../transaction.md), a more verbose instruction format is used:
* **Instruction:**
* **program\_id:** The pubkey of the on-chain program that executes the
instruction
* **accounts:** An ordered list of accounts that should be passed to
the program processing the instruction, including metadata detailing
if an account is a signer of the transaction and if it is a credit
only account.
* **data:** A byte array that is passed to the program executing the
instruction
A more compact form is actually included in a `Transaction`:
* **CompiledInstruction:**
* **program\_id\_index:** The index of the `program_id` in the
`account_keys` list
* **accounts:** An ordered list of indices into `account_keys`
specifying the accounds that should be passed to the program
processing the instruction.
* **data:** A byte array that is passed to the program executing the
instruction

View File

@ -0,0 +1,4 @@
# JavaScript API
See [solana-web3](https://solana-labs.github.io/solana-web3.js/).

View File

@ -0,0 +1,788 @@
# 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://localhost:8899), [http://192.168.1.88:8899](http://192.168.1.88:8899)
## RPC PubSub WebSocket Endpoint
**Default port:** 8900 eg. ws://localhost:8900, [http://192.168.1.88:8900](http://192.168.1.88:8900)
## Methods
* [confirmTransaction](jsonrpc-api.md#confirmtransaction)
* [getAccountInfo](jsonrpc-api.md#getaccountinfo)
* [getBalance](jsonrpc-api.md#getbalance)
* [getClusterNodes](jsonrpc-api.md#getclusternodes)
* [getEpochInfo](jsonrpc-api.md#getepochinfo)
* [getGenesisBlockhash](jsonrpc-api.md#getgenesisblockhash)
* [getLeaderSchedule](jsonrpc-api.md#getleaderschedule)
* [getProgramAccounts](jsonrpc-api.md#getprogramaccounts)
* [getRecentBlockhash](jsonrpc-api.md#getrecentblockhash)
* [getSignatureStatus](jsonrpc-api.md#getsignaturestatus)
* [getSlot](jsonrpc-api.md#getslot)
* [getSlotLeader](jsonrpc-api.md#getslotleader)
* [getSlotsPerSegment](jsonrpc-api.md#getslotspersegment)
* [getStorageTurn](jsonrpc-api.md#getstorageturn)
* [getStorageTurnRate](jsonrpc-api.md#getstorageturnrate)
* [getNumBlocksSinceSignatureConfirmation](jsonrpc-api.md#getnumblockssincesignatureconfirmation)
* [getTransactionCount](jsonrpc-api.md#gettransactioncount)
* [getTotalSupply](jsonrpc-api.md#gettotalsupply)
* [getVersion](jsonrpc-api.md#getversion)
* [getVoteAccounts](jsonrpc-api.md#getvoteaccounts)
* [requestAirdrop](jsonrpc-api.md#requestairdrop)
* [sendTransaction](jsonrpc-api.md#sendtransaction)
* [startSubscriptionChannel](jsonrpc-api.md#startsubscriptionchannel)
* [Subscription Websocket](jsonrpc-api.md#subscription-websocket)
* [accountSubscribe](jsonrpc-api.md#accountsubscribe)
* [accountUnsubscribe](jsonrpc-api.md#accountunsubscribe)
* [programSubscribe](jsonrpc-api.md#programsubscribe)
* [programUnsubscribe](jsonrpc-api.md#programunsubscribe)
* [signatureSubscribe](jsonrpc-api.md#signaturesubscribe)
* [signatureUnsubscribe](jsonrpc-api.md#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}
```
### 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:
* `lamports`, number of lamports assigned to this account, as a signed 64-bit integer
* `owner`, array of 32 bytes representing the program this account has been assigned to
* `data`, array of bytes representing any data associated with the account
* `executable`, boolean indicating if the account contains a program \(and is strictly read-only\)
#### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getAccountInfo", "params":["2gVkYWexTHR5Hb2aLeQN3tnngvWzisFKXDUPrgMHpdST"]}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":{"executable":false,"owner":[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],"lamports":1,"data":[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}
```
### 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}
```
### getClusterNodes
Returns information about all the nodes participating in the cluster
#### Parameters:
None
#### Results:
The result field will be an array of JSON objects, each with the following sub fields:
* `pubkey` - Node public key, as base-58 encoded string
* `gossip` - Gossip network address for the node
* `tpu` - TPU network address for the node
* `rpc` - JSON RPC network address for the node, or `null` if the JSON RPC service is not enabled
#### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getClusterNodes"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":[{"gossip":"10.239.6.48:8001","pubkey":"9QzsJf7LPLj8GkXbYT3LFDKqsj2hHG7TA3xinJHu8epQ","rpc":"10.239.6.48:8899","tpu":"10.239.6.48:8856"}],"id":1}
```
### getEpochInfo
Returns information about the current epoch
#### Parameters:
None
#### Results:
The result field will be an object with the following fields:
* `epoch`, the current epoch
* `slotIndex`, the current slot relative to the start of the current epoch
* `slotsInEpoch`, the number of slots in this epoch
#### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getEpochInfo"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":{"epoch":3,"slotIndex":126,"slotsInEpoch":256},"id":1}
```
### getGenesisBlockhash
Returns the genesis block hash
#### Parameters:
None
#### Results:
* `string` - 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":"getGenesisBlockhash"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":"GH7ome3EiwEr7tu9JuTh2dpYWBJK3z69Xm1ZE3MEE6JC","id":1}
```
### getLeaderSchedule
Returns the leader schedule for the current epoch
#### Parameters:
None
#### Results:
The result field will be an array of leader public keys \(as base-58 encoded strings\) for each slot in the current epoch
#### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getLeaderSchedule"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":[...],"id":1}
```
### getProgramAccounts
Returns all accounts owned by the provided program Pubkey
#### Parameters:
* `string` - Pubkey of program, as base-58 encoded string
#### Results:
The result field will be an array of arrays. Each sub array will contain:
* `string` - the account Pubkey as base-58 encoded string and a JSON object, with the following sub fields:
* `lamports`, number of lamports assigned to this account, as a signed 64-bit integer
* `owner`, array of 32 bytes representing the program this account has been assigned to
* `data`, array of bytes representing any data associated with the account
* `executable`, boolean indicating if the account contains a program \(and is strictly read-only\)
#### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getProgramAccounts", "params":["8nQwAgzN2yyUzrukXsCa3JELBYqDQrqJ3UyHiWazWxHR"]}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":[["BqGKYtAKu69ZdWEBtZHh4xgJY1BYa2YBiBReQE3pe383", {"executable":false,"owner":[50,28,250,90,221,24,94,136,147,165,253,136,1,62,196,215,225,34,222,212,99,84,202,223,245,13,149,99,149,231,91,96],"lamports":1,"data":[]], ["4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T", {"executable":false,"owner":[50,28,250,90,221,24,94,136,147,165,253,136,1,62,196,215,225,34,222,212,99,84,202,223,245,13,149,99,149,231,91,96],"lamports":10,"data":[]]]},"id":1}
```
### getRecentBlockhash
Returns a recent block hash from the ledger, and a fee schedule that can be used to compute the cost of submitting a transaction using it.
#### Parameters:
None
#### Results:
An array consisting of
* `string` - a Hash as base-58 encoded string
* `FeeCalculator object` - the fee schedule for this block hash
#### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getRecentBlockhash"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":["GH7ome3EiwEr7tu9JuTh2dpYWBJK3z69Xm1ZE3MEE6JC",{"lamportsPerSignature": 0}],"id":1}
```
### getSignatureStatus
Returns the status of a given signature. This method is similar to [confirmTransaction](jsonrpc-api.md#confirmtransaction) but provides more resolution for error events.
#### Parameters:
* `string` - Signature of Transaction to confirm, as base-58 encoded string
#### Results:
* `null` - Unknown transaction
* `object` - Transaction status:
* `"Ok": null` - Transaction was successful
* `"Err": <ERR>` - Transaction failed with TransactionError [TransactionError definitions](https://github.com/solana-labs/solana/blob/master/sdk/src/transaction.rs#L14)
#### 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}
```
### getSlot
Returns the current slot the node is processing
#### Parameters:
None
#### Results:
* `u64` - Current slot
#### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getSlot"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":"1234","id":1}
```
### getSlotLeader
Returns the current slot leader
#### Parameters:
None
#### Results:
* `string` - Node Id as base-58 encoded string
#### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getSlotLeader"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":"ENvAW7JScgYq6o4zKZwewtkzzJgDzuJAFxYasvmEQdpS","id":1}
```
### getSlotsPerSegment
Returns the current storage segment size in terms of slots
#### Parameters:
None
#### Results:
* `u64` - Number of slots in a storage segment
#### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getSlotsPerSegment"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":"1024","id":1}
```
### getStorageTurn
Returns the current storage turn's blockhash and slot
#### Parameters:
None
#### Results:
An array consisting of
* `string` - a Hash as base-58 encoded string indicating the blockhash of the turn slot
* `u64` - the current storage turn slot
#### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getStorageTurn"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":["GH7ome3EiwEr7tu9JuTh2dpYWBJK3z69Xm1ZE3MEE6JC", "2048"],"id":1}
```
### getStorageTurnRate
Returns the current storage turn rate in terms of slots per turn
#### Parameters:
None
#### Results:
* `u64` - Number of slots in storage turn
#### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getStorageTurnRate"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":"1024","id":1}
```
### getNumBlocksSinceSignatureConfirmation
Returns the current number of blocks since signature has been confirmed.
#### Parameters:
* `string` - Signature of Transaction to confirm, as base-58 encoded string
#### 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":"getNumBlocksSinceSignatureConfirmation", "params":["5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"]}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":8,"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}
```
### getTotalSupply
Returns the current total supply in Lamports
#### Parameters:
None
#### Results:
* `integer` - Total supply, as unsigned 64-bit integer
#### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getTotalSupply"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":10126,"id":1}
```
### getVersion
Returns the current solana versions running on the node
#### Parameters:
None
#### Results:
The result field will be a JSON object with the following sub fields:
* `solana-core`, software version of solana-core
#### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getVersion"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":{"solana-core": "0.17.2"},"id":1}
```
### getVoteAccounts
Returns the account info and associated stake for all the voting accounts in the current bank.
#### Parameters:
None
#### Results:
The result field will be a JSON object of `current` and `delinquent` accounts, each containing an array of JSON objects with the following sub fields:
* `votePubkey` - Vote account public key, as base-58 encoded string
* `nodePubkey` - Node public key, as base-58 encoded string
* `activatedStake` - the stake, in lamports, delegated to this vote account and active in this epoch
* `epochVoteAccount` - bool, whether the vote account is staked for this epoch
* `commission`, an 8-bit integer used as a fraction \(commission/MAX\_U8\) for rewards payout
* `lastVote` - Most recent slot voted on by this vote account
#### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getVoteAccounts"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":{"current":[{"commission":0,"epochVoteAccount":true,"nodePubkey":"B97CCUW3AEZFGy6uUg6zUdnNYvnVq5VG8PUtb2HayTDD","lastVote":147,"activatedStake":42,"votePubkey":"3ZT31jkAGhUaw8jsy4bTknwBMP8i4Eueh52By4zXcsVw"}],"delinquent":[{"commission":127,"epochVoteAccount":false,"nodePubkey":"6ZPxeQaDo4bkZLRsdNrCzchNQr5LN9QMc9sipXv9Kw8f","lastVote":0,"activatedStake":0,"votePubkey":"CmgCk4aMS7KW1SHX3s9K5tBJ6Yng2LBaC8MFov4wx9sm"}]},"id":1}
```
### requestAirdrop
Requests an airdrop of lamports to a Pubkey
#### Parameters:
* `string` - Pubkey of account to receive lamports, as base-58 encoded string
* `integer` - lamports, 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
* All subscriptions take an optional `confirmations` parameter, which defines
how many confirmed blocks the node should wait before sending a notification.
The greater the number, the more likely the notification is to represent
consensus across the cluster, and the less likely it is to be affected by
forking or rollbacks. If unspecified, the default value is 0; the node will
send a notification as soon as it witnesses the event. The maximum
`confirmations` wait length is the cluster's `MAX_LOCKOUT_HISTORY`, which
represents the economic finality of the chain.
### accountSubscribe
Subscribe to an account to receive notifications when the lamports or data for a given account public key changes
#### Parameters:
* `string` - account Pubkey, as base-58 encoded string
* `integer` - optional, number of confirmed blocks to wait before notification.
Default: 0, Max: `MAX_LOCKOUT_HISTORY` \(greater integers rounded down\)
#### Results:
* `integer` - Subscription id \(needed to unsubscribe\)
#### Example:
```bash
// Request
{"jsonrpc":"2.0", "id":1, "method":"accountSubscribe", "params":["CM78CPUeXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNH12"]}
{"jsonrpc":"2.0", "id":1, "method":"accountSubscribe", "params":["CM78CPUeXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNH12", 15]}
// Result
{"jsonrpc": "2.0","result": 0,"id": 1}
```
#### Notification Format:
```bash
{"jsonrpc": "2.0","method": "accountNotification", "params": {"result": {"executable":false,"owner":[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],"lamports":1,"data":[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 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}
```
### programSubscribe
Subscribe to a program to receive notifications when the lamports or data for a given account owned by the program changes
#### Parameters:
* `string` - program\_id Pubkey, as base-58 encoded string
* `integer` - optional, number of confirmed blocks to wait before notification.
Default: 0, Max: `MAX_LOCKOUT_HISTORY` \(greater integers rounded down\)
#### Results:
* `integer` - Subscription id \(needed to unsubscribe\)
#### Example:
```bash
// Request
{"jsonrpc":"2.0", "id":1, "method":"programSubscribe", "params":["9gZbPtbtHrs6hEWgd6MbVY9VPFtS5Z8xKtnYwA2NynHV"]}
{"jsonrpc":"2.0", "id":1, "method":"programSubscribe", "params":["9gZbPtbtHrs6hEWgd6MbVY9VPFtS5Z8xKtnYwA2NynHV", 15]}
// Result
{"jsonrpc": "2.0","result": 0,"id": 1}
```
#### Notification Format:
* `string` - account Pubkey, as base-58 encoded string
* `object` - account info JSON object \(see [getAccountInfo](jsonrpc-api.md#getaccountinfo) for field details\)
```bash
{"jsonrpc":"2.0","method":"programNotification","params":{{"result":["8Rshv2oMkPu5E4opXTRyuyBeZBqQ4S477VG26wUTFxUM",{"executable":false,"lamports":1,"owner":[129,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],"data":[1,1,1,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,50,48,49,56,45,49,50,45,50,52,84,50,51,58,53,57,58,48,48,90,235,233,39,152,15,44,117,176,41,89,100,86,45,61,2,44,251,46,212,37,35,118,163,189,247,84,27,235,178,62,55,89,0,0,0,0,50,0,0,0,0,0,0,0,235,233,39,152,15,44,117,176,41,89,100,86,45,61,2,44,251,46,212,37,35,118,163,189,247,84,27,235,178,62,45,4,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}],"subscription":0}}
```
### programUnsubscribe
Unsubscribe from program-owned account change notifications
#### Parameters:
* `integer` - id of account Subscription to cancel
#### Results:
* `bool` - unsubscribe success message
#### Example:
```bash
// Request
{"jsonrpc":"2.0", "id":1, "method":"programUnsubscribe", "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
* `integer` - optional, number of confirmed blocks to wait before notification.
Default: 0, Max: `MAX_LOCKOUT_HISTORY` \(greater integers rounded down\)
#### Results:
* `integer` - subscription id \(needed to unsubscribe\)
#### Example:
```bash
// Request
{"jsonrpc":"2.0", "id":1, "method":"signatureSubscribe", "params":["2EBVM6cB8vAAD93Ktr6Vd8p67XPbQzCJX47MpReuiCXJAtcjaxpvWpcg9Ege1Nr5Tk3a2GFrByT7WPBjdsTycY9b"]}
{"jsonrpc":"2.0", "id":1, "method":"signatureSubscribe", "params":["2EBVM6cB8vAAD93Ktr6Vd8p67XPbQzCJX47MpReuiCXJAtcjaxpvWpcg9Ege1Nr5Tk3a2GFrByT7WPBjdsTycY9b", 15]}
// Result
{"jsonrpc": "2.0","result": 0,"id": 1}
```
#### Notification Format:
```bash
{"jsonrpc": "2.0","method": "signatureNotification", "params": {"result": "Confirmed","subscription":0}}
```
### signatureUnsubscribe
Unsubscribe from signature confirmation notification
#### Parameters:
* `integer` - subscription id 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}
```

View File

@ -0,0 +1,63 @@
# Transaction
## Components of a `Transaction`
* **Transaction:**
* **message:** Defines the transaction
* **header:** Details the account types of and signatures required by
the transaction
* **num\_required\_signatures:** The total number of signatures
required to make the transaction valid.
* **num\_credit\_only\_signed\_accounts:** The last
`num_credit_only_signed_accounts` signatures refer to signing
credit only accounts. Credit only accounts can be used concurrently
by multiple parallel transactions, but their balance may only be
increased, and their account data is read-only.
* **num\_credit\_only\_unsigned\_accounts:** The last
`num_credit_only_unsigned_accounts` pubkeys in `account_keys` refer
to non-signing credit only accounts
* **account\_keys:** List of pubkeys used by the transaction, including
by the instructions and for signatures. The first
`num_required_signatures` pubkeys must sign the transaction.
* **recent\_blockhash:** The ID of a recent ledger entry. Validators will
reject transactions with a `recent_blockhash` that is too old.
* **instructions:** A list of [instructions](https://github.com/solana-labs/solana/tree/6b18db969dd1616eff07de35e7b823c75339fea8/book/src/instruction.md) that are
run sequentially and committed in one atomic transaction if all
succeed.
* **signatures:** A list of signatures applied to the transaction. The
list is always of length `num_required_signatures`, and the signature
at index `i` corresponds to the pubkey at index `i` in `account_keys`.
The list is initialized with empty signatures \(i.e. zeros\), and
populated as signatures are added.
## Transaction Signing
A `Transaction` is signed by using an ed25519 keypair to sign the serialization of the `message`. The resulting signature is placed at the index of `signatures` matching the index of the keypair's pubkey in `account_keys`.
## Transaction Serialization
`Transaction`s \(and their `message`s\) are serialized and deserialized using the [bincode](https://crates.io/crates/bincode) crate with a non-standard vector serialization that uses only one byte for the length if it can be encoded in 7 bits, 2 bytes if it fits in 14 bits, or 3 bytes if it requires 15 or 16 bits. The vector serialization is defined by Solana's [short-vec](https://github.com/solana-labs/solana/blob/master/sdk/src/short_vec.rs).

View File

@ -4,7 +4,7 @@ A validator votes on a PoH hash for two purposes. First, the vote indicates it
believes the ledger is valid up until that point in time. Second, since many
valid forks may exist at a given height, the vote also indicates exclusive
support for the fork. This document describes only the former. The latter is
described in [fork selection](fork-selection.md).
described in [Tower BFT](tower-bft.md).
## Current Design
@ -50,12 +50,11 @@ log the time since the NewBlock transaction was submitted.
### Finality and Payouts
Locktower is the proposed [fork selection](fork-selection.md) algorithm. It
proposes that payment to miners be postponed until the *stack* of validator
votes reaches a certain depth, at which point rollback is not economically
feasible. The vote program may therefore implement locktower. Vote instructions
would need to reference a global locktower account so that it can track
cross-block state.
[Tower BFT](tower-bft.md) is the proposed fork selection algorithm. It proposes
that payment to miners be postponed until the *stack* of validator votes reaches
a certain depth, at which point rollback is not economically feasible. The vote
program may therefore implement Tower BFT. Vote instructions would need to
reference a global Tower account so that it can track cross-block state.
## Challenges

View File

@ -12,7 +12,7 @@ To run a blockstreamer, include the argument `no-signer` and (optional)
`blockstream` socket location:
```bash
$ ./multinode-demo/fullnode-x.sh --no-signer --blockstream <SOCKET>
$ ./multinode-demo/validator-x.sh --no-signer --blockstream <SOCKET>
```
The stream will output a series of JSON objects:

View File

@ -9,29 +9,29 @@ naturally form as a result of leader rotation is described in
described here is how a validator copes with those forks until blocks
are finalized.
The blocktree allows a validator to record every blob it observes
on the network, in any order, as long as the blob is signed by the expected
The blocktree allows a validator to record every shred it observes
on the network, in any order, as long as the shred is signed by the expected
leader for a given slot.
Blobs are moved to a fork-able key space the tuple of `leader slot` + `blob
Shreds are moved to a fork-able key space the tuple of `leader slot` + `shred
index` (within the slot). This permits the skip-list structure of the Solana
protocol to be stored in its entirety, without a-priori choosing which fork to
follow, which Entries to persist or when to persist them.
Repair requests for recent blobs are served out of RAM or recent files and out
of deeper storage for less recent blobs, as implemented by the store backing
Repair requests for recent shreds are served out of RAM or recent files and out
of deeper storage for less recent shreds, as implemented by the store backing
Blocktree.
### Functionalities of Blocktree
1. Persistence: the Blocktree lives in the front of the nodes verification
pipeline, right behind network receive and signature verification. If the
blob received is consistent with the leader schedule (i.e. was signed by the
shred received is consistent with the leader schedule (i.e. was signed by the
leader for the indicated slot), it is immediately stored.
2. Repair: repair is the same as window repair above, but able to serve any
blob that's been received. Blocktree stores blobs with signatures,
shred that's been received. Blocktree stores shreds with signatures,
preserving the chain of origination.
3. Forks: Blocktree supports random access of blobs, so can support a
3. Forks: Blocktree supports random access of shreds, so can support a
validator's need to rollback and replay from a Bank checkpoint.
4. Restart: with proper pruning/culling, the Blocktree can be replayed by
ordered enumeration of entries from slot 0. The logic of the replay stage
@ -41,22 +41,22 @@ the Blocktree.
### Blocktree Design
1. Entries in the Blocktree are stored as key-value pairs, where the key is the concatenated
slot index and blob index for an entry, and the value is the entry data. Note blob indexes are zero-based for each slot (i.e. they're slot-relative).
slot index and shred index for an entry, and the value is the entry data. Note shred indexes are zero-based for each slot (i.e. they're slot-relative).
2. The Blocktree maintains metadata for each slot, in the `SlotMeta` struct containing:
* `slot_index` - The index of this slot
* `num_blocks` - The number of blocks in the slot (used for chaining to a previous slot)
* `consumed` - The highest blob index `n`, such that for all `m < n`, there exists a blob in this slot with blob index equal to `n` (i.e. the highest consecutive blob index).
* `received` - The highest received blob index for the slot
* `consumed` - The highest shred index `n`, such that for all `m < n`, there exists a shred in this slot with shred index equal to `n` (i.e. the highest consecutive shred index).
* `received` - The highest received shred index for the slot
* `next_slots` - A list of future slots this slot could chain to. Used when rebuilding
the ledger to find possible fork points.
* `last_index` - The index of the blob that is flagged as the last blob for this slot. This flag on a blob will be set by the leader for a slot when they are transmitting the last blob for a slot.
* `last_index` - The index of the shred that is flagged as the last shred for this slot. This flag on a shred will be set by the leader for a slot when they are transmitting the last shred for a slot.
* `is_rooted` - True iff every block from 0...slot forms a full sequence without any holes. We can derive is_rooted for each slot with the following rules. Let slot(n) be the slot with index `n`, and slot(n).is_full() is true if the slot with index `n` has all the ticks expected for that slot. Let is_rooted(n) be the statement that "the slot(n).is_rooted is true". Then:
is_rooted(0)
is_rooted(n+1) iff (is_rooted(n) and slot(n).is_full()
3. Chaining - When a blob for a new slot `x` arrives, we check the number of blocks (`num_blocks`) for that new slot (this information is encoded in the blob). We then know that this new slot chains to slot `x - num_blocks`.
3. Chaining - When a shred for a new slot `x` arrives, we check the number of blocks (`num_blocks`) for that new slot (this information is encoded in the shred). We then know that this new slot chains to slot `x - num_blocks`.
4. Subscriptions - The Blocktree records a set of slots that have been "subscribed" to. This means entries that chain to these slots will be sent on the Blocktree channel for consumption by the ReplayStage. See the `Blocktree APIs` for details.

865
book/src/cli.md Normal file
View File

@ -0,0 +1,865 @@
## solana CLI
The [solana-cli crate](https://crates.io/crates/solana-cli) provides a command-line interface tool for Solana
### Examples
#### Get Pubkey
```sh
// Command
$ solana address
// Return
<PUBKEY>
```
#### Airdrop SOL/Lamports
```sh
// Command
$ solana airdrop 2
// Return
"2.00000000 SOL"
// Command
$ solana airdrop 123 --lamports
// Return
"123 lamports"
```
#### Get Balance
```sh
// Command
$ solana balance
// Return
"3.00050001 SOL"
```
#### Confirm Transaction
```sh
// Command
$ solana confirm <TX_SIGNATURE>
// Return
"Confirmed" / "Not found" / "Transaction failed with error <ERR>"
```
#### Deploy program
```sh
// Command
$ solana deploy <PATH>
// Return
<PROGRAM_ID>
```
#### Unconditional Immediate Transfer
```sh
// Command
$ solana pay <PUBKEY> 123
// Return
<TX_SIGNATURE>
```
#### Post-Dated Transfer
```sh
// Command
$ solana pay <PUBKEY> 123 \
--after 2018-12-24T23:59:00 --require-timestamp-from <PUBKEY>
// Return
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
```
*`require-timestamp-from` is optional. If not provided, the transaction will expect a timestamp signed by this wallet's private key*
#### Authorized Transfer
A third party must send a signature to unlock the lamports.
```sh
// Command
$ solana pay <PUBKEY> 123 \
--require-signature-from <PUBKEY>
// Return
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
```
#### Post-Dated and Authorized Transfer
```sh
// Command
$ solana pay <PUBKEY> 123 \
--after 2018-12-24T23:59 --require-timestamp-from <PUBKEY> \
--require-signature-from <PUBKEY>
// Return
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
```
#### Multiple Witnesses
```sh
// Command
$ solana pay <PUBKEY> 123 \
--require-signature-from <PUBKEY> \
--require-signature-from <PUBKEY>
// Return
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
```
#### Cancelable Transfer
```sh
// Command
$ solana pay <PUBKEY> 123 \
--require-signature-from <PUBKEY> \
--cancelable
// Return
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
```
#### Cancel Transfer
```sh
// Command
$ solana cancel <PROCESS_ID>
// Return
<TX_SIGNATURE>
```
#### Send Signature
```sh
// Command
$ solana send-signature <PUBKEY> <PROCESS_ID>
// Return
<TX_SIGNATURE>
```
#### Indicate Elapsed Time
Use the current system time:
```sh
// Command
$ solana send-timestamp <PUBKEY> <PROCESS_ID>
// Return
<TX_SIGNATURE>
```
Or specify some other arbitrary timestamp:
```sh
// Command
$ solana send-timestamp <PUBKEY> <PROCESS_ID> --date 2018-12-24T23:59:00
// Return
<TX_SIGNATURE>
```
### Usage
```manpage
solana 0.12.0
USAGE:
solana [FLAGS] [OPTIONS] [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
SUBCOMMANDS:
address Get your public key
airdrop Request lamports
authorize-voter Authorize a new vote signing keypair for the given vote account
balance Get your balance
cancel Cancel a transfer
claim-storage-reward Redeem storage reward credits
cluster-version Get the version of the cluster entrypoint
confirm Confirm transaction by signature
create-replicator-storage-account Create a replicator storage account
create-storage-mining-pool-account Create mining pool account
create-validator-storage-account Create a validator storage account
create-vote-account Create a vote account
deactivate-stake Deactivate the delegated stake from the stake account
delegate-stake Delegate stake to a vote account
deploy Deploy a program
fees Display current cluster fees
get Get wallet config settings
get-slot Get current slot
get-transaction-count Get current transaction count
help Prints this message or the help of the given subcommand(s)
pay Send a payment
ping Submit transactions sequentially
redeem-vote-credits Redeem credits in the stake account
send-signature Send a signature to authorize a transfer
send-timestamp Send a timestamp to unlock a transfer
set Set a wallet config setting
show-account Show the contents of an account
show-stake-account Show the contents of a stake account
show-storage-account Show the contents of a storage account
show-vote-account Show the contents of a vote account
validator-info Publish/get Validator info on Solana
withdraw-stake Withdraw the unstaked lamports from the stake account
```
```manpage
solana-address
Get your public key
USAGE:
solana address [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
```
```manpage
solana-airdrop
Request a batch of lamports
USAGE:
solana airdrop [OPTIONS] <AMOUNT> [unit]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: /Users/tyeraeulberg/.config/solana/wallet/config.yml]
--drone-host <HOST> Drone host to use [default: the --url host]
--drone-port <PORT> Drone port to use [default: 9900]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<AMOUNT> The airdrop amount to request (default unit SOL)
<unit> Specify unit to use for request and balance display [possible values: SOL, lamports]
```
```manpage
solana-authorize-voter
Authorize a new vote signing keypair for the given vote account
USAGE:
solana authorize-voter [OPTIONS] <VOTE ACCOUNT PUBKEY> <CURRENT VOTER KEYPAIR FILE> <NEW VOTER PUBKEY>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<VOTE ACCOUNT PUBKEY> Vote account in which to set the authorized voter
<CURRENT VOTER KEYPAIR FILE> Keypair file for the currently authorized vote signer
<NEW VOTER PUBKEY> New vote signer to authorize
```
```manpage
solana-balance
Get your balance
USAGE:
solana balance [FLAGS] [OPTIONS] [PUBKEY]
FLAGS:
-h, --help Prints help information
--lamports Display balance in lamports instead of SOL
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<PUBKEY> The public key of the balance to check
```
```manpage
solana-cancel
Cancel a transfer
USAGE:
solana cancel [OPTIONS] <PROCESS ID>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<PROCESS ID> The process id of the transfer to cancel
```
```manpage
solana-claim-storage-reward
Redeem storage reward credits
USAGE:
solana claim-storage-reward [OPTIONS] <NODE PUBKEY> <STORAGE ACCOUNT PUBKEY>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<NODE PUBKEY> The node account to credit the rewards to
<STORAGE ACCOUNT PUBKEY> Storage account address to redeem credits for
```
```manpage
solana-cluster-version
Get the version of the cluster entrypoint
USAGE:
solana cluster-version [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
```
```manpage
solana-confirm
Confirm transaction by signature
USAGE:
solana confirm [OPTIONS] <SIGNATURE>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<SIGNATURE> The transaction signature to confirm
```
```manpage
solana-create-replicator-storage-account
Create a replicator storage account
USAGE:
solana create-replicator-storage-account [OPTIONS] <STORAGE ACCOUNT OWNER PUBKEY> <STORAGE ACCOUNT PUBKEY>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<STORAGE ACCOUNT OWNER PUBKEY>
<STORAGE ACCOUNT PUBKEY>
```
```manpage
solana-create-storage-mining-pool-account
Create mining pool account
USAGE:
solana create-storage-mining-pool-account [OPTIONS] <STORAGE ACCOUNT PUBKEY> <AMOUNT> [unit]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: /Users/tyeraeulberg/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<STORAGE ACCOUNT PUBKEY> Storage mining pool account address to fund
<AMOUNT> The amount to assign to the storage mining pool account (default unit SOL)
<unit> Specify unit to use for request [possible values: SOL, lamports]
```
```manpage
solana-create-validator-storage-account
Create a validator storage account
USAGE:
solana create-validator-storage-account [OPTIONS] <STORAGE ACCOUNT OWNER PUBKEY> <STORAGE ACCOUNT PUBKEY>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<STORAGE ACCOUNT OWNER PUBKEY>
<STORAGE ACCOUNT PUBKEY>
```
```manpage
solana-create-vote-account
Create a vote account
USAGE:
solana create-vote-account [OPTIONS] <VOTE ACCOUNT PUBKEY> <VALIDATOR PUBKEY> <LAMPORTS>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--commission <NUM> The commission taken on reward redemption (0-255), default: 0
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<VOTE ACCOUNT PUBKEY> Vote account address to fund
<VALIDATOR PUBKEY> Validator that will vote with this account
<LAMPORTS> The amount of lamports to send to the vote account
```
```manpage
solana-deactivate-stake
Deactivate the delegated stake from the stake account
USAGE:
solana deactivate-stake [OPTIONS] <STAKE ACCOUNT KEYPAIR FILE> <PUBKEY>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<STAKE ACCOUNT KEYPAIR FILE> Keypair file for the stake account, for signing the delegate transaction.
<PUBKEY> The vote account to which the stake is currently delegated
```
```manpage
solana-delegate-stake
Delegate stake to a vote account
USAGE:
solana delegate-stake [OPTIONS] <STAKE ACCOUNT KEYPAIR FILE> <VOTE ACCOUNT PUBKEY> <AMOUNT> [unit]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: /Users/tyeraeulberg/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<STAKE ACCOUNT KEYPAIR FILE> Keypair file for the new stake account
<VOTE ACCOUNT PUBKEY> The vote account to which the stake will be delegated
<AMOUNT> The amount to delegate (default unit SOL)
<unit> Specify unit to use for request [possible values: SOL, lamports]
```
```manpage
solana-deploy
Deploy a program
USAGE:
solana deploy [OPTIONS] <PATH TO PROGRAM>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<PATH TO PROGRAM> /path/to/program.o
```
```manpage
solana-fees
Display current cluster fees
USAGE:
solana fees [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
```
```manpage
solana-get
Get wallet config settings
USAGE:
solana get [OPTIONS] [CONFIG_FIELD]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<CONFIG_FIELD> Return a specific config setting [possible values: url, keypair]
```
```manpage
solana-get-slot
Get current slot
USAGE:
solana get-slot [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
```
```manpage
solana-get-transaction-count
Get current transaction count
USAGE:
solana get-transaction-count [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
```
```manpage
solana-pay
Send a payment
USAGE:
solana pay [FLAGS] [OPTIONS] <PUBKEY> <AMOUNT> [--] [unit]
FLAGS:
--cancelable
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default:
/Users/tyeraeulberg/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
--after <DATETIME> A timestamp after which transaction will execute
--require-timestamp-from <PUBKEY> Require timestamp from this third party
--require-signature-from <PUBKEY>... Any third party signatures required to unlock the lamports
ARGS:
<PUBKEY> The public key of recipient
<AMOUNT> The amount to send (default unit SOL)
<unit> Specify unit to use for request [possible values: SOL, lamports]
```
```manpage
solana-ping
Submit transactions sequentially
USAGE:
solana ping [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default:
~/.config/solana/wallet/config.yml]
-c, --count <NUMBER> Stop after submitting count transactions
-i, --interval <SECONDS> Wait interval seconds between submitting the next transaction [default: 2]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
-t, --timeout <SECONDS> Wait up to timeout seconds for transaction confirmation [default: 10]
```
```manpage
solana-redeem-vote-credits
Redeem credits in the stake account
USAGE:
solana redeem-vote-credits [OPTIONS] <STAKING ACCOUNT PUBKEY> <VOTE ACCOUNT PUBKEY>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<STAKING ACCOUNT PUBKEY> Staking account address to redeem credits for
<VOTE ACCOUNT PUBKEY> The vote account to which the stake was previously delegated.
```
```manpage
solana-send-signature
Send a signature to authorize a transfer
USAGE:
solana send-signature [OPTIONS] <PUBKEY> <PROCESS ID>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<PUBKEY> The public key of recipient
<PROCESS ID> The process id of the transfer to authorize
```
```manpage
solana-send-timestamp
Send a timestamp to unlock a transfer
USAGE:
solana send-timestamp [OPTIONS] <PUBKEY> <PROCESS ID>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
--date <DATETIME> Optional arbitrary timestamp to apply
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<PUBKEY> The public key of recipient
<PROCESS ID> The process id of the transfer to unlock
```
```manpage
solana-set
Set a wallet config setting
USAGE:
solana set [OPTIONS] <--url <URL>|--keypair <PATH>>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
```
```manpage
solana-show-account
Show the contents of an account
USAGE:
solana show-account [FLAGS] [OPTIONS] <ACCOUNT PUBKEY>
FLAGS:
-h, --help Prints help information
--lamports Display balance in lamports instead of SOL
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
-o, --output <FILE> Write the account data to this file
ARGS:
<ACCOUNT PUBKEY> Account public key
```
```manpage
solana-show-stake-account
Show the contents of a stake account
USAGE:
solana show-stake-account [OPTIONS] <STAKE ACCOUNT PUBKEY>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<STAKE ACCOUNT PUBKEY> Stake account public key
```
```manpage
solana-show-storage-account
Show the contents of a storage account
USAGE:
solana show-storage-account [OPTIONS] <STORAGE ACCOUNT PUBKEY>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<STORAGE ACCOUNT PUBKEY> Storage account public key
```
```manpage
solana-show-vote-account
Show the contents of a vote account
USAGE:
solana show-vote-account [OPTIONS] <VOTE ACCOUNT PUBKEY>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<VOTE ACCOUNT PUBKEY> Vote account public key
```
```manpage
solana-validator-info
Publish/get Validator info on Solana
USAGE:
solana validator-info [OPTIONS] [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
SUBCOMMANDS:
get Get and parse Solana Validator info
help Prints this message or the help of the given subcommand(s)
publish Publish Validator info on Solana
```
```manpage
solana-withdraw-stake
Withdraw the unstaked lamports from the stake account
USAGE:
solana withdraw-stake [OPTIONS] <STAKE ACCOUNT KEYPAIR FILE> <DESTINATION PUBKEY> <AMOUNT> [unit]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-C, --config <PATH> Configuration file to use [default: /Users/tyeraeulberg/.config/solana/wallet/config.yml]
-u, --url <URL> JSON RPC URL for the solana cluster
-k, --keypair <PATH> /path/to/id.json
ARGS:
<STAKE ACCOUNT KEYPAIR FILE> Keypair file for the stake account, for signing the withdraw transaction.
<DESTINATION PUBKEY> The account where the lamports should be transfered
<AMOUNT> The amount to withdraw from the stake account (default unit SOL)
<unit> Specify unit to use for request [possible values: SOL, lamports]
```

View File

@ -20,7 +20,7 @@ least amount of internal plumbing exposed to the test.
Tests are provided an entry point, which is a `contact_info::ContactInfo`
structure, and a keypair that has already been funded.
Each node in the cluster is configured with a `fullnode::FullnodeConfig` at boot
Each node in the cluster is configured with a `fullnode::ValidatorConfig` at boot
time. At boot time this configuration specifies any extra cluster configuration
required for the test. The cluster should boot with the configuration when it
is run in-process or in a data center.
@ -61,18 +61,18 @@ let cluster_nodes = discover_nodes(&entry_point_info, num_nodes);
To enable specific scenarios, the cluster needs to be booted with special
configurations. These configurations can be captured in
`fullnode::FullnodeConfig`.
`fullnode::ValidatorConfig`.
For example:
```rust,ignore
let mut fullnode_config = FullnodeConfig::default();
fullnode_config.rpc_config.enable_fullnode_exit = true;
let mut validator_config = ValidatorConfig::default();
validator_config.rpc_config.enable_fullnode_exit = true;
let local = LocalCluster::new_with_config(
num_nodes,
10_000,
100,
&fullnode_config
&validator_config
);
```
@ -86,9 +86,9 @@ advertised gossip nodes.
Configure the RPC service:
```rust,ignore
let mut fullnode_config = FullnodeConfig::default();
fullnode_config.rpc_config.enable_rpc_gossip_push = true;
fullnode_config.rpc_config.enable_rpc_gossip_refresh_active_set = true;
let mut validator_config = ValidatorConfig::default();
validator_config.rpc_config.enable_rpc_gossip_push = true;
validator_config.rpc_config.enable_rpc_gossip_refresh_active_set = true;
```
Wire the RPCs and write a new test:

View File

@ -13,7 +13,7 @@ buggy and malicious nodes.
Before starting any fullnodes, one first needs to create a *genesis block*.
The block contains entries referencing two public keys, a *mint* and a
*bootstrap leader*. The fullnode holding the bootstrap leader's secret key is
*bootstrap leader*. The fullnode holding the bootstrap leader's private key is
responsible for appending the first entries to the ledger. It initializes its
internal state with the mint's account. That account will hold the number of
native tokens defined by the genesis block. The second fullnode then contacts
@ -28,7 +28,7 @@ its copy.
## Joining a Cluster
Fullnodes and replicators enter the cluster via registration messages sent to
Validators and replicators enter the cluster via registration messages sent to
its *control plane*. The control plane is implemented using a *gossip*
protocol, meaning that a node may register with any existing node, and expect
its registration to propagate to all nodes in the cluster. The time it takes

View File

@ -0,0 +1,41 @@
# A Solana Cluster
A Solana cluster is a set of fullnodes working together to serve client transactions and maintain the integrity of the ledger. Many clusters may coexist. When two clusters share a common genesis block, they attempt to converge. Otherwise, they simply ignore the existence of the other. Transactions sent to the wrong one are quietly rejected. In this chapter, we'll discuss how a cluster is created, how nodes join the cluster, how they share the ledger, how they ensure the ledger is replicated, and how they cope with buggy and malicious nodes.
## Creating a Cluster
Before starting any fullnodes, one first needs to create a _genesis block_. The block contains entries referencing two public keys, a _mint_ and a _bootstrap leader_. The fullnode holding the bootstrap leader's secret key is responsible for appending the first entries to the ledger. It initializes its internal state with the mint's account. That account will hold the number of native tokens defined by the genesis block. The second fullnode then contacts the bootstrap leader to register as a _validator_ or _replicator_. Additional fullnodes then register with any registered member of the cluster.
A validator receives all entries from the leader and submits votes confirming those entries are valid. After voting, the validator is expected to store those entries until replicator nodes submit proofs that they have stored copies of it. Once the validator observes a sufficient number of copies exist, it deletes its copy.
## Joining a Cluster
Validators and replicators enter the cluster via registration messages sent to its _control plane_. The control plane is implemented using a _gossip_ protocol, meaning that a node may register with any existing node, and expect its registration to propagate to all nodes in the cluster. The time it takes for all nodes to synchronize is proportional to the square of the number of nodes participating in the cluster. Algorithmically, that's considered very slow, but in exchange for that time, a node is assured that it eventually has all the same information as every other node, and that that information cannot be censored by any one node.
## Sending Transactions to a Cluster
Clients send transactions to any fullnode's Transaction Processing Unit \(TPU\) port. If the node is in the validator role, it forwards the transaction to the designated leader. If in the leader role, the node bundles incoming transactions, timestamps them creating an _entry_, and pushes them onto the cluster's _data plane_. Once on the data plane, the transactions are validated by validator nodes and replicated by replicator nodes, effectively appending them to the ledger.
## Confirming Transactions
A Solana cluster is capable of subsecond _confirmation_ for up to 150 nodes with plans to scale up to hundreds of thousands of nodes. Once fully implemented, confirmation times are expected to increase only with the logarithm of the number of validators, where the logarithm's base is very high. If the base is one thousand, for example, it means that for the first thousand nodes, confirmation will be the duration of three network hops plus the time it takes the slowest validator of a supermajority to vote. For the next million nodes, confirmation increases by only one network hop.
Solana defines confirmation as the duration of time from when the leader timestamps a new entry to the moment when it recognizes a supermajority of ledger votes.
A gossip network is much too slow to achieve subsecond confirmation once the network grows beyond a certain size. The time it takes to send messages to all nodes is proportional to the square of the number of nodes. If a blockchain wants to achieve low confirmation and attempts to do it using a gossip network, it will be forced to centralize to just a handful of nodes.
Scalable confirmation can be achieved using the follow combination of techniques:
1. Timestamp transactions with a VDF sample and sign the timestamp.
2. Split the transactions into batches, send each to separate nodes and have
each node share its batch with its peers.
3. Repeat the previous step recursively until all nodes have all batches.
Solana rotates leaders at fixed intervals, called _slots_. Each leader may only produce entries during its allotted slot. The leader therefore timestamps transactions so that validators may lookup the public key of the designated leader. The leader then signs the timestamp so that a validator may verify the signature, proving the signer is owner of the designated leader's public key.
Next, transactions are broken into batches so that a node can send transactions to multiple parties without making multiple copies. If, for example, the leader needed to send 60 transactions to 6 nodes, it would break that collection of 60 into batches of 10 transactions and send one to each node. This allows the leader to put 60 transactions on the wire, not 60 transactions for each node. Each node then shares its batch with its peers. Once the node has collected all 6 batches, it reconstructs the original set of 60 transactions.
A batch of transactions can only be split so many times before it is so small that header information becomes the primary consumer of network bandwidth. At the time of this writing, the approach is scaling well up to about 150 validators. To scale up to hundreds of thousands of validators, each node can apply the same technique as the leader node to another set of nodes of equal size. We call the technique _data plane fanout_; learn more in the [data plan fanout](https://github.com/solana-labs/solana/tree/6b18db969dd1616eff07de35e7b823c75339fea8/book/src/data-plane-fanout.md) section.

View File

@ -0,0 +1,81 @@
# Fork Generation
The chapter describes how forks naturally occur as a consequence of [leader rotation](leader-rotation.md).
## Overview
Nodes take turns being leader and generating the PoH that encodes state changes. The cluster can tolerate loss of connection to any leader by synthesizing what the leader _**would**_ have generated had it been connected but not ingesting any state changes. The possible number of forks is thereby limited to a "there/not-there" skip list of forks that may arise on leader rotation slot boundaries. At any given slot, only a single leader's transactions will be accepted.
## Message Flow
1. Transactions are ingested by the current leader.
2. Leader filters valid transactions.
3. Leader executes valid transactions updating its state.
4. Leader packages transactions into entries based off its current PoH slot.
5. Leader transmits the entries to validator nodes \(in signed blobs\)
1. The PoH stream includes ticks; empty entries that indicate liveness of
the leader and the passage of time on the cluster.
2. A leader's stream begins with the tick entries necessary complete the PoH
back to the leaders most recently observed prior leader slot.
6. Validators retransmit entries to peers in their set and to further
downstream nodes.
7. Validators validate the transactions and execute them on their state.
8. Validators compute the hash of the state.
9. At specific times, i.e. specific PoH tick counts, validators transmit votes
to the leader.
1. Votes are signatures of the hash of the computed state at that PoH tick
count
2. Votes are also propagated via gossip
10. Leader executes the votes as any other transaction and broadcasts them to
the cluster.
11. Validators observe their votes and all the votes from the cluster.
## Partitions, Forks
Forks can arise at PoH tick counts that correspond to a vote. The next leader may not have observed the last vote slot and may start their slot with generated virtual PoH entries. These empty ticks are generated by all nodes in the cluster at a cluster-configured rate for hashes/per/tick `Z`.
There are only two possible versions of the PoH during a voting slot: PoH with `T` ticks and entries generated by the current leader, or PoH with just ticks. The "just ticks" version of the PoH can be thought of as a virtual ledger, one that all nodes in the cluster can derive from the last tick in the previous slot.
Validators can ignore forks at other points \(e.g. from the wrong leader\), or slash the leader responsible for the fork.
Validators vote based on a greedy choice to maximize their reward described in [Tower BFT](../implemented-proposals/tower-bft.md).
### Validator's View
#### Time Progression
The diagram below represents a validator's view of the PoH stream with possible forks over time. L1, L2, etc. are leader slots, and `E`s represent entries from that leader during that leader's slot. The `x`s represent ticks only, and time flows downwards in the diagram.
![Fork generation](https://github.com/solana-labs/solana/tree/6b18db969dd1616eff07de35e7b823c75339fea8/book/src/img/fork-generation.svg)
Note that an `E` appearing on 2 forks at the same slot is a slashable condition, so a validator observing `E3` and `E3'` can slash L3 and safely choose `x` for that slot. Once a validator commits to a forks, other forks can be discarded below that tick count. For any slot, validators need only consider a single "has entries" chain or a "ticks only" chain to be proposed by a leader. But multiple virtual entries may overlap as they link back to the a previous slot.
#### Time Division
It's useful to consider leader rotation over PoH tick count as time division of the job of encoding state for the cluster. The following table presents the above tree of forks as a time-divided ledger.
| leader slot | L1 | L2 | L3 | L4 | L5 |
| :--- | :--- | :--- | :--- | :--- | :--- |
| data | E1 | E2 | E3 | E4 | E5 |
| ticks since prev | | | | x | xx |
Note that only data from leader L3 will be accepted during leader slot L3. Data from L3 may include "catchup" ticks back to a slot other than L2 if L3 did not observe L2's data. L4 and L5's transmissions include the "ticks to prev" PoH entries.
This arrangement of the network data streams permits nodes to save exactly this to the ledger for replay, restart, and checkpoints.
### Leader's View
When a new leader begins a slot, it must first transmit any PoH \(ticks\) required to link the new slot with the most recently observed and voted slot. The fork the leader proposes would link the current slot to a previous fork that the leader has voted on with virtual ticks.

View File

@ -0,0 +1,98 @@
# Leader Rotation
At any given moment, a cluster expects only one fullnode to produce ledger entries. By having only one leader at a time, all validators are able to replay identical copies of the ledger. The drawback of only one leader at a time, however, is that a malicious leader is capable of censoring votes and transactions. Since censoring cannot be distinguished from the network dropping packets, the cluster cannot simply elect a single node to hold the leader role indefinitely. Instead, the cluster minimizes the influence of a malicious leader by rotating which node takes the lead.
Each validator selects the expected leader using the same algorithm, described below. When the validator receives a new signed ledger entry, it can be certain that entry was produced by the expected leader. The order of slots which each leader is assigned a slot is called a _leader schedule_.
## Leader Schedule Rotation
A validator rejects blocks that are not signed by the _slot leader_. The list of identities of all slot leaders is called a _leader schedule_. The leader schedule is recomputed locally and periodically. It assigns slot leaders for a duration of time called an _epoch_. The schedule must be computed far in advance of the slots it assigns, such that the ledger state it uses to compute the schedule is finalized. That duration is called the _leader schedule offset_. Solana sets the offset to the duration of slots until the next epoch. That is, the leader schedule for an epoch is calculated from the ledger state at the start of the previous epoch. The offset of one epoch is fairly arbitrary and assumed to be sufficiently long such that all validators will have finalized their ledger state before the next schedule is generated. A cluster may choose to shorten the offset to reduce the time between stake changes and leader schedule updates.
While operating without partitions lasting longer than an epoch, the schedule only needs to be generated when the root fork crosses the epoch boundary. Since the schedule is for the next epoch, any new stakes committed to the root fork will not be active until the next epoch. The block used for generating the leader schedule is the first block to cross the epoch boundary.
Without a partition lasting longer than an epoch, the cluster will work as follows:
1. A validator continuously updates its own root fork as it votes.
2. The validator updates its leader schedule each time the slot height crosses an epoch boundary.
For example:
The epoch duration is 100 slots. The root fork is updated from fork computed at slot height 99 to a fork computed at slot height 102. Forks with slots at height 100,101 were skipped because of failures. The new leader schedule is computed using fork at slot height 102. It is active from slot 200 until it is updated again.
No inconsistency can exist because every validator that is voting with the cluster has skipped 100 and 101 when its root passes 102. All validators, regardless of voting pattern, would be committing to a root that is either 102, or a descendant of 102.
### Leader Schedule Rotation with Epoch Sized Partitions.
The duration of the leader schedule offset has a direct relationship to the likelihood of a cluster having an inconsistent view of the correct leader schedule.
Consider the following scenario:
Two partitions that are generating half of the blocks each. Neither is coming to a definitive supermajority fork. Both will cross epoch 100 and 200 without actually committing to a root and therefore a cluster wide commitment to a new leader schedule.
In this unstable scenario, multiple valid leader schedules exist.
* A leader schedule is generated for every fork whose direct parent is in the previous epoch.
* The leader schedule is valid after the start of the next epoch for descendant forks until it is updated.
Each partition's schedule will diverge after the partition lasts more than an epoch. For this reason, the epoch duration should be selected to be much much larger then slot time and the expected length for a fork to be committed to root.
After observing the cluster for a sufficient amount of time, the leader schedule offset can be selected based on the median partition duration and its standard deviation. For example, an offset longer then the median partition duration plus six standard deviations would reduce the likelihood of an inconsistent ledger schedule in the cluster to 1 in 1 million.
## Leader Schedule Generation at Genesis
The genesis block declares the first leader for the first epoch. This leader ends up scheduled for the first two epochs because the leader schedule is also generated at slot 0 for the next epoch. The length of the first two epochs can be specified in the genesis block as well. The minimum length of the first epochs must be greater than or equal to the maximum rollback depth as defined in [Tower BFT](../implemented-proposals/tower-bft.md).
## Leader Schedule Generation Algorithm
Leader schedule is generated using a predefined seed. The process is as follows:
1. Periodically use the PoH tick height \(a monotonically increasing counter\) to
seed a stable pseudo-random algorithm.
2. At that height, sample the bank for all the staked accounts with leader
identities that have voted within a cluster-configured number of ticks. The
sample is called the _active set_.
3. Sort the active set by stake weight.
4. Use the random seed to select nodes weighted by stake to create a
stake-weighted ordering.
5. This ordering becomes valid after a cluster-configured number of ticks.
## Schedule Attack Vectors
### Seed
The seed that is selected is predictable but unbiasable. There is no grinding attack to influence its outcome.
### Active Set
A leader can bias the active set by censoring validator votes. Two possible ways exist for leaders to censor the active set:
* Ignore votes from validators
* Refuse to vote for blocks with votes from validators
To reduce the likelihood of censorship, the active set is calculated at the leader schedule offset boundary over an _active set sampling duration_. The active set sampling duration is long enough such that votes will have been collected by multiple leaders.
### Staking
Leaders can censor new staking transactions or refuse to validate blocks with new stakes. This attack is similar to censorship of validator votes.
### Validator operational key loss
Leaders and validators are expected to use ephemeral keys for operation, and stake owners authorize the validators to do work with their stake via delegation.
The cluster should be able to recover from the loss of all the ephemeral keys used by leaders and validators, which could occur through a common software vulnerability shared by all the nodes. Stake owners should be able to vote directly co-sign a validator vote even though the stake is currently delegated to a validator.
## Appending Entries
The lifetime of a leader schedule is called an _epoch_. The epoch is split into _slots_, where each slot has a duration of `T` PoH ticks.
A leader transmits entries during its slot. After `T` ticks, all the validators switch to the next scheduled leader. Validators must ignore entries sent outside a leader's assigned slot.
All `T` ticks must be observed by the next leader for it to build its own entries on. If entries are not observed \(leader is down\) or entries are invalid \(leader is buggy or malicious\), the next leader must produce ticks to fill the previous leader's slot. Note that the next leader should do repair requests in parallel, and postpone sending ticks until it is confident other validators also failed to observe the previous leader's entries. If a leader incorrectly builds on its own ticks, the leader following it must replace all its ticks.

View File

@ -0,0 +1,269 @@
# Ledger Replication
At full capacity on a 1gbps network solana will generate 4 petabytes of data per year. To prevent the network from centralizing around validators that have to store the full data set this protocol proposes a way for mining nodes to provide storage capacity for pieces of the data.
The basic idea to Proof of Replication is encrypting a dataset with a public symmetric key using CBC encryption, then hash the encrypted dataset. The main problem with the naive approach is that a dishonest storage node can stream the encryption and delete the data as it's hashed. The simple solution is to periodically regenerate the hash based on a signed PoH value. This ensures that all the data is present during the generation of the proof and it also requires validators to have the entirety of the encrypted data present for verification of every proof of every identity. So the space required to validate is `number_of_proofs * data_size`
## Optimization with PoH
Our improvement on this approach is to randomly sample the encrypted segments faster than it takes to encrypt, and record the hash of those samples into the PoH ledger. Thus the segments stay in the exact same order for every PoRep and verification can stream the data and verify all the proofs in a single batch. This way we can verify multiple proofs concurrently, each one on its own CUDA core. The total space required for verification is `1_ledger_segment + 2_cbc_blocks * number_of_identities` with core count equal to `number_of_identities`. We use a 64-byte chacha CBC block size.
## Network
Validators for PoRep are the same validators that are verifying transactions. If a replicator can prove that a validator verified a fake PoRep, then the validator will not receive a reward for that storage epoch.
Replicators are specialized _light clients_. They download a part of the ledger \(a.k.a Segment\) and store it, and provide PoReps of storing the ledger. For each verified PoRep replicators earn a reward of sol from the mining pool.
## Constraints
We have the following constraints:
* Verification requires generating the CBC blocks. That requires space of 2
blocks per identity, and 1 CUDA core per identity for the same dataset. So as
many identities at once should be batched with as many proofs for those
identities verified concurrently for the same dataset.
* Validators will randomly sample the set of storage proofs to the set that
they can handle, and only the creators of those chosen proofs will be
rewarded. The validator can run a benchmark whenever its hardware configuration
changes to determine what rate it can validate storage proofs.
## Validation and Replication Protocol
### Constants
1. SLOTS\_PER\_SEGMENT: Number of slots in a segment of ledger data. The
unit of storage for a replicator.
2. NUM\_KEY\_ROTATION\_SEGMENTS: Number of segments after which replicators
regenerate their encryption keys and select a new dataset to store.
3. NUM\_STORAGE\_PROOFS: Number of storage proofs required for a storage proof
claim to be successfully rewarded.
4. RATIO\_OF\_FAKE\_PROOFS: Ratio of fake proofs to real proofs that a storage
mining proof claim has to contain to be valid for a reward.
5. NUM\_STORAGE\_SAMPLES: Number of samples required for a storage mining
proof.
6. NUM\_CHACHA\_ROUNDS: Number of encryption rounds performed to generate
encrypted state.
7. NUM\_SLOTS\_PER\_TURN: Number of slots that define a single storage epoch or
a "turn" of the PoRep game.
### Validator behavior
1. Validators join the network and begin looking for replicator accounts at each
storage epoch/turn boundary.
2. Every turn, Validators sign the PoH value at the boundary and use that signature
to randomly pick proofs to verify from each storage account found in the turn boundary.
This signed value is also submitted to the validator's storage account and will be used by
replicators at a later stage to cross-verify.
3. Every `NUM_SLOTS_PER_TURN` slots the validator advertises the PoH value. This is value
is also served to Replicators via RPC interfaces.
4. For a given turn N, all validations get locked out until turn N+3 \(a gap of 2 turn/epoch\).
At which point all validations during that turn are available for reward collection.
5. Any incorrect validations will be marked during the turn in between.
### Replicator behavior
1. Since a replicator is somewhat of a light client and not downloading all the
ledger data, they have to rely on other validators and replicators for information.
Any given validator may or may not be malicious and give incorrect information, although
there are not any obvious attack vectors that this could accomplish besides having the
replicator do extra wasted work. For many of the operations there are a number of options
depending on how paranoid a replicator is:
* \(a\) replicator can ask a validator
* \(b\) replicator can ask multiple validators
* \(c\) replicator can ask other replicators
* \(d\) replicator can subscribe to the full transaction stream and generate
the information itself \(assuming the slot is recent enough\)
* \(e\) replicator can subscribe to an abbreviated transaction stream to
generate the information itself \(assuming the slot is recent enough\)
2. A replicator obtains the PoH hash corresponding to the last turn with its slot.
3. The replicator signs the PoH hash with its keypair. That signature is the
seed used to pick the segment to replicate and also the encryption key. The
replicator mods the signature with the slot to get which segment to
replicate.
4. The replicator retrives the ledger by asking peer validators and
replicators. See 6.5.
5. The replicator then encrypts that segment with the key with chacha algorithm
in CBC mode with `NUM_CHACHA_ROUNDS` of encryption.
6. The replicator initializes a chacha rng with the a signed recent PoH value as
the seed.
7. The replicator generates `NUM_STORAGE_SAMPLES` samples in the range of the
entry size and samples the encrypted segment with sha256 for 32-bytes at each
offset value. Sampling the state should be faster than generating the encrypted
segment.
8. The replicator sends a PoRep proof transaction which contains its sha state
at the end of the sampling operation, its seed and the samples it used to the
current leader and it is put onto the ledger.
9. During a given turn the replicator should submit many proofs for the same segment
and based on the `RATIO_OF_FAKE_PROOFS` some of those proofs must be fake.
10. As the PoRep game enters the next turn, the replicator must submit a
transaction with the mask of which proofs were fake during the last turn. This
transaction will define the rewards for both replicators and validators.
11. Finally for a turn N, as the PoRep game enters turn N + 3, replicator's proofs for
turn N will be counted towards their rewards.
### The PoRep Game
The Proof of Replication game has 4 primary stages. For each "turn" multiple PoRep games can be in progress but each in a different stage.
The 4 stages of the PoRep Game are as follows:
1. Proof submission stage
* Replicators: submit as many proofs as possible during this stage
* Validators: No-op
2. Proof verification stage
* Replicators: No-op
* Validators: Select replicators and verify their proofs from the previous turn
3. Proof challenge stage
* Replicators: Submit the proof mask with justifications \(for fake proofs submitted 2 turns ago\)
* Validators: No-op
4. Reward collection stage
* Replicators: Collect rewards for 3 turns ago
* Validators: Collect rewards for 3 turns ago
For each turn of the PoRep game, both Validators and Replicators evaluate each stage. The stages are run as separate transactions on the storage program.
### Finding who has a given block of ledger
1. Validators monitor the turns in the PoRep game and look at the rooted bank
at turn boundaries for any proofs.
2. Validators maintain a map of ledger segments and corresponding replicator public keys.
The map is updated when a Validator processes a replicator's proofs for a segment.
The validator provides an RPC interface to access the this map. Using this API, clients
can map a segment to a replicator's network address \(correlating it via cluster\_info table\).
The clients can then send repair requests to the replicator to retrieve segments.
3. Validators would need to invalidate this list every N turns.
## Sybil attacks
For any random seed, we force everyone to use a signature that is derived from a PoH hash at the turn boundary. Everyone uses the same count, so the same PoH hash is signed by every participant. The signatures are then each cryptographically tied to the keypair, which prevents a leader from grinding on the resulting value for more than 1 identity.
Since there are many more client identities then encryption identities, we need to split the reward for multiple clients, and prevent Sybil attacks from generating many clients to acquire the same block of data. To remain BFT we want to avoid a single human entity from storing all the replications of a single chunk of the ledger.
Our solution to this is to force the clients to continue using the same identity. If the first round is used to acquire the same block for many client identities, the second round for the same client identities will force a redistribution of the signatures, and therefore PoRep identities and blocks. Thus to get a reward for replicators need to store the first block for free and the network can reward long lived client identities more than new ones.
## Validator attacks
* If a validator approves fake proofs, replicator can easily out them by
showing the initial state for the hash.
* If a validator marks real proofs as fake, no on-chain computation can be done
to distinguish who is correct. Rewards would have to rely on the results from
multiple validators to catch bad actors and replicators from being denied rewards.
* Validator stealing mining proof results for itself. The proofs are derived
from a signature from a replicator, since the validator does not know the
private key used to generate the encryption key, it cannot be the generator of
the proof.
## Reward incentives
Fake proofs are easy to generate but difficult to verify. For this reason, PoRep proof transactions generated by replicators may require a higher fee than a normal transaction to represent the computational cost required by validators.
Some percentage of fake proofs are also necessary to receive a reward from storage mining.
## Notes
* We can reduce the costs of verification of PoRep by using PoH, and actually
make it feasible to verify a large number of proofs for a global dataset.
* We can eliminate grinding by forcing everyone to sign the same PoH hash and
use the signatures as the seed
* The game between validators and replicators is over random blocks and random
encryption identities and random data samples. The goal of randomization is
to prevent colluding groups from having overlap on data or validation.
* Replicator clients fish for lazy validators by submitting fake proofs that
they can prove are fake.
* To defend against Sybil client identities that try to store the same block we
force the clients to store for multiple rounds before receiving a reward.
* Validators should also get rewarded for validating submitted storage proofs
as incentive for storing the ledger. They can only validate proofs if they
are storing that slice of the ledger.

View File

@ -0,0 +1,35 @@
# Managing Forks
The ledger is permitted to fork at slot boundaries. The resulting data structure forms a tree called a _blocktree_. When the fullnode interprets the blocktree, it must maintain state for each fork in the chain. We call each instance an _active fork_. It is the responsibility of a fullnode to weigh those forks, such that it may eventually select a fork.
A fullnode selects a fork by submiting a vote to a slot leader on that fork. The vote commits the fullnode for a duration of time called a _lockout period_. The fullnode is not permitted to vote on a different fork until that lockout period expires. Each subsequent vote on the same fork doubles the length of the lockout period. After some cluster-configured number of votes \(currently 32\), the length of the lockout period reaches what's called _max lockout_. Until the max lockout is reached, the fullnode has the option to wait until the lockout period is over and then vote on another fork. When it votes on another fork, it performs a operation called _rollback_, whereby the state rolls back in time to a shared checkpoint and then jumps forward to the tip of the fork that it just voted on. The maximum distance that a fork may roll back is called the _rollback depth_. Rollback depth is the number of votes required to achieve max lockout. Whenever a fullnode votes, any checkpoints beyond the rollback depth become unreachable. That is, there is no scenario in which the fullnode will need to roll back beyond rollback depth. It therefore may safely _prune_ unreachable forks and _squash_ all checkpoints beyond rollback depth into the root checkpoint.
## Active Forks
An active fork is as a sequence of checkpoints that has a length at least one longer than the rollback depth. The shortest fork will have a length exactly one longer than the rollback depth. For example:
![Forks](https://github.com/solana-labs/solana/tree/6b18db969dd1616eff07de35e7b823c75339fea8/book/src/img/forks.svg)
The following sequences are _active forks_:
* {4, 2, 1}
* {5, 2, 1}
* {6, 3, 1}
* {7, 3, 1}
## Pruning and Squashing
A fullnode may vote on any checkpoint in the tree. In the diagram above, that's every node except the leaves of the tree. After voting, the fullnode prunes nodes that fork from a distance farther than the rollback depth and then takes the opportunity to minimize its memory usage by squashing any nodes it can into the root.
Starting from the example above, wth a rollback depth of 2, consider a vote on 5 versus a vote on 6. First, a vote on 5:
![Forks after pruning](https://github.com/solana-labs/solana/tree/6b18db969dd1616eff07de35e7b823c75339fea8/book/src/img/forks-pruned.svg)
The new root is 2, and any active forks that are not descendants from 2 are pruned.
Alternatively, a vote on 6:
![Forks](https://github.com/solana-labs/solana/tree/6b18db969dd1616eff07de35e7b823c75339fea8/book/src/img/forks-pruned2.svg)
The tree remains with a root of 1, since the active fork starting at 6 is only 2 checkpoints from the root.

View File

@ -0,0 +1,16 @@
# Performance Metrics
Solana cluster performance is measured as average number of transactions per second that the network can sustain \(TPS\). And, how long it takes for a transaction to be confirmed by super majority of the cluster \(Confirmation Time\).
Each cluster node maintains various counters that are incremented on certain events. These counters are periodically uploaded to a cloud based database. Solana's metrics dashboard fetches these counters, and computes the performance metrics and displays it on the dashboard.
## TPS
Each node's bank runtime maintains a count of transactions that it has processed. The dashboard first calculates the median count of transactions across all metrics enabled nodes in the cluster. The median cluster transaction count is then averaged over a 2 second period and displayed in the TPS time series graph. The dashboard also shows the Mean TPS, Max TPS and Total Transaction Count stats which are all calculated from the median transaction count.
## Confirmation Time
Each validator node maintains a list of active ledger forks that are visible to the node. A fork is considered to be frozen when the node has received and processed all entries corresponding to the fork. A fork is considered to be confirmed when it receives cumulative super majority vote, and when one of its children forks is frozen.
The node assigns a timestamp to every new fork, and computes the time it took to confirm the fork. This time is reflected as validator confirmation time in performance metrics. The performance dashboard displays the average of each validator node's confirmation time as a time series graph.

View File

@ -0,0 +1,209 @@
# Stake Delegation and Rewards
Stakers are rewarded for helping to validate the ledger. They do this by delegating their stake to validator nodes. Those validators do the legwork of replaying the ledger and send votes to a per-node vote account to which stakers can delegate their stakes. The rest of the cluster uses those stake-weighted votes to select a block when forks arise. Both the validator and staker need some economic incentive to play their part. The validator needs to be compensated for its hardware and the staker needs to be compensated for the risk of getting its stake slashed. The economics are covered in [staking rewards](../proposals/staking-rewards.md). This chapter, on the other hand, describes the underlying mechanics of its implementation.
## Basic Design
The general idea is that the validator owns a Vote account. The Vote account tracks validator votes, counts validator generated credits, and provides any additional validator specific state. The Vote account is not aware of any stakes delegated to it and has no staking weight.
A separate Stake account \(created by a staker\) names a Vote account to which the stake is delegated. Rewards generated are proportional to the amount of lamports staked. The Stake account is owned by the staker only. Some portion of the lamports stored in this account are the stake.
## Passive Delegation
Any number of Stake accounts can delegate to a single Vote account without an interactive action from the identity controlling the Vote account or submitting votes to the account.
The total stake allocated to a Vote account can be calculated by the sum of all the Stake accounts that have the Vote account pubkey as the `StakeState::Stake::voter_pubkey`.
## Vote and Stake accounts
The rewards process is split into two on-chain programs. The Vote program solves the problem of making stakes slashable. The Stake account acts as custodian of the rewards pool, and provides passive delegation. The Stake program is responsible for paying out each staker once the staker proves to the Stake program that its delegate has participated in validating the ledger.
### VoteState
VoteState is the current state of all the votes the validator has submitted to the network. VoteState contains the following state information:
* `votes` - The submitted votes data structure.
* `credits` - The total number of rewards this vote program has generated over its lifetime.
* `root_slot` - The last slot to reach the full lockout commitment necessary for rewards.
* `commission` - The commission taken by this VoteState for any rewards claimed by staker's Stake accounts. This is the percentage ceiling of the reward.
* Account::lamports - The accumulated lamports from the commission. These do not count as stakes.
* `authorized_vote_signer` - Only this identity is authorized to submit votes. This field can only modified by this identity.
### VoteInstruction::Initialize
* `account[0]` - RW - The VoteState
`VoteState::authorized_vote_signer` is initialized to `account[0]`
other VoteState members defaulted
### VoteInstruction::AuthorizeVoteSigner\(Pubkey\)
* `account[0]` - RW - The VoteState
`VoteState::authorized_vote_signer` is set to to `Pubkey`, the transaction must by
signed by the Vote account's current `authorized_vote_signer`.
`VoteInstruction::AuthorizeVoter` allows a staker to choose a signing service
for its votes. That service is responsible for ensuring the vote won't cause
the staker to be slashed.
### VoteInstruction::Vote\(Vec\)
* `account[0]` - RW - The VoteState
`VoteState::lockouts` and `VoteState::credits` are updated according to voting lockout rules see [Tower BFT](../implemented-proposals/tower-bft.md)
* `account[1]` - RO - A list of some N most recent slots and their hashes for the vote to be verified against.
### StakeState
A StakeState takes one of three forms, StakeState::Uninitialized, StakeState::Stake and StakeState::RewardsPool.
### StakeState::Stake
StakeState::Stake is the current delegation preference of the **staker** and contains the following state information:
* Account::lamports - The lamports available for staking.
* `stake` - the staked amount \(subject to warm up and cool down\) for generating rewards, always less than or equal to Account::lamports
* `voter_pubkey` - The pubkey of the VoteState instance the lamports are delegated to.
* `credits_observed` - The total credits claimed over the lifetime of the program.
* `activated` - the epoch at which this stake was activated/delegated. The full stake will be counted after warm up.
* `deactivated` - the epoch at which this stake will be completely de-activated, which is `cool down` epochs after StakeInstruction::Deactivate is issued.
### StakeState::RewardsPool
To avoid a single network wide lock or contention in redemption, 256 RewardsPools are part of genesis under pre-determined keys, each with std::u64::MAX credits to be able to satisfy redemptions according to point value.
The Stakes and the RewardsPool are accounts that are owned by the same `Stake` program.
### StakeInstruction::DelegateStake\(u64\)
The Stake account is moved from Uninitialized to StakeState::Stake form. This is how stakers choose their initial delegate validator node and activate their stake account lamports.
* `account[0]` - RW - The StakeState::Stake instance. `StakeState::Stake::credits_observed` is initialized to `VoteState::credits`, `StakeState::Stake::voter_pubkey` is initialized to `account[1]`, `StakeState::Stake::stake` is initialized to the u64 passed as an argument above, `StakeState::Stake::activated` is initialized to current Bank epoch, and `StakeState::Stake::deactivated` is initialized to std::u64::MAX
* `account[1]` - R - The VoteState instance.
* `account[2]` - R - sysvar::current account, carries information about current Bank epoch
* `account[3]` - R - stake\_api::Config accoount, carries warmup, cooldown, and slashing configuration
### StakeInstruction::RedeemVoteCredits
The staker or the owner of the Stake account sends a transaction with this instruction to claim rewards.
The Vote account and the Stake account pair maintain a lifetime counter of total rewards generated and claimed. Rewards are paid according to a point value supplied by the Bank from inflation. A `point` is one credit \* one staked lamport, rewards paid are proportional to the number of lamports staked.
* `account[0]` - RW - The StakeState::Stake instance that is redeeming rewards.
* `account[1]` - R - The VoteState instance, must be the same as `StakeState::voter_pubkey`
* `account[2]` - RW - The StakeState::RewardsPool instance that will fulfill the request \(picked at random\).
* `account[3]` - R - sysvar::rewards account from the Bank that carries point value.
* `account[4]` - R - sysvar::stake\_history account from the Bank that carries stake warmup/cooldown history
Reward is paid out for the difference between `VoteState::credits` to `StakeState::Stake::credits_observed`, multiplied by `sysvar::rewards::Rewards::validator_point_value`. `StakeState::Stake::credits_observed` is updated to`VoteState::credits`. The commission is deposited into the Vote account token balance, and the reward is deposited to the Stake account token balance.
```text
let credits_to_claim = vote_state.credits - stake_state.credits_observed;
stake_state.credits_observed = vote_state.credits;
```
`credits_to_claim` is used to compute the reward and commission, and `StakeState::Stake::credits_observed` is updated to the latest `VoteState::credits` value.
### StakeInstruction::Deactivate
A staker may wish to withdraw from the network. To do so he must first deactivate his stake, and wait for cool down.
* `account[0]` - RW - The StakeState::Stake instance that is deactivating, the transaction must be signed by this key.
* `account[1]` - R - The VoteState instance to which this stake is delegated, required in case of slashing
* `account[2]` - R - sysvar::current account from the Bank that carries current epoch
StakeState::Stake::deactivated is set to the current epoch + cool down. The account's stake will ramp down to zero by that epoch, and Account::lamports will be available for withdrawal.
### StakeInstruction::Withdraw\(u64\)
Lamports build up over time in a Stake account and any excess over activated stake can be withdrawn.
* `account[0]` - RW - The StakeState::Stake from which to withdraw, the transaction must be signed by this key.
* `account[1]` - RW - Account that should be credited with the withdrawn lamports.
* `account[2]` - R - sysvar::current account from the Bank that carries current epoch, to calculate stake.
* `account[3]` - R - sysvar::stake\_history account from the Bank that carries stake warmup/cooldown history
## Benefits of the design
* Single vote for all the stakers.
* Clearing of the credit variable is not necessary for claiming rewards.
* Each delegated stake can claim its rewards independently.
* Commission for the work is deposited when a reward is claimed by the delegated stake.
## Example Callflow
![Passive Staking Callflow](https://github.com/solana-labs/solana/tree/6b18db969dd1616eff07de35e7b823c75339fea8/book/src/img/passive-staking-callflow.svg)
## Staking Rewards
The specific mechanics and rules of the validator rewards regime is outlined here. Rewards are earned by delegating stake to a validator that is voting correctly. Voting incorrectly exposes that validator's stakes to [slashing](https://github.com/solana-labs/solana/tree/6b18db969dd1616eff07de35e7b823c75339fea8/book/src/staking-and-rewards.md).
### Basics
The network pays rewards from a portion of network [inflation](https://github.com/solana-labs/solana/tree/6b18db969dd1616eff07de35e7b823c75339fea8/book/src/inflation.md). The number of lamports available to pay rewards for an epoch is fixed and must be evenly divided among all staked nodes according to their relative stake weight and participation. The weighting unit is called a [point](../terminology.md#point).
Rewards for an epoch are not available until the end of that epoch.
At the end of each epoch, the total number of points earned during the epoch is summed and used to divide the rewards portion of epoch inflation to arrive at a point value. This value is recorded in the bank in a [sysvar](../terminology.md#sysvar) that maps epochs to point values.
During redemption, the stake program counts the points earned by the stake for each epoch, multiplies that by the epoch's point value, and transfers lamports in that amount from a rewards account into the stake and vote accounts according to the vote account's commission setting.
### Economics
Point value for an epoch depends on aggregate network participation. If participation in an epoch drops off, point values are higher for those that do participate.
### Earning credits
Validators earn one vote credit for every correct vote that exceeds maximum lockout, i.e. every time the validator's vote account retires a slot from its lockout list, making that vote a root for the node.
Stakers who have delegated to that validator earn points in proportion to their stake. Points earned is the product of vote credits and stake.
### Stake warmup, cooldown, withdrawal
Stakes, once delegated, do not become effective immediately. They must first pass through a warm up period. During this period some portion of the stake is considered "effective", the rest is considered "activating". Changes occur on epoch boundaries.
The stake program limits the rate of change to total network stake, reflected in the stake program's `config::warmup_rate` \(typically 15% per epoch\).
The amount of stake that can be warmed up each epoch is a function of the previous epoch's total effective stake, total activating stake, and the stake program's configured warmup rate.
Cooldown works the same way. Once a stake is deactivated, some part of it is considered "effective", and also "deactivating". As the stake cools down, it continues to earn rewards and be exposed to slashing, but it also becomes available for withdrawal.
Bootstrap stakes are not subject to warmup.
Rewards are paid against the "effective" portion of the stake for that epoch.
#### Warmup example
Consider the situation of a single stake of 1,000 activated at epoch N, with network warmup rate of 20%, and a quiescent total network stake at epoch N of 2,000.
At epoch N+1, the amount available to be activated for the network is 400 \(20% of 200\), and at epoch N, this example stake is the only stake activating, and so is entitled to all of the warmup room available.
| epoch | effective | activating | total effective | total activating |
| :--- | ---: | ---: | ---: | ---: |
| N-1 | | | 2,000 | 0 |
| N | 0 | 1,000 | 2,000 | 1,000 |
| N+1 | 400 | 600 | 2,400 | 600 |
| N+2 | 880 | 120 | 2,880 | 120 |
| N+3 | 1000 | 0 | 3,000 | 0 |
Were 2 stakes \(X and Y\) to activate at epoch N, they would be awarded a portion of the 20% in proportion to their stakes. At each epoch effective and activating for each stake is a function of the previous epoch's state.
| epoch | X eff | X act | Y eff | Y act | total effective | total activating |
| :--- | ---: | ---: | ---: | ---: | ---: | ---: |
| N-1 | | | | | 2,000 | 0 |
| N | 0 | 1,000 | 0 | 200 | 2,000 | 1,200 |
| N+1 | 320 | 680 | 80 | 120 | 2,400 | 800 |
| N+2 | 728 | 272 | 152 | 48 | 2,880 | 320 |
| N+3 | 1000 | 0 | 200 | 0 | 3,200 | 0 |
### Withdrawal
As rewards are earned lamports can be withdrawn from a stake account. Only lamports in excess of effective+activating stake may be withdrawn at any time. This means that during warmup, effectively no stake can be withdrawn. During cooldown, any tokens in excess of effective stake may be withdrawn \(activating == 0\);

View File

@ -0,0 +1,27 @@
# Synchronization
Fast, reliable synchronization is the biggest reason Solana is able to achieve such high throughput. Traditional blockchains synchronize on large chunks of transactions called blocks. By synchronizing on blocks, a transaction cannot be processed until a duration called "block time" has passed. In Proof of Work consensus, these block times need to be very large \(~10 minutes\) to minimize the odds of multiple fullnodes producing a new valid block at the same time. There's no such constraint in Proof of Stake consensus, but without reliable timestamps, a fullnode cannot determine the order of incoming blocks. The popular workaround is to tag each block with a [wallclock timestamp](https://en.bitcoin.it/wiki/Block_timestamp). Because of clock drift and variance in network latencies, the timestamp is only accurate within an hour or two. To workaround the workaround, these systems lengthen block times to provide reasonable certainty that the median timestamp on each block is always increasing.
Solana takes a very different approach, which it calls _Proof of History_ or _PoH_. Leader nodes "timestamp" blocks with cryptographic proofs that some duration of time has passed since the last proof. All data hashed into the proof most certainly have occurred before the proof was generated. The node then shares the new block with validator nodes, which are able to verify those proofs. The blocks can arrive at validators in any order or even could be replayed years later. With such reliable synchronization guarantees, Solana is able to break blocks into smaller batches of transactions called _entries_. Entries are streamed to validators in realtime, before any notion of block consensus.
Solana technically never sends a _block_, but uses the term to describe the sequence of entries that fullnodes vote on to achieve _confirmation_. In that way, Solana's confirmation times can be compared apples to apples to block-based systems. The current implementation sets block time to 800ms.
What's happening under the hood is that entries are streamed to validators as quickly as a leader node can batch a set of valid transactions into an entry. Validators process those entries long before it is time to vote on their validity. By processing the transactions optimistically, there is effectively no delay between the time the last entry is received and the time when the node can vote. In the event consensus is **not** achieved, a node simply rolls back its state. This optimisic processing technique was introduced in 1981 and called [Optimistic Concurrency Control](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.65.4735). It can be applied to blockchain architecture where a cluster votes on a hash that represents the full ledger up to some _block height_. In Solana, it is implemented trivially using the last entry's PoH hash.
## Relationship to VDFs
The Proof of History technique was first described for use in blockchain by Solana in November of 2017. In June of the following year, a similar technique was described at Stanford and called a [verifiable delay function](https://eprint.iacr.org/2018/601.pdf) or _VDF_.
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 of the paper cited above, they might tell you \([and have](https://github.com/solana-labs/solana/issues/388)\) that Solana's approach is algorithmically slow and 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 is that a VDF is used only for tracking duration. PoH's hash chain, on the other hand, 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 rotation algorithm](synchronization.md#leader-rotation), for example, is derived only from the VDF _height_ and not its hash at that height.
## Relationship to Consensus Mechanisms
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 data plane and replication protocols.
## More on Proof of History
* [water clock analogy](https://medium.com/solana-labs/proof-of-history-explained-by-a-water-clock-e682183417b8)
* [Proof of History overview](https://medium.com/solana-labs/proof-of-history-a-clock-for-blockchain-cf47a61a9274)

View File

@ -0,0 +1,44 @@
# Turbine Block Propagation
A Solana cluster uses a multi-layer block propagation mechanism called _Turbine_ to broadcast transaction blobs to all nodes with minimal amount of duplicate messages. The cluster divides itself into small collections of nodes, called _neighborhoods_. Each node is responsible for sharing any data it receives with the other nodes in its neighborhood, as well as propagating the data on to a small set of nodes in other neighborhoods. This way each node only has to communicate with a small number of nodes.
During its slot, the leader node distributes blobs between the validator nodes in the first neighborhood \(layer 0\). Each validator shares its data within its neighborhood, but also retransmits the blobs to one node in some neighborhoods in the next layer \(layer 1\). The layer-1 nodes each share their data with their neighborhood peers, and retransmit to nodes in the next layer, etc, until all nodes in the cluster have received all the blobs.
## Neighborhood Assignment - Weighted Selection
In order for data plane fanout to work, the entire cluster must agree on how the cluster is divided into neighborhoods. To achieve this, all the recognized validator nodes \(the TVU peers\) are sorted by stake and stored in a list. This list is then indexed in different ways to figure out neighborhood boundaries and retransmit peers. For example, the leader will simply select the first nodes to make up layer 0. These will automatically be the highest stake holders, allowing the heaviest votes to come back to the leader first. Layer-0 and lower-layer nodes use the same logic to find their neighbors and next layer peers.
To reduce the possibility of attack vectors, each blob is transmitted over a random tree of neighborhoods. Each node uses the same set of nodes representing the cluster. A random tree is generated from the set for each blob using randomness derived from the blob itself. Since the random seed is not known in advance, attacks that try to eclipse neighborhoods from certain leaders or blocks become very difficult, and should require almost complete control of the stake in the cluster.
## Layer and Neighborhood Structure
The current leader makes its initial broadcasts to at most `DATA_PLANE_FANOUT` nodes. If this layer 0 is smaller than the number of nodes in the cluster, then the data plane fanout mechanism adds layers below. Subsequent layers follow these constraints to determine layer-capacity: Each neighborhood contains `DATA_PLANE_FANOUT` nodes. Layer-0 starts with 1 neighborhood with fanout nodes. The number of nodes in each additional layer grows by a factor of fanout.
As mentioned above, each node in a layer only has to broadcast its blobs to its neighbors and to exactly 1 node in some next-layer neighborhoods, instead of to every TVU peer in the cluster. A good way to think about this is, layer-0 starts with 1 neighborhood with fanout nodes, layer-1 adds "fanout" neighborhoods, each with fanout nodes and layer-2 will have `fanout * number of nodes in layer-1` and so on.
This way each node only has to communicate with a maximum of `2 * DATA_PLANE_FANOUT - 1` nodes.
The following diagram shows how the Leader sends blobs with a Fanout of 2 to Neighborhood 0 in Layer 0 and how the nodes in Neighborhood 0 share their data with each other.
![Leader sends blobs to Neighborhood 0 in Layer 0](https://github.com/solana-labs/solana/tree/6b18db969dd1616eff07de35e7b823c75339fea8/book/src/img/data-plane-seeding.svg)
The following diagram shows how Neighborhood 0 fans out to Neighborhoods 1 and 2.
![Neighborhood 0 Fanout to Neighborhood 1 and 2](https://github.com/solana-labs/solana/tree/6b18db969dd1616eff07de35e7b823c75339fea8/book/src/img/data-plane-fanout.svg)
Finally, the following diagram shows a two layer cluster with a Fanout of 2.
![Two layer cluster with a Fanout of 2](https://github.com/solana-labs/solana/tree/6b18db969dd1616eff07de35e7b823c75339fea8/book/src/img/data-plane.svg)
### Configuration Values
`DATA_PLANE_FANOUT` - Determines the size of layer 0. Subsequent layers grow by a factor of `DATA_PLANE_FANOUT`. The number of nodes in a neighborhood is equal to the fanout value. Neighborhoods will fill to capacity before new ones are added, i.e if a neighborhood isn't full, it _must_ be the last one.
Currently, configuration is set when the cluster is launched. In the future, these parameters may be hosted on-chain, allowing modification on the fly as the cluster sizes change.
## Neighborhoods
The following diagram shows how two neighborhoods in different layers interact. To cripple a neighborhood, enough nodes \(erasure codes +1\) from the neighborhood above need to fail. Since each neighborhood receives blobs from multiple nodes in a neighborhood in the upper layer, we'd need a big network failure in the upper layers to end up with incomplete data.
![Inner workings of a neighborhood](https://github.com/solana-labs/solana/tree/6b18db969dd1616eff07de35e7b823c75339fea8/book/src/img/data-plane-neighborhood.svg)

View File

@ -0,0 +1,67 @@
# Secure Vote Signing
A validator fullnode receives entries from the current leader and submits votes confirming those entries are valid. This vote submission presents a security challenge, because forged votes that violate consensus rules could be used to slash the validator's stake.
The validator votes on its chosen fork by submitting a transaction that uses an asymmetric key to sign the result of its validation work. Other entities can verify this signature using the validator's public key. If the validator's key is used to sign incorrect data \(e.g. votes on multiple forks of the ledger\), the node's stake or its resources could be compromised.
Solana addresses this risk by splitting off a separate _vote signer_ service that evaluates each vote to ensure it does not violate a slashing condition.
## Validators, Vote Signers, and Stakeholders
When a validator receives multiple blocks for the same slot, it tracks all possible forks until it can determine a "best" one. A validator selects the best fork by submitting a vote to it, using a vote signer to minimize the possibility of its vote inadvertently violating a consensus rule and getting a stake slashed.
A vote signer evaluates the vote proposed by the validator and signs the vote only if it does not violate a slashing condition. A vote signer only needs to maintain minimal state regarding the votes it signed and the votes signed by the rest of the cluster. It doesn't need to process a full set of transactions.
A stakeholder is an identity that has control of the staked capital. The stakeholder can delegate its stake to the vote signer. Once a stake is delegated, the vote signer votes represent the voting weight of all the delegated stakes, and produce rewards for all the delegated stakes.
Currently, there is a 1:1 relationship between validators and vote signers, and stakeholders delegate their entire stake to a single vote signer.
## Signing service
The vote signing service consists of a JSON RPC server and a request processor. At startup, the service starts the RPC server at a configured port and waits for validator requests. It expects the following type of requests: 1. Register a new validator node
* The request must contain validator's identity \(public key\)
* The request must be signed with the validator's private key
* The service drops the request if signature of the request cannot be
verified
* The service creates a new voting asymmetric key for the validator, and
returns the public key as a response
* If a validator tries to register again, the service returns the public key
from the pre-existing keypair
1. Sign a vote
* The request must contain a voting transaction and all verification data
* The request must be signed with the validator's private key
* The service drops the request if signature of the request cannot be
verified
* The service verifies the voting data
* The service returns a signature for the transaction
## Validator voting
A validator node, at startup, creates a new vote account and registers it with the cluster by submitting a new "vote register" transaction. The other nodes on the cluster process this transaction and include the new validator in the active set. Subsequently, the validator submits a "new vote" transaction signed with the validator's voting private key on each voting event.
### Configuration
The validator node is configured with the signing service's network endpoint \(IP/Port\).
### Registration
At startup, the validator registers itself with its signing service using JSON RPC. The RPC call returns the voting public key for the validator node. The validator creates a new "vote register" transaction including this public key, and submits it to the cluster.
### Vote Collection
The validator looks up the votes submitted by all the nodes in the cluster for the last voting period. This information is submitted to the signing service with a new vote signing request.
### New Vote Signing
The validator creates a "new vote" transaction and sends it to the signing service using JSON RPC. The RPC request also includes the vote verification data. On success, the RPC call returns the signature for the vote. On failure, RPC call returns the failure code.

View File

@ -0,0 +1,111 @@
# Cross-Program Invocation
## Problem
In today's implementation a client can create a transaction that modifies two
accounts, each owned by a separate on-chain program:
```rust,ignore
let message = Message::new(vec![
token_instruction::pay(&alice_pubkey),
acme_instruction::launch_missiles(&bob_pubkey),
]);
client.send_message(&[&alice_keypair, &bob_keypair], &message);
```
The current implementation does not, however, allow the `acme` program to
conveniently invoke `token` instructions on the client's behalf:
```rust,ignore
let message = Message::new(vec![
acme_instruction::pay_and_launch_missiles(&alice_pubkey, &bob_pubkey),
]);
client.send_message(&[&alice_keypair, &bob_keypair], &message);
```
Currently, there is no way to create instruction `pay_and_launch_missiles` that executes
`token_instruction::pay` from the `acme` program. The workaround is to extend the
`acme` program with the implementation of the `token` program, and create `token`
accounts with `ACME_PROGRAM_ID`, which the `acme` program is permitted to modify.
With that workaround, `acme` can modify token-like accounts created by the `acme`
program, but not token accounts created by the `token` program.
## Proposed Solution
The goal of this design is to modify Solana's runtime such that an on-chain
program can invoke an instruction from another program.
Given two on-chain programs `token` and `acme`, each implementing instructions
`pay()` and `launch_missiles()` respectively, we would ideally like to implement
the `acme` module with a call to a function defined in the `token` module:
```rust,ignore
use token;
fn launch_missiles(keyed_accounts: &[KeyedAccount]) -> Result<()> {
...
}
fn pay_and_launch_missiles(keyed_accounts: &[KeyedAccount]) -> Result<()> {
token::pay(&keyed_accounts[1..])?;
launch_missiles(keyed_accounts)?;
}
```
The above code would require that the `token` crate be dynamically linked,
so that a custom linker could intercept calls and validate accesses to
`keyed_accounts`. That is, even though the client intends to modify both
`token` and `acme` accounts, only `token` program is permitted to modify
the `token` account, and only the `acme` program is permitted to modify
the `acme` account.
Backing off from that ideal cross-program call, a slightly more
verbose solution is to expose token's existing `process_instruction()`
entrypoint to the acme program:
```rust,ignore
use token_instruction;
fn launch_missiles(keyed_accounts: &[KeyedAccount]) -> Result<()> {
...
}
fn pay_and_launch_missiles(keyed_accounts: &[KeyedAccount]) -> Result<()> {
let alice_pubkey = keyed_accounts[1].key;
let instruction = token_instruction::pay(&alice_pubkey);
process_instruction(&instruction)?;
launch_missiles(keyed_accounts)?;
}
```
where `process_instruction()` is built into Solana's runtime and responsible
for routing the given instruction to the `token` program via the instruction's
`program_id` field. Before invoking `pay()`, the runtime must also ensure that
`acme` didn't modify any accounts owned by `token`. It does this by calling
`runtime::verify_instruction()` and then afterward updating all the `pre_*`
variables to tentatively commit `acme`'s account modifications. After `pay()`
completes, the runtime must again ensure that `token` didn't modify any
accounts owned by `acme`. It should call `verify_instruction()` again, but this
time with the `token` program ID. Lastly, after `pay_and_launch_missiles()`
completes, the runtime must call `verify_instruction()` one more time, where it
normally would, but using all updated `pre_*` variables. If executing
`pay_and_launch_missiles()` up to `pay()` made no invalid account changes,
`pay()` made no invalid changes, and executing from `pay()` until
`pay_and_launch_missiles()` returns made no invalid changes, then the runtime
can transitively assume `pay_and_launch_missiles()` as whole made no invalid
account changes, and therefore commit all account modifications.
### Setting `KeyedAccount.is_signer`
When `process_instruction()` is invoked, the runtime must create a new
`KeyedAccounts` parameter using the signatures from the *original* transaction
data. Since the `token` program is immutable and existed on-chain prior to the
`acme` program, the runtime can safely treat the transaction signature as a
signature of a transaction with a `token` instruction. When the runtime sees
the given instruction references `alice_pubkey`, it looks up the key in the
transaction to see if that key corresponds to a transaction signature. In this
case it does and so sets `KeyedAccount.is_signer`, thereby authorizing the
`token` program to modify Alice's account.

View File

@ -1,84 +0,0 @@
# Data Plane Fanout
A Solana cluster uses a multi-layer mechanism called *data plane fanout* to
broadcast transaction blobs to all nodes in a very quick and efficient manner.
In order to establish the fanout, the cluster divides itself into small
collections of nodes, called *neighborhoods*. Each node is responsible for
sharing any data it receives with the other nodes in its neighborhood, as well
as propagating the data on to a small set of nodes in other neighborhoods.
During its slot, the leader node distributes blobs between the validator nodes
in one neighborhood (layer 1). Each validator shares its data within its
neighborhood, but also retransmits the blobs to one node in each of multiple
neighborhoods in the next layer (layer 2). The layer-2 nodes each share their
data with their neighborhood peers, and retransmit to nodes in the next layer,
etc, until all nodes in the cluster have received all the blobs.
<img alt="Two layer cluster" src="img/data-plane.svg" class="center"/>
## Neighborhood Assignment - Weighted Selection
In order for data plane fanout to work, the entire cluster must agree on how the
cluster is divided into neighborhoods. To achieve this, all the recognized
validator nodes (the TVU peers) are sorted by stake and stored in a list. This
list is then indexed in different ways to figure out neighborhood boundaries and
retransmit peers. For example, the leader will simply select the first nodes to
make up layer 1. These will automatically be the highest stake holders, allowing
the heaviest votes to come back to the leader first. Layer-1 and lower-layer
nodes use the same logic to find their neighbors and lower layer peers.
## Layer and Neighborhood Structure
The current leader makes its initial broadcasts to at most `DATA_PLANE_FANOUT`
nodes. If this layer 1 is smaller than the number of nodes in the cluster, then
the data plane fanout mechanism adds layers below. Subsequent layers follow
these constraints to determine layer-capacity: Each neighborhood contains
`NEIGHBORHOOD_SIZE` nodes and each layer may have up to `DATA_PLANE_FANOUT/2`
neighborhoods.
As mentioned above, each node in a layer only has to broadcast its blobs to its
neighbors and to exactly 1 node in each next-layer neighborhood, instead of to
every TVU peer in the cluster. In the default mode, each layer contains
`DATA_PLANE_FANOUT/2` neighborhoods. The retransmit mechanism also supports a
second, `grow`, mode of operation that squares the number of neighborhoods
allowed each layer. This dramatically reduces the number of layers needed to
support a large cluster, but can also have a negative impact on the network
pressure on each node in the lower layers. A good way to think of the default
mode (when `grow` is disabled) is to imagine it as chain of layers, where the
leader sends blobs to layer-1 and then layer-1 to layer-2 and so on, the `layer
capacities` remain constant, so all layers past layer-2 will have the same
number of nodes until the whole cluster is covered. When `grow` is enabled, this
becomes a traditional fanout where layer-3 will have the square of the number of
nodes in layer-2 and so on.
#### Configuration Values
`DATA_PLANE_FANOUT` - Determines the size of layer 1. Subsequent
layers have `DATA_PLANE_FANOUT/2` neighborhoods when `grow` is inactive.
`NEIGHBORHOOD_SIZE` - The number of nodes allowed in a neighborhood.
Neighborhoods will fill to capacity before new ones are added, i.e if a
neighborhood isn't full, it _must_ be the last one.
`GROW_LAYER_CAPACITY` - Whether or not retransmit should be behave like a
_traditional fanout_, i.e if each additional layer should have growing
capacities. When this mode is disabled (default), all layers after layer 1 have
the same capacity, keeping the network pressure on all nodes equal.
Currently, configuration is set when the cluster is launched. In the future,
these parameters may be hosted on-chain, allowing modification on the fly as the
cluster sizes change.
## Neighborhoods
The following diagram shows how two neighborhoods in different layers interact.
What this diagram doesn't capture is that each neighbor actually receives
blobs from one validator per neighborhood above it. This means that, to
cripple a neighborhood, enough nodes (erasure codes +1 per neighborhood) from
the layer above need to fail. Since multiple neighborhoods exist in the upper
layer and a node will receive blobs from a node in each of those neighborhoods,
we'd need a big network failure in the upper layers to end up with incomplete
data.
<img alt="Inner workings of a neighborhood"
src="img/data-plane-neighborhood.svg" class="center"/>

Some files were not shown because too many files have changed in this diff Show More