Compare commits

...

1483 Commits

Author SHA1 Message Date
c375ce1fcd CLI: collect and deduplicate signers (#8398) (#8423)
automerge
2020-02-24 17:29:34 -08:00
df813b31c5 Fix SDK deps 2020-02-24 17:30:46 -07:00
7db92e2951 Drop print- prefix from slot/accounts command
(cherry picked from commit 89baa94002)
2020-02-24 17:28:36 -07:00
6585518f78 Add genesis subcommand
(cherry picked from commit 1ef3478709)
2020-02-24 17:28:36 -07:00
6398e256e4 Move shred_version module to sdk/
(cherry picked from commit 73063544bd)
2020-02-24 17:28:36 -07:00
b64ebb45e7 validator: snapshot fetching cleanup (bp #8413) (#8417)
automerge
2020-02-24 15:22:34 -08:00
307ac66d9c Reinstate create-stale-account w/ seed test (#8401) (#8402)
automerge
2020-02-22 10:56:39 -08:00
dc02f2ea8b Add support for large transactions with Ledger Wallet (#8394) 2020-02-21 23:24:56 -07:00
b7386f9d84 Add --trusted-validator support for snapshot hash validation (#8390) 2020-02-21 18:42:24 -08:00
223f9707ca \ 2020-02-21 18:09:36 -07:00
ea5b00364f Add --enable-warmup-epochs flag 2020-02-21 16:59:43 -07:00
fb98df76b7 4x DEFAULT_MAX_LEDGER_SLOTS to give nodes 3 hours of slots to repair from (#8388)
automerge
2020-02-21 15:04:02 -08:00
4ddbf8d509 CLI: dynamic signing reboot (#8384)
* Add keypair_util_from_path helper

* Cli: impl config.keypair as a trait object

* SDK: Add Debug and PartialEq for dyn Signer

* ClapUtils: Arg parsing from pubkey+signers to Presigner

* Impl Signers for &dyn Signer collections

* CLI: Add helper for getting signers from args

* CLI: Replace SigningAuthority with Signer trait-objs

* CLI: Drop disused signers command field

* CLI: Drop redundant tests

* Add clap validator that handles all current signer types

* clap_utils: Factor Presigner resolution to helper

* SDK: `From` for boxing Signer implementors to trait objects

* SDK: Derive `Clone` for `Presigner`

* Remove panic

* Cli: dedup signers in transfer for remote-wallet ergonomics

* Update docs vis-a-vis ASK changes

* Cli: update transaction types to use new dynamic-signer methods

* CLI: Fix tests No. 1

what to do about write_keypair outstanding

* Work around `CliConfig`'s signer not necessarily being a `Keypair`

* CLI: Fix tests No. 2

* Remove unused arg

* Remove unused methods

* Move offline arg constants upstream

* Make cli signing fallible

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2020-02-21 14:55:53 -07:00
aa80f69171 Promote some datapoints to info to fix dashboard (#8381)
automerge
2020-02-21 13:41:49 -08:00
0ace22d03f Optimize account verification (#8385) 2020-02-21 13:28:35 -08:00
0e6aca5a7e Reorganize message processor in prep for cross-program-invocation (#8338) 2020-02-21 11:30:00 -08:00
3f04226864 Update unlocks (#8363) 2020-02-21 11:23:03 -07:00
d308eed136 Bump ctrlc from 3.1.3 to 3.1.4
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/commits/3.1.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-21 09:00:14 -07:00
ed1149c8e0 Update supported backport labels 2020-02-21 00:47:44 -07:00
48f58a88bc Bump version to 1.0.0 2020-02-20 23:52:19 -07:00
d238371b0c Correct missing entry handling to avoid bad warns (#8339)
* Correct missing entry handling to avoid bad warns

* Pass storage entries to AccountStorageSerialize

* Fix CI.....

* Add tests and reorder condition for cheapest first

* Remove unneeded reference
2020-02-21 15:27:55 +09:00
0b7e8d0162 Add handling for fallible signers (#8367)
automerge
2020-02-20 19:04:53 -08:00
18fd52367e If the node was loaded from a snapshot, advertise it in gossip (#8364)
automerge
2020-02-20 18:53:26 -08:00
2d665da3e1 Flip Stable and Preview enum values 2020-02-20 18:27:33 -07:00
5ef06a9d36 Add non-bz2 snapshot for faster creation for dev. (#8350)
* Add non-bz2 snapshot for faster creation for dev.

* Fix tests..

* Revert and always just use snapshot.tar.bz2
2020-02-21 10:19:45 +09:00
f4622d67e9 Submit all metrics in one HTTP POST rather than a HTTP POST per level 2020-02-20 18:12:30 -07:00
b65c9ea544 Bump serial_test_derive from 0.3.2 to 0.4.0 (#8311)
Bumps [serial_test_derive](https://github.com/palfrey/serial_test) from 0.3.2 to 0.4.0.
- [Release notes](https://github.com/palfrey/serial_test/releases)
- [Commits](https://github.com/palfrey/serial_test/compare/v0.3.2...v0.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-20 17:06:00 -07:00
cc7c6c960e Search for the validator with the highest snapshot 2020-02-20 17:04:48 -07:00
01697a9f5c Remove unnecessary arc and mutex for rpc notifications (#8351) 2020-02-21 08:03:46 +08:00
ab361a8073 Rename KeypairUtil to Signer (#8360)
automerge
2020-02-20 13:28:55 -08:00
ec5c02cb7f Book: Add instructions for verifying a paper wallet keypair (#8357) 2020-02-20 14:19:35 -07:00
e8124324ff Support transaction signing by heterogenous lists of keypairs (#8342)
automerge
2020-02-20 12:13:23 -08:00
1720fe6a46 Snapshot hash gossip changes (#8358) 2020-02-20 11:46:13 -08:00
e50bc0d34b Do not compress small incomplete slot list (#8355)
automerge
2020-02-20 09:48:39 -08:00
45774dc4aa Fix comment 2020-02-20 10:32:36 -07:00
ea8d9d1aea Bitwise compress incomplete epoch slots (#8341) 2020-02-19 20:24:09 -08:00
221866f74e Process Gossip in parallel and add an upper limit (#8328) 2020-02-19 21:31:55 -06:00
3e96d59359 Use correct static IP address 2020-02-19 18:15:18 -07:00
8c19b6268c Add Preview operating mode, rename SoftLaunch operating mode to Stable (#8331)
automerge
2020-02-19 16:48:58 -08:00
8ae26867c5 More testnet->devnet 2020-02-19 16:15:38 -07:00
19baaea0da Remove validators from genesis (#8330)
automerge
2020-02-19 14:40:07 -08:00
e3cebcf82d rename testnet.solana.com to devnet.solana.com 2020-02-19 15:33:14 -07:00
ccad5d5aaf change warnings to infos (#8322) 2020-02-19 14:25:49 -08:00
d0bcde001e New Repair Design (#8256)
* New Repair Design
2020-02-19 01:02:09 -08:00
83a8e82626 Remove dead code 2020-02-18 21:08:43 -07:00
7305a1f407 Reformatting 2020-02-18 21:08:43 -07:00
3975c7f8c9 Add --fee-burn-percentage 2020-02-18 17:43:08 -07:00
ac1d075d73 Drop packet if destination is unspecified (0.0.0.0/0) (#8321) 2020-02-18 16:14:20 -08:00
73a278dc64 Factor out creating genesis with vote accounts into a utility function (#8315)
automerge
2020-02-18 02:39:47 -08:00
a042ee609a Update README.md 2020-02-17 22:19:55 -07:00
0d5c1239c6 Update epoch slots to include all missing slots (#8276)
* Update epoch slots to include all missing slots

* new test for compress/decompress

* address review comments

* limit cache based on size, instead of comparing roots
2020-02-17 12:39:30 -08:00
027ec71aa9 Remove AccountInfo's (De)Serialize (#8313)
automerge
2020-02-17 03:07:36 -08:00
ef718c651e Remove needless uses (#8312)
automerge
2020-02-17 02:43:14 -08:00
fc2a0d53d9 CLI: Add optional airdrop recipient (#8291)
* CLI: Add optional airdrop recipient

* Update book usage page
2020-02-16 11:41:00 -07:00
bb47844ae6 Bump thiserror from 1.0.10 to 1.0.11 (#8288)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.10 to 1.0.11.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.10...1.0.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-15 17:59:13 -07:00
b997d3eb4e Cli: Remove units from various subcommands (#8301)
* Cli: Remove unit arg from various subcommands

* Update book usage page

* Update scripts and docs
2020-02-15 12:53:52 -07:00
9bcca268a3 Add simple gossip DoS test 2020-02-14 22:40:35 -07:00
8a2d4e2f72 Add storage rewards pools in development mode only 2020-02-14 21:12:38 -07:00
335675c51c install: support vX.Y.Z in addition to X.Y.Z (#8297)
automerge
2020-02-14 19:35:40 -08:00
1bf2285fa2 ledger-tool: Add print-accounts command 2020-02-14 19:59:48 -07:00
71f77a8e0a Remove Exchange program's use of GenericError (#8290)
automerge
2020-02-14 14:52:13 -08:00
644a7f9a44 Remove Move Loader's use of GenericError (#8289)
automerge
2020-02-14 14:49:21 -08:00
965361ff69 Remove failure's use of GenericError (#8287)
automerge
2020-02-14 14:07:53 -08:00
4593d333c7 Remove BPF Loader's use of GenericError (#8284) 2020-02-14 13:59:03 -08:00
940519ea5a Remove Native Loader's use of GenericError (#8285) 2020-02-14 13:58:48 -08:00
a0bcbf70d5 Cleanup new_result_with_negative_lamports (#8286) 2020-02-14 13:58:33 -08:00
17fb8258e5 Datapoints overwhelm the metrics queue and blow up ram usage. (#8272)
automerge
2020-02-14 11:11:55 -08:00
c350543b46 Make generate_remote_keypair more generic for potential other remote-wallets (#8274) 2020-02-14 09:38:35 -07:00
5b4ecb01ca Presigner KeypairUtil implementer (#8269)
automerge
2020-02-13 16:53:09 -08:00
28b115497f Update setup-dc-node-1.sh 2020-02-13 14:30:41 -07:00
0604029661 Bump parking_lot from 0.7.1 to 0.10.0 (#8262)
Bumps [parking_lot](https://github.com/Amanieu/parking_lot) from 0.7.1 to 0.10.0.
- [Release notes](https://github.com/Amanieu/parking_lot/releases)
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/parking_lot/compare/0.7.1...0.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-13 14:24:37 -07:00
2374cf09e2 Enable remote-wallet signing in solana-keygen (#8267)
* Add fallible methods to KeypairUtil

* Add RemoteKeypair struct and impl KeypairUtil

* Implement RemoteKeypair in keygen; also add parse_keypair_path for cleanup
2020-02-13 14:08:34 -07:00
ab475e4849 get_confirmed_block: expect() less 2020-02-13 10:56:34 -07:00
1c97b31eaf Retain signature subscriptions that haven't been notified (#8261) 2020-02-14 01:00:50 +08:00
bd257050e3 Retry to curl to codecov.io unfortunately (#8263)
automerge
2020-02-13 06:23:10 -08:00
2d362ed337 Remove references to old unused testnets (#8258)
automerge
2020-02-12 22:23:35 -08:00
cb7117beac CLI: Offline-ify remaining stake ops (#8257)
automerge
2020-02-12 22:00:28 -08:00
b358ff66e1 Plumb --enable-rpc-get-confirmed-block flag 2020-02-12 17:08:27 -07:00
6309c97697 Add CliCommand::StakeSetLockup (#8248)
automerge
2020-02-12 15:36:29 -08:00
58727463e1 Remove needless last_root for better reclaims (#8148)
* Restore last_root to fix unintended storage delete

* Remove last_root thing altogether

* Remove unneeded test...
2020-02-13 08:19:53 +09:00
741d148a0d Simplify remote wallet (#8249)
automerge
2020-02-12 14:38:51 -08:00
127553ce4b Wrap ed25519_dalek::Keypair (#8247) 2020-02-12 14:15:12 -07:00
ecb055a252 Expel ContactInfo::new() (#8245)
automerge
2020-02-12 12:58:51 -08:00
dfa6fbaa0c Bump cbindgen from 0.13.0 to 0.13.1 (#8233)
Bumps [cbindgen](https://github.com/eqrion/cbindgen) from 0.13.0 to 0.13.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.13.0...v0.13.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-12 12:25:39 -07:00
cf11d4c7dc Nodes with a tvu and storage port are no longer double counted (#8237)
automerge
2020-02-12 11:16:07 -08:00
d0a4686990 Avoid assigning the serve repair port to the storage port 2020-02-12 12:00:11 -07:00
2542d5dd42 Bump baseline version to 0.23.4, improve error reporting 2020-02-12 11:59:12 -07:00
1e0f2b2446 Quash 'repair listener error: Err(RecvTimeoutError(Timeout))' log spam 2020-02-12 10:35:03 -07:00
a8028fbb93 Fix accounts_db store counts in purging accounts logic (#8218)
* Show insufficient purge_zero_lamport_account logic

* Add another pass to detect non-deleted values and increment the count

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-02-12 08:51:03 -08:00
ed87229cec CLI: Don't hide errors when fees are disabled (#8204)
automerge
2020-02-11 21:48:04 -08:00
c4fd81fc1c The getConfirmedBlock RPC API is now disabled by default
The --enable-rpc-get-confirmed-block flag allows validators to opt-in to
the higher disk usage and IOPS.
2020-02-11 22:24:08 -07:00
ad43babe3d ABI sanity test for running edge,beta,stable validators together 2020-02-11 21:21:31 -07:00
36c0cb052b set_read_timeout() can fail, don't expect() it not to 2020-02-11 18:57:14 -07:00
ed58bcda4c solana-install init edge when "edge" is not currently installed now works 2020-02-11 18:57:14 -07:00
268bb1b59b Fix RPC pub sub unsubscribe (#8208)
automerge
2020-02-11 17:09:40 -08:00
059764586a Rename from account userdata to data (#8224) 2020-02-11 16:30:22 -08:00
72b11081a4 Report validator rewards in getConfirmedBlock JSON RPC 2020-02-11 17:25:45 -07:00
0bbee9456f Add method to sign raw data, enabling easier device app testing (#8221)
* Add method to sign raw data, enabling easier device app testing

* Rename ugly derivation method, params
2020-02-11 17:15:38 -07:00
fcac910989 Bump jsonrpc-pubsub from 14.0.5 to 14.0.6 (#8162)
Bumps [jsonrpc-pubsub](https://github.com/paritytech/jsonrpc) from 14.0.5 to 14.0.6.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/jsonrpc-pubsub-v14.0.5...ipc-14.0.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-11 15:44:21 -07:00
2e9ba149f2 Update LVM and rBPF versions (#8215) 2020-02-11 12:52:13 -08:00
d3712dd26d Factor repair from gossip (#8044) 2020-02-11 13:11:48 -07:00
60877f9ba4 Revert "Check for AVX512 at runtime to avoid invalid opcode trap (#8166)"
This reverts commit ef5fb6fa46.
2020-02-11 12:56:02 -07:00
4f2c76150f Clippy 2020-02-11 12:56:02 -07:00
137577fb86 Upgrade to rust 1.41.0 2020-02-11 12:56:02 -07:00
bf623219d2 nudge (#8214) 2020-02-11 10:50:57 -08:00
25d1f841ee Fixup sign_transaction; pass derivation_path by reference (#8194)
* Fixup sign_transaction; pass derivation_path by reference

* Pass total message length as BE u16

* Remove live integration tests (to ledger-app-solana)
2020-02-11 11:45:00 -07:00
517fe73734 Non-conflicting account duplicate marker value (#8206) 2020-02-11 10:03:28 -08:00
890919d140 Reliably track proc macro & build.rs code coverage (#8210) 2020-02-12 01:02:40 +09:00
33ea1e0edd Channel installs no longer re-download the same release. 2020-02-11 08:22:41 -07:00
7614af2a45 Verify frozen bank from snapshot by hashing (#8184) 2020-02-11 16:46:33 +09:00
1528959327 CLI: Add fee-payer parame to stake-split subcommand (#8201)
automerge
2020-02-10 23:23:54 -08:00
46b6cedff4 Fix nightly clippy warnings (#8199)
automerge
2020-02-10 22:48:50 -08:00
8d8f28c1d0 CLI: transfer fix checks pubkeys (#8198)
automerge
2020-02-10 22:34:14 -08:00
df782b93ae Add is_writable to AccountInfo (#8196) 2020-02-10 21:33:29 -08:00
124f77cdb1 Bump jsonrpc-ws-server from 14.0.5 to 14.0.6 (#8160)
Bumps [jsonrpc-ws-server](https://github.com/paritytech/jsonrpc) from 14.0.5 to 14.0.6.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/jsonrpc-ws-server-v14.0.5...ipc-14.0.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 19:07:52 -07:00
fc15f74c3c CLI: Harden offline signing and tests (#8052)
* CLI: Don't sanity-check stake account when offline

* Add test helper returning vote pubkey with validator

* Delegate to the BSL. No need to force

* Be sure our offline ops are truly offline

* Specify our authorities correctly

* checks
2020-02-10 18:59:05 -07:00
1d06aa3b31 Remove repairman as its spamming cluster with unwanted repairs (#8193)
* Remove repairman as its spamming cluster with unwanted repairs

* remove obsolete test
2020-02-10 17:00:00 -08:00
0b263f8714 Fix larger than necessary allocations in streamer (#8187) 2020-02-10 11:49:07 -08:00
84b3e12e1f Minor logging improvements 2020-02-10 10:42:42 -07:00
669282ae69 Bump jsonrpc-http-server from 14.0.5 to 14.0.6 (#8161)
Bumps [jsonrpc-http-server](https://github.com/paritytech/jsonrpc) from 14.0.5 to 14.0.6.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/jsonrpc-http-server-v14.0.5...ipc-14.0.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 10:30:32 -07:00
485806c488 Just define BnakSlotDelta type alias (#8186)
automerge
2020-02-10 03:11:37 -08:00
1412ee1ca6 add step "apt-get update", add package "libudev-dev" (#8180)
automerge
2020-02-08 14:45:07 -08:00
ef5fb6fa46 Check for AVX512 at runtime to avoid invalid opcode trap (#8166)
automerge
2020-02-07 15:01:45 -08:00
99432833d2 Remove reed-solomon-erasure from core/ 2020-02-07 15:37:57 -07:00
fa00803fbf Filter old CrdsValues received via Pull Responses in Gossip (#8150)
* Add CrdsValue timeout checks on Pull Responses

* Allow older values to enter Crds as long as a ContactInfo exists

* Allow staked contact infos to be inserted into crds if they haven't expired

* Try and handle oveflows

* Fix test

* Some comments

* Fix compile

* fix test deadlock

* Add a test for processing timed out values received via pull response
2020-02-07 12:38:24 -08:00
04ef977509 Remove unwanted println 2020-02-07 12:59:00 -07:00
87c6508305 CLI: Implement transfer command (#8108)
* CLI: Add transfer subcommand

* Add tests

* checks
2020-02-07 12:16:35 -07:00
ed0c1d3b52 Ledger hardware wallet integration (#8068)
* Initial remote wallet module

* Add clap derivation tooling

* Add remote-wallet path apis

* Implement remote-wallet in solana-keygen

* Implement remote-wallet in cli for read-only pubkey usage

* Linux: Use udev backend; add udev rules tool

* Ignore Ledger live test

* Cli api adjustments
2020-02-07 11:26:56 -07:00
8b5598fabd Surface shred version more in tools (#8163)
automerge
2020-02-07 08:57:54 -08:00
5b070ad014 CLI: Support offline fee payers (#8009)
* CLI: Support offline fee-payer

* Add some knobs to test genesis/validator helpers

* Add tests
2020-02-07 09:14:26 -07:00
6246405afd Bump memmap from 0.6.2 to 0.7.0 (#8157)
Bumps [memmap](https://github.com/danburkert/memmap-rs) from 0.6.2 to 0.7.0.
- [Release notes](https://github.com/danburkert/memmap-rs/releases)
- [Commits](https://github.com/danburkert/memmap-rs/compare/0.6.2...0.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-07 06:51:31 -07:00
27c8ba6afc De-replicode Tower constructors (#8153)
automerge
2020-02-06 18:24:10 -08:00
b832a03315 Add libudev-dev to docker image to build remote-wallet (#8149)
automerge
2020-02-06 13:45:05 -08:00
09686290bc Grant custodian access to all locked up accounts (#8139) 2020-02-06 14:31:27 -07:00
4aaa7b30ca Update README.md 2020-02-06 13:19:30 -07:00
fe590da3b6 Revert "Factor repair from gossip (#8044)" (#8143)
This reverts commit e61257695f.
2020-02-06 11:44:20 -08:00
a7fa92b372 feat: implementation of live-slots command (#8129) 2020-02-06 14:16:30 -05:00
a25e57c397 Ignore flaky test_exchange_local_cluster (#8146)
automerge
2020-02-06 10:44:17 -08:00
eed676113e Bump indexmap from 1.3.1 to 1.3.2 (#8144)
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Commits](https://github.com/bluss/indexmap/compare/1.3.1...1.3.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-06 11:16:49 -07:00
b57f24f1bc Bump tokio-codec from 0.1.1 to 0.1.2 (#8126)
Bumps [tokio-codec](https://github.com/tokio-rs/tokio) from 0.1.1 to 0.1.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-codec-0.1.1...0.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-06 11:16:29 -07:00
0e084358b4 Fix slot_hashes documentation 2020-02-06 10:06:16 -07:00
f016c9a669 Maintenance : simplify a few patterns, remove unneeded dependencies (#8137)
* Simplify a few pattern matches

* Removing unneeded dependencies, upgrading internal version #s

 net-shaper: Removing log, semver, serde_derive
 bench-tps: Removing serde, serde_derive
 banking-bench: Removing solana
 ledger-tool: Removing bincode, serde, serde_derive
 librapay: Removing solana, language_e2e_tests
 log-analyzer: Removing log, semver, serde_derive
 exchange: Removing solana
 core: Removing crc, memmap, symlink, untrusted
 perf: Removing serde_derive
 genesis: Removing hex, serde_derive
 sdk-c: Removing sha2
 sys-tuner: Removing semver
 bench-exchange: Removing bincode, bs58, env_logger, serde, serde_derive, untrusted, ws
 btc_spv_bin: Removing serde_json
 btc_spv: Removing chrono
 bpf_loader: Removing serde
 ledger: Removing dlopen, dlopen_derive, serde_derive
 move_loader: Removing byteorder, libc, language_e2e_tests
 ownable: Removing serde, serde_derive
 client: Removing rand
 archiver-utils: Removing rand_chacha
 validator: Removing serde_json, tempfile
 param_passing_dep: Removing solana
 failure: Removing log
 vest: Removing log
 vote-signer: Removing bs58, serde
 local-cluster: Removing symlink
 keygen: Removing rpassword
 install: Removing bs58, log
 upload-perf: Removing log
 runtime: Removing serde_json
 stake: Removing rand

* Add modified Cargo.lock

* fixup! Simplify a few pattern matches

* fixup! Simplify a few pattern matches
2020-02-06 10:02:38 -07:00
59ba1df910 Bump tokio-fs from 0.1.6 to 0.1.7 (#8124)
Bumps [tokio-fs](https://github.com/tokio-rs/tokio) from 0.1.6 to 0.1.7.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Changelog](https://github.com/tokio-rs/tokio/blob/tokio-0.1.7/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-fs-0.1.6...tokio-0.1.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-05 16:27:32 -07:00
71a2c90f21 Bump tokio-io from 0.1.12 to 0.1.13 (#8125)
Bumps [tokio-io](https://github.com/tokio-rs/tokio) from 0.1.12 to 0.1.13.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Changelog](https://github.com/tokio-rs/tokio/blob/tokio-0.1.13/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-io-0.1.12...tokio-0.1.13)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-05 14:02:33 -07:00
8436457e75 Rename program_utils.rs (#8127) 2020-02-05 12:48:30 -08:00
3ac0192d40 Better surface bank hash verification failures 2020-02-05 11:39:47 -07:00
3db159f616 CLI cosmetic: make config get and verbose prints consistent (#8119)
* CLI cosmetic: make config get and verbose prints consistent

* Make print format consistent across cli
2020-02-05 11:14:44 -07:00
e21f5c784e Add next_account_info() (#8120) 2020-02-04 17:04:26 -08:00
65c24db83c Bump serde_json from 1.0.44 to 1.0.46 (#8087)
* Bump serde_json from 1.0.44 to 1.0.46

Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.44 to 1.0.46.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.44...v1.0.46)

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

* Update Move's serde_json to v1.0.46

Co-authored-by: Jack May <jack@solana.com>
2020-02-04 16:59:23 -08:00
ed5101b031 Generate max coding shreds when necessary (#8099)
* Generate max coding shreds when necessary

* test
2020-02-04 15:45:01 -08:00
1420628b28 Bump nix from 0.16.1 to 0.17.0 (#8112)
Bumps [nix](https://github.com/nix-rust/nix) from 0.16.1 to 0.17.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/v0.17.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-04 15:59:34 -07:00
15ab966ed1 Move native program entrypoint out of instruction_processor_utils (#8122) 2020-02-04 14:54:49 -08:00
b5a735878a Sysvar account_into return program error rather than option (#8121) 2020-02-04 14:54:41 -08:00
b6d09f1901 Add BPF program entrypoint return type (#8111) 2020-02-04 12:25:42 -08:00
78f6ddc5b7 Fix spelling of verification in accounts_db (#8117)
automerge
2020-02-04 11:45:47 -08:00
4e595e8e3c Facilitate printing program errors from BPF programs (#8109) 2020-02-04 09:03:45 -08:00
79249360f7 CLI: Expose sign-only reply parsing helper (#8107)
automerge
2020-02-03 18:22:36 -08:00
336d5136bf Print more program error info to user when using CLI (#8098) 2020-02-03 17:14:53 -08:00
0c8cee8c4a Refactor select_fork() to avoid clones and for clarity (#8081)
* Refactor select_fork() to avoid clones and for clarity

* Add test that fork weights are increasing
2020-02-03 16:48:24 -08:00
4c0420b884 Delete uptime command, report total credits in solana validators instead 2020-02-03 16:55:33 -07:00
0d7e093415 Broaden pattern in nits.sh to be less fragile (#8090)
* Broaden pattern in nits.sh to be less fragile

* Even more general matching
2020-02-04 08:53:01 +09:00
c835749563 Bump sys-info from 0.5.8 to 0.5.9 (#8089)
Bumps [sys-info](https://github.com/FillZpp/sys-info-rs) from 0.5.8 to 0.5.9.
- [Release notes](https://github.com/FillZpp/sys-info-rs/releases)
- [Changelog](https://github.com/FillZpp/sys-info-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/FillZpp/sys-info-rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-03 14:49:39 -07:00
0172d2a065 Fix consensus threshold when new root is created (#8093)
When a new root is created, the oldest slot is popped off
but when the logic checks for identical slots, it assumes
that any difference means a slot was popped off the front.
2020-02-03 13:44:34 -08:00
927f272f0e Update book release version 2020-02-03 11:35:51 -07:00
5e2891ae5d e 2020-02-03 11:34:00 -07:00
4f85481a2b Add split-stake command 2020-02-03 11:14:08 -07:00
d314e0395a Disable windows update as windows build artifacts are turned off 2020-02-01 22:25:24 -07:00
69a6d07371 Reduce rpc client pre-flight requests by setting max-age header (#8082)
automerge
2020-02-01 04:10:26 -08:00
fab8ef379f Use solana-cli config keypair in solana-keygen (#8074)
* Use solana-cli config keypair in solana-keygen

* s/infile/keypair for consistency across modules and more generality across access methods

* Move config into separate crate
2020-01-31 19:27:37 -07:00
408ef8b2cb Cleanup staking doc (#8064) 2020-01-31 19:24:51 -07:00
a2a2f1c2d2 Add new colo test cases using reduced node count (#8078)
automerge
2020-01-31 18:02:48 -08:00
dc2888c9a3 CLI: De-replicode SigningAuthority instatiation (#8076)
automerge
2020-01-31 16:30:37 -08:00
9739be9ecf CLI: Fix stake-account auth withdrawer output (#8071)
automerge
2020-01-31 14:25:05 -08:00
e61257695f Factor repair from gossip (#8044) 2020-01-31 14:23:50 -08:00
b9988b62e4 Filter repairman peers based on shred_version (#8069) 2020-01-31 14:00:19 -08:00
d6b3961530 s/mint/faucet 2020-01-31 12:14:53 -07:00
6d0be323ad Update key (#8062)
automerge
2020-01-31 11:11:22 -08:00
09256adbc3 Surface important error details 2020-01-31 12:09:41 -07:00
8e3a7da596 Rewrite new() in terms of new_with_timeout() 2020-01-31 12:09:41 -07:00
7d96510d17 Fix stake-account subcommand name 2020-01-31 12:09:41 -07:00
0fd795a676 Remove program error footgun and cleaner developer experience (#8042) 2020-01-31 10:58:07 -08:00
eff876881b Remove asteroids and pacman from QA/dev testnet availability (#8050)
automerge
2020-01-31 10:26:25 -08:00
9adf0d4ee0 Don't exit early if add. validators not found during gce.sh config 2020-01-31 08:34:10 -07:00
3bc9789e8d Remove support for 0.22.3 snapshots 2020-01-30 23:34:15 -07:00
fd207b6907 Fix stale gossip entrypoint (#8053) 2020-01-30 21:51:11 -08:00
2226c1b75c Add Rust BPF RefCell borrow helpers (#8047) 2020-01-30 20:40:27 -08:00
a0964bb2c2 Make tds slots-per-epoch configurable 2020-01-30 21:37:16 -07:00
b5383b8b54 Dial testnet down to a single node 2020-01-30 21:30:08 -07:00
39f86050a6 Bump cbindgen from 0.12.2 to 0.13.0
Bumps [cbindgen](https://github.com/eqrion/cbindgen) from 0.12.2 to 0.13.0.
- [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.12.2...v0.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-30 20:58:10 -07:00
a03d441e6f Add rpc port sanity checks, fix tests 2020-01-30 20:57:58 -07:00
3900d09f6f Employ rpc_port defaults 2020-01-30 20:57:58 -07:00
e218f4e56e Clean up Validator::new() 2020-01-30 20:57:58 -07:00
81ba18eea6 Add --private-rpc flag 2020-01-30 20:57:58 -07:00
1671ece9df Book: Prod the user to verify their new paper wallet (#8048) 2020-01-30 17:20:04 -07:00
775fa0c968 Minor --expected-shred fix, clean up shred-related gossip log messages (#8041)
automerge
2020-01-30 13:22:05 -08:00
dd276138c2 Add support for idiomatic error handling to BPF instruction processors (#7968) 2020-01-30 09:47:22 -08:00
0c55b37976 Add different shred test to test_tvu_peers_and_stakes 2020-01-30 10:30:32 -07:00
966d077431 CLI: Disallow blockhash/fee-calc lookups when offline (#7981)
* CLI: Add BlockhashSpec to tighten control over --blockhash

* Use BlockhashSpec

* Add a matches-free constructor

* More descriptive naming
2020-01-30 09:21:32 -07:00
400412d76c Ignore slow archiver tests (#8032)
automerge
2020-01-30 08:17:36 -08:00
c7e77a2238 Bump indicatif from 0.13.0 to 0.14.0
Bumps [indicatif](https://github.com/mitsuhiko/indicatif) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/mitsuhiko/indicatif/releases)
- [Commits](https://github.com/mitsuhiko/indicatif/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-30 08:58:00 -07:00
64c42e28dc Add shred version filters to Crds Accessors (#8027)
* Add shred version filters to Crds Accessors

* Adopt entrypoint shred_version if one isn't provided
2020-01-30 00:15:37 -08:00
c2baf7b07d Bump thiserror from 1.0.9 to 1.0.10
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.9 to 1.0.10.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.9...1.0.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-29 23:23:24 -07:00
a52a9afa3c Bump console from 0.9.1 to 0.9.2
Bumps [console](https://github.com/mitsuhiko/console) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Commits](https://github.com/mitsuhiko/console/compare/0.9.1...0.9.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-29 23:22:44 -07:00
669502ede7 Don't depend on user modifiable data to parse paramter buffer (#8022) 2020-01-29 21:49:42 -08:00
b19f730527 Seperate RefCells lamports and data (#8021) 2020-01-29 21:15:04 -08:00
d5ff5f4739 Update solana_rbpf v0.1.20 (#8023) 2020-01-29 21:14:49 -08:00
1c82f84595 Add leader-schedule subcommand 2020-01-29 20:08:42 -07:00
bea9cd9684 Add --expected-shred-version option 2020-01-29 20:08:42 -07:00
1bc9a9c23b Wait for supermajority by default, add --no-wait-for-supermajority flag to override 2020-01-29 20:08:42 -07:00
c4faccc77f getClusterNodes now excludes validators with a different shred version 2020-01-29 20:08:42 -07:00
e6803daf10 Remove support for stake redelegation (#7995)
* Remove support for stake redelegation

* fixup
2020-01-29 17:59:14 -08:00
effe6e3ff3 Log solana-validator args on startup to aid debugging 2020-01-29 08:27:52 -07:00
0d6c233747 Add set_lockup to stake (#7997) 2020-01-28 20:59:53 -08:00
015e696077 Solana keygen grind improvements (#8008)
automerge
2020-01-28 20:19:19 -08:00
7faab2072c Cleanup BPF use syntax (#8001) 2020-01-28 17:03:37 -08:00
83718a3b3e Cleanup runtime use syntax (#8002) 2020-01-28 17:03:20 -08:00
4a074133f7 CLI: Fix tests. sign_only requires a blockhash (#8005)
This is enforced by argument parsing and will be better enforced wholly
with #7981
2020-01-28 18:02:20 -07:00
12eff5a2f9 Cleanup SDK use syntax (#8004) 2020-01-28 16:11:22 -08:00
4197cce8c9 Tower tests (#7974)
* Add testing framework for voting
2020-01-28 16:02:28 -08:00
fed3817ed3 Update and fix transaction error documentation (#7998) 2020-01-28 15:59:50 -08:00
4ffd7693d6 Add lock to make sure slot-based locktree calls are safe (#7993) 2020-01-28 13:45:41 -08:00
1596c961d9 Rust BPF program cleanup (#7990) 2020-01-27 18:27:44 -08:00
fd7d5cbe0d Fix compute_shred_version() (#7989)
automerge
2020-01-27 17:05:31 -08:00
7058287273 Consensus fix, don't consider threshold check if.. (#7948)
* Consensus fix, don't consider threshold check if

lockouts are not increased

* Change partition tests to wait for epoch with > lockout slots

* Use atomic bool to signal partition
2020-01-27 16:49:25 -08:00
912aafcefd Reduce epoch duration from 2 weeks to 2 days 2020-01-27 10:34:55 -07:00
2f34f433b3 Specify where VM images are coming from across GCE projects (#7985)
automerge
2020-01-27 08:17:21 -08:00
1ff4dd9a9a Remove show- prefix 2020-01-26 21:00:57 -07:00
fdcaad96c7 Remove stray key 2020-01-26 14:35:33 -07:00
14a72b0fc0 CLI: --sign-only and --signer require --blockhash (#7982) 2020-01-26 10:06:21 -07:00
c13ab9f14e CLI: Consolidate offline arg declarations (#7979)
automerge
2020-01-26 00:27:24 -08:00
cff1bc6e71 s/dervied/derived/ 2020-01-25 23:22:28 -07:00
bb6c4efe9b CLI: Deterministic dummy keypair generation for SigningAuthority::Offline (#7971)
* CLI: Deterministic dummy keypair generation for SigningAuthority::Offline

* Add test
2020-01-25 22:14:07 -07:00
c324e71768 Bump cargo toml versions to 0.24.0 (#7976) 2020-01-25 11:04:27 -06:00
e2570c98ee CLI: Add authority to show-nonce-account output (#7969) 2020-01-25 07:21:23 -07:00
b5125479ec Bump perf libs to v0.18.0 for CUDA 10.2 support 2020-01-24 21:39:49 -07:00
989355e885 Add ability to hard fork at any slot (#7801)
automerge
2020-01-24 17:27:04 -08:00
a2f2c46f87 Ensure shred version is never 0 2020-01-24 17:41:20 -07:00
605623baf5 Report last tower distance and add partition testcase (#7929)
automerge
2020-01-24 16:37:19 -08:00
fdc452c536 Move testnet.solana.com and TdS to their own GCP projects 2020-01-24 16:26:54 -07:00
1b391dd36b Add account accessor functions (#7966) 2020-01-24 14:34:59 -08:00
917067741a Cleanup BPF SDK (#7965) 2020-01-24 13:41:14 -08:00
34ed93d57c Optimize account copies and use RefCell to handle duplicate accounts in BPF programs (#7958) 2020-01-24 10:54:26 -08:00
d400a64b9a Update tiny_bip39 (#7959)
automerge
2020-01-24 08:59:07 -08:00
2c7447b73e Secure sysvars under hash by freezing all strictly (#7892)
* Secure sysvars under hash by freezing all strictly

* Fix hash's non-idempotnet and add new test

* Clean up

* More cleanups
2020-01-24 16:10:32 +09:00
c0f0fa24f8 Increase --wait-for-supermajority to wait for 75% online stake 2020-01-23 22:41:46 -07:00
bda5f949bb Add create-snapshot command 2020-01-23 22:21:27 -07:00
992e985972 Add column for slot range of epoch to epoch-info (#7954)
automerge
2020-01-23 20:44:37 -08:00
afaa359b0d Reorg the book (#7952)
* Move application-oriented docs

* Reorg the book

* Fix build

* Apply review feedback

* verb-noun
2020-01-23 21:21:43 -07:00
3c17db41dc Add note to book about drone throughput limitations (#7953)
automerge
2020-01-23 18:50:25 -08:00
d62ed4f6b3 Add BlockstoreProcessorResult 2020-01-23 16:52:47 -07:00
79f3194d0c Fix cli call to stakes (#7946)
automerge
2020-01-23 14:25:40 -08:00
b045f9a50d codemod --extensions rs get_snapshot_tar_path get_snapshot_archive_path 2020-01-23 13:37:13 -07:00
ce231602dc Move snapshot archive generation out of the SnapshotPackagerService 2020-01-23 13:37:13 -07:00
6f5e0cd161 Type grooming 2020-01-23 13:37:13 -07:00
1269a79a4d Unify ledger_path arg handling with validator/ 2020-01-23 13:37:13 -07:00
1b3424ff61 Pass bank_forks by reference 2020-01-23 13:37:13 -07:00
8b8033c72b Set BankRc slot correctly when restoring a bank snapshot 2020-01-23 13:37:13 -07:00
7ca0109732 --halt-at-slot 1 now halts at slot 1 2020-01-23 13:37:13 -07:00
6b5172d002 add_snapshot now returns SlotSnapshotPaths 2020-01-23 13:37:13 -07:00
9e19a635bb Remove superfluous accounts arg 2020-01-23 13:37:13 -07:00
15193d0e1f Ensure all GCE nightly tests use dedicated instances (#7944)
automerge
2020-01-23 10:17:12 -08:00
f1c5c72e62 Fix transaction.md anchor links (#7943)
* Lowercase links

* Fix misspelled anchor link
2020-01-23 10:05:42 -07:00
25dfed207c Remove dead code (#7940)
automerge
2020-01-23 00:38:46 -08:00
006cbee88a Uninteresting cleanup 2020-01-22 21:24:20 -07:00
c95e5346a4 Boot the mut (#7926) 2020-01-22 17:54:06 -08:00
e54bf563b5 Avoid unsorted recent_blockhashes for determinism (#7918)
* Avoid unsorted recent_blockhashes for determinism

* Add a test: test_create_account_unsorted
2020-01-23 10:51:22 +09:00
8f79327190 Test account doesn't need RefCell (#7932)
automerge
2020-01-22 17:06:11 -08:00
a197ac092a New Anatomy of a Transaction (#7930)
automerge
2020-01-22 16:58:46 -08:00
1e2b55c0d7 Remove RedeemVoteCredits (#7916)
* Move redeem_vote_credits into runtime

* Move redeem_vote_credits into runtime

* Remove RedeemVoteCredits

* chugga for less indentation

* resurrect NoCreditsToRedeem

* fixup
2020-01-22 16:53:42 -08:00
964ff522be Verb-noun-ify Nonce API (#7925)
* Verb-noun-ify Nonce API

* Unify instruction naming with API naming

The more verbose nonce_account/NonceAccount was chosen for clarity
that these instructions work on a unique species of system account
2020-01-22 16:31:39 -07:00
934c32cbc6 Add mechanism to load v0.22.3 snapshots on newer Solana versions 2020-01-22 15:40:32 -07:00
9bd6be779f Reject CI on failed mergify.io backports (#7927)
automerge
2020-01-22 14:10:26 -08:00
ce70d6eedc Add redeem_vote_credits to runtime (#7910)
* Move redeem_vote_credits into runtime

* fixup

* test

* move stake manipulation to stake program

* chugga for less indentation
2020-01-22 12:21:31 -08:00
3a0d13aa77 CLI: Cleanup authority arg usage inconsistencies (#7922)
automerge
2020-01-22 11:19:07 -08:00
f9323c5273 don't put accounts in a weird location, use the defaults (#7921)
automerge
2020-01-22 10:57:37 -08:00
7587656cf6 Implement automated partition testing (#7222) 2020-01-22 13:46:50 -05:00
023074650f Allow the same account to be passed multiple times to a single instruction (#7795) 2020-01-22 09:11:56 -08:00
d854e90c23 CLI: Support offline authorities (#7905) 2020-01-22 10:10:22 -07:00
3aabeb2b81 Rename bootstrap leader (#7906)
* Rename bootstrap leader to bootstrap validator

It's a normal validator as soon as other validators enter the
leader schedule.

* cargo fmt

* Fix build

Thanks @CriesofCarrots!
2020-01-22 09:22:09 -07:00
65f5885bce sendTransaction rpc: expect transaction as base58 string (#7913) 2020-01-21 22:16:07 -07:00
7a132eabb4 Update JSON-RPC documentation (#7915)
* Streamline getBlockCommitment response

* Update json-rpc docs
2020-01-21 20:17:33 -07:00
7e1b380f01 Move vote_state current credits into epoch_credits (#7909)
* Move vote_state current credits into epoch_credits

* fixups

* fixup
2020-01-21 19:08:40 -08:00
1a2d9b8eed Bump csv from 1.1.2 to 1.1.3 (#7893)
Bumps [csv](https://github.com/BurntSushi/rust-csv) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/BurntSushi/rust-csv/releases)
- [Commits](https://github.com/BurntSushi/rust-csv/compare/1.1.2...1.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-21 19:49:19 -07:00
6eefa0b72d Integrate transaction chapter into programming model chapter (#7911)
automerge
2020-01-21 16:44:05 -08:00
44372db955 Move Blockstreamer doc into getting started doc 2020-01-21 17:15:29 -07:00
e24cce4aed Hoist blockstore chapter (#7908)
automerge
2020-01-21 16:01:26 -08:00
a8595c0418 Give chapters more precise titles (#7907)
automerge
2020-01-21 15:36:40 -08:00
340424e03a Use minimumLedgerSlot RPC API in block-production command 2020-01-21 14:05:26 -07:00
93036bec01 Add minimumLedgerSlot RPC API 2020-01-21 14:05:26 -07:00
663e98969d Use a different error to test rpc response (#7900)
automerge
2020-01-21 12:42:23 -08:00
37d1daf58e Revert "Generate MAX_DATA_SHREDS_PER_FEC_BLOCK coding shreds for each FEC block (#7474)" (#7898)
automerge
2020-01-21 11:48:09 -08:00
1a18f0ca55 Add rust duplicate account test program (#7897)
automerge
2020-01-21 10:59:19 -08:00
bb950ec93e Naming nits (#7896)
automerge
2020-01-21 10:38:46 -08:00
39ab3557a3 Delete "testnet participation" redirect (#7895)
automerge
2020-01-21 09:35:59 -08:00
dcdc46b97c Assume 1 or more validators 2020-01-21 10:34:58 -07:00
da3ed0dfb3 Try running testnet.solana.com with only two validators 2020-01-21 10:34:53 -07:00
e391b9fb90 Delete duplicate book content (#7894)
automerge
2020-01-21 09:17:20 -08:00
e346cdad26 Run ./book/build-cli-usage.sh 2020-01-21 08:58:29 -07:00
7e4c6ff218 solana set => solana config set 2020-01-21 08:53:44 -07:00
356f246a74 Remove get-/show- prefix from cli commands 2020-01-21 08:43:07 -07:00
80da552834 Bump rpassword from 4.0.4 to 4.0.5
Bumps [rpassword](https://github.com/conradkleinespel/rpassword) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/conradkleinespel/rpassword/releases)
- [Commits](https://github.com/conradkleinespel/rpassword/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-20 23:30:18 -07:00
2dd8ab197d Remove redundant threadpools in sigverify (#7888)
* Limit the number of thread pools sigverify creates

* Name local threadpools
2020-01-20 20:08:19 -08:00
1fe11e9ae2 chacha ignore farf (#7882) 2020-01-20 17:04:31 -08:00
21d5fe6272 Fix timestamp overflow (#7886)
* Split timestamp calculation into separate fn for math unit testing

* Add failing test

* Fix failing test; also bump stakes to near expected cluster max supply

* Don't error on timestamp of slot 0
2020-01-20 17:54:44 -07:00
52bc4a3598 nudge (#7887) 2020-01-20 15:27:36 -08:00
cccaacee36 Wait for stake distribution in automation (#7883)
automerge
2020-01-20 13:32:37 -08:00
ebf6e1c0e9 --limit-ledger-size now accepts an optional slot count value 2020-01-20 14:20:30 -07:00
5cf090c896 feat: implement RPC notification queue (#7863) 2020-01-20 16:08:29 -05:00
cc299053cc Add support for stake::split() via create_account_with_seed() (#7879)
* Add split with seed

* move to new system_program APIs

* de-replicode
2020-01-20 12:33:27 -08:00
82b75796f9 Create ledger directory if it doesn't already exist 2020-01-20 10:11:43 -07:00
a560d94a9f Bump humantime from 1.3.0 to 2.0.0
Bumps [humantime](https://github.com/tailhook/humantime) from 1.3.0 to 2.0.0.
- [Release notes](https://github.com/tailhook/humantime/releases)
- [Commits](https://github.com/tailhook/humantime/compare/v1.3.0...v2.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-20 10:08:11 -07:00
0827d52c6f Bump indexmap from 1.1.0 to 1.3.1
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.1.0 to 1.3.1.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Commits](https://github.com/bluss/indexmap/compare/1.1.0...1.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-20 10:07:48 -07:00
a8d33c9950 Spy just for RPC to avoid premature supermajority (#7856)
* Spy just for RPC to avoid premature supermajority

* Make gossip_content_info private

Co-Authored-By: Michael Vines <mvines@gmail.com>

* Fix misindent...

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-01-20 10:50:31 +09:00
43c32ea280 Bump rpassword from 4.0.3 to 4.0.4
Bumps [rpassword](https://github.com/conradkleinespel/rpassword) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/conradkleinespel/rpassword/releases)
- [Commits](https://github.com/conradkleinespel/rpassword/compare/v.4.0.3...v4.0.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-18 19:32:14 -07:00
30d40e9a32 If a bad RPC node is selected try another one instead of aborting 2020-01-18 11:00:08 -07:00
e28508ad56 Abort if a snapshot download fails for any reason other than 404 2020-01-18 08:59:53 -07:00
182e4cec86 Update backport labels 2020-01-17 21:38:39 -07:00
a32de96ab1 Add show-stakes subcommand 2020-01-17 14:14:01 -07:00
0de35fdd1f CLI: Support offline and nonced stake subcommands (#7831)
* Support durable nonce for staker-authorize-*

* CLI: Factor out sign-only reply parsing to helper

* Support offline signing for staker-authorize-*
2020-01-17 10:30:56 -07:00
470d9cd752 Add system_instruction::{allocate, allocate_with_seed, assign_with_seed}, (#7847)
* cleanup test checks cargo audit

* Add system_instruction allocate

* fixup

* fixup
2020-01-17 09:29:15 -08:00
87598c7612 Consolidate tx error counters and update metrics dashboard (#7724)
automerge
2020-01-16 23:26:50 -08:00
57bf618627 Enable config program at soft launch epoch 0 (#7854)
automerge
2020-01-16 23:05:33 -08:00
c576a707b0 Increase token cap (#7855)
automerge
2020-01-16 23:02:05 -08:00
b78b1bbfa9 Improve bench-tps keypair generation (#7723)
* Improve bench-tps keypair generation

* Fix tests

* Fix move test

* cargo fmt

* Split up funding function into smaller functions

* Support restarting bench-tps without re-funding

* Change quick start logic and remove noisy log
2020-01-17 10:35:12 +08:00
e710964d05 Revamp the progress of current epoch in get-epoch-info (#7838)
* Revamp the progress of current epoch in get-epoch-info

* Incorporate suggested more concise labelling
2020-01-17 09:39:47 +09:00
2d00657756 Bump num_cpus from 1.11.1 to 1.12.0 (#7845)
Bumps [num_cpus](https://github.com/seanmonstar/num_cpus) from 1.11.1 to 1.12.0.
- [Release notes](https://github.com/seanmonstar/num_cpus/releases)
- [Changelog](https://github.com/seanmonstar/num_cpus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/num_cpus/compare/v1.11.1...v1.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-16 17:38:13 -07:00
0526d4ff21 Add logging surrounding failure in get_slot_entries_with_shred_info() (#7846)
* Add logging surrounding failure
2020-01-16 16:03:24 -08:00
76e20015a4 Add separate thread to check for and store duplicate slot proofs (#7834) 2020-01-16 15:27:54 -08:00
f5e797e3aa cleanup test checks cargo audit (#7849)
automerge
2020-01-16 15:08:36 -08:00
787e36a28f ignore prost is part of move (#7848) 2020-01-16 14:14:44 -08:00
8572b57834 Refactor chacha cuda to be able to test cuda crate but not in OpenCL (#7685)
* Refactor chacha cuda to be able to test cuda crate but not in OpenCL

chacha not implemeted in OpenCL

* Get off core::Error
2020-01-16 08:29:36 -08:00
ed0129f881 Don't depend on unused lazy_static 2020-01-16 08:43:13 -07:00
78836a9e22 Make run.sh not overwrite genesis if existing (#7837) 2020-01-16 14:34:36 +09:00
4c08184379 no check if no change (#7824) 2020-01-15 15:13:11 -08:00
da165d6943 Fix Rpc inconsistencies (#7826)
* Update rpc account format: remove byte arrays

* Base58-encode pubkeys in getStoragePubkeysForSlot

* Update docs
2020-01-15 15:33:53 -07:00
8ffccfbaff CLI: Plumb stake authorities throughout (#7822)
automerge
2020-01-15 13:32:06 -08:00
a6d083d69d Remove create_account bandaid now that to's signature is required (#7776)
* Remove create account bandaid now that  requires signature

* shrink scope of this PR to bandaid
2020-01-15 13:03:22 -08:00
91bae9d510 Don't use word 'securely' (#7820)
automerge
2020-01-15 11:30:11 -08:00
f0f185509f Remove tuple from programNotification (#7819)
automerge
2020-01-15 10:52:02 -08:00
5947ef7706 Remove word pair from address generator seed string (#7802)
* Remove word pair from address generator seed string
2020-01-15 13:50:37 -05:00
4f663a2a86 Add new genesis validators (#7814)
automerge
2020-01-15 09:26:49 -08:00
1d01777a13 Prefer CUDA_HOME environment variable 2020-01-15 09:03:52 -07:00
6d3b8b6d7d Remove tuples from JSON RPC responses (#7806)
* Remove RpcConfirmedBlock tuple

* Remove getRecentBlockhash tuple

* Remove getProgramAccounts tuple

* Remove tuple from get_signature_confirmation_status

* Collect Rpc response types

* Camel-case epoch schedule for rpc response

* Remove getBlockCommitment tuple

* Remove getStorageTurn tuple

* Update json-rpc docs
2020-01-15 00:25:45 -07:00
50c1c08235 Set bootstrap leader and net/ validator vote account commission to 100% 2020-01-15 00:25:26 -07:00
b16c30b4c6 Fix cluster collapse due to no proper shifted read (#7797)
* Fix cluster collapse due to no proper shifted read

* Add test for bank hash mismatch

Co-authored-by: sakridge <sakridge@gmail.com>
2020-01-15 11:45:19 +09:00
ff1ca1e0d3 Consolidate entry tick verification into one function (#7740)
* Consolidate entry tick verification into one function

* Mark bad slots as dead in blocktree processor

* more feedback

* Add bank.is_complete

* feedback
2020-01-15 09:15:26 +08:00
721c4378c1 Plumb ability to handle duplicate shreds into shred insertion functions (#7784) 2020-01-14 15:37:53 -08:00
5f4e0c7e3e Naming nits (#7798)
automerge
2020-01-14 13:38:17 -08:00
e6af4511a8 Include shred version in gossip 2020-01-14 14:32:40 -07:00
965ad778dd Improve KeypairFileNotFound error message (#7792)
automerge
2020-01-14 12:19:08 -08:00
3b78be83cf Add hash stats information to check hashes between validators (#7780)
automerge
2020-01-14 11:57:29 -08:00
564cd4e09d Book: Drop since-fixed nonce known issue (#7789)
automerge
2020-01-14 10:13:09 -08:00
699ca5fec1 Unignore advisories as affected ver. is corrected (#7730)
For details see upstream PR: https://github.com/RustSec/advisory-db/pull/221
2020-01-14 11:16:32 +09:00
f91ffbbfdf Add support in BlockStore for tracking duplicate slots (#7761)
* Add test

* Add new column family to track duplicate slots

* Fix clippy errors

* Introduce new SlotColumn for common implementation of Column trait
2020-01-13 17:21:39 -08:00
156292e408 Reduce grace ticks, and ignore grace ticks for missing leaders (#7764)
* Reduce grace ticks, and ignore grace ticks for missing leaders

* address review comments

* blockstore related renames
2020-01-14 05:25:41 +05:30
81ae44f858 Nonce: Rename instructions with VerbNoun scheme (#7775)
automerge
2020-01-13 15:34:43 -08:00
c948814eae Update getConfirmedBlock examples (#7772) 2020-01-13 15:05:27 -07:00
b5dba77056 Rename blocktree to blockstore (#7757)
automerge
2020-01-13 13:13:52 -08:00
ef06d165b4 Book: Update durable nonce proposal entry (#7694)
automerge
2020-01-13 13:12:09 -08:00
5cb23c814d Install move-loader binaries (#7768) 2020-01-13 12:53:53 -08:00
8f7ded33e0 coalesce data and coding index (#7765) 2020-01-13 12:03:19 -08:00
a17d5795fb getConfirmedBlock: add encoding optional parameter (#7756)
automerge
2020-01-12 21:34:30 -08:00
ad4d41e602 Pick an RPC node at random to avoid getting stuck on a bad RPC node 2020-01-11 12:10:11 -07:00
9754fc789e Manage durable nonce stored value in runtime (#7684)
* Bank: Return nonce pubkey/account from `check_tx_durable_nonce`

* Forward account with HashAgeKind::DurableNonce

* Add durable nonce helper for HashAgeKind

* Add nonce util for advancing stored nonce in runtime

* Advance nonce in runtime

* Store rolled back nonce account on TX InstructionError

* nonce: Add test for replayed InstErr fee theft
2020-01-10 16:57:31 -07:00
fd3c6eb320 Remove print in test (#7758)
automerge
2020-01-10 15:37:22 -08:00
b7b68ecdba Add partition testing documentation (#7739) 2020-01-10 15:32:43 -08:00
08ba27627d Direct entrypoint for execution (#7746) 2020-01-10 13:20:15 -08:00
27d2c0aaf3 Handle errors on replaying ledger properly (#7741) 2020-01-10 12:16:44 -08:00
b714a4be63 Fix call to BPF build script (#7754)
automerge
2020-01-10 10:28:55 -08:00
2356b25c58 Book: Update SPV section to reflect new account state query mechanism (#5399)
* Book: Update SPV section to reflect new account state query mechanism

* Book: SPV - Rename Bank-Merkle diagram

* Relax specificity of inclusion proof resolution

* Cosmetic: re-wrap at 80
2020-01-10 10:48:29 -07:00
05cad05505 Update validator proposal (#7752)
* Use 80-char lines

* Remove the part that was implemented in Gulf Stream
2020-01-10 10:15:49 -07:00
1e3082fbc0 Bump tiny-bip39 from 0.6.2 to 0.7.0 (#7750)
Bumps [tiny-bip39](https://github.com/maciejhirsz/tiny-bip39) from 0.6.2 to 0.7.0.
- [Release notes](https://github.com/maciejhirsz/tiny-bip39/releases)
- [Changelog](https://github.com/maciejhirsz/tiny-bip39/blob/master/CHANGELOG.md)
- [Commits](https://github.com/maciejhirsz/tiny-bip39/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-10 09:19:28 -07:00
80d2573b10 Bump cbindgen from 0.12.1 to 0.12.2 (#7749)
Bumps [cbindgen](https://github.com/eqrion/cbindgen) from 0.12.1 to 0.12.2.
- [Release notes](https://github.com/eqrion/cbindgen/releases)
- [Changelog](https://github.com/eqrion/cbindgen/blob/master/CHANGES)
- [Commits](https://github.com/eqrion/cbindgen/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-10 09:19:01 -07:00
6adcdc41f4 Bump num-traits from 0.2.10 to 0.2.11 (#7737)
Bumps [num-traits](https://github.com/rust-num/num-traits) from 0.2.10 to 0.2.11.
- [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.10...num-traits-0.2.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-10 09:18:39 -07:00
2d08dddfc8 nit, cleanup uses (#7747)
automerge
2020-01-09 23:58:13 -08:00
6da8f49d8b nit, clearer error message (#7748)
automerge
2020-01-09 23:53:47 -08:00
bcd072c5e8 Clarify account creation error messages in CLI (#7719)
* Clarify account creation error messages in CLI

* feedback

* Fix rebase
2020-01-10 12:25:07 +08:00
e90a31781c Update http crate in bpf program to fix security vulnerability (#7735) 2020-01-10 10:21:20 +08:00
2e89ec9105 Don't keep generating transactions in non-sustained bench-tps mode (#7577) 2020-01-09 17:48:18 -08:00
865c42465a Cap file size for snapshot data files (#7182)
* save limit deserialize

* save

* Save

* Clean up

* rustfmt

* rustfmt

* Just comment out to please CI

* Fix ci...

* Move code

* Rustfmt

* Crean up control flow

* Add another comment

* Introduce predetermined constant limit on snapshot data files (deserialize side)

* Introduce predetermined constant limit on snapshot data files (serialize side)

* rustfmt

* Tweak message

* Revert dynamic memory limit

* Limit size of snapshot data file (de)serialization

* Fix test breakage

* Clean up

* Fix uses formatting

* Rename: deserialize_{for,from}_snapshot

* Simplify comment

* Use Slot

* Provide slot for status cache

* Align variable name with snapshot_status_cache_file_path

* Define serialize_snapshot_data_file_with_metrics

* Fix build.......

* De-marco serialize_snapshot_data_file_with_metrics

* Revert u64 => Slot
2020-01-10 09:49:36 +09:00
73c93cc345 Print bank hash and hash inputs. (#7733) 2020-01-09 16:33:10 -08:00
cf32fdf672 Bump reqwest from 0.10.0 to 0.10.1 (#7731)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.10.0 to 0.10.1.
- [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.10.0...v0.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 17:10:55 -07:00
c33b54794c Propose Solana ABI management (#7524)
* Propose Solana ABI management

* Mention fuzz testing

* Address minor review comments

* Remove versioning and unit tests

* Rename

* Clean up a bit

* Pass through Grammarly

* Yet more tweaks...
2020-01-10 08:24:08 +09:00
6775e83420 Add create with seed to cli (#7713)
* Add create with seed to cli

* nonce and vote, too
2020-01-09 15:22:48 -08:00
719785a8d3 Update http crate to fix security vulnerability (#7725)
* Update http to fix security vulnerability

* Ignore RUSTSEC because they incorrectly says http 0.1.21 is vulnerable
2020-01-10 04:43:02 +09:00
287995ffdf Correctly integrate buildkite with codecov (#7718)
* Correctly integrate buildkite with codecov

* Fix shellcheck...

* Really detect Buildkite
2020-01-10 03:39:33 +09:00
0e506a53b5 Bump url from 2.1.0 to 2.1.1 (#7720)
Bumps [url](https://github.com/servo/rust-url) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 08:44:47 -07:00
70e1a15973 Remove vote account from genesis validators 2020-01-08 22:47:56 -07:00
09cff5e4cc Cleanup usage of feature "program" (#7712) 2020-01-08 13:49:35 -08:00
57858b8015 Bump reqwest from 0.9.24 to 0.10.0 (#7642)
* Bump reqwest from 0.9.24 to 0.10.0

Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.24 to 0.10.0.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/commits)

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

* Make reqwest::blocking specific

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-01-08 13:31:43 -07:00
07855e3125 Allow override of RUST_LOG (#7705) 2020-01-08 09:19:12 -08:00
2f5f8e7afd Pass RUST_LOG through on testnet creation (#7707) 2020-01-07 21:46:28 -08:00
43897de12e Account for stake held by the current node while waiting for the supermajority to join gossip 2020-01-07 22:29:31 -07:00
4b577aa77b Bump cc from 1.0.48 to 1.0.49 (#7690)
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.48 to 1.0.49.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.48...1.0.49)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-07 22:13:17 -07:00
85c3d64f29 Fix rooted slot iterator (#7695)
* Enable jumping gaps caused by snapshots in rooted slot iterator
2020-01-07 22:51:28 -05:00
47dd293904 supermajority is one word 2020-01-07 15:50:59 -07:00
c4220a4853 clippy 2020-01-07 15:50:59 -07:00
48ab88a2af Add --wait-for-super-majority to facilitate asynchronous cluster restarts 2020-01-07 15:50:59 -07:00
d9cf9709d2 Bump csv from 1.1.1 to 1.1.2 (#7698)
Bumps [csv](https://github.com/BurntSushi/rust-csv) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/BurntSushi/rust-csv/releases)
- [Commits](https://github.com/BurntSushi/rust-csv/compare/1.1.1...1.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-07 14:38:02 -07:00
9720c894f1 Use commas to make a log message more readable 2020-01-06 22:31:01 -07:00
8dad3af36d Update Lockup comments (#7692) 2020-01-06 19:52:20 -08:00
e5425d4a27 Fix AppendVec test breakage... (#7693) 2020-01-07 09:21:59 +09:00
58e6d4aabb Sanitize AppendVec's file_size (#7373)
* Check append vec file size

* Don't use panic

* Clean up a bit

* Clean up

* Clean ups

* Change assertion into sanization check

* Remove...

* Clean up

* More clean up

* More clean up

* Use assert_matches
2020-01-07 08:14:56 +09:00
9ce142606c Update getBlockTime rpc docs (#7688) 2020-01-06 00:00:20 -07:00
e75a64a8a2 getBlockTime: Fix RootedSlotIterator lowest root (#7681)
* Determine lowest_nonzero_root for purged blocktrees, and clean up slot offset math

* Filter duplicate timestamp votes

* Refactor deduping code
2020-01-05 23:38:27 -07:00
bc71e1b612 Bump sha2 from 0.8.0 to 0.8.1
Bumps [sha2](https://github.com/RustCrypto/hashes) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/RustCrypto/hashes/releases)
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.8.0...sha2-v0.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-05 22:33:02 -07:00
580ca36a62 Cli: fund validator-info accounts with rent-exempt lamports 2020-01-04 22:59:12 -07:00
447fe48d2a Revert "Add a stand-alone gossip node on the blocksteamer instance"
This reverts commit a217920561.

This commit is causing trouble when the TdS cluster is reset and
validators running an older genesis config are still present.
Occasionally an RPC URL from an older validator will be selected,
causing a new node to fail to boot.
2020-01-04 16:42:12 -07:00
e8a6c8cd6d Don't panic if peer_addr() fails (#7678)
automerge
2020-01-04 10:00:22 -08:00
a8fd42c1df Set default vote account commission to 100% 2020-01-04 10:04:31 -07:00
e782c26908 Prune older epoch stakes 2020-01-04 09:34:27 -07:00
cd65a1e172 Run local cluster tests serially for easier debug 2020-01-04 09:34:27 -07:00
6e51c5685e Minor book fixes 2020-01-04 08:53:20 -07:00
84a37a2c0c Make validator timestamping more coincident, and increase timestamp sample range (#7673)
automerge
2020-01-03 22:38:00 -08:00
7e94cc2cc3 Move nonce into system program (#7645)
automerge
2020-01-03 16:34:58 -08:00
7002ccb866 Log root slots while processing ledger 2020-01-03 13:25:37 -07:00
4fe0b116ae Measure heap usage while processing the ledger 2020-01-03 13:25:37 -07:00
a0fb9de515 Move thread_mem_usage module into measure/ 2020-01-03 13:25:37 -07:00
5d42dcc9ec Reduce constants for ledger cleanup test (#7629) 2020-01-03 12:05:14 -08:00
96e88c90e8 Lessen test_slots_to_snapshot constants to make test faster (#7628)
Reduces test time from 6m to 45s
2020-01-03 09:58:52 -08:00
75d94240ed account_info utilities (#7666) 2020-01-03 09:14:51 -08:00
6c544708e1 Add safety docs (#7665) 2020-01-03 09:14:28 -08:00
078e7246ac Publish bpf-sdk only in Linux build 2020-01-02 23:20:59 -07:00
06cff1fb9f Publish bpf-sdk releases (#7655) 2020-01-02 20:44:15 -08:00
2e8bbed75b Revert "Remov dead code from TdS testnet manager config (#7414)"
This reverts commit 8920ac02f6.
2020-01-02 21:07:40 -07:00
a707c9410e More thiserror (#7183)
* Less solana_core::result. Module now private.

* Drop solana_core::result dependency from a few more modules

* Fix warning

* Cleanup

* Fix typo
2020-01-02 20:50:43 -07:00
a956bb08d8 Export bpf loader ser/de (#7661) 2020-01-02 18:18:56 -08:00
db52cc6749 CLI: Fix default nonce authority resolution (#7657)
automerge
2020-01-02 17:05:08 -08:00
73c6224a95 Book - Document nonceable CLI subcommands (#7656)
automerge
2020-01-02 16:30:26 -08:00
a217920561 Add a stand-alone gossip node on the blocksteamer instance
The blocksteamer instance is the TdS cluster entrypoint.  Running an
additional solana-gossip node allows other participants to join a
cluster even if the validator node on the blocksteamer instance goes down.
2020-01-02 17:20:59 -07:00
48a36f59a6 Add get-rpc-url --any option 2020-01-02 17:20:59 -07:00
965b132664 Permit --gossip-host with --entrypoint 2020-01-02 17:20:59 -07:00
63f185f9bf Delete unused type (#7653) 2020-01-02 13:15:31 -08:00
e97b0088f2 Make lockups block stake transfers via rekeying (#7651) 2020-01-01 11:03:29 -08:00
374c17a0d9 Book: Sync CLI API doc for show-block-production (#7648)
automerge
2019-12-31 09:26:45 -08:00
4b3bc587ab Add input validation for --creation-time/--lockup-date args (#7646)
automerge
2019-12-30 21:57:47 -08:00
06c63f2026 Bump cbindgen from 0.12.0 to 0.12.1 (#7637)
Bumps [cbindgen](https://github.com/eqrion/cbindgen) from 0.12.0 to 0.12.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.12.0...v0.12.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-30 22:16:48 -07:00
6b7d9942a7 Add authorized_voter history (#7643)
* Add authorized_voter history

* fixups

* coverage

* bigger vote state
2019-12-30 19:57:53 -08:00
760a56964f delete fixed_buf (#7644) 2019-12-30 16:45:43 -08:00
6ca575b5a3 Make sol-to-lamport const name more clear (#7641)
automerge
2019-12-30 11:28:41 -08:00
ce1d36cacb Book: Document CLI durable nonce account management (#7595)
* Book: Document CLI durable nonce account management

* Fix rent link

* review
2019-12-30 13:13:56 -05:00
87b2525e03 Limit maximum number of shreds in a slot to 32K (#7584)
* Limit maximum number of shreds in a slot to 32K

* mark dead slot replay as fatal error
2019-12-30 07:42:09 -08:00
faa77aca2e Update terminology.md 2019-12-29 21:35:06 -08:00
5d2158792c Add inflation to book, cleanup dead links, include orphaned documents (#7638)
* Add inflation as implemented proposal

* grab another orphan and add orphan-proofing
2019-12-29 18:15:32 -08:00
e1ebaa902b Add base pubkey to create_account_with_seed (#7636) 2019-12-29 16:42:24 -08:00
e0564f628e Use lamports in genesis (#7631)
* Use lamports in genesis

* readability
2019-12-28 12:49:10 -08:00
44e45aa090 Support nonced transactions in the CLI (#7624)
* Support nonced transactions in the CLI

* Update nonce.rs
2019-12-27 14:35:49 -06:00
89f5f336af Account for rent (#7626)
automerge
2019-12-24 18:01:21 -08:00
727be309b2 fix entryverification state (#7169)
automerge
2019-12-23 23:26:27 -08:00
ce2d7a2d5a Bump nix from 0.16.0 to 0.16.1 (#7623)
Bumps [nix](https://github.com/nix-rust/nix) from 0.16.0 to 0.16.1.
- [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-12-23 23:06:42 -07:00
fad6c7201e Remove old book location (#7621) 2019-12-23 22:56:42 -07:00
8f0e1f3349 Update gitbook-cage first 2019-12-23 18:18:30 -07:00
6f7d0c6928 Move cleanup to a script so it doesn't kill itself (#7603) 2019-12-23 14:31:57 -08:00
120c8f244c Add slot_history for slashing (#7589)
* Add slot_history for slashing

* fixup

* fixup
2019-12-23 12:23:45 -08:00
352a367570 Specify version for solana-sdk-macro to enable crate.io publishing (#7615) 2019-12-23 12:10:43 -08:00
9f65d22909 Groom log messages (#7610) 2019-12-23 10:43:07 -07:00
141131f3a6 Stabilize fn coverage by creating a clean room (#7576)
* Stabilize fn coverage by pruning all updated files

* Pruning didn't work; Switch to clean room dir

* Oh, shellcheck...

* Remove the data_dir variable

* Comment about relationale for find + while read
2019-12-23 16:32:29 +09:00
488420fdf2 Bump core_affinity from 0.5.9 to 0.5.10 (#7578)
Bumps [core_affinity](https://github.com/Elzair/core_affinity_rs) from 0.5.9 to 0.5.10.
- [Release notes](https://github.com/Elzair/core_affinity_rs/releases)
- [Commits](https://github.com/Elzair/core_affinity_rs/compare/0.5.9...0.5.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-22 22:41:47 -07:00
10e6b8f769 Fix key in genesis (#7585) 2019-12-22 22:40:35 -07:00
419da18405 show-block-production: Rename "missed" to "skipped" as not all skipped slots are missed slots (#7599) 2019-12-22 22:39:47 -07:00
7329d4bf3a Extend Stable CI job timeout to 60 minutes (#7604) 2019-12-22 20:14:07 -07:00
c8fe4043b6 Rename slot_hash => bank_hash in AcoountsDB (#7579)
* Rename slot_hash => bank_hash in AcoountsDB
2019-12-23 10:50:31 +09:00
3d133d61ca fix rent book entry (#7602) 2019-12-23 06:12:29 +05:30
d51e42c707 MISSED -> SKIPPED 2019-12-22 10:19:35 -07:00
79e39d6f0b Remove stray SOLANA_CUDA=1 2019-12-22 10:09:04 -07:00
7dec934bb3 Optimize lock_accounts mutex use (#7593)
Use the lock for the whole batch instead of per-tx
Optimize the critical section to pre-generate the keys necessary
before taking the lock.
2019-12-21 10:43:22 -08:00
83f866df01 Switch banking bench to report tps instead of total time (#7590)
Easier to compare results when modifying thread count.
2019-12-21 10:43:08 -08:00
d88d8e2dbb Fix another silly bug 2019-12-21 09:20:12 -07:00
3a40dff999 Cargo.lock 2019-12-20 21:55:35 -07:00
3f69d58498 ledger-tool: Add --all option to bounds, to display all non-empty slots (#7592) 2019-12-20 20:43:53 -07:00
ca10cf081f Update cargo.toml files from 0.22.0 to 0.23.0 (#7596) 2019-12-20 21:45:42 -05:00
f120449aae Move implemented proposals into the implemented section of the book (#7591)
* Move implemented proposals to implemented section of the book

Leave "Slashing" commentary in a new proposal.

* Remove considered considerations

@CriesofCarrots says meh about the first concern, and has moved the
second concern into a GitHub issue #7485.
2019-12-20 15:13:31 -07:00
636f51c93c Update testnet descriptions (#7586)
automerge
2019-12-20 12:43:17 -08:00
9bb47c8c61 Book: Document CLI offline signing (#7575)
* Book: Document offline signing

* Address review

* nits

* consistency

* one voice
2019-12-20 13:07:07 -05:00
8886db2000 --verbose now causes show-block-production to list all slots and highlight the specific misses (#7582) 2019-12-20 09:38:08 -07:00
a7040896f0 Update to rust 1.40.0 (#7572)
* Update to rust 1.40.0

* fixups
2019-12-19 23:27:54 -08:00
2ebfab8e07 Remove duplicate def of MAX_SLOT_HASHES (#7574) 2019-12-19 21:24:12 -08:00
9bd5888f5e Fix broken internal-nodes-stake-lamports arg in scripts (#7581) 2019-12-19 21:38:03 -05:00
8b7bbbc6af Streamline paper wallet pubkey verification docs (#7570)
* Book: Move paper wallet keypair docs to usage page

* Book: Remove dedicated paper wallet keypair docs

* Nudge our reader. Be extra clear

* Clarify `--skip-seed-phrase-validation` argument rationale
2019-12-19 20:59:07 -05:00
0383ffa5ab CLI: Fix offline signing Pay TX (#7566) 2019-12-19 20:58:38 -05:00
3c361eb759 Check account hashes in snapshot (#7559)
* Check for incorrect hash value

* Finish up checking for incorrect hash value

* Fix comment a bit

Co-authored-by: sakridge <sakridge@gmail.com>
2019-12-20 09:39:30 +09:00
37eaa6e4f9 CLI: Expose Durable Nonce Authorize instruction (#7541)
* CLI: Expose Durable Nonce `Authorize` instruction

* fmt
2019-12-19 19:13:01 -05:00
0ae7e86fcb Dashboard: Move y-axis items with different units either side of the graph (#7573)
automerge
2019-12-19 15:22:43 -08:00
3f405d8908 Add unix_timestap to stake lockups (#7569) 2019-12-19 14:37:47 -08:00
0245847ea8 Update runtime.md (#7568) 2019-12-19 13:11:43 -08:00
54f16ca2bf clippy 2019-12-19 11:33:44 -07:00
a096ade345 reduce error logging 2019-12-19 11:33:44 -07:00
848fe51f3d @sakridge feedback 2019-12-19 11:33:44 -07:00
e82db6fc2f Revert blockhash sleep 2019-12-19 11:33:44 -07:00
4b3176a9a1 Tune bench-tps blockhash poller and stop panicking 2019-12-19 11:33:44 -07:00
5e6c58716e Speed up show-block-production command 2019-12-19 10:50:27 -07:00
e98132fd76 Move window insertion to separate thread (#7397)
* Move window insertion to separate thread
2019-12-19 00:15:49 -08:00
ff171baa67 Add show-block-production command 2019-12-19 00:02:11 -07:00
05664d150b Add get_confirmed_block()/get_confirmed_blocks() 2019-12-18 23:34:01 -07:00
fcda972cec Add support for multiple params 2019-12-18 23:34:01 -07:00
01f44f531e Improve bench-tps stability (#7537)
* Improve bench-tps throughput

* Fix tests

* Fix more tests

* Fix move test

* Drop blockhash poll sleep interval
2019-12-18 23:50:17 -05:00
c5b076ec7e Add getConfirmedBlocks rpc method (#7550)
automerge
2019-12-18 15:51:47 -08:00
05cf5a38af Add ledger benchmark test (#7484) 2019-12-18 18:31:04 -05:00
bd22b641b3 Speed up getLeaderSchedule RPC call by reducing pubkey duplication 2019-12-18 15:59:55 -07:00
6a9005645a Update "limit-ledger-size" to use DeleteRange for much faster deletes (#7515)
* Update "limit-ledger-size" to use DeleteRange for much faster deletes

* Update core/src/ledger_cleanup_service.rs

Co-Authored-By: Michael Vines <mvines@gmail.com>

* Rewrite more idiomatically

* Move max_ledger_slots to a fn for clippy

* Remove unused import

* Detect when all columns have been purged and fix a bug in deletion

* Check that more than 1 column is actually deleted

* Add helper to test that ledger meets minimum slot bounds

* Remove manual batching of deletes

* Refactor to keep some N slots older than the highest root

* Define MAX_LEDGER_SLOTS that ledger_cleanup_service will try to keep around

* Refactor compact range
2019-12-18 11:50:09 -08:00
7392505bd8 Modify ledger-tool to selectively load Blocktree, GenesisHash, Database so commands are more resilient (#7547) 2019-12-18 13:00:15 -05:00
6aaf742dfe Extend getConfirmedBlock rpc to return account pre- and post-balances (#7543)
automerge
2019-12-18 09:56:29 -08:00
dcaf69a5d5 Exemplify pre/postBalance enhancement to getConfirmedBlock (#7518)
* Add pre/postBalance to getConfirmedBlock

* Pluralize to match actual implementation
2019-12-18 10:47:02 -07:00
323673c3c0 Add compact_cf calls to reclaim storage during ledger slot purge (#7264) 2019-12-18 10:29:46 -05:00
e16ccf8cf8 Remove extraneous header text in test result posts 2019-12-18 10:13:36 -05:00
434cde179f GetLeaderSchedule can now return a schedule for arbitrary epochs 2019-12-17 23:41:42 -07:00
629a4b5bf8 Strictly sanitize mmapped AppendVec file contents (#7464)
* Clean up align_to_8byte!

* small clean up

* Strictly sanitize mmapped AppendVec files

* Clean up

* Fix typo

* Rename align_to_8byte => u64_align

* Fix typo

* Clean up unsafe into methods of StoredAccount

* Made oddness more apparent

* Yet more clarification

* Promote a PR comment into a src comment

* Fix typo...

* Move ref_executable_byte out of tests impl
2019-12-18 14:10:36 +09:00
6a8f6fb3cc Update testnet testcases to point at new buildkite agent queues (#7544)
automerge
2019-12-17 20:32:31 -08:00
807e930786 Update publish-book.sh 2019-12-17 18:41:46 -08:00
554188e88e Colo - Node install scripts missing latest user requests (#7540)
* Enable user GPU profiling while installing CUDA

* Install heaptrack
2019-12-17 19:00:12 -05:00
585fca06a1 Update publish-book.sh 2019-12-17 15:36:11 -08:00
282667c4b5 Update genesis addrgen to system_instruction create_address_with_seed (#7539) 2019-12-17 15:14:59 -08:00
8176470b7f Add pubkey from new buildkite agent instance 2019-12-17 18:00:15 -05:00
acb7ce16ca Cleanup book build (#7254)
* book

* remove copies stuff

* missing png

* update cage in publish-book.sh

* shellcheck

* update image link

* avoid clone

* nits
2019-12-17 14:29:46 -08:00
12bdef51f5 Mark PRs stale after 7 days instead of 30 (#7528) 2019-12-17 14:37:35 -07:00
84b07c81fd Fix/remove short circuit logic in ledger_purge_batch (&& -> &), found/fixed by @sdhawan (#7526) 2019-12-17 15:08:40 -05:00
107360a001 Refactor system-test dir structure and add stability test (#7530) 2019-12-17 14:58:10 -05:00
3f541df669 Sync nonce test to 3513f4e (#7527) 2019-12-17 12:26:13 -05:00
da17783242 Update README 2019-12-17 08:57:56 -07:00
0ea2843ec9 Durable Nonce - Authorized Noncer (#7417)
* Durable Nonce: Add authorized noncer to initialize instruction

* CLI: Adapt to nonce authority

* Durable Nonce: Introduce Authorize instruction

* Specify who needs to sign  ix

* 'authorized-noncer' -> 'nonce-authority'

* Document signing authority for all instructions
2019-12-17 09:34:21 -05:00
7c92bf15e2 Only return accounts that have changed since the bank's parent (#7520)
* Only return accounts that have changed since the bank's parent

* add test
2019-12-16 23:24:18 -08:00
97589f77f8 Pipeline broadcast socket transmit and blocktree record (#7481)
automerge
2019-12-16 17:11:18 -08:00
504adcc8c8 Remove PoH priority tuning (#7494)
* Remove priority tuning

* Allow dead code
2019-12-16 16:36:37 -08:00
f03ed9f5bf Add helper fn and runtime test (#7516) 2019-12-16 17:02:40 -07:00
b22dc38ba1 Add support for split of 100% of stake (#7510) 2019-12-16 15:56:34 -08:00
7a7992ab0b update bpf Cargo_lock (#7512) 2019-12-16 13:47:45 -08:00
3513f4ee84 Rename drone to faucet (#7508) 2019-12-16 14:05:17 -07:00
f33703aefc Add Telegram notification support 2019-12-16 13:32:46 -07:00
389089859d Add guidance for getting PRs merged (#7433)
* Add more PR guidelines
2019-12-16 12:54:09 -07:00
844dddfee0 Add validator-identity argument to support monitoring a specific validator only 2019-12-16 11:48:48 -07:00
862e7a410d Fix cli program deploys by avoiding zero account balance (#7497) 2019-12-16 11:53:00 -05:00
7ad64c8d45 Bump serde from 1.0.103 to 1.0.104
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.103 to 1.0.104.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.103...v1.0.104)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-16 08:50:09 -07:00
5b50990879 Bump cbindgen from 0.11.1 to 0.12.0
Bumps [cbindgen](https://github.com/eqrion/cbindgen) from 0.11.1 to 0.12.0.
- [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.11.1...v0.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-16 08:50:01 -07:00
71b93468d5 Bump serial_test from 0.3.1 to 0.3.2
Bumps [serial_test](https://github.com/palfrey/serial_test) from 0.3.1 to 0.3.2.
- [Release notes](https://github.com/palfrey/serial_test/releases)
- [Commits](https://github.com/palfrey/serial_test/compare/v0.3.1...v0.3.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-15 18:19:37 -07:00
6b88da2b82 Hook up getBlockTime rpc to real data (#7476)
* Add blocktree timestamp helper functions and tests

* Flesh out blocktree::get_block_time

* Move stakes up into rpc to make testing easier; expand tests

* Review comments
2019-12-14 12:23:02 -07:00
d01ea20273 getVoteAccounts now excludes listing inactive unstaked accounts as delinquent
This keeps abandoned vote accounts out of the `solana show-validators` output
2019-12-14 09:52:03 -07:00
f05860672c Add create-address-with-seed to solana-cli (#7472)
* Add create account with seed to cli

* clippy

* fixup
2019-12-14 04:38:24 -08:00
2b5e919a47 Ship solana-watchtower program 2019-12-13 23:04:03 -07:00
27c8df6140 benches (#7480)
automerge
2019-12-13 20:27:11 -08:00
9ac112104c Searhc across command line for pattern to kill (#7475) 2019-12-13 21:08:41 -05:00
98b80288ed Optimize bank_forks critical section (#7477) 2019-12-13 17:20:31 -08:00
ecdea54203 Bump perf-libs version to v0.16.2 to get cudaMalloc opt (#7478) 2019-12-13 17:20:06 -08:00
9d5a07bac4 Move create_dir_all to AccountsDB::new (#7465)
AppendVec create doesn't need to try and create
paths every time and it can stall while snapshot
create is happening.
2019-12-13 16:46:16 -08:00
7adc721d96 Generate MAX_DATA_SHREDS_PER_FEC_BLOCK coding shreds for each FEC block (#7474)
* Generate MAX_DATA_SHREDS_PER_FEC_BLOCK coding shreds for each FEC block

* fix tests, and detangle ErasureMeta::status
2019-12-13 14:50:22 -08:00
f5137028fa Update stake_instruction.rs 2019-12-13 12:53:25 -08:00
48f9b2fdcc watchtower: Add Slack/Discord sanity failure notification (#7467)
automerge
2019-12-12 23:49:16 -08:00
b7d6ff6770 Fix Blocktree Config (#7399) 2019-12-12 23:27:24 -08:00
f7a87d5e52 Add vote-update-validator subcommand 2019-12-12 23:26:39 -07:00
75d1aa5135 Perform erasure recovery when repaired data shreds are received (#7463)
automerge
2019-12-12 17:50:28 -08:00
49396a69bf remove dbg (#7459)
automerge
2019-12-12 17:24:30 -08:00
d94041e98d Allow coding shred index to be different than data shred index (#7438)
* Allow coding shred index to be different than data shred index

* move fec_set_index to shred's common header

* fix bench
2019-12-12 16:50:29 -08:00
cc5408482e Publish solana-docker releases (#7460) 2019-12-12 16:15:31 -08:00
115bf2613d feat: add analyze-storage command to ledger-tool (#7165) 2019-12-12 18:54:50 -05:00
1d172b07a8 crc 1.9.0 was yanked, fall back to 1.8 (#7453) 2019-12-12 14:30:51 -08:00
777ae3c215 Add time since genesis to sysvar::clock (#7289)
* genesis timestamp

* remove clock::create_account()

* ..

* add configure-able creation time

* dividing by 1T, should be dividing by 1B
2019-12-12 14:03:43 -08:00
1b2a9270e8 Clarify show-vote-account/uptime output: "node id" really means "validator identity" 2019-12-12 14:58:17 -07:00
e082418e4a Cleanup the sign shreds interface (#7456)
automerge
2019-12-12 13:27:33 -08:00
83218c479a code cleanup, storage_size() was Option<u64>, now Result<u64> (#7424) 2019-12-12 14:55:30 -05:00
dbb8267b09 Pin dalek version (#7448)
* Pin Dalek version

* core too
2019-12-12 11:34:43 -08:00
ea0ba19089 Add SystemInstruction::CreateAccountWithSeed (#7390)
* address generator

* coverage

* fixups

* remove ascii restriction

* illustrate that utf-8 doesn't expand the space
2019-12-12 11:12:09 -08:00
2db28cae41 Add solana-watchtower program 2019-12-12 12:03:13 -07:00
dd54fff978 Use pinned memory for entry verify (#7440) 2019-12-12 10:36:27 -08:00
c4f3bb9b67 Use term dapp only in places where the application needs to run entirely on-chain (#7446) 2019-12-12 10:38:09 -07:00
45487a91f9 Add more precision to testnet definitions and expectations (#7435)
* Add more precision to testnet definitions and expectations

* Apply review feedback
2019-12-12 10:37:42 -07:00
dad5c62df5 Add uptime column to show-validators (#7441)
automerge
2019-12-11 22:04:54 -08:00
a1ab81a896 Include rent_epoch and executable into account hash (#7415)
* Clean a bit

* Add rent_epoch and executable into account hashing

* Remove comment and instead create an issue
2019-12-12 13:03:33 +09:00
1d0ba0d1f2 Add special handling for snapshot root slot in get_confirmed_block (#7430)
* Add special handling for snapshot root slot

* Improve test
2019-12-11 15:06:54 -07:00
46a4ea8f67 Bump reqwest from 0.9.22 to 0.9.24
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.22 to 0.9.24.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/v0.9.24/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.22...v0.9.24)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-11 13:42:38 -07:00
42f2b14a74 Colo: Fix lockfile syntax (#7432)
Logical AND for [ is -a, [[ is &&.
2019-12-11 15:32:38 -05:00
bec5835289 Automatically call .recycle in Drop (#7429)
automerge
2019-12-11 11:58:40 -08:00
0aa4dc904e Accounts index updates, remove pubkey when dead account (#7408) 2019-12-11 11:11:31 -08:00
f526c424c5 Move slow shred multi_fec test to integration tests folder (#7426) 2019-12-11 11:10:21 -08:00
601d7a52e9 add documentation for storage_size() method (#7416) 2019-12-11 09:47:12 -05:00
7f6fc74c36 Remove workaround of old Rust-BPF (#7422) 2019-12-10 23:19:13 -08:00
9e2ce1751b Bump Rust-BPF to Rust 1.39 (#7420) 2019-12-10 22:27:14 -08:00
8920ac02f6 Remov dead code from TdS testnet manager config (#7414) 2019-12-10 19:16:49 -05:00
06415de8ee change blocktree*::storage_size() to return Option<u64> to handle live fs changes (#7401) 2019-12-10 19:12:49 -05:00
12d471e2da Update default node balance to 500 SOL and default stake to 1 SOL (#7411) 2019-12-10 17:52:35 -05:00
7d6777a96f show rent model (#7410) 2019-12-10 14:50:55 -08:00
96c08cd295 add pubkey for colo (#7409)
automerge
2019-12-10 14:18:57 -08:00
f3633a2e04 rent for testnet (#7407) 2019-12-10 13:51:19 -08:00
feeb1cb566 distribute leftover lamports (#7396)
* distribute leftover lamports

* add test scenario

* fix naming
2019-12-11 02:41:08 +05:30
146bc95c16 Fix sigverify metrics (#7393)
* Add filter

* Collapse logs

* Fix dashboard
2019-12-10 11:28:07 -08:00
5792f5bfb5 Increase tx_count to 20k for all 5 node testcases (#7348) 2019-12-10 14:18:41 -05:00
11521dca08 Use is_amount clap validator (#7400)
* Fix up is_amount to handle floats for SOL; expand amount_of test

* Use required_lamports_from and is_amount across CLI

* Remove obsolete test (now handled by clap)
2019-12-10 11:29:17 -07:00
6f457292ff Bump bincode from 1.2.0 to 1.2.1
Bumps [bincode](https://github.com/servo/bincode) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/servo/bincode/releases)
- [Commits](https://github.com/servo/bincode/compare/v1.2.0...v1.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-10 10:00:56 -07:00
696cb298ab put limit on account data length (#7320)
* put limit on account data length

* proper debug message
2019-12-10 22:17:11 +05:30
6d2861f358 add unit test for minority fork overcommit attack (#7292)
* add unit test for minority fork overcommit attack

* add generic function to simulate fork selection
2019-12-10 22:06:16 +05:30
7879fa5095 Better space out show-stake-history columns 2019-12-10 09:19:58 -07:00
a03062af4f Add CLI commands for nonces (#7329)
automerge
2019-12-10 00:24:44 -08:00
19ecce1e32 Fix offline stakes payer (#7385) 2019-12-09 23:11:04 -08:00
5e0a69f68b Improve get-epoch-info output for longer epoch durations 2019-12-09 23:42:00 -07:00
a33bcac52f Fix stable metrics graph: "Bank Height / Slot Distance ($hostid)" 2019-12-09 22:56:54 -07:00
39cd6dff7d turn on rent (#7368)
* turn on rent

* add rent exempt balances for bootstrap accounts

* use Rent::free() when not testing rent
2019-12-09 21:56:43 -08:00
ed9cf3566c Restore status check to bubble up TransactionError (#7383)
automerge
2019-12-09 19:35:34 -08:00
d4d246bfd1 Fix broken link in paper wallet docs (#7388)
automerge
2019-12-09 16:26:49 -08:00
c02a14c798 Add docs for checking account balance of a paper wallet (#7384)
* Add docs for checking account balance of a paper wallet

* Add url instruction

* Update usage.md
2019-12-09 15:35:18 -08:00
781ce30e27 Continue processing the ledger on InvalidTickCount errors 2019-12-09 16:34:37 -07:00
4b68c7c154 Bump cbindgen from 0.11.0 to 0.11.1
Bumps [cbindgen](https://github.com/eqrion/cbindgen) from 0.11.0 to 0.11.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.11.0...v0.11.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-09 15:59:04 -07:00
daddd90058 Bump cc from 1.0.47 to 1.0.48
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.47 to 1.0.48.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.47...1.0.48)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-09 14:57:12 -07:00
5d2b27d916 Address post-merge review for #7353 (#7378)
automerge
2019-12-09 12:54:10 -08:00
7a37363817 Remove println in solana balance command (#7380)
automerge
2019-12-09 11:03:30 -08:00
bee3829960 Remove redundant check (#7369) 2019-12-09 01:12:14 -08:00
e0600e5a91 Properly set parallelism (#7370) 2019-12-09 00:14:09 -08:00
b55b646f12 Fix Erasure Index (#7319)
Fix Erasure Index Check to set the erasure presence
2019-12-09 00:13:36 -08:00
43e608af47 Expose stake delegations from bank for winner tool (#7354)
* Expose stake delegations from bank

* cargo fmt

* Add test
2019-12-08 20:52:01 -08:00
32d6d811c5 no lockups for community (#7366) 2019-12-08 20:21:07 -08:00
0d6fca5abc 500M SOL (#7361)
* 500_000_000MM SOL

* fixup
2019-12-08 14:36:09 -08:00
48a085c28f Add argument to configure the authorized pubkey for the bootstrap leader's stake (#7362)
automerge
2019-12-08 13:08:35 -08:00
059e631f41 Durable Nonce: Re-introduce Initialize instruction (#7353)
Toward an Authorized Noncer
2019-12-08 10:16:55 -07:00
deb7ac549c Adjust show-validators column alignment (#7359)
automerge
2019-12-08 09:06:35 -08:00
891767c6b7 Bump serde_json from 1.0.42 to 1.0.44
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.42 to 1.0.44.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.42...v1.0.44)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-08 09:43:24 -07:00
62810d769a Account for all tokens at genesis (#7350)
* Towards accounting for all tokens

* Move 5m tokens back into the big pool

* Flesh out batch 4

* Add a script to generate ValidatorInfo structs from a CSV file

* Remove commented out code and improve test
2019-12-08 09:17:42 -07:00
5253c27ca8 Add Forbole ValidatorInfo (#7355)
automerge
2019-12-07 22:45:58 -08:00
1ffd6b4b4d Add program and runtime support for Durable Transaction Nonces (#6845)
* Rework transaction processing result forwarding

Durable nonce prereq

* Add Durable Nonce program API

* Add runtime changes for Durable Nonce program

* Register Durable Nonce program

* Concise comments and bad math

* Fix c/p error

* Add rent sysvar to withdraw ix

* Remove rent exempt required balance from Meta struct

* Use the helper
2019-12-07 12:54:10 -07:00
6469606baf Add Stake Capital ValidatorInfo (#7346)
automerge
2019-12-07 01:07:03 -08:00
77cd292828 getVoteAccounts RPC API no longer returns "idle" vote accounts, take II 2019-12-07 01:16:36 -07:00
22d6951de5 Revert "getVoteAccounts RPC API no longer returns "idle" vote accounts"
This reverts commit 103e40b968.
2019-12-07 01:16:36 -07:00
33f7103eae Enable system program at SoftLaunch epoch 0 (#7313) 2019-12-06 23:16:28 -07:00
c00216e3be feat: ledger size and cleanup metrics (#7335) 2019-12-06 22:32:45 -05:00
42247e0e1a getVoteAccounts RPC API no longer returns "idle" vote accounts (#7339) 2019-12-06 20:23:29 -05:00
8a908a6864 Add more pool tokens (#7338)
automerge
2019-12-06 16:54:02 -08:00
2d6ed7142f Fix typo (#7336) 2019-12-06 16:48:16 -07:00
9ecb844de7 Split up ReplayStageConfig to make it derive Default (#7334)
automerge
2019-12-06 14:39:35 -08:00
3ab8185777 Add intermittent Timestamping to Votes (#7233)
* Add intermittent timestamp to Vote

* Add timestamp to VoteState, add timestamp processing to program

* Print recent timestamp with solana show-vote-account

* Add offset of 1 to timestamp Vote interval to initialize at node boot (slot 1)

* Review comments

* Cache last_timestamp in Tower and use for interval check

* Move work into Tower method

* Clarify timestamping interval

* Replace tuple with struct
2019-12-06 14:38:49 -07:00
b8008ae1e9 Bump cbindgen from 0.10.1 to 0.11.0 (#7318)
automerge
2019-12-06 13:23:22 -08:00
ab9ec45c9d Bump rpassword from 4.0.1 to 4.0.3 (#7295)
Bumps [rpassword](https://github.com/conradkleinespel/rpassword) from 4.0.1 to 4.0.3.
- [Release notes](https://github.com/conradkleinespel/rpassword/releases)
- [Commits](https://github.com/conradkleinespel/rpassword/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-06 16:16:58 -05:00
6a0d683f79 Brush up validator start docs (#7333)
* Brush up validator start docs

* Gut Choosing a Testnet to be less confusing
2019-12-06 14:07:41 -07:00
711487267d Increase signature confirmation timeout to fix wallet sanity (#7283)
* Use --hashes-per-tick sleep for localnet sanity test

* Decrease wallet sanity timeout

* Fix  check when
2019-12-06 15:39:28 -05:00
503bf69ab3 Bump wallet-sanity timeout (#7327) 2019-12-06 11:12:18 -07:00
a60521269d Use u64 for consistency (#7326) 2019-12-06 10:24:31 -07:00
fe96f85410 Update name 2019-12-06 10:15:35 -07:00
275fab003f Add ChainFlow ValidatorInfo 2019-12-06 09:22:35 -07:00
edfb386ef0 Add pools (#7324) 2019-12-06 09:20:32 -07:00
186709ed75 cli: Confirm recovered pubkeys (#7316)
* cli: Confirm recovered pubkeys

* cargo clippy
2019-12-06 09:55:00 -05:00
b7d4330dd4 Fail fast if account paths cannot be canonicalized (#7300)
* Canonicalize account paths to avoid symlink issues

* fixes
2019-12-05 21:41:29 -05:00
7c3be2ec9a Add 30k txcount Colo GPU testcase (#7314) 2019-12-05 21:17:16 -05:00
8fac9102eb Add docs for using a paper wallet with solana cli (#7311) 2019-12-05 21:12:41 -05:00
178854ac97 Add RockX ValidatorInfo (#7310) 2019-12-05 19:06:56 -07:00
f4a089cc26 Allow delay between validator booting and client start (#7297)
* Allow delay between validator booting and client start
2019-12-05 21:03:26 -05:00
422eab5846 Add ChorusOne ValidatorInfo (#7306) 2019-12-05 15:39:27 -07:00
95e1404a2b Add verify of keypair (#7301) 2019-12-05 14:32:42 -08:00
cfc21e1225 Only serialize rooted append vecs (#7281) 2019-12-05 14:27:46 -08:00
3799190fa0 Bump assert_cmd from 0.11.1 to 0.12.0 (#7298)
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd) from 0.11.1 to 0.12.0.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases)
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v0.11.1...v0.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-05 14:20:50 -07:00
d6c3396182 Canonicalize paths before symlink-ing when generating snapshots (#7294)
* Canonicalize paths before symlinking when generating snapshots

* cargo fmt
2019-12-05 14:58:02 -05:00
a95d37ea25 Fix repair slowness when most peers are unable to serve requests (#7287)
* Fix repair when most peers are incapable of serving requests

* Add a test for getting the lowest slot in blocktree

* Replace some more u64s with Slot
2019-12-05 11:25:13 -08:00
d8e1a196bc more genesis (#7291) 2019-12-05 08:30:34 -08:00
1e2970b7e1 Bump thiserror from 1.0.6 to 1.0.9 (#7246)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.6 to 1.0.9.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.6...1.0.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-05 08:58:53 -07:00
0d1fed78af Pay rent to validators (#7164)
automerge
2019-12-05 06:10:34 -08:00
709bda5939 custodian signs withdraw (#7286) 2019-12-04 21:25:01 -08:00
8a28734603 re svg (#7288) 2019-12-04 20:38:42 -08:00
9485eba73d nudge (#7279) 2019-12-04 19:28:20 -08:00
23c4a7dc49 nudge (#7280) 2019-12-04 19:28:00 -08:00
39b578fde9 Remove runtime dependency from config program unit tests and move back to config program (#7277) 2019-12-04 19:24:12 -08:00
8e16079157 Bump serde_bytes from 0.11.2 to 0.11.3 (#7269)
Bumps [serde_bytes](https://github.com/serde-rs/bytes) from 0.11.2 to 0.11.3.
- [Release notes](https://github.com/serde-rs/bytes/releases)
- [Commits](https://github.com/serde-rs/bytes/compare/0.11.2...0.11.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-04 19:12:37 -07:00
eabd23fc07 Import validators (#7282) 2019-12-04 18:26:57 -07:00
c7932b710c Remove tune-system.sh script and its use (#7278) 2019-12-04 16:40:12 -08:00
9d7a926a8b Tune UDP rmem/wmem using sys-tuner daemon (#7273) 2019-12-04 15:17:24 -08:00
0a390cbc91 Update validator-start document to reflect sys-tuner changes (#7275) 2019-12-04 15:17:12 -08:00
76829457df Fix typo, grammar, and formatting in Paper Wallet documentation (#7268)
* Fixes

* Simply installation steps

* Remove profile step

* Split up commands

* 2 -> 3
2019-12-04 15:44:02 -05:00
703a5348e8 Relocate program tests (#7259) 2019-12-04 12:41:54 -08:00
1a135fa30e Verify BPF ELF during finalize (#7266) 2019-12-04 12:03:29 -08:00
e4d75c77bf Sanitize whitespace in seed phrase input (#7260)
* Sanitize whitespace in seed phrase input

* cargo clippy

* Use split_whitespace
2019-12-04 14:40:32 -05:00
75d505c431 Don't hardcode username in sys-tuner (#7234)
automerge
2019-12-04 11:39:26 -08:00
b72c99e46a nudge (#7265) 2019-12-04 11:03:24 -08:00
fae9c08815 Add ReplayStageConfig (#7195) 2019-12-04 11:17:17 -07:00
c3e7deb4b6 Use wrappable code snippet for paper wallet installation (#7261) 2019-12-04 12:30:12 -05:00
c9245751e9 Bump nix from 0.15.0 to 0.16.0 (#7216)
Bumps [nix](https://github.com/nix-rust/nix) from 0.15.0 to 0.16.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/v0.16.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-04 09:35:45 -07:00
9b172879a2 Remove deprecated solana_entrypoint macro (#7257) 2019-12-04 00:42:50 -08:00
9077a94dfe vote update node_id (#7253)
* vote update node_id

* un-break binary 'contract'
2019-12-03 22:50:08 -08:00
e2f07a5220 bs58 (#7252) 2019-12-03 22:18:12 -08:00
ae93d574c2 commission as percent (#7239)
* commission_as_percent

* fixup
2019-12-03 20:55:04 -08:00
369f37a0a4 genesis validators (#7235)
* genesis validators

* slp1 nodes get 500SOL

* no commission
2019-12-03 20:44:02 -08:00
e1b7f40c2b Allow generation of longer seed phrases with keygen (#7210) 2019-12-03 23:39:45 -05:00
94dcd3fe12 Remove extra installation options for paper wallet (#7245)
* Remove extra installation options for paper wallet

* Copy installation link out of code block for printing
2019-12-03 22:54:33 -05:00
2dc1ae9026 Add Paper Wallet Installation page to sidebar (#7242) 2019-12-03 21:43:39 -05:00
7cfff75c3e Use procedural macro to generate static public keys (#7219)
automerge
2019-12-03 17:55:18 -08:00
a66a49d384 Update paper wallet documentation (#7223)
* wip

* Update paper wallet documentation

* Add install from tarball instructions

* Separate out installation page
2019-12-03 20:12:24 -05:00
5f58e0661b Remove duplicate word (#7236) 2019-12-03 16:45:59 -08:00
f0a40862d6 Support local cluster edge case testing (#7135)
* Refactor local cluster to support killing a partition

* Rework run_network_partition

* Introduce fixed leader schedule

* Plumb fixed schedule into test
2019-12-03 16:31:59 -08:00
f75c51ff71 sys-tuner to check uid of the proc entry (#7232)
automerge
2019-12-03 16:03:10 -08:00
d357192025 Fix ssh connection error due to too many authentication failures (#7229) 2019-12-03 15:53:12 -08:00
c996c8ff49 Protect sys-tuner socket access at create (#7230)
automerge
2019-12-03 14:29:37 -08:00
1af4e256c9 Print slot meta when printing a slot (#7133)
automerge
2019-12-03 12:27:43 -08:00
bc09365c98 make tx fee's burn percent in proper range (#7226)
automerge
2019-12-03 12:25:43 -08:00
ba688cf629 enforce proper range for rent burn_percent (#7217)
* enforce proper range for burn_percent
2019-12-04 00:54:01 +05:30
d5c8b26a45 bank_leak_mac_os (#7209) 2019-12-03 00:09:05 -08:00
d38f3f664f Ensure IpEchoServerMessage is not fragmented (#7214)
automerge
2019-12-02 22:32:43 -08:00
5ac435325b Fix windows build more (#7208) 2019-12-02 22:09:06 -07:00
b874441a47 Prevent passphrase mistakes with confirmation prompt (#7207) 2019-12-02 22:42:42 -05:00
a35087a5ed Fix typo (#7202) 2019-12-02 19:51:27 -07:00
1aeaf052a6 Fix windows build (#7204) 2019-12-02 19:45:07 -07:00
a0eafa12e3 Update to hashes_per_tick computation, and tick duration datapoint (#7127) 2019-12-02 18:02:11 -08:00
757425a360 Add validator timestamp oracle proposal (#7159)
* Add validator timestamp oracle proposal

* Make timestamping part of the Vote program

* Describe extending Vote to include timestamp: Option<UnixTimestamp>

* Qualify getBlockTime-eligible blocks as rooted
2019-12-02 18:51:54 -07:00
64d1e776f7 Bump cbindgen from 0.10.0 to 0.10.1 (#7197)
Bumps [cbindgen](https://github.com/eqrion/cbindgen) from 0.10.0 to 0.10.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.10.0...v0.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-02 18:40:22 -07:00
c6695a3120 Correctly parse ip echo server response and fix broken test (#7196) 2019-12-02 18:37:01 -07:00
076e384bb5 Tool to tune system parameters like PoH service priority (#7155)
* New daemon to tune system parameters like PoH service priority

* fixes for Linux

* integrate with poh_service

* fixes

* address review comments

* remove `dead_code` directive
2019-12-02 16:46:46 -08:00
41cff1b49d Remove spammy log 2019-12-02 16:52:01 -07:00
6796b08909 Migrate to thiserror (#7177)
* Migrate to thiserror

* Discourage the use of other modules' Result alias

`io::Result` set a bad precedent. Don't import other `Result`
aliases.
2019-12-02 15:42:05 -07:00
f9df17d8d0 track bank size (#7144)
* track bank size

* support non-linux a bit better
2019-12-02 13:47:20 -08:00
7f71a0ba37 Drop default signature fee by 10x (#7192) 2019-12-02 14:34:26 -07:00
0e2e13f018 Update usages of u64 to Slot (#7191)
automerge
2019-12-02 11:57:40 -08:00
bd099e2f4d Fix spelling (#7186) 2019-12-02 10:56:01 -08:00
42f56b9f86 Further validator doc cleanup (#7187) 2019-12-02 11:49:54 -07:00
704c50ea17 More validator doc cleanup (#7185)
* Cleanup and wrap lines in validator docs

* Add references to tune_system and solana-keygen grind
2019-12-02 10:53:07 -07:00
887bff572a More conservative purge_zero_lamport_accounts purge logic (#7157) 2019-12-02 09:51:05 -08:00
1eaf71b5b4 Improve error handling when the user mixes up gossip (8001) and RPC (8899) ports (#7158)
automerge
2019-12-02 09:01:25 -08:00
0f872af502 Bump libc from 0.2.65 to 0.2.66 (#7180)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.65 to 0.2.66.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.65...0.2.66)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-02 09:56:03 -07:00
b13696ea1a Bump jsonrpc-http-server from 14.0.3 to 14.0.5 (#7181)
Bumps [jsonrpc-http-server](https://github.com/paritytech/jsonrpc) from 14.0.3 to 14.0.5.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v14.0.3...jsonrpc-http-server-v14.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-02 09:55:40 -07:00
5fbbf7c748 Bump jsonrpc-ws-server from 14.0.3 to 14.0.5 (#7172)
Bumps [jsonrpc-ws-server](https://github.com/paritytech/jsonrpc) from 14.0.3 to 14.0.5.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v14.0.3...jsonrpc-ws-server-v14.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-29 23:06:23 -07:00
e7fe0db051 Bump jsonrpc-derive from 14.0.3 to 14.0.5 (#7173)
Bumps [jsonrpc-derive](https://github.com/paritytech/jsonrpc) from 14.0.3 to 14.0.5.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v14.0.3...jsonrpc-derive-v14.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-29 14:15:02 -07:00
dcb7bd8c74 Bump jsonrpc-pubsub from 14.0.3 to 14.0.5 (#7174)
Bumps [jsonrpc-pubsub](https://github.com/paritytech/jsonrpc) from 14.0.3 to 14.0.5.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v14.0.3...jsonrpc-pubsub-v14.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-29 14:14:57 -07:00
92d485dd4d Cleanup (#7176)
* Drop serde error instances

These were no longer needed after ToPrimitive instances were
added.

* Rename last of _api crates
2019-11-29 13:50:32 -07:00
f4229a5d3e Validator docs revamp part 1 (#7171)
* Validator Docs revamp part 1

* Notes from @CriesofCarrots

* Fixup links and start page

* Update versions
2019-11-28 15:39:27 -07:00
f97626346b Bump jsonrpc-core from 14.0.3 to 14.0.5 (#7170)
Bumps [jsonrpc-core](https://github.com/paritytech/jsonrpc) from 14.0.3 to 14.0.5.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-28 10:59:31 -07:00
7f4feaee08 Bump serde from 1.0.102 to 1.0.103 (#7163)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.102 to 1.0.103.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.102...v1.0.103)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-27 09:10:25 -07:00
5a30ef180a Bump serial_test_derive from 0.2.0 to 0.3.1 (#7153)
Bumps [serial_test_derive](https://github.com/palfrey/serial_test) from 0.2.0 to 0.3.1.
- [Release notes](https://github.com/palfrey/serial_test/releases)
- [Commits](https://github.com/palfrey/serial_test/compare/v0.2.0...v0.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-26 23:12:13 -07:00
0a0412e47e Bump serial_test from 0.2.0 to 0.3.1 (#7154)
Bumps [serial_test](https://github.com/palfrey/serial_test) from 0.2.0 to 0.3.1.
- [Release notes](https://github.com/palfrey/serial_test/releases)
- [Commits](https://github.com/palfrey/serial_test/compare/v0.2.0...v0.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-26 22:07:39 -07:00
57d4b50467 Add Paper Wallet documentation to the book (#7147)
automerge
2019-11-26 20:56:11 -08:00
8d75efdc58 genesis config hashmaps (#7107) 2019-11-26 19:23:37 -08:00
c706f9b2cd Change from using fixed number of ticks in delay calculation (#7152)
automerge
2019-11-26 16:21:02 -08:00
c810913861 Bump serde_derive from 1.0.102 to 1.0.103 (#7141)
automerge
2019-11-26 14:44:20 -08:00
2b13158e29 Bump serde_json from 1.0.41 to 1.0.42 (#7142)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.41 to 1.0.42.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.41...v1.0.42)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-26 15:09:01 -07:00
4fe1716c7a solana-keygen: Support pubkey recovery directly from seed phrase (#7149) 2019-11-26 15:30:07 -05:00
d7a82783be Ensure beta/stable testnets use public IPs 2019-11-26 11:24:38 -07:00
0a0f15baca RPC subscriptions for new slot notifications (#7114)
* feat: slot notifications via pubsub rpc w/ tests
2019-11-26 03:42:54 -05:00
58c144ee55 Add getBlockTime rpc api (#7130)
* Add getBlockTime rpc api

* Add getBlockTime to docs

* Fix duration rounding for common tick/slot durations; add slot duration calculation

* Expose slots_per_year

* Use genesis values instead of clock defaults to calculate block offset

* Add get-block-time cli subcommand

* Fix test_rent: decrease magic number usage
2019-11-26 00:40:36 -07:00
280315a314 mut 2019-11-25 22:49:15 -07:00
506ff5809e keygen: Support not writing keypairs to disk (#7136)
* keygen: Add flag to prevent new from writing keypair to disk

* check_for_overwrite bails, do it before prompts
2019-11-25 22:43:03 -07:00
acd1505050 Stop open measurement before logging it 2019-11-25 22:20:34 -07:00
578b56fc10 Cargo.lock 2019-11-25 22:20:34 -07:00
88cb0c6ae3 Add offline signing support to CLI (#7104) 2019-11-25 21:09:57 -08:00
294662a1ce Bump version to 0.22.0 2019-11-25 21:34:50 -07:00
eaa3e87eb0 Support passphrases in keygen (#7134)
* Support passphrases in keygen

* remove short

* Update solana_keygen calls
2019-11-25 21:33:15 -07:00
9b3a1a99e5 Update backport labels 2019-11-25 21:24:41 -07:00
76a68c26c9 Track a Bank's parent slot independently from parent bank (#7131) 2019-11-25 15:34:51 -08:00
ef64f00cbb Revert "Revert "add genesis stake placeholders (#6969)" (#7109)" (#7124)
This reverts commit 702f7cc51d.
2019-11-25 15:11:55 -08:00
acbe89a159 shrink stakes (#7122) 2019-11-25 13:14:32 -08:00
0f66e5e49b Add getConfirmedBlock test to rpc (#7120)
automerge
2019-11-25 11:08:03 -08:00
686aa3a150 Bump chrono from 0.4.9 to 0.4.10 (#7113)
automerge
2019-11-25 10:01:46 -08:00
d8bc828839 Colo: Refactor remote command dispatch for create and delete (#7092)
* Colo: Dump escaping mess in remote script templates

* Colo: Rename script templates so shellcheck can get 'em

* shellcheck and nits

* Brace all of the things

* Consistent heredoc tags

* Use bash built-in square bracketing consistently

* simplify logic
2019-11-25 10:32:17 -07:00
094c391cd7 Bump itertools from 0.8.1 to 0.8.2 (#7111)
Bumps [itertools](https://github.com/bluss/rust-itertools) from 0.8.1 to 0.8.2.
- [Release notes](https://github.com/bluss/rust-itertools/releases)
- [Commits](https://github.com/bluss/rust-itertools/commits/v0.8.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-25 10:22:47 -07:00
c8491724b4 Bump num-traits from 0.2.9 to 0.2.10 (#7096)
Bumps [num-traits](https://github.com/rust-num/num-traits) from 0.2.9 to 0.2.10.
- [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.9...num-traits-0.2.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-25 10:22:10 -07:00
d5beb8a9e4 cli: Add --confirmed option to a couple commands, also add --no-header (#7112)
* Add --confirmed option to get-slot, get-epoch-info, get-transaction-count

* Add --no-header option
2019-11-24 17:34:18 -07:00
702f7cc51d Revert "add genesis stake placeholders (#6969)" (#7109)
* Revert "add genesis stake placeholders (#6969)"

This reverts commit 8a879faac7.

* fixup! Revert "add genesis stake placeholders (#6969)"

* fixup! fixup! Revert "add genesis stake placeholders (#6969)"

* fixup! fixup! fixup! Revert "add genesis stake placeholders (#6969)"

* fixup! fixup! fixup! fixup! Revert "add genesis stake placeholders (#6969)"

* fmt
2019-11-23 23:15:21 -07:00
b8cd0a1bc0 Allow secure keypair input for solana-archiver and solana cli tools (#7106)
* Add seed phrase keypair recover to archiver

* Add seed phrase keypair to cli with ASK keyword

* cli main tweaks
2019-11-23 11:55:43 -05:00
7f87ac4b65 Improve coverage.sh's environment awareness (#7101)
* Improve coverage.sh's environment awareness

* Move version check into ci/rust-version.sh

* Embrace bashism
2019-11-23 14:53:39 +09:00
306fbd8bd8 install: Drop unneeded sha2 dependency (#7108)
* Poll for updates slower

* Drop sha2 dependency
2019-11-22 21:58:26 -07:00
3e0b272a20 Remove edge channel hardcode 2019-11-22 20:34:49 -07:00
6c89226ccf Purge zero lamport accounts on snapshot ingestion (#7010)
Snapshots do not load the original index, so they must
purge zero lamport accounts again.
2019-11-22 18:22:28 -08:00
f040987c9f Move date oracle to config program (#7105)
automerge
2019-11-22 15:10:53 -08:00
2a42ddbcbf Don't panic if pubkeys are missing from Budget transaction (#7102) 2019-11-22 14:34:50 -07:00
8bb68c4e6a Really remove mentions of 'genesis_block' (#7099) 2019-11-23 05:58:20 +09:00
4485b978c1 Clean up accounts hash internal state api (#7090) 2019-11-22 08:56:00 -08:00
68bad56e7d Streamline multinode-demo/ restart logic (#7094)
* bootstrap-leader.sh will now restart the node automatically by default
* Streamline validator restart
2019-11-22 09:44:16 -07:00
ef55c15537 Remove unused --poll-for-new-genesis-config feature (#7093)
automerge
2019-11-22 08:12:08 -08:00
ce8d37984d Allow secure keypair input for solana-validator cli (#7080)
* Allow secure keypair input for solana-validator cli

* feedback

* Add --skip-mnemonic-validation

* Update --identity to --identity-keypair

* Use struct instead of tuple

* Fix dependencies

* cargo fmt

* Add basic tests

* Use `seed phrase` instead of `mnemonic`

* Update passphrase prompt
2019-11-22 10:20:40 -05:00
c8166aed97 Correctly indicate genesis activation_epoch (#7091)
* Correctly indicate genesis activation_epoch

* Drop the '(Genesis)'
2019-11-22 15:35:02 +09:00
0bd41f98ed Avoid jemalloc in windows build (#7089)
automerge
2019-11-21 18:39:29 -08:00
d8ead57fbb Use bs58 strings to declare IDs rather then raw bytes (#7082) 2019-11-21 16:34:40 -08:00
d9e7a5fcbe Use fork weight instead of individual bank weight for fork selection. (#7079)
* Fix weight calculation

* Fix tests

* fork weight

* wait until nodes are in the leader schedule

* enable sanity

* fewer long tests
2019-11-21 15:47:08 -08:00
c965a110f2 Use unbounded channel (#7081) 2019-11-21 14:23:40 -07:00
8a879faac7 add genesis stake placeholders (#6969)
* add investor stake placeholders

fixups

fixups

review comments, fixups

make more data-looky for easier management

rent may be zero

rework with more tables, derived keys

fixups

rebase-fix

fixups

fixups

* genesis is now too big to boot in 10 seconds
2019-11-21 12:05:31 -08:00
a2a9f1e331 Truncate new keypair files (#7078)
automerge
2019-11-21 10:02:04 -08:00
15d7568038 Bump cbindgen from 0.9.1 to 0.10.0 (#7044)
Bumps [cbindgen](https://github.com/eqrion/cbindgen) from 0.9.1 to 0.10.0.
- [Release notes](https://github.com/eqrion/cbindgen/releases)
- [Changelog](https://github.com/eqrion/cbindgen/blob/v0.10.0/CHANGES)
- [Commits](https://github.com/eqrion/cbindgen/compare/v0.9.1...v0.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-21 10:58:04 -07:00
8cbc450192 Create genesis.tar.bz2 in solana-genesis (#7039)
* Use clap_utils

* Create genesis.tar.bz2 in solana-genesis

* Remove shell-based genesis.tar.bz2 generation

* Make Option=>Result conv more rusty

* stop using solana_logger

* Simplify by just using vec!

* clean up abit
2019-11-21 10:57:27 -07:00
79199711b8 Add gpu resource usage tracking (#7075) 2019-11-21 08:33:02 -08:00
2c1b8fdd39 Add another test for bank state hashes (#7073)
automerge
2019-11-20 23:03:42 -08:00
d9024db68d Fix publish of move program (#7072) 2019-11-20 20:33:49 -08:00
96dd044f8e Allow vest's terminator to recapture tokens (#7071)
* Allow vest's terminator to recapture tokens

* Less code

* Add a VestAll instruction

The terminator may decide it's impractical to maintain a vest
contract and want to make all tokens immediately redeemable.
2019-11-20 19:33:17 -07:00
e66b29943b datapoint for best fork weight and slot in replay (#7066) 2019-11-20 17:26:52 -08:00
100b9dd12a Fix num nodes metrics (#7068)
* Fix num nodes metric

* Fix node count metrics
2019-11-20 17:00:31 -08:00
3415db9739 Merge api/program into single units (#7061) 2019-11-20 16:32:19 -08:00
186bf7ae32 Plumb --gossip-host arg 2019-11-20 16:57:24 -07:00
97ca6858b7 Write transaction status and fee into persistent store (#7030)
* Pass blocktree into execute_batch, if persist_transaction_status

* Add validator arg to enable persistent transaction status store

* Pass blocktree into banking_stage, if persist_transaction_status

* Add validator params to bash scripts

* Expose actual transaction statuses outside Bank; add tests

* Fix benches

* Offload transaction status writes to a separate thread

* Enable persistent transaction status along with rpc service

* nudge

* Review comments
2019-11-20 16:43:10 -07:00
ee6b11d36d Remove ability to deploy custom programs (#7070)
automerge
2019-11-20 15:37:42 -08:00
f58fef60fb Fix program copy 2019-11-20 15:56:00 -07:00
a76eb64bbb Copy all programs when starting a network (#7069) 2019-11-20 14:37:15 -08:00
8590326b50 Book: Add proposal for durable transaction nonces (#6725)
automerge
2019-11-20 14:33:02 -08:00
b0271394cd Clean up --gossip-port argument (#7067)
--gossip-port now specifies exactly that, the gossip port to use.  The
new --gossip-host argument can be used to specify the DNS name/IP
address for gossip if --entrypoint is not supplied (when --entrypoint is
supplied, the gossip address is automatically set to the node's ip
address as observed by the entrypoint)
2019-11-20 15:21:34 -07:00
c39633f968 nit: Circular dependency error is hard to read (#7065) 2019-11-20 13:13:22 -08:00
1fef74b00c Fix solana-keygen new --force ... (#7064)
automerge
2019-11-20 12:46:16 -08:00
9f6a2e51b2 add credit-debit rent handling (#6947)
* add credit-debit rent handling

* add tests

* charge rent for validator account for fee credit

* rent is stored per tx instead of account
2019-11-21 01:57:02 +05:30
b150da837a Use epoch as the gossip purge timeout for staked nodes. (#7005)
automerge
2019-11-20 11:25:18 -08:00
ba9aaee7cd Update config.rs (#7045)
automerge
2019-11-20 11:10:46 -08:00
3aa67969f9 Add perf module to stable-perf CI (#7060) 2019-11-20 10:59:56 -08:00
d4f336db40 Fix unpin argument (#7057)
automerge
2019-11-20 10:22:26 -08:00
d184d3a732 Merge native programs parts into one unit (#7047) 2019-11-20 10:12:43 -08:00
42da1ce4e2 Fix bank hash not changing when no internal state has changed (#7052)
* Fix bank hash not changing when no internal state has changed

* Fix unnecessary call to hash_internal_state

* Add blockhash into the bank_hash

* Add blockhash into the bank_hash and update tests

* Refactor accounts_db slot_hashes

* More clarity in comments

* Add clippy suggestion

* Grammar

* Fix compile after clippy made me break it

* Schooled by clippy
2019-11-19 20:19:43 -08:00
d2ed921bc6 Cleanup nightly warnings (#7055) 2019-11-19 20:15:37 -08:00
d32a072190 Use ticks_per_slot to calculate maximum grace ticks (#7024)
* Use ticks_per_slot to calculate maximum grace ticks

* fix test

* fix votable candidate ordering

* fixes to pick_best_fork() and a unit test

* fixes
2019-11-19 17:55:42 -08:00
95c137158f Fix gce.sh info (#7054)
automerge
2019-11-19 17:49:25 -08:00
7151b92239 Don't create keypair files with r+go (#7051) 2019-11-19 18:26:21 -07:00
716caeb17c Use camelCase (#7050)
automerge
2019-11-19 14:55:32 -08:00
f8e4bdd23d --bootstrap-storage-pubkey is now optional (#7049)
automerge
2019-11-19 14:35:56 -08:00
55dfd03007 wrong calculation (#7028)
matcher takes 2 B tokens as profit because amount of price difference is (7-6)*2B = 2B
2019-11-19 14:47:29 -07:00
854fc8d552 Add getConfirmedBlock to json-rpc docs (#7046) 2019-11-19 14:00:15 -07:00
f2badf2c5d Fix a bug where gossip loops forever while splitting messages (#7032)
* Fix a bug where gossip loops forever while splitting messages

* Get rid of while loop

* Minor clean up and rename
2019-11-19 11:51:51 -08:00
ea656b1a3f Add parent slot to getConfirmedBlock (#7038)
* Add parent slot to getConfirmedBlock

* Fix bad text-replace

* Use camelCase in getConfirmedBlock
2019-11-19 09:39:55 -07:00
5b7bd24f0a Remove duplicated args (#7036) 2019-11-19 09:10:54 -07:00
2d7c7b0982 Fix missed rebase on net.sh (#7037) 2019-11-19 10:22:30 -05:00
b958bf9086 Fix confirmation metrics (#7035) 2019-11-19 09:51:50 -05:00
43144cfe8b Make banks that fail threshhold check resettable (#7027) 2019-11-19 02:36:30 -08:00
11d2d2eccd Fix progress map losing banks and recomputing stats (#7026)
* Fix progress map missing banks

* Fix confirmations

* Fix test

* Initialiize progress with frozen banks atartup
2019-11-19 02:36:00 -08:00
e22f89853f Consider CI_TAG= to be the same as unset CI_TAG 2019-11-18 23:43:38 -07:00
7ccc029f77 Make solana ping take optional lamports argument (#7029)
* Make solana ping take optional lamports argument

* Use clap's default_value
2019-11-19 14:50:09 +09:00
0eb78e461d Relax requirement that the entrypoint node runs the RPC service (#7019) 2019-11-18 21:43:14 -07:00
3615209ce7 don't allow assignment to sysvar program (#7017)
automerge
2019-11-18 19:39:29 -08:00
6bfe0fca1f Add a version field to shreds (#7023)
* Add a version field to shreds

* Clippy

* Fix Chacha Golden

* Fix shredder bench compile

* Fix blocktree bench compile
2019-11-18 18:05:02 -08:00
bfa2535ea1 Add non-fungible token program (#7007)
* Add non-fungible token program

* Remove issuer and id from state

* Boot NftInstruction and NftState

* Rename NFT to Ownable

Maybe this should be "Owned" to avoid confusion with an Ownable trait?

* Rename directory

* Delete unreachable branch

* Don't use copy_from_slice - need an error, not a panic.

* Rename contract_pubkey to account_pubkey
2019-11-18 18:09:42 -07:00
6ec918fabb Update Move support to accomadate Libra's changes to compiler behavior (#6993) 2019-11-18 16:47:01 -08:00
cbf7c0080b fix split instruction doc (#7022) 2019-11-18 15:31:17 -08:00
a6196901de Generate net-shaper configuration from stdin, or randomly (#7021) 2019-11-18 14:47:07 -08:00
c09469fa3a Rename verify_instruction() to verify_account_changes() (#7020) 2019-11-18 15:01:14 -07:00
3acd84d9c0 Allow creating an vote program ix where the withdrawer is also the "to" account (#6992)
automerge
2019-11-18 12:43:47 -08:00
c902fd0303 skip sysvars while assessing rent (#7015)
* skip sysvars while assessing rent
2019-11-19 01:31:27 +05:30
955aaef2e6 Fixes to net-shaper and net.sh (#7002)
* Fixes to net-shaper and net.sh

* fixes to default filters and cleanup
2019-11-18 11:33:33 -08:00
e0a2bb9d86 Legitimately map transactions to statuses in blocktree (#7011)
* Refactor rocksdb TransactionStatus to store/return struct; hook up map_transactions_to_statuses

* Cleanup use statements
2019-11-18 09:12:42 -07:00
3bc8d78801 Add ConfirmedBlock struct, and rework Blocktree apis to include block… (#7004)
* Add RpcConfirmedBlock struct, and rework Blocktree apis to include blockhash info and dummy tx statuses

* Remove unused lifetime
2019-11-17 20:17:15 -07:00
b66c03667c Log for threshold failure (#7008) 2019-11-17 17:10:16 -08:00
6e04a646ba Gossip entrypoint is now option of spy not solana-gossip (#7006) 2019-11-17 11:36:24 -05:00
086e5da8d0 feat: add TransactionStatus column family and test (#6958) 2019-11-17 11:26:01 -05:00
c1b06817a2 Add non-dev value for slots_per_epoch and use that as default (#6984)
When --dev flag is not passed.
2019-11-16 20:53:54 -08:00
c3926e6af0 |solana-gossip spy| no longer requires an entrypoint (#6999) 2019-11-16 14:16:28 -07:00
70322d1ff8 Add error logging to dead slots (#7000) 2019-11-16 02:54:51 -08:00
7c32640a9b Set index and set data should write into shred data (#6995) 2019-11-16 02:41:59 -08:00
5ad09afc15 Improve run.sh for better developer experience (#6945)
* run.sh: Create genesis file for ad-hoc validators

* run.sh: Prefer release under NDEBUG

* run.sh: Add sanity test for run.sh

* run.sh: Conditionally re-gen drone and faucet keys

* Make shellcheck happy

* Address code review comments

* Clean up a bit
2019-11-16 15:56:29 +09:00
5d8c1a303e fix: update run.sh arguments to solana-genesis (#6996) 2019-11-15 23:22:21 -05:00
24b254459b Fix dev mode arg in run.sh (#6997) 2019-11-15 23:16:42 -05:00
30089841f6 Use correct faucet arg in run.sh (#6994)
automerge
2019-11-15 18:33:08 -08:00
0bee05b849 Pull TdS transaction fees to 0 2019-11-15 15:51:37 -07:00
afd9ae9999 Allow withdraws to the authorized withdrawer (#6989) 2019-11-15 17:16:24 -05:00
5ab70c4e97 genesis: rename mint account to faucet account and make it optional (#6990) 2019-11-15 14:50:26 -07:00
cab2232aba Fix System Stats script (#6985)
automerge
2019-11-15 13:25:40 -08:00
946e937549 Create development vs softlaunch environment hooks into net scripts (#6974) 2019-11-15 15:18:45 -05:00
0ca943f49b RecyclerCache for shred_sigverify (#6986)
automerge
2019-11-15 12:16:56 -08:00
b2db0b97fc Add show-gossip command (#6982) 2019-11-15 13:15:34 -07:00
d565ec7968 Fixes to net-shaper, and net.sh option to start/stop shaper (#6981)
* Fixes to net-shaper, and net.sh option to start/stop shaper

* fix shellcheck

* more shellchecks
2019-11-15 12:10:48 -08:00
36e3ccfc68 Remvoe pinned memory (#6976) 2019-11-15 10:58:25 -08:00
892ca196f1 Improve error message when unable to read a file (#6978) 2019-11-15 10:39:05 -07:00
59413b3124 Fix rules for fork selection (#6906)
automerge
2019-11-15 08:36:33 -08:00
e1643c91c4 Pull a fixed and working version of shellcheck docker imaage (#6975) 2019-11-15 10:55:25 -05:00
3ce6248f8c Add CPU and RAM usage to Metrics (#6968)
* Add CPU usage to Metrics

* Add RAM usage and rename to system-stats

* Shellcheck

* Remove SC exception

* Address review comments
2019-11-14 20:36:34 -08:00
006c39380a Display 'none' instead of 0.0.0.0 (#6973) 2019-11-14 20:24:35 -07:00
22f2247f46 Cargo.lock 2019-11-14 16:59:30 -07:00
852a2146ab Add Blocktree api to get transactions by slot (#6966)
* Add blocktree method to get confirmed-block txs

* Clean up use statements

* Add test, and fmt

* Plumb new blocktree method into getConfirmedBlock
2019-11-14 16:34:39 -07:00
99b42f210c Remove unused sha2 dep (#6964)
automerge
2019-11-14 14:01:11 -08:00
ae3c9033c1 Stop running testsuites when only the book is modified (#6956) 2019-11-14 14:36:08 -07:00
03f7f0d18c Rename getBlock to getConfirmedBlock; remove getBlocksSince (#6961)
automerge
2019-11-14 13:14:42 -08:00
79d7090867 Remove obsolete references to Blob (#6957)
* Remove the name "blob" from archivers

* Remove the name "blob" from broadcast

* Remove the name "blob" from Cluset Info

* Remove the name "blob" from Repair

* Remove the name "blob" from a bunch more places

* Remove the name "blob" from tests and book
2019-11-14 11:49:31 -08:00
e7f63cd336 Upgrade to rust 1.39.0 (#6939)
* Upgrade to rust 1.39.0

* 1.39.0 clippy
2019-11-14 12:27:01 -07:00
f108f483b7 Remove Blobs and switch to Packets (#6937)
* Remove Blobs and switch to Packets

* Fix some gossip messages not respecting MTU size

* Failure to serialize is not fatal

* Add log macros

* Remove unused extern

* Apparently macro use is required

* Explicitly scope macro

* Fix test compile
2019-11-14 10:24:53 -08:00
d6cbb02c92 Bump rocksdb from 0.12.4 to 0.13.0 (#6952)
automerge
2019-11-14 09:59:54 -08:00
42af8b199f feat: add tests for invalid/failure cases (#6951) 2019-11-14 11:41:26 -05:00
dbbd9663b2 Consolidate error messaging into result detail (#6950) 2019-11-14 11:18:38 -05:00
f4846b6fe4 Update rent.rs 2019-11-14 08:55:09 -07:00
a28a34f61c Clean up DB names in automation (#6949) 2019-11-14 10:20:10 -05:00
96d47c51a1 Tighten up AWS testcases (#6948) 2019-11-14 10:17:50 -05:00
f27c11ccd8 Add Azure testnet to automation (#6911)
* Add Azure testnet to automation
2019-11-14 09:14:53 -05:00
43e2301e2c Fix roots overrunning broadcast (#6884)
* Add trusted pathway for insert_shreds to avoid checks
2019-11-14 00:32:07 -08:00
7b05b3dbb3 rent collector improvments (#6888)
* avoid account copying + pre-empt rent

* adding support for base rent
2019-11-14 10:56:49 +05:30
c96b8c8d68 Script to run net-shaper on remote nodes (#6938)
* Script to run net-shaper on remote nodes

* fixes
2019-11-13 20:31:44 -08:00
4fc767b3f6 Move version! from core:: to clap_utils:: (#6944)
* Move version! from core to clap-utils

* Completely move version! from core:: to clap_utils::

* rustfmt

* Do remaining transition after rebase
2019-11-14 13:10:38 +09:00
cc96848b01 Remove unneeded prepare_batch() assert (#6941)
automerge
2019-11-13 17:08:21 -08:00
6009801c5f More granular timings in shred generation (#6900) 2019-11-13 16:30:12 -08:00
f116cdeed9 Add validator catchup command (#6922) 2019-11-13 15:58:14 -07:00
5f38fa379c Tool to partition network and induce packet drops/delays (#6933)
* Tool to partition network and induce packet drops/delays

* clippy fixes

* review comments
2019-11-13 13:59:55 -08:00
e2fb9ac829 feat: remove unwraps from client code, fixes #6915 (#6927) 2019-11-13 14:41:54 -07:00
f83254d760 Update Iftop command in testnet automation (#6908)
* Update iftop command
2019-11-13 14:41:42 -05:00
ee5cc733a1 Log blocktree and snapshot open times (#6930)
automerge
2019-11-13 11:20:39 -08:00
18a17cfbbf Implement Display trait (#6929) 2019-11-13 11:44:07 -07:00
a3a830e1ab Delete Service trait (#6921) 2019-11-13 11:12:09 -07:00
4b1e9ada18 Fix busted failure messaging for slack app uploading (#6928)
* Add informative failure message

* Correctly expand variable names inside failed command string
2019-11-13 13:04:14 -05:00
9026339d35 Restore is_frozen() asserts (#6925) 2019-11-13 10:40:51 -07:00
0be13a6295 Silence cargo install error in bpf script (#6926)
automerge
2019-11-13 08:57:12 -08:00
fcc2874591 Remove/address some TODOs (#6923) 2019-11-13 09:43:15 -07:00
9246bee12b feat: default 8gb hard memory limit for redis (#6913) 2019-11-13 11:09:20 -05:00
30a08f4282 Cleanup ledger macros (#6916)
automerge
2019-11-13 07:14:09 -08:00
e5c5f34f9a Make solana-validator check vote account at start (#6790)
* Make solana-validator check vote account at start

* Don't abort tests...

* Fix test breakage

* Remove extra semicolon

* Attempt to fix cluster-tests

* rustfmt

* Change behavior of vote_account ephemeral pubkeys

* save

* clean up

* clean up

* rustfmt && clippy

* Reorder for simpler diff

* Fix rebase...

* Fix message a bit

* Still more rebase fixes....

* Fix yet more

* Use find_map over filter_map & next and revert message

* More through error checks

* rustfmt & clippy

* Revert

* Revert core/src/validator.rs

* Cleanup

* Cleanup

* Cleanup

* Rebase fix

* Make clippy & rustfmt happy

* save

* Clean up

* Show rpc error detail

* Check node lamports only after pubkey matching

* rustfmt
2019-11-13 16:48:55 +09:00
361eab1bf7 Remove unused dependencies (#6917)
automerge
2019-11-12 22:00:29 -08:00
2fd2140f64 🍢banking-bench/, genesis-programs/ and local-cluster/ (#6920)
* git mv genesis_programs genesis-programs

* git mv local_cluster local-cluster

* git mv banking_bench banking-bench
2019-11-12 22:20:48 -07:00
86faa3f995 Properly type RpcClient::get_version() (#6919) 2019-11-12 22:01:04 -07:00
81acd94153 Cleanup local cluster (#6897)
* Boot integration tests from unit test build

* Move bench-tps and bench-exchange integration tests out of local_cluster

* Fix build
2019-11-12 20:30:35 -07:00
48987bed67 Bump num-traits from 0.2.8 to 0.2.9 (#6914)
Bumps [num-traits](https://github.com/rust-num/num-traits) from 0.2.8 to 0.2.9.
- [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.8...num-traits-0.2.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-12 20:27:30 -07:00
4405e8a15b Automatically run dot to generate PDFs or PNGs (#6912) 2019-11-12 20:27:15 -07:00
24cb4798bc Map all private IP to public IP for log-analyzer (#6907)
* Map all private IP to public IP for log-analyzer

* fixes

* shellcheck fixes
2019-11-12 15:48:46 -08:00
986e9e268e Revive the parallel bank client from v0.16 (#6903) 2019-11-12 15:26:21 -07:00
71bf8c5f85 Keygen grind fix and improve --ignore-case (#6901)
* keygen: grind --ignore-case was not honored

* keygen: Improve grind --ignore-case ergonomics

Don't silently require the user to know their search term needs to be lowercase

* fmt
2019-11-12 14:24:37 -07:00
5a629ff387 Bump num_cpus from 1.11.0 to 1.11.1 (#6905)
Bumps [num_cpus](https://github.com/seanmonstar/num_cpus) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/seanmonstar/num_cpus/releases)
- [Changelog](https://github.com/seanmonstar/num_cpus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/num_cpus/compare/v1.11.0...v1.11.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-12 14:24:05 -07:00
148a58865e Make creating new snapshot.tar.bz2 truly-atomic (#6902) 2019-11-12 14:21:56 -07:00
2523fa73cf Use release as default (#6896) 2019-11-12 13:39:12 -07:00
6d76c34291 Handle dead slots when loading ledger (#6887) 2019-11-12 13:38:26 -07:00
3faeb7fa79 Rename solana-netutil to solana-net-utils for consistency (#6895)
* sed -i -e 's/netutil/net_utils/g' $(git grep --files-with-matches netutil :**.rs)

* sed -i -e 's/netutil/net-utils/g' $(git grep --files-with-matches netutil)

* git mv netutil/ net-utils

* Tweak a bit

* Fix rustfmt & clippy
2019-11-12 13:37:13 -07:00
bb00904fc8 add rent reserve for bootstrap stakes (#6876)
* genesis investor stakes

* assert rent is sufficient for these bootstrappers
2019-11-12 12:33:40 -08:00
73e3fc7c4f Add packet loss analyzer to testnet automation (#6715)
* Add packet loss analyzer to testnet automation
2019-11-12 14:51:36 -05:00
5903339c17 feat: return bank/block info with block-related results (#6716) 2019-11-12 14:49:41 -05:00
2688ae614c Add public IP address option to automation (#6899)
* Add public IP address option to automation

* Make public IP use the default behavior
2019-11-12 13:55:19 -05:00
5670cafda4 Fix caching data shreds as coding shreds (#6877) 2019-11-12 10:29:58 -08:00
4bc8fd3267 Add --no-genesis-fetch flag (#6893) 2019-11-12 10:42:04 -07:00
bb2fa9957a Increase default AWS instance size to match GCE and Azure (#6773) 2019-11-12 12:27:59 -05:00
c6b108ef4f Don't panic in sdk/ when genesis fails to load (#6892) 2019-11-12 10:24:49 -07:00
bb158a9b48 Add provider specific self destruct timeouts (#6894) 2019-11-12 12:21:24 -05:00
c2fdbde68f forks graph can now optionally display all validator votes (#6885) 2019-11-12 10:13:16 -07:00
7e82450d7b Serialize transaction in proper wire format instead of json (#6889) 2019-11-12 10:45:10 -05:00
188dbdb068 Ignore symlinked logdir in repo root (#6891) 2019-11-12 10:36:53 -05:00
25866f3652 print command now supports multiple slots and decodes system/vote instructions (#6878) 2019-11-11 23:22:20 -07:00
c7e2057d2d Install xargo if a new version is available (#6882)
automerge
2019-11-11 20:32:07 -08:00
d84f367317 Extract duplicate clap helpers into clap-utils (#6812) 2019-11-12 09:42:08 +09:00
95d6586dd7 Remove debug datapoint that isn't being plotted (#6873) 2019-11-11 14:25:25 -08:00
e8e13fdeeb Insert coding shreds to blocktree only if needed in future (#6836)
* Insert coding shreds to blocktree only if needed in future

* fixes
2019-11-11 13:12:55 -08:00
816b2d7ff8 Tune repair to be less aggressive (#6868) 2019-11-11 13:12:22 -08:00
91cfa0aac9 Upgrade xargo if old (#6869) 2019-11-11 12:58:24 -08:00
4be646c695 discover() by gossip sockaddr instead of just by gossip ip address (#6865) 2019-11-11 12:42:58 -07:00
a23c6177d5 Use reusable provider-specific testnet keypairs (#6866)
* Use reusable provider-specific testnet keypairs

* shellcheck
2019-11-11 12:08:22 -07:00
cc6e1ea200 Stub out getBlocksSince and getBlock methods (#6853)
* Add getBlocksSince rpc method, and initial stub of getBlock method

* Return test transactions from getBlock method

* clippy

* Add comment on get_block method
2019-11-11 13:18:34 -05:00
596d30661a Echo failed command to results app (#6859) 2019-11-11 09:37:11 -07:00
b971eeca4b Add ryoqun to ssh authorized keys (#6860) 2019-11-11 17:12:24 +09:00
cfab36cb1d Include channel and commit info in the version of pre-release builds (#6819) 2019-11-10 22:39:13 -07:00
5835b3b8eb Increase timeout when confirming airdrop for max commitment (#6858)
* Increase timeout when confirming airdrop for max commitment

* Add commitment to airdrop rpc trace

* Flip commitment check
2019-11-10 12:20:52 -05:00
62eea636b0 Update jsonrpc-api.md 2019-11-09 19:46:04 -05:00
b14e61ff79 Filter any net/log* directory from rsync (#6857) 2019-11-09 13:38:17 -08:00
59adc25c23 Implement non-GPU mode testcase for colo (#6856) 2019-11-09 09:38:06 -07:00
86ead6a65c Update book toc for readonly accounts (#6854) 2019-11-09 08:25:24 -07:00
fbfbafa3d4 Update readonly accounts docs (#6801) 2019-11-09 07:35:37 -07:00
1ddf90ed08 Compress contact_info_trace() output to improve CI log rendering (#6852) 2019-11-09 01:12:18 -07:00
0fbd508c5f Only check the entrypoint's RPC address (#6851) 2019-11-09 00:56:31 -07:00
24a7b0ce74 Add print-genesis-hash command (#6849) 2019-11-08 23:17:48 -07:00
68eafb3f30 Ensire config dir exists 2019-11-08 22:18:21 -07:00
2649f6bdd6 Avoid excessive log/ relinking 2019-11-08 21:57:50 -07:00
9807f47d4e Rename genesis block to genesis config (#6816) 2019-11-08 23:56:57 -05:00
63425bed10 Move move tests into its own job (#6847) 2019-11-08 20:40:03 -07:00
02058ea699 Reject blocks with invalid last ticks in replay stage (#6833)
* Reject blocks with invalid last ticks in replay stage

* slot_full
2019-11-08 20:21:54 -05:00
91be35731c Fix freeze and register_tick race (#6799)
* Fix freeze and register_tick race

* Add test
2019-11-08 17:21:17 -08:00
d1daeb44e6 Remove custom stack_size() (#6844) 2019-11-08 17:11:07 -07:00
efdfc5c327 Remove TODOs (#6843) 2019-11-08 16:43:18 -07:00
9c00ad9ff2 Remove some low-hanging TODOs (#6839) 2019-11-08 16:41:36 -07:00
151adab739 earlyoom now works on reboots (#6841) 2019-11-08 16:40:38 -07:00
162b1bdef7 Add more tests (#6834)
automerge
2019-11-08 15:07:11 -08:00
da425cc225 Don't insert coding shreds into blocktree on leader (#6831) 2019-11-08 13:54:23 -08:00
346213da4c Check for LD_DW at the end of a program (#6821) 2019-11-08 13:30:44 -08:00
8babecd890 Remove todo from account (#6827) 2019-11-08 13:30:21 -08:00
2855c55ac1 Move loader does not need genesis auth key (#6818) 2019-11-08 11:52:56 -08:00
bb9649e18d Replacd todo with issue (#6823) 2019-11-08 11:48:07 -08:00
2f7d0e7884 TODO already covered by issue (#6828) 2019-11-08 11:45:17 -08:00
dfc4d7cb50 Remove unsupported test (#6820) 2019-11-08 11:37:47 -08:00
b800642fa4 Add new fork log message for when the node is leader for consistency (#6808) 2019-11-08 12:30:25 -07:00
5b6c590057 run.sh logs validators to stderr (#6817) 2019-11-08 11:30:19 -08:00
66a0f54097 Replay should respect order of register_ticks with respect to blockhashes (#6805) 2019-11-08 12:29:41 -07:00
f8e64aad5b ci/shellcheck.sh now only audits files that git knows about (#6815) 2019-11-08 10:25:59 -07:00
cd5ec8cd35 Fix blind keyed_account indexing in BPF and Move loader (#6810) 2019-11-08 09:19:19 -08:00
75fd13de5d Prevent ci/nits.sh from incorrectly nitting on ci/nits. (#6814) 2019-11-08 09:40:25 -07:00
807af8670e Clean up net logs (#6813) 2019-11-08 10:25:17 -05:00
5bd05fba09 require to account signature (#6658)
* require to signature

* fixing invocation to create_account

* fix create_account references

* address review comment

* whacking bugs in tests

* fixing stake program tests
2019-11-08 15:57:35 +05:30
f7b6e777bf Revert "Clean up net/log symlinks (#6794)" (#6809)
This reverts commit 68353b7e57.
2019-11-07 22:15:45 -07:00
68353b7e57 Clean up net/log symlinks (#6794) 2019-11-07 23:45:19 -05:00
8e81bc1b49 Fix pinning (#6604)
Remove Deref implementations and add more pass-throughs to the PinnedVec
wrapper.
Warm recyclers
set_pinnable
2019-11-07 19:48:33 -08:00
80a89b5e6d Revert "Revert "Add inflation to epoch phases (#6787)" (#6802)" (#6806)
automerge
2019-11-07 18:33:14 -08:00
b64b54f48f unfork dalek ed25519 (#6776) 2019-11-07 17:08:10 -08:00
20a52f153b Fix iftop not being stopped correctly (#6803)
automerge
2019-11-07 17:03:14 -08:00
d89271528e Revert "Add inflation to epoch phases (#6787)" (#6802)
automerge
2019-11-07 16:43:09 -08:00
ccac35fc01 Increase FEC ratio to 32:32 (#6800)
automerge
2019-11-07 16:38:06 -08:00
23e232b496 Avoid : in default log filename (#6796) 2019-11-07 15:36:29 -07:00
ddcf906a88 Add docs for FEC rate calculation (#6788)
automerge
2019-11-07 12:44:40 -08:00
09e8124017 Tool to reconfigure netem on testnet (#6781)
automerge
2019-11-07 11:14:33 -08:00
67d1e2903c Upgrade Repair be more intelligent and agressive (#6789)
* Upgrade Repair be more intelligent and agressive

* Fix u64 casts

* Fix missing bracket

* Add 1 second delay to test to allow repair to kick in
2019-11-07 11:08:09 -08:00
a9c4cd6cbe Add inflation to epoch phases (#6787) 2019-11-07 10:53:04 -08:00
180bc1784e Book: Add blockhash to terminology (#6711)
automerge
2019-11-07 10:46:04 -08:00
f984feda42 Use get_slot_with_commitment (#6791) 2019-11-07 10:41:58 -07:00
56fc15f44d Fix units on dead slots graph 2019-11-07 08:26:13 -07:00
e0d9f7d1d4 Fix genesis arg names in run.sh (#6785) 2019-11-06 23:27:10 -05:00
87ba66b6d0 Add net/ support for reusable identity keypairs (#6783) 2019-11-06 21:14:05 -07:00
e420800aeb Update terminology for block height and genesis block (#6782) 2019-11-06 23:09:03 -05:00
a684984f8b feat: add confirm_transaction, add rpc client test (#6778) 2019-11-06 22:08:03 -05:00
079682fbdc Add ping cli option to use CommitmentLevel::Max, instead of CommitmentLevel::Recent (#6775) 2019-11-06 18:54:17 -07:00
2491719f36 Fix windows build (#6774) 2019-11-06 16:07:28 -07:00
65de227520 Don't panic on packet data (#6769) 2019-11-06 14:32:37 -08:00
29f3b198cf Update snapshot verification proposal (#6764)
automerge
2019-11-06 13:48:28 -08:00
0ace79939b Add reference tick to data shreds (#6772)
* Add reference tick to data shreds

* fix tests
2019-11-06 13:27:58 -08:00
b3a75a60a4 Use rooted bank by default in rpc bank selection (#6759)
* Name anonymous parameters for clarity

* Add CommitmentConfig to select bank for rpc

* Add commitment information to jsonrpc docs

* Update send_and_confirm retries as per commitment defaults

* Pass CommitmentConfig into client requests; also various 'use' cleanup

* Use _with_commitment methods to speed local_cluster tests

* Pass CommitmentConfig into Archiver in order to enable quick confirmations in local_cluster tests

* Restore solana ping speed

* Increase wallet-sanity timeout to account for longer confirmation time
2019-11-06 14:15:00 -07:00
5e8668799c Fewer recyclers. (#6770)
automerge
2019-11-06 12:35:51 -08:00
8fa6935c9d Validators now log to a file by default (use -o -/--log - for stderr) (#6768)
automerge
2019-11-06 11:47:34 -08:00
a1fe6265fd use pubkeys in genesis (#6750) 2019-11-06 11:18:25 -08:00
67f636545a Refactor sigverify to stage for signing shreds on the GPU (#6635)
automerge
2019-11-06 10:52:30 -08:00
ec50c20400 Add time in net/logs path (#6701) 2019-11-06 10:43:12 -08:00
18f146ace5 validator/: Restructure main() to fully parse cli arguments first (#6765) 2019-11-06 11:34:31 -07:00
a91bf296d7 Add some addition packages to DC installer scripts (#6755)
* Add 'cmake' to default DC node installer

* Add 'sysstat' to default DC node installer

For 'iostat'

* Add 'perf' to default DC node installer

* Add 'iftop' to default DC node installer
2019-11-06 09:48:45 -07:00
bb8985d76c [Security] Bump spin from 0.5.0 to 0.5.2 (#6621)
Bumps [spin](https://github.com/mvdnes/spin-rs) from 0.5.0 to 0.5.2. **This update includes security fixes.**
- [Release notes](https://github.com/mvdnes/spin-rs/releases)
- [Commits](https://github.com/mvdnes/spin-rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-06 08:31:25 -07:00
7ff2a44a63 Make last shred for an interrupted slot signed + typed (#6760) 2019-11-06 08:25:17 -07:00
b5074d8577 Enable JSON RPC request/response logging by default (#6758) 2019-11-06 08:23:13 -07:00
5c1abaf43c Bump cc from 1.0.46 to 1.0.47 (#6741)
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.46 to 1.0.47.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.46...1.0.47)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-06 08:23:00 -07:00
dc3988eff8 CLI changes required for to account signing (#6678)
* CLI changes draft

* use tempfile

* remove un-necessary error handling

* use keypair instead of pubkey
2019-11-06 20:17:34 +05:30
24102a7435 Allow voting on empty banks (#6719)
* Allow votes on empty banks

* Remove making first bank is_delta true, no longer necessary for idling

* Remove votable from ledger tool
2019-11-06 01:02:26 -08:00
9614d17024 Limit deserialization of data coming off the wire (#6751)
* Limit deserialization of data coming off the wire

* Feedback and cleanup
2019-11-06 00:07:57 -08:00
8e3be6413e Cargo.lock 2019-11-05 20:02:09 -07:00
09e648f957 ledger-tool/: Include full validator voting history in fork-graph (#6756) 2019-11-05 19:40:00 -07:00
0c2bf022fa Apply netem packet rules to only UDP traffic (#6754) 2019-11-05 18:34:04 -08:00
1c5d2a85cf Fix substitution of private IP with public IP in iftop logs (#6748)
automerge
2019-11-05 15:08:35 -08:00
8993b15248 Integrated use of netem with testnet scripts (#6746)
automerge
2019-11-05 15:04:06 -08:00
8f91b5aab3 Add threshold to repairman for same slot (#6728) 2019-11-05 12:48:45 -08:00
46391397b8 Bump indicatif from 0.12.0 to 0.13.0 (#6736)
Bumps [indicatif](https://github.com/mitsuhiko/indicatif) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/mitsuhiko/indicatif/releases)
- [Commits](https://github.com/mitsuhiko/indicatif/compare/0.12.0...0.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-05 13:25:28 -07:00
85c9a231c1 Include the affected slot in blocktree error metrics (#6734) 2019-11-05 13:25:21 -07:00
c312d4fba0 Calculate proofs collected and don't encrypt if there are none (#6698) 2019-11-05 11:38:50 -08:00
7203036e3e Adjust nofiles within Blocktree::open() for all ledger/ users (#6737)
automerge
2019-11-05 11:18:49 -08:00
b9d8e3e55a Only copy whats needed to verify an instruction after processing (#6669) 2019-11-05 10:57:32 -08:00
08973f9f05 Adjust default signature fee for base-10 lamports (#6738) 2019-11-05 11:21:45 -07:00
c6931dcb07 Remove credit-only account handling (#6726)
* Renaming
- credit-only/credit-debit to read-only/read-write
- debitable to writable

* Remove credit handling, making credit-only accounts read-only

* Update programs to remove deprecated credit-only account designation

* Use readonly and writable instead of underscored types
2019-11-05 09:38:35 -07:00
cea13e964c Add --graph-forks option (#6732) 2019-11-04 23:18:30 -07:00
d207a34736 remove duplicate signal handling (#6702) 2019-11-05 11:36:51 +05:30
fba1af6ea9 ledger-tool can now load a ledger snapshot (#6729) 2019-11-04 22:14:55 -07:00
b825d04597 Pull perf into a separate module. (#6718)
automerge
2019-11-04 20:13:43 -08:00
3133ee2401 Fix limited iftop output and failure to stop iftop (#6723)
* Fix limited iftop output and failure to stop iftop

* Shellcheck

* Ignore shellcheck
2019-11-04 18:12:07 -08:00
4d52f47f87 Move get_bank_forks() into ledger/ so its available for use by ledger-tool/ (#6720) 2019-11-04 19:10:06 -07:00
f54cfcdb8f Store and persists full stack of tower votes in gossip (#6695)
* vote array

wip

wip

wip

update

gossip index should match tower index

tests build

clippy

test index after expired vote

test

bank specific last vote sync time

* verify

* we are likely to see many more warnings about old votes now
2019-11-04 16:19:54 -08:00
57983980a7 Lower verify-batch-size to debug (#6722)
automerge
2019-11-04 16:00:59 -08:00
33f4aaf3fd Rename confidence to commitment (#6714) 2019-11-04 16:44:27 -07:00
c138d692b1 Show all ports for nodes in gossip table (#6717)
* Show all ports for nodes in gossip table

* review comments
2019-11-04 15:05:08 -08:00
fb12136975 Add genesis_accounts module (#6708) 2019-11-04 13:46:33 -07:00
efe260f12e sysvar trait (#6667)
* sysvar trait

* get the new guy in on it
2019-11-04 12:31:24 -08:00
b9b535c30f move system_instruction::transfer() to credit-debit (#6677)
* transfer no credit only

* use a credit-only transfer in the credit-only test
2019-11-04 12:30:59 -08:00
d085c8626f GCE: Add instances self-destruct (#6363)
automerge
2019-11-04 10:30:26 -08:00
5e3697807c Fail gracefully if AVX support is missing (#6705) 2019-11-04 11:03:39 -07:00
5416c114cf SDK: Add sysvar to expose recent block hashes to programs (#6663)
* SDK: Add sysvar to expose recent block hashes to programs

* Blockhashes is one word

* Missed one

* Avoid allocs on update

* unwrap_or_else

* Use iterators

* Add microbench

* Revert "unwrap_or_else"

This reverts commit a8f8c3bfbe.

* Revert "Avoid allocs on update"

This reverts commit 486f01790c.
2019-11-04 10:51:15 -07:00
a0127e63c6 pay subcommand now accepts a keypair file for convenience (#6703) 2019-11-04 09:36:49 -07:00
8b2327ed34 Remove unneeded lib.rs 2019-11-04 08:11:40 -07:00
3938142535 keygen: add dedicated solana-keygen grind command (#6697)
* Remove dead code

* Speed up vanity key grinding
2019-11-03 19:41:26 -08:00
66f76c8067 Bump console from 0.9.0 to 0.9.1 (#6700)
Bumps [console](https://github.com/mitsuhiko/console) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Commits](https://github.com/mitsuhiko/console/compare/0.9.0...0.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-03 19:41:16 -08:00
568475e2db Fix incorrectly signed CrdsValues (#6696) 2019-11-03 10:07:51 -08:00
9ea398416e Sign shreds on the GPU (#6595)
* sign gpu shreds

* wip

* checks

* tests build

* test

* tests

* test

* nits

* sign cpu test

* write out the sigs in parallel

* clippy

* cpu test

* prepare secret for gpu

* woot!

* update

* bump perf libs
2019-11-02 06:23:14 -07:00
50a17fc00b Use Slot and Epoch type aliases instead of raw u64 (#6693)
automerge
2019-11-02 00:38:30 -07:00
f9a9b7f610 Better output layout for iftop logs (#6690)
automerge
2019-11-01 16:36:02 -07:00
a57f6b70da Fix swapped repair and forwards addrs (#6691)
automerge
2019-11-01 16:01:42 -07:00
bae83ba2b6 Compare iftop logs using log-analyzer (#6684)
* Compare iftop logs using log-analyzer

* fixes

* fix clippy errors
2019-11-01 14:48:23 -07:00
385b4ce959 Get rid of verified packets and use the Meta::discard flag (#6674)
* get rid of verified packets and use the disabled meta field everywhere
2019-11-01 14:23:03 -07:00
7b6e3a23be Add new pubkey to auth keys (#6687) 2019-11-01 14:44:10 -06:00
1cc8956f74 Get Azure provider working again (#6659)
* Wait for node creation before continuing

* Programatically set networking rules

* Add network security group to nodes upon creation

* shellcheck
2019-11-01 14:43:31 -06:00
e6c8bfd008 Add --use-move flag to cargo-install-all.sh and net/net.sh (#6670) 2019-11-01 07:53:30 -07:00
2d67962c2f Send repairman shreds to the repair socket (#6671) 2019-10-31 18:23:50 -07:00
2e30926ac3 New program to process iftop log output (#6668)
* New program to process iftop log output

* fixes

* fix shellcheck

* address review comments

* more review comments
2019-10-31 18:22:57 -07:00
d2c66c40c6 Have cargo-install-all.sh also look in program target dirs for so's (#6631) 2019-10-31 14:40:54 -07:00
a4d48df30a Add assertion when filling blocktree slot with ticks (#6664)
automerge
2019-10-31 14:15:07 -07:00
c52830980a Rework get_slot_meta (#6642)
* Assert slotmeta is not orphan

* Clean up get_slot_meta functionality

* Add test
2019-10-31 14:03:41 -07:00
e8e5ddc55d Verify number of hashes for each block of entries (#6262)
* Verify number of hashes for each block of entries

* Fix blocktree processor tick check

* Rebase once more
2019-10-31 16:38:50 -04:00
111942a47d document clock (#6662) 2019-10-31 13:26:55 -07:00
bc88180058 stake split (#6402)
* stake split

* stake split
2019-10-31 11:07:27 -07:00
3a616de47b Implementation of AWS support in automation (#6602)
* Implementation of AWS support in automation

* Add 10 node testcase

* Add cleanup for ec2 provider and single zone testcase
2019-10-31 12:00:10 -06:00
9d65e6f183 Fix check in should_insert_data_shred (#6649) 2019-10-30 23:37:25 -07:00
328a6a866e Fix code comment (#6640)
automerge
2019-10-30 22:21:34 -07:00
5264fded00 Avoid alloc due to vector pushes (#6632) 2019-10-30 21:55:17 -07:00
83d5115a02 Add --starts-with for vanity key grinding (#6647) 2019-10-30 20:47:42 -07:00
0559212df7 log bench (#6643) 2019-10-30 19:51:44 -07:00
f131255066 Add ~/.cargo/bin to PATH (#6641) 2019-10-30 19:41:24 -07:00
59f3dc3b6b Fix PohRecorder Metrics (#6644)
* Update Poh Recorder Dashboard

* Update PohRecorder logging
2019-10-30 18:55:29 -07:00
6454bfe754 Rework get_index_meta (#6636) 2019-10-30 16:48:59 -07:00
7bb224f54a Install ag on nodes (#6634)
automerge
2019-10-30 16:43:16 -07:00
fa12a5f70b kill rent calculator (#6625) 2019-10-30 16:25:12 -07:00
d2d78a073f Remove lingering references to base-2 SOLs (#6629)
automerge
2019-10-30 14:59:44 -07:00
6d403f2d85 Remove stray println 2019-10-30 14:44:26 -07:00
8032141311 Add --no-multi-client (#6624) 2019-10-30 14:43:30 -07:00
38491c8c4b Reduce verify-batch-size log (#6623) 2019-10-30 13:41:11 -07:00
627664b785 Re-enable tests (#6615)
automerge
2019-10-29 21:34:20 -07:00
dfa1c7493c Ignore flaky move test (#6616)
automerge
2019-10-29 21:21:35 -07:00
801337a422 Refactor Weighted Shuffle (#6614)
automerge
2019-10-29 21:02:11 -07:00
4ec95043d7 Update sol:lamport ratio to base-10 (#6611)
* Update sol:lamport ratio

* Update various SOL quantities in bash scripts
2019-10-29 20:03:48 -06:00
b4dc1a7263 Remove move feature (#6605)
automerge
2019-10-29 17:14:07 -07:00
ef3aa2731c Fix Weighted Best calculation (#6606)
automerge
2019-10-29 17:04:11 -07:00
e738019c48 Add Ramp TPS table 2019-10-29 16:18:58 -07:00
a5ef78f709 Expand CF's (#6528) 2019-10-29 16:18:03 -07:00
4156cea704 Fixup running-validator docs (#6607)
* Fixup validator docs

* Remove $
2019-10-29 17:13:20 -06:00
a587d05098 fix re delegate (#6603) 2019-10-29 14:42:45 -07:00
489dc657c6 Update libra to new fork (#6523)
* Update to new libra branch

* Use core and association addresses
2019-10-29 10:39:10 -07:00
029a2837e4 Bump jsonrpc-http-server from 14.0.1 to 14.0.3 (#6597)
Bumps [jsonrpc-http-server](https://github.com/paritytech/jsonrpc) from 14.0.1 to 14.0.3.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v14.0.1...v14.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-29 10:30:06 -07:00
618ecfd1c6 Bump base64 from 0.10.1 to 0.11.0 (#6596)
Bumps [base64](https://github.com/marshallpierce/rust-base64) from 0.10.1 to 0.11.0.
- [Release notes](https://github.com/marshallpierce/rust-base64/releases)
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.10.1...v0.11.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-29 10:29:58 -07:00
83174b919c Remove unstable default-run directive (#6599)
automerge
2019-10-29 10:28:48 -07:00
d952b38f93 Ensure nofiles is not capped at 1024 on a node reboot 2019-10-28 23:21:34 -07:00
1e2ab89b47 Ensure redis-server is started on a reboot 2019-10-28 20:58:46 -07:00
34a9619806 SigVerify stage for shreds. (#6563) 2019-10-28 16:07:51 -07:00
9ee65009cd Implement allowing validator boot failure into automation (#6589)
* Pass allow boot failures through create AND start

* Extend sleep timeout to all nodes

* Add 100 node testcase

* Reduce consistent sleep
2019-10-28 16:43:40 -06:00
85ccba366a Run localnet in development mode (#6587) 2019-10-28 15:35:17 -07:00
579a02529d Fix unnecessarily copying shreds in broadcast stage (#6588)
* Optimize coalesce_shreds to not explictly clone

* Remove Coalesce Shreds altogether

* fn no longer needs clippy exception
2019-10-28 14:58:27 -07:00
b04c8c1c1a Demote blocktree metrics log level (#6590)
automerge
2019-10-28 14:46:43 -07:00
243fa6cf63 Shred gpu sigverify (#6520)
Implement APIs for verifying shred signatures on the GPU.
2019-10-28 10:29:38 -07:00
30c0a7d069 Bump serde from 1.0.101 to 1.0.102 (#6581)
automerge
2019-10-28 09:19:39 -07:00
71b4e765c8 Bump itertools from 0.8.0 to 0.8.1 (#6583)
Bumps [itertools](https://github.com/bluss/rust-itertools) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/bluss/rust-itertools/releases)
- [Commits](https://github.com/bluss/rust-itertools/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-28 08:26:15 -07:00
73dd5aa2d1 Bump serde_derive from 1.0.101 to 1.0.102 (#6582)
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.101 to 1.0.102.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.101...v1.0.102)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-28 08:24:13 -07:00
96e209db49 Colo: Don't fail without a message (#6558) 2019-10-28 09:20:49 -06:00
0c14ca58c7 Invoke on-reboot from cloud startup script to avoid racing with cron (#6579)
automerge
2019-10-27 10:56:16 -07:00
f3c0aa154a -a is optional 2019-10-26 22:48:24 -07:00
6efaaa9d7a Blocktree metrics (#6527)
* Add metrics for blocktree performance
* Plumb metrics through window service
2019-10-26 16:15:59 -07:00
08238e8307 Add proposal for tick verification in slots (#6512)
* Add proposal for tick verification in slots
2019-10-26 16:14:30 -07:00
e1b35f9847 Fix race in blocktree.insert_shreds (#6550)
* Add guard for blocktree insert_shreds

* Add test
2019-10-26 04:09:58 -07:00
e174af7838 Use iftop to collect network bandwidth usage (#6560)
* Use iftop to collect network bandwidth usage

* fix shellcheck

* more shellchecks

* review comments
2019-10-26 00:06:46 -07:00
be74801236 Add NET_NUM_xyz variables 2019-10-25 23:00:14 -07:00
68acfd36d0 Bootstrap leader's stake is now authorized to the bootstrap leader's identity key (#6571) 2019-10-25 22:58:35 -07:00
c9cea2152b optimize verify_instruction (#6539) 2019-10-25 21:47:16 -07:00
e966c96644 Disable sigverify on blockstreamer node
This node get overloaded at high TPS trying to manage both a validator
and the blockexplorer.  Reduce it's workload by turning off sigverify,
which doesn't really matter since this node doesn't even vote
2019-10-25 21:33:08 -07:00
73c31d873e Update Cargo.toml versions from 0.20.0 to 0.21.0 (#6568) 2019-10-25 17:40:49 -06:00
a2a9d54985 Increase node start stagger (#6566) 2019-10-25 17:35:29 -06:00
ea2b26e5f5 Fix scp client mint keypair (#6565) 2019-10-25 16:23:52 -07:00
d68e2c4d06 Revert "Make instruction data opaque to runtime (#6470)" (#6564)
This reverts commit 6eeca9c6f1.
2019-10-25 16:22:41 -07:00
0cfa3d3de7 Return error if stake history deser fails in cli (#6559) 2019-10-25 16:44:09 -05:00
0d1f463f7f Update testnet-manager.sh 2019-10-25 10:56:20 -07:00
ff34bfebde Define 10, 25, 50 node testcases (#6557) 2019-10-25 11:43:53 -06:00
e103789994 Ignore exit code when the first mount fails 2019-10-25 10:11:32 -07:00
8a37b1e742 Bump jsonrpc-ws-server from 14.0.1 to 14.0.3 (#6553)
Bumps [jsonrpc-ws-server](https://github.com/paritytech/jsonrpc) from 14.0.1 to 14.0.3.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-25 09:40:42 -07:00
0cf4eb2ee4 Bump jsonrpc-core from 14.0.1 to 14.0.3 (#6552)
Bumps [jsonrpc-core](https://github.com/paritytech/jsonrpc) from 14.0.1 to 14.0.3.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-25 09:40:25 -07:00
5496f85dbc Bump crc from 1.8.1 to 1.9.0 (#6511)
Bumps [crc](https://github.com/mrhooray/crc-rs) from 1.8.1 to 1.9.0.
- [Release notes](https://github.com/mrhooray/crc-rs/releases)
- [Commits](https://github.com/mrhooray/crc-rs/compare/1.8.1...v1.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-25 09:40:17 -07:00
71ff269780 Add show-stake-history command to cli (#6541) 2019-10-25 12:20:08 -04:00
3879109e4c Display full blocktree error 2019-10-25 08:37:39 -07:00
f901d71202 Update 2019-10-25 07:51:12 -07:00
1738632822 Bump jsonrpc-pubsub from 14.0.1 to 14.0.3 (#6551)
Bumps [jsonrpc-pubsub](https://github.com/paritytech/jsonrpc) from 14.0.1 to 14.0.3.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-25 07:41:09 -07:00
bbd5dde66d Bump jsonrpc-derive from 14.0.1 to 14.0.3 (#6554)
Bumps [jsonrpc-derive](https://github.com/paritytech/jsonrpc) from 14.0.1 to 14.0.3.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v14.0.1...v14.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-25 07:41:03 -07:00
43c0103e4c Enforce machine type definition on GCE (#6555) 2019-10-25 08:10:25 -06:00
6eeca9c6f1 Make instruction data opaque to runtime (#6470) 2019-10-24 22:38:57 -07:00
28d3af6f35 Add "bounds" command to ledger-tool and fix broken funtionality (#6540) 2019-10-24 22:20:52 -07:00
7f3072d53a ignore test_fail_entry_verification_leader (#6537)
* Revert "Revert "Restore CUDA-based unit tests (#6518)""

This reverts commit 27f38a3770.

* ignore test_fail_entry_verification_leader
2019-10-24 21:16:17 -07:00
90461245f9 Reduce TdS fees to 1 lamport per sig, and slots_per_epoch/2 (#6542) 2019-10-24 20:37:23 -07:00
1c91c1e880 Remount /mnt/extra-disk on reboot 2019-10-24 20:14:26 -07:00
53c7be32b6 Add more retransmit and streamer stats (#6534) 2019-10-24 19:27:19 -07:00
397ea05aa7 spy nodes are now gossip entrypoints (#6532) 2019-10-24 15:35:33 -07:00
dadcb632d8 Specify machine type without necessarily enabling GPU (#6529)
* Specifiy machine type without necessarily enabling GPU

* Make long arg, extend --enable-gpu to automation

* Set machine types only in one place

* Fixup

* Fixup flag in automation

* Typo

* shellcheck
2019-10-24 15:12:25 -06:00
2de2fbd5e3 Remove stray setup_secondary_mounts 2019-10-24 13:48:57 -07:00
14eca5aea6 Remove setup_secondary_mount knowledge from multinode-demo/ (#6530) 2019-10-24 13:40:16 -07:00
27f38a3770 Revert "Restore CUDA-based unit tests (#6518)"
This reverts commit dc52b17c4d.
2019-10-24 11:34:53 -07:00
7a7abe692e Add mint keypair to solana clients for convenience (#6536) 2019-10-24 14:31:06 -04:00
f46a2cec3c owner and executable checks (#6526)
* owner_checks

* only system program may assign owner, and only if pre.owner is system

* moar coverage!

* moar coverage, allow re-assignment IFF data is zeroed
2019-10-24 11:06:00 -07:00
8e5e48dd92 Add get-rpc-url --all flag (#6533) 2019-10-24 10:44:05 -07:00
a2543e5a8d Upgrade RocksDB (#6496)
* Upgrade rocksdb

* Delete BatchProcessor

Those methods don't need to be `&mut self` and they're causing
compilation failures.
2019-10-24 11:30:53 -06:00
e9bdee3dc7 Add getEpochSchedule to rpc docs (#6535) 2019-10-24 11:30:11 -06:00
88033bccbb Add mint keypair to validators for convenience (#6531) 2019-10-24 12:50:32 -04:00
b4119c454a credit_only credits forwarding (#6509)
* credit_only_credits_forwarding

* whack transfer_now()

* fixup

* bench should retry the airdrop TX

* fixup

* try to make bench-exchange a bit more robust, informative
2019-10-23 22:01:22 -07:00
d398898c38 show-validators: display current/delinquent stake, and flag delinquent nodes (#6525) 2019-10-23 21:40:35 -07:00
39fc677781 Add 5 node GCE test cases (#6524)
* Add 5 node GCE test cases

* shell check
2019-10-23 22:05:05 -06:00
dc52b17c4d Restore CUDA-based unit tests (#6518) 2019-10-23 20:09:28 -07:00
ddefc96433 Limit deserialization of program inputs (#6522) 2019-10-23 19:56:07 -07:00
955d0ab76f Cleanup blocktree (#6508)
* Cut down on liberal use of borrow()

* No need to map_err(Into::into)

* Group From instances

* Remove Direction indirection

* Let rustfmt order imports

* Better copypasta

* Cleanup copypasta

* Add explicit lifetimes so that it doesn't get pegged to 'static when we upgrade rocksdb

* Remove redundant type aliases
2019-10-23 17:13:21 -06:00
f1172617cc Purge accounts with lamports=0 on rooted forks (#6315) 2019-10-23 12:46:48 -07:00
6ce115ec95 Add commitment metrics implementation to book (#5903)
* Add commitment metrics implementation to book
2019-10-23 12:35:47 -07:00
03d29a8311 Async poh verify (#6353)
* Async poh verify

* Up ticks_per_s to 160

GPU poh verify needs shorter poh sequences or it takes forever to
verify. Keep slot time the same at 400ms.

* Fix stats

* Don't halt on ticks

* Increase retries for local_cluster tests and make repairman test serial
2019-10-23 12:11:04 -07:00
35cc74ef25 Add GenesisBlock::OperatingMode to control how cluster features are activated (#6430) 2019-10-23 11:50:10 -07:00
35d6196384 Surface nvidia-smi errors in CI 2019-10-23 10:59:30 -07:00
01fe7c90a5 Do not break build on missing curl results (#6516) 2019-10-23 11:04:15 -06:00
26b8747014 Exit cleanly for idle clients 2019-10-23 09:56:05 -07:00
bedb05bdeb Plumb GEOLOCATION_API_KEY down to the blockexplorer (#6514) 2019-10-23 09:53:06 -07:00
6829b8a6fb Ensure solana commands are added to idle clients (#6513) 2019-10-23 11:15:00 -04:00
e462a7d1d5 net: Add ability to only start/stop client nodes (#6503)
* Add info --eval

* net: Add ability to start idle client nodes
2019-10-22 16:08:49 -07:00
4c515d0ef1 Sagar: Add ssh keys for colo (#6507) 2019-10-22 15:59:39 -07:00
7d650eff8d Match TPS stats to Grafana dashboard (#6506)
* Match TPS stats to Grafana dashboard

* Add label names
2019-10-22 16:27:26 -06:00
0b2d4f32fa feat: get epoch schedule rpc, update cli (#6500) 2019-10-22 16:41:18 -04:00
4f25013954 Explicitly define commit SHA (#6499) 2019-10-22 13:55:58 -06:00
5c7735c40f Increase drone airdrop request cap to 1_000_000 SOL (#6497) 2019-10-22 12:35:52 -07:00
e6438098e1 Increase archiver polling timeout (#6501)
automerge
2019-10-22 12:15:55 -07:00
45b2c138e5 Remove circular dependencies in blocktree (#6494)
* Delete dead code

* Flatten modules

* Break blocktree dependency cycle

* Move BloctreeError into blocktree_db

Fewer dependency cycles

* Inline column family names

Fewer circular dependencies

* Cleanup imports

* Fix build
2019-10-22 09:20:19 -06:00
75d68edfe7 Remove unused re-exports of database types and related dead code (#6490) 2019-10-22 06:36:42 -06:00
f80a5b8c34 Remove some TODOs (#6488)
* Remove stale TODOs

* Ban TODO markers from markdown

* Scrub all TODOs from ci/ and book/
2019-10-21 22:25:06 -07:00
1b1980ad49 Rename TEST_DURATION to TEST_DURATION_SECONDS (#6493) 2019-10-21 23:24:46 -04:00
3b9b9b1500 Rename remaining uses of fullnode to validator (#6476)
automerge
2019-10-21 20:21:21 -07:00
18feba2431 ADDITIONAL_FLAGS not handling multiple flags correctly (#6492)
* Fix ADDITIONAL_FLAGS parsing to handle multiple flags

* shellcheck
2019-10-21 23:17:41 -04:00
929a81e636 Beautify solana validator-info get output (#6483)
automerge
2019-10-21 17:10:22 -07:00
00809a67c0 Push perf test results to slack app (#6371)
* Add script to publish testnet results to slack

* Obscure webhook URL

* fixup

* Replace read with cat redirection

* Turn back on net restart

* Pick nits

* Make symlink before trying to delete its contents

* Display test config in slack and pick Trents nit not to maybe rm -rf /*

* Clean up results print

* Minor nits

* Turn the test settings back up to 11

* typo

* Shellcheck

* Just a few more fields

* fix payload formatting

* Del clear-config.sh

* Mount secondary

* Add commit SHA link and Grafana time range URL

* Add fancy buttons instead of text URLs

* Tighten up test config display

* Fixup display nits

* chellsheck

* Rebase and fix typo
2019-10-21 20:00:17 -04:00
d1b18a5060 archiver.rs -> multinode-demo/archiver.sh (#6487)
automerge
2019-10-21 16:46:04 -07:00
3fb70b8d47 Ban XXX, TBD, FIXME comments (#6486) 2019-10-21 16:43:11 -07:00
b38bf90de7 Deshred blocks in parallel (#6461)
* Deshred in parallel

* Add tests for corrupt slots and parallel deshred

* Rename load_blocktree_entries to load_blocktree_entries_with_shred_count
2019-10-21 16:15:10 -07:00
8319fa05d0 solana-cli: selectively require keypair (#6477)
* Make parse_command consistent

* Strip pubkey out of parse_stake_create_account

* Move validator-info args into module

* Strip pubkey out of parse_validator_info_command

* Strip pubkey out of parse_vote_create_account

* Strip pubkey out of balance parsing

* Strip pubkey out of parse pay

* Only verify keypair existence if command requires it

* Use struct instead of tuple
2019-10-21 17:08:09 -06:00
564c14a2c6 net.sh: Ensure external disk link is setup before cleaning config dir (#6481)
automerge
2019-10-21 15:38:58 -07:00
6996f45d54 Print machine hostname in log (#6480)
automerge
2019-10-21 14:59:03 -07:00
b1c2c6009e Exclude net/log in rsync script (#6475)
automerge
2019-10-21 14:06:36 -07:00
934f69b660 Colo verbosity (#6473)
automerge
2019-10-21 13:49:12 -07:00
84e911361a Use constants instead of lazy_static for shred header sizes (#6472) 2019-10-21 12:46:16 -07:00
364583ea5c Fix copying packets in Window Service (#6429)
* Fix copying packets in Window Service

* Parallelize over batches instead of within batches
2019-10-21 12:04:52 -07:00
951e1f8b48 feat: grant access to sunny@ (#6471) 2019-10-21 11:17:06 -07:00
9232057e95 Rename replicator to archiver (#6464)
* Rename replicator to archiver

* cargo fmt

* Fix grammar
2019-10-21 11:29:37 -06:00
6c79f56c2c Add --skip-ledger-verify arg 2019-10-21 10:22:40 -07:00
48eafcc74f Remove dead code in Rocks wrapper (#6469)
automerge
2019-10-21 10:18:54 -07:00
dec9272813 Skip ledger verification on restart to avoid timing out net/ (#6468)
automerge
2019-10-21 09:27:45 -07:00
eb3093d43e Beautify show-account output (#6467)
automerge
2019-10-21 08:48:21 -07:00
09abbd93b1 Cleanup register_tick special handling (#6462) 2019-10-21 10:51:02 -04:00
91920cc390 Bump jsonrpc-pubsub from 14.0.0 to 14.0.1 (#6465)
Bumps [jsonrpc-pubsub](https://github.com/paritytech/jsonrpc) from 14.0.0 to 14.0.1.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v14.0.0...v14.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-21 07:48:28 -07:00
cc1cc7be94 Bump jsonrpc-derive from 14.0.0 to 14.0.1 (#6466)
Bumps [jsonrpc-derive](https://github.com/paritytech/jsonrpc) from 14.0.0 to 14.0.1.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v14.0.0...v14.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-21 07:48:14 -07:00
2636418659 Move blocktree_processor to solana_ledger (#6460)
* Drop core::result dependency in bank_forks

* Move blocktree_processor into solana_ledger
2019-10-20 09:54:38 -06:00
31e9074ae5 Rename leader_after_slots to leader_after_n_slots (#6459) 2019-10-19 23:28:33 -04:00
e2c316d2d0 system_instruction_processor updates (#6448)
* zero lamport account creation

* whack create_user_account, take 2

* target->to

* ..

* ..

* update chacha golden

* update chacha golden

* ..

* ..
2019-10-19 18:23:27 -07:00
74ee88d9bc Add storage stage and bank_forks tests to integration (#6458) 2019-10-19 12:09:45 -07:00
f52c813fc2 Setup each bench-tps account with 1 SOL by default (#6457) 2019-10-19 07:57:57 -07:00
badeb4d31a Rework shred headers to fix position of signature (#6451)
* Rework shred headers to fix position of signature

* fix clippy
2019-10-18 22:55:59 -07:00
e59af8269e Add increment docs infra to increment-cargo-version (#6456) 2019-10-18 20:53:45 -07:00
785c2574cd Check that transaction fee-payer is a debitable account (#6454)
automerge
2019-10-18 20:39:05 -07:00
1a77f7ce3b Change to 0x7f which is a valid short_vec len (#6455)
automerge
2019-10-18 19:56:48 -07:00
6e7dccbbfb Add an error enum to snapshot_utils (#6453) 2019-10-18 19:16:06 -06:00
32bfced6a4 Add offset checks for sigverify (#6452)
* Add offset checks for sigverify

* decode_len returning error instead of unwrap
2019-10-18 17:52:59 -07:00
985f5c7351 Use serde-bytes to serialize u8 efficiently (#6442)
automerge
2019-10-18 17:18:06 -07:00
621c67a8cb Adjust default cluster signature fees (#6436) 2019-10-18 17:00:51 -07:00
f2fd53e773 coverage over multiple packages (#6420) 2019-10-18 16:23:34 -07:00
0fc3c7eee2 Bump Trent's keys... (#6445)
automerge
2019-10-18 15:42:50 -07:00
e81ba8e79f Split snapshot_package module (#6447)
automerge
2019-10-18 14:58:16 -07:00
35461df92d Adjust crate-features to prevent rebuilds (#6444)
automerge
2019-10-18 13:52:05 -07:00
a19ffb353d Don't hide serialization errors (#6443)
automerge
2019-10-18 13:35:05 -07:00
35ed432d1a Make benchmark useful (#6440)
function is verify_hash_internal_state
2019-10-18 12:59:47 -07:00
8c29700402 Remove the DbCursor struct (#6441) 2019-10-18 13:11:59 -06:00
171c0d5421 Bump jsonrpc-core from 14.0.0 to 14.0.1 (#6439)
Bumps [jsonrpc-core](https://github.com/paritytech/jsonrpc) from 14.0.0 to 14.0.1.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 11:17:25 -07:00
c01bc4afbd Bump jsonrpc-http-server from 14.0.0 to 14.0.1 (#6437)
Bumps [jsonrpc-http-server](https://github.com/paritytech/jsonrpc) from 14.0.0 to 14.0.1.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 11:04:30 -07:00
c404008743 Bump jsonrpc-ws-server from 14.0.0 to 14.0.1 (#6438)
Bumps [jsonrpc-ws-server](https://github.com/paritytech/jsonrpc) from 14.0.0 to 14.0.1.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 11:03:58 -07:00
193c9a08e0 Reject TXs when there is a mismatch (#6236)
automerge
2019-10-18 09:48:35 -07:00
5468be2ef9 Add solana-ledger crate (#6415)
automerge
2019-10-18 09:28:51 -07:00
6f58bdfcb1 Remove validator sanity check (#6435)
automerge
2019-10-18 08:26:08 -07:00
9cf9de6044 Remove the Cursor struct (#6426) 2019-10-18 09:18:36 -06:00
a48dcb1421 Add "Subject to change" for legal purposes. (#6432) 2019-10-18 08:06:46 -07:00
51dad397ed Bump libc from 0.2.64 to 0.2.65
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.64 to 0.2.65.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.64...0.2.65)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 08:05:49 -07:00
27c0d30a07 Fix logging (#6417) 2019-10-18 02:06:41 -07:00
6c33c3a5ba Update shred tests to use specific error codes (#6428)
automerge
2019-10-17 22:50:38 -07:00
e6198debd6 Remove unused set_thread_count() (#6424)
automerge
2019-10-17 20:55:05 -07:00
298ba34c3c Add flag to mark a packet as discarded (#6427) 2019-10-17 16:26:29 -07:00
52b5edcb8f Bump cc from 1.0.45 to 1.0.46
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.45 to 1.0.46.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.45...1.0.46)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-17 16:16:46 -07:00
c73e8d9a82 Bump env_logger from 0.7.0 to 0.7.1
Bumps [env_logger](https://github.com/sebasmagri/env_logger) from 0.7.0 to 0.7.1.
- [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/compare/v0.7.0...v0.7.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-17 16:16:40 -07:00
842eaf90df Exclude bench-exchange from coverage report 2019-10-17 16:03:49 -07:00
24846b7b61 Don't use BlocktreeError from Shredder (#6423)
automerge
2019-10-17 15:44:15 -07:00
326a4282bb Compute max blockhash age accounting for slot duration (#6421)
* Compute max blockhash age accounting for slot duration

* Update comment for the constant
2019-10-17 15:21:05 -07:00
854c62e208 Reduce kernel networking buffer for rmem and wmem (#6422)
automerge
2019-10-17 14:52:24 -07:00
1759968c1e Colo: Put NVMe disks to use (#6357)
automerge
2019-10-17 14:44:45 -07:00
9e52d11ad0 Remove Backend trait (#6407) 2019-10-17 15:19:27 -06:00
d865f1f0c5 Add vest program to genesis 2019-10-17 14:07:09 -07:00
2747c9db23 Fix metrics dashboard layout (#6419) 2019-10-17 13:39:50 -07:00
bfc67e8680 gzip -f 2019-10-17 13:08:51 -07:00
d3068c3918 Remove circular dependencies in core (#6408)
* Remove core::result dependency from blocktree

* Remove core::result dependency from shred

* Move Packet from core::packet to sdk::packet

This way we don't need to split perf_libs yet.

* Disable packet when compiling BPF programs
2019-10-17 11:37:30 -06:00
a931ad40c8 Remove unused code in entry (#6414)
automerge
2019-10-17 09:59:40 -07:00
b4ed88e0f7 Fail faster on boot up (#6412) 2019-10-17 12:26:12 -04:00
b7b71b31d3 Magically improve coverage (#6345)
automerge
2019-10-16 16:53:07 -07:00
83c1831a01 Fix replay stage test (#6406) 2019-10-16 15:41:43 -07:00
b85996494b BPF script nits (#6405) 2019-10-16 15:35:16 -07:00
26d31b68d7 Update Rust-BPF to v0.1.8 (#6404) 2019-10-16 15:08:29 -07:00
8740bb42c0 Close down banking stage in banking_bench (#6401)
Maybe fixes pthread crash?
2019-10-16 14:45:05 -07:00
ccb4e32ee0 ReplayStage metrics (#6358)
* ReplayStage metrics

* Add more metrics

* Refactor get_slot_entries_with_shred_count() to detect wasted work

* Update dashboard

* Update broadcast slots to micros

* Add broadcast dashboard
2019-10-16 14:32:18 -07:00
2d351d3952 Prevent ping stats header from confusing buildkite log folding 2019-10-16 13:36:16 -07:00
7ae5ff838b Revert "collect rent from accounts (take:2) (#6360)" (#6400)
This reverts commit c1b401a04a.
2019-10-16 13:31:21 -07:00
605b477e06 Permit finding more nodes than expected (./gce.sh config) 2019-10-16 13:21:00 -07:00
7e6e7e8406 Remove special handling of first ledger tick (#6263)
* Remove special handling of first ledger tick

* Fix subtraction overflow

* @garious feedback

* Back to height

* More tick_height name changes

* Fix off-by-one

* Fix leader tick error

* Fix merge conflict

* Fix recently added test
2019-10-16 15:53:11 -04:00
e267dfacdd Stabilize some banking stage tests (#6251)
* Stabilize some banking stage tests

Fixes #5660

* Fix CI...

* clean up

* Fix ci

* Address review nits

* Use bank.max_tick_height due to off-by-one for no PohRecord's clearing bank

* Fix CI...

* Use bank.max_tick_height() instead for clarity
2019-10-16 12:37:27 -07:00
f4c5da3c72 Fix unaligned read of short_vec pubkey_size in sigverify (#6388)
automerge
2019-10-16 11:09:17 -07:00
a258e1e0b3 Fix flaky test_recv_mmsg_batch_size (#6399)
automerge
2019-10-16 11:01:41 -07:00
1fd84cb52b Enforce only system program can allocate accounts (#6386) 2019-10-16 10:47:45 -07:00
8dd24bc7d9 Put dedicated arg in the right place 2019-10-16 10:36:29 -07:00
b7af5f08d6 Avoid more non-standard ping. macOS 💔 2019-10-16 10:35:41 -07:00
781dfd9dc4 Drop non-standard ping -o option 2019-10-16 10:05:46 -07:00
f6b48b0a67 Bump libc from 0.2.62 to 0.2.64
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.62 to 0.2.64.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.62...0.2.64)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-16 10:03:06 -07:00
ee099b0880 Delete ref annotations (#6394)
automerge
2019-10-16 09:27:49 -07:00
51ac05b3cf Request dedicated instances 2019-10-16 08:10:31 -07:00
9267931ef6 Add support for preemptible GCP instances 2019-10-16 08:10:31 -07:00
60141e0c2c Bump ws from 0.9.0 to 0.9.1
Bumps [ws](https://github.com/housleyjk/ws-rs) from 0.9.0 to 0.9.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.9.0...v0.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-16 07:58:53 -07:00
609d6cdf61 Enforce move loader program account size (#6385)
automerge
2019-10-15 23:42:59 -07:00
a3ccbe02d0 Create genesis with the requested amount (#6384) 2019-10-15 22:40:31 -07:00
996c8cf2eb Don't add bogus native loader if loader account already exists (#6377)
* Don't add bogus native loader account if it already exists

* Add assert for native loader account owner
2019-10-16 00:33:15 -04:00
528d0b6af8 Update bench tps default configuration (#6372)
* Update bench tps default configuration

* Allow local clients to run unhinged
2019-10-15 20:53:37 -07:00
33052c1dd2 Cleanup shred header structures (#6378)
automerge
2019-10-15 20:48:45 -07:00
c1b401a04a collect rent from accounts (take:2) (#6360)
* collect rent from credit debit accounts

* collect rent from credit only account

* rent_collector now can deduct partial rent + no mem copy + improved design

* adding a test to test credit only rent

* add bank level test for rent deduction

* add test to check if hash value changes or not

* adding test scenario for lamport circulation
2019-10-16 07:45:47 +05:30
78d5c1de9a Move loader enforces account size (#6379)
* Move loader enforces account size

* Fix librapay test
2019-10-15 18:30:45 -07:00
2ee05f1234 Fix move testing (#6374) 2019-10-15 15:58:49 -07:00
20e800230f Don't deserialize coding header for data shreds (#6367)
* Don't deserialize coding hdr for data shreds

* review comments

* fix tests
2019-10-15 15:18:23 -07:00
37a29b979f --force 2019-10-15 15:12:25 -07:00
1afc527919 Lower cluster_info-num_nodes datapoint (#6368) 2019-10-15 14:42:19 -07:00
d89174ee82 Default to no client nodes to avoid unnecesary cost 2019-10-15 14:37:52 -07:00
f6255c2f9e Fix blind keyed accounts indexing in Config program (#6369) 2019-10-15 14:35:42 -06:00
ae41c88eb2 Boot the Builder pattern from GenesisBlock (#6364) 2019-10-15 13:52:44 -06:00
41067de5e4 multiple deactivation (#6354) 2019-10-15 12:50:31 -07:00
dfca2b510b Lower shred/receiver stats (#6365)
too many messages
2019-10-15 11:43:52 -07:00
8bc9d8988f - 2019-10-15 07:58:40 -07:00
f7279804b4 Ensure solana-cli has a keypair 2019-10-15 07:47:45 -07:00
47e1ea107b Add show-validators 2019-10-14 23:04:31 -07:00
799d6aeb19 Update cluster_query.rs 2019-10-14 23:00:13 -07:00
f8ccd90eeb Add ForkConfidenceCache methods (#6359)
automerge
2019-10-14 22:14:20 -07:00
169b772398 Show validators during net sanity 2019-10-14 20:38:51 -07:00
d2e28b0f7e Add show-validators command 2019-10-14 20:38:51 -07:00
88bb55ffd2 Add get_vote_accounts() to RPC client 2019-10-14 20:38:51 -07:00
5508ac6272 Add root slot to getVoteAccounts 2019-10-14 20:38:51 -07:00
2be03ca631 Bump reqwest from 0.9.21 to 0.9.22
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.21 to 0.9.22.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/v0.9.22/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.21...v0.9.22)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-14 16:33:16 -07:00
9803f167bd Revert "collect rent from the accounts (#6181)" (#6356)
automerge
2019-10-14 16:16:44 -07:00
6a161c740d Stop activating stake after deactivation (#6351) 2019-10-14 18:40:24 -04:00
5d99853502 Add getBlockConfidence rpc endpoint (#6350)
automerge
2019-10-14 15:24:10 -07:00
c2ebf466fd reestablish parameter semantics for withdraw (#6330) 2019-10-14 15:02:24 -07:00
3313b2ff58 Fetch stage batching of forwarded txs (#6349)
automerge
2019-10-14 13:32:29 -07:00
e210e76bd5 collect rent from the accounts (#6181)
* collect rent from credit-debit account

* collect rent from credit only account

* improved design for rent collection

* only process if collected rent is non zero

* rent_collector now can deduct partial rent + no mem copy

* adding a test to test credit only rent

* add bank level test for rent deduction

* add test to check if hash value changes or not

* adding test scenario for lamport circulation

* combining rent debtors into credit only locks
2019-10-15 02:00:29 +05:30
b75438ff32 gce.sh: Unwind allocation upon failure (#6343)
automerge
2019-10-14 09:36:20 -07:00
82fea9ce73 net.sh: Add support for selecting validator GPU mode (#6326)
automerge
2019-10-14 09:33:32 -07:00
79e32c92c1 Skip deploy attempt on sanity failure 2019-10-12 22:18:41 -07:00
322fcea6e5 More fullnode to validator renaming (#6337) 2019-10-11 13:30:52 -06:00
5650231df3 Increase buffer size for erasure meta DB column (#6335) 2019-10-11 12:18:11 -07:00
78b2e4df9f Revert "Revert "Bump jsonrpc-core from 13.2.0 to 14.0.0 (#6287)" (#6328)" (#6336)
This reverts commit 578aa439be.
2019-10-11 13:19:13 -04:00
bf9c815b9e Increase Index column buffers (#6268) 2019-10-10 23:17:39 -07:00
798065fc71 Better Vest code coverage (#6329)
automerge
2019-10-10 21:35:10 -07:00
578aa439be Revert "Bump jsonrpc-core from 13.2.0 to 14.0.0 (#6287)" (#6328)
This reverts commit c2761a1259.
2019-10-11 00:32:06 -04:00
364781366a Use sendmmsg for broadcasting shreds (#6325)
* Replace packet with slice of data in sendmmsg

* fixes

* fix bench
2019-10-10 19:38:48 -07:00
fa64a0b367 gce.sh: Be strict about fullnode count w/o --allow-boot-failures (#6321)
automerge
2019-10-10 17:13:59 -07:00
ba46bc4624 Fix system program blind derefs (#6317)
automerge
2019-10-10 16:43:49 -07:00
c6e4641781 Remove many uses of legacy term 'fullnode' (#6324) 2019-10-10 17:33:00 -06:00
9cde67086f solana-keygen - Poor mans keypair encryption (#6259)
* SDK: Refactor (read|write)_keypair

Split file opening and data writing operations
Drop filename == "-" stdio signal. It is an app-level feature

* keygen: Move all non-key printing to stderr

* keygen: Adapt to SDK refactor

* keygen: Factor keypair output out to a helper function
2019-10-10 17:01:03 -06:00
f8b36f4658 smaller fix for system_instruction_processor's blind indexing (#6322)
automerge
2019-10-10 15:43:32 -07:00
753bd77b41 Use multicast to send retransmit packets (#6319) 2019-10-10 15:02:36 -07:00
a9276700ea Stake program: reorder withdraw keys to allow to == authorized withdrawer (#6314)
automerge
2019-10-10 14:46:38 -07:00
1960ea8ed7 Add benches for shredding and poh (#6307)
* Add benches for shredding and poh

* ignore poh bench

* Factor out Poh bench as separate function
2019-10-10 14:00:24 -07:00
1b775044f7 Use multiple retransmit stage threads/sockets (#6279) 2019-10-10 13:24:03 -07:00
570b98c7bc Multicast same packet to multiple destinations via sendmmg (#6316)
* Implement multicast same packet to multiple destinations using sendmmsg()
2019-10-10 13:09:15 -07:00
81fb9e6a59 gce.sh: Rename -f flag to better reflect usage (#6318)
automerge
2019-10-10 12:57:03 -07:00
c2761a1259 Bump jsonrpc-core from 13.2.0 to 14.0.0 (#6287)
* Bump jsonrpc-core from 13.2.0 to 14.0.0

Bumps [jsonrpc-core](https://github.com/paritytech/jsonrpc) from 13.2.0 to 14.0.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v13.2.0...v14.0.0)

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

* Bump all jsonrpc versions
2019-10-10 10:32:38 -06:00
0f7bf28617 Allow Vest to set terminator (#6313)
* Use transport::Result instead of TransportError

* Split payer and terminator

* Add SetTerminator instruction
2019-10-10 10:25:23 -06:00
60e8cf5a47 Implement nightly performance tests (#6140)
* Implement nightly performance tests on colo
2019-10-10 11:12:13 -04:00
10cf728e11 More object-oriented version of Vest (#6310) 2019-10-10 08:54:18 -06:00
eca56eb87d Add next_keyed_account() to instruction_processor_utils (#6309)
* Cleanup KeyedArguments traversal

* Better error message

* Fix clippy warning

* Rename next_arg to next_keyed_account

* Fix clippy warning

* Shorter
2019-10-10 06:30:42 -06:00
54d0168746 BPF call trace script (#6311)
automerge
2019-10-10 01:10:47 -07:00
e58e48e919 make sysvar creation a bit more foolproof (#6294) 2019-10-09 23:22:33 -07:00
1f345ce2d9 Don't grab keypair from cluster info on every iteration of broadccast (#6303) 2019-10-09 17:36:45 -07:00
ed85aa43a4 Implement sendmmsg() API (#6304)
* Implement sendmmsg()

* fixes
2019-10-09 17:06:56 -07:00
33e34cbba9 Plug potential panic in Vest (#6302)
automerge
2019-10-09 16:27:49 -07:00
4b0250192a Remove remnants of the cuda feature flag (#6298)
automerge
2019-10-09 16:09:36 -07:00
dd66d16fdb Broadcast final shred for slots that are interrupted (#6269)
* Broadcast final shred for slots that are interrupted
2019-10-09 16:07:18 -07:00
de82e60c64 Fix unrealistic hash rate expectations in genesis (#6295) 2019-10-09 15:47:48 -07:00
72d227ae91 Bench-tps: swap consts (#6296) 2019-10-09 16:31:30 -06:00
4713cb8675 Colo: Prefer public IPs, part 2 (#6297)
automerge
2019-10-09 15:17:24 -07:00
fdaee4ab17 Colo: Add running process cleanup to delete logic (#6281) 2019-10-09 15:49:33 -06:00
32312f3c16 Do not retransmit Repair responses (#6284)
* Do not retransmit Repair responses

* Add a test

* Refactor neighboring functionality
2019-10-09 13:11:19 -07:00
95d15dc720 Add jstarry to authorized keys (#6293) 2019-10-09 15:04:44 -04:00
2db83e1a21 Remove greedy fetch in shred_fetch stage (#6278)
* Remove greedy fetch in shred_fetch stage

* cleanup
2019-10-09 10:36:05 -07:00
cfbfcb5734 Bump dir-diff from 0.3.1 to 0.3.2 (#6265)
Bumps [dir-diff](https://github.com/steveklabnik/dir-diff) from 0.3.1 to 0.3.2.
- [Release notes](https://github.com/steveklabnik/dir-diff/releases)
- [Changelog](https://github.com/assert-rs/dir-diff/blob/master/CHANGELOG.md)
- [Commits](https://github.com/steveklabnik/dir-diff/compare/v0.3.1...v0.3.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-09 11:12:15 -06:00
c28633a949 Fix book SVGs (#6286) 2019-10-09 10:48:47 -04:00
7cf90766a3 add epoch_schedule sysvar (#6256)
* add epoch_schedule sysvar

* book sheesh!
2019-10-08 22:34:26 -07:00
f2ee01ace3 Fix blocktree processor entry callback test (#6285) 2019-10-08 20:38:05 -04:00
9fbbb17c3b GitBook: [master] 17 pages and 65 assets modified 2019-10-08 23:35:34 +00:00
5e31565574 Expand blocktree processor options (#6248)
* Refactor blocktree processor args and support full leader cache

* Add entry callback option

* Rename num_threads to override_num_threads

* Add test for entry callback

* Refactor cached leader schedule changes

* Add tests for blocktree process options

* Refactor test

* @mvines feedback
2019-10-08 17:58:49 -04:00
723f9a9b81 Remove unnecessary locking in retransmit stage (#6276)
* Add more detailed metrics to retransmit

* Remove unnecessary locking and add more metrics
2019-10-08 14:41:16 -07:00
baf4e767e1 Increase number of transaction send retries. (#6273) 2019-10-08 13:04:27 -07:00
c5e5342325 Rearrange broadcast stats (#6274) 2019-10-08 12:50:59 -07:00
6123d2f9e8 Add print to bench-tps about blockhash time (#6272) 2019-10-08 11:34:10 -07:00
788296047a Increase batch size for recvmmsg() (#6260)
* Increase batch size for recvmmsg()

* fix tests

* new test
2019-10-08 09:54:49 -07:00
9dceb8ac74 Broadcast/Shredding Metrics (#6270)
automerge
2019-10-08 01:42:42 -07:00
ac2374e9a1 Shred entries in parallel (#6180)
* Make shredding more parallel

* Fix erasure tests

* Fix replicator test

* Remove UnfinishedSlotInfo
2019-10-08 00:42:51 -07:00
667f9e0d79 Colo: Factor out inlined scripts to own files (#6266)
automerge
2019-10-07 22:05:36 -07:00
57916f8be6 Colo: Prefer public IPs (#6264)
automerge
2019-10-07 20:44:57 -07:00
e12c577b16 remove verify_hash_internal_state (#6261) 2019-10-07 16:38:54 -07:00
ba7efbb136 Retransmit stage optimization, don't copy packets (#6250) 2019-10-07 15:33:22 -07:00
79987e788e Remove vote pubkey from deactivate_stake (#6257)
* Remove vote pubkey from deactivate_stake

* Fix test

* Update docs
2019-10-07 16:07:01 -06:00
4a071b06bd Remove deprecated script (#6258) 2019-10-07 14:14:55 -06:00
17f169f446 BlobFetchStage cleanup post shred work (#6254) 2019-10-07 11:08:01 -07:00
6662986169 Fix vest_api output filename (#6253)
automerge
2019-10-07 10:31:04 -07:00
1c86160e16 Reorder parameters (#6252)
automerge
2019-10-07 09:42:56 -07:00
c34cc4918f Prevent repeated accounts in genesis to avoid breaking account hashing 2019-10-07 08:12:18 +09:00
4870a2cbac Panic when a snapshot fails to verify 2019-10-07 08:12:18 +09:00
da7d94d0f0 Retransmit stage benchmark (#6249) 2019-10-06 12:56:17 -07:00
cdef065cca Broadcast Metrics (#6166)
* Add timing logigng to broadcast

* Shred metrics

* Fixes
2019-10-05 22:51:47 -07:00
e6676b4d4d Cli refactor: move cluster query-related functionalities (#6244)
* Reorder and label parse_command's giant match

* Move cluster query processing into separate module

* Reorder and label process_command match
2019-10-04 19:54:09 -07:00
896351e0e8 Bump serde_yaml from 0.8.9 to 0.8.11 (#6246)
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.8.9 to 0.8.11.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.8.9...0.8.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-04 19:33:45 -06:00
fb39bd45d7 Revert "Rename solana-runtime to sealevel (#6239)" (#6247)
This reverts commit 2e921437cd.
2019-10-04 19:33:29 -06:00
5ef012b2c1 Tweak debug to remove unreadable datapoints (#6060) 2019-10-04 16:25:22 -07:00
9c9754fa0f Cli refactor: rename wallet to cli (#6243)
* Rename Wallet structs to Cli

* Rename wallet to cli more broadly

* Update to cli/config.yml, and update docs
2019-10-04 16:13:21 -06:00
2e921437cd Rename solana-runtime to sealevel (#6239)
automerge
2019-10-04 15:02:44 -07:00
5617162cb6 Add Vest program (#5987)
automerge
2019-10-04 14:43:50 -07:00
0c3ff6b75c Cli refactor: vote and storage program functionalities (#6242)
automerge
2019-10-04 14:18:19 -07:00
7f53737000 Periodically pull from the entrypoint if it's no longer in Crdt (#6240) 2019-10-04 14:18:07 -07:00
23ea8ae56b Optimize retransmit stage (#6231)
* Optimize retransmit stage

* Remove comment

* Fix test

* Skip iteration to fixup 0 stakes
2019-10-04 11:52:02 -07:00
b5f7a4bff9 Add Bankless Leader design (#6224)
* bankless leader proposal

* docs

* mvines feedback

* clarify CD status of the execution key

* s/execution key/fee account

* remove weird spacing

* robs review comments

* document how base fork is reset

* frozen bank, not finalized

* nit

* add rationale
2019-10-04 11:13:46 -07:00
18653b825b Preserve previous fullnode log file on restart 2019-10-04 07:58:33 -07:00
aa3694cca8 Bench tps: improve fund_keys (#6225)
automerge
2019-10-04 01:16:07 -07:00
844d231d74 Add default-run key for dev convenience (#6235)
automerge
2019-10-03 21:59:37 -07:00
d759a447be Bump serde_json from 1.0.40 to 1.0.41 (#6226)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.40 to 1.0.41.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.40...v1.0.41)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-03 21:03:05 -06:00
ffae4662bc Use AtomicU64 now that it's stabilized (#6222) 2019-10-03 20:02:28 -07:00
a05d772aa9 Add colo access pubkey (#6232)
* Add colo access pubkey

* Change the key to ed25519
2019-10-03 19:55:39 -07:00
cf3bbc09b6 Jump to nightly-2019-10-03 (#6233)
* Reduce what gets build for coverage to avoid OoM with nightly 2019-10-03

* Update nightly to 2019-10-03
2019-10-03 20:05:44 -06:00
d25576f8ef clippy (#6230) 2019-10-03 19:36:54 -06:00
4b42fa2d75 Ensure all builds are triggered on a rust upgrade (#6229) 2019-10-03 16:31:50 -07:00
c1c7e0ff08 Remove reduntant semicolon 2019-10-03 16:25:00 -07:00
1d503faa2c clippy 2019-10-03 16:14:28 -07:00
18c0f76f89 clippy 2019-10-03 15:59:37 -07:00
4d458a5e00 Keep the build green when there's nowhere to publish 2019-10-03 14:55:04 -07:00
92ea11fca1 make executable, vote and stake account rent exempt (#6017)
* add missing convenience method

* require vote account to be exempt

* make stake account rent exempt

* making executable rent exempt

* rent will be initialized in genesis

* add test for update_rent
2019-10-04 02:52:48 +05:30
cf2bcee607 Increase testnets to 4 validator nodes to avoid the need for 100% consensus 2019-10-03 09:53:31 -07:00
db7a3ac826 Revert "GitBook: [master] 12 pages and 33 assets modified"
This reverts commit f792171ae9.
2019-10-02 23:53:20 -07:00
f792171ae9 GitBook: [master] 12 pages and 33 assets modified 2019-10-03 06:41:01 +00:00
81550e609b Assume stable is already installed 2019-10-02 23:35:10 -07:00
c28d0d7c34 Avoid TRAVIS_RUST_VERSION check 2019-10-02 23:28:40 -07:00
6cb0790796 Fix crate metadata 2019-10-02 23:20:19 -07:00
c2961617bd Add description tag 2019-10-02 23:13:19 -07:00
08e59b4a3c Add description tag 2019-10-02 22:59:58 -07:00
7ac4ce637f Bump reqwest from 0.9.20 to 0.9.21 (#6221)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.20 to 0.9.21.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/v0.9.21/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.20...v0.9.21)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-02 22:52:48 -07:00
586e0a67ef Suppress nighly safety_doc warning 2019-10-02 22:51:14 -07:00
5aab2866e1 Rebuild SVGs 2019-10-02 22:51:14 -07:00
a20f12865a Upgrade to rust 1.38 2019-10-02 22:51:14 -07:00
0bf1a24bf5 Enable patch branches 2019-10-02 22:45:02 -07:00
f9f5bc2eb5 More clippy 2019-10-02 21:21:07 -07:00
9fe8c98047 Switch to solana-reed-solomon-erasure temporarily to fix windows build (#6211) 2019-10-02 19:01:55 -07:00
13fc518268 Clippy work towards rust 1.38 (#6219) 2019-10-02 18:04:18 -07:00
c06876eb3d Fix date formatting to work on Mac OS (#6214) 2019-10-02 14:44:52 -07:00
f331f1d1e9 Don't forward transaction to self (#6218) 2019-10-02 14:07:34 -07:00
054deb809b Remove token program (#6217) 2019-10-02 14:07:23 -07:00
865ddfc63f fix clippy (#6215) 2019-10-02 13:51:54 -07:00
315940b6a9 Bump BPF instruction cap (#6213) 2019-10-02 10:07:44 -07:00
211cae5811 Remove dead constants (#6207) 2019-10-01 18:22:57 -07:00
2c6599c73b Bench-tps: flush tx queue when too old (#6201)
* Flush transaction VecDeque  when hit old transactions

* Fixup too-old threshold
2019-10-01 15:43:36 -06:00
58139ce5ae Add buildkite-agent key for colo access (#6205) 2019-10-01 13:24:04 -07:00
8e888059d8 Use built-in solana-gossip timeout for better error messages (#6189) 2019-10-01 12:30:11 -07:00
8d0236e3f1 Rename bank height to block_height and expose method (#6199)
* Rename bank bank_height to block_height

* Expose block_height method
2019-10-01 14:55:39 -04:00
774e9df2e5 Finish unfininished slot before processing new slots (#6197) 2019-10-01 11:46:14 -07:00
faae122375 Remove bogus wait 2019-10-01 11:08:52 -07:00
a6363e56b6 Add native_token module to sdk (#6192) 2019-10-01 13:53:28 -04:00
214c041bf7 cli code review (#6183) 2019-10-01 10:34:45 -07:00
ae7700296d broadcast_shreds opt (#6175)
* Don't clone/copy/sort ContactInfo vec
2019-10-01 09:38:29 -07:00
f09183765c Output timestamp to console for better logs 2019-10-01 09:17:47 -07:00
2f92b92a8a Expose current stake accounts of a bank for use in cli tooling (#6184) 2019-09-30 21:57:49 -04:00
fee97236bf Create vote account with at least 1 lamport (#6188) 2019-09-30 17:07:44 -06:00
520f7c3e18 Optimize BPF logs (#6186) 2019-09-30 14:21:29 -07:00
97752b4937 Fixup create-stake-account command (#6187)
automerge
2019-09-30 14:17:49 -07:00
2c8c2029d8 cli: enforce rent-exemption balance for stake, vote and program accounts in cli (#6118)
* require minimum balance for stake, vote and program accounts
2019-10-01 01:14:49 +05:30
4fbe36d9c6 Update stake-delegation-and-rewards.md (#6182)
* Update stake-delegation-and-rewards.md

* Update stake-delegation-and-rewards.md

* Update stake-delegation-and-rewards.md
2019-09-30 12:30:55 -07:00
4f4618441c split wallet staking commands (#6168)
* split wallet staking commands

* elide real home

* unit->UNIT for usage

* unit->UNIT, don't try to run SUBCOMMANDS: ;)

* more fixup

* fixups

* actually check

* shellcheck

* preserve #6158 after rebase

* fixup

* test

* too hard

* remove test
2019-09-29 21:18:15 -07:00
e5a7d08966 Add --expected-genesis-blockhash validator argument (#6174)
automerge
2019-09-29 19:09:24 -07:00
11fc684f3c Clear download progress bar to avoid flicker during archive extraction (#6162) 2019-09-29 17:56:33 -07:00
d50aef8404 Add get-epoch-info command (#6161)
automerge
2019-09-27 22:00:30 -07:00
5637f88aff Don't try signging coding shred if fec rate is 0 (#6171)
automerge
2019-09-27 21:58:53 -07:00
f14bc0bb59 Bump num-derive from 0.2.5 to 0.3.0 (#6165)
Bumps [num-derive](https://github.com/rust-num/num-derive) from 0.2.5 to 0.3.0.
- [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.5...num-derive-0.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-27 20:20:57 -06:00
c50d2a6311 Update solana_rbpf to v0.1.18 (#6170)
* Update solana_rbpf to v0.1.18

* lock
2019-09-27 19:17:12 -07:00
284273a73f Cleanly error when trying to delegate-stake an existing stake account (#6158) 2019-09-27 14:35:49 -07:00
4c5d0fc51f Validator-info doc update (#6152) 2019-09-27 13:26:02 -07:00
75a92d58cb Featureize move (#5897)
* Featureize move

* Add move featured test
2019-09-27 12:19:06 -07:00
db18611c86 Add ability to manually create a db (#6151) 2019-09-27 12:03:20 -07:00
bf199a2ebc doc: update validator-info publish arguments (#6146) 2019-09-27 11:15:38 -07:00
db05864a69 Add ssh key check (#6149) 2019-09-27 10:55:51 -07:00
f97d33e3a7 Add sakridge pubkey (#6142) 2019-09-27 10:55:38 -07:00
16e3ba86d5 get_new_blockhash() now retries longer (5s instead of 2s) (#6143) 2019-09-27 10:36:38 -07:00
cc05019bbb Create vote account with 1 lamport instead of 1 SOL 2019-09-27 08:14:10 -07:00
f57e48a209 Avoid storing epoch 0 credits if no credits where earned in epoch 0 (#6132) 2019-09-26 20:57:35 -07:00
7c964cf79f Add specific hardware setup to performance metrics doc. (#6131) 2019-09-26 18:59:41 -07:00
c9e58743e7 Prevent subtract overflow panic when slot < MAX_LOCKOUT_HISTORY (#6135) 2019-09-26 19:40:18 -06:00
a09cf1470a Remove libstd statics to eliminate .bss (#6134)
automerge
2019-09-26 17:38:08 -07:00
57dc46fcfe staking rewards reinvestment (#6129) 2019-09-26 15:57:18 -07:00
06b445ac07 Skip if --custom-cpu is used as well. (#6130) 2019-09-26 15:52:03 -07:00
b4da83a3ab Remove CUDA feature (#6094) 2019-09-26 13:36:51 -07:00
a964570b1a add authorities to stake init (#6104)
* add authorities to stake init

* fixups

* code review
2019-09-26 13:29:29 -07:00
50bbe34b66 rename locktower to tower (#6120) 2019-09-26 13:29:05 -07:00
c10b2e6cc0 Cleanup Rust BPF sysroot (#6124) 2019-09-26 13:27:33 -07:00
c4ed80d544 colo-utils: Disable StrictHostKeyChecking for SSH calls (#6117)
automerge
2019-09-26 11:22:07 -07:00
67d07254c2 Add rent estimation rpc (#6109)
* server side new rpc endpoint

* client side rpc

* take data_len as usize

Co-Authored-By: Tyera Eulberg <teulberg@gmail.com>

* add test and documentation
2019-09-26 23:27:13 +05:30
74a648accb Enable SOL or lamports for create-vote-account, show-{stake,vote}-account commands (#6114)
automerge
2019-09-26 10:26:47 -07:00
35365974bf Remove serializing all ForkHashes (#6110) 2019-09-26 02:01:25 -07:00
355a40800d remove consensus.msc (#6106) 2019-09-25 18:15:14 -07:00
701d90a41d Remove some AccountStorage Serialization (#6047)
* Remove serialization of AccountStorageEntry fields

* Add metric for evaluating BankRc serialization time

* Serialize AppendVec current len

* Add dashboard metrics

* Move flush of AppendVecs to packaging thread
2019-09-25 18:07:41 -07:00
56f6ee84f1 Fix Bench-tps being too strict (#6105)
automerge
2019-09-25 17:43:13 -07:00
e2a5ec9cd2 Change formula used in erasure statistics graph (#6102)
automerge
2019-09-25 14:57:16 -07:00
aea0326b82 coverage by package (#6099) 2019-09-25 14:01:09 -07:00
93ad637c5c typo 2019-09-25 16:58:53 -04:00
6be5e21aaf GitBook: [master] 17 pages and 59 assets modified 2019-09-25 20:58:40 +00:00
43795193c4 add authorized parameters to vote api (#6072)
* add authorized parameters to vote api

* code review
2019-09-25 13:53:49 -07:00
62429585ba Bump bincode from 1.1.4 to 1.2.0 (#6065)
Bumps [bincode](https://github.com/servo/bincode) from 1.1.4 to 1.2.0.
- [Release notes](https://github.com/servo/bincode/releases)
- [Commits](https://github.com/servo/bincode/compare/v1.1.4...v1.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-25 14:44:29 -06:00
e987d0094f Move status cache serialization to the Snapshot Packager service (#6081)
* Move status cache serialization to the Snapshot Packager service

* Minor comment updates

* use ok_or_else instead of ok_or

* satus cache

* Remove assert when snapshot format is wrong

* Fix compile

* Remove slots_to_snapshot from bank forks

* Address review comment

* Remove unused imports
2019-09-25 13:42:19 -07:00
093b5b5267 Prune fork_hashes with dead forks (#6085) 2019-09-25 11:16:14 -07:00
678a5aff83 Remove brace expansion in arg list (#6091) 2019-09-25 12:52:07 -04:00
03dc4a20a1 Single threaded LLD (#6088) 2019-09-25 07:44:33 -07:00
de3765ab70 Add erasure recovery stats to dashboard (#6079)
automerge
2019-09-24 19:59:42 -07:00
5f079137e5 Remove kvstore (#6075)
automerge
2019-09-24 19:59:32 -07:00
94f0c081a6 Fix staker / voter credit redemption (#6074)
* Fix staker / voter credit redemption

* Rename variables
2019-09-24 22:58:31 -04:00
229836511d Remove local_cluster tests from stable-perf job, removee other tests from local-cluster job (#6067) 2019-09-24 19:05:25 -07:00
f2f041bb7c Avoid accidential tx_count mismatches when using an accounts file (#6069) 2019-09-24 18:46:43 -07:00
3562774f8b Reduce poll sleep (#6068)
* Reduce sleep in poll_for_signature_confirmations

* Unignore test_repairman_catchup
2019-09-24 17:01:18 -06:00
374b776a3e Fix using temp file for archive (#6058)
* Fix using temp file for archive

* Rename the temp archive instead of hardlinking it
2019-09-24 15:24:54 -07:00
5763d63737 Additional tests for should_retransmit_and_persist (#6062)
automerge
2019-09-24 14:54:10 -07:00
9d805dfc59 Tweak Bank Slot Distance graph 2019-09-24 14:52:29 -07:00
e6390b754f Bump env_logger from 0.6.2 to 0.7.0 (#6044) 2019-09-24 14:22:26 -07:00
7babfd00c1 Revert back to reqwest, using rustls feature (#6041)
* Revert back to reqwest, using rustls feature

* Cargo.lock and crate-features

* Ignore test
2019-09-24 14:10:59 -06:00
571dc4e387 Update stale code references for vote program in book (#6061) 2019-09-24 15:55:32 -04:00
3ed34b571c Window service is filtering out coding shreds (#6052)
* Window service is filtering out coding shreds

* update erasure stats to indicate recovery count

* filter out outdated coding shreds

* address review comments
2019-09-24 12:25:25 -07:00
d7e4c8e3cf Support primordial accounts with no data (#6053) 2019-09-24 10:42:33 -07:00
57e90948a8 Remove dead code from cluster_info (#6051) 2019-09-24 10:27:59 -07:00
26a20a7e62 nits (#6032) 2019-09-24 10:10:49 -07:00
b6a8268da3 Fix BPF program static linking (#5992) 2019-09-24 07:09:53 -04:00
61d7467ba8 Flip order of arg to ensure -t sticks 2019-09-23 22:20:22 -07:00
7fa809c16d Avoid hardlinking as that confuses tar (#6042) 2019-09-23 20:12:16 -07:00
84f74807d4 Skip considering banks older than the latest vote slot (#6037)
automerge
2019-09-23 19:40:03 -07:00
4f59077318 Fix vote metrics (#6038)
automerge
2019-09-23 18:09:20 -07:00
3a9c03cc89 Don't recover coding shreds (#6034)
* Don't recover coding shreds

* cleanup
2019-09-23 16:24:21 -07:00
f055d2f0cc ' => " (#6035) 2019-09-23 16:03:38 -07:00
72fb52ec60 rename balance (#5984) 2019-09-23 15:20:45 -07:00
62c22c6cb1 Fix really old banks triggering log spam (#6025) 2019-09-23 13:59:16 -07:00
dbd337c616 Upgrade to ReedSolomon 4.0 release (#6026) 2019-09-23 13:53:52 -07:00
eeda7338cc Dump tar stdout/err on failure for better debug (#6024) 2019-09-23 13:05:09 -07:00
261ea00efb Fix race between observing tick height being set to last tick and blockhash being observed on a bank (#6013) 2019-09-23 12:54:39 -07:00
02647c25a9 net: Add Trent's work laptop pubkey (#6022)
automerge
2019-09-23 10:25:36 -07:00
433b0808e4 Remove the _/deps symlink, just copy instead (#6020) 2019-09-23 09:16:56 -07:00
529b163bd0 GitBook: [master] 156 pages and 12 assets modified 2019-09-23 03:38:34 +00:00
9c9991db1d Update cargo toml and lock files to v0.20.0 (#6016) 2019-09-22 21:45:56 -04:00
944 changed files with 107793 additions and 59640 deletions

View File

@ -1,14 +1,15 @@
{
"_public_key": "ae29f4f7ad2fc92de70d470e411c8426d5d48db8817c9e3dae574b122192335f",
"environment": {
"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=]"
"CODECOV_TOKEN": "EJ[1:yGpTmjdbyjW2kjgIHkFoJv7Ue7EbUvUbqHyw6anGgWg=:JnxhrIxh09AvqdJgrVSYmb7PxSrh19aE:07WzVExCHEd1lJ1m8QizRRthGri+WBNeZRKjjEvsy5eo4gv3HD7zVEm42tVTGkqITKkBNQ==]",
"CRATES_IO_TOKEN": "EJ[1:yGpTmjdbyjW2kjgIHkFoJv7Ue7EbUvUbqHyw6anGgWg=:d0jJqC32/axwzq/N7kMRmpxKhnRrhtpt:zvcPHwkOzGnjhNkAQSejwdy1Jkr9wR1qXFFCnfIjyt/XQYubzB1tLkoly/qdmeb5]",
"GEOLOCATION_API_KEY": "EJ[1:yGpTmjdbyjW2kjgIHkFoJv7Ue7EbUvUbqHyw6anGgWg=:R4gfB6Ey4i50HyfLt4UZDLBqg3qHEUye:UfZCOgt8XI6Y2g+ivCRVoS1fjFycFs7/GSevvCqh1B50mG0+hzpEyzXQLuKG5OeI]",
"GITHUB_TOKEN": "EJ[1:yGpTmjdbyjW2kjgIHkFoJv7Ue7EbUvUbqHyw6anGgWg=:Vq2dkGTOzfEpRht0BAGHFp/hDogMvXJe:tFXHg1epVt2mq9hkuc5sRHe+KAnVREi/p8S+IZu67XRyzdiA/nGak1k860FXYuuzuaE0QWekaEc=]",
"INFLUX_DATABASE": "EJ[1:yGpTmjdbyjW2kjgIHkFoJv7Ue7EbUvUbqHyw6anGgWg=:5KI9WBkXx3R/W4m256mU5MJOE7N8aAT9:Cb8QFELZ9I60t5zhJ9h55Kcs]",
"INFLUX_PASSWORD": "EJ[1:yGpTmjdbyjW2kjgIHkFoJv7Ue7EbUvUbqHyw6anGgWg=:hQRMpLCrav+OYkNphkeM4hagdVoZv5Iw:AUO76rr6+gF1OLJA8ZLSG8wHKXgYCPNk6gRCV8rBhZBJ4KwDaxpvOhMl7bxxXG6jol7v4aRa/Lk=]",
"INFLUX_USERNAME": "EJ[1:yGpTmjdbyjW2kjgIHkFoJv7Ue7EbUvUbqHyw6anGgWg=:R7BNmQjfeqoGDAFTJu9bYTGHol2NgnYN:Q2tOT/EBcFvhFk+DKLKmVU7tLCpVC3Ui]",
"SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_unknown_linux_gnu": "EJ[1:yGpTmjdbyjW2kjgIHkFoJv7Ue7EbUvUbqHyw6anGgWg=:Egc2dMrHDU0NcZ71LwGv/V66shUhwYUE:04VoIb8CKy7KYhQ5W4cEW9SDKZltxWBL5Hob106lMBbUOD/yUvKYcG3Ep8JfTMwO3K8zowW5HpU/IdGoilX0XWLiJJ6t+p05WWK0TA16nOEtwrEG+UK8wm3sN+xCO20i4jDhpNpgg3FYFHT5rKTHW8+zaBTNUX/SFxkN67Lm+92IM28CXYE43SU1WV6H99hGFFVpTK5JVM3JuYU1ex/dHRE+xCzTr4MYUB/F+nGoNFW8HUDV/y0e1jxT9to3x0SmnytEEuk+5RUzFuEt9cKNFeNml3fOCi4qL+sfj/Y5pjH9xDiUxsvH/8NL35jbLP244aFHgWcp]",
"SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_apple_darwin": "EJ[1:yGpTmjdbyjW2kjgIHkFoJv7Ue7EbUvUbqHyw6anGgWg=:NeOxSoWCvXB9AL4H6OK26l/7bmsKd/oz:Ijfoxtvk2CHlN1ZXHup3Gg/914kbbAkEGWJfvozA8UIe+aUzUObMyTrKkVOeNAH8Q8YH9tNzk7RRnrTcpnzeCCBLlWcVEeruMxHox3mPRzmSeDLxtbzCl9VePlRO3T7jg90K5hW+ZAkd5J/WJNzpAcmr93ts/of3MbvGHSujId/efCTzJEcP6JInnBb8Vrj7TlgKbzUlnqpq1+NjYPSXN3maKa9pKeo2JWxZlGBMoy6QWUUY5GbYEylw9smwh1LJcHZjlaZNMuOl4gNKtaSr38IXQkAXaRUJDPAmPras00YObKzXU8RkTrP4EoP/jx5LPR7f]",
"SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_pc_windows_msvc": "EJ[1:yGpTmjdbyjW2kjgIHkFoJv7Ue7EbUvUbqHyw6anGgWg=:7t+56twjW+jR7fpFNNeRFLPd7E4lbmyN:JuviDpkQrfVcNUGRGsa2e/UhvH6tTYyk1s4cHHE5xZH1NByL7Kpqx36VG/+o1AUGEeSQdsBnKgzYdMoFYbO8o50DoRPc86QIEVXCupD6J9avxLFtQgOWgJp+/mCdUVXlqXiFs/vQgS/L4psrcKdF6WHd77BeUr6ll8DjH+9m5FC9Rcai2pXno6VbPpunHQ0oUdYzhFR64+LiRacBaefQ9igZ+nSEWDLqbaZSyfm9viWkijoVFTq8gAgdXXEh7g0QdxVE5T6bPristJhT6jWBhWunPUCDNFFErWIsbRGctepl4pbCWqh2hNTw9btSgVfeY6uGCOsdy9E=]"
}
}

2
.github/stale.yml vendored
View File

@ -1,7 +1,7 @@
only: pulls
# Number of days of inactivity before a pull request becomes stale
daysUntilStale: 30
daysUntilStale: 7
# Number of days of inactivity before a stale pull request is closed
daysUntilClose: 7

2
.gitignore vendored
View File

@ -1,5 +1,6 @@
/book/html/
/book/src/tests.ok
/book/src/.gitbook/assets/*.svg
/farf/
/solana-release/
/solana-release.tar.bz2
@ -15,6 +16,7 @@
# log files
*.log
log-*.txt
log-*/
# intellij files
/.idea/

View File

@ -19,59 +19,35 @@ pull_request_rules:
label:
add:
- automerge
- name: v0.16 backport
- name: v0.23 backport
conditions:
- base=master
- label=v0.16
- label=v0.23
actions:
backport:
branches:
- v0.16
- name: v0.17 backport
- v0.23
- name: v1.0 backport
conditions:
- base=master
- label=v0.17
- label=v1.0
actions:
backport:
branches:
- v0.17
- name: v0.18 backport
- v1.0
- name: v1.1 backport
conditions:
- base=master
- label=v0.18
- label=v1.1
actions:
backport:
branches:
- v0.18
- name: v0.19 backport
- v1.1
- name: v1.2 backport
conditions:
- base=master
- label=v0.19
- label=v1.2
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
- v1.2

View File

@ -3,11 +3,10 @@ os:
language: rust
rust:
- 1.37.0
- stable
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
@ -16,7 +15,7 @@ script:
branches:
only:
- master
- /^v\d+\.\d+$/
- /^v\d+\.\d+/
notifications:
slack:

View File

@ -1,23 +1,41 @@
Solana Coding Guidelines
===
# Solana Coding Guidelines
The goal of these guidelines is to improve developer productivity by allowing developers to
jump any file in the codebase and not need to adapt to inconsistencies in how the code is
written. The codebase should appear as if it had been authored by a single developer. If you
don't agree with a convention, submit a PR patching this document and let's discuss! Once
the PR is accepted, *all* code should be updated as soon as possible to reflect the new
The goal of these guidelines is to improve developer productivity by allowing
developers to jump into any file in the codebase and not need to adapt to
inconsistencies in how the code is written. The codebase should appear as if it
had been authored by a single developer. If you don't agree with a convention,
submit a PR patching this document and let's discuss! Once the PR is accepted,
*all* code should be updated as soon as possible to reflect the new
conventions.
Pull Requests
---
## Pull Requests
Small, frequent PRs are much preferred to large, infrequent ones. A large PR is difficult
to review, can block others from making progress, and can quickly get its author into
"rebase hell". A large PR oftentimes arises when one change requires another, which requires
another, and then another. When you notice those dependencies, put the fix into a commit of
its own, then checkout a new branch, and cherrypick it. Open a PR to start the review
process and then jump back to your original branch to keep making progress. Once the commit
is merged, you can use git-rebase to purge it from your original branch.
Small, frequent PRs are much preferred to large, infrequent ones. A large PR is
difficult to review, can block others from making progress, and can quickly get
its author into "rebase hell". A large PR oftentimes arises when one change
requires another, which requires another, and then another. When you notice
those dependencies, put the fix into a commit of its own, then checkout a new
branch, and cherry-pick it.
```bash
$ git commit -am "Fix foo, needed by bar"
$ git checkout master
$ git checkout -b fix-foo
$ git cherry-pick fix-bar
$ git push --set-upstream origin fix-foo
```
Open a PR to start the review process and then jump back to your original
branch to keep making progress. Consider rebasing to make your fix the first
commit:
```bash
$ git checkout fix-bar
$ git rebase -i master <Move fix-foo to top>
```
Once the commit is merged, rebase the original branch to purge the
cherry-picked commit:
```bash
$ git pull --rebase upstream master
@ -25,26 +43,137 @@ $ git pull --rebase upstream master
### How big is too big?
If there are no functional changes, PRs can be very large and that's no problem. If,
however, your changes are making meaningful changes or additions, then about 1,000 lines of
changes is about the most you should ask a Solana maintainer to review.
If there are no functional changes, PRs can be very large and that's no
problem. If, however, your changes are making meaningful changes or additions,
then about 1,000 lines of changes is about the most you should ask a Solana
maintainer to review.
### Should I send small PRs as I develop large, new components?
Add only code to the codebase that is ready to be deployed. If you are building a large
library, consider developing it in a separate git repository. When it is ready to be
integrated, the Solana maintainers will work with you to decide on a path forward. Smaller
libraries may be copied in whereas very large ones may be pulled in with a package manager.
Add only code to the codebase that is ready to be deployed. If you are building
a large library, consider developing it in a separate git repository. When it
is ready to be integrated, the Solana maintainers will work with you to decide
on a path forward. Smaller libraries may be copied in whereas very large ones
may be pulled in with a package manager.
## Getting Pull Requests Merged
There is no single person assigned to watching GitHub PR queue and ushering you
through the process. Typically, you will ask the person that wrote a component
to review changes to it. You can find the author using `git blame` or asking on
Discord. When working to get your PR merged, it's most important to understand
that changing the code is your priority and not necessarily a priority of the
person you need an approval from. Also, while you may interact the most with
the component author, you should aim to be inclusive of others. Providing a
detailed problem description is the most effective means of engaging both the
component author and other potentially interested parties.
Consider opening all PRs as Draft Pull Requests first. Using a draft PR allows
you to kickstart the CI automation, which typically takes between 10 and 30
minutes to execute. Use that time to write a detailed problem description. Once
the description is written and CI succeeds, click the "Ready to Review" button
and add reviewers. Adding reviewers before CI succeeds is a fast path to losing
reviewer engagement. Not only will they be notified and see the PR is not yet
ready for them, they will also be bombarded them with additional notifications
each time you push a commit to get past CI or until they "mute" the PR. Once
muted, you'll need to reach out over some other medium, such as Discord, to
request they have another look. When you use draft PRs, no notifications are
sent when you push commits and edit the PR description. Use draft PRs
liberally. Don't bug the humans until you have gotten past the bots.
### What should be in my PR description?
Reviewing code is hard work and generally involves an attempt to guess the
author's intent at various levels. Please assume reviewer time is scarce and do
what you can to make your PR as consumable as possible. Inspired by techniques
for writing good whitepapers, the guidance here aims to maximize reviewer
engagement.
Assume the reviewer will spend no more than a few seconds reading the PR title.
If it doesn't describe a noteworthy change, don't expect the reviewer to click
to see more.
Next, like the abstract of a whitepaper, the reviewer will spend ~30 seconds
reading the PR problem description. If what is described there doesn't look
more important than competing issues, don't expect the reviewer to read on.
Next, the reviewer will read the proposed changes. At this point, the reviewer
needs to be convinced the proposed changes are a *good* solution to the problem
described above. If the proposed changes, not the code changes, generates
discussion, consider closing the PR and returning with a design proposal
instead.
Finally, once the reviewer understands the problem and agrees with the approach
to solving it, the reviewer will view the code changes. At this point, the
reviewer is simply looking to see if the implementation actually implements
what was proposed and if that implementation is maintainable. When a concise,
readable test for each new code path is present, the reviewer can safely ignore
the details of its implementation. When those tests are missing, expect to
either lose engagement or get a pile of review comments as the reviewer
attempts to consider every ambiguity in your implementation.
### The PR Title
The PR title should contain a brief summary of the change, from the perspective
of the user. Examples of good titles:
* Add rent to accounts
* Fix out-of-memory error in validator
* Clean up `process_message()` in runtime
The conventions here are all the same as a good git commit title:
* First word capitalized and in the imperative mood, not past tense ("add", not
"added")
* No trailing period
* What was done, whom it was done to, and in what context
### The PR Problem Statement
The git repo implements a product with various features. The problem statement
should describe how the product is missing a feature, how a feature is
incomplete, or how the implementation of a feature is somehow undesirable. If
an issue being fixed already describes the problem, go ahead and copy-paste it.
As mentioned above, reviewer time is scarce. Given a queue of PRs to review,
the reviewer may ignore PRs that expect them to click through links to see if
the PR warrants attention.
### The Proposed Changes
Typically the content under the "Proposed changes" section will be a bulleted
list of steps taken to solve the problem. Oftentimes, the list is identical to
the subject lines of the git commits contained in the PR. It's especially
generous (and not expected) to rebase or reword commits such that each change
matches the logical flow in your PR description.
### When will my PR be reviewed?
PRs are typically reviewed and merged in under 7 days. If your PR has been open for longer,
it's a strong indicator that the reviewers aren't confident the change meets the quality
standards of the codebase. You might consider closing it and coming back with smaller PRs
and longer descriptions detailing what problem it solves and how it solves it.
PRs are typically reviewed and merged in under 7 days. If your PR has been open
for longer, it's a strong indicator that the reviewers aren't confident the
change meets the quality standards of the codebase. You might consider closing
it and coming back with smaller PRs and longer descriptions detailing what
problem it solves and how it solves it. Old PRs will be marked stale and then
closed automatically 7 days later.
Draft Pull Requests
---
### How to manage review feedback?
After a reviewer provides feedback, you can quickly say "acknowledged, will
fix" using a thumb's up emoji. If you're confident your fix is exactly as
prescribed, add a reply "Fixed in COMMIT\_HASH" and mark the comment as
resolved. If you're not sure, reply "Is this what you had in mind?
COMMIT\_HASH" and if so, the reviewer will reply and mark the conversation as
resolved. Marking conversations as resolved is an excellent way to engage more
reviewers. Leaving conversations open may imply the PR is not yet ready for
additional review.
### When will my PR be re-reviewed?
Recall that once your PR is opened, a notification is sent every time you push
a commit. After a reviewer adds feedback, they won't be checking on the status
of that feedback after every new commit. Instead, directly mention the reviewer
when you feel your PR is ready for another pass.
## Draft Pull Requests
If you want early feedback on your PR, use GitHub's "Draft Pull Request"
mechanism. Draft PRs are a convenient way to collaborate with the Solana
@ -52,67 +181,69 @@ maintainers without triggering notifications as you make changes. When you feel
your PR is ready for a broader audience, you can transition your draft PR to a
standard PR with the click of a button.
Do not add reviewers to draft PRs. GitHub doesn't automatically clear approvals
when you click "Ready for Review", so a review that meant "I approve of the
direction" suddenly has the appearance of "I approve of these changes." Instead,
add a comment that mentions the usernames that you would like a review from. Ask
explicitly what you would like feedback on.
Do not add reviewers to draft PRs. GitHub doesn't automatically clear
approvals when you click "Ready for Review", so a review that meant "I approve
of the direction" suddenly has the appearance of "I approve of these changes."
Instead, add a comment that mentions the usernames that you would like a review
from. Ask explicitly what you would like feedback on.
Rust coding conventions
---
## Rust coding conventions
* All Rust code is formatted using the latest version of `rustfmt`. Once installed, it will be
updated automatically when you update the compiler with `rustup`.
* All Rust code is formatted using the latest version of `rustfmt`. Once
installed, it will be updated automatically when you update the compiler with
`rustup`.
* All Rust code is linted with Clippy. If you'd prefer to ignore its advice, do so explicitly:
* All Rust code is linted with Clippy. If you'd prefer to ignore its advice, do
so explicitly:
```rust
#[allow(clippy::too_many_arguments)]
```
```rust #[allow(clippy::too_many_arguments)] ```
Note: Clippy defaults can be overridden in the top-level file `.clippy.toml`.
* For variable names, when in doubt, spell it out. The mapping from type names to variable names
is to lowercase the type name, putting an underscore before each capital letter. Variable names
should *not* be abbreviated unless being used as closure arguments and the brevity improves
readability. When a function has multiple instances of the same type, qualify each with a
prefix and underscore (i.e. alice_keypair) or a numeric suffix (i.e. tx0).
* For variable names, when in doubt, spell it out. The mapping from type names
to variable names is to lowercase the type name, putting an underscore before
each capital letter. Variable names should *not* be abbreviated unless being
used as closure arguments and the brevity improves readability. When a function
has multiple instances of the same type, qualify each with a prefix and
underscore (i.e. alice\_keypair) or a numeric suffix (i.e. tx0).
* For function and method names, use `<verb>_<subject>`. For unit tests, that verb should
always be `test` and for benchmarks the verb should always be `bench`. Avoid namespacing
function names with some arbitrary word. Avoid abbreviating words in function names.
* For function and method names, use `<verb>_<subject>`. For unit tests, that
verb should always be `test` and for benchmarks the verb should always be
`bench`. Avoid namespacing function names with some arbitrary word. Avoid
abbreviating words in function names.
* As they say, "When in Rome, do as the Romans do." A good patch should acknowledge the coding
conventions of the code that surrounds it, even in the case where that code has not yet been
updated to meet the conventions described here.
* As they say, "When in Rome, do as the Romans do." A good patch should
acknowledge the coding conventions of the code that surrounds it, even in the
case where that code has not yet been updated to meet the conventions described
here.
Terminology
---
## Terminology
Inventing new terms is allowed, but should only be done when the term is widely used and
understood. Avoid introducing new 3-letter terms, which can be confused with 3-letter acronyms.
Inventing new terms is allowed, but should only be done when the term is widely
used and understood. Avoid introducing new 3-letter terms, which can be
confused with 3-letter acronyms.
[Terms currently in use](book/src/terminology.md)
Design Proposals
---
## Design Proposals
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://docs.solana.com/book/v/master/proposals) chapter.
Here's the full process:
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
directory `book/src/` and references it from the [table of
contents](book/src/SUMMARY.md). Add any relevant *maintainers* to the PR review.
contents](book/src/SUMMARY.md). Add any relevant *maintainers* to the PR
review.
2. The PR being merged indicates your proposed change was accepted and that the
maintainers support your plan of attack.
3. Submit PRs that implement the proposal. When the implementation reveals the
need for tweaks to the proposal, be sure to update the proposal and have
that change reviewed by the same people as in step 1.
need for tweaks to the proposal, be sure to update the proposal and have that
change reviewed by the same people as in step 1.
4. Once the implementation is complete, submit a PR that moves the link from
the Accepted Proposals to the Implemented Proposals section.

4139
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,127 +1,64 @@
[workspace]
# The members list excluding the `validator-cuda` crate
default-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",
]
# The default-members list and the `validator-cuda` crate
members = [
"bench-exchange",
"bench-streamer",
"bench-tps",
"banking_bench",
"banking-bench",
"chacha",
"chacha-cuda",
"chacha-sys",
"cli-config",
"client",
"core",
"drone",
"faucet",
"perf",
"validator",
"genesis",
"genesis_programs",
"genesis-programs",
"gossip",
"install",
"keygen",
"kvstore",
"ledger",
"ledger-tool",
"local_cluster",
"local-cluster",
"logger",
"log-analyzer",
"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",
"net-shaper",
"programs/bpf_loader",
"programs/budget",
"programs/btc_spv",
"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",
"programs/config",
"programs/exchange",
"programs/failure",
"programs/noop",
"programs/ownable",
"programs/stake",
"programs/storage",
"programs/vest",
"programs/vote",
"archiver",
"archiver-lib",
"archiver-utils",
"remote-wallet",
"runtime",
"sdk",
"sdk-c",
"scripts",
"sys-tuner",
"upload-perf",
"netutil",
"fixed-buf",
"net-utils",
"vote-signer",
"cli",
"rayon-threadlimit",
"validator-cuda",
"watchtower",
]
exclude = [
"programs/bpf",
"programs/move_loader",
"programs/librapay",
]

View File

@ -78,7 +78,7 @@ $ source $HOME/.cargo/env
$ rustup component add rustfmt
```
If your rustc version is lower than 1.37.0, please update it:
If your rustc version is lower than 1.39.0, please update it:
```bash
$ rustup update
@ -87,7 +87,8 @@ $ rustup update
On Linux systems you may need to install libssl-dev, pkg-config, zlib1g-dev, etc. On Ubuntu:
```bash
$ sudo apt-get install libssl-dev pkg-config zlib1g-dev llvm clang
$ sudo apt-get update
$ sudo apt-get install libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang
```
Download the source code:
@ -120,16 +121,13 @@ $ cargo test
Local Testnet
---
Start your own testnet locally, instructions are in the book [Solana: Blockchain Rebuild for Scale: Getting Started](https://docs.solana.com/book/getting-started).
Start your own testnet locally, instructions are in the book [Solana: Blockchain Rebuild for Scale: Getting Started](https://docs.solana.com/book/building-from-source).
Remote Testnets
---
We maintain several testnets:
* `testnet` - public stable testnet accessible via devnet.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
## Deploy process

View File

@ -138,30 +138,11 @@ There are three release channels that map to branches as follows:
### 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.
Document the new recommended version by updating `book/src/running-archiver.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:
### Update software on devnet.solana.com
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
The testnet running on devnet.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.
@ -201,4 +182,4 @@ TESTNET_OP=create-and-start
### Alert the community
Notify Discord users on #validator-support that a new release for
testnet.solana.com is available
devnet.solana.com is available

39
archiver-lib/Cargo.toml Normal file
View File

@ -0,0 +1,39 @@
[package]
name = "solana-archiver-lib"
version = "1.0.0"
description = "Solana Archiver Library"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
edition = "2018"
[dependencies]
bincode = "1.2.1"
crossbeam-channel = "0.3"
ed25519-dalek = "=1.0.0-pre.1"
log = "0.4.8"
rand = "0.6.5"
rand_chacha = "0.1.1"
solana-client = { path = "../client", version = "1.0.0" }
solana-storage-program = { path = "../programs/storage", version = "1.0.0" }
thiserror = "1.0"
serde = "1.0.104"
serde_json = "1.0.46"
serde_derive = "1.0.103"
solana-net-utils = { path = "../net-utils", version = "1.0.0" }
solana-chacha = { path = "../chacha", version = "1.0.0" }
solana-chacha-sys = { path = "../chacha-sys", version = "1.0.0" }
solana-ledger = { path = "../ledger", version = "1.0.0" }
solana-logger = { path = "../logger", version = "1.0.0" }
solana-perf = { path = "../perf", version = "1.0.0" }
solana-sdk = { path = "../sdk", version = "1.0.0" }
solana-core = { path = "../core", version = "1.0.0" }
solana-archiver-utils = { path = "../archiver-utils", version = "1.0.0" }
solana-metrics = { path = "../metrics", version = "1.0.0" }
[dev-dependencies]
hex = "0.4.0"
[lib]
name = "solana_archiver_lib"

File diff suppressed because it is too large Load Diff

11
archiver-lib/src/lib.rs Normal file
View File

@ -0,0 +1,11 @@
#[macro_use]
extern crate log;
#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate solana_metrics;
pub mod archiver;
mod result;

View File

@ -0,0 +1,48 @@
use serde_json;
use solana_client::client_error;
use solana_ledger::blockstore;
use solana_sdk::transport;
use std::any::Any;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum ArchiverError {
#[error("IO error")]
IO(#[from] std::io::Error),
#[error("blockstore error")]
BlockstoreError(#[from] blockstore::BlockstoreError),
#[error("crossbeam error")]
CrossbeamSendError(#[from] crossbeam_channel::SendError<u64>),
#[error("send error")]
SendError(#[from] std::sync::mpsc::SendError<u64>),
#[error("join error")]
JoinError(Box<dyn Any + Send + 'static>),
#[error("transport error")]
TransportError(#[from] transport::TransportError),
#[error("client error")]
ClientError(#[from] client_error::ClientError),
#[error("Json parsing error")]
JsonError(#[from] serde_json::error::Error),
#[error("Storage account has no balance")]
EmptyStorageAccountBalance,
#[error("No RPC peers..")]
NoRpcPeers,
#[error("Couldn't download full segment")]
SegmentDownloadError,
}
impl std::convert::From<Box<dyn Any + Send + 'static>> for ArchiverError {
fn from(e: Box<dyn Any + Send + 'static>) -> ArchiverError {
ArchiverError::JoinError(e)
}
}

25
archiver-utils/Cargo.toml Normal file
View File

@ -0,0 +1,25 @@
[package]
name = "solana-archiver-utils"
version = "1.0.0"
description = "Solana Archiver Utils"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
edition = "2018"
[dependencies]
log = "0.4.8"
rand = "0.6.5"
solana-chacha = { path = "../chacha", version = "1.0.0" }
solana-chacha-sys = { path = "../chacha-sys", version = "1.0.0" }
solana-ledger = { path = "../ledger", version = "1.0.0" }
solana-logger = { path = "../logger", version = "1.0.0" }
solana-perf = { path = "../perf", version = "1.0.0" }
solana-sdk = { path = "../sdk", version = "1.0.0" }
[dev-dependencies]
hex = "0.4.0"
[lib]
name = "solana_archiver_utils"

120
archiver-utils/src/lib.rs Normal file
View File

@ -0,0 +1,120 @@
#[macro_use]
extern crate log;
use solana_sdk::hash::{Hash, Hasher};
use std::fs::File;
use std::io::{self, BufReader, ErrorKind, Read, Seek, SeekFrom};
use std::mem::size_of;
use std::path::Path;
pub fn sample_file(in_path: &Path, sample_offsets: &[u64]) -> io::Result<Hash> {
let in_file = File::open(in_path)?;
let metadata = in_file.metadata()?;
let mut buffer_file = BufReader::new(in_file);
let mut hasher = Hasher::default();
let sample_size = size_of::<Hash>();
let sample_size64 = sample_size as u64;
let mut buf = vec![0; sample_size];
let file_len = metadata.len();
if file_len < sample_size64 {
return Err(io::Error::new(ErrorKind::Other, "file too short!"));
}
for offset in sample_offsets {
if *offset > (file_len - sample_size64) / sample_size64 {
return Err(io::Error::new(ErrorKind::Other, "offset too large"));
}
buffer_file.seek(SeekFrom::Start(*offset * sample_size64))?;
trace!("sampling @ {} ", *offset);
match buffer_file.read(&mut buf) {
Ok(size) => {
assert_eq!(size, buf.len());
hasher.hash(&buf);
}
Err(e) => {
warn!("Error sampling file");
return Err(e);
}
}
}
Ok(hasher.result())
}
#[cfg(test)]
mod tests {
use super::*;
use rand::{thread_rng, Rng};
use std::fs::{create_dir_all, remove_file};
use std::io::Write;
use std::path::PathBuf;
extern crate hex;
fn tmp_file_path(name: &str) -> PathBuf {
use std::env;
let out_dir = env::var("FARF_DIR").unwrap_or_else(|_| "farf".to_string());
let mut rand_bits = [0u8; 32];
thread_rng().fill(&mut rand_bits[..]);
let mut path = PathBuf::new();
path.push(out_dir);
path.push("tmp");
create_dir_all(&path).unwrap();
path.push(format!("{}-{:?}", name, hex::encode(rand_bits)));
println!("path: {:?}", path);
path
}
#[test]
fn test_sample_file() {
solana_logger::setup();
let in_path = tmp_file_path("test_sample_file_input.txt");
let num_strings = 4096;
let string = "12foobar";
{
let mut in_file = File::create(&in_path).unwrap();
for _ in 0..num_strings {
in_file.write(string.as_bytes()).unwrap();
}
}
let num_samples = (string.len() * num_strings / size_of::<Hash>()) as u64;
let samples: Vec<_> = (0..num_samples).collect();
let res = sample_file(&in_path, samples.as_slice());
let ref_hash: Hash = Hash::new(&[
173, 251, 182, 165, 10, 54, 33, 150, 133, 226, 106, 150, 99, 192, 179, 1, 230, 144,
151, 126, 18, 191, 54, 67, 249, 140, 230, 160, 56, 30, 170, 52,
]);
let res = res.unwrap();
assert_eq!(res, ref_hash);
// Sample just past the end
assert!(sample_file(&in_path, &[num_samples]).is_err());
remove_file(&in_path).unwrap();
}
#[test]
fn test_sample_file_invalid_offset() {
let in_path = tmp_file_path("test_sample_file_invalid_offset_input.txt");
{
let mut in_file = File::create(&in_path).unwrap();
for _ in 0..4096 {
in_file.write("123456foobar".as_bytes()).unwrap();
}
}
let samples = [0, 200000];
let res = sample_file(&in_path, &samples);
assert!(res.is_err());
remove_file(in_path).unwrap();
}
#[test]
fn test_sample_file_missing_file() {
let in_path = tmp_file_path("test_sample_file_that_doesnt_exist.txt");
let samples = [0, 5];
let res = sample_file(&in_path, &samples);
assert!(res.is_err());
}
}

20
archiver/Cargo.toml Normal file
View File

@ -0,0 +1,20 @@
[package]
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-archiver"
version = "1.0.0"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
[dependencies]
clap = "2.33.0"
console = "0.9.2"
solana-clap-utils = { path = "../clap-utils", version = "1.0.0" }
solana-core = { path = "../core", version = "1.0.0" }
solana-logger = { path = "../logger", version = "1.0.0" }
solana-metrics = { path = "../metrics", version = "1.0.0" }
solana-archiver-lib = { path = "../archiver-lib", version = "1.0.0" }
solana-net-utils = { path = "../net-utils", version = "1.0.0" }
solana-sdk = { path = "../sdk", version = "1.0.0" }

147
archiver/src/main.rs Normal file
View File

@ -0,0 +1,147 @@
use clap::{crate_description, crate_name, App, Arg};
use console::style;
use solana_archiver_lib::archiver::Archiver;
use solana_clap_utils::{
input_validators::is_keypair,
keypair::{
self, keypair_input, KeypairWithSource, ASK_SEED_PHRASE_ARG,
SKIP_SEED_PHRASE_VALIDATION_ARG,
},
};
use solana_core::{
cluster_info::{Node, VALIDATOR_PORT_RANGE},
contact_info::ContactInfo,
};
use solana_sdk::{commitment_config::CommitmentConfig, signature::Signer};
use std::{net::SocketAddr, path::PathBuf, process::exit, sync::Arc};
fn main() {
solana_logger::setup();
let matches = App::new(crate_name!())
.about(crate_description!())
.version(solana_clap_utils::version!())
.arg(
Arg::with_name("identity_keypair")
.short("i")
.long("identity-keypair")
.value_name("PATH")
.takes_value(true)
.validator(is_keypair)
.help("File containing an identity (keypair)"),
)
.arg(
Arg::with_name("entrypoint")
.short("n")
.long("entrypoint")
.value_name("HOST:PORT")
.takes_value(true)
.required(true)
.validator(solana_net_utils::is_host_port)
.help("Rendezvous with the cluster at this entry point"),
)
.arg(
Arg::with_name("ledger")
.short("l")
.long("ledger")
.value_name("DIR")
.takes_value(true)
.required(true)
.help("use DIR as persistent ledger location"),
)
.arg(
Arg::with_name("storage_keypair")
.short("s")
.long("storage-keypair")
.value_name("PATH")
.takes_value(true)
.validator(is_keypair)
.help("File containing the storage account keypair"),
)
.arg(
Arg::with_name(ASK_SEED_PHRASE_ARG.name)
.long(ASK_SEED_PHRASE_ARG.long)
.value_name("KEYPAIR NAME")
.multiple(true)
.takes_value(true)
.possible_values(&["identity-keypair", "storage-keypair"])
.help(ASK_SEED_PHRASE_ARG.help),
)
.arg(
Arg::with_name(SKIP_SEED_PHRASE_VALIDATION_ARG.name)
.long(SKIP_SEED_PHRASE_VALIDATION_ARG.long)
.requires(ASK_SEED_PHRASE_ARG.name)
.help(SKIP_SEED_PHRASE_VALIDATION_ARG.help),
)
.get_matches();
let ledger_path = PathBuf::from(matches.value_of("ledger").unwrap());
let identity_keypair = keypair_input(&matches, "identity_keypair")
.unwrap_or_else(|err| {
eprintln!("Identity keypair input failed: {}", err);
exit(1);
})
.keypair;
let KeypairWithSource {
keypair: storage_keypair,
source: storage_keypair_source,
} = keypair_input(&matches, "storage_keypair").unwrap_or_else(|err| {
eprintln!("Storage keypair input failed: {}", err);
exit(1);
});
if storage_keypair_source == keypair::Source::Generated {
clap::Error::with_description(
"The `storage-keypair` argument was not found",
clap::ErrorKind::ArgumentNotFound,
)
.exit();
}
let entrypoint_addr = matches
.value_of("entrypoint")
.map(|entrypoint| {
solana_net_utils::parse_host_port(entrypoint)
.expect("failed to parse entrypoint address")
})
.unwrap();
let gossip_addr = {
let ip = solana_net_utils::get_public_ip_addr(&entrypoint_addr).unwrap();
let mut addr = SocketAddr::new(ip, 0);
addr.set_ip(solana_net_utils::get_public_ip_addr(&entrypoint_addr).unwrap());
addr
};
let node = Node::new_archiver_with_external_ip(
&identity_keypair.pubkey(),
&gossip_addr,
VALIDATOR_PORT_RANGE,
);
println!(
"{} version {} (branch={}, commit={})",
style(crate_name!()).bold(),
solana_clap_utils::version!(),
option_env!("CI_BRANCH").unwrap_or("unknown"),
option_env!("CI_COMMIT").unwrap_or("unknown")
);
solana_metrics::set_host_id(identity_keypair.pubkey().to_string());
println!(
"replicating the data with identity_keypair={:?} gossip_addr={:?}",
identity_keypair.pubkey(),
gossip_addr
);
let entrypoint_info = ContactInfo::new_gossip_entry_point(&entrypoint_addr);
let archiver = Archiver::new(
&ledger_path,
node,
entrypoint_info,
Arc::new(identity_keypair),
Arc::new(storage_keypair),
CommitmentConfig::recent(),
)
.unwrap();
archiver.join();
}

20
banking-bench/Cargo.toml Normal file
View File

@ -0,0 +1,20 @@
[package]
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-banking-bench"
version = "1.0.0"
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 = "1.0.0" }
solana-ledger = { path = "../ledger", version = "1.0.0" }
solana-logger = { path = "../logger", version = "1.0.0" }
solana-runtime = { path = "../runtime", version = "1.0.0" }
solana-measure = { path = "../measure", version = "1.0.0" }
solana-sdk = { path = "../sdk", version = "1.0.0" }
rand = "0.6.5"
crossbeam-channel = "0.3"

View File

@ -1,21 +1,16 @@
#[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::genesis_utils::{create_genesis_config, GenesisConfigInfo};
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_ledger::bank_forks::BankForks;
use solana_ledger::{blockstore::Blockstore, get_tmp_ledger_path};
use solana_measure::measure::Measure;
use solana_runtime::bank::Bank;
use solana_sdk::hash::Hash;
@ -25,7 +20,6 @@ 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};
@ -41,7 +35,7 @@ fn check_txs(
let now = Instant::now();
let mut no_bank = false;
loop {
if let Ok((_bank, (entry, _tick_count))) = receiver.recv_timeout(Duration::from_millis(10))
if let Ok((_bank, (entry, _tick_height))) = receiver.recv_timeout(Duration::from_millis(10))
{
total += entry.transactions.len();
}
@ -103,21 +97,21 @@ fn main() {
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,
let GenesisConfigInfo {
genesis_config,
mint_keypair,
..
} = create_genesis_block(mint_total);
} = create_genesis_config(mint_total);
let (verified_sender, verified_receiver) = unbounded();
let (vote_sender, vote_receiver) = unbounded();
let bank0 = Bank::new(&genesis_block);
let bank0 = Bank::new(&genesis_config);
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());
let mut transactions = make_accounts_txs(txes, &mint_keypair, genesis_config.hash());
// fund all the accounts
transactions.iter().for_each(|tx| {
@ -125,7 +119,7 @@ fn main() {
&mint_keypair,
&tx.message.account_keys[0],
mint_total / txes as u64,
genesis_block.hash(),
genesis_config.hash(),
);
let x = bank.process_transaction(&fund);
x.unwrap();
@ -142,27 +136,22 @@ fn main() {
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 mut verified: Vec<_> = to_packets_chunked(&transactions.clone(), PACKETS_PER_BATCH);
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 blockstore = Arc::new(
Blockstore::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);
create_test_recorder(&bank, &blockstore, None);
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(
let banking_stage = BankingStage::new(
&cluster_info,
&poh_recorder,
verified_receiver,
vote_receiver,
None,
);
poh_recorder.lock().unwrap().set_bank(&bank);
@ -173,9 +162,8 @@ fn main() {
// 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 total_us = 0;
let mut tx_total_us = 0;
let mut txs_processed = 0;
let mut root = 1;
let collector = Pubkey::new_rand();
@ -185,6 +173,7 @@ fn main() {
chunk_len,
num_threads,
};
let mut total_sent = 0;
for _ in 0..ITERS {
let now = Instant::now();
let mut sent = 0;
@ -209,7 +198,7 @@ fn main() {
index,
);
for xv in v {
sent += xv.0.packets.len();
sent += xv.packets.len();
}
verified_sender.send(v.to_vec()).unwrap();
}
@ -226,7 +215,7 @@ fn main() {
sleep(Duration::from_millis(5));
}
}
if check_txs(&signal_receiver2, txes / CHUNKS, &poh_recorder) {
if check_txs(&signal_receiver, txes / CHUNKS, &poh_recorder) {
debug!(
"resetting bank {} tx count: {} txs_proc: {}",
bank.slot(),
@ -235,7 +224,7 @@ fn main() {
);
assert!(txs_processed < bank.transaction_count());
txs_processed = bank.transaction_count();
tx_total += duration_as_us(&now.elapsed());
tx_total_us += duration_as_us(&now.elapsed());
let mut poh_time = Measure::start("poh_time");
poh_recorder.lock().unwrap().reset(
@ -267,20 +256,21 @@ fn main() {
poh_time.as_us(),
);
} else {
tx_total += duration_as_us(&now.elapsed());
tx_total_us += 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());
total_us += duration_as_us(&now.elapsed());
debug!(
"time: {} us checked: {} sent: {}",
duration_as_us(&now.elapsed()),
txes / CHUNKS,
sent,
);
total_sent += sent;
if bank.slot() > 0 && bank.slot() % 16 == 0 {
for tx in transactions.iter_mut() {
@ -288,13 +278,7 @@ fn main() {
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();
verified = to_packets_chunked(&transactions.clone(), PACKETS_PER_BATCH);
}
start += chunk_len;
@ -302,18 +286,21 @@ fn main() {
}
eprintln!(
"{{'name': 'banking_bench_total', 'median': '{}'}}",
total / ITERS as u64,
(1000.0 * 1000.0 * total_sent as f64) / (total_us as f64),
);
eprintln!(
"{{'name': 'banking_bench_tx_total', 'median': '{}'}}",
tx_total / ITERS as u64,
(1000.0 * 1000.0 * total_sent as f64) / (tx_total_us as f64),
);
drop(verified_sender);
drop(vote_sender);
exit.store(true, Ordering::Relaxed);
banking_stage.join().unwrap();
debug!("waited for banking_stage");
poh_service.join().unwrap();
sleep(Duration::from_secs(1));
debug!("waited for poh_service");
}
let _unused = Blocktree::destroy(&ledger_path);
let _unused = Blockstore::destroy(&ledger_path);
}

View File

@ -1,19 +0,0 @@
[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"

View File

@ -2,38 +2,33 @@
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-bench-exchange"
version = "0.19.0-pre0"
version = "1.0.0"
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"
itertools = "0.8.2"
log = "0.4.8"
num-derive = "0.2"
num-derive = "0.3"
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"
serde_json = "1.0.46"
serde_yaml = "0.8.11"
solana-clap-utils = { path = "../clap-utils", version = "1.0.0" }
solana-core = { path = "../core", version = "1.0.0" }
solana-genesis = { path = "../genesis", version = "1.0.0" }
solana-client = { path = "../client", version = "1.0.0" }
solana-faucet = { path = "../faucet", version = "1.0.0" }
solana-exchange-program = { path = "../programs/exchange", version = "1.0.0" }
solana-logger = { path = "../logger", version = "1.0.0" }
solana-metrics = { path = "../metrics", version = "1.0.0" }
solana-net-utils = { path = "../net-utils", version = "1.0.0" }
solana-runtime = { path = "../runtime", version = "1.0.0" }
solana-sdk = { path = "../sdk", version = "1.0.0" }
[dev-dependencies]
solana-local-cluster = { path = "../local-cluster", version = "1.0.0" }

View File

@ -360,7 +360,7 @@ 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
- Matcher takes 2 B tokens as profit
Table becomes:

View File

@ -7,32 +7,36 @@ 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_exchange_program::{exchange_instruction, exchange_state::*, id};
use solana_faucet::faucet::request_airdrop_transaction;
use solana_genesis::Base64Account;
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};
use solana_sdk::{
client::{Client, SyncClient},
commitment_config::CommitmentConfig,
pubkey::Pubkey,
signature::{Keypair, Signer},
timing::{duration_as_ms, duration_as_s},
transaction::Transaction,
{system_instruction, system_program},
};
use std::{
cmp,
collections::{HashMap, VecDeque},
fs::File,
io::prelude::*,
mem,
net::SocketAddr,
path::Path,
process::exit,
sync::{
atomic::{AtomicBool, AtomicUsize, Ordering},
mpsc::{channel, Receiver, Sender},
Arc, RwLock,
},
thread::{sleep, Builder},
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
@ -89,7 +93,7 @@ pub fn create_client_accounts_file(
keypairs.iter().for_each(|keypair| {
accounts.insert(
serde_json::to_string(&keypair.to_bytes().to_vec()).unwrap(),
PrimordialAccountDetails {
Base64Account {
balance: fund_amount,
executable: false,
owner: system_program::id().to_string(),
@ -140,8 +144,7 @@ where
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 accounts: HashMap<String, Base64Account> = serde_yaml::from_reader(file).unwrap();
accounts
.into_iter()
.map(|(keypair, _)| {
@ -175,19 +178,28 @@ where
info!("Generating {:?} account keys", total_keys);
let mut account_keypairs = generate_keypairs(total_keys);
let src_pubkeys: Vec<_> = account_keypairs
let src_keypairs: Vec<_> = account_keypairs
.drain(0..accounts_in_groups)
.map(|keypair| keypair)
.collect();
let src_pubkeys: Vec<Pubkey> = src_keypairs
.iter()
.map(|keypair| keypair.pubkey())
.collect();
let profit_pubkeys: Vec<_> = account_keypairs
let profit_keypairs: Vec<_> = account_keypairs
.drain(0..accounts_in_groups)
.map(|keypair| keypair)
.collect();
let profit_pubkeys: Vec<Pubkey> = profit_keypairs
.iter()
.map(|keypair| keypair.pubkey())
.collect();
info!("Create {:?} source token accounts", src_pubkeys.len());
create_token_accounts(client, &trader_signers, &src_pubkeys);
create_token_accounts(client, &trader_signers, &src_keypairs);
info!("Create {:?} profit token accounts", profit_pubkeys.len());
create_token_accounts(client, &swapper_signers, &profit_pubkeys);
create_token_accounts(client, &swapper_signers, &profit_keypairs);
// Collect the max transaction rate and total tx count seen (single node only)
let sample_stats = Arc::new(RwLock::new(Vec::new()));
@ -244,7 +256,7 @@ where
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())
@ -381,7 +393,10 @@ fn swapper<T>(
let mut tries = 0;
let mut trade_index = 0;
while client
.get_balance(&trade_infos[trade_index].trade_account)
.get_balance_with_commitment(
&trade_infos[trade_index].trade_account,
CommitmentConfig::recent(),
)
.unwrap_or(0)
== 0
{
@ -435,7 +450,7 @@ fn swapper<T>(
account_group = (account_group + 1) % account_groups as usize;
let (blockhash, _fee_calculator) = client
.get_recent_blockhash()
.get_recent_blockhash_with_commitment(CommitmentConfig::recent())
.expect("Failed to get blockhash");
let to_swap_txs: Vec<_> = to_swap
.par_iter()
@ -558,27 +573,39 @@ fn trader<T>(
trade_account: trade.pubkey(),
order_info,
});
trades.push((signer, trade.pubkey(), side, src));
trades.push((signer, trade, side, src));
}
account_group = (account_group + 1) % account_groups as usize;
let (blockhash, _fee_calculator) = client
.get_recent_blockhash()
.get_recent_blockhash_with_commitment(CommitmentConfig::recent())
.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();
.map(|(owner, trade, side, src)| {
let owner_pubkey = &owner.pubkey();
let trade_pubkey = &trade.pubkey();
let space = mem::size_of::<ExchangeState>() as u64;
Transaction::new_signed_instructions(
&[s],
&[owner.as_ref(), trade],
vec![
system_instruction::create_account(owner, trade, 1, space, &id()),
system_instruction::create_account(
owner_pubkey,
trade_pubkey,
1,
space,
&id(),
),
exchange_instruction::trade_request(
owner, trade, *side, pair, tokens, price, src,
owner_pubkey,
trade_pubkey,
*side,
pair,
tokens,
price,
src,
),
],
blockhash,
@ -634,12 +661,14 @@ fn trader<T>(
}
}
fn verify_transfer<T>(sync_client: &T, tx: &Transaction) -> bool
fn verify_transaction<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) {
if let Ok(Some(r)) =
sync_client.get_signature_status_with_commitment(s, CommitmentConfig::recent())
{
match r {
Ok(_) => {
return true;
@ -658,16 +687,21 @@ fn verify_funding_transfer<T: SyncClient + ?Sized>(
tx: &Transaction,
amount: u64,
) -> bool {
for a in &tx.message().account_keys[1..] {
if client.get_balance(a).unwrap_or(0) >= amount {
return true;
if verify_transaction(client, tx) {
for a in &tx.message().account_keys[1..] {
if client
.get_balance_with_commitment(a, CommitmentConfig::recent())
.unwrap_or(0)
>= amount
{
return true;
}
}
}
false
}
pub fn fund_keys(client: &dyn Client, source: &Keypair, dests: &[Arc<Keypair>], lamports: u64) {
pub fn fund_keys<T: Client>(client: &T, 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();
@ -741,8 +775,9 @@ pub fn fund_keys(client: &dyn Client, source: &Keypair, dests: &[Arc<Keypair>],
to_fund_txs.len(),
);
let (blockhash, _fee_calculator) =
client.get_recent_blockhash().expect("blockhash");
let (blockhash, _fee_calculator) = client
.get_recent_blockhash_with_commitment(CommitmentConfig::recent())
.expect("blockhash");
to_fund_txs.par_iter_mut().for_each(|(k, tx)| {
tx.sign(&[*k], blockhash);
});
@ -779,27 +814,41 @@ pub fn fund_keys(client: &dyn Client, source: &Keypair, dests: &[Arc<Keypair>],
});
funded.append(&mut new_funded);
funded.retain(|(k, b)| {
client.get_balance(&k.pubkey()).unwrap_or(0) > lamports && *b > lamports
client
.get_balance_with_commitment(&k.pubkey(), CommitmentConfig::recent())
.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();
pub fn create_token_accounts<T: Client>(
client: &T,
signers: &[Arc<Keypair>],
accounts: &[Keypair],
) {
let mut notfunded: Vec<(&Arc<Keypair>, &Keypair)> = 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();
.map(|(from_keypair, new_keypair)| {
let owner_pubkey = &from_keypair.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);
let create_ix = system_instruction::create_account(
owner_pubkey,
&new_keypair.pubkey(),
1,
space,
&id(),
);
let request_ix =
exchange_instruction::account_request(owner_pubkey, &new_keypair.pubkey());
(
signer,
(from_keypair, new_keypair),
Transaction::new_unsigned_instructions(vec![create_ix, request_ix]),
)
})
@ -818,12 +867,13 @@ pub fn create_token_accounts(client: &dyn Client, signers: &[Arc<Keypair>], acco
let mut retries = 0;
while !to_create_txs.is_empty() {
let (blockhash, _fee_calculator) = client
.get_recent_blockhash()
.get_recent_blockhash_with_commitment(CommitmentConfig::recent())
.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
.par_iter_mut()
.for_each(|((from_keypair, to_keypair), tx)| {
tx.sign(&[from_keypair.as_ref(), to_keypair], blockhash);
});
to_create_txs.iter().for_each(|(_, tx)| {
client.async_send_transaction(tx.clone()).expect("transfer");
});
@ -831,11 +881,11 @@ pub fn create_token_accounts(client: &dyn Client, signers: &[Arc<Keypair>], acco
let mut waits = 0;
while !to_create_txs.is_empty() {
sleep(Duration::from_millis(200));
to_create_txs.retain(|(_, tx)| !verify_transfer(client, &tx));
to_create_txs.retain(|(_, tx)| !verify_transaction(client, &tx));
if to_create_txs.is_empty() {
break;
}
debug!(
info!(
" {} transactions outstanding, waits {:?}",
to_create_txs.len(),
waits
@ -848,7 +898,7 @@ pub fn create_token_accounts(client: &dyn Client, signers: &[Arc<Keypair>], acco
if !to_create_txs.is_empty() {
retries += 1;
debug!(" Retry {:?}", retries);
info!(" Retry {:?} {} txes left", retries, to_create_txs.len());
if retries >= 20 {
error!(
"create_token_accounts: Too many retries ({}), give up",
@ -860,9 +910,13 @@ pub fn create_token_accounts(client: &dyn Client, signers: &[Arc<Keypair>], acco
}
});
let mut new_notfunded: Vec<(&Arc<Keypair>, &Pubkey)> = vec![];
let mut new_notfunded: Vec<(&Arc<Keypair>, &Keypair)> = vec![];
for f in &notfunded {
if client.get_balance(&f.1).unwrap_or(0) == 0 {
if client
.get_balance_with_commitment(&f.1.pubkey(), CommitmentConfig::recent())
.unwrap_or(0)
== 0
{
new_notfunded.push(*f)
}
}
@ -918,8 +972,13 @@ fn generate_keypairs(num: u64) -> Vec<Keypair> {
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());
pub fn airdrop_lamports<T: Client>(
client: &T,
faucet_addr: &SocketAddr,
id: &Keypair,
amount: u64,
) {
let balance = client.get_balance_with_commitment(&id.pubkey(), CommitmentConfig::recent());
let balance = balance.unwrap_or(0);
if balance >= amount {
return;
@ -930,33 +989,40 @@ pub fn airdrop_lamports(client: &dyn Client, drone_addr: &SocketAddr, id: &Keypa
info!(
"Airdropping {:?} lamports from {} for {}",
amount_to_drop,
drone_addr,
faucet_addr,
id.pubkey(),
);
let mut tries = 0;
loop {
let (blockhash, _fee_calculator) = client
.get_recent_blockhash()
.get_recent_blockhash_with_commitment(CommitmentConfig::recent())
.expect("Failed to get blockhash");
match request_airdrop_transaction(&drone_addr, &id.pubkey(), amount_to_drop, blockhash) {
match request_airdrop_transaction(&faucet_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) {
if let Ok(Some(_)) = client.get_signature_status_with_commitment(
&signature,
CommitmentConfig::recent(),
) {
break;
}
sleep(Duration::from_millis(100));
}
if client.get_balance(&id.pubkey()).unwrap_or(0) >= amount {
if client
.get_balance_with_commitment(&id.pubkey(), CommitmentConfig::recent())
.unwrap_or(0)
>= amount
{
break;
}
}
Err(err) => {
panic!(
"Error requesting airdrop: {:?} to addr: {:?} amount: {}",
err, drone_addr, amount
err, faucet_addr, amount
);
}
};

View File

@ -1,14 +1,14 @@
use clap::{crate_description, crate_name, crate_version, value_t, App, Arg, ArgMatches};
use clap::{crate_description, crate_name, 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 solana_faucet::faucet::FAUCET_PORT;
use solana_sdk::signature::{read_keypair_file, Keypair};
use std::net::SocketAddr;
use std::process::exit;
use std::time::Duration;
pub struct Config {
pub entrypoint_addr: SocketAddr,
pub drone_addr: SocketAddr,
pub faucet_addr: SocketAddr,
pub identity: Keypair,
pub threads: usize,
pub num_nodes: usize,
@ -27,7 +27,7 @@ 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)),
faucet_addr: SocketAddr::from(([127, 0, 0, 1], FAUCET_PORT)),
identity: Keypair::new(),
num_nodes: 1,
threads: 4,
@ -44,10 +44,10 @@ impl Default for Config {
}
}
pub fn build_args<'a, 'b>() -> App<'a, 'b> {
pub fn build_args<'a, 'b>(version: &'b str) -> App<'a, 'b> {
App::new(crate_name!())
.about(crate_description!())
.version(crate_version!())
.version(version)
.arg(
Arg::with_name("entrypoint")
.short("n")
@ -59,14 +59,14 @@ pub fn build_args<'a, 'b>() -> App<'a, 'b> {
.help("Cluster entry point; defaults to 127.0.0.1:8001"),
)
.arg(
Arg::with_name("drone")
Arg::with_name("faucet")
.short("d")
.long("drone")
.long("faucet")
.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"),
.help("Location of the faucet; defaults to 127.0.0.1:9900"),
)
.arg(
Arg::with_name("identity")
@ -166,20 +166,22 @@ pub fn build_args<'a, 'b>() -> App<'a, 'b> {
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.entrypoint_addr = solana_net_utils::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())
args.faucet_addr = solana_net_utils::parse_host_port(matches.value_of("faucet").unwrap())
.unwrap_or_else(|e| {
eprintln!("failed to parse drone address: {}", e);
eprintln!("failed to parse faucet address: {}", e);
exit(1)
});
if matches.is_present("identity") {
args.identity = read_keypair(matches.value_of("identity").unwrap())
args.identity = read_keypair_file(matches.value_of("identity").unwrap())
.expect("can't read client identity");
} else {
args.identity = {

View File

@ -5,18 +5,18 @@ 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;
use solana_sdk::signature::Signer;
fn main() {
solana_logger::setup();
solana_metrics::set_panic_hook("bench-exchange");
let matches = cli::build_args().get_matches();
let matches = cli::build_args(solana_clap_utils::version!()).get_matches();
let cli_config = cli::extract_args(&matches);
let cli::Config {
entrypoint_addr,
drone_addr,
faucet_addr,
identity,
threads,
num_nodes,
@ -54,7 +54,7 @@ fn main() {
);
} else {
info!("Connecting to the cluster");
let (nodes, _replicators) =
let (nodes, _archivers) =
discover_cluster(&entrypoint_addr, num_nodes).unwrap_or_else(|_| {
panic!("Failed to discover nodes");
});
@ -73,7 +73,7 @@ fn main() {
const NUM_SIGNERS: u64 = 2;
airdrop_lamports(
&client,
&drone_addr,
&faucet_addr,
&config.identity,
fund_amount * (accounts_in_groups + 1) as u64 * NUM_SIGNERS,
);

View File

@ -1,7 +1,7 @@
use itertools::EitherOrBoth::{Both, Left, Right};
use itertools::Itertools;
use log::*;
use solana_exchange_api::exchange_state::*;
use solana_exchange_program::exchange_state::*;
use solana_sdk::pubkey::Pubkey;
use std::cmp::Ordering;
use std::collections::BinaryHeap;

View File

@ -1,19 +1,22 @@
use crate::local_cluster::{ClusterConfig, LocalCluster};
use log::*;
use solana_bench_exchange::bench::{airdrop_lamports, do_bench_exchange, Config};
use solana_core::gossip_service::{discover_cluster, get_multi_client};
use solana_core::validator::ValidatorConfig;
use solana_drone::drone::run_local_drone;
use solana_exchange_api::exchange_processor::process_instruction;
use solana_exchange_api::id;
use solana_exchange_program::exchange_processor::process_instruction;
use solana_exchange_program::id;
use solana_exchange_program::solana_exchange_program;
use solana_faucet::faucet::run_local_faucet;
use solana_local_cluster::local_cluster::{ClusterConfig, LocalCluster};
use solana_runtime::bank::Bank;
use solana_runtime::bank_client::BankClient;
use solana_sdk::genesis_block::create_genesis_block;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::genesis_config::create_genesis_config;
use solana_sdk::signature::{Keypair, Signer};
use std::process::exit;
use std::sync::mpsc::channel;
use std::time::Duration;
#[test]
#[ignore]
fn test_exchange_local_cluster() {
solana_logger::setup();
@ -44,16 +47,16 @@ fn test_exchange_local_cluster() {
..ClusterConfig::default()
});
let drone_keypair = Keypair::new();
let faucet_keypair = Keypair::new();
cluster.transfer(
&cluster.funding_keypair,
&drone_keypair.pubkey(),
&faucet_keypair.pubkey(),
2_000_000_000_000,
);
let (addr_sender, addr_receiver) = channel();
run_local_drone(drone_keypair, addr_sender, Some(1_000_000_000_000));
let drone_addr = addr_receiver.recv_timeout(Duration::from_secs(2)).unwrap();
run_local_faucet(faucet_keypair, addr_sender, Some(1_000_000_000_000));
let faucet_addr = addr_receiver.recv_timeout(Duration::from_secs(2)).unwrap();
info!("Connecting to the cluster");
let (nodes, _) =
@ -70,7 +73,7 @@ fn test_exchange_local_cluster() {
const NUM_SIGNERS: u64 = 2;
airdrop_lamports(
&client,
&drone_addr,
&faucet_addr,
&config.identity,
fund_amount * (accounts_in_groups + 1) as u64 * NUM_SIGNERS,
);
@ -81,8 +84,8 @@ fn test_exchange_local_cluster() {
#[test]
fn test_exchange_bank_client() {
solana_logger::setup();
let (genesis_block, identity) = create_genesis_block(100_000_000_000_000);
let mut bank = Bank::new(&genesis_block);
let (genesis_config, identity) = create_genesis_config(100_000_000_000_000);
let mut bank = Bank::new(&genesis_config);
bank.add_instruction_processor(id(), process_instruction);
let clients = vec![BankClient::new(bank)];

View File

@ -2,13 +2,14 @@
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-bench-streamer"
version = "0.19.0-pre0"
version = "1.0.0"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
[dependencies]
clap = "2.33.0"
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" }
solana-clap-utils = { path = "../clap-utils", version = "1.0.0" }
solana-core = { path = "../core", version = "1.0.0" }
solana-logger = { path = "../logger", version = "1.0.0" }
solana-net-utils = { path = "../net-utils", version = "1.0.0" }

View File

@ -1,7 +1,5 @@
use clap::{crate_description, crate_name, crate_version, App, Arg};
use solana_core::packet::PacketsRecycler;
use solana_core::packet::{Packet, Packets, BLOB_SIZE, PACKET_DATA_SIZE};
use solana_core::result::Result;
use clap::{crate_description, crate_name, App, Arg};
use solana_core::packet::{Packet, Packets, PacketsRecycler, PACKET_DATA_SIZE};
use solana_core::streamer::{receiver, PacketReceiver};
use std::cmp::max;
use std::net::{IpAddr, Ipv4Addr, SocketAddr, UdpSocket};
@ -9,7 +7,7 @@ use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
use std::sync::mpsc::channel;
use std::sync::Arc;
use std::thread::sleep;
use std::thread::{spawn, JoinHandle};
use std::thread::{spawn, JoinHandle, Result};
use std::time::Duration;
use std::time::SystemTime;
@ -29,7 +27,7 @@ fn producer(addr: &SocketAddr, exit: Arc<AtomicBool>) -> JoinHandle<()> {
let mut num = 0;
for p in &msgs.packets {
let a = p.meta.addr();
assert!(p.meta.size < BLOB_SIZE);
assert!(p.meta.size < PACKET_DATA_SIZE);
send.send_to(&p.data[..p.meta.size], &a).unwrap();
num += 1;
}
@ -54,7 +52,7 @@ fn main() -> Result<()> {
let matches = App::new(crate_name!())
.about(crate_description!())
.version(crate_version!())
.version(solana_clap_utils::version!())
.arg(
Arg::with_name("num-recv-sockets")
.long("num-recv-sockets")
@ -77,7 +75,7 @@ fn main() -> Result<()> {
let mut read_threads = Vec::new();
let recycler = PacketsRecycler::default();
for _ in 0..num_sockets {
let read = solana_netutil::bind_to(port, false).unwrap();
let read = solana_net_utils::bind_to(port, false).unwrap();
read.set_read_timeout(Some(Duration::new(1, 0))).unwrap();
addr = read.local_addr().unwrap();

View File

@ -2,34 +2,36 @@
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-bench-tps"
version = "0.19.0-pre0"
version = "1.0.0"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
[dependencies]
bincode = "1.1.4"
bincode = "1.2.1"
clap = "2.33.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" }
serde_json = "1.0.46"
serde_yaml = "0.8.11"
solana-clap-utils = { path = "../clap-utils", version = "1.0.0" }
solana-core = { path = "../core", version = "1.0.0" }
solana-genesis = { path = "../genesis", version = "1.0.0" }
solana-client = { path = "../client", version = "1.0.0" }
solana-faucet = { path = "../faucet", version = "1.0.0" }
solana-librapay = { path = "../programs/librapay", version = "1.0.0", optional = true }
solana-logger = { path = "../logger", version = "1.0.0" }
solana-metrics = { path = "../metrics", version = "1.0.0" }
solana-measure = { path = "../measure", version = "1.0.0" }
solana-net-utils = { path = "../net-utils", version = "1.0.0" }
solana-runtime = { path = "../runtime", version = "1.0.0" }
solana-sdk = { path = "../sdk", version = "1.0.0" }
solana-move-loader-program = { path = "../programs/move_loader", version = "1.0.0", optional = true }
[dev-dependencies]
serial_test = "0.2.0"
serial_test_derive = "0.2.0"
serial_test = "0.3.2"
serial_test_derive = "0.4.0"
solana-local-cluster = { path = "../local-cluster", version = "1.0.0" }
[features]
move = ["solana-librapay", "solana-move-loader-program"]

File diff suppressed because it is too large Load Diff

View File

@ -1,29 +1,28 @@
use std::net::SocketAddr;
use std::process::exit;
use std::time::Duration;
use clap::{crate_description, crate_name, crate_version, App, Arg, ArgMatches};
use solana_drone::drone::DRONE_PORT;
use clap::{crate_description, crate_name, App, Arg, ArgMatches};
use solana_faucet::faucet::FAUCET_PORT;
use solana_sdk::fee_calculator::FeeCalculator;
use solana_sdk::signature::{read_keypair, Keypair, KeypairUtil};
use solana_sdk::signature::{read_keypair_file, Keypair};
use std::{net::SocketAddr, process::exit, time::Duration};
const NUM_LAMPORTS_PER_ACCOUNT_DEFAULT: u64 = 64 * 1024;
const NUM_LAMPORTS_PER_ACCOUNT_DEFAULT: u64 = solana_sdk::native_token::LAMPORTS_PER_SOL;
/// Holds the configuration for a single run of the benchmark
pub struct Config {
pub entrypoint_addr: SocketAddr,
pub drone_addr: SocketAddr,
pub faucet_addr: SocketAddr,
pub id: Keypair,
pub threads: usize,
pub num_nodes: usize,
pub duration: Duration,
pub tx_count: usize,
pub keypair_multiplier: 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 multi_client: bool,
pub use_move: bool,
pub num_lamports_per_account: u64,
}
@ -32,18 +31,20 @@ impl Default for Config {
fn default() -> Config {
Config {
entrypoint_addr: SocketAddr::from(([127, 0, 0, 1], 8001)),
drone_addr: SocketAddr::from(([127, 0, 0, 1], DRONE_PORT)),
faucet_addr: SocketAddr::from(([127, 0, 0, 1], FAUCET_PORT)),
id: Keypair::new(),
threads: 4,
num_nodes: 1,
duration: Duration::new(std::u64::MAX, 0),
tx_count: 500_000,
thread_batch_sleep_ms: 0,
tx_count: 50_000,
keypair_multiplier: 8,
thread_batch_sleep_ms: 1000,
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,
multi_client: true,
use_move: false,
num_lamports_per_account: NUM_LAMPORTS_PER_ACCOUNT_DEFAULT,
}
@ -51,9 +52,9 @@ impl Default for Config {
}
/// Defines and builds the CLI args for a run of the benchmark
pub fn build_args<'a, 'b>() -> App<'a, 'b> {
pub fn build_args<'a, 'b>(version: &'b str) -> App<'a, 'b> {
App::new(crate_name!()).about(crate_description!())
.version(crate_version!())
.version(version)
.arg(
Arg::with_name("entrypoint")
.short("n")
@ -63,12 +64,12 @@ pub fn build_args<'a, 'b>() -> App<'a, 'b> {
.help("Rendezvous with the cluster at this entry point; defaults to 127.0.0.1:8001"),
)
.arg(
Arg::with_name("drone")
Arg::with_name("faucet")
.short("d")
.long("drone")
.long("faucet")
.value_name("HOST:PORT")
.takes_value(true)
.help("Location of the drone; defaults to entrypoint:DRONE_PORT"),
.help("Location of the faucet; defaults to entrypoint:FAUCET_PORT"),
)
.arg(
Arg::with_name("identity")
@ -111,6 +112,11 @@ pub fn build_args<'a, 'b>() -> App<'a, 'b> {
.long("use-move")
.help("Use Move language transactions to perform transfers."),
)
.arg(
Arg::with_name("no-multi-client")
.long("no-multi-client")
.help("Disable multi-client support, only transact with the entrypoint."),
)
.arg(
Arg::with_name("tx_count")
.long("tx_count")
@ -118,6 +124,13 @@ pub fn build_args<'a, 'b>() -> App<'a, 'b> {
.takes_value(true)
.help("Number of transactions to send per batch")
)
.arg(
Arg::with_name("keypair_multiplier")
.long("keypair-multiplier")
.value_name("NUM")
.takes_value(true)
.help("Multiply by transaction count to determine number of keypairs to create")
)
.arg(
Arg::with_name("thread-batch-sleep-ms")
.short("z")
@ -170,21 +183,21 @@ pub fn extract_args<'a>(matches: &ArgMatches<'a>) -> Config {
let mut args = Config::default();
if let Some(addr) = matches.value_of("entrypoint") {
args.entrypoint_addr = solana_netutil::parse_host_port(addr).unwrap_or_else(|e| {
args.entrypoint_addr = solana_net_utils::parse_host_port(addr).unwrap_or_else(|e| {
eprintln!("failed to parse entrypoint address: {}", e);
exit(1)
});
}
if let Some(addr) = matches.value_of("drone") {
args.drone_addr = solana_netutil::parse_host_port(addr).unwrap_or_else(|e| {
eprintln!("failed to parse drone address: {}", e);
if let Some(addr) = matches.value_of("faucet") {
args.faucet_addr = solana_net_utils::parse_host_port(addr).unwrap_or_else(|e| {
eprintln!("failed to parse faucet address: {}", e);
exit(1)
});
}
if matches.is_present("identity") {
args.id = read_keypair(matches.value_of("identity").unwrap())
args.id = read_keypair_file(matches.value_of("identity").unwrap())
.expect("can't read client identity");
}
@ -204,7 +217,15 @@ pub fn extract_args<'a>(matches: &ArgMatches<'a>) -> Config {
}
if let Some(s) = matches.value_of("tx_count") {
args.tx_count = s.to_string().parse().expect("can't parse tx_account");
args.tx_count = s.to_string().parse().expect("can't parse tx_count");
}
if let Some(s) = matches.value_of("keypair_multiplier") {
args.keypair_multiplier = s
.to_string()
.parse()
.expect("can't parse keypair-multiplier");
assert!(args.keypair_multiplier >= 2);
}
if let Some(t) = matches.value_of("thread-batch-sleep-ms") {
@ -232,6 +253,7 @@ pub fn extract_args<'a>(matches: &ArgMatches<'a>) -> Config {
}
args.use_move = matches.is_present("use-move");
args.multi_client = !matches.is_present("no-multi-client");
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");

View File

@ -1,45 +1,47 @@
use log::*;
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_core::gossip_service::{discover_cluster, get_client, get_multi_client};
use solana_genesis::Base64Account;
use solana_sdk::fee_calculator::FeeCalculator;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::signature::{Keypair, Signer};
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 std::{collections::HashMap, fs::File, io::prelude::*, path::Path, process::exit, sync::Arc};
/// 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_with_filter("solana=info");
solana_logger::setup_with_default("solana=info");
solana_metrics::set_panic_hook("bench-tps");
let matches = cli::build_args().get_matches();
let matches = cli::build_args(solana_clap_utils::version!()).get_matches();
let cli_config = cli::extract_args(&matches);
let cli::Config {
entrypoint_addr,
drone_addr,
faucet_addr,
id,
num_nodes,
tx_count,
keypair_multiplier,
client_ids_and_stake_file,
write_to_client_file,
read_from_client_file,
target_lamports_per_signature,
use_move,
multi_client,
num_lamports_per_account,
..
} = &cli_config;
let keypair_count = *tx_count * keypair_multiplier;
if *write_to_client_file {
let (keypairs, _) = generate_keypairs(&id, *tx_count as u64 * 2);
info!("Generating {} keypairs", keypair_count);
let (keypairs, _) = generate_keypairs(&id, keypair_count as u64);
let num_accounts = keypairs.len() as u64;
let max_fee = FeeCalculator::new(*target_lamports_per_signature).max_lamports_per_signature;
let max_fee =
FeeCalculator::new(*target_lamports_per_signature, 0).max_lamports_per_signature;
let num_lamports_per_account = (num_accounts - 1 + NUM_SIGNATURES_FOR_TXS * max_fee)
/ num_accounts
+ num_lamports_per_account;
@ -47,7 +49,7 @@ fn main() {
keypairs.iter().for_each(|keypair| {
accounts.insert(
serde_json::to_string(&keypair.to_bytes().to_vec()).unwrap(),
PrimordialAccountDetails {
Base64Account {
balance: num_lamports_per_account,
executable: false,
owner: system_program::id().to_string(),
@ -56,6 +58,7 @@ fn main() {
);
});
info!("Writing {}", client_ids_and_stake_file);
let serialized = serde_yaml::to_string(&accounts).unwrap();
let path = Path::new(&client_ids_and_stake_file);
let mut file = File::create(path).unwrap();
@ -63,29 +66,33 @@ fn main() {
return;
}
println!("Connecting to the cluster");
let (nodes, _replicators) =
info!("Connecting to the cluster");
let (nodes, _archivers) =
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);
let client = if *multi_client {
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);
}
Arc::new(client)
} else {
Arc::new(get_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 (keypairs, move_keypairs) = 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();
info!("Reading {}", client_ids_and_stake_file);
let accounts: HashMap<String, Base64Account> = serde_yaml::from_reader(file).unwrap();
let mut keypairs = vec![];
let mut last_balance = 0;
@ -96,17 +103,27 @@ fn main() {
keypairs.push(Keypair::from_bytes(&bytes).unwrap());
last_balance = primordial_account.balance;
});
if keypairs.len() < keypair_count {
eprintln!(
"Expected {} accounts in {}, only received {} (--tx_count mismatch?)",
keypair_count,
client_ids_and_stake_file,
keypairs.len(),
);
exit(1);
}
// 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)
(keypairs, None)
} else {
generate_and_fund_keypairs(
&client,
Some(*drone_addr),
client.clone(),
Some(*faucet_addr),
&id,
*tx_count,
keypair_count,
*num_lamports_per_account,
*use_move,
)
@ -116,11 +133,5 @@ fn main() {
})
};
do_bench_tps(
vec![client],
cli_config,
keypairs,
keypair_balance,
move_keypairs,
);
do_bench_tps(client, cli_config, keypairs, move_keypairs);
}

View File

@ -1,57 +1,67 @@
use crate::local_cluster::{ClusterConfig, LocalCluster};
use serial_test_derive::serial;
use solana_bench_tps::bench::{do_bench_tps, generate_and_fund_keypairs};
use solana_bench_tps::cli::Config;
use solana_client::thin_client::create_client;
use solana_core::cluster_info::FULLNODE_PORT_RANGE;
use solana_core::cluster_info::VALIDATOR_PORT_RANGE;
use solana_core::validator::ValidatorConfig;
use solana_drone::drone::run_local_drone;
use solana_move_loader_program;
use solana_sdk::signature::{Keypair, KeypairUtil};
use std::sync::mpsc::channel;
use solana_faucet::faucet::run_local_faucet;
use solana_local_cluster::local_cluster::{ClusterConfig, LocalCluster};
#[cfg(feature = "move")]
use solana_sdk::move_loader::solana_move_loader_program;
use solana_sdk::signature::{Keypair, Signer};
use std::sync::{mpsc::channel, Arc};
use std::time::Duration;
fn test_bench_tps_local_cluster(config: Config) {
#[cfg(feature = "move")]
let native_instruction_processors = vec![solana_move_loader_program()];
#[cfg(not(feature = "move"))]
let native_instruction_processors = vec![];
solana_logger::setup();
const NUM_NODES: usize = 1;
let cluster = LocalCluster::new(&ClusterConfig {
node_stakes: vec![999_990; NUM_NODES],
cluster_lamports: 200_000_000,
validator_configs: vec![ValidatorConfig::default(); NUM_NODES],
native_instruction_processors: vec![solana_move_loader_program!()],
native_instruction_processors,
..ClusterConfig::default()
});
let drone_keypair = Keypair::new();
let faucet_keypair = Keypair::new();
cluster.transfer(
&cluster.funding_keypair,
&drone_keypair.pubkey(),
&faucet_keypair.pubkey(),
100_000_000,
);
let client = create_client(
let client = Arc::new(create_client(
(cluster.entry_point_info.rpc, cluster.entry_point_info.tpu),
FULLNODE_PORT_RANGE,
);
VALIDATOR_PORT_RANGE,
));
let (addr_sender, addr_receiver) = channel();
run_local_drone(drone_keypair, addr_sender, None);
let drone_addr = addr_receiver.recv_timeout(Duration::from_secs(2)).unwrap();
run_local_faucet(faucet_keypair, addr_sender, None);
let faucet_addr = addr_receiver.recv_timeout(Duration::from_secs(2)).unwrap();
let lamports_per_account = 100;
let (keypairs, move_keypairs, _keypair_balance) = generate_and_fund_keypairs(
&client,
Some(drone_addr),
let keypair_count = config.tx_count * config.keypair_multiplier;
let (keypairs, move_keypairs) = generate_and_fund_keypairs(
client.clone(),
Some(faucet_addr),
&config.id,
config.tx_count,
keypair_count,
lamports_per_account,
config.use_move,
)
.unwrap();
let total = do_bench_tps(vec![client], config, keypairs, 0, move_keypairs);
assert!(total > 100);
let _total = do_bench_tps(client, config, keypairs, move_keypairs);
#[cfg(not(debug_assertions))]
assert!(_total > 100);
}
#[test]
@ -69,7 +79,7 @@ fn test_bench_tps_local_cluster_solana() {
fn test_bench_tps_local_cluster_move() {
let mut config = Config::default();
config.tx_count = 100;
config.duration = Duration::from_secs(20);
config.duration = Duration::from_secs(10);
config.use_move = true;
test_bench_tps_local_cluster(config);

View File

@ -1,7 +1,7 @@
Building the Solana book
---
Install the book's dependnecies, build, and test the book:
Install the book's dependencies, build, and test the book:
```bash
$ ./build.sh

View File

@ -1,15 +0,0 @@
msc {
client,leader,verifier_a,verifier_b,verifier_c;
client=>leader [ label = "SUBMIT" ] ;
leader=>client [ label = "CONFIRMED" ] ;
leader=>verifier_a [ label = "CONFIRMED" ] ;
leader=>verifier_b [ label = "CONFIRMED" ] ;
leader=>verifier_c [ label = "CONFIRMED" ] ;
verifier_a=>leader [ label = "VERIFIED" ] ;
verifier_b=>leader [ label = "VERIFIED" ] ;
leader=>client [ label = "FINALIZED" ] ;
leader=>verifier_a [ label = "FINALIZED" ] ;
leader=>verifier_b [ label = "FINALIZED" ] ;
leader=>verifier_c [ label = "FINALIZED" ] ;
}

View File

@ -24,7 +24,7 @@ msc {
... ;
Validator abox Validator [label="\nmax\nlockout\n"];
|||;
StakerX => Cluster [label="StakeState::RedeemCredits()"];
StakerY => Cluster [label="StakeState::RedeemCredits()"] ;
Cluster box Cluster [label="credits redeemed (at epoch)"];
}

View File

@ -0,0 +1,19 @@
+----------+
| Bank-Hash|
+----------+
^
|
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
: :
: +--------------+ +-------------+ :
: Hash( | Accounts-Hash| + | Block-Merkle| ) :
: +--------------+ +-------------+ :
: ^ :
+~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
|
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
: +---------------+ +---------------+ +---------------+ :
: Hash( | Hash(Account1)| + | Hash(Account2)| + ... + | Hash(AccountN)| ) :
: +---------------+ +---------------+ +---------------+ :
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+

View File

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

View File

@ -7,7 +7,7 @@
| TVU | |
| | |
| .-------. .------------. .----+---. .---------. |
.------------. | | Blob | | Retransmit | | Replay | | Storage | |
.------------. | | Shred | | Retransmit | | Replay | | Storage | |
| Upstream +----->| Fetch +-->| Stage +-->| Stage +-->| Stage | |
| Validators | | | Stage | | | | | | | |
`------------` | `-------` `----+-------` `----+---` `---------` |

View File

@ -1,30 +1,30 @@
.--------------------------------------.
| Validator |
| |
.--------. | .-------------------. |
| |---->| | |
| Client | | | JSON RPC Service | |
| |<----| | |
`----+---` | `-------------------` |
| | ^ |
| | | .----------------. | .------------------.
| | | | Gossip Service |<----------| Validators |
| | | `----------------` | | |
| | | ^ | | |
| | | | | | .------------. |
| | .---+---. .----+---. .-----------. | | | | |
| | | Bank |<-+ Replay | | BlobFetch |<------+ Upstream | |
| | | Forks | | Stage | | Stage | | | | Validators | |
| | `-------` `--------` `--+--------` | | | | |
| | ^ ^ | | | `------------` |
| | | | v | | |
| | | .--+--------. | | |
| | | | Blocktree | | | |
| | | `-----------` | | .------------. |
| | | ^ | | | | |
| | | | | | | Downstream | |
| | .--+--. .-------+---. | | | Validators | |
`-------->| TPU +---->| Broadcast +--------------->| | |
| `-----` | Stage | | | `------------` |
| `-----------` | `------------------`
`--------------------------------------`
.---------------------------------------.
| Validator |
| |
.--------. | .-------------------. |
| |---->| | |
| Client | | | JSON RPC Service | |
| |<----| | |
`----+---` | `-------------------` |
| | ^ |
| | | .----------------. | .------------------.
| | | | Gossip Service |<-----------| Validators |
| | | `----------------` | | |
| | | ^ | | |
| | | | | | .------------. |
| | .---+---. .----+---. .------------. | | | | |
| | | Bank |<-+ Replay | | ShredFetch |<------+ Upstream | |
| | | Forks | | Stage | | Stage | | | | Validators | |
| | `-------` `--------` `--+---------` | | | | |
| | ^ ^ | | | `------------` |
| | | | v | | |
| | | .--+---------. | | |
| | | | Blockstore | | | |
| | | `------------` | | .------------. |
| | | ^ | | | | |
| | | | | | | Downstream | |
| | .--+--. .-------+---. | | | Validators | |
`-------->| TPU +---->| Broadcast +---------------->| | |
| `-----` | Stage | | | `------------` |
| `-----------` | `------------------`
`---------------------------------------`

34
book/build-cli-usage.sh Executable file
View File

@ -0,0 +1,34 @@
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")"
usage=$(cargo -q run -p solana-cli -- -C ~/.foo --help | sed 's|'"$HOME"'|~|g')
out=${1:-src/cli/usage.md}
cat src/cli/.usage.md.header > "$out"
section() {
declare mark=${2:-"###"}
declare section=$1
read -r name rest <<<"$section"
printf '%s %s
' "$mark" "$name"
printf '```text
%s
```
' "$section"
}
section "$usage" >> "$out"
in_subcommands=0
while read -r subcommand rest; do
[[ $subcommand == "SUBCOMMANDS:" ]] && in_subcommands=1 && continue
if ((in_subcommands)); then
section "$(cargo -q run -p solana-cli -- help "$subcommand" | sed 's|'"$HOME"'|~|g')" "####" >> "$out"
fi
done <<<"$usage">>"$out"

View File

@ -1,11 +0,0 @@
#!/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,4 +3,14 @@ set -e
cd "$(dirname "$0")"
# md check
find src -name '*.md' -a \! -name SUMMARY.md |
while read -r file; do
if ! grep -q '('"${file#src/}"')' src/SUMMARY.md; then
echo "Error: $file missing from SUMMARY.md"
exit 1
fi
done
make -j"$(nproc)" test

View File

@ -1,6 +1,6 @@
BOB_SRCS=$(wildcard art/*.bob)
MSC_SRCS=$(wildcard art/*.msc)
MD_SRCS=$(wildcard src/*.md)
MD_SRCS=$(wildcard src/*.md src/*/*.md)
SVG_IMGS=$(BOB_SRCS:art/%.bob=src/.gitbook/assets/%.svg) $(MSC_SRCS:art/%.msc=src/.gitbook/assets/%.svg)

View File

@ -1,159 +0,0 @@
<!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="600px" height="330px"
viewBox="0 0 600 330"
xmlns="http://www.w3.org/2000/svg" shape-rendering="crispEdges"
stroke-width="1" text-rendering="geometricPrecision">
<polygon fill="white" points="44,7 74,7 74,16 44,16"/>
<text x="60" y="16" textLength="28" font-family="Helvetica" font-size="12" fill="black" text-anchor="middle">
client
</text>
<polygon fill="white" points="162,7 196,7 196,16 162,16"/>
<text x="180" y="16" textLength="33" font-family="Helvetica" font-size="12" fill="black" text-anchor="middle">
leader
</text>
<polygon fill="white" points="274,7 324,7 324,16 274,16"/>
<text x="300" y="16" textLength="49" font-family="Helvetica" font-size="12" fill="black" text-anchor="middle">
verifier_a
</text>
<polygon fill="white" points="394,7 444,7 444,16 394,16"/>
<text x="420" y="16" textLength="49" font-family="Helvetica" font-size="12" fill="black" text-anchor="middle">
verifier_b
</text>
<polygon fill="white" points="514,7 564,7 564,16 514,16"/>
<text x="540" y="16" textLength="49" font-family="Helvetica" font-size="12" fill="black" text-anchor="middle">
verifier_c
</text>
<line x1="60" y1="22" x2="60" y2="50" stroke="black"/>
<line x1="180" y1="22" x2="180" y2="50" stroke="black"/>
<line x1="300" y1="22" x2="300" y2="50" stroke="black"/>
<line x1="420" y1="22" x2="420" y2="50" stroke="black"/>
<line x1="540" y1="22" x2="540" y2="50" stroke="black"/>
<line x1="60" y1="33" x2="180" y2="33" stroke="black"/>
<polygon fill="black" points="180,33 170,39 170,27"/>
<polygon fill="white" points="96,23 143,23 143,32 96,32"/>
<text x="97" y="32" textLength="45" font-family="Helvetica" font-size="12" fill="black">
SUBMIT
</text>
<line x1="60" y1="50" x2="60" y2="78" stroke="black"/>
<line x1="180" y1="50" x2="180" y2="78" stroke="black"/>
<line x1="300" y1="50" x2="300" y2="78" stroke="black"/>
<line x1="420" y1="50" x2="420" y2="78" stroke="black"/>
<line x1="540" y1="50" x2="540" y2="78" stroke="black"/>
<line x1="180" y1="61" x2="60" y2="61" stroke="black"/>
<polygon fill="black" points="60,61 70,67 70,55"/>
<polygon fill="white" points="82,51 157,51 157,60 82,60"/>
<text x="83" y="60" textLength="73" font-family="Helvetica" font-size="12" fill="black">
CONFIRMED
</text>
<line x1="60" y1="78" x2="60" y2="106" stroke="black"/>
<line x1="180" y1="78" x2="180" y2="106" stroke="black"/>
<line x1="300" y1="78" x2="300" y2="106" stroke="black"/>
<line x1="420" y1="78" x2="420" y2="106" stroke="black"/>
<line x1="540" y1="78" x2="540" y2="106" stroke="black"/>
<line x1="180" y1="89" x2="300" y2="89" stroke="black"/>
<polygon fill="black" points="300,89 290,95 290,83"/>
<polygon fill="white" points="202,79 277,79 277,88 202,88"/>
<text x="203" y="88" textLength="73" font-family="Helvetica" font-size="12" fill="black">
CONFIRMED
</text>
<line x1="60" y1="106" x2="60" y2="134" stroke="black"/>
<line x1="180" y1="106" x2="180" y2="134" stroke="black"/>
<line x1="300" y1="106" x2="300" y2="134" stroke="black"/>
<line x1="420" y1="106" x2="420" y2="134" stroke="black"/>
<line x1="540" y1="106" x2="540" y2="134" stroke="black"/>
<line x1="180" y1="117" x2="420" y2="117" stroke="black"/>
<polygon fill="black" points="420,117 410,123 410,111"/>
<polygon fill="white" points="262,107 337,107 337,116 262,116"/>
<text x="263" y="116" textLength="73" font-family="Helvetica" font-size="12" fill="black">
CONFIRMED
</text>
<line x1="60" y1="134" x2="60" y2="162" stroke="black"/>
<line x1="180" y1="134" x2="180" y2="162" stroke="black"/>
<line x1="300" y1="134" x2="300" y2="162" stroke="black"/>
<line x1="420" y1="134" x2="420" y2="162" stroke="black"/>
<line x1="540" y1="134" x2="540" y2="162" stroke="black"/>
<line x1="180" y1="145" x2="540" y2="145" stroke="black"/>
<polygon fill="black" points="540,145 530,151 530,139"/>
<polygon fill="white" points="322,135 397,135 397,144 322,144"/>
<text x="323" y="144" textLength="73" font-family="Helvetica" font-size="12" fill="black">
CONFIRMED
</text>
<line x1="60" y1="162" x2="60" y2="190" stroke="black"/>
<line x1="180" y1="162" x2="180" y2="190" stroke="black"/>
<line x1="300" y1="162" x2="300" y2="190" stroke="black"/>
<line x1="420" y1="162" x2="420" y2="190" stroke="black"/>
<line x1="540" y1="162" x2="540" y2="190" stroke="black"/>
<line x1="300" y1="173" x2="180" y2="173" stroke="black"/>
<polygon fill="black" points="180,173 190,179 190,167"/>
<polygon fill="white" points="211,163 268,163 268,172 211,172"/>
<text x="212" y="172" textLength="55" font-family="Helvetica" font-size="12" fill="black">
VERIFIED
</text>
<line x1="60" y1="190" x2="60" y2="218" stroke="black"/>
<line x1="180" y1="190" x2="180" y2="218" stroke="black"/>
<line x1="300" y1="190" x2="300" y2="218" stroke="black"/>
<line x1="420" y1="190" x2="420" y2="218" stroke="black"/>
<line x1="540" y1="190" x2="540" y2="218" stroke="black"/>
<line x1="420" y1="201" x2="180" y2="201" stroke="black"/>
<polygon fill="black" points="180,201 190,207 190,195"/>
<polygon fill="white" points="271,191 328,191 328,200 271,200"/>
<text x="272" y="200" textLength="55" font-family="Helvetica" font-size="12" fill="black">
VERIFIED
</text>
<line x1="60" y1="218" x2="60" y2="246" stroke="black"/>
<line x1="180" y1="218" x2="180" y2="246" stroke="black"/>
<line x1="300" y1="218" x2="300" y2="246" stroke="black"/>
<line x1="420" y1="218" x2="420" y2="246" stroke="black"/>
<line x1="540" y1="218" x2="540" y2="246" stroke="black"/>
<line x1="180" y1="229" x2="60" y2="229" stroke="black"/>
<polygon fill="black" points="60,229 70,235 70,223"/>
<polygon fill="white" points="88,219 151,219 151,228 88,228"/>
<text x="89" y="228" textLength="61" font-family="Helvetica" font-size="12" fill="black">
FINALIZED
</text>
<line x1="60" y1="246" x2="60" y2="274" stroke="black"/>
<line x1="180" y1="246" x2="180" y2="274" stroke="black"/>
<line x1="300" y1="246" x2="300" y2="274" stroke="black"/>
<line x1="420" y1="246" x2="420" y2="274" stroke="black"/>
<line x1="540" y1="246" x2="540" y2="274" stroke="black"/>
<line x1="180" y1="257" x2="300" y2="257" stroke="black"/>
<polygon fill="black" points="300,257 290,263 290,251"/>
<polygon fill="white" points="208,247 271,247 271,256 208,256"/>
<text x="209" y="256" textLength="61" font-family="Helvetica" font-size="12" fill="black">
FINALIZED
</text>
<line x1="60" y1="274" x2="60" y2="302" stroke="black"/>
<line x1="180" y1="274" x2="180" y2="302" stroke="black"/>
<line x1="300" y1="274" x2="300" y2="302" stroke="black"/>
<line x1="420" y1="274" x2="420" y2="302" stroke="black"/>
<line x1="540" y1="274" x2="540" y2="302" stroke="black"/>
<line x1="180" y1="285" x2="420" y2="285" stroke="black"/>
<polygon fill="black" points="420,285 410,291 410,279"/>
<polygon fill="white" points="268,275 331,275 331,284 268,284"/>
<text x="269" y="284" textLength="61" font-family="Helvetica" font-size="12" fill="black">
FINALIZED
</text>
<line x1="60" y1="302" x2="60" y2="330" stroke="black"/>
<line x1="180" y1="302" x2="180" y2="330" stroke="black"/>
<line x1="300" y1="302" x2="300" y2="330" stroke="black"/>
<line x1="420" y1="302" x2="420" y2="330" stroke="black"/>
<line x1="540" y1="302" x2="540" y2="330" stroke="black"/>
<line x1="180" y1="313" x2="540" y2="313" stroke="black"/>
<polygon fill="black" points="540,313 530,319 530,307"/>
<polygon fill="white" points="328,303 391,303 391,312 328,312"/>
<text x="329" y="312" textLength="61" font-family="Helvetica" font-size="12" fill="black">
FINALIZED
</text>
<line x1="60" y1="324" x2="60" y2="330" stroke="black"/>
<line x1="180" y1="324" x2="180" y2="330" stroke="black"/>
<line x1="300" y1="324" x2="300" y2="330" stroke="black"/>
<line x1="420" y1="324" x2="420" y2="330" stroke="black"/>
<line x1="540" y1="324" x2="540" y2="330" stroke="black"/>
</svg>

Before

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -1,183 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -1,322 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 8.3 KiB

View File

@ -1,138 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -1,192 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

View File

@ -1,330 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -1,92 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -1,92 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -1,122 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 KiB

View File

@ -1,238 +0,0 @@
<!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>

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 KiB

View File

@ -1,346 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -1,237 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -1,163 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -1,203 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -1,312 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 7.4 KiB

View File

@ -1,311 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 KiB

View File

@ -1,496 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,456 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,93 +1,91 @@
# Solana Architecture
# Table of contents
- [Introduction](introduction.md)
- [Terminology](terminology.md)
- [Getting Started](getting-started.md)
- [Testnet Participation](testnet-participation.md)
- [Example Client: 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)
- [Turbine Block Propagation](turbine-block-propagation.md)
- [Ledger Replication](ledger-replication.md)
- [Secure Vote Signing](vote-signing.md)
- [Stake Delegation and Rewards](stake-delegation-and-rewards.md)
- [Performance Metrics](performance-metrics.md)
- [Anatomy of a Validator](validator.md)
- [TPU](tpu.md)
- [TVU](tvu.md)
- [Blocktree](blocktree.md)
- [Gossip Service](gossip.md)
- [The Runtime](runtime.md)
- [Anatomy of a Transaction](transaction.md)
- [Running a Validator](running-validator.md)
- [Hardware Requirements](validator-hardware.md)
- [Choosing a Testnet](validator-testnet.md)
- [Installing the Validator Software](validator-software.md)
- [Starting a Validator](validator-start.md)
- [Staking](validator-stake.md)
- [Monitoring a Validator](validator-monitor.md)
- [Publishing Validator Info](validator-info.md)
- [Troubleshooting](validator-troubleshoot.md)
- [FAQ](validator-faq.md)
- [Running a Replicator](running-replicator.md)
- [API Reference](api-reference.md)
- [Transaction](transaction-api.md)
- [Instruction](instruction-api.md)
- [Blockstreamer](blockstreamer.md)
- [JSON RPC API](jsonrpc-api.md)
- [JavaScript API](javascript-api.md)
- [solana CLI](cli.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)
- [Cluster Test Framework](cluster-test-framework.md)
- [Validator](validator-proposal.md)
- [Simple Payment and State Verification](simple-payment-and-state-verification.md)
- [Cross-Program Invocation](cross-program-invocation.md)
- [Rent](rent.md)
- [Inter-chain Transaction Verification](interchain-transaction-verification.md)
- [Snapshot Verification](snapshot-verification.md)
- [Implemented Design Proposals](implemented-proposals.md)
- [Blocktree](blocktree.md)
- [Cluster Software Installation and Updates](installer.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)
- [Deterministic Transaction Fees](transaction-fees.md)
- [Tower BFT](tower-bft.md)
- [Leader-to-Leader Transition](leader-leader-transition.md)
- [Leader-to-Validator Transition](leader-validator-transition.md)
- [Persistent Account Storage](persistent-account-storage.md)
- [Reliable Vote Transmission](reliable-vote-transmission.md)
- [Repair Service](repair-service.md)
- [Testing Programs](testing-programs.md)
- [Credit-only Accounts](credit-only-credit-debit-accounts.md)
- [Embedding the Move Langauge](embedding-move.md)
* [Introduction](introduction.md)
* [Using Solana from the Command-line](cli/README.md)
* [Command-line Usage](cli/usage.md)
* [Paper Wallet](paper-wallet/README.md)
* [Installation](paper-wallet/installation.md)
* [Paper Wallet Usage](paper-wallet/usage.md)
* [Offline Signing](offline-signing/README.md)
* [Durable Transaction Nonces](offline-signing/durable-nonce.md)
* [Developing Applications](apps/README.md)
* [Example: Web Wallet](apps/webwallet.md)
* [Example: Tic-Tac-Toe](apps/tictactoe.md)
* [Drones](apps/drones.md)
* [Anatomy of a Transaction](transaction.md)
* [JSON RPC API](apps/jsonrpc-api.md)
* [JavaScript API](apps/javascript-api.md)
* [Running a Validator](running-validator/README.md)
* [Validator Requirements](running-validator/validator-reqs.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)
* [Running an Archiver](running-archiver.md)
* [Understanding Solana's Architecture](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.md)
* [Blockstore](validator/blockstore.md)
* [Gossip Service](validator/gossip.md)
* [The Runtime](validator/runtime.md)
* [Building from Source](building-from-source.md)
* [Terminology](terminology.md)
* [Implemented Design Proposals](implemented-proposals/README.md)
* [Cluster Software Installation and Updates](implemented-proposals/installer.md)
* [Cluster Economics](implemented-proposals/ed_overview/README.md)
* [Validation-client Economics](implemented-proposals/ed_overview/ed_validation_client_economics/README.md)
* [State-validation Protocol-based Rewards](implemented-proposals/ed_overview/ed_validation_client_economics/ed_vce_state_validation_protocol_based_rewards.md)
* [State-validation Transaction Fees](implemented-proposals/ed_overview/ed_validation_client_economics/ed_vce_state_validation_transaction_fees.md)
* [Replication-validation Transaction Fees](implemented-proposals/ed_overview/ed_validation_client_economics/ed_vce_replication_validation_transaction_fees.md)
* [Validation Stake Delegation](implemented-proposals/ed_overview/ed_validation_client_economics/ed_vce_validation_stake_delegation.md)
* [Replication-client Economics](implemented-proposals/ed_overview/ed_replication_client_economics/README.md)
* [Storage-replication Rewards](implemented-proposals/ed_overview/ed_replication_client_economics/ed_rce_storage_replication_rewards.md)
* [Replication-client Reward Auto-delegation](implemented-proposals/ed_overview/ed_replication_client_economics/ed_rce_replication_client_reward_auto_delegation.md)
* [Storage Rent Economics](implemented-proposals/ed_overview/ed_storage_rent_economics.md)
* [Economic Sustainability](implemented-proposals/ed_overview/ed_economic_sustainability.md)
* [Attack Vectors](implemented-proposals/ed_overview/ed_attack_vectors.md)
* [Economic Design MVP](implemented-proposals/ed_overview/ed_mvp.md)
* [References](implemented-proposals/ed_overview/ed_references.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)
* [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/readonly-accounts.md)
* [Embedding the Move Langauge](implemented-proposals/embedding-move.md)
* [Staking Rewards](implemented-proposals/staking-rewards.md)
* [Rent](implemented-proposals/rent.md)
* [Durable Transaction Nonces](implemented-proposals/durable-tx-nonces.md)
* [Validator Timestamp Oracle](implemented-proposals/validator-timestamp-oracle.md)
* [Commitment](implemented-proposals/commitment.md)
* [Snapshot Verification](implemented-proposals/snapshot-verification.md)
* [Accepted Design Proposals](proposals/README.md)
* [Ledger Replication](proposals/ledger-replication-to-implement.md)
* [Secure Vote Signing](proposals/vote-signing-to-implement.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)
* [Inter-chain Transaction Verification](proposals/interchain-transaction-verification.md)
* [Snapshot Verification](proposals/snapshot-verification.md)
* [Bankless Leader](proposals/bankless-leader.md)
* [Slashing](proposals/slashing.md)
* [Tick Verification](proposals/tick-verification.md)
* [Block Confirmation](proposals/block-confirmation.md)
* [ABI Management](proposals/abi-management.md)

View File

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

44
book/src/apps/README.md Normal file
View File

@ -0,0 +1,44 @@
# Programming Model
An _app_ interacts with a Solana cluster by sending it _transactions_ with one or more _instructions_. The Solana _runtime_ passes those instructions to user-contributed _programs_. An instruction might, for example, tell a program to transfer _lamports_ from one _account_ to another or create an interactive contract that governs how lamports are transfered. Instructions are executed sequentially and atomically. If any instruction is invalid, any changes made within the transaction are discarded.
### Accounts and Signatures
Each transaction explicitly lists all account public keys referenced by the transaction's instructions. A subset of those public keys are each accompanied by a transaction signature. Those signatures signal on-chain programs that the account holder has authorized the transaction. Typically, the program uses the authorization to permit debiting the account or modifying its data.
The transaction also marks some accounts as _read-only accounts_. The runtime permits read-only accounts to be read concurrently. If a program attempts to modify a read-only account, the transaction is rejected by the runtime.
### Recent Blockhash
A Transaction includes a recent blockhash to prevent duplication and to give transactions lifetimes. Any transaction that is completely identical to a previous one is rejected, so adding a newer blockhash allows multiple transactions to repeat the exact same action. Transactions also have lifetimes that are defined by the blockhash, as any transaction whose blockhash is too old will be rejected.
### Instructions
Each instruction specifies a single program account \(which must be marked executable\), a subset of the transaction's accounts that should be passed to the program, and a data byte array instruction that is passed to the program. The program interprets the data array and operates on the accounts specified by the instructions. The program can return successfully, or with an error code. An error return causes the entire transaction to fail immediately.
## Deploying Programs to a Cluster
![SDK tools](../.gitbook/assets/sdk-tools.svg)
As shown in the diagram above a client creates a program and compiles it to an ELF shared object containing BPF bytecode and sends it to the Solana cluster. The cluster stores the program locally and makes it available to clients via a _program ID_. The program ID is a _public key_ generated by the client and is used to reference the program in subsequent transactions.
A program may be written in any programming language that can target the Berkley Packet Filter \(BPF\) safe execution environment. The Solana SDK offers the best support for C programs, which is compiled to BPF using the [LLVM compiler infrastructure](https://llvm.org).
## Storing State between Transactions
If the program needs to store state between transactions, it does so using _accounts_. Accounts are similar to files in operating systems such as Linux. Like a file, an account may hold arbitrary data and that data persists beyond the lifetime of a program. Also like a file, an account includes metadata that tells the runtime who is allowed to access the data and how. Unlike a file, the account includes metadata for the lifetime of the file. That lifetime is expressed in "tokens", which is a number of fractional native tokens, called _lamports_. Accounts are held in validator memory and pay "rent" to stay there. Each validator periodically scan all accounts and collects rent. Any account that drops to zero lamports is purged.
If an account is marked "executable", it will only be used by a _loader_ to run programs. For example, a BPF-compiled program is marked executable and loaded by the BPF loader. No program is allowed to modify the contents of an executable account.
An account also includes "owner" metadata. The owner is a program ID. The runtime grants the program write access to the account if its ID matches the owner. If an account is not owned by a program, the program is permitted to read its data and credit the account.
In the same way that a Linux user uses a path to look up a file, a Solana client uses public keys to look up accounts. To create an account, the client generates a _keypair_ and registers its public key using the `CreateAccount` instruction. The account created by `CreateAccount` is called a _system account_ and is owned by a built-in program called the System program. The System program allows clients to transfer lamports and assign account ownership.
The runtime only permits the owner to debit the account or modify its data. The program then defines additional rules for whether the client can modify accounts it owns. In the case of the System program, it allows users to transfer lamports by recognizing transaction signatures. If it sees the client signed the transaction using the keypair's _private key_, it knows the client authorized the token transfer.
After the runtime executes each of the transaction's instructions, it uses the account metadata to verify that none of the access rules were violated. If a program violates an access rule, the runtime discards all account changes made by all instructions and marks the transaction as failed.
## Smart Contracts
Programs don't always require transaction signatures, as the System program does. Instead, the program may manage _smart contracts_. A smart contract is a set of constraints that once satisfied, signal to a program that a token transfer or account update is permitted. For example, one could use the Budget program to create a smart contract that authorizes a token transfer only after some date. Once evidence that the date has past, the contract progresses, and token transfer completes.

44
book/src/apps/drones.md Normal file
View File

@ -0,0 +1,44 @@
# Drones
This chapter defines an off-chain service called a _drone_, which acts as custodian of a user's private key. In its simplest form, it can be used to create _airdrop_ transactions, a token transfer from the drone's account to a client's account.
## Signing Service
A drone is a simple signing service. It listens for requests to sign _transaction data_. Once received, the drone validates the request however it sees fit. It may, for example, only accept transaction data with a `SystemInstruction::Transfer` instruction transferring only up to a certain amount of tokens. If the drone accepts the transaction, it returns an `Ok(Signature)` where `Signature` is a signature of the transaction data using the drone's private key. If it rejects the transaction data, it returns a `DroneError` describing why.
## Examples
### Granting access to an on-chain game
Creator of on-chain game tic-tac-toe hosts a drone that responds to airdrop requests containing an `InitGame` instruction. The drone signs the transaction data in the request and returns it, thereby authorizing its account to pay the transaction fee and as well as seeding the game's account with enough tokens to play it. The user then creates a transaction for its transaction data and the drones signature and submits it to the Solana cluster. Each time the user interacts with the game, the game pays the user enough tokens to pay the next transaction fee to advance the game. At that point, the user may choose to keep the tokens instead of advancing the game. If the creator wants to defend against that case, they could require the user to return to the drone to sign each instruction.
### Worldwide airdrop of a new token
Creator of a new on-chain token \(ERC-20 interface\), may wish to do a worldwide airdrop to distribute its tokens to millions of users over just a few seconds. That drone cannot spend resources interacting with the Solana cluster. Instead, the drone should only verify the client is unique and human, and then return the signature. It may also want to listen to the Solana cluster for recent entry IDs to support client retries and to ensure the airdrop is targeting the desired cluster.
Note: the Solana cluster will not parallelize transactions funded by the same fee-paying account. This means that the max throughput of a single fee-paying account is limited to the number of _ticks_ processed per second by the current leader. Add additional fee-paying accounts to improve throughput.
## Attack vectors
### Invalid recent\_blockhash
The drone may prefer its airdrops only target a particular Solana cluster. To do that, it listens to the cluster for new entry IDs and ensure any requests reference a recent one.
Note: to listen for new entry IDs assumes the drone is either a validator or a _light_ client. At the time of this writing, light clients have not been implemented and no proposal describes them. This document assumes one of the following approaches be taken:
1. Define and implement a light client
2. Embed a validator
3. Query the jsonrpc API for the latest last id at a rate slightly faster than
ticks are produced.
### Double spends
A client may request multiple airdrops before the first has been submitted to the ledger. The client may do this maliciously or simply because it thinks the first request was dropped. The drone should not simply query the cluster to ensure the client has not already received an airdrop. Instead, it should use `recent_blockhash` to ensure the previous request is expired before signing another. Note that the Solana cluster will reject any transaction with a `recent_blockhash` beyond a certain _age_.
### Denial of Service
If the transaction data size is smaller than the size of the returned signature \(or descriptive error\), a single client can flood the network. Considering that a simple `Transfer` operation requires two public keys \(each 32 bytes\) and a `fee` field, and that the returned signature is 64 bytes \(and a byte to indicate `Ok`\), consideration for this attack may not be required.
In the current design, the drone accepts TCP connections. This allows clients to DoS the service by simply opening lots of idle connections. Switching to UDP may be preferred. The transaction data will be smaller than a UDP packet since the transaction sent to the Solana cluster is already pinned to using UDP.

View File

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

1217
book/src/apps/jsonrpc-api.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,22 @@
# Example: Tic-Tac-Toe
[Click here to play Tic-Tac-Toe](https://solana-example-tictactoe.herokuapp.com/) on the Solana testnet. Open the link and wait for another player to join, or open the link in a second browser tab to play against yourself. You will see that every move a player makes stores a transaction on the ledger.
## Build and run Tic-Tac-Toe locally
First fetch the latest release of the example code:
```bash
$ git clone https://github.com/solana-labs/example-tictactoe.git
$ cd example-tictactoe
$ TAG=$(git describe --tags $(git rev-list --tags
--max-count=1))
$ git checkout $TAG
```
Next, follow the steps in the git repository's [README](https://github.com/solana-labs/example-tictactoe/blob/master/README.md).
## Getting lamports to users
You may have noticed you interacted with the Solana cluster without first needing to acquire lamports to pay transaction fees. Under the hood, the web app creates a new ephemeral identity and sends a request to an off-chain service for a signed transaction authorizing a user to start a new game. The service is called a _drone_. When the app sends the signed transaction to the Solana cluster, the drone's lamports are spent to pay the transaction fee and start the game. In a real world app, the drone might request the user watch an ad or pass a CAPTCHA before signing over its lamports.

View File

@ -1,10 +1,10 @@
# Example app: Web Wallet
# Example Client: Web Wallet
## Build and run a web wallet locally
First fetch the example code:
```sh
```bash
$ git clone https://github.com/solana-labs/example-webwallet.git
$ cd example-webwallet
$ TAG=$(git describe --tags $(git rev-list --tags
@ -12,5 +12,5 @@ $ TAG=$(git describe --tags $(git rev-list --tags
$ git checkout $TAG
```
Next, follow the steps in the git repository's
[README](https://github.com/solana-labs/example-webwallet/blob/master/README.md).
Next, follow the steps in the git repository's [README](https://github.com/solana-labs/example-webwallet/blob/master/README.md).

View File

@ -1,37 +0,0 @@
# 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,102 +0,0 @@
# Blocktree
After a block reaches finality, all blocks from that one on down
to the genesis block form a linear chain with the familiar name
blockchain. Until that point, however, the validator must maintain all
potentially valid chains, called *forks*. The process by which forks
naturally form as a result of leader rotation is described in
[fork generation](fork-generation.md). The *blocktree* data structure
described here is how a validator copes with those forks until blocks
are finalized.
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.
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 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
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
shred that's been received. Blocktree stores shreds with signatures,
preserving the chain of origination.
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
(i.e. dealing with forks) will have to be used for the most recent entries in
the Blocktree.
### Blocktree Design
1. Entries in the Blocktree are stored as key-value pairs, where the key is the concatenated
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 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 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 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.
5. Update notifications - The Blocktree notifies listeners when slot(n).is_rooted is flipped from false to true for any `n`.
### Blocktree APIs
The Blocktree offers a subscription based API that ReplayStage uses to ask for entries it's interested in. The entries will be sent on a channel exposed by the Blocktree. These subscription API's are as follows:
1. `fn get_slots_since(slot_indexes: &[u64]) -> Vec<SlotMeta>`: Returns new slots connecting to any element of the list `slot_indexes`.
2. `fn get_slot_entries(slot_index: u64, entry_start_index: usize, max_entries: Option<u64>) -> Vec<Entry>`: Returns the entry vector for the slot starting with `entry_start_index`, capping the result at `max` if `max_entries == Some(max)`, otherwise, no upper limit on the length of the return vector is imposed.
Note: Cumulatively, this means that the replay stage will now have to know when a slot is finished, and subscribe to the next slot it's interested in to get the next set of entries. Previously, the burden of chaining slots fell on the Blocktree.
### Interfacing with Bank
The bank exposes to replay stage:
1. `prev_hash`: which PoH chain it's working on as indicated by the hash of the last
entry it processed
2. `tick_height`: the ticks in the PoH chain currently being verified by this
bank
3. `votes`: a stack of records that contain:
1. `prev_hashes`: what anything after this vote must chain to in PoH
2. `tick_height`: the tick height at which this vote was cast
3. `lockout period`: how long a chain must be observed to be in the ledger to
be able to be chained below this vote
Replay stage uses Blocktree APIs to find the longest chain of entries it can
hang off a previous vote. If that chain of entries does not hang off the
latest vote, the replay stage rolls back the bank to that vote and replays the
chain from there.
### Pruning Blocktree
Once Blocktree entries are old enough, representing all the possible forks
becomes less useful, perhaps even problematic for replay upon restart. Once a
validator's votes have reached max lockout, however, any Blocktree contents
that are not on the PoH chain for that vote for can be pruned, expunged.
Replicator nodes will be responsible for storing really old ledger contents,
and validators need only persist their bank periodically.

View File

@ -0,0 +1,160 @@
# Building from Source
The Solana git repository contains all the scripts you might need to spin up your own local testnet. Depending on what you're looking to achieve, you may want to run a different variation, as the full-fledged, performance-enhanced multinode testnet is considerably more complex to set up than a Rust-only, singlenode testnode. If you are looking to develop high-level features, such as experimenting with smart contracts, save yourself some setup headaches and stick to the Rust-only singlenode demo. If you're doing performance optimization of the transaction pipeline, consider the enhanced singlenode demo. If you're doing consensus work, you'll need at least a Rust-only multinode demo. If you want to reproduce our TPS metrics, run the enhanced multinode demo.
For all four variations, you'd need the latest Rust toolchain and the Solana source code:
First, install Rust's package manager Cargo.
```bash
$ curl https://sh.rustup.rs -sSf | sh
$ source $HOME/.cargo/env
```
Now checkout the code from github:
```bash
$ git clone https://github.com/solana-labs/solana.git
$ cd solana
```
The demo code is sometimes broken between releases as we add new low-level features, so if this is your first time running the demo, you'll improve your odds of success if you check out the [latest release](https://github.com/solana-labs/solana/releases) before proceeding:
```bash
$ TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
$ git checkout $TAG
```
### Configuration Setup
Ensure important programs such as the vote program are built before any nodes are started. Note that we are using the release build here for good performance.
If you want the debug build, use just `cargo build` and omit the `NDEBUG=1` part of the command.
```bash
$ cargo build --release
```
The network is initialized with a genesis ledger generated by running the following script.
```bash
$ NDEBUG=1 ./multinode-demo/setup.sh
```
### Drone
In order for the validators and clients to work, we'll need to spin up a faucet to give out some test tokens. The faucet delivers Milton Friedman-style "air drops" \(free tokens to requesting clients\) to be used in test transactions.
Start the faucet with:
```bash
$ NDEBUG=1 ./multinode-demo/faucet.sh
```
### Singlenode Testnet
Before you start a validator, make sure you know the IP address of the machine you want to be the bootstrap validator for the demo, and make sure that udp ports 8000-10000 are open on all the machines you want to test with.
Now start the bootstrap validator in a separate shell:
```bash
$ NDEBUG=1 ./multinode-demo/bootstrap-validator.sh
```
Wait a few seconds for the server to initialize. It will print "leader ready..." when it's ready to receive transactions. The leader will request some tokens from the faucet if it doesn't have any. The faucet does not need to be running for subsequent leader starts.
### Multinode Testnet
To run a multinode testnet, after starting a leader node, spin up some additional validators in separate shells:
```bash
$ NDEBUG=1 ./multinode-demo/validator-x.sh
```
To run a performance-enhanced validator on Linux, [CUDA 10.0](https://developer.nvidia.com/cuda-downloads) must be installed on your system:
```bash
$ ./fetch-perf-libs.sh
$ NDEBUG=1 SOLANA_CUDA=1 ./multinode-demo/bootstrap-validator.sh
$ NDEBUG=1 SOLANA_CUDA=1 ./multinode-demo/validator.sh
```
### Testnet Client Demo
Now that your singlenode or multinode testnet is up and running let's send it some transactions!
In a separate shell start the client:
```bash
$ NDEBUG=1 ./multinode-demo/bench-tps.sh # runs against localhost by default
```
What just happened? The client demo spins up several threads to send 500,000 transactions to the testnet as quickly as it can. The client then pings the testnet periodically to see how many transactions it processed in that time. Take note that the demo intentionally floods the network with UDP packets, such that the network will almost certainly drop a bunch of them. This ensures the testnet has an opportunity to reach 710k TPS. The client demo completes after it has convinced itself the testnet won't process any additional transactions. You should see several TPS measurements printed to the screen. In the multinode variation, you'll see TPS measurements for each validator node as well.
### Testnet Debugging
There are some useful debug messages in the code, you can enable them on a per-module and per-level basis. Before running a leader or validator set the normal RUST\_LOG environment variable.
For example
* To enable `info` everywhere and `debug` only in the solana::banking\_stage module:
```bash
$ export RUST_LOG=solana=info,solana::banking_stage=debug
```
* To enable BPF program logging:
```bash
$ export RUST_LOG=solana_bpf_loader=trace
```
Generally we are using `debug` for infrequent debug messages, `trace` for potentially frequent messages and `info` for performance-related logging.
You can also attach to a running process with GDB. The leader's process is named _solana-validator_:
```bash
$ sudo gdb
attach <PID>
set logging on
thread apply all bt
```
This will dump all the threads stack traces into gdb.txt
### Blockstreamer
Solana supports a node type called an _blockstreamer_. This validator 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
$ NDEBUG=1 ./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
* `hash`, the [blockhash](terminology.md#blockhash), as base-58 encoded string
## Public Testnet
In this example the client connects to our public testnet. To run validators on the testnet you would need to open udp ports `8000-10000`.
```bash
$ NDEBUG=1 ./multinode-demo/bench-tps.sh --entrypoint devnet.solana.com:8001 --faucet devnet.solana.com:9900 --duration 60 --tx_count 50
```
You can observe the effects of your client's transactions on our [dashboard](https://metrics.solana.com:3000/d/testnet/testnet-hud?orgId=2&from=now-30m&to=now&refresh=5s&var-testnet=testnet)

View File

@ -1,865 +0,0 @@
## 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

@ -0,0 +1,171 @@
# solana CLI
The [solana-cli crate](https://crates.io/crates/solana-cli) provides a command-line interface tool for Solana
## Examples
### Get Pubkey
```bash
// Command
$ solana address
// Return
<PUBKEY>
```
### Airdrop SOL/Lamports
```bash
// Command
$ solana airdrop 2
// Return
"2.00000000 SOL"
```
### Get Balance
```bash
// Command
$ solana balance
// Return
"3.00050001 SOL"
```
### Confirm Transaction
```bash
// Command
$ solana confirm <TX_SIGNATURE>
// Return
"Confirmed" / "Not found" / "Transaction failed with error <ERR>"
```
### Deploy program
```bash
// Command
$ solana deploy <PATH>
// Return
<PROGRAM_ID>
```
### Unconditional Immediate Transfer
```bash
// Command
$ solana pay <PUBKEY> 123
// Return
<TX_SIGNATURE>
```
### Post-Dated Transfer
```bash
// 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.
```bash
// Command
$ solana pay <PUBKEY> 123 \
--require-signature-from <PUBKEY>
// Return
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
```
### Post-Dated and Authorized Transfer
```bash
// 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
```bash
// Command
$ solana pay <PUBKEY> 123 \
--require-signature-from <PUBKEY> \
--require-signature-from <PUBKEY>
// Return
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
```
### Cancelable Transfer
```bash
// Command
$ solana pay <PUBKEY> 123 \
--require-signature-from <PUBKEY> \
--cancelable
// Return
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
```
### Cancel Transfer
```bash
// Command
$ solana cancel <PROCESS_ID>
// Return
<TX_SIGNATURE>
```
### Send Signature
```bash
// Command
$ solana send-signature <PUBKEY> <PROCESS_ID>
// Return
<TX_SIGNATURE>
```
### Indicate Elapsed Time
Use the current system time:
```bash
// Command
$ solana send-timestamp <PUBKEY> <PROCESS_ID>
// Return
<TX_SIGNATURE>
```
Or specify some other arbitrary timestamp:
```bash
// Command
$ solana send-timestamp <PUBKEY> <PROCESS_ID> --date 2018-12-24T23:59:00
// Return
<TX_SIGNATURE>
```
## Usage

5
book/src/cli/README.md Normal file
View File

@ -0,0 +1,5 @@
# Using Solana from the Command-line
This chapter describes the command-line tools for interacting with Solana. One
could use these tools to send payments, stake validators, and check account
balances.

1973
book/src/cli/usage.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,100 +0,0 @@
# 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 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
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](data-plane-fanout.md) section.

View File

@ -0,0 +1,40 @@
# A Solana Cluster
A Solana cluster is a set of validators 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 validators, one first needs to create a _genesis config_. The config references two public keys, a _mint_ and a _bootstrap validator_. The validator holding the bootstrap validator'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 config. The second validator then contacts the bootstrap validator to register as a _validator_ or _archiver_. Additional validators 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 archiver 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 archivers 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 validator'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 archiver 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 [_Turbine Block Propogation_](turbine-block-propagation.md).

View File

@ -0,0 +1,80 @@
# 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 shreds\) 1. The PoH stream includes ticks; empty entries that indicate liveness of
the leader and the passage of time on the cluster.
1. 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](../.gitbook/assets/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,97 @@
# Leader Rotation
At any given moment, a cluster expects only one validator 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 config 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 config 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 an archiver can prove that a validator verified a fake PoRep, then the validator will not receive a reward for that storage epoch.
Archivers 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 archivers 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 an archiver.
2. NUM\_KEY\_ROTATION\_SEGMENTS: Number of segments after which archivers
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 archiver 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
archivers 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 Archivers 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.
### Archiver behavior
1. Since an archiver is somewhat of a light client and not downloading all the
ledger data, they have to rely on other validators and archivers 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
archiver do extra wasted work. For many of the operations there are a number of options
depending on how paranoid an archiver is:
* \(a\) archiver can ask a validator
* \(b\) archiver can ask multiple validators
* \(c\) archiver can ask other archivers
* \(d\) archiver can subscribe to the full transaction stream and generate
the information itself \(assuming the slot is recent enough\)
* \(e\) archiver can subscribe to an abbreviated transaction stream to
generate the information itself \(assuming the slot is recent enough\)
2. An archiver obtains the PoH hash corresponding to the last turn with its slot.
3. The archiver 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
archiver mods the signature with the slot to get which segment to
replicate.
4. The archiver retrives the ledger by asking peer validators and
archivers. See 6.5.
5. The archiver then encrypts that segment with the key with chacha algorithm
in CBC mode with `NUM_CHACHA_ROUNDS` of encryption.
6. The archiver initializes a chacha rng with the a signed recent PoH value as
the seed.
7. The archiver 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 archiver 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 archiver 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 archiver must submit a
transaction with the mask of which proofs were fake during the last turn. This
transaction will define the rewards for both archivers and validators.
11. Finally for a turn N, as the PoRep game enters turn N + 3, archiver'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
* Archivers: submit as many proofs as possible during this stage
* Validators: No-op
2. Proof verification stage
* Archivers: No-op
* Validators: Select archivers and verify their proofs from the previous turn
3. Proof challenge stage
* Archivers: Submit the proof mask with justifications \(for fake proofs submitted 2 turns ago\)
* Validators: No-op
4. Reward collection stage
* Archivers: Collect rewards for 3 turns ago
* Validators: Collect rewards for 3 turns ago
For each turn of the PoRep game, both Validators and Archivers 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 archiver public keys.
The map is updated when a Validator processes an archiver'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 an archiver's network address \(correlating it via cluster\_info table\).
The clients can then send repair requests to the archiver 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 archivers 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, archiver 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 archivers from being denied rewards.
* Validator stealing mining proof results for itself. The proofs are derived
from a signature from an archiver, 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 archivers 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 archivers 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.
* Archiver 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,34 @@
# Managing Forks
The ledger is permitted to fork at slot boundaries. The resulting data structure forms a tree called a _blockstore_. When the validator interprets the blockstore, it must maintain state for each fork in the chain. We call each instance an _active fork_. It is the responsibility of a validator to weigh those forks, such that it may eventually select a fork.
A validator selects a fork by submiting a vote to a slot leader on that fork. The vote commits the validator for a duration of time called a _lockout period_. The validator 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 validator 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 validator votes, any checkpoints beyond the rollback depth become unreachable. That is, there is no scenario in which the validator 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](../.gitbook/assets/forks.svg)
The following sequences are _active forks_:
* {4, 2, 1}
* {5, 2, 1}
* {6, 3, 1}
* {7, 3, 1}
## Pruning and Squashing
A validator 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 validator 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](../.gitbook/assets/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](../.gitbook/assets/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,24 @@
# 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.
## Hardware setup
The validator software is deployed to GCP n1-standard-16 instances with 1TB pd-ssd disk, and 2x Nvidia V100 GPUs. These are deployed in the us-west-1 region.
solana-bench-tps is started after the network converges from a client machine with n1-standard-16 CPU-only instance with the following arguments: `--tx\_count=50000 --thread-batch-sleep 1000`
TPS and confirmation metrics are captured from the dashboard numbers over a 5 minute average of when the bench-tps transfer stage begins.

View File

@ -0,0 +1,197 @@
# 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](../implemented-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 program acts as custodian of the rewards pool and provides for passive delegation. The Stake program is responsible for paying rewards to staker and voter when shown that a staker's 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_voter` - Only this identity is authorized to submit votes. This field can only modified by this identity.
* `node_pubkey` - The Solana node that votes in this account.
* `authorized_withdrawer` - the identity of the entity in charge of the lamports of this account, separate from the account's address and the authorized vote signer
### VoteInstruction::Initialize\(VoteInit\)
* `account[0]` - RW - The VoteState
`VoteInit` carries the new vote account's `node_pubkey`, `authorized_voter`, `authorized_withdrawer`, and `commission`
other VoteState members defaulted
### VoteInstruction::Authorize\(Pubkey, VoteAuthorize\)
Updates the account with a new authorized voter or withdrawer, according to the VoteAuthorize parameter \(`Voter` or `Withdrawer`\). The transaction must be by signed by the Vote account's current `authorized_voter` or `authorized_withdrawer`.
* `account[0]` - RW - The VoteState
`VoteState::authorized_voter` or `authorized_withdrawer` is set to to `Pubkey`.
### VoteInstruction::Vote\(Vote\)
* `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 - `sysvar::slot_hashes` A list of some N most recent slots and their hashes for the vote to be verified against.
* `account[2]` - RO - `sysvar::clock` The current network time, expressed in slots, epochs.
### StakeState
A StakeState takes one of four forms, StakeState::Uninitialized, StakeState::Initialized, StakeState::Stake, and StakeState::RewardsPool. Only the first three forms are used in staking, but only StakeState::Stake is interesting. All RewardsPools are created at genesis.
### 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 was de-activated, some cool down epochs are required before the account is fully deactivated, and the stake available for withdrawal
* `authorized_staker` - the pubkey of the entity that must sign delegation, activation, and deactivation transactions
* `authorized_withdrawer` - the identity of the entity in charge of the lamports of this account, separate from the account's address, and the authorized staker
### 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
The Stake account is moved from Initialized to StakeState::Stake form, or from a deactivated (i.e. fully cooled-down) StakeState::Stake to activated StakeState::Stake. This is how stakers choose the vote account and validator node to which their stake account lamports are delegated. The transaction must be signed by the stake's `authorized_staker`.
* `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]`. If this is the initial delegation of stake, `StakeState::Stake::stake` is initialized to the account's balance in lamports, `StakeState::Stake::activated` is initialized to the current Bank epoch, and `StakeState::Stake::deactivated` is initialized to std::u64::MAX
* `account[1]` - R - The VoteState instance.
* `account[2]` - R - sysvar::clock account, carries information about current Bank epoch
* `account[3]` - R - sysvar::stakehistory account, carries information about stake history
* `account[4]` - R - stake::Config accoount, carries warmup, cooldown, and slashing configuration
### StakeInstruction::Authorize\(Pubkey, StakeAuthorize\)
Updates the account with a new authorized staker or withdrawer, according to the StakeAuthorize parameter \(`Staker` or `Withdrawer`\). The transaction must be by signed by the Stakee account's current `authorized_staker` or `authorized_withdrawer`. Any stake lock-up must have expired, or the lock-up custodian must also sign the transaction.
* `account[0]` - RW - The StakeState
`StakeState::authorized_staker` or `authorized_withdrawer` is set to to `Pubkey`.
### 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.
The transaction must be signed by the stake's `authorized_staker`.
* `account[0]` - RW - The StakeState::Stake instance that is deactivating.
* `account[1]` - R - sysvar::clock 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. The transaction must be signed by the stake's `authorized_withdrawer`.
* `account[0]` - RW - The StakeState::Stake from which to withdraw.
* `account[1]` - RW - Account that should be credited with the withdrawn lamports.
* `account[2]` - R - sysvar::clock 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](../.gitbook/assets/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](../proposals/slashing.md).
### Basics
The network pays rewards from a portion of network [inflation](../terminology.md#inflation). 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` \(set to 25% per epoch in the current implementation\).
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 | 333 | 667 | 67 | 133 | 2,400 | 800 |
| N+2 | 733 | 267 | 146 | 54 | 2,880 | 321 |
| N+3 | 1000 | 0 | 200 | 0 | 3,200 | 0 |
### Withdrawal
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\). Because earned rewards are automatically added to stake, withdrawal is generally only possible after deactivation.
### Lock-up
Stake accounts support the notion of lock-up, wherein the stake account balance is unavailable for withdrawal until a specified time. Lock-up is specified as an epoch height, i.e. the minimum epoch height that must be reached by the network before the stake account balance is available for withdrawal, unless the transaction is also signed by a specified custodian. This information is gathered when the stake account is created, and stored in the Lockup field of the stake account's state. Changing the authorized staker or withdrawer is also subject to lock-up, as such an operation is effectively a transfer.

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 validators producing a new valid block at the same time. There's no such constraint in Proof of Stake consensus, but without reliable timestamps, a validator 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 validators 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,96 @@
# Turbine Block Propagation
A Solana cluster uses a multi-layer block propagation mechanism called _Turbine_ to broadcast transaction shreds 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 shreds between the validator nodes in the first neighborhood \(layer 0\). Each validator shares its data within its neighborhood, but also retransmits the shreds 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 shreds.
## 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 shred 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 shred using a seed derived from the leader id, slot and shred index.
## 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 shreds 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 shreds 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 shreds to Neighborhood 0 in Layer 0](../.gitbook/assets/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](../.gitbook/assets/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](../.gitbook/assets/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.
## Calcuating the required FEC rate
Turbine relies on retransmission of packets between validators. Due to
retransmission, any network wide packet loss is compounded, and the
probability of the packet failing to reach is destination increases
on each hop. The FEC rate needs to take into account the network wide
packet loss, and the propagation depth.
A shred group is the set of data and coding packets that can be used
to reconstruct each other. Each shred group has a chance of failure,
based on the likelyhood of the number of packets failing that exceeds
the FEC rate. If a validator fails to reconstruct the shred group,
then the block cannot be reconstructed, and the validator has to rely
on repair to fixup the blocks.
The probability of the shred group failing can be computed using the
binomial distribution. If the FEC rate is `16:4`, then the group size
is 20, and at least 4 of the shreds must fail for the group to fail.
Which is equal to the sum of the probability of 4 or more trails failing
out of 20.
Probability of a block succeeding in turbine:
* Probability of packet failure: `P = 1 - (1 - network_packet_loss_rate)^2`
* FEC rate: `K:M`
* Number of trials: `N = K + M`
* Shred group failure rate: `S = SUM of i=0 -> M for binomial(prob_failure = P, trials = N, failures = i)`
* Shreds per block: `G`
* Block success rate: `B = (1 - S) ^ (G / N) `
* Binomial distribution for exactly `i` results with probability of P in N trials is defined as `(N choose i) * P^i * (1 - P)^(N-i)`
For example:
* Network packet loss rate is 15%.
* 50kpts network generates 6400 shreds per second.
* FEC rate increases the total shres per block by the FEC ratio.
With a FEC rate: `16:4`
* `G = 8000`
* `P = 1 - 0.85 * 0.85 = 1 - 0.7225 = 0.2775`
* `S = SUM of i=0 -> 4 for binomial(prob_failure = 0.2775, trials = 20, failures = i) = 0.689414`
* `B = (1 - 0.689) ^ (8000 / 20) = 10^-203`
With FEC rate of `16:16`
* `G = 12800`
* `S = SUM of i=0 -> 32 for binomial(prob_failure = 0.2775, trials = 64, failures = i) = 0.002132`
* `B = (1 - 0.002132) ^ (12800 / 32) = 0.42583`
With FEC rate of `32:32`
* `G = 12800`
* `S = SUM of i=0 -> 32 for binomial(prob_failure = 0.2775, trials = 64, failures = i) = 0.000048`
* `B = (1 - 0.000048) ^ (12800 / 64) = 0.99045`
## 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 shreds 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](../.gitbook/assets/data-plane-neighborhood.svg)

View File

@ -0,0 +1,67 @@
# Secure Vote Signing
A validator 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

@ -1,140 +0,0 @@
# Credit-Only Accounts
This design covers the handling of credit-only and credit-debit accounts in the
[runtime](runtime.md). Accounts already distinguish themselves as credit-only or
credit-debit based on the program ID specified by the transaction's instruction.
Programs must treat accounts that are not owned by them as credit-only.
To identify credit-only accounts by program id would require the account to be
fetched and loaded from disk. This operation is expensive, and while it is
occurring, the runtime would have to reject any transactions referencing the same
account.
The proposal introduces a `num_readonly_accounts` field to the transaction
structure, and removes the `program_ids` dedicated vector for program accounts.
This design doesn't change the runtime transaction processing rules.
Programs still can't write or spend accounts that they do not own, but it
allows the runtime to optimistically take the correct lock for each account
specified in the transaction before loading the accounts from storage.
Accounts selected as credit-debit by the transaction can still be treated as
credit-only by the instructions.
## Runtime handling
credit-only accounts have the following properties:
* Can be deposited into: Deposits can be implemented as a simple `atomic_add`.
* read-only access to account data.
Instructions that debit or modify the credit-only account data will fail.
## Account Lock Optimizations
The Accounts module keeps track of current locked accounts in the runtime,
which separates credit-only accounts from the credit-debit accounts. The credit-only
accounts can be cached in memory and shared between all the threads executing
transactions.
The current runtime can't predict whether an account is credit-only or credit-debit when
the transaction account keys are locked at the start of the transaction
processing pipeline. Accounts referenced by the transaction have not been
loaded from the disk yet.
An ideal design would cache the credit-only accounts while they are referenced by
any transaction moving through the runtime, and release the cache when the last
transaction exits the runtime.
## Credit-only accounts and read-only account data
Credit-only account data can be treated as read-only. Credit-debit
account data is treated as read-write.
## Transaction changes
To enable the possibility of caching accounts only while they are in the
runtime, the Transaction structure should be changed in the following way:
* `program_ids: Vec<Pubkey>` - This vector is removed. Program keys can be
placed at the end of the `account_keys` vector within the `num_readonly_accounts`
number set to the number of programs.
* `num_readonly_accounts: u8` - The number of keys from the **end** of the
transaction's `account_keys` array that is credit-only.
The following possible accounts are present in an transaction:
* paying account
* RW accounts
* R accounts
* Program IDs
The paying account must be credit-debit, and program IDs must be credit-only. The
first account in the `account_keys` array is always the account that pays for
the transaction fee, therefore it cannot be credit-only. For these reasons the
credit-only accounts are all grouped together at the end of the `account_keys`
vector. Counting credit-only accounts from the end allow for the default `0`
value to still be functionally correct, since a transaction will succeed with
all credit-debit accounts.
Since accounts can only appear once in the transaction's `account_keys` array,
an account can only be credit-only or credit-debit in a single transaction, not
both. The runtime treats a transaction as one atomic unit of execution. If any
instruction needs credit-debit access to an account, a copy needs to be made. The
write lock is held for the entire time the transaction is being processed by
the runtime.
## Starvation
Read locks for credit-only accounts can keep the runtime from executing
transactions requesting a write lock to a credit-debit account.
When a request for a write lock is made while a read lock is open, the
transaction requesting the write lock should be cached. Upon closing the read
lock, the pending transactions can be pushed through the runtime.
While a pending write transaction exists, any additional read lock requests for
that account should fail. It follows that any other write lock requests will also
fail. Currently, clients must retransmit when a transaction fails because of
a pending transaction. This approach would mimic that behavior as closely as
possible while preventing write starvation.
## Program execution with credit-only accounts
Before handing off the accounts to program execution, the runtime can mark each
account in each instruction as a credit-only account. The credit-only accounts can
be passed as references without an extra copy. The transaction will abort on a
write to credit-only.
An alternative is to detect writes to credit-only accounts and fail the
transactions before commit.
## Alternative design
This design attempts to cache a credit-only account after loading without the use
of a transaction-specified credit-only accounts list. Instead, the credit-only
accounts are held in a reference-counted table inside the runtime as the
transactions are processed.
1. Transaction accounts are locked.
a. If the account is present in the credit-only' table, the TX does not fail.
The pending state for this TX is marked NeedReadLock.
2. Transaction accounts are loaded.
a. Transaction accounts that are credit-only increase their reference
count in the `credit-only` table.
b. Transaction accounts that need a write lock and are present in the
`credit-only` table fail.
3. Transaction accounts are unlocked.
a. Decrement the `credit-only` lock table reference count; remove if its 0
b. Remove from the `lock` set if the account is not in the `credit-only`
table.
The downside with this approach is that if the `lock` set mutex is released
between lock and load to allow better pipelining of transactions, a request for
a credit-only account may fail. Therefore, this approach is not suitable for
treating programs as credit-only accounts.
Holding the accounts lock mutex while fetching the account from disk would
potentially have a significant performance hit on the runtime. Fetching from
disk is expected to be slow, but can be parallelized between multiple disks.

View File

@ -1,111 +0,0 @@
# 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,86 +0,0 @@
# Creating Signing Services with Drones
This chapter defines an off-chain service called a *drone*, which acts as
custodian of a user's private key. In its simplest form, it can be used to
create *airdrop* transactions, a token transfer from the drone's account to a
client's account.
## Signing Service
A drone is a simple signing service. It listens for requests to sign
*transaction data*. Once received, the drone validates the request however it
sees fit. It may, for example, only accept transaction data with a
`SystemInstruction::Transfer` instruction transferring only up to a certain amount
of tokens. If the drone accepts the transaction, it returns an `Ok(Signature)`
where `Signature` is a signature of the transaction data using the drone's
private key. If it rejects the transaction data, it returns a `DroneError`
describing why.
## Examples
### Granting access to an on-chain game
Creator of on-chain game tic-tac-toe hosts a drone that responds to airdrop
requests containing an `InitGame` instruction. The drone signs the transaction
data in the request and returns it, thereby authorizing its account to pay the
transaction fee and as well as seeding the game's account with enough tokens to
play it. The user then creates a transaction for its transaction data and the
drones signature and submits it to the Solana cluster. Each time the user
interacts with the game, the game pays the user enough tokens to pay the next
transaction fee to advance the game. At that point, the user may choose to keep
the tokens instead of advancing the game. If the creator wants to defend
against that case, they could require the user to return to the drone to sign
each instruction.
### Worldwide airdrop of a new token
Creator of a new on-chain token (ERC-20 interface), may wish to do a worldwide
airdrop to distribute its tokens to millions of users over just a few seconds.
That drone cannot spend resources interacting with the Solana cluster. Instead,
the drone should only verify the client is unique and human, and then return
the signature. It may also want to listen to the Solana cluster for recent
entry IDs to support client retries and to ensure the airdrop is targeting the
desired cluster.
## Attack vectors
### Invalid recent_blockhash
The drone may prefer its airdrops only target a particular Solana cluster. To
do that, it listens to the cluster for new entry IDs and ensure any requests
reference a recent one.
Note: to listen for new entry IDs assumes the drone is either a fullnode or a
*light* client. At the time of this writing, light clients have not been
implemented and no proposal describes them. This document assumes one of the
following approaches be taken:
1. Define and implement a light client
2. Embed a fullnode
3. Query the jsonrpc API for the latest last id at a rate slightly faster than
ticks are produced.
### Double spends
A client may request multiple airdrops before the first has been submitted to
the ledger. The client may do this maliciously or simply because it thinks the
first request was dropped. The drone should not simply query the cluster to
ensure the client has not already received an airdrop. Instead, it should use
`recent_blockhash` to ensure the previous request is expired before signing another.
Note that the Solana cluster will reject any transaction with a `recent_blockhash`
beyond a certain *age*.
### Denial of Service
If the transaction data size is smaller than the size of the returned signature
(or descriptive error), a single client can flood the network. Considering
that a simple `Transfer` operation requires two public keys (each 32 bytes) and a
`fee` field, and that the returned signature is 64 bytes (and a byte to
indicate `Ok`), consideration for this attack may not be required.
In the current design, the drone accepts TCP connections. This allows clients
to DoS the service by simply opening lots of idle connections. Switching to UDP
may be preferred. The transaction data will be smaller than a UDP packet since
the transaction sent to the Solana cluster is already pinned to using UDP.

View File

@ -1,11 +0,0 @@
## Attack Vectors
### Colluding validation and replication clients
A colluding validation-client, may take the strategy to mark PoReps from non-colluding replicator nodes as invalid as an attempt to maximize the rewards for the colluding replicator nodes. In this case, it isnt feasible for the offended-against replicator nodes to petition the network for resolution as this would result in a network-wide vote on each offending PoRep and create too much overhead for the network to progress adequately. Also, this mitigation attempt would still be vulnerable to a >= 51% staked colluder.
Alternatively, transaction fees from submitted PoReps are pooled and distributed across validation-clients in proportion to the number of valid PoReps discounted by the number of invalid PoReps as voted by each validator-client. Thus invalid votes are directly dis-incentivized through this reward channel. Invalid votes that are revealed by replicator nodes as fishing PoReps, will not be discounted from the payout PoRep count.
Another collusion attack involves a validator-client who may take the strategy to ignore invalid PoReps from colluding replicator and vote them as valid. In this case, colluding replicator-clients would not have to store the data while still receiving rewards for validated PoReps. Additionally, colluding validator nodes would also receive rewards for validating these PoReps. To mitigate this attack, validators must randomly sample PoReps corresponding to the ledger block they are validating and because of this, there will be multiple validators that will receive the colluding replicators invalid submissions. These non-colluding validators will be incentivized to mark these PoReps as invalid as they have no way to determine whether the proposed invalid PoRep is actually a fishing PoRep, for which a confirmation vote would result in the validators stake being slashed.
In this case, the proportion of time a colluding pair will be successful has an upper limit determined by the % of stake of the network claimed by the colluding validator. This also sets bounds to the value of such an attack. For example, if a colluding validator controls 10% of the total validator stake, transaction fees will be lost (likely sent to mining pool) by the colluding replicator 90% of the time and so the attack vector is only profitable if the per-PoRep reward at least 90% higher than the average PoRep transaction fee. While, probabilistically, some colluding replicator-client PoReps will find their way to colluding validation-clients, the network can also monitor rates of paired (validator + replicator) discrepancies in voting patterns and censor identified colluders in these cases.

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