Compare commits

..

5191 Commits

Author SHA1 Message Date
mergify[bot]
15de250c2c Rpc: Add getCirculatingSupply endpoint, redux (#9953) (#9954)
automerge
2020-05-09 14:20:58 -07:00
Ryo Onodera
a7b0fcc21e v1.0: Maintain sysvar balances for consistent market cap. (#9937)
* Maintain sysvar balances for consistent market cap.

* Back-port fun and gating adjustments

* Add comment

* Adjust test
2020-05-08 09:19:03 -07:00
mergify[bot]
4999fa6263 Support ad-hoc genesis args in run.sh (#9697) (#9939)
automerge
2020-05-08 08:16:36 -07:00
Ryo Onodera
1f54be66c9 v1.0: Include account.owner into account hash (#9920)
automerge
2020-05-07 13:42:58 -07:00
Michael Vines
2e1c3a8338 Correct method name 2020-05-06 11:28:52 -07:00
Michael Vines
fe934eb7a0 Reduce spammy 'ReceiveUpdates took:' log 2020-05-06 08:48:27 -07:00
mergify[bot]
62a0c2f348 Gossip no longer pushes/pulls from nodes with a different shred version (bp #9868) (#9893)
automerge
2020-05-05 23:47:03 -07:00
mergify[bot]
cfeef3a9eb Display transaction fee in SOL (#9892) (#9897)
automerge

(cherry picked from commit e078ba1dde)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-05-05 22:44:01 -07:00
mergify[bot]
52009788ee Rpc: Filter blockstore data by cluster-confirmed root (#9873) (#9880)
automerge
2020-05-04 22:37:00 -07:00
mergify[bot]
2acf4d874d Rpc: add getLargestAccounts endpoint (#9869) (#9876)
automerge
2020-05-04 19:12:18 -07:00
mergify[bot]
f951d7d33f Avoid panic caused by converting non-positive / non-normal floating points values to duration (#9867) (#9871)
automerge
2020-05-04 14:40:58 -07:00
mergify[bot]
20fe24f348 cli: Add clap.rs default for --commitment (bp #9859) (#9860)
automerge
2020-05-02 17:58:31 -07:00
Michael Vines
2e5cc41945 Bump version to 1.0.22 2020-05-02 11:31:15 -07:00
sakridge
bc76b20e6d Fuzzer test and fixes (#9853) (#9857) 2020-05-02 10:00:51 -07:00
Michael Vines
3f6befe012 Watchtower can now emit a notification on all non-vote transactions (#9848) 2020-05-01 17:48:18 -07:00
sakridge
ee201cfb84 Put empty accounts in the accounts list on load (#9842)
Indexing into accounts array does not match account_keys otherwise.
Also enforce program accounts not at index 0
Enforce at least 1 Read-write signing fee-payer account.
2020-05-01 17:24:06 -07:00
Michael Vines
66ec12e869 Passing -v/--verbose to solana confirm now displays the full transaction (#9530) (#9843)
automerge

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-05-01 13:28:57 -07:00
Michael Vines
addfc99ff4 Add delay to keep RPC traffic down on error 2020-05-01 10:40:08 -07:00
Michael Vines
91f0faa72d v1.0: incinerator backport (#9837) 2020-05-01 09:02:43 -07:00
mergify[bot]
2deebe4d73 v1.1 backport custom error rename (bp #9826) (#9838)
automerge
2020-05-01 01:58:15 -07:00
mergify[bot]
5bc57ea004 Nits for sanitize trait (bp #9741) (#9809)
* thiserror, docs, remove general Failure case (#9741)

automerge

(cherry picked from commit a0514eb2ae)

# Conflicts:
#	core/src/crds_value.rs
#	core/src/epoch_slots.rs
#	sdk/src/sanitize.rs

* rebase

Co-authored-by: anatoly yakovenko <anatoly@solana.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
2020-04-30 14:35:18 -07:00
mergify[bot]
c63bd05458 Add commitment Root variant, and add fleshed out --commitment arg to Cli (#9806) (#9812)
automerge
2020-04-30 12:49:36 -07:00
mergify[bot]
b4933f4c74 Upgrade to Rust 1.43.0 (bp #9754) (#9807)
* Upgrade to Rust 1.43.0 (#9754)

(cherry picked from commit 230df0ec0c)

# Conflicts:
#	core/src/validator.rs
#	runtime/src/accounts_db.rs

* Update validator.rs

* Update accounts_db.rs

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-04-30 08:50:03 -07:00
mergify[bot]
e7748c603b Rpc Client: Prevent error out on get_num_blocks_since_signature_confirmation (#9792) (#9799)
automerge
2020-04-29 16:50:07 -07:00
mergify[bot]
6a5d782d6c Bump Rust-BPF version to be interoperable with latest Rust (#9783) (#9801)
automerge
2020-04-29 16:32:06 -07:00
mergify[bot]
89fad8f566 Rpc: remove unwraps (#9793) (#9796)
automerge
2020-04-29 14:44:41 -07:00
mergify[bot]
01cac89867 Fix BPF tool caching (#9781) (#9794)
automerge
2020-04-29 13:13:00 -07:00
Michael Vines
dfb4729b02 Don't divide by zero 2020-04-29 11:03:13 -07:00
Michael Vines
6ab5f823b3 Bump version to 1.0.21 2020-04-29 08:57:57 -07:00
mergify[bot]
bf1ceab6ed catchup now estimates the time remaining (#9782) (#9784)
automerge
2020-04-29 00:31:43 -07:00
mergify[bot]
dbaff495c8 v1.1: backport commitment max changes (#9775) (#9778)
automerge
2020-04-28 16:42:08 -07:00
Michael Vines
f65caa66bf Don't --use-move 2020-04-28 12:47:08 -07:00
Michael Vines
2f455e18ef Reorder steps by relative priority for when there aren't enough agents 2020-04-28 12:46:19 -07:00
Michael Vines
7b155f384d Disable move more 2020-04-28 12:38:51 -07:00
mergify[bot]
fd405239d9 Report duration of last alarm in the All Clear message (#9766) (#9770)
automerge

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-04-28 12:38:34 -07:00
sakridge
8698156e27 Update dalek (v1.0 bp) (#9765)
* Disable Move/Libra components

* Update dalek version

Co-authored-by: Trent Nelson <trent@solana.com>
2020-04-28 12:02:09 -07:00
mergify[bot]
2f0f218ad9 Use Blockstore lowest_slot to start root iterator (#9738) (#9767)
automerge
2020-04-28 11:11:10 -07:00
mergify[bot]
3cc75b4bab Set HOME correctly (#9757) (#9761)
automerge
2020-04-28 02:57:49 -07:00
mergify[bot]
0a0f8470d7 Clean up use to keep rust 1.43.0 from complaining (bp #9740) (#9748)
* Clean up `use` to keep rust 1.43.0 from complaining (#9740)

(cherry picked from commit c11abf88b7)
2020-04-27 23:21:32 -07:00
mergify[bot]
e46026f1fb Input values are not sanitized after they are deserialized, making it far too easy for Leo to earn SOL (bp #9706) (#9735)
automerge
2020-04-27 19:58:40 -07:00
mergify[bot]
fef5089d7e Fix broken doc link to anatomy of transaction (#9728) (#9729)
automerge
2020-04-27 01:27:26 -07:00
Michael Vines
a844bd70da Update metrics dashboard 2020-04-26 09:54:19 -07:00
Michael Vines
cbc01bd1b9 Cargo.lock 2020-04-25 23:08:21 -07:00
Michael Vines
e096cc1101 Use vec! 2020-04-25 23:08:09 -07:00
sakridge
0dc559d3cf Filter program ids v1.0 (#9723)
* Filter program ids to store

* add test
2020-04-25 22:52:39 -07:00
mergify[bot]
34f537adad Add support for log rotation, sending SIGUSR1 will cause the log file to be re-opened (#9713) (#9715)
(cherry picked from commit 50f1ec0374)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-04-24 15:57:47 -07:00
Michael Vines
9558628537 Update to rocksdb 0.14 and set max wal size (#9668) (#9688) (#9708)
Co-authored-by: sakridge <sakridge@gmail.com>
2020-04-24 10:43:01 -07:00
Dan Albert
940bf7081a Update solana-user-authorized_keys.sh 2020-04-23 16:32:23 -06:00
mergify[bot]
38c31c3b4e Exit cleanly on panic! so the process don't limp along in a half-dead state (#9690) (#9692)
automerge
2020-04-23 14:07:12 -07:00
mergify[bot]
253272d757 Remove stray 'v' (#9679) (#9680)
automerge
2020-04-23 00:51:25 -07:00
Michael Vines
9b1bd8065f Bump version to 1.0.20 2020-04-22 22:17:34 -07:00
Dan Albert
b2a5cf57ad Remove validator-info publish from net scripts 2020-04-22 18:06:46 -06:00
mergify[bot]
33c51ee75d Add getLowestNonpurgedBlock rpc; use blockstore api in getConfirmedBlocks (#9656) (#9663)
automerge
2020-04-22 15:17:51 -07:00
mergify[bot]
d8aa107fae Extend snapshot interval in multinode demo (#9657) (#9660)
automerge
2020-04-22 13:45:01 -07:00
mergify[bot]
82e02d0734 Relax setting withdraw authority during lockup (#9644) (#9645)
automerge
2020-04-21 22:35:27 -07:00
mergify[bot]
dae59bb3e1 Flag test_tvu_exit as serial to hopefully reduce CI flakiness (bp #9509) (#9636)
automerge
2020-04-21 17:16:05 -07:00
mergify[bot]
e0e7fc8e52 Wait for supermajority of cluster to have rooted a transaction to consider it finalized (#9618) (#9626)
automerge
2020-04-21 01:09:26 -07:00
mergify[bot]
9abc84c583 Move streamer test to integration test (#9050) (#9624)
automerge
2020-04-21 00:50:46 -07:00
Stephen Akridge
db6540772c Check distance for timestamp 2020-04-20 11:36:17 -07:00
mergify[bot]
840ebfe625 Error for invalid shred. (#9588) (#9596)
automerge
2020-04-19 22:42:48 -07:00
Michael Vines
953282dbf4 Budget for gossip traffic (#9550) (#9583)
automerge
2020-04-19 09:43:44 -07:00
mergify[bot]
788d1199ac Fix local-cluster test - archiver should wait for itself + 1 validator (#9577) (#9584)
automerge
2020-04-19 01:36:14 -07:00
Michael Vines
f6a8f718a8 Make rpc_subscriptions.rs tests serial (#9556)
automerge

(cherry picked from commit b58338b066)
2020-04-17 11:40:31 -07:00
sakridge
f225bf6f01 Make rpc tests serial (#9537)
(cherry picked from commit e655cba5bd)
2020-04-16 22:17:41 -07:00
Michael Vines
b5f03a380b Only build x86_64-unknown-linux-gnu on docs.rs 2020-04-16 19:07:43 -07:00
Michael Vines
140c75f613 Don't upload tarballs to buildkite to speed up build 2020-04-16 13:55:15 -07:00
Stephen Akridge
6a59f67fdc Write wallet key to explicit file
(cherry picked from commit 93669ab1fc)
2020-04-16 13:41:14 -07:00
Michael Vines
5943747001 Bump version to 1.0.19 2020-04-16 12:19:48 -07:00
mergify[bot]
f26f18d29d Don't unwrap on session new (#9531)
automerge
2020-04-16 10:05:41 -07:00
mergify[bot]
9b58d72f52 Rpc: Speed up getBlockTime (#9510) (#9513)
automerge
2020-04-16 00:19:50 -07:00
Michael Vines
0c885d6a04 Default to RUST_BACKTRACE=1 for more informative validator logs
(cherry picked from commit 4ac15e68cf)
2020-04-15 22:46:24 -07:00
Michael Vines
70b51c0a5a Pacify shellcheck 2020-04-15 17:53:23 -07:00
Michael Vines
560660ae11 Always run shellcheck 2020-04-15 17:53:03 -07:00
Michael Vines
5436855b67 Update build-cli-usage.sh 2020-04-15 17:49:15 -07:00
Michael Vines
7351e5ed2c Use $rust_stable
(cherry picked from commit d567799d43)

# Conflicts:
#	docs/build-cli-usage.sh
2020-04-15 17:49:15 -07:00
mergify[bot]
7ee993fadf RPC: Add health check URI (bp #9499) (#9504)
automerge
2020-04-15 12:31:08 -07:00
sakridge
9bf459e82f Fix race in multi_bind_in_range (#9493)
(cherry picked from commit ee72714c08)
2020-04-14 17:59:15 -07:00
sakridge
545090ff17 limit test jobs to 16 to prevent OOM (#9500)
(cherry picked from commit 2b2b2cac1f)
2020-04-14 17:52:05 -07:00
Michael Vines
bd8074507f Bump version to v1.0.18 2020-04-14 09:58:33 -07:00
Ryo Onodera
cfc7b22c4c Use type alias 2020-04-13 21:12:44 -07:00
Ryo Onodera
5f1c637508 Conditionally change max_age 2020-04-13 21:12:44 -07:00
Ryo Onodera
d888e0a6d7 Use same max_age regardless of leader/not-leader 2020-04-13 21:12:44 -07:00
Michael Vines
10e808e1bd Fail coverage faster in CI 2020-04-13 21:09:26 -07:00
Michael Vines
d9b03ca38b Assume json_rpc_url can be upgrade to a websocket if no port is supplied
(cherry picked from commit bcfadd6085)
2020-04-13 20:32:26 -07:00
Michael Vines
608d75b348 Unfold coverage test failures
(cherry picked from commit d4ea1ec6ad)
2020-04-13 18:08:25 -07:00
Michael Vines
cee3cee4ef Reorder CI jobs to allow for more concurrent PRs
(cherry picked from commit ce027da236)
2020-04-13 13:00:39 -07:00
Dan Albert
09e51323f0 Update buildkite-tests.yml
(cherry picked from commit 92a5a51632)
2020-04-13 11:01:00 -07:00
Michael Vines
da6f702129 Bump version to 1.0.17 2020-04-11 19:32:42 -07:00
mergify[bot]
02a83e7c6e Allow lower shred count (#9410) (#9451)
automerge
2020-04-11 14:49:32 -07:00
sakridge
83263e1737 Calculate account refs fix (#9448) 2020-04-11 12:56:20 -07:00
mergify[bot]
1f7ac22b60 Don't subject authorizing a new stake authority to lockup (#9434) (#9441)
automerge
2020-04-10 17:25:15 -07:00
Michael Vines
747debae56 Cache downloads to speed up CI
(cherry picked from commit b4e00275b2)
2020-04-10 12:25:49 -07:00
mergify[bot]
00b4186469 Improve coverage.sh usability when used locally (#9054) (#9424)
automerge
2020-04-10 05:59:35 -07:00
mergify[bot]
b087dabf4f Rpc: Add getConfirmedSignaturesForAddress (#9407) (#9417)
automerge
2020-04-09 21:20:28 -07:00
mergify[bot]
e00eb0a069 Remove Trust Wallet Beta install instructions (#9396) (#9397)
automerge
2020-04-09 08:52:04 -07:00
mergify[bot]
d4e49ffd06 Rpc: Add getConfirmedTransaction (#9381) (#9392)
automerge
2020-04-09 01:00:34 -07:00
Michael Vines
0f34a190ea Bump version to 1.0.16 2020-04-09 00:05:16 -07:00
mergify[bot]
df2fb8f5b3 Add --no-wait arg to transfer (#9388) (#9390)
automerge
2020-04-08 23:49:40 -07:00
mergify[bot]
80d2a6046b Moar vm.max_map_count (#9389)
automerge
2020-04-08 23:18:30 -07:00
mergify[bot]
24273b826f Add blockstore address-to-signature index (#9367) (#9378)
automerge
2020-04-08 13:55:53 -07:00
mergify[bot]
68d2616e35 stake-monitor: Add 1 SOL grace, to allow for a complaint system account to fund a reasonable number of transactions. (bp #9359) (#9363)
automerge
2020-04-08 11:56:01 -07:00
mergify[bot]
f506d39339 Improve ledger-tool/accounts for easier debuging (#9370) (#9371)
automerge
2020-04-08 11:31:41 -07:00
Michael Vines
bc58c9ec7e Cache solana-perf.tgz to speed up CI (#9360)
automerge

(cherry picked from commit dc91698b3a)
2020-04-07 13:32:13 -07:00
Michael Vines
b57a52cd85 Bump version to 1.0.15 2020-04-07 09:36:47 -07:00
Michael Vines
8631be42ac Add support for monitoring system account balances (#9345)
automerge

(cherry picked from commit 03978ac5a5)
2020-04-06 22:57:47 -07:00
Tyera Eulberg
09367369ef Reinstate commitment param to support old clients (#9324) (#9329)
automerge
2020-04-06 12:21:19 -07:00
mergify[bot]
23b8c95cc4 Update getSignatureStatuses to return historical statuses (#9314) (#9321)
automerge
2020-04-06 04:24:19 -07:00
Tyera Eulberg
e61392b057 Rework TransactionStatus index in blockstore (#9281) (#9304) (#9312)
automerge

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-04-05 12:52:15 -06:00
mergify[bot]
7deba20395 Deprecate confirmTransaction, getSignatureStatus, and getSignatureConfirmation (bp #9298) (#9308)
automerge
2020-04-05 02:41:10 -07:00
Michael Vines
274c097f84 RPC: add err field to TransactionStatus, alongside the now deprecated status field (#9296) (#9307)
automerge
2020-04-05 00:21:15 -07:00
Michael Vines
1c7cea1af4 Add stake-monitor 2020-04-03 20:37:28 -07:00
Michael Vines
4406496d2f Add log before opening database
(cherry picked from commit b557b3170e)
2020-04-03 15:10:57 -07:00
sakridge
a15fa4840c Fix repair dos (#9056) 2020-04-03 13:20:39 -07:00
Michael Vines
c9030660d6 Bump version to 1.0.14 2020-04-02 22:42:28 -07:00
Dan Albert
fdeda769d0 Backport wallet doc changes to v1.0 (#9268)
* Add ledger live screenshots and reduce duplicate instructions (#9258)

automerge

* Add instructions for Trust Wallet Beta for Android (#9261)

automerge
2020-04-02 15:37:26 -06:00
mergify[bot]
53edd26578 Add instructions for Trust Wallet Beta for Android (#9261) (#9264)
automerge
2020-04-02 12:25:32 -07:00
Dan Albert
2433cdd6d6 Set checks timeout to 20 minutes 2020-04-02 13:11:03 -06:00
Dan Albert
77b34c278e Do not trigger tests if only docs were modified (#9240) (#9257) 2020-04-02 10:44:51 -06:00
mergify[bot]
90e993fd9a Add epoch subcommand (#9249) (#9254)
automerge
2020-04-01 22:29:18 -07:00
Tyera Eulberg
251054d8c9 Backport confirmations fix. (#9252)
automerge
2020-04-01 19:42:04 -07:00
Tyera Eulberg
d4bb7cec69 Undo breaking rpc removal of getSignatureConfirmation (#9247) 2020-04-01 18:04:11 -06:00
mergify[bot]
a3f6b04345 Add fee-payer option to docs (bp #9230) (#9236)
automerge
2020-04-01 15:11:47 -07:00
Justin Starry
ba4a5053dd Undo getSignatureStatus breaking change, add getSignatureStatuses (#9231)
automerge
2020-04-01 12:21:56 -07:00
mergify[bot]
6b47a259c3 Add a support page for wallet docs (#9229) (#9234)
automerge
2020-04-01 11:22:50 -07:00
mergify[bot]
c9ec13cf1f Tune udp buffers and vmmap immediately (#9194) (#9216)
automerge
2020-04-01 00:52:50 -07:00
mergify[bot]
906a6ab837 Fix error with account hash list getting too big for gossip (#9197) (#9214)
automerge
2020-03-31 23:27:18 -07:00
mergify[bot]
d0e478a9f8 Fix panic (#9195) (#9208)
automerge
2020-03-31 22:03:46 -07:00
mergify[bot]
b560b64d33 Remove unecessary security exception and add a new one (bp #9200) (#9205)
* Remove unecessary exception and add a new one (#9200)

(cherry picked from commit 62e12e3af5)

# Conflicts:
#	ci/test-checks.sh

* Update test-checks.sh

Co-authored-by: sakridge <sakridge@gmail.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
2020-03-31 19:50:04 -07:00
mergify[bot]
057af41716 Fix links (#9184) (#9187)
automerge
2020-03-31 09:57:23 -07:00
Michael Vines
a44b8abd48 Bump version to v1.0.13 2020-03-30 23:05:41 -07:00
mergify[bot]
8778ecaed5 Ledger cleanup fixes (#9131) (#9175)
automerge
2020-03-30 20:42:17 -07:00
Michael Vines
a02542ada3 Bump version to v1.0.12 2020-03-30 08:45:50 -07:00
Michael Vines
ea17c6883f Remove chatty 'setting snapshot root:' info log 2020-03-30 08:44:24 -07:00
Michael Vines
706306645b solana account now displays the account's rent epoch 2020-03-30 08:44:24 -07:00
sakridge
da9e930788 Calculate ref counts earlier to prevent bad clean (#9153) 2020-03-29 14:42:57 -07:00
mergify[bot]
8b8e066bbe Add RPC subscription api for rooted slots (#9118) (#9126)
automerge
2020-03-27 13:09:32 -07:00
mergify[bot]
3473350b62 fix links (#9125) (#9128)
automerge
2020-03-27 10:28:23 -07:00
mergify[bot]
59d7eb5216 Fix links in docs (#9119) (#9127)
automerge
2020-03-27 09:50:28 -07:00
mergify[bot]
55ba934137 Document transaction field in getConfirmedBlock responses (#9121) (#9124)
automerge
2020-03-27 09:45:30 -07:00
mergify[bot]
4c3dcb7f7e Exclude all executable accounts from rent collection (#9116) (#9120)
automerge
2020-03-27 09:27:07 -07:00
mergify[bot]
3a879db8af Fix broken gitbook links (#9107) (#9108)
automerge
2020-03-26 20:33:20 -07:00
mergify[bot]
d2107270ea Consolidate signature-status rpcs (bp #9069) (#9105)
automerge
2020-03-26 20:30:46 -07:00
mergify[bot]
007afe22d0 Add docs for app wallets (#9098) (#9103)
automerge
2020-03-26 18:26:23 -07:00
mergify[bot]
93a1d10e15 Revert setting the default toolchain (#9093) (#9097)
automerge
2020-03-26 15:59:26 -07:00
mergify[bot]
d57a7c8f21 Restructure wallet docs to prep for app wallet content (#9088) (#9095)
automerge
2020-03-26 14:39:32 -07:00
mergify[bot]
6db39829c8 Install xargo using CI dictated cargo version if available (#9068) (#9092)
automerge
2020-03-26 14:02:09 -07:00
mergify[bot]
ec76826493 Unflake rpc subscriptions test by reducing sub count (#9078) (#9082)
automerge
2020-03-25 22:56:52 -07:00
carllin
d4ddb6265b Convert Banks (#9033)
* Store and compute needed state in EpochStakes struct
Co-authored-by: Carl <carl@solana.com>
2020-03-25 20:43:48 -07:00
Michael Vines
7a8233d7ca Bump version to 1.0.11 2020-03-25 19:17:06 -07:00
mergify[bot]
95bc051129 Cargo update bumpalo (#9067) (#9077)
automerge
2020-03-25 18:51:38 -07:00
mergify[bot]
02bcf4f8e2 ledger-tool can now decode stake instructions (bp #9045) (#9076)
automerge
2020-03-25 18:02:31 -07:00
sakridge
4b0d4e9834 Remove accounts unwrap (#9063)
automerge
2020-03-25 10:59:52 -07:00
mergify[bot]
bf4cdc091a Fix xargo to version 0.3.19 to avoid unstable feature (#9065) (#9066)
automerge

(cherry picked from commit c558db2a48)

Co-authored-by: Justin Starry <justin@solana.com>
2020-03-25 08:48:22 -07:00
mergify[bot]
5f2cf2b44d Increase vmap count in sys-tuner (#8940) (#9064)
(cherry picked from commit a70008cc5c)

Co-authored-by: sakridge <sakridge@gmail.com>
2020-03-25 08:06:36 -07:00
mergify[bot]
03aae5eb5f Ignore RUSTSEC-2020-0006 for the moment (#9057) (#9059)
automerge
2020-03-24 21:06:15 -07:00
mergify[bot]
5f1ce81fbc ledger tool now outputs transaction status information if available (#9024) (#9026)
automerge
2020-03-24 12:23:25 -07:00
mergify[bot]
fc582aa57c Refactor how pubsub subscriptions are added (#9042) (#9049)
automerge
2020-03-24 11:05:33 -07:00
mergify[bot]
13676e9614 Fix timeout for subscriptions test (#9043) (#9044)
automerge
2020-03-24 02:57:25 -07:00
Michael Vines
7636a0521f solana-install-init: --pubkey is no longer required on platforms without a default update manifest 2020-03-23 22:40:53 -07:00
Michael Vines
ad06354a18 Remove , 2020-03-23 22:11:56 -07:00
Michael Vines
953cb93e44 Bump version to 1.0.10 2020-03-23 21:58:45 -07:00
Dan Albert
38b2957a8e Remove unused default update manifest pubkeys (#9041)
automerge
2020-03-23 20:57:43 -07:00
Tyera Eulberg
9eb39df93f Backport: add slot to signature notification & respect confirmations param (#9036)
automerge
2020-03-23 18:32:05 -07:00
mergify[bot]
f34ce94347 Remove Ledger-specific analysis of hardware wallets (#9028) (#9030)
automerge
2020-03-23 14:48:58 -07:00
mergify[bot]
5c6411fc06 Fix link in gitbook (#9027) (#9029)
automerge
2020-03-23 14:48:41 -07:00
Michael Vines
3ab428693a Manual v1.0 backports (#9025)
automerge
2020-03-23 13:55:03 -07:00
Michael Vines
7ffaf2ad29 Manual v1.0 backports (#9015)
automerge
2020-03-22 22:44:55 -07:00
sakridge
a5e4a1f2d8 Drop storage lock (#8997) 2020-03-21 18:55:59 -07:00
mergify[bot]
6ae99848f4 Revert "Move Install Solana doc into the Command-line Guide (#8982)" (#8992) (#8993)
This reverts commit 5fa36bbab3.

(cherry picked from commit 1aab959d4e)

Co-authored-by: Greg Fitzgerald <greg@solana.com>
2020-03-21 14:52:53 -06:00
mergify[bot]
5342b3a53f Shred fetch comment and debug message tweak (#8980) (#8990)
automerge

(cherry picked from commit 909321928c)

Co-authored-by: sakridge <sakridge@gmail.com>
2020-03-21 09:25:08 -07:00
sakridge
50a3c98d21 Shred filter (#8975) (#8987)
Thread bank_forks into shred fetch and filter by slot.
2020-03-20 11:33:19 -07:00
Michael Vines
ca2b7a2c5b Cargo.lock 2020-03-20 11:05:45 -07:00
mergify[bot]
e900623817 Update value names in docs (#8983) (#8985)
automerge
2020-03-20 09:36:55 -07:00
mergify[bot]
a46e953ebb Move Install Solana doc into the Command-line Guide (#8982) (#8984)
automerge
2020-03-20 09:24:56 -07:00
mergify[bot]
3bbc51a6ae Improve CLI usage messages (#8972) (#8977)
automerge
2020-03-19 21:52:37 -07:00
Michael Vines
7ae2464cf3 Fix windows build by removing sys-info (#8860) (#8973)
automerge
2020-03-19 18:14:01 -07:00
Michael Vines
58a36ce484 Bump version to 1.0.9 2020-03-19 17:10:35 -07:00
Dan Albert
61bd9e6a28 Fix windows binary build on v1.0 (#8968)
Co-authored-by: Michael Vines <mvines@gmail.com>
2020-03-19 15:58:34 -07:00
Tyera Eulberg
495ab631d6 Some Cli polish (#8966) (#8970)
automerge
2020-03-19 14:11:52 -07:00
Tyera Eulberg
93906847f9 Cli: polish transaction progress bar (#8963) (#8967)
automerge
2020-03-19 12:54:50 -07:00
Dan Albert
70f4c4a974 Build windows binaries on v1.0 (#8965) 2020-03-19 11:06:17 -07:00
mergify[bot]
ad6078da2d CLI: Fix create-nonce-account with seed (#8929) (#8961)
automerge
2020-03-19 10:32:35 -07:00
Michael Vines
2a617f2d07 v1.0: Backport of #8939 (#8957)
automerge
2020-03-19 02:08:36 -07:00
mergify[bot]
6af3c6ecbc CLI: Add multi-session signing support (#8927) (#8953)
* SDK: Add `NullSigner` implementation

* SDK: Split `Transaction::verify()` to gain access to results

* CLI: Minor refactor of --sign_only result parsing

* CLI: Enable paritial signing

Signers specified by pubkey, but without a matching --signer arg
supplied fall back to a `NullSigner` when --sign-only is in effect.
This allows their pubkey to be used for TX construction as usual,
but leaves their `sign_message()` a NOP. As such, with --sign-only
in effect, signing and verification must be done separately, with
the latter's per-signature results considered

* CLI: Surface/report missing/bad signers to user

* CLI: Suppress --sign-only JSON output

* nits

* Docs for multi-session offline signing

(cherry picked from commit 98228c392e)

Co-authored-by: Trent Nelson <trent@solana.com>
2020-03-18 23:39:44 -07:00
mergify[bot]
a5938e5a21 Bump bv from 0.11.0 to 0.11.1 (bp #8952) (#8955)
automerge
2020-03-18 22:33:05 -07:00
mergify[bot]
8eaa8d8788 Add docs on wallets and generating keys (bp #8905) (#8946)
automerge
2020-03-18 19:15:34 -07:00
mergify[bot]
51940eec9b Delete broken link (#8950) (#8951)
automerge
2020-03-18 18:20:36 -07:00
mergify[bot]
d1e16b2bc4 Remove product string from device keypair URL (#8942) (#8945)
automerge
2020-03-18 14:11:41 -07:00
mergify[bot]
97051c87b4 Document account/signer requirements for vote instructions (#8941)
automerge
2020-03-18 12:20:02 -07:00
mergify[bot]
2521913654 Add counter for accounts hash verification. (#8928) (#8934)
automerge
2020-03-18 09:57:38 -07:00
mergify[bot]
803c87b4bd Add docs for --trusted-validator options (#8911) (#8933)
automerge
2020-03-18 08:37:15 -07:00
mergify[bot]
8ff9ee3a06 Cli: add spinner progress bar when waiting for transaction confirmation (#8916) (#8920)
automerge
2020-03-17 20:06:01 -07:00
mergify[bot]
25bf2c6062 Extend local-cluster CI timeout (#8921) (#8923)
automerge
2020-03-17 19:48:57 -07:00
mergify[bot]
fc80b77fc4 Increase buffer on low SOL fault to over a week (#8903) (#8904)
automerge
2020-03-17 10:32:28 -07:00
mergify[bot]
5a7707362c Sort device paths for select (#8896) (#8897)
automerge
2020-03-16 19:43:11 -07:00
mergify[bot]
0102ee3fa9 Hoist USB URL docs (#8894) (#8895)
automerge
2020-03-16 16:31:35 -07:00
mergify[bot]
d29cb19a73 Cli: enable flexible flexible signer paths for pubkey args (#8892) (#8893)
automerge
2020-03-16 16:16:58 -07:00
sakridge
1cc66f0cd7 Add Accounts hash consistency halting (#8772) (#8889)
* Accounts hash consistency halting

* Add option to inject account hash faults for testing.

Enable option in local cluster test to see that node halts.
2020-03-16 14:29:44 -07:00
mergify[bot]
e2cfc513eb Add genesis token counter test to system test (#8824) (#8891)
automerge
2020-03-16 13:32:58 -07:00
mergify[bot]
8115a962e9 Cleanup CLI types (#8888) (#8890)
automerge
2020-03-16 12:28:22 -07:00
mergify[bot]
0c804e2ef2 Use types for CLI value names (#8878) (#8886)
automerge
2020-03-16 09:23:15 -07:00
mergify[bot]
cbe36a7a63 Lower error level of InvalidTickCount (bp #8880) (#8885)
automerge
2020-03-16 08:53:33 -07:00
mergify[bot]
174825fecf Fix faucet command in run.sh (#8883) (#8884)
automerge
2020-03-16 05:38:31 -07:00
Michael Vines
c7e80bebdc Bump version to 1.0.8 2020-03-15 21:50:06 -07:00
Michael Vines
57abc370fa Quietly re-introduce legacy --voting-keypair/--identity-keypair args for v1.0.6 compatibility
(cherry picked from commit 49706172f3)
2020-03-15 20:21:23 -07:00
mergify[bot]
42ab421a87 Rename leader to validator, drop _keypair/-keypair suffix (#8876) (#8877)
automerge
2020-03-15 14:14:32 -07:00
mergify[bot]
9ab27291f5 Validators now run a full gossip node while looking for a snapshot (#8872)
automerge
2020-03-15 10:29:13 -07:00
mergify[bot]
27e4e9cb8d Cli: Add resolve-signer subcommand (#8859) (#8870)
automerge
2020-03-14 22:14:24 -07:00
mergify[bot]
b0cf65dfc8 Refactor system tests dir structure (#8865) (#8869)
automerge
2020-03-14 19:38:19 -07:00
Dan Albert
bfc97c682c Apply s/faucet-keypair/faucet renaming to net scripts (#8868)
automerge
2020-03-14 18:14:49 -07:00
mergify[bot]
231c9b25d1 Rework validator vote account defaults to half voting fees (#8858)
automerge
2020-03-13 21:47:32 -07:00
Michael Vines
f536d805ed Rework cluster metrics dashboard to support the modern clusters
(cherry picked from commit 5f5824d78d)

# Conflicts:
#	system-test/automation_utils.sh
2020-03-13 20:18:06 -07:00
Michael Vines
cb6e7426a4 Drop :8899 port from http://devnet.solana.com references
(cherry picked from commit 9e0a26628b)
2020-03-13 20:14:02 -07:00
mergify[bot]
71f391ae04 Enable any signer in various cli subcommands (#8844) (#8856)
automerge
2020-03-13 18:11:05 -07:00
mergify[bot]
12bf34f059 Remove holding Poh lock (#8838) (#8850)
automerge
2020-03-13 16:56:22 -07:00
Grimes
a3a14d6b5b Docs: Use correct flag in keypair verification instructions (#8677)
automerge

(cherry picked from commit 542691c4e4)
2020-03-13 16:00:33 -07:00
Michael Vines
5e22db017a Surface the missing pubkey
(cherry picked from commit ce88602ced)
2020-03-13 16:00:01 -07:00
mergify[bot]
2cd09957b4 Cli: add subcommand to withdraw from vote account (#8550) (#8840)
automerge
2020-03-13 15:31:47 -07:00
mergify[bot]
d1ec6c0b8b Upgrade to Rust 1.42 (#8836) (#8839)
automerge
2020-03-13 14:29:18 -07:00
Michael Vines
7722723400 Bump version to 1.0.7 2020-03-13 08:10:09 -07:00
Trent Nelson
4a42cfc42a Cli error cleanup 1.0 (#8834)
* Don't use move semantics if not needed (#8793)

* SDK: Deboilerplate `TransportError` with thiserror

* Enable interchange between `TransportError` and `ClientError`

* SDK: Retval consistency between `Client` and `AsyncClient` traits

* Client: Introduce/use `Result` type

* Client: Remove unused `RpcResponseIn` type

* Client: Rename `RpcResponse` to more appropriate `RpcResult`

* Client: Death to `io::Result` return types

* Client: Struct-ify `ClientError`

* Client: Add optional `command` parameter to `ClientError`

* RpcClient: Stop abusing `io::Error` (low-fruit)

* ClientError: Use `thiserror`'s `Display` impl

* Extend `RpcError`'s utility

* RpcClient: Stop abusing `io::Error` (the rest)

* CLI: Shim `main()` so we can `Display` format errors

* claputils: format input validator errors with `Display`

They are intended to be displayed to users

* SDK: `thiserror` for hash and sig parse erros

* Keygen: Shim main to format errors with `Display`

* SDK: `thiserror` for `InstructionError`

* CLI: `thiserror` for `CliError`

* CLI: Format user messages with `Display`

* Client: Tweak `Display` for `ClientError`

* RpcClient: Improve messaging when TX cannot be confirmed

* fu death io res retval

* CLI/Keygen - fix shell return value on error

* Tweak `InstructionError` `Display` messages as per review

* Cleanup hackjob return code fix

* Embrace that which you hate most

* Too much...

Co-authored-by: Jack May <jack@solana.com>
2020-03-13 07:42:25 -06:00
mergify[bot]
976d744b0d Enable conservative out-of-bound snapshot cleaning (#8811) (#8832)
automerge
2020-03-12 23:40:17 -07:00
mergify[bot]
62de02c8d4 Avoid early clean and bad snapshot by ref-counting (#8724) (#8831)
automerge
2020-03-12 23:09:45 -07:00
mergify[bot]
2741a5ce3b Move history out of intro (bp #8825) (#8826)
automerge
2020-03-12 18:21:56 -07:00
mergify[bot]
0c818acd90 Move intro out of README (#8735) (#8827)
automerge

(cherry picked from commit c0fd017906)

Co-authored-by: Greg Fitzgerald <greg@solana.com>
2020-03-12 18:49:51 -06:00
Michael Vines
4d04915302 Update source markdown in CI 2020-03-12 14:56:00 -07:00
Michael Vines
7576411c59 Don't tell users to install unreleased software versions 2020-03-12 14:55:46 -07:00
Michael Vines
ab2bed6e8f Add all of docs/src 2020-03-12 14:45:48 -07:00
mergify[bot]
f66a5ba579 Update keys (#8821) (#8822)
automerge
2020-03-12 14:15:32 -07:00
Dan Albert
9253d786f8 Revert over-zealous versioning text (#8819)
automerge
2020-03-12 09:49:26 -07:00
mergify[bot]
d1be1ee49e Fix malformed doc link (#8817) (#8818)
automerge
2020-03-12 09:46:26 -07:00
mergify[bot]
65833eacd8 Update keys (#8814) (#8816)
automerge
2020-03-12 09:39:31 -07:00
Dan Albert
921994e588 Restrict which nodes can run stable and coverage (#8807)
automerge
2020-03-11 19:18:10 -07:00
mergify[bot]
91dfd962e5 Update keys (#8800) (#8806)
automerge
2020-03-11 19:04:46 -07:00
Trent Nelson
18067dcb55 CLI: Plumb nonce-stored fees (#8750)
automerge

(cherry picked from commit 0422af2aae)
2020-03-11 13:09:40 -07:00
Greg Fitzgerald
7501e1b0f0 Update keys (#8791)
(cherry picked from commit a0d0d4c0e9)
2020-03-11 13:08:48 -07:00
mergify[bot]
1bd2c1de20 Notify when validator balance goes below 1 SOL (#8792)
automerge
2020-03-11 11:47:08 -07:00
mergify[bot]
a9ef20d43f Update keys (#8783) (#8784)
automerge
2020-03-10 21:39:34 -07:00
mergify[bot]
00a9d66fed Improve install messaging (#8477) (#8785)
automerge
2020-03-10 20:30:39 -07:00
mergify[bot]
7508ffe703 Add checkmark (#8781) (#8782)
automerge
2020-03-10 18:32:53 -07:00
Michael Vines
6c2368bfc9 Permit fee-payer/split-stake accounts to be the same when using --seed
(cherry picked from commit 775ce3a03f)
2020-03-10 16:16:26 -07:00
Michael Vines
6bcb797260 Revert to a computed websocket_url value when json_rpc_url is changed
(cherry picked from commit f655372b08)
2020-03-10 16:12:23 -07:00
mergify[bot]
329945e56f Print approved msg after Ledger interaction (#8771) (#8775)
automerge
2020-03-10 15:06:43 -07:00
mergify[bot]
1f80346d97 watchtower: Add --monitor-active-stake flag (bp #8765) (#8769)
automerge
2020-03-10 13:27:19 -07:00
mergify[bot]
38e661d7ba CLI Nonce account access dereplicode (#8743) (#8767)
automerge
2020-03-10 13:15:18 -07:00
mergify[bot]
592c4efd17 Configure the cluster right after installing it (#8761) (#8762)
automerge
2020-03-10 10:14:55 -07:00
mergify[bot]
1629745bd3 Move docs to imperative mood (bp #8643) (#8763)
automerge
2020-03-10 09:50:59 -07:00
mergify[bot]
02e078c22e Fix Gitbook's markdown rendering (#8759) (#8760)
automerge
2020-03-10 08:09:51 -07:00
Michael Vines
ea9e7c710a Bump version to 1.0.6 2020-03-09 22:38:57 -07:00
Michael Vines
ee5aa0c1a2 Support monitoring multiple validators 2020-03-09 21:07:32 -07:00
HM
55dee2901e watchtower: flag to suppress duplicate notifications (#8549)
* watchtower: send error message as notification

* watchtower: send all clear notification when ok again

* watchtower: add twilio sms notifications

* watchtower: flag to suppress duplicate notifications

* remove trailing space character

* changes as per suggestion on PR

* all changes together

* cargo fmt
2020-03-09 21:07:32 -07:00
Michael Vines
2b0824d18b watchtower now uses cli-config/
(cherry picked from commit 74e7da214a)
2020-03-09 20:40:18 -07:00
Michael Vines
b0709ea0ac Move cli-config default out of cli/ into cli-config/
(cherry picked from commit 756ba07b16)
2020-03-09 20:40:18 -07:00
Michael Vines
81b5499f7a Rename 'url' to 'json_rpc_url'
(cherry picked from commit 5c236fd06c)
2020-03-09 20:40:18 -07:00
Michael Vines
c96ce99705 Wait for 80% of the active stake instead of 75% 2020-03-09 20:31:44 -07:00
mergify[bot]
8dcd2d11e1 Docs: Fix missing CLI usage.md (#8745) (#8749)
automerge
2020-03-09 20:05:24 -07:00
mergify[bot]
777aae9059 Remove --derivation-path option (#8741) (#8747)
automerge
2020-03-09 19:17:14 -07:00
mergify[bot]
4dd1340236 Limit waiting-message to single- or last-chunk apdus (#8730) (#8733)
automerge
2020-03-09 15:44:17 -07:00
mergify[bot]
889b06e1d4 Allow passing of program_id to programs (bp #8639) (#8670)
automerge
2020-03-09 12:36:34 -07:00
mergify[bot]
f511296ee8 Fix account tests (#8615) (#8729)
automerge
2020-03-09 11:19:14 -07:00
mergify[bot]
c19eb717b4 Update rust-bpf to include matching cargo (#8598) (#8727)
automerge
2020-03-09 10:42:19 -07:00
mergify[bot]
dd54369e1b Cli: Fix create-with-seed (#8706) (#8723)
automerge
2020-03-09 00:16:29 -07:00
Michael Vines
bb563b4835 Permit --no-untrusted-rpc without any --trusted-validators 2020-03-08 22:34:53 -07:00
mergify[bot]
d061fadede Add purge function to ledger-tool (#8719) (#8720)
(cherry picked from commit de34187db0)

Co-authored-by: sakridge <sakridge@gmail.com>
2020-03-08 21:38:38 -07:00
mergify[bot]
577cd2bd3a Remove unnecessary snapshot hash verification (#8711) (#8714)
(cherry picked from commit f992ee3140)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-03-07 14:41:45 -07:00
mergify[bot]
9d1c8657e2 Groom ledger-tool bounds output (#8710) (#8715)
(cherry picked from commit acb23e8ef0)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-03-07 14:15:50 -07:00
mergify[bot]
67216ac7f5 Split staker infos (#8683)
automerge
2020-03-06 23:44:06 -08:00
mergify[bot]
e63b24c39f Remove ask-seed-phrase arg from validator, archiver (#8697) (#8713)
automerge
2020-03-06 23:34:20 -08:00
Greg Fitzgerald
d963f7afb4 Set withdrawer keys (#8707)
automerge
2020-03-06 21:21:00 -08:00
mergify[bot]
a07bf4870a Fix Ledger docs (#8705) (#8708)
automerge
2020-03-06 21:03:15 -08:00
mergify[bot]
8422d4b3fb Disable setLogFilter RPC API by default (#8693) (#8699)
automerge
2020-03-06 18:16:04 -08:00
mergify[bot]
ff4731cce2 RPC: Add getFeeCalculatorForBlockhash method call (#8687) (#8698)
automerge
2020-03-06 17:25:33 -08:00
mergify[bot]
659aaafff6 Ledger: return specific error if ledger-app-solana is not running (#8684) (#8695)
automerge
2020-03-06 16:28:53 -08:00
mergify[bot]
175651c497 Add shred version support to net/ (#8689) (#8694)
automerge
2020-03-06 15:41:16 -08:00
mergify[bot]
085e773f27 Properly escape current version (#8686) (#8688)
(cherry picked from commit a78a339407)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-03-06 14:37:41 -07:00
Michael Vines
5d3140c040 Cargo.lock 2020-03-06 14:25:54 -07:00
Michael Vines
d8d7238920 Bump version to 1.0.5 2020-03-06 14:14:53 -07:00
mergify[bot]
418c3cd4cf Delete Archiver installation docs (#8665) (#8669)
automerge
2020-03-06 12:49:52 -08:00
Michael Vines
9f532cb50f Publish initial snapshot hash in gossip on validator startup (#8678) 2020-03-05 23:01:35 -07:00
Michael Vines
c35f4927cd Bump version to 1.0.4 2020-03-05 16:10:24 -07:00
Michael Vines
2d0f4b5c8c Bump version to 1.0.3 2020-03-05 13:05:12 -07:00
Grimes
fe59ee61e6 Add find_incomplete_slots (#8654) (#8671)
automerge
2020-03-05 11:52:20 -08:00
Michael Vines
bda2acb06d SDK: Allow RecentBlockhashes to hold the entire BlockhashQueue (#8632) (#8672)
automerge

(cherry picked from commit 9d667db634)

Co-authored-by: Grimes <39311140+solana-grimes@users.noreply.github.com>
2020-03-05 12:09:13 -07:00
Grimes
ac3fe1da02 Fix docs build (#8663) (#8667)
automerge
2020-03-05 10:25:43 -08:00
Michael Vines
57813041d2 Remove solana-archiver from release artifacts 2020-03-05 11:02:18 -07:00
Grimes
7e446da82c Choose a cluster before checking balances (#8666) (#8668)
automerge
2020-03-05 10:00:53 -08:00
Grimes
d94f5c94a3 Nonce fees 1.0 (#8664)
automerge
2020-03-05 09:41:45 -08:00
Michael Vines
4d9aee4794 Always and fully normalize stored 0-lamport accts. (#8657) (#8661)
(cherry picked from commit f146c92e88)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-03-05 09:49:26 -07:00
Grimes
f32c152bce genesis: Add support for multiple bootstrap validators (#8656) (#8658)
automerge
2020-03-05 00:53:40 -08:00
Grimes
5caf9110e0 Add --bind-address and --rpc-bind-address validator arguments (#8628) (#8655)
automerge
2020-03-04 22:39:38 -08:00
Grimes
d1c80143ea Add NextSlotsIterator (#8652) (#8653)
automerge
2020-03-04 21:59:04 -08:00
Grimes
bb132df121 Add orphan iterator (#8636) (#8651)
automerge
2020-03-04 20:02:46 -08:00
Grimes
b3af1c7e57 Connect partition flag to validators (#8622) (#8646)
automerge
2020-03-04 18:16:54 -08:00
Grimes
14cba53338 Install Solana before using it (#8638) (#8644)
automerge
2020-03-04 16:08:25 -08:00
Grimes
dc8abbe9e3 solana catchup now detects when you try to catchup to yourself (#8635) (#8641)
automerge
2020-03-04 16:00:20 -08:00
carllin
dd06001ed8 compute_bank_stats needs to return newly computed ForkStats (#8608) (#8634)
* Fix broken confirmation, add test

(cherry picked from commit f23dc11a86)

Co-authored-by: carllin <wumu727@gmail.com>
2020-03-04 14:28:17 -08:00
Grimes
298b7de2e2 catchup now supports an optional RPC URL argument for validators with private RPC (#8629) (#8633)
automerge
2020-03-04 12:48:18 -08:00
Grimes
74cbc6953f Expose executable and rent_epoch in AccountInfo (#8619) (#8631)
automerge
2020-03-04 12:09:14 -08:00
mergify[bot]
27e5203078 Fix sendTransaction doc (#8625) (#8626)
automerge
2020-03-04 08:53:30 -08:00
mergify[bot]
73787e162c Keep GenesisConfig binary compatible with v0.23 (#8617) (#8620)
automerge
2020-03-04 02:02:28 -08:00
mergify[bot]
74ae40be41 Check transaction signatures in entry verify (#8596) (#8614)
automerge
2020-03-03 22:10:35 -08:00
mergify[bot]
8dd58e9cea Remove accounts hack and correctly restore accounts store counts (#8569) (#8613)
automerge
2020-03-03 22:05:50 -08:00
mergify[bot]
7d86179c60 Split signature throughput tracking out of FeeCalculator (#8447) (#8610)
automerge
2020-03-03 20:36:52 -08:00
mergify[bot]
8115cf1360 Docs: Update CLI offline cmds (#8548) (#8558)
automerge
2020-03-03 20:26:28 -08:00
Michael Vines
3e5d45053d Cargo.lock 2020-03-03 21:14:00 -07:00
mergify[bot]
061319f35a Add commitment flag to vote-account and validators commands (#8597) (#8606)
automerge
2020-03-03 17:47:14 -08:00
mergify[bot]
dc75837500 Use fs::rename which is much faster than move_items (#8579) (#8595)
automerge
2020-03-03 11:23:11 -08:00
mergify[bot]
dfe26f5275 Add Ledger wallet installation instructions (#8581) (#8592)
automerge
2020-03-03 08:29:12 -08:00
mergify[bot]
f4385f7ad2 Do periodic inbound cleaning for rooted slots (#8436) (#8583)
automerge
2020-03-02 23:04:57 -08:00
Michael Vines
8df4cf2895 Don't advertise the snapshot that the node was loaded from
snapshot_packager_service will remove this snapshot hash from gossip
when it starts
2020-03-02 19:16:06 -07:00
mergify[bot]
dad62e132e Remove granularity from genesis (bp #8514) (#8518)
automerge
2020-03-02 15:42:46 -08:00
Michael Vines
0d4131ae68 Bump version to 1.0.2 2020-03-02 15:38:26 -07:00
mergify[bot]
a2539e1892 Allow stake lockup fields to be updated independently (#8568) (#8574)
automerge
2020-03-02 14:19:18 -08:00
Michael Vines
210659e6c3 Only gossip packaged snapshots
(cherry picked from commit 42c5c59800)
2020-03-02 14:21:04 -07:00
Michael Vines
15a0fb1fa9 --wait-for-supermajority now requires a SLOT
(cherry picked from commit 13551885c2)
2020-03-02 13:40:52 -07:00
Michael Vines
4db31f5b48 Add ---no-untrusted-rpc flag
(cherry picked from commit d677e83ed4)
2020-03-02 11:53:15 -07:00
mergify[bot]
b38a535c63 Hack to skip cleanup_dead_slots upon snapshot load (#8562)
automerge
2020-03-02 10:40:41 -08:00
Michael Vines
218b02aaf8 Demote gossip responder error log messages to info! 2020-03-01 10:42:32 -07:00
mergify[bot]
d6e7cbd4e8 feat: implement websocket_url as a get/set-able global parameter w/ value computation (#8553)
automerge
2020-03-01 01:09:09 -08:00
mergify[bot]
f2fda14333 Reduce max snapshot hashes to stay under MTU (bp #8541) (#8544)
automerge
2020-02-29 09:17:09 -08:00
Michael Vines
1c576d4a68 Upgrade to Rust 1.41.1
(cherry picked from commit 7d27be2a73)
2020-02-29 09:27:11 -07:00
mergify[bot]
f6232e1b3c Fix skipping own leader slots (#8533) (#8540)
automerge
2020-02-29 01:27:46 -08:00
mergify[bot]
ad71fa3f12 rpc: GET for /snapshot.tar.bz2 now redirects to the latest snapshot (bp #8536) (#8538)
automerge
2020-02-28 23:45:15 -08:00
mergify[bot]
9c326c7c71 Ensure the validator's identity pubkey is not provided as a --trusted-validator (#8525) (#8527)
automerge
2020-02-27 22:07:07 -08:00
mergify[bot]
ac545cadaf Add versioning (#8348) (#8524)
automerge
2020-02-27 20:12:49 -08:00
mergify[bot]
082d8fff36 Use legit solana message in verify (#8513) (#8523)
automerge
2020-02-27 19:36:37 -08:00
mergify[bot]
2c3632a042 Determine vote_state ahead of time (#8303) (#8521)
automerge
2020-02-27 18:32:27 -08:00
mergify[bot]
7b23e79922 Add snapshot hash of full accounts state (#8295) (#8515)
* Add snapshot hash of full accounts state

* Use normal hashing for the accounts delta state

* Add merkle

(cherry picked from commit 947a339714)

Co-authored-by: sakridge <sakridge@gmail.com>
2020-02-27 17:36:28 -08:00
mergify[bot]
9afd14a0c6 Import Tour de SOL docs (#8516) (#8519)
automerge
2020-02-27 17:15:36 -08:00
Michael Vines
f42aa34ab6 Reorder InstructionError to remain compatible with v0.23
(cherry picked from commit 7dac8e2dde)
2020-02-27 18:07:00 -07:00
mergify[bot]
43af91ff4b Ledger messaging cleanup (#8506) (#8508)
automerge
2020-02-27 12:38:09 -08:00
mergify[bot]
a920a0f946 Fix cluster economics figures and spelling in docs (#8502) (#8505)
automerge
2020-02-27 02:49:10 -08:00
mergify[bot]
4a8a6d0b3f Remove loop (#8496)
automerge
2020-02-27 00:38:27 -08:00
mergify[bot]
a64b8a2705 Rename snapshot.tar.bz2 to snapshot-<slot>-<hash>.tar.bz2 (bp #8482) (#8501)
automerge
2020-02-26 23:31:44 -08:00
Michael Vines
0198f9e8af Peg snapshot version to 1.0.0 2020-02-26 22:07:50 -07:00
Michael Vines
1582a3a927 Cargo.lock 2020-02-26 21:17:40 -07:00
mergify[bot]
e713f0e5fb Update voting simulation (#8489) 2020-02-26 20:00:20 -08:00
mergify[bot]
77031000c4 Choose more appropriate options for pubsub websocket server (#8354) (#8492)
automerge
2020-02-26 18:23:50 -08:00
Michael Vines
635a962fba Reference the v1.0.0 installer 2020-02-26 19:20:58 -07:00
mergify[bot]
c59ec2dcff Add flag to confirm key on device (#8478) (#8490)
automerge
2020-02-26 17:31:52 -08:00
mergify[bot]
abc6c5e264 Limit leader schedule search space (#8468) (#8486)
automerge
2020-02-26 16:11:14 -08:00
mergify[bot]
87cfac12dd Validate the genesis config downloaded over RPC before accepting it (bp #8474) (#8481)
automerge
2020-02-26 15:12:06 -08:00
Tyera Eulberg
60b43e34b6 Ledger hardware wallet docs (#8472) (#8479)
automerge
2020-02-26 14:42:08 -08:00
mergify[bot]
9ab6222f03 Move docs from book/ to docs/ (#8469) (#8471)
automerge
2020-02-26 08:01:44 -08:00
mergify[bot]
2298dd5c07 Use runtime executor to send pubsub notifications (#8353) (#8465)
automerge
2020-02-25 21:45:18 -08:00
mergify[bot]
822d166115 live-slots now displays the rate the root slot is advancing (#8464)
automerge
2020-02-25 21:18:10 -08:00
mergify[bot]
8f71580615 Allow withdrawer to change the authorized stake key (#8456) (#8462)
automerge
2020-02-25 19:30:59 -08:00
mergify[bot]
cc3352ff06 Ledger key path rework (#8453) (#8457)
automerge
2020-02-25 18:00:53 -08:00
mergify[bot]
8f5928b7c7 Promote dangerous cond. from just warning to panic (#8439) (#8449)
automerge
2020-02-25 15:31:06 -08:00
Michael Vines
888e9617ff 🐌🐌 Publish crates for even longer longer 2020-02-25 09:23:20 -07:00
mergify[bot]
4695c4cf7d Add --no-check-vote-account argument (#8430) (#8435)
automerge
2020-02-25 00:23:50 -08:00
mergify[bot]
bbfc56ff7f Make solana root key accessible on Ledger (#8421) (#8431)
automerge
2020-02-24 22:28:28 -08:00
Michael Vines
4103d99018 Bump version to 1.0.1 2020-02-24 23:24:27 -07:00
mergify[bot]
c375ce1fcd CLI: collect and deduplicate signers (#8398) (#8423)
automerge
2020-02-24 17:29:34 -08:00
Jack May
df813b31c5 Fix SDK deps 2020-02-24 17:30:46 -07:00
Michael Vines
7db92e2951 Drop print- prefix from slot/accounts command
(cherry picked from commit 89baa94002)
2020-02-24 17:28:36 -07:00
Michael Vines
6585518f78 Add genesis subcommand
(cherry picked from commit 1ef3478709)
2020-02-24 17:28:36 -07:00
Michael Vines
6398e256e4 Move shred_version module to sdk/
(cherry picked from commit 73063544bd)
2020-02-24 17:28:36 -07:00
mergify[bot]
b64ebb45e7 validator: snapshot fetching cleanup (bp #8413) (#8417)
automerge
2020-02-24 15:22:34 -08:00
mergify[bot]
307ac66d9c Reinstate create-stale-account w/ seed test (#8401) (#8402)
automerge
2020-02-22 10:56:39 -08:00
Greg Fitzgerald
dc02f2ea8b Add support for large transactions with Ledger Wallet (#8394) 2020-02-21 23:24:56 -07:00
sakridge
b7386f9d84 Add --trusted-validator support for snapshot hash validation (#8390) 2020-02-21 18:42:24 -08:00
Michael Vines
223f9707ca \ 2020-02-21 18:09:36 -07:00
Michael Vines
ea5b00364f Add --enable-warmup-epochs flag 2020-02-21 16:59:43 -07:00
Michael Vines
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
Tyera Eulberg
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
Pankaj Garg
aa80f69171 Promote some datapoints to info to fix dashboard (#8381)
automerge
2020-02-21 13:41:49 -08:00
Jack May
0ace22d03f Optimize account verification (#8385) 2020-02-21 13:28:35 -08:00
Jack May
0e6aca5a7e Reorganize message processor in prep for cross-program-invocation (#8338) 2020-02-21 11:30:00 -08:00
Greg Fitzgerald
3f04226864 Update unlocks (#8363) 2020-02-21 11:23:03 -07:00
dependabot-preview[bot]
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
Michael Vines
ed1149c8e0 Update supported backport labels 2020-02-21 00:47:44 -07:00
Michael Vines
48f58a88bc Bump version to 1.0.0 2020-02-20 23:52:19 -07:00
Ryo Onodera
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
Tyera Eulberg
0b7e8d0162 Add handling for fallible signers (#8367)
automerge
2020-02-20 19:04:53 -08:00
Michael Vines
18fd52367e If the node was loaded from a snapshot, advertise it in gossip (#8364)
automerge
2020-02-20 18:53:26 -08:00
Michael Vines
2d665da3e1 Flip Stable and Preview enum values 2020-02-20 18:27:33 -07:00
Ryo Onodera
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
Michael Vines
f4622d67e9 Submit all metrics in one HTTP POST rather than a HTTP POST per level 2020-02-20 18:12:30 -07:00
dependabot-preview[bot]
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
Michael Vines
cc7c6c960e Search for the validator with the highest snapshot 2020-02-20 17:04:48 -07:00
Justin Starry
01697a9f5c Remove unnecessary arc and mutex for rpc notifications (#8351) 2020-02-21 08:03:46 +08:00
Tyera Eulberg
ab361a8073 Rename KeypairUtil to Signer (#8360)
automerge
2020-02-20 13:28:55 -08:00
Trent Nelson
ec5c02cb7f Book: Add instructions for verifying a paper wallet keypair (#8357) 2020-02-20 14:19:35 -07:00
Greg Fitzgerald
e8124324ff Support transaction signing by heterogenous lists of keypairs (#8342)
automerge
2020-02-20 12:13:23 -08:00
sakridge
1720fe6a46 Snapshot hash gossip changes (#8358) 2020-02-20 11:46:13 -08:00
Pankaj Garg
e50bc0d34b Do not compress small incomplete slot list (#8355)
automerge
2020-02-20 09:48:39 -08:00
Michael Vines
45774dc4aa Fix comment 2020-02-20 10:32:36 -07:00
Pankaj Garg
ea8d9d1aea Bitwise compress incomplete epoch slots (#8341) 2020-02-19 20:24:09 -08:00
Sagar Dhawan
221866f74e Process Gossip in parallel and add an upper limit (#8328) 2020-02-19 21:31:55 -06:00
Michael Vines
3e96d59359 Use correct static IP address 2020-02-19 18:15:18 -07:00
Michael Vines
8c19b6268c Add Preview operating mode, rename SoftLaunch operating mode to Stable (#8331)
automerge
2020-02-19 16:48:58 -08:00
Michael Vines
8ae26867c5 More testnet->devnet 2020-02-19 16:15:38 -07:00
Michael Vines
19baaea0da Remove validators from genesis (#8330)
automerge
2020-02-19 14:40:07 -08:00
Michael Vines
e3cebcf82d rename testnet.solana.com to devnet.solana.com 2020-02-19 15:33:14 -07:00
anatoly yakovenko
ccad5d5aaf change warnings to infos (#8322) 2020-02-19 14:25:49 -08:00
carllin
d0bcde001e New Repair Design (#8256)
* New Repair Design
2020-02-19 01:02:09 -08:00
Michael Vines
83a8e82626 Remove dead code 2020-02-18 21:08:43 -07:00
Michael Vines
7305a1f407 Reformatting 2020-02-18 21:08:43 -07:00
Michael Vines
3975c7f8c9 Add --fee-burn-percentage 2020-02-18 17:43:08 -07:00
Pankaj Garg
ac1d075d73 Drop packet if destination is unspecified (0.0.0.0/0) (#8321) 2020-02-18 16:14:20 -08:00
carllin
73a278dc64 Factor out creating genesis with vote accounts into a utility function (#8315)
automerge
2020-02-18 02:39:47 -08:00
Michael Vines
a042ee609a Update README.md 2020-02-17 22:19:55 -07:00
Pankaj Garg
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
Ryo Onodera
027ec71aa9 Remove AccountInfo's (De)Serialize (#8313)
automerge
2020-02-17 03:07:36 -08:00
Ryo Onodera
ef718c651e Remove needless uses (#8312)
automerge
2020-02-17 02:43:14 -08:00
Tyera Eulberg
fc2a0d53d9 CLI: Add optional airdrop recipient (#8291)
* CLI: Add optional airdrop recipient

* Update book usage page
2020-02-16 11:41:00 -07:00
dependabot-preview[bot]
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
Tyera Eulberg
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
Michael Vines
9bcca268a3 Add simple gossip DoS test 2020-02-14 22:40:35 -07:00
Michael Vines
8a2d4e2f72 Add storage rewards pools in development mode only 2020-02-14 21:12:38 -07:00
Michael Vines
335675c51c install: support vX.Y.Z in addition to X.Y.Z (#8297)
automerge
2020-02-14 19:35:40 -08:00
Michael Vines
1bf2285fa2 ledger-tool: Add print-accounts command 2020-02-14 19:59:48 -07:00
Jack May
71f77a8e0a Remove Exchange program's use of GenericError (#8290)
automerge
2020-02-14 14:52:13 -08:00
Jack May
644a7f9a44 Remove Move Loader's use of GenericError (#8289)
automerge
2020-02-14 14:49:21 -08:00
Jack May
965361ff69 Remove failure's use of GenericError (#8287)
automerge
2020-02-14 14:07:53 -08:00
Jack May
4593d333c7 Remove BPF Loader's use of GenericError (#8284) 2020-02-14 13:59:03 -08:00
Jack May
940519ea5a Remove Native Loader's use of GenericError (#8285) 2020-02-14 13:58:48 -08:00
Jack May
a0bcbf70d5 Cleanup new_result_with_negative_lamports (#8286) 2020-02-14 13:58:33 -08:00
anatoly yakovenko
17fb8258e5 Datapoints overwhelm the metrics queue and blow up ram usage. (#8272)
automerge
2020-02-14 11:11:55 -08:00
Tyera Eulberg
c350543b46 Make generate_remote_keypair more generic for potential other remote-wallets (#8274) 2020-02-14 09:38:35 -07:00
Trent Nelson
5b4ecb01ca Presigner KeypairUtil implementer (#8269)
automerge
2020-02-13 16:53:09 -08:00
Dan Albert
28b115497f Update setup-dc-node-1.sh 2020-02-13 14:30:41 -07:00
dependabot-preview[bot]
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
Tyera Eulberg
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
Michael Vines
ab475e4849 get_confirmed_block: expect() less 2020-02-13 10:56:34 -07:00
Justin Starry
1c97b31eaf Retain signature subscriptions that haven't been notified (#8261) 2020-02-14 01:00:50 +08:00
Ryo Onodera
bd257050e3 Retry to curl to codecov.io unfortunately (#8263)
automerge
2020-02-13 06:23:10 -08:00
Michael Vines
2d362ed337 Remove references to old unused testnets (#8258)
automerge
2020-02-12 22:23:35 -08:00
Trent Nelson
cb7117beac CLI: Offline-ify remaining stake ops (#8257)
automerge
2020-02-12 22:00:28 -08:00
Michael Vines
b358ff66e1 Plumb --enable-rpc-get-confirmed-block flag 2020-02-12 17:08:27 -07:00
Tyera Eulberg
6309c97697 Add CliCommand::StakeSetLockup (#8248)
automerge
2020-02-12 15:36:29 -08:00
Ryo Onodera
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
Greg Fitzgerald
741d148a0d Simplify remote wallet (#8249)
automerge
2020-02-12 14:38:51 -08:00
Greg Fitzgerald
127553ce4b Wrap ed25519_dalek::Keypair (#8247) 2020-02-12 14:15:12 -07:00
Michael Vines
ecb055a252 Expel ContactInfo::new() (#8245)
automerge
2020-02-12 12:58:51 -08:00
dependabot-preview[bot]
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
Michael Vines
cf11d4c7dc Nodes with a tvu and storage port are no longer double counted (#8237)
automerge
2020-02-12 11:16:07 -08:00
Michael Vines
d0a4686990 Avoid assigning the serve repair port to the storage port 2020-02-12 12:00:11 -07:00
Michael Vines
2542d5dd42 Bump baseline version to 0.23.4, improve error reporting 2020-02-12 11:59:12 -07:00
Michael Vines
1e0f2b2446 Quash 'repair listener error: Err(RecvTimeoutError(Timeout))' log spam 2020-02-12 10:35:03 -07:00
sakridge
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
Trent Nelson
ed87229cec CLI: Don't hide errors when fees are disabled (#8204)
automerge
2020-02-11 21:48:04 -08:00
Michael Vines
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
Michael Vines
ad43babe3d ABI sanity test for running edge,beta,stable validators together 2020-02-11 21:21:31 -07:00
Michael Vines
36c0cb052b set_read_timeout() can fail, don't expect() it not to 2020-02-11 18:57:14 -07:00
Michael Vines
ed58bcda4c solana-install init edge when "edge" is not currently installed now works 2020-02-11 18:57:14 -07:00
Justin Starry
268bb1b59b Fix RPC pub sub unsubscribe (#8208)
automerge
2020-02-11 17:09:40 -08:00
Jack May
059764586a Rename from account userdata to data (#8224) 2020-02-11 16:30:22 -08:00
Michael Vines
72b11081a4 Report validator rewards in getConfirmedBlock JSON RPC 2020-02-11 17:25:45 -07:00
Tyera Eulberg
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
dependabot-preview[bot]
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
Jack May
2e9ba149f2 Update LVM and rBPF versions (#8215) 2020-02-11 12:52:13 -08:00
carllin
d3712dd26d Factor repair from gossip (#8044) 2020-02-11 13:11:48 -07:00
Michael Vines
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
Michael Vines
4f2c76150f Clippy 2020-02-11 12:56:02 -07:00
Michael Vines
137577fb86 Upgrade to rust 1.41.0 2020-02-11 12:56:02 -07:00
Jack May
bf623219d2 nudge (#8214) 2020-02-11 10:50:57 -08:00
Tyera Eulberg
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
Jack May
517fe73734 Non-conflicting account duplicate marker value (#8206) 2020-02-11 10:03:28 -08:00
Ryo Onodera
890919d140 Reliably track proc macro & build.rs code coverage (#8210) 2020-02-12 01:02:40 +09:00
Michael Vines
33ea1e0edd Channel installs no longer re-download the same release. 2020-02-11 08:22:41 -07:00
Ryo Onodera
7614af2a45 Verify frozen bank from snapshot by hashing (#8184) 2020-02-11 16:46:33 +09:00
Trent Nelson
1528959327 CLI: Add fee-payer parame to stake-split subcommand (#8201)
automerge
2020-02-10 23:23:54 -08:00
Ryo Onodera
46b6cedff4 Fix nightly clippy warnings (#8199)
automerge
2020-02-10 22:48:50 -08:00
Trent Nelson
8d8f28c1d0 CLI: transfer fix checks pubkeys (#8198)
automerge
2020-02-10 22:34:14 -08:00
Jack May
df782b93ae Add is_writable to AccountInfo (#8196) 2020-02-10 21:33:29 -08:00
dependabot-preview[bot]
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
Trent Nelson
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
Pankaj Garg
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
carllin
0b263f8714 Fix larger than necessary allocations in streamer (#8187) 2020-02-10 11:49:07 -08:00
Michael Vines
84b3e12e1f Minor logging improvements 2020-02-10 10:42:42 -07:00
dependabot-preview[bot]
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
Ryo Onodera
485806c488 Just define BnakSlotDelta type alias (#8186)
automerge
2020-02-10 03:11:37 -08:00
Lazaridis
1412ee1ca6 add step "apt-get update", add package "libudev-dev" (#8180)
automerge
2020-02-08 14:45:07 -08:00
Michael Vines
ef5fb6fa46 Check for AVX512 at runtime to avoid invalid opcode trap (#8166)
automerge
2020-02-07 15:01:45 -08:00
Michael Vines
99432833d2 Remove reed-solomon-erasure from core/ 2020-02-07 15:37:57 -07:00
Sagar Dhawan
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
Michael Vines
04ef977509 Remove unwanted println 2020-02-07 12:59:00 -07:00
Trent Nelson
87c6508305 CLI: Implement transfer command (#8108)
* CLI: Add transfer subcommand

* Add tests

* checks
2020-02-07 12:16:35 -07:00
Tyera Eulberg
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
Michael Vines
8b5598fabd Surface shred version more in tools (#8163)
automerge
2020-02-07 08:57:54 -08:00
Trent Nelson
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
dependabot-preview[bot]
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
Trent Nelson
27c8ba6afc De-replicode Tower constructors (#8153)
automerge
2020-02-06 18:24:10 -08:00
Tyera Eulberg
b832a03315 Add libudev-dev to docker image to build remote-wallet (#8149)
automerge
2020-02-06 13:45:05 -08:00
Greg Fitzgerald
09686290bc Grant custodian access to all locked up accounts (#8139) 2020-02-06 14:31:27 -07:00
Michael Vines
4aaa7b30ca Update README.md 2020-02-06 13:19:30 -07:00
carllin
fe590da3b6 Revert "Factor repair from gossip (#8044)" (#8143)
This reverts commit e61257695f.
2020-02-06 11:44:20 -08:00
Sunny Gleason
a7fa92b372 feat: implementation of live-slots command (#8129) 2020-02-06 14:16:30 -05:00
Michael Vines
a25e57c397 Ignore flaky test_exchange_local_cluster (#8146)
automerge
2020-02-06 10:44:17 -08:00
dependabot-preview[bot]
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
dependabot-preview[bot]
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
Rob Walker
0e084358b4 Fix slot_hashes documentation 2020-02-06 10:06:16 -07:00
François Garillot
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
dependabot-preview[bot]
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
dependabot-preview[bot]
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
Jack May
8436457e75 Rename program_utils.rs (#8127) 2020-02-05 12:48:30 -08:00
Michael Vines
3ac0192d40 Better surface bank hash verification failures 2020-02-05 11:39:47 -07:00
Tyera Eulberg
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
Jack May
e21f5c784e Add next_account_info() (#8120) 2020-02-04 17:04:26 -08:00
dependabot-preview[bot]
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
Pankaj Garg
ed5101b031 Generate max coding shreds when necessary (#8099)
* Generate max coding shreds when necessary

* test
2020-02-04 15:45:01 -08:00
dependabot-preview[bot]
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
Jack May
15ab966ed1 Move native program entrypoint out of instruction_processor_utils (#8122) 2020-02-04 14:54:49 -08:00
Jack May
b5a735878a Sysvar account_into return program error rather than option (#8121) 2020-02-04 14:54:41 -08:00
Jack May
b6d09f1901 Add BPF program entrypoint return type (#8111) 2020-02-04 12:25:42 -08:00
sakridge
78f6ddc5b7 Fix spelling of verification in accounts_db (#8117)
automerge
2020-02-04 11:45:47 -08:00
Jack May
4e595e8e3c Facilitate printing program errors from BPF programs (#8109) 2020-02-04 09:03:45 -08:00
Trent Nelson
79249360f7 CLI: Expose sign-only reply parsing helper (#8107)
automerge
2020-02-03 18:22:36 -08:00
Jack May
336d5136bf Print more program error info to user when using CLI (#8098) 2020-02-03 17:14:53 -08:00
carllin
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
Michael Vines
4c0420b884 Delete uptime command, report total credits in solana validators instead 2020-02-03 16:55:33 -07:00
Ryo Onodera
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
dependabot-preview[bot]
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
sakridge
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
Michael Vines
927f272f0e Update book release version 2020-02-03 11:35:51 -07:00
Michael Vines
5e2891ae5d e 2020-02-03 11:34:00 -07:00
Michael Vines
4f85481a2b Add split-stake command 2020-02-03 11:14:08 -07:00
Michael Vines
d314e0395a Disable windows update as windows build artifacts are turned off 2020-02-01 22:25:24 -07:00
Justin Starry
69a6d07371 Reduce rpc client pre-flight requests by setting max-age header (#8082)
automerge
2020-02-01 04:10:26 -08:00
Tyera Eulberg
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
Greg Fitzgerald
408ef8b2cb Cleanup staking doc (#8064) 2020-01-31 19:24:51 -07:00
Dan Albert
a2a2f1c2d2 Add new colo test cases using reduced node count (#8078)
automerge
2020-01-31 18:02:48 -08:00
Trent Nelson
dc2888c9a3 CLI: De-replicode SigningAuthority instatiation (#8076)
automerge
2020-01-31 16:30:37 -08:00
Trent Nelson
9739be9ecf CLI: Fix stake-account auth withdrawer output (#8071)
automerge
2020-01-31 14:25:05 -08:00
carllin
e61257695f Factor repair from gossip (#8044) 2020-01-31 14:23:50 -08:00
Sagar Dhawan
b9988b62e4 Filter repairman peers based on shred_version (#8069) 2020-01-31 14:00:19 -08:00
Michael Vines
d6b3961530 s/mint/faucet 2020-01-31 12:14:53 -07:00
Greg Fitzgerald
6d0be323ad Update key (#8062)
automerge
2020-01-31 11:11:22 -08:00
Michael Vines
09256adbc3 Surface important error details 2020-01-31 12:09:41 -07:00
Michael Vines
8e3a7da596 Rewrite new() in terms of new_with_timeout() 2020-01-31 12:09:41 -07:00
Michael Vines
7d96510d17 Fix stake-account subcommand name 2020-01-31 12:09:41 -07:00
Jack May
0fd795a676 Remove program error footgun and cleaner developer experience (#8042) 2020-01-31 10:58:07 -08:00
Dan Albert
eff876881b Remove asteroids and pacman from QA/dev testnet availability (#8050)
automerge
2020-01-31 10:26:25 -08:00
Justin Starry
9adf0d4ee0 Don't exit early if add. validators not found during gce.sh config 2020-01-31 08:34:10 -07:00
Michael Vines
3bc9789e8d Remove support for 0.22.3 snapshots 2020-01-30 23:34:15 -07:00
carllin
fd207b6907 Fix stale gossip entrypoint (#8053) 2020-01-30 21:51:11 -08:00
Jack May
2226c1b75c Add Rust BPF RefCell borrow helpers (#8047) 2020-01-30 20:40:27 -08:00
Michael Vines
a0964bb2c2 Make tds slots-per-epoch configurable 2020-01-30 21:37:16 -07:00
Michael Vines
b5383b8b54 Dial testnet down to a single node 2020-01-30 21:30:08 -07:00
dependabot-preview[bot]
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
Michael Vines
a03d441e6f Add rpc port sanity checks, fix tests 2020-01-30 20:57:58 -07:00
Michael Vines
3900d09f6f Employ rpc_port defaults 2020-01-30 20:57:58 -07:00
Michael Vines
e218f4e56e Clean up Validator::new() 2020-01-30 20:57:58 -07:00
Michael Vines
81ba18eea6 Add --private-rpc flag 2020-01-30 20:57:58 -07:00
Trent Nelson
1671ece9df Book: Prod the user to verify their new paper wallet (#8048) 2020-01-30 17:20:04 -07:00
Michael Vines
775fa0c968 Minor --expected-shred fix, clean up shred-related gossip log messages (#8041)
automerge
2020-01-30 13:22:05 -08:00
Jack May
dd276138c2 Add support for idiomatic error handling to BPF instruction processors (#7968) 2020-01-30 09:47:22 -08:00
Michael Vines
0c55b37976 Add different shred test to test_tvu_peers_and_stakes 2020-01-30 10:30:32 -07:00
Trent Nelson
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
Justin Starry
400412d76c Ignore slow archiver tests (#8032)
automerge
2020-01-30 08:17:36 -08:00
dependabot-preview[bot]
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
Sagar Dhawan
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
dependabot-preview[bot]
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
dependabot-preview[bot]
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
Jack May
669502ede7 Don't depend on user modifiable data to parse paramter buffer (#8022) 2020-01-29 21:49:42 -08:00
Jack May
b19f730527 Seperate RefCells lamports and data (#8021) 2020-01-29 21:15:04 -08:00
Jack May
d5ff5f4739 Update solana_rbpf v0.1.20 (#8023) 2020-01-29 21:14:49 -08:00
Michael Vines
1c82f84595 Add leader-schedule subcommand 2020-01-29 20:08:42 -07:00
Michael Vines
bea9cd9684 Add --expected-shred-version option 2020-01-29 20:08:42 -07:00
Michael Vines
1bc9a9c23b Wait for supermajority by default, add --no-wait-for-supermajority flag to override 2020-01-29 20:08:42 -07:00
Michael Vines
c4faccc77f getClusterNodes now excludes validators with a different shred version 2020-01-29 20:08:42 -07:00
Rob Walker
e6803daf10 Remove support for stake redelegation (#7995)
* Remove support for stake redelegation

* fixup
2020-01-29 17:59:14 -08:00
Justin Starry
effe6e3ff3 Log solana-validator args on startup to aid debugging 2020-01-29 08:27:52 -07:00
Rob Walker
0d6c233747 Add set_lockup to stake (#7997) 2020-01-28 20:59:53 -08:00
Michael Vines
015e696077 Solana keygen grind improvements (#8008)
automerge
2020-01-28 20:19:19 -08:00
Jack May
7faab2072c Cleanup BPF use syntax (#8001) 2020-01-28 17:03:37 -08:00
Jack May
83718a3b3e Cleanup runtime use syntax (#8002) 2020-01-28 17:03:20 -08:00
Trent Nelson
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
Jack May
12eff5a2f9 Cleanup SDK use syntax (#8004) 2020-01-28 16:11:22 -08:00
carllin
4197cce8c9 Tower tests (#7974)
* Add testing framework for voting
2020-01-28 16:02:28 -08:00
Jack May
fed3817ed3 Update and fix transaction error documentation (#7998) 2020-01-28 15:59:50 -08:00
carllin
4ffd7693d6 Add lock to make sure slot-based locktree calls are safe (#7993) 2020-01-28 13:45:41 -08:00
Jack May
1596c961d9 Rust BPF program cleanup (#7990) 2020-01-27 18:27:44 -08:00
Michael Vines
fd7d5cbe0d Fix compute_shred_version() (#7989)
automerge
2020-01-27 17:05:31 -08:00
sakridge
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
Michael Vines
912aafcefd Reduce epoch duration from 2 weeks to 2 days 2020-01-27 10:34:55 -07:00
Dan Albert
2f34f433b3 Specify where VM images are coming from across GCE projects (#7985)
automerge
2020-01-27 08:17:21 -08:00
Michael Vines
1ff4dd9a9a Remove show- prefix 2020-01-26 21:00:57 -07:00
Michael Vines
fdcaad96c7 Remove stray key 2020-01-26 14:35:33 -07:00
Trent Nelson
14a72b0fc0 CLI: --sign-only and --signer require --blockhash (#7982) 2020-01-26 10:06:21 -07:00
Trent Nelson
c13ab9f14e CLI: Consolidate offline arg declarations (#7979)
automerge
2020-01-26 00:27:24 -08:00
Michael Vines
cff1bc6e71 s/dervied/derived/ 2020-01-25 23:22:28 -07:00
Trent Nelson
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
Dan Albert
c324e71768 Bump cargo toml versions to 0.24.0 (#7976) 2020-01-25 11:04:27 -06:00
Trent Nelson
e2570c98ee CLI: Add authority to show-nonce-account output (#7969) 2020-01-25 07:21:23 -07:00
Michael Vines
b5125479ec Bump perf libs to v0.18.0 for CUDA 10.2 support 2020-01-24 21:39:49 -07:00
Michael Vines
989355e885 Add ability to hard fork at any slot (#7801)
automerge
2020-01-24 17:27:04 -08:00
Michael Vines
a2f2c46f87 Ensure shred version is never 0 2020-01-24 17:41:20 -07:00
Dan Albert
605623baf5 Report last tower distance and add partition testcase (#7929)
automerge
2020-01-24 16:37:19 -08:00
Michael Vines
fdc452c536 Move testnet.solana.com and TdS to their own GCP projects 2020-01-24 16:26:54 -07:00
Jack May
1b391dd36b Add account accessor functions (#7966) 2020-01-24 14:34:59 -08:00
Jack May
917067741a Cleanup BPF SDK (#7965) 2020-01-24 13:41:14 -08:00
Jack May
34ed93d57c Optimize account copies and use RefCell to handle duplicate accounts in BPF programs (#7958) 2020-01-24 10:54:26 -08:00
Rob Walker
d400a64b9a Update tiny_bip39 (#7959)
automerge
2020-01-24 08:59:07 -08:00
Ryo Onodera
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
Michael Vines
c0f0fa24f8 Increase --wait-for-supermajority to wait for 75% online stake 2020-01-23 22:41:46 -07:00
Michael Vines
bda5f949bb Add create-snapshot command 2020-01-23 22:21:27 -07:00
Ryo Onodera
992e985972 Add column for slot range of epoch to epoch-info (#7954)
automerge
2020-01-23 20:44:37 -08:00
Greg Fitzgerald
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
Justin Starry
3c17db41dc Add note to book about drone throughput limitations (#7953)
automerge
2020-01-23 18:50:25 -08:00
Michael Vines
d62ed4f6b3 Add BlockstoreProcessorResult 2020-01-23 16:52:47 -07:00
Dan Albert
79f3194d0c Fix cli call to stakes (#7946)
automerge
2020-01-23 14:25:40 -08:00
Michael Vines
b045f9a50d codemod --extensions rs get_snapshot_tar_path get_snapshot_archive_path 2020-01-23 13:37:13 -07:00
Michael Vines
ce231602dc Move snapshot archive generation out of the SnapshotPackagerService 2020-01-23 13:37:13 -07:00
Michael Vines
6f5e0cd161 Type grooming 2020-01-23 13:37:13 -07:00
Michael Vines
1269a79a4d Unify ledger_path arg handling with validator/ 2020-01-23 13:37:13 -07:00
Michael Vines
1b3424ff61 Pass bank_forks by reference 2020-01-23 13:37:13 -07:00
Michael Vines
8b8033c72b Set BankRc slot correctly when restoring a bank snapshot 2020-01-23 13:37:13 -07:00
Michael Vines
7ca0109732 --halt-at-slot 1 now halts at slot 1 2020-01-23 13:37:13 -07:00
Michael Vines
6b5172d002 add_snapshot now returns SlotSnapshotPaths 2020-01-23 13:37:13 -07:00
Michael Vines
9e19a635bb Remove superfluous accounts arg 2020-01-23 13:37:13 -07:00
Dan Albert
15193d0e1f Ensure all GCE nightly tests use dedicated instances (#7944)
automerge
2020-01-23 10:17:12 -08:00
Tyera Eulberg
f1c5c72e62 Fix transaction.md anchor links (#7943)
* Lowercase links

* Fix misspelled anchor link
2020-01-23 10:05:42 -07:00
Michael Vines
25dfed207c Remove dead code (#7940)
automerge
2020-01-23 00:38:46 -08:00
Michael Vines
006cbee88a Uninteresting cleanup 2020-01-22 21:24:20 -07:00
Jack May
c95e5346a4 Boot the mut (#7926) 2020-01-22 17:54:06 -08:00
Ryo Onodera
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
Jack May
8f79327190 Test account doesn't need RefCell (#7932)
automerge
2020-01-22 17:06:11 -08:00
Greg Fitzgerald
a197ac092a New Anatomy of a Transaction (#7930)
automerge
2020-01-22 16:58:46 -08:00
Rob Walker
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
Trent Nelson
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
Michael Vines
934c32cbc6 Add mechanism to load v0.22.3 snapshots on newer Solana versions 2020-01-22 15:40:32 -07:00
Michael Vines
9bd6be779f Reject CI on failed mergify.io backports (#7927)
automerge
2020-01-22 14:10:26 -08:00
Rob Walker
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
Trent Nelson
3a0d13aa77 CLI: Cleanup authority arg usage inconsistencies (#7922)
automerge
2020-01-22 11:19:07 -08:00
Michael Vines
f9323c5273 don't put accounts in a weird location, use the defaults (#7921)
automerge
2020-01-22 10:57:37 -08:00
Dan Albert
7587656cf6 Implement automated partition testing (#7222) 2020-01-22 13:46:50 -05:00
Jack May
023074650f Allow the same account to be passed multiple times to a single instruction (#7795) 2020-01-22 09:11:56 -08:00
Trent Nelson
d854e90c23 CLI: Support offline authorities (#7905) 2020-01-22 10:10:22 -07:00
Greg Fitzgerald
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
Tyera Eulberg
65f5885bce sendTransaction rpc: expect transaction as base58 string (#7913) 2020-01-21 22:16:07 -07:00
Tyera Eulberg
7a132eabb4 Update JSON-RPC documentation (#7915)
* Streamline getBlockCommitment response

* Update json-rpc docs
2020-01-21 20:17:33 -07:00
Rob Walker
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
dependabot-preview[bot]
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
Greg Fitzgerald
6eefa0b72d Integrate transaction chapter into programming model chapter (#7911)
automerge
2020-01-21 16:44:05 -08:00
Greg Fitzgerald
44372db955 Move Blockstreamer doc into getting started doc 2020-01-21 17:15:29 -07:00
Greg Fitzgerald
e24cce4aed Hoist blockstore chapter (#7908)
automerge
2020-01-21 16:01:26 -08:00
Greg Fitzgerald
a8595c0418 Give chapters more precise titles (#7907)
automerge
2020-01-21 15:36:40 -08:00
Michael Vines
340424e03a Use minimumLedgerSlot RPC API in block-production command 2020-01-21 14:05:26 -07:00
Michael Vines
93036bec01 Add minimumLedgerSlot RPC API 2020-01-21 14:05:26 -07:00
Jack May
663e98969d Use a different error to test rpc response (#7900)
automerge
2020-01-21 12:42:23 -08:00
Sagar Dhawan
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
Jack May
1a18f0ca55 Add rust duplicate account test program (#7897)
automerge
2020-01-21 10:59:19 -08:00
Jack May
bb950ec93e Naming nits (#7896)
automerge
2020-01-21 10:38:46 -08:00
Greg Fitzgerald
39ab3557a3 Delete "testnet participation" redirect (#7895)
automerge
2020-01-21 09:35:59 -08:00
Michael Vines
dcdc46b97c Assume 1 or more validators 2020-01-21 10:34:58 -07:00
Michael Vines
da3ed0dfb3 Try running testnet.solana.com with only two validators 2020-01-21 10:34:53 -07:00
Greg Fitzgerald
e391b9fb90 Delete duplicate book content (#7894)
automerge
2020-01-21 09:17:20 -08:00
Michael Vines
e346cdad26 Run ./book/build-cli-usage.sh 2020-01-21 08:58:29 -07:00
Michael Vines
7e4c6ff218 solana set => solana config set 2020-01-21 08:53:44 -07:00
Michael Vines
356f246a74 Remove get-/show- prefix from cli commands 2020-01-21 08:43:07 -07:00
dependabot-preview[bot]
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
Sagar Dhawan
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
Rob Walker
1fe11e9ae2 chacha ignore farf (#7882) 2020-01-20 17:04:31 -08:00
Tyera Eulberg
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
Jack May
52bc4a3598 nudge (#7887) 2020-01-20 15:27:36 -08:00
Dan Albert
cccaacee36 Wait for stake distribution in automation (#7883)
automerge
2020-01-20 13:32:37 -08:00
Michael Vines
ebf6e1c0e9 --limit-ledger-size now accepts an optional slot count value 2020-01-20 14:20:30 -07:00
Sunny Gleason
5cf090c896 feat: implement RPC notification queue (#7863) 2020-01-20 16:08:29 -05:00
Rob Walker
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
Michael Vines
82b75796f9 Create ledger directory if it doesn't already exist 2020-01-20 10:11:43 -07:00
dependabot-preview[bot]
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
dependabot-preview[bot]
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
Ryo Onodera
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
dependabot-preview[bot]
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
Michael Vines
30d40e9a32 If a bad RPC node is selected try another one instead of aborting 2020-01-18 11:00:08 -07:00
Michael Vines
e28508ad56 Abort if a snapshot download fails for any reason other than 404 2020-01-18 08:59:53 -07:00
Michael Vines
182e4cec86 Update backport labels 2020-01-17 21:38:39 -07:00
Michael Vines
a32de96ab1 Add show-stakes subcommand 2020-01-17 14:14:01 -07:00
Trent Nelson
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
Rob Walker
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
Justin Starry
87598c7612 Consolidate tx error counters and update metrics dashboard (#7724)
automerge
2020-01-16 23:26:50 -08:00
Michael Vines
57bf618627 Enable config program at soft launch epoch 0 (#7854)
automerge
2020-01-16 23:05:33 -08:00
Michael Vines
c576a707b0 Increase token cap (#7855)
automerge
2020-01-16 23:02:05 -08:00
Justin Starry
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
Ryo Onodera
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
dependabot-preview[bot]
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
carllin
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
carllin
76e20015a4 Add separate thread to check for and store duplicate slot proofs (#7834) 2020-01-16 15:27:54 -08:00
Rob Walker
f5e797e3aa cleanup test checks cargo audit (#7849)
automerge
2020-01-16 15:08:36 -08:00
Rob Walker
787e36a28f ignore prost is part of move (#7848) 2020-01-16 14:14:44 -08:00
sakridge
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
Ryo Onodera
ed0129f881 Don't depend on unused lazy_static 2020-01-16 08:43:13 -07:00
Ryo Onodera
78836a9e22 Make run.sh not overwrite genesis if existing (#7837) 2020-01-16 14:34:36 +09:00
Rob Walker
4c08184379 no check if no change (#7824) 2020-01-15 15:13:11 -08:00
Tyera Eulberg
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
Trent Nelson
8ffccfbaff CLI: Plumb stake authorities throughout (#7822)
automerge
2020-01-15 13:32:06 -08:00
Rob Walker
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
Greg Fitzgerald
91bae9d510 Don't use word 'securely' (#7820)
automerge
2020-01-15 11:30:11 -08:00
Tyera Eulberg
f0f185509f Remove tuple from programNotification (#7819)
automerge
2020-01-15 10:52:02 -08:00
Dan Albert
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
Michael Vines
4f663a2a86 Add new genesis validators (#7814)
automerge
2020-01-15 09:26:49 -08:00
Michael Vines
1d01777a13 Prefer CUDA_HOME environment variable 2020-01-15 09:03:52 -07:00
Tyera Eulberg
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
Michael Vines
50c1c08235 Set bootstrap leader and net/ validator vote account commission to 100% 2020-01-15 00:25:26 -07:00
Ryo Onodera
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
Justin Starry
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
carllin
721c4378c1 Plumb ability to handle duplicate shreds into shred insertion functions (#7784) 2020-01-14 15:37:53 -08:00
Jack May
5f4e0c7e3e Naming nits (#7798)
automerge
2020-01-14 13:38:17 -08:00
Michael Vines
e6af4511a8 Include shred version in gossip 2020-01-14 14:32:40 -07:00
Michael Vines
965ad778dd Improve KeypairFileNotFound error message (#7792)
automerge
2020-01-14 12:19:08 -08:00
sakridge
3b78be83cf Add hash stats information to check hashes between validators (#7780)
automerge
2020-01-14 11:57:29 -08:00
Trent Nelson
564cd4e09d Book: Drop since-fixed nonce known issue (#7789)
automerge
2020-01-14 10:13:09 -08:00
Ryo Onodera
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
carllin
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
Pankaj Garg
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
Trent Nelson
81ae44f858 Nonce: Rename instructions with VerbNoun scheme (#7775)
automerge
2020-01-13 15:34:43 -08:00
Tyera Eulberg
c948814eae Update getConfirmedBlock examples (#7772) 2020-01-13 15:05:27 -07:00
Greg Fitzgerald
b5dba77056 Rename blocktree to blockstore (#7757)
automerge
2020-01-13 13:13:52 -08:00
Trent Nelson
ef06d165b4 Book: Update durable nonce proposal entry (#7694)
automerge
2020-01-13 13:12:09 -08:00
Jack May
5cb23c814d Install move-loader binaries (#7768) 2020-01-13 12:53:53 -08:00
carllin
8f7ded33e0 coalesce data and coding index (#7765) 2020-01-13 12:03:19 -08:00
Tyera Eulberg
a17d5795fb getConfirmedBlock: add encoding optional parameter (#7756)
automerge
2020-01-12 21:34:30 -08:00
Michael Vines
ad4d41e602 Pick an RPC node at random to avoid getting stuck on a bad RPC node 2020-01-11 12:10:11 -07:00
Trent Nelson
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
carllin
fd3c6eb320 Remove print in test (#7758)
automerge
2020-01-10 15:37:22 -08:00
sakridge
b7b68ecdba Add partition testing documentation (#7739) 2020-01-10 15:32:43 -08:00
Jack May
08ba27627d Direct entrypoint for execution (#7746) 2020-01-10 13:20:15 -08:00
carllin
27d2c0aaf3 Handle errors on replaying ledger properly (#7741) 2020-01-10 12:16:44 -08:00
Jack May
b714a4be63 Fix call to BPF build script (#7754)
automerge
2020-01-10 10:28:55 -08:00
Trent Nelson
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
Greg Fitzgerald
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
dependabot-preview[bot]
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
dependabot-preview[bot]
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
dependabot-preview[bot]
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
Jack May
2d08dddfc8 nit, cleanup uses (#7747)
automerge
2020-01-09 23:58:13 -08:00
Jack May
6da8f49d8b nit, clearer error message (#7748)
automerge
2020-01-09 23:53:47 -08:00
Justin Starry
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
Justin Starry
e90a31781c Update http crate in bpf program to fix security vulnerability (#7735) 2020-01-10 10:21:20 +08:00
sakridge
2e89ec9105 Don't keep generating transactions in non-sustained bench-tps mode (#7577) 2020-01-09 17:48:18 -08:00
Ryo Onodera
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
sakridge
73c93cc345 Print bank hash and hash inputs. (#7733) 2020-01-09 16:33:10 -08:00
dependabot-preview[bot]
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
Ryo Onodera
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
Rob Walker
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
Justin Starry
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
Ryo Onodera
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
dependabot-preview[bot]
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
Michael Vines
70e1a15973 Remove vote account from genesis validators 2020-01-08 22:47:56 -07:00
Jack May
09cff5e4cc Cleanup usage of feature "program" (#7712) 2020-01-08 13:49:35 -08:00
dependabot-preview[bot]
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
Jack May
07855e3125 Allow override of RUST_LOG (#7705) 2020-01-08 09:19:12 -08:00
Jack May
2f5f8e7afd Pass RUST_LOG through on testnet creation (#7707) 2020-01-07 21:46:28 -08:00
Michael Vines
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
dependabot-preview[bot]
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
carllin
85c3d64f29 Fix rooted slot iterator (#7695)
* Enable jumping gaps caused by snapshots in rooted slot iterator
2020-01-07 22:51:28 -05:00
Michael Vines
47dd293904 supermajority is one word 2020-01-07 15:50:59 -07:00
Michael Vines
c4220a4853 clippy 2020-01-07 15:50:59 -07:00
Michael Vines
48ab88a2af Add --wait-for-super-majority to facilitate asynchronous cluster restarts 2020-01-07 15:50:59 -07:00
dependabot-preview[bot]
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
Michael Vines
9720c894f1 Use commas to make a log message more readable 2020-01-06 22:31:01 -07:00
Rob Walker
8dad3af36d Update Lockup comments (#7692) 2020-01-06 19:52:20 -08:00
Ryo Onodera
e5425d4a27 Fix AppendVec test breakage... (#7693) 2020-01-07 09:21:59 +09:00
Ryo Onodera
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
Tyera Eulberg
9ce142606c Update getBlockTime rpc docs (#7688) 2020-01-06 00:00:20 -07:00
Tyera Eulberg
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
dependabot-preview[bot]
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
Tyera Eulberg
580ca36a62 Cli: fund validator-info accounts with rent-exempt lamports 2020-01-04 22:59:12 -07:00
Michael Vines
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
Michael Vines
e8a6c8cd6d Don't panic if peer_addr() fails (#7678)
automerge
2020-01-04 10:00:22 -08:00
Michael Vines
a8fd42c1df Set default vote account commission to 100% 2020-01-04 10:04:31 -07:00
Michael Vines
e782c26908 Prune older epoch stakes 2020-01-04 09:34:27 -07:00
Michael Vines
cd65a1e172 Run local cluster tests serially for easier debug 2020-01-04 09:34:27 -07:00
Michael Vines
6e51c5685e Minor book fixes 2020-01-04 08:53:20 -07:00
Tyera Eulberg
84a37a2c0c Make validator timestamping more coincident, and increase timestamp sample range (#7673)
automerge
2020-01-03 22:38:00 -08:00
Trent Nelson
7e94cc2cc3 Move nonce into system program (#7645)
automerge
2020-01-03 16:34:58 -08:00
Michael Vines
7002ccb866 Log root slots while processing ledger 2020-01-03 13:25:37 -07:00
Michael Vines
4fe0b116ae Measure heap usage while processing the ledger 2020-01-03 13:25:37 -07:00
Michael Vines
a0fb9de515 Move thread_mem_usage module into measure/ 2020-01-03 13:25:37 -07:00
sakridge
5d42dcc9ec Reduce constants for ledger cleanup test (#7629) 2020-01-03 12:05:14 -08:00
sakridge
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
Jack May
75d94240ed account_info utilities (#7666) 2020-01-03 09:14:51 -08:00
Jack May
6c544708e1 Add safety docs (#7665) 2020-01-03 09:14:28 -08:00
Michael Vines
078e7246ac Publish bpf-sdk only in Linux build 2020-01-02 23:20:59 -07:00
Jack May
06cff1fb9f Publish bpf-sdk releases (#7655) 2020-01-02 20:44:15 -08:00
Michael Vines
2e8bbed75b Revert "Remov dead code from TdS testnet manager config (#7414)"
This reverts commit 8920ac02f6.
2020-01-02 21:07:40 -07:00
Greg Fitzgerald
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
Jack May
a956bb08d8 Export bpf loader ser/de (#7661) 2020-01-02 18:18:56 -08:00
Trent Nelson
db52cc6749 CLI: Fix default nonce authority resolution (#7657)
automerge
2020-01-02 17:05:08 -08:00
Trent Nelson
73c6224a95 Book - Document nonceable CLI subcommands (#7656)
automerge
2020-01-02 16:30:26 -08:00
Michael Vines
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
Michael Vines
48a36f59a6 Add get-rpc-url --any option 2020-01-02 17:20:59 -07:00
Michael Vines
965b132664 Permit --gossip-host with --entrypoint 2020-01-02 17:20:59 -07:00
Rob Walker
63f185f9bf Delete unused type (#7653) 2020-01-02 13:15:31 -08:00
Rob Walker
e97b0088f2 Make lockups block stake transfers via rekeying (#7651) 2020-01-01 11:03:29 -08:00
Trent Nelson
374c17a0d9 Book: Sync CLI API doc for show-block-production (#7648)
automerge
2019-12-31 09:26:45 -08:00
Michael Vines
4b3bc587ab Add input validation for --creation-time/--lockup-date args (#7646)
automerge
2019-12-30 21:57:47 -08:00
dependabot-preview[bot]
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
Rob Walker
6b7d9942a7 Add authorized_voter history (#7643)
* Add authorized_voter history

* fixups

* coverage

* bigger vote state
2019-12-30 19:57:53 -08:00
Rob Walker
760a56964f delete fixed_buf (#7644) 2019-12-30 16:45:43 -08:00
Tyera Eulberg
6ca575b5a3 Make sol-to-lamport const name more clear (#7641)
automerge
2019-12-30 11:28:41 -08:00
Trent Nelson
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
Pankaj Garg
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
Rob Walker
faa77aca2e Update terminology.md 2019-12-29 21:35:06 -08:00
Rob Walker
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
Rob Walker
e1ebaa902b Add base pubkey to create_account_with_seed (#7636) 2019-12-29 16:42:24 -08:00
Rob Walker
e0564f628e Use lamports in genesis (#7631)
* Use lamports in genesis

* readability
2019-12-28 12:49:10 -08:00
Justin Starry
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
Michael Vines
89f5f336af Account for rent (#7626)
automerge
2019-12-24 18:01:21 -08:00
Parth
727be309b2 fix entryverification state (#7169)
automerge
2019-12-23 23:26:27 -08:00
dependabot-preview[bot]
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
Michael Vines
fad6c7201e Remove old book location (#7621) 2019-12-23 22:56:42 -07:00
Michael Vines
8f0e1f3349 Update gitbook-cage first 2019-12-23 18:18:30 -07:00
sakridge
6f7d0c6928 Move cleanup to a script so it doesn't kill itself (#7603) 2019-12-23 14:31:57 -08:00
Rob Walker
120c8f244c Add slot_history for slashing (#7589)
* Add slot_history for slashing

* fixup

* fixup
2019-12-23 12:23:45 -08:00
Jack May
352a367570 Specify version for solana-sdk-macro to enable crate.io publishing (#7615) 2019-12-23 12:10:43 -08:00
Michael Vines
9f65d22909 Groom log messages (#7610) 2019-12-23 10:43:07 -07:00
Ryo Onodera
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
dependabot-preview[bot]
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
Greg Fitzgerald
10e6b8f769 Fix key in genesis (#7585) 2019-12-22 22:40:35 -07:00
Michael Vines
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
Dan Albert
7329d4bf3a Extend Stable CI job timeout to 60 minutes (#7604) 2019-12-22 20:14:07 -07:00
Ryo Onodera
c8fe4043b6 Rename slot_hash => bank_hash in AcoountsDB (#7579)
* Rename slot_hash => bank_hash in AcoountsDB
2019-12-23 10:50:31 +09:00
Parth
3d133d61ca fix rent book entry (#7602) 2019-12-23 06:12:29 +05:30
Michael Vines
d51e42c707 MISSED -> SKIPPED 2019-12-22 10:19:35 -07:00
Michael Vines
79e39d6f0b Remove stray SOLANA_CUDA=1 2019-12-22 10:09:04 -07:00
sakridge
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
sakridge
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
Michael Vines
d88d8e2dbb Fix another silly bug 2019-12-21 09:20:12 -07:00
Michael Vines
3a40dff999 Cargo.lock 2019-12-20 21:55:35 -07:00
Michael Vines
3f69d58498 ledger-tool: Add --all option to bounds, to display all non-empty slots (#7592) 2019-12-20 20:43:53 -07:00
Dan Albert
ca10cf081f Update cargo.toml files from 0.22.0 to 0.23.0 (#7596) 2019-12-20 21:45:42 -05:00
Greg Fitzgerald
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
Greg Fitzgerald
636f51c93c Update testnet descriptions (#7586)
automerge
2019-12-20 12:43:17 -08:00
Trent Nelson
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
Michael Vines
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
Rob Walker
a7040896f0 Update to rust 1.40.0 (#7572)
* Update to rust 1.40.0

* fixups
2019-12-19 23:27:54 -08:00
Rob Walker
2ebfab8e07 Remove duplicate def of MAX_SLOT_HASHES (#7574) 2019-12-19 21:24:12 -08:00
Justin Starry
9bd5888f5e Fix broken internal-nodes-stake-lamports arg in scripts (#7581) 2019-12-19 21:38:03 -05:00
Trent Nelson
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
Trent Nelson
0383ffa5ab CLI: Fix offline signing Pay TX (#7566) 2019-12-19 20:58:38 -05:00
Ryo Onodera
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
Trent Nelson
37eaa6e4f9 CLI: Expose Durable Nonce Authorize instruction (#7541)
* CLI: Expose Durable Nonce `Authorize` instruction

* fmt
2019-12-19 19:13:01 -05:00
Sagar Dhawan
0ae7e86fcb Dashboard: Move y-axis items with different units either side of the graph (#7573)
automerge
2019-12-19 15:22:43 -08:00
Rob Walker
3f405d8908 Add unix_timestap to stake lockups (#7569) 2019-12-19 14:37:47 -08:00
Rob Walker
0245847ea8 Update runtime.md (#7568) 2019-12-19 13:11:43 -08:00
Justin Starry
54f16ca2bf clippy 2019-12-19 11:33:44 -07:00
Justin Starry
a096ade345 reduce error logging 2019-12-19 11:33:44 -07:00
Justin Starry
848fe51f3d @sakridge feedback 2019-12-19 11:33:44 -07:00
Justin Starry
e82db6fc2f Revert blockhash sleep 2019-12-19 11:33:44 -07:00
Justin Starry
4b3176a9a1 Tune bench-tps blockhash poller and stop panicking 2019-12-19 11:33:44 -07:00
Michael Vines
5e6c58716e Speed up show-block-production command 2019-12-19 10:50:27 -07:00
carllin
e98132fd76 Move window insertion to separate thread (#7397)
* Move window insertion to separate thread
2019-12-19 00:15:49 -08:00
Michael Vines
ff171baa67 Add show-block-production command 2019-12-19 00:02:11 -07:00
Michael Vines
05664d150b Add get_confirmed_block()/get_confirmed_blocks() 2019-12-18 23:34:01 -07:00
Michael Vines
fcda972cec Add support for multiple params 2019-12-18 23:34:01 -07:00
Justin Starry
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
Tyera Eulberg
c5b076ec7e Add getConfirmedBlocks rpc method (#7550)
automerge
2019-12-18 15:51:47 -08:00
Sunny Gleason
05cf5a38af Add ledger benchmark test (#7484) 2019-12-18 18:31:04 -05:00
Michael Vines
bd22b641b3 Speed up getLeaderSchedule RPC call by reducing pubkey duplication 2019-12-18 15:59:55 -07:00
Sagar Dhawan
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
Sunny Gleason
7392505bd8 Modify ledger-tool to selectively load Blocktree, GenesisHash, Database so commands are more resilient (#7547) 2019-12-18 13:00:15 -05:00
Tyera Eulberg
6aaf742dfe Extend getConfirmedBlock rpc to return account pre- and post-balances (#7543)
automerge
2019-12-18 09:56:29 -08:00
Tyera Eulberg
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
Sunny Gleason
323673c3c0 Add compact_cf calls to reclaim storage during ledger slot purge (#7264) 2019-12-18 10:29:46 -05:00
Dan Albert
e16ccf8cf8 Remove extraneous header text in test result posts 2019-12-18 10:13:36 -05:00
Michael Vines
434cde179f GetLeaderSchedule can now return a schedule for arbitrary epochs 2019-12-17 23:41:42 -07:00
Ryo Onodera
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
Dan Albert
6a8f6fb3cc Update testnet testcases to point at new buildkite agent queues (#7544)
automerge
2019-12-17 20:32:31 -08:00
Rob Walker
807e930786 Update publish-book.sh 2019-12-17 18:41:46 -08:00
Trent Nelson
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
Rob Walker
585fca06a1 Update publish-book.sh 2019-12-17 15:36:11 -08:00
Rob Walker
282667c4b5 Update genesis addrgen to system_instruction create_address_with_seed (#7539) 2019-12-17 15:14:59 -08:00
Dan Albert
8176470b7f Add pubkey from new buildkite agent instance 2019-12-17 18:00:15 -05:00
Rob Walker
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
Greg Fitzgerald
12bdef51f5 Mark PRs stale after 7 days instead of 30 (#7528) 2019-12-17 14:37:35 -07:00
Sunny Gleason
84b07c81fd Fix/remove short circuit logic in ledger_purge_batch (&& -> &), found/fixed by @sdhawan (#7526) 2019-12-17 15:08:40 -05:00
Dan Albert
107360a001 Refactor system-test dir structure and add stability test (#7530) 2019-12-17 14:58:10 -05:00
Trent Nelson
3f541df669 Sync nonce test to 3513f4e (#7527) 2019-12-17 12:26:13 -05:00
Michael Vines
da17783242 Update README 2019-12-17 08:57:56 -07:00
Trent Nelson
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
Jack May
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
anatoly yakovenko
97589f77f8 Pipeline broadcast socket transmit and blocktree record (#7481)
automerge
2019-12-16 17:11:18 -08:00
carllin
504adcc8c8 Remove PoH priority tuning (#7494)
* Remove priority tuning

* Allow dead code
2019-12-16 16:36:37 -08:00
Tyera Eulberg
f03ed9f5bf Add helper fn and runtime test (#7516) 2019-12-16 17:02:40 -07:00
Rob Walker
b22dc38ba1 Add support for split of 100% of stake (#7510) 2019-12-16 15:56:34 -08:00
Rob Walker
7a7992ab0b update bpf Cargo_lock (#7512) 2019-12-16 13:47:45 -08:00
Tyera Eulberg
3513f4ee84 Rename drone to faucet (#7508) 2019-12-16 14:05:17 -07:00
Michael Vines
f33703aefc Add Telegram notification support 2019-12-16 13:32:46 -07:00
Greg Fitzgerald
389089859d Add guidance for getting PRs merged (#7433)
* Add more PR guidelines
2019-12-16 12:54:09 -07:00
Michael Vines
844dddfee0 Add validator-identity argument to support monitoring a specific validator only 2019-12-16 11:48:48 -07:00
Justin Starry
862e7a410d Fix cli program deploys by avoiding zero account balance (#7497) 2019-12-16 11:53:00 -05:00
dependabot-preview[bot]
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
dependabot-preview[bot]
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
dependabot-preview[bot]
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
Tyera Eulberg
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
Michael Vines
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
Rob Walker
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
Michael Vines
2b5e919a47 Ship solana-watchtower program 2019-12-13 23:04:03 -07:00
anatoly yakovenko
27c8df6140 benches (#7480)
automerge
2019-12-13 20:27:11 -08:00
Dan Albert
9ac112104c Searhc across command line for pattern to kill (#7475) 2019-12-13 21:08:41 -05:00
sakridge
98b80288ed Optimize bank_forks critical section (#7477) 2019-12-13 17:20:31 -08:00
sakridge
ecdea54203 Bump perf-libs version to v0.16.2 to get cudaMalloc opt (#7478) 2019-12-13 17:20:06 -08:00
sakridge
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
Pankaj Garg
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
Rob Walker
f5137028fa Update stake_instruction.rs 2019-12-13 12:53:25 -08:00
Michael Vines
48f9b2fdcc watchtower: Add Slack/Discord sanity failure notification (#7467)
automerge
2019-12-12 23:49:16 -08:00
carllin
b7d6ff6770 Fix Blocktree Config (#7399) 2019-12-12 23:27:24 -08:00
Michael Vines
f7a87d5e52 Add vote-update-validator subcommand 2019-12-12 23:26:39 -07:00
Pankaj Garg
75d1aa5135 Perform erasure recovery when repaired data shreds are received (#7463)
automerge
2019-12-12 17:50:28 -08:00
Rob Walker
49396a69bf remove dbg (#7459)
automerge
2019-12-12 17:24:30 -08:00
Pankaj Garg
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
Jack May
cc5408482e Publish solana-docker releases (#7460) 2019-12-12 16:15:31 -08:00
Sunny Gleason
115bf2613d feat: add analyze-storage command to ledger-tool (#7165) 2019-12-12 18:54:50 -05:00
Jack May
1d172b07a8 crc 1.9.0 was yanked, fall back to 1.8 (#7453) 2019-12-12 14:30:51 -08:00
Rob Walker
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
Michael Vines
1b2a9270e8 Clarify show-vote-account/uptime output: "node id" really means "validator identity" 2019-12-12 14:58:17 -07:00
anatoly yakovenko
e082418e4a Cleanup the sign shreds interface (#7456)
automerge
2019-12-12 13:27:33 -08:00
Sunny Gleason
83218c479a code cleanup, storage_size() was Option<u64>, now Result<u64> (#7424) 2019-12-12 14:55:30 -05:00
Jack May
dbb8267b09 Pin dalek version (#7448)
* Pin Dalek version

* core too
2019-12-12 11:34:43 -08:00
Rob Walker
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
Michael Vines
2db28cae41 Add solana-watchtower program 2019-12-12 12:03:13 -07:00
sakridge
dd54fff978 Use pinned memory for entry verify (#7440) 2019-12-12 10:36:27 -08:00
Greg Fitzgerald
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
Greg Fitzgerald
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
Justin Starry
dad5c62df5 Add uptime column to show-validators (#7441)
automerge
2019-12-11 22:04:54 -08:00
Ryo Onodera
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
Tyera Eulberg
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
dependabot-preview[bot]
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
Trent Nelson
42f2b14a74 Colo: Fix lockfile syntax (#7432)
Logical AND for [ is -a, [[ is &&.
2019-12-11 15:32:38 -05:00
anatoly yakovenko
bec5835289 Automatically call .recycle in Drop (#7429)
automerge
2019-12-11 11:58:40 -08:00
sakridge
0aa4dc904e Accounts index updates, remove pubkey when dead account (#7408) 2019-12-11 11:11:31 -08:00
sakridge
f526c424c5 Move slow shred multi_fec test to integration tests folder (#7426) 2019-12-11 11:10:21 -08:00
Sunny Gleason
601d7a52e9 add documentation for storage_size() method (#7416) 2019-12-11 09:47:12 -05:00
Jack May
7f6fc74c36 Remove workaround of old Rust-BPF (#7422) 2019-12-10 23:19:13 -08:00
Jack May
9e2ce1751b Bump Rust-BPF to Rust 1.39 (#7420) 2019-12-10 22:27:14 -08:00
Dan Albert
8920ac02f6 Remov dead code from TdS testnet manager config (#7414) 2019-12-10 19:16:49 -05:00
Sunny Gleason
06415de8ee change blocktree*::storage_size() to return Option<u64> to handle live fs changes (#7401) 2019-12-10 19:12:49 -05:00
Dan Albert
12d471e2da Update default node balance to 500 SOL and default stake to 1 SOL (#7411) 2019-12-10 17:52:35 -05:00
Rob Walker
7d6777a96f show rent model (#7410) 2019-12-10 14:50:55 -08:00
anatoly yakovenko
96c08cd295 add pubkey for colo (#7409)
automerge
2019-12-10 14:18:57 -08:00
Rob Walker
f3633a2e04 rent for testnet (#7407) 2019-12-10 13:51:19 -08:00
Parth
feeb1cb566 distribute leftover lamports (#7396)
* distribute leftover lamports

* add test scenario

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

* Collapse logs

* Fix dashboard
2019-12-10 11:28:07 -08:00
Dan Albert
5792f5bfb5 Increase tx_count to 20k for all 5 node testcases (#7348) 2019-12-10 14:18:41 -05:00
Tyera Eulberg
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
dependabot-preview[bot]
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
Parth
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
Parth
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
Michael Vines
7879fa5095 Better space out show-stake-history columns 2019-12-10 09:19:58 -07:00
Jack May
a03062af4f Add CLI commands for nonces (#7329)
automerge
2019-12-10 00:24:44 -08:00
Jack May
19ecce1e32 Fix offline stakes payer (#7385) 2019-12-09 23:11:04 -08:00
Michael Vines
5e0a69f68b Improve get-epoch-info output for longer epoch durations 2019-12-09 23:42:00 -07:00
Michael Vines
a33bcac52f Fix stable metrics graph: "Bank Height / Slot Distance ($hostid)" 2019-12-09 22:56:54 -07:00
Rob Walker
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
Tyera Eulberg
ed9cf3566c Restore status check to bubble up TransactionError (#7383)
automerge
2019-12-09 19:35:34 -08:00
Justin Starry
d4d246bfd1 Fix broken link in paper wallet docs (#7388)
automerge
2019-12-09 16:26:49 -08:00
Justin Starry
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
Michael Vines
781ce30e27 Continue processing the ledger on InvalidTickCount errors 2019-12-09 16:34:37 -07:00
dependabot-preview[bot]
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
dependabot-preview[bot]
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
Trent Nelson
5d2b27d916 Address post-merge review for #7353 (#7378)
automerge
2019-12-09 12:54:10 -08:00
Justin Starry
7a37363817 Remove println in solana balance command (#7380)
automerge
2019-12-09 11:03:30 -08:00
carllin
bee3829960 Remove redundant check (#7369) 2019-12-09 01:12:14 -08:00
carllin
e0600e5a91 Properly set parallelism (#7370) 2019-12-09 00:14:09 -08:00
carllin
b55b646f12 Fix Erasure Index (#7319)
Fix Erasure Index Check to set the erasure presence
2019-12-09 00:13:36 -08:00
Justin Starry
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
Rob Walker
32d6d811c5 no lockups for community (#7366) 2019-12-08 20:21:07 -08:00
Rob Walker
0d6fca5abc 500M SOL (#7361)
* 500_000_000MM SOL

* fixup
2019-12-08 14:36:09 -08:00
Michael Vines
48a085c28f Add argument to configure the authorized pubkey for the bootstrap leader's stake (#7362)
automerge
2019-12-08 13:08:35 -08:00
Trent Nelson
059e631f41 Durable Nonce: Re-introduce Initialize instruction (#7353)
Toward an Authorized Noncer
2019-12-08 10:16:55 -07:00
Michael Vines
deb7ac549c Adjust show-validators column alignment (#7359)
automerge
2019-12-08 09:06:35 -08:00
dependabot-preview[bot]
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
Greg Fitzgerald
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
Michael Vines
5253c27ca8 Add Forbole ValidatorInfo (#7355)
automerge
2019-12-07 22:45:58 -08:00
Trent Nelson
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
Michael Vines
6469606baf Add Stake Capital ValidatorInfo (#7346)
automerge
2019-12-07 01:07:03 -08:00
Michael Vines
77cd292828 getVoteAccounts RPC API no longer returns "idle" vote accounts, take II 2019-12-07 01:16:36 -07:00
Michael Vines
22d6951de5 Revert "getVoteAccounts RPC API no longer returns "idle" vote accounts"
This reverts commit 103e40b968.
2019-12-07 01:16:36 -07:00
Michael Vines
33f7103eae Enable system program at SoftLaunch epoch 0 (#7313) 2019-12-06 23:16:28 -07:00
Sunny Gleason
c00216e3be feat: ledger size and cleanup metrics (#7335) 2019-12-06 22:32:45 -05:00
Michael Vines
42247e0e1a getVoteAccounts RPC API no longer returns "idle" vote accounts (#7339) 2019-12-06 20:23:29 -05:00
Greg Fitzgerald
8a908a6864 Add more pool tokens (#7338)
automerge
2019-12-06 16:54:02 -08:00
Greg Fitzgerald
2d6ed7142f Fix typo (#7336) 2019-12-06 16:48:16 -07:00
TristanDebrunner
9ecb844de7 Split up ReplayStageConfig to make it derive Default (#7334)
automerge
2019-12-06 14:39:35 -08:00
Tyera Eulberg
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
dependabot-preview[bot]
b8008ae1e9 Bump cbindgen from 0.10.1 to 0.11.0 (#7318)
automerge
2019-12-06 13:23:22 -08:00
dependabot-preview[bot]
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
Tyera Eulberg
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
Justin Starry
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
Tyera Eulberg
503bf69ab3 Bump wallet-sanity timeout (#7327) 2019-12-06 11:12:18 -07:00
Tyera Eulberg
a60521269d Use u64 for consistency (#7326) 2019-12-06 10:24:31 -07:00
Michael Vines
fe96f85410 Update name 2019-12-06 10:15:35 -07:00
Michael Vines
275fab003f Add ChainFlow ValidatorInfo 2019-12-06 09:22:35 -07:00
Greg Fitzgerald
edfb386ef0 Add pools (#7324) 2019-12-06 09:20:32 -07:00
Justin Starry
186709ed75 cli: Confirm recovered pubkeys (#7316)
* cli: Confirm recovered pubkeys

* cargo clippy
2019-12-06 09:55:00 -05:00
Justin Starry
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
Dan Albert
7c3be2ec9a Add 30k txcount Colo GPU testcase (#7314) 2019-12-05 21:17:16 -05:00
Justin Starry
8fac9102eb Add docs for using a paper wallet with solana cli (#7311) 2019-12-05 21:12:41 -05:00
Michael Vines
178854ac97 Add RockX ValidatorInfo (#7310) 2019-12-05 19:06:56 -07:00
Dan Albert
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
Michael Vines
422eab5846 Add ChorusOne ValidatorInfo (#7306) 2019-12-05 15:39:27 -07:00
sakridge
95e1404a2b Add verify of keypair (#7301) 2019-12-05 14:32:42 -08:00
sakridge
cfc21e1225 Only serialize rooted append vecs (#7281) 2019-12-05 14:27:46 -08:00
dependabot-preview[bot]
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
Justin Starry
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
Sagar Dhawan
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
Rob Walker
d8e1a196bc more genesis (#7291) 2019-12-05 08:30:34 -08:00
dependabot-preview[bot]
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
Parth
0d1fed78af Pay rent to validators (#7164)
automerge
2019-12-05 06:10:34 -08:00
Rob Walker
709bda5939 custodian signs withdraw (#7286) 2019-12-04 21:25:01 -08:00
Rob Walker
8a28734603 re svg (#7288) 2019-12-04 20:38:42 -08:00
Jack May
9485eba73d nudge (#7279) 2019-12-04 19:28:20 -08:00
Jack May
23c4a7dc49 nudge (#7280) 2019-12-04 19:28:00 -08:00
Jack May
39b578fde9 Remove runtime dependency from config program unit tests and move back to config program (#7277) 2019-12-04 19:24:12 -08:00
dependabot-preview[bot]
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
Michael Vines
eabd23fc07 Import validators (#7282) 2019-12-04 18:26:57 -07:00
Pankaj Garg
c7932b710c Remove tune-system.sh script and its use (#7278) 2019-12-04 16:40:12 -08:00
Pankaj Garg
9d7a926a8b Tune UDP rmem/wmem using sys-tuner daemon (#7273) 2019-12-04 15:17:24 -08:00
Pankaj Garg
0a390cbc91 Update validator-start document to reflect sys-tuner changes (#7275) 2019-12-04 15:17:12 -08:00
Justin Starry
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
Jack May
703a5348e8 Relocate program tests (#7259) 2019-12-04 12:41:54 -08:00
Jack May
1a135fa30e Verify BPF ELF during finalize (#7266) 2019-12-04 12:03:29 -08:00
Justin Starry
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
Pankaj Garg
75d505c431 Don't hardcode username in sys-tuner (#7234)
automerge
2019-12-04 11:39:26 -08:00
Jack May
b72c99e46a nudge (#7265) 2019-12-04 11:03:24 -08:00
TristanDebrunner
fae9c08815 Add ReplayStageConfig (#7195) 2019-12-04 11:17:17 -07:00
Justin Starry
c3e7deb4b6 Use wrappable code snippet for paper wallet installation (#7261) 2019-12-04 12:30:12 -05:00
dependabot-preview[bot]
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
Jack May
9b172879a2 Remove deprecated solana_entrypoint macro (#7257) 2019-12-04 00:42:50 -08:00
Rob Walker
9077a94dfe vote update node_id (#7253)
* vote update node_id

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

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

* slp1 nodes get 500SOL

* no commission
2019-12-03 20:44:02 -08:00
Justin Starry
e1b7f40c2b Allow generation of longer seed phrases with keygen (#7210) 2019-12-03 23:39:45 -05:00
Justin Starry
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
Justin Starry
2dc1ae9026 Add Paper Wallet Installation page to sidebar (#7242) 2019-12-03 21:43:39 -05:00
Justin Starry
7cfff75c3e Use procedural macro to generate static public keys (#7219)
automerge
2019-12-03 17:55:18 -08:00
Justin Starry
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
Jack May
5f58e0661b Remove duplicate word (#7236) 2019-12-03 16:45:59 -08:00
carllin
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
Pankaj Garg
f75c51ff71 sys-tuner to check uid of the proc entry (#7232)
automerge
2019-12-03 16:03:10 -08:00
Pankaj Garg
d357192025 Fix ssh connection error due to too many authentication failures (#7229) 2019-12-03 15:53:12 -08:00
Pankaj Garg
c996c8ff49 Protect sys-tuner socket access at create (#7230)
automerge
2019-12-03 14:29:37 -08:00
Sagar Dhawan
1af4e256c9 Print slot meta when printing a slot (#7133)
automerge
2019-12-03 12:27:43 -08:00
Parth
bc09365c98 make tx fee's burn percent in proper range (#7226)
automerge
2019-12-03 12:25:43 -08:00
Parth
ba688cf629 enforce proper range for rent burn_percent (#7217)
* enforce proper range for burn_percent
2019-12-04 00:54:01 +05:30
Rob Walker
d5c8b26a45 bank_leak_mac_os (#7209) 2019-12-03 00:09:05 -08:00
Michael Vines
d38f3f664f Ensure IpEchoServerMessage is not fragmented (#7214)
automerge
2019-12-02 22:32:43 -08:00
Michael Vines
5ac435325b Fix windows build more (#7208) 2019-12-02 22:09:06 -07:00
Justin Starry
b874441a47 Prevent passphrase mistakes with confirmation prompt (#7207) 2019-12-02 22:42:42 -05:00
Ryo Onodera
a35087a5ed Fix typo (#7202) 2019-12-02 19:51:27 -07:00
Michael Vines
1aeaf052a6 Fix windows build (#7204) 2019-12-02 19:45:07 -07:00
Pankaj Garg
a0eafa12e3 Update to hashes_per_tick computation, and tick duration datapoint (#7127) 2019-12-02 18:02:11 -08:00
Tyera Eulberg
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
dependabot-preview[bot]
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
Michael Vines
c6695a3120 Correctly parse ip echo server response and fix broken test (#7196) 2019-12-02 18:37:01 -07:00
Pankaj Garg
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
Michael Vines
41cff1b49d Remove spammy log 2019-12-02 16:52:01 -07:00
Greg Fitzgerald
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
Rob Walker
f9df17d8d0 track bank size (#7144)
* track bank size

* support non-linux a bit better
2019-12-02 13:47:20 -08:00
Michael Vines
7f71a0ba37 Drop default signature fee by 10x (#7192) 2019-12-02 14:34:26 -07:00
Sagar Dhawan
0e2e13f018 Update usages of u64 to Slot (#7191)
automerge
2019-12-02 11:57:40 -08:00
Jack May
bd099e2f4d Fix spelling (#7186) 2019-12-02 10:56:01 -08:00
Tyera Eulberg
42f56b9f86 Further validator doc cleanup (#7187) 2019-12-02 11:49:54 -07:00
Tyera Eulberg
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
sakridge
887bff572a More conservative purge_zero_lamport_accounts purge logic (#7157) 2019-12-02 09:51:05 -08:00
Michael Vines
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
dependabot-preview[bot]
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
dependabot-preview[bot]
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
dependabot-preview[bot]
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
dependabot-preview[bot]
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
dependabot-preview[bot]
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
Greg Fitzgerald
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
Tyera Eulberg
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
dependabot-preview[bot]
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
dependabot-preview[bot]
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
dependabot-preview[bot]
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
dependabot-preview[bot]
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
Justin Starry
57d4b50467 Add Paper Wallet documentation to the book (#7147)
automerge
2019-11-26 20:56:11 -08:00
Rob Walker
8d75efdc58 genesis config hashmaps (#7107) 2019-11-26 19:23:37 -08:00
carllin
c706f9b2cd Change from using fixed number of ticks in delay calculation (#7152)
automerge
2019-11-26 16:21:02 -08:00
dependabot-preview[bot]
c810913861 Bump serde_derive from 1.0.102 to 1.0.103 (#7141)
automerge
2019-11-26 14:44:20 -08:00
dependabot-preview[bot]
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
Justin Starry
4fe1716c7a solana-keygen: Support pubkey recovery directly from seed phrase (#7149) 2019-11-26 15:30:07 -05:00
Michael Vines
d7a82783be Ensure beta/stable testnets use public IPs 2019-11-26 11:24:38 -07:00
Sunny Gleason
0a0f15baca RPC subscriptions for new slot notifications (#7114)
* feat: slot notifications via pubsub rpc w/ tests
2019-11-26 03:42:54 -05:00
Tyera Eulberg
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
Michael Vines
280315a314 mut 2019-11-25 22:49:15 -07:00
Trent Nelson
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
Michael Vines
acd1505050 Stop open measurement before logging it 2019-11-25 22:20:34 -07:00
Michael Vines
578b56fc10 Cargo.lock 2019-11-25 22:20:34 -07:00
Jack May
88cb0c6ae3 Add offline signing support to CLI (#7104) 2019-11-25 21:09:57 -08:00
Michael Vines
294662a1ce Bump version to 0.22.0 2019-11-25 21:34:50 -07:00
Justin Starry
eaa3e87eb0 Support passphrases in keygen (#7134)
* Support passphrases in keygen

* remove short

* Update solana_keygen calls
2019-11-25 21:33:15 -07:00
Michael Vines
9b3a1a99e5 Update backport labels 2019-11-25 21:24:41 -07:00
Sagar Dhawan
76a68c26c9 Track a Bank's parent slot independently from parent bank (#7131) 2019-11-25 15:34:51 -08:00
Rob Walker
ef64f00cbb Revert "Revert "add genesis stake placeholders (#6969)" (#7109)" (#7124)
This reverts commit 702f7cc51d.
2019-11-25 15:11:55 -08:00
Rob Walker
acbe89a159 shrink stakes (#7122) 2019-11-25 13:14:32 -08:00
Tyera Eulberg
0f66e5e49b Add getConfirmedBlock test to rpc (#7120)
automerge
2019-11-25 11:08:03 -08:00
dependabot-preview[bot]
686aa3a150 Bump chrono from 0.4.9 to 0.4.10 (#7113)
automerge
2019-11-25 10:01:46 -08:00
Trent Nelson
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
dependabot-preview[bot]
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
dependabot-preview[bot]
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
Michael Vines
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
anatoly yakovenko
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
Justin Starry
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
Ryo Onodera
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
Michael Vines
306fbd8bd8 install: Drop unneeded sha2 dependency (#7108)
* Poll for updates slower

* Drop sha2 dependency
2019-11-22 21:58:26 -07:00
Michael Vines
3e0b272a20 Remove edge channel hardcode 2019-11-22 20:34:49 -07:00
sakridge
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
Greg Fitzgerald
f040987c9f Move date oracle to config program (#7105)
automerge
2019-11-22 15:10:53 -08:00
Greg Fitzgerald
2a42ddbcbf Don't panic if pubkeys are missing from Budget transaction (#7102) 2019-11-22 14:34:50 -07:00
Ryo Onodera
8bb68c4e6a Really remove mentions of 'genesis_block' (#7099) 2019-11-23 05:58:20 +09:00
Sagar Dhawan
4485b978c1 Clean up accounts hash internal state api (#7090) 2019-11-22 08:56:00 -08:00
Michael Vines
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
Michael Vines
ef55c15537 Remove unused --poll-for-new-genesis-config feature (#7093)
automerge
2019-11-22 08:12:08 -08:00
Justin Starry
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
Ryo Onodera
c8166aed97 Correctly indicate genesis activation_epoch (#7091)
* Correctly indicate genesis activation_epoch

* Drop the '(Genesis)'
2019-11-22 15:35:02 +09:00
Michael Vines
0bd41f98ed Avoid jemalloc in windows build (#7089)
automerge
2019-11-21 18:39:29 -08:00
Jack May
d8ead57fbb Use bs58 strings to declare IDs rather then raw bytes (#7082) 2019-11-21 16:34:40 -08:00
anatoly yakovenko
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
Tyera Eulberg
c965a110f2 Use unbounded channel (#7081) 2019-11-21 14:23:40 -07:00
Rob Walker
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
Michael Vines
a2a9f1e331 Truncate new keypair files (#7078)
automerge
2019-11-21 10:02:04 -08:00
dependabot-preview[bot]
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
Ryo Onodera
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
Sagar Dhawan
79199711b8 Add gpu resource usage tracking (#7075) 2019-11-21 08:33:02 -08:00
Sagar Dhawan
2c1b8fdd39 Add another test for bank state hashes (#7073)
automerge
2019-11-20 23:03:42 -08:00
Jack May
d9024db68d Fix publish of move program (#7072) 2019-11-20 20:33:49 -08:00
Greg Fitzgerald
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
sakridge
e66b29943b datapoint for best fork weight and slot in replay (#7066) 2019-11-20 17:26:52 -08:00
Sagar Dhawan
100b9dd12a Fix num nodes metrics (#7068)
* Fix num nodes metric

* Fix node count metrics
2019-11-20 17:00:31 -08:00
Jack May
3415db9739 Merge api/program into single units (#7061) 2019-11-20 16:32:19 -08:00
Michael Vines
186bf7ae32 Plumb --gossip-host arg 2019-11-20 16:57:24 -07:00
Tyera Eulberg
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
Michael Vines
ee6b11d36d Remove ability to deploy custom programs (#7070)
automerge
2019-11-20 15:37:42 -08:00
Michael Vines
f58fef60fb Fix program copy 2019-11-20 15:56:00 -07:00
Jack May
a76eb64bbb Copy all programs when starting a network (#7069) 2019-11-20 14:37:15 -08:00
Trent Nelson
8590326b50 Book: Add proposal for durable transaction nonces (#6725)
automerge
2019-11-20 14:33:02 -08:00
Michael Vines
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
Jack May
c39633f968 nit: Circular dependency error is hard to read (#7065) 2019-11-20 13:13:22 -08:00
Michael Vines
1fef74b00c Fix solana-keygen new --force ... (#7064)
automerge
2019-11-20 12:46:16 -08:00
Parth
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
anatoly yakovenko
b150da837a Use epoch as the gossip purge timeout for staked nodes. (#7005)
automerge
2019-11-20 11:25:18 -08:00
Rob Walker
ba9aaee7cd Update config.rs (#7045)
automerge
2019-11-20 11:10:46 -08:00
sakridge
3aa67969f9 Add perf module to stable-perf CI (#7060) 2019-11-20 10:59:56 -08:00
sakridge
d4f336db40 Fix unpin argument (#7057)
automerge
2019-11-20 10:22:26 -08:00
Jack May
d184d3a732 Merge native programs parts into one unit (#7047) 2019-11-20 10:12:43 -08:00
Sagar Dhawan
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
Jack May
d2ed921bc6 Cleanup nightly warnings (#7055) 2019-11-19 20:15:37 -08:00
Pankaj Garg
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
Justin Starry
95c137158f Fix gce.sh info (#7054)
automerge
2019-11-19 17:49:25 -08:00
Michael Vines
7151b92239 Don't create keypair files with r+go (#7051) 2019-11-19 18:26:21 -07:00
Tyera Eulberg
716caeb17c Use camelCase (#7050)
automerge
2019-11-19 14:55:32 -08:00
Michael Vines
f8e4bdd23d --bootstrap-storage-pubkey is now optional (#7049)
automerge
2019-11-19 14:35:56 -08:00
b-harvest
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
Tyera Eulberg
854fc8d552 Add getConfirmedBlock to json-rpc docs (#7046) 2019-11-19 14:00:15 -07:00
Sagar Dhawan
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
Tyera Eulberg
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
Tyera Eulberg
5b7bd24f0a Remove duplicated args (#7036) 2019-11-19 09:10:54 -07:00
Dan Albert
2d7c7b0982 Fix missed rebase on net.sh (#7037) 2019-11-19 10:22:30 -05:00
Dan Albert
b958bf9086 Fix confirmation metrics (#7035) 2019-11-19 09:51:50 -05:00
carllin
43144cfe8b Make banks that fail threshhold check resettable (#7027) 2019-11-19 02:36:30 -08:00
carllin
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
Michael Vines
e22f89853f Consider CI_TAG= to be the same as unset CI_TAG 2019-11-18 23:43:38 -07:00
Ryo Onodera
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
Michael Vines
0eb78e461d Relax requirement that the entrypoint node runs the RPC service (#7019) 2019-11-18 21:43:14 -07:00
Parth
3615209ce7 don't allow assignment to sysvar program (#7017)
automerge
2019-11-18 19:39:29 -08:00
Sagar Dhawan
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
Greg Fitzgerald
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
Jack May
6ec918fabb Update Move support to accomadate Libra's changes to compiler behavior (#6993) 2019-11-18 16:47:01 -08:00
Rob Walker
cbf7c0080b fix split instruction doc (#7022) 2019-11-18 15:31:17 -08:00
Pankaj Garg
a6196901de Generate net-shaper configuration from stdin, or randomly (#7021) 2019-11-18 14:47:07 -08:00
Greg Fitzgerald
c09469fa3a Rename verify_instruction() to verify_account_changes() (#7020) 2019-11-18 15:01:14 -07:00
Justin Starry
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
Parth
c902fd0303 skip sysvars while assessing rent (#7015)
* skip sysvars while assessing rent
2019-11-19 01:31:27 +05:30
Pankaj Garg
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
Tyera Eulberg
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
Tyera Eulberg
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
carllin
b66c03667c Log for threshold failure (#7008) 2019-11-17 17:10:16 -08:00
Dan Albert
6e04a646ba Gossip entrypoint is now option of spy not solana-gossip (#7006) 2019-11-17 11:36:24 -05:00
Sunny Gleason
086e5da8d0 feat: add TransactionStatus column family and test (#6958) 2019-11-17 11:26:01 -05:00
sakridge
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
Michael Vines
c3926e6af0 |solana-gossip spy| no longer requires an entrypoint (#6999) 2019-11-16 14:16:28 -07:00
carllin
70322d1ff8 Add error logging to dead slots (#7000) 2019-11-16 02:54:51 -08:00
carllin
7c32640a9b Set index and set data should write into shred data (#6995) 2019-11-16 02:41:59 -08:00
Ryo Onodera
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
Sunny Gleason
5d8c1a303e fix: update run.sh arguments to solana-genesis (#6996) 2019-11-15 23:22:21 -05:00
Justin Starry
24b254459b Fix dev mode arg in run.sh (#6997) 2019-11-15 23:16:42 -05:00
Justin Starry
30089841f6 Use correct faucet arg in run.sh (#6994)
automerge
2019-11-15 18:33:08 -08:00
Michael Vines
0bee05b849 Pull TdS transaction fees to 0 2019-11-15 15:51:37 -07:00
Justin Starry
afd9ae9999 Allow withdraws to the authorized withdrawer (#6989) 2019-11-15 17:16:24 -05:00
Michael Vines
5ab70c4e97 genesis: rename mint account to faucet account and make it optional (#6990) 2019-11-15 14:50:26 -07:00
Sagar Dhawan
cab2232aba Fix System Stats script (#6985)
automerge
2019-11-15 13:25:40 -08:00
Dan Albert
946e937549 Create development vs softlaunch environment hooks into net scripts (#6974) 2019-11-15 15:18:45 -05:00
anatoly yakovenko
0ca943f49b RecyclerCache for shred_sigverify (#6986)
automerge
2019-11-15 12:16:56 -08:00
Michael Vines
b2db0b97fc Add show-gossip command (#6982) 2019-11-15 13:15:34 -07:00
Pankaj Garg
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
sakridge
36e3ccfc68 Remvoe pinned memory (#6976) 2019-11-15 10:58:25 -08:00
Michael Vines
892ca196f1 Improve error message when unable to read a file (#6978) 2019-11-15 10:39:05 -07:00
anatoly yakovenko
59413b3124 Fix rules for fork selection (#6906)
automerge
2019-11-15 08:36:33 -08:00
Dan Albert
e1643c91c4 Pull a fixed and working version of shellcheck docker imaage (#6975) 2019-11-15 10:55:25 -05:00
Sagar Dhawan
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
Michael Vines
006c39380a Display 'none' instead of 0.0.0.0 (#6973) 2019-11-14 20:24:35 -07:00
Michael Vines
22f2247f46 Cargo.lock 2019-11-14 16:59:30 -07:00
Tyera Eulberg
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
sakridge
99b42f210c Remove unused sha2 dep (#6964)
automerge
2019-11-14 14:01:11 -08:00
TristanDebrunner
ae3c9033c1 Stop running testsuites when only the book is modified (#6956) 2019-11-14 14:36:08 -07:00
Tyera Eulberg
03f7f0d18c Rename getBlock to getConfirmedBlock; remove getBlocksSince (#6961)
automerge
2019-11-14 13:14:42 -08:00
Sagar Dhawan
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
Michael Vines
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
Sagar Dhawan
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
dependabot-preview[bot]
d6cbb02c92 Bump rocksdb from 0.12.4 to 0.13.0 (#6952)
automerge
2019-11-14 09:59:54 -08:00
Sunny Gleason
42af8b199f feat: add tests for invalid/failure cases (#6951) 2019-11-14 11:41:26 -05:00
Dan Albert
dbbd9663b2 Consolidate error messaging into result detail (#6950) 2019-11-14 11:18:38 -05:00
Michael Vines
f4846b6fe4 Update rent.rs 2019-11-14 08:55:09 -07:00
Dan Albert
a28a34f61c Clean up DB names in automation (#6949) 2019-11-14 10:20:10 -05:00
Dan Albert
96d47c51a1 Tighten up AWS testcases (#6948) 2019-11-14 10:17:50 -05:00
Dan Albert
f27c11ccd8 Add Azure testnet to automation (#6911)
* Add Azure testnet to automation
2019-11-14 09:14:53 -05:00
carllin
43e2301e2c Fix roots overrunning broadcast (#6884)
* Add trusted pathway for insert_shreds to avoid checks
2019-11-14 00:32:07 -08:00
Parth
7b05b3dbb3 rent collector improvments (#6888)
* avoid account copying + pre-empt rent

* adding support for base rent
2019-11-14 10:56:49 +05:30
Pankaj Garg
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
Ryo Onodera
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
Michael Vines
cc96848b01 Remove unneeded prepare_batch() assert (#6941)
automerge
2019-11-13 17:08:21 -08:00
sakridge
6009801c5f More granular timings in shred generation (#6900) 2019-11-13 16:30:12 -08:00
Michael Vines
f116cdeed9 Add validator catchup command (#6922) 2019-11-13 15:58:14 -07:00
Pankaj Garg
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
Sunny Gleason
e2fb9ac829 feat: remove unwraps from client code, fixes #6915 (#6927) 2019-11-13 14:41:54 -07:00
Dan Albert
f83254d760 Update Iftop command in testnet automation (#6908)
* Update iftop command
2019-11-13 14:41:42 -05:00
Michael Vines
ee5cc733a1 Log blocktree and snapshot open times (#6930)
automerge
2019-11-13 11:20:39 -08:00
Michael Vines
18a17cfbbf Implement Display trait (#6929) 2019-11-13 11:44:07 -07:00
Greg Fitzgerald
a3a830e1ab Delete Service trait (#6921) 2019-11-13 11:12:09 -07:00
Dan Albert
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
Michael Vines
9026339d35 Restore is_frozen() asserts (#6925) 2019-11-13 10:40:51 -07:00
Justin Starry
0be13a6295 Silence cargo install error in bpf script (#6926)
automerge
2019-11-13 08:57:12 -08:00
Michael Vines
fcc2874591 Remove/address some TODOs (#6923) 2019-11-13 09:43:15 -07:00
Sunny Gleason
9246bee12b feat: default 8gb hard memory limit for redis (#6913) 2019-11-13 11:09:20 -05:00
Greg Fitzgerald
30a08f4282 Cleanup ledger macros (#6916)
automerge
2019-11-13 07:14:09 -08:00
Ryo Onodera
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
Greg Fitzgerald
361eab1bf7 Remove unused dependencies (#6917)
automerge
2019-11-12 22:00:29 -08:00
Michael Vines
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
Michael Vines
86faa3f995 Properly type RpcClient::get_version() (#6919) 2019-11-12 22:01:04 -07:00
Greg Fitzgerald
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
dependabot-preview[bot]
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
Michael Vines
4405e8a15b Automatically run dot to generate PDFs or PNGs (#6912) 2019-11-12 20:27:15 -07:00
Pankaj Garg
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
Greg Fitzgerald
986e9e268e Revive the parallel bank client from v0.16 (#6903) 2019-11-12 15:26:21 -07:00
Trent Nelson
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
dependabot-preview[bot]
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
Ryo Onodera
148a58865e Make creating new snapshot.tar.bz2 truly-atomic (#6902) 2019-11-12 14:21:56 -07:00
sakridge
2523fa73cf Use release as default (#6896) 2019-11-12 13:39:12 -07:00
Michael Vines
6d76c34291 Handle dead slots when loading ledger (#6887) 2019-11-12 13:38:26 -07:00
Ryo Onodera
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
Rob Walker
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
Dan Albert
73e3fc7c4f Add packet loss analyzer to testnet automation (#6715)
* Add packet loss analyzer to testnet automation
2019-11-12 14:51:36 -05:00
Sunny Gleason
5903339c17 feat: return bank/block info with block-related results (#6716) 2019-11-12 14:49:41 -05:00
Dan Albert
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
Sagar Dhawan
5670cafda4 Fix caching data shreds as coding shreds (#6877) 2019-11-12 10:29:58 -08:00
Michael Vines
4bc8fd3267 Add --no-genesis-fetch flag (#6893) 2019-11-12 10:42:04 -07:00
Dan Albert
bb2fa9957a Increase default AWS instance size to match GCE and Azure (#6773) 2019-11-12 12:27:59 -05:00
Michael Vines
c6b108ef4f Don't panic in sdk/ when genesis fails to load (#6892) 2019-11-12 10:24:49 -07:00
Dan Albert
bb158a9b48 Add provider specific self destruct timeouts (#6894) 2019-11-12 12:21:24 -05:00
Michael Vines
c2fdbde68f forks graph can now optionally display all validator votes (#6885) 2019-11-12 10:13:16 -07:00
Tyera Eulberg
7e82450d7b Serialize transaction in proper wire format instead of json (#6889) 2019-11-12 10:45:10 -05:00
Dan Albert
188dbdb068 Ignore symlinked logdir in repo root (#6891) 2019-11-12 10:36:53 -05:00
Michael Vines
25866f3652 print command now supports multiple slots and decodes system/vote instructions (#6878) 2019-11-11 23:22:20 -07:00
Justin Starry
c7e2057d2d Install xargo if a new version is available (#6882)
automerge
2019-11-11 20:32:07 -08:00
Ryo Onodera
d84f367317 Extract duplicate clap helpers into clap-utils (#6812) 2019-11-12 09:42:08 +09:00
Sagar Dhawan
95d6586dd7 Remove debug datapoint that isn't being plotted (#6873) 2019-11-11 14:25:25 -08:00
Pankaj Garg
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
Sagar Dhawan
816b2d7ff8 Tune repair to be less aggressive (#6868) 2019-11-11 13:12:22 -08:00
Jack May
91cfa0aac9 Upgrade xargo if old (#6869) 2019-11-11 12:58:24 -08:00
Michael Vines
4be646c695 discover() by gossip sockaddr instead of just by gossip ip address (#6865) 2019-11-11 12:42:58 -07:00
Dan Albert
a23c6177d5 Use reusable provider-specific testnet keypairs (#6866)
* Use reusable provider-specific testnet keypairs

* shellcheck
2019-11-11 12:08:22 -07:00
Tyera Eulberg
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
Dan Albert
596d30661a Echo failed command to results app (#6859) 2019-11-11 09:37:11 -07:00
Ryo Onodera
b971eeca4b Add ryoqun to ssh authorized keys (#6860) 2019-11-11 17:12:24 +09:00
Michael Vines
cfab36cb1d Include channel and commit info in the version of pre-release builds (#6819) 2019-11-10 22:39:13 -07:00
Justin Starry
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
Justin Starry
62eea636b0 Update jsonrpc-api.md 2019-11-09 19:46:04 -05:00
sakridge
b14e61ff79 Filter any net/log* directory from rsync (#6857) 2019-11-09 13:38:17 -08:00
Dan Albert
59adc25c23 Implement non-GPU mode testcase for colo (#6856) 2019-11-09 09:38:06 -07:00
Tyera Eulberg
86ead6a65c Update book toc for readonly accounts (#6854) 2019-11-09 08:25:24 -07:00
Tyera Eulberg
fbfbafa3d4 Update readonly accounts docs (#6801) 2019-11-09 07:35:37 -07:00
Michael Vines
1ddf90ed08 Compress contact_info_trace() output to improve CI log rendering (#6852) 2019-11-09 01:12:18 -07:00
Michael Vines
0fbd508c5f Only check the entrypoint's RPC address (#6851) 2019-11-09 00:56:31 -07:00
Michael Vines
24a7b0ce74 Add print-genesis-hash command (#6849) 2019-11-08 23:17:48 -07:00
Michael Vines
68eafb3f30 Ensire config dir exists 2019-11-08 22:18:21 -07:00
Michael Vines
2649f6bdd6 Avoid excessive log/ relinking 2019-11-08 21:57:50 -07:00
Justin Starry
9807f47d4e Rename genesis block to genesis config (#6816) 2019-11-08 23:56:57 -05:00
Michael Vines
63425bed10 Move move tests into its own job (#6847) 2019-11-08 20:40:03 -07:00
Justin Starry
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
carllin
91be35731c Fix freeze and register_tick race (#6799)
* Fix freeze and register_tick race

* Add test
2019-11-08 17:21:17 -08:00
Michael Vines
d1daeb44e6 Remove custom stack_size() (#6844) 2019-11-08 17:11:07 -07:00
Michael Vines
efdfc5c327 Remove TODOs (#6843) 2019-11-08 16:43:18 -07:00
Michael Vines
9c00ad9ff2 Remove some low-hanging TODOs (#6839) 2019-11-08 16:41:36 -07:00
Michael Vines
151adab739 earlyoom now works on reboots (#6841) 2019-11-08 16:40:38 -07:00
Michael Vines
162b1bdef7 Add more tests (#6834)
automerge
2019-11-08 15:07:11 -08:00
Pankaj Garg
da425cc225 Don't insert coding shreds into blocktree on leader (#6831) 2019-11-08 13:54:23 -08:00
Jack May
346213da4c Check for LD_DW at the end of a program (#6821) 2019-11-08 13:30:44 -08:00
Jack May
8babecd890 Remove todo from account (#6827) 2019-11-08 13:30:21 -08:00
Jack May
2855c55ac1 Move loader does not need genesis auth key (#6818) 2019-11-08 11:52:56 -08:00
Jack May
bb9649e18d Replacd todo with issue (#6823) 2019-11-08 11:48:07 -08:00
Jack May
2f7d0e7884 TODO already covered by issue (#6828) 2019-11-08 11:45:17 -08:00
Jack May
dfc4d7cb50 Remove unsupported test (#6820) 2019-11-08 11:37:47 -08:00
Michael Vines
b800642fa4 Add new fork log message for when the node is leader for consistency (#6808) 2019-11-08 12:30:25 -07:00
Jack May
5b6c590057 run.sh logs validators to stderr (#6817) 2019-11-08 11:30:19 -08:00
carllin
66a0f54097 Replay should respect order of register_ticks with respect to blockhashes (#6805) 2019-11-08 12:29:41 -07:00
Michael Vines
f8e64aad5b ci/shellcheck.sh now only audits files that git knows about (#6815) 2019-11-08 10:25:59 -07:00
Jack May
cd5ec8cd35 Fix blind keyed_account indexing in BPF and Move loader (#6810) 2019-11-08 09:19:19 -08:00
Michael Vines
75fd13de5d Prevent ci/nits.sh from incorrectly nitting on ci/nits. (#6814) 2019-11-08 09:40:25 -07:00
Justin Starry
807af8670e Clean up net logs (#6813) 2019-11-08 10:25:17 -05:00
Parth
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
Michael Vines
f7b6e777bf Revert "Clean up net/log symlinks (#6794)" (#6809)
This reverts commit 68353b7e57.
2019-11-07 22:15:45 -07:00
Justin Starry
68353b7e57 Clean up net/log symlinks (#6794) 2019-11-07 23:45:19 -05:00
sakridge
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
Sagar Dhawan
80a89b5e6d Revert "Revert "Add inflation to epoch phases (#6787)" (#6802)" (#6806)
automerge
2019-11-07 18:33:14 -08:00
Rob Walker
b64b54f48f unfork dalek ed25519 (#6776) 2019-11-07 17:08:10 -08:00
Sagar Dhawan
20a52f153b Fix iftop not being stopped correctly (#6803)
automerge
2019-11-07 17:03:14 -08:00
Sagar Dhawan
d89271528e Revert "Add inflation to epoch phases (#6787)" (#6802)
automerge
2019-11-07 16:43:09 -08:00
Pankaj Garg
ccac35fc01 Increase FEC ratio to 32:32 (#6800)
automerge
2019-11-07 16:38:06 -08:00
Michael Vines
23e232b496 Avoid : in default log filename (#6796) 2019-11-07 15:36:29 -07:00
anatoly yakovenko
ddcf906a88 Add docs for FEC rate calculation (#6788)
automerge
2019-11-07 12:44:40 -08:00
Pankaj Garg
09e8124017 Tool to reconfigure netem on testnet (#6781)
automerge
2019-11-07 11:14:33 -08:00
Sagar Dhawan
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
Jack May
a9c4cd6cbe Add inflation to epoch phases (#6787) 2019-11-07 10:53:04 -08:00
Trent Nelson
180bc1784e Book: Add blockhash to terminology (#6711)
automerge
2019-11-07 10:46:04 -08:00
Tyera Eulberg
f984feda42 Use get_slot_with_commitment (#6791) 2019-11-07 10:41:58 -07:00
Michael Vines
56fc15f44d Fix units on dead slots graph 2019-11-07 08:26:13 -07:00
Justin Starry
e0d9f7d1d4 Fix genesis arg names in run.sh (#6785) 2019-11-06 23:27:10 -05:00
Michael Vines
87ba66b6d0 Add net/ support for reusable identity keypairs (#6783) 2019-11-06 21:14:05 -07:00
Justin Starry
e420800aeb Update terminology for block height and genesis block (#6782) 2019-11-06 23:09:03 -05:00
Sunny Gleason
a684984f8b feat: add confirm_transaction, add rpc client test (#6778) 2019-11-06 22:08:03 -05:00
Tyera Eulberg
079682fbdc Add ping cli option to use CommitmentLevel::Max, instead of CommitmentLevel::Recent (#6775) 2019-11-06 18:54:17 -07:00
Michael Vines
2491719f36 Fix windows build (#6774) 2019-11-06 16:07:28 -07:00
Jack May
65de227520 Don't panic on packet data (#6769) 2019-11-06 14:32:37 -08:00
TristanDebrunner
29f3b198cf Update snapshot verification proposal (#6764)
automerge
2019-11-06 13:48:28 -08:00
Pankaj Garg
0ace79939b Add reference tick to data shreds (#6772)
* Add reference tick to data shreds

* fix tests
2019-11-06 13:27:58 -08:00
Tyera Eulberg
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
anatoly yakovenko
5e8668799c Fewer recyclers. (#6770)
automerge
2019-11-06 12:35:51 -08:00
Michael Vines
8fa6935c9d Validators now log to a file by default (use -o -/--log - for stderr) (#6768)
automerge
2019-11-06 11:47:34 -08:00
Rob Walker
a1fe6265fd use pubkeys in genesis (#6750) 2019-11-06 11:18:25 -08:00
anatoly yakovenko
67f636545a Refactor sigverify to stage for signing shreds on the GPU (#6635)
automerge
2019-11-06 10:52:30 -08:00
sakridge
ec50c20400 Add time in net/logs path (#6701) 2019-11-06 10:43:12 -08:00
Michael Vines
18f146ace5 validator/: Restructure main() to fully parse cli arguments first (#6765) 2019-11-06 11:34:31 -07:00
Trent Nelson
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
dependabot-preview[bot]
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
carllin
7ff2a44a63 Make last shred for an interrupted slot signed + typed (#6760) 2019-11-06 08:25:17 -07:00
Michael Vines
b5074d8577 Enable JSON RPC request/response logging by default (#6758) 2019-11-06 08:23:13 -07:00
dependabot-preview[bot]
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
Parth
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
carllin
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
Jack May
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
Michael Vines
8e3be6413e Cargo.lock 2019-11-05 20:02:09 -07:00
Michael Vines
09e648f957 ledger-tool/: Include full validator voting history in fork-graph (#6756) 2019-11-05 19:40:00 -07:00
Pankaj Garg
0c2bf022fa Apply netem packet rules to only UDP traffic (#6754) 2019-11-05 18:34:04 -08:00
Pankaj Garg
1c5d2a85cf Fix substitution of private IP with public IP in iftop logs (#6748)
automerge
2019-11-05 15:08:35 -08:00
Pankaj Garg
8993b15248 Integrated use of netem with testnet scripts (#6746)
automerge
2019-11-05 15:04:06 -08:00
carllin
8f91b5aab3 Add threshold to repairman for same slot (#6728) 2019-11-05 12:48:45 -08:00
dependabot-preview[bot]
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
Michael Vines
85c9a231c1 Include the affected slot in blocktree error metrics (#6734) 2019-11-05 13:25:21 -07:00
sakridge
c312d4fba0 Calculate proofs collected and don't encrypt if there are none (#6698) 2019-11-05 11:38:50 -08:00
Michael Vines
7203036e3e Adjust nofiles within Blocktree::open() for all ledger/ users (#6737)
automerge
2019-11-05 11:18:49 -08:00
Jack May
b9d8e3e55a Only copy whats needed to verify an instruction after processing (#6669) 2019-11-05 10:57:32 -08:00
Michael Vines
08973f9f05 Adjust default signature fee for base-10 lamports (#6738) 2019-11-05 11:21:45 -07:00
Tyera Eulberg
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
Michael Vines
cea13e964c Add --graph-forks option (#6732) 2019-11-04 23:18:30 -07:00
Parth
d207a34736 remove duplicate signal handling (#6702) 2019-11-05 11:36:51 +05:30
Michael Vines
fba1af6ea9 ledger-tool can now load a ledger snapshot (#6729) 2019-11-04 22:14:55 -07:00
anatoly yakovenko
b825d04597 Pull perf into a separate module. (#6718)
automerge
2019-11-04 20:13:43 -08:00
Sagar Dhawan
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
Michael Vines
4d52f47f87 Move get_bank_forks() into ledger/ so its available for use by ledger-tool/ (#6720) 2019-11-04 19:10:06 -07:00
anatoly yakovenko
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
sakridge
57983980a7 Lower verify-batch-size to debug (#6722)
automerge
2019-11-04 16:00:59 -08:00
Tyera Eulberg
33f4aaf3fd Rename confidence to commitment (#6714) 2019-11-04 16:44:27 -07:00
Pankaj Garg
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
Greg Fitzgerald
fb12136975 Add genesis_accounts module (#6708) 2019-11-04 13:46:33 -07:00
Rob Walker
efe260f12e sysvar trait (#6667)
* sysvar trait

* get the new guy in on it
2019-11-04 12:31:24 -08:00
Rob Walker
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
Trent Nelson
d085c8626f GCE: Add instances self-destruct (#6363)
automerge
2019-11-04 10:30:26 -08:00
Michael Vines
5e3697807c Fail gracefully if AVX support is missing (#6705) 2019-11-04 11:03:39 -07:00
Trent Nelson
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
Michael Vines
a0127e63c6 pay subcommand now accepts a keypair file for convenience (#6703) 2019-11-04 09:36:49 -07:00
Michael Vines
8b2327ed34 Remove unneeded lib.rs 2019-11-04 08:11:40 -07:00
Michael Vines
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
dependabot-preview[bot]
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
Sagar Dhawan
568475e2db Fix incorrectly signed CrdsValues (#6696) 2019-11-03 10:07:51 -08:00
anatoly yakovenko
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
Michael Vines
50a17fc00b Use Slot and Epoch type aliases instead of raw u64 (#6693)
automerge
2019-11-02 00:38:30 -07:00
Pankaj Garg
f9a9b7f610 Better output layout for iftop logs (#6690)
automerge
2019-11-01 16:36:02 -07:00
Sagar Dhawan
a57f6b70da Fix swapped repair and forwards addrs (#6691)
automerge
2019-11-01 16:01:42 -07:00
Pankaj Garg
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
anatoly yakovenko
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
Dan Albert
7b6e3a23be Add new pubkey to auth keys (#6687) 2019-11-01 14:44:10 -06:00
Dan Albert
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
TristanDebrunner
e6c8bfd008 Add --use-move flag to cargo-install-all.sh and net/net.sh (#6670) 2019-11-01 07:53:30 -07:00
Sagar Dhawan
2d67962c2f Send repairman shreds to the repair socket (#6671) 2019-10-31 18:23:50 -07:00
Pankaj Garg
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
TristanDebrunner
d2c66c40c6 Have cargo-install-all.sh also look in program target dirs for so's (#6631) 2019-10-31 14:40:54 -07:00
Justin Starry
a4d48df30a Add assertion when filling blocktree slot with ticks (#6664)
automerge
2019-10-31 14:15:07 -07:00
carllin
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
Justin Starry
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
Rob Walker
111942a47d document clock (#6662) 2019-10-31 13:26:55 -07:00
Rob Walker
bc88180058 stake split (#6402)
* stake split

* stake split
2019-10-31 11:07:27 -07:00
Dan Albert
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
carllin
9d65e6f183 Fix check in should_insert_data_shred (#6649) 2019-10-30 23:37:25 -07:00
Greg Fitzgerald
328a6a866e Fix code comment (#6640)
automerge
2019-10-30 22:21:34 -07:00
Jack May
5264fded00 Avoid alloc due to vector pushes (#6632) 2019-10-30 21:55:17 -07:00
Michael Vines
83d5115a02 Add --starts-with for vanity key grinding (#6647) 2019-10-30 20:47:42 -07:00
carllin
0559212df7 log bench (#6643) 2019-10-30 19:51:44 -07:00
Michael Vines
f131255066 Add ~/.cargo/bin to PATH (#6641) 2019-10-30 19:41:24 -07:00
carllin
59f3dc3b6b Fix PohRecorder Metrics (#6644)
* Update Poh Recorder Dashboard

* Update PohRecorder logging
2019-10-30 18:55:29 -07:00
carllin
6454bfe754 Rework get_index_meta (#6636) 2019-10-30 16:48:59 -07:00
Michael Vines
7bb224f54a Install ag on nodes (#6634)
automerge
2019-10-30 16:43:16 -07:00
Rob Walker
fa12a5f70b kill rent calculator (#6625) 2019-10-30 16:25:12 -07:00
Justin Starry
d2d78a073f Remove lingering references to base-2 SOLs (#6629)
automerge
2019-10-30 14:59:44 -07:00
Michael Vines
6d403f2d85 Remove stray println 2019-10-30 14:44:26 -07:00
Michael Vines
8032141311 Add --no-multi-client (#6624) 2019-10-30 14:43:30 -07:00
sakridge
38491c8c4b Reduce verify-batch-size log (#6623) 2019-10-30 13:41:11 -07:00
TristanDebrunner
627664b785 Re-enable tests (#6615)
automerge
2019-10-29 21:34:20 -07:00
Sagar Dhawan
dfa1c7493c Ignore flaky move test (#6616)
automerge
2019-10-29 21:21:35 -07:00
Sagar Dhawan
801337a422 Refactor Weighted Shuffle (#6614)
automerge
2019-10-29 21:02:11 -07:00
Tyera Eulberg
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
TristanDebrunner
b4dc1a7263 Remove move feature (#6605)
automerge
2019-10-29 17:14:07 -07:00
Sagar Dhawan
ef3aa2731c Fix Weighted Best calculation (#6606)
automerge
2019-10-29 17:04:11 -07:00
Michael Vines
e738019c48 Add Ramp TPS table 2019-10-29 16:18:58 -07:00
carllin
a5ef78f709 Expand CF's (#6528) 2019-10-29 16:18:03 -07:00
Tyera Eulberg
4156cea704 Fixup running-validator docs (#6607)
* Fixup validator docs

* Remove $
2019-10-29 17:13:20 -06:00
Rob Walker
a587d05098 fix re delegate (#6603) 2019-10-29 14:42:45 -07:00
TristanDebrunner
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
dependabot-preview[bot]
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
dependabot-preview[bot]
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
Michael Vines
83174b919c Remove unstable default-run directive (#6599)
automerge
2019-10-29 10:28:48 -07:00
Michael Vines
d952b38f93 Ensure nofiles is not capped at 1024 on a node reboot 2019-10-28 23:21:34 -07:00
Michael Vines
1e2ab89b47 Ensure redis-server is started on a reboot 2019-10-28 20:58:46 -07:00
anatoly yakovenko
34a9619806 SigVerify stage for shreds. (#6563) 2019-10-28 16:07:51 -07:00
Dan Albert
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
Jack May
85ccba366a Run localnet in development mode (#6587) 2019-10-28 15:35:17 -07:00
Sagar Dhawan
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
Michael Vines
b04c8c1c1a Demote blocktree metrics log level (#6590)
automerge
2019-10-28 14:46:43 -07:00
anatoly yakovenko
243fa6cf63 Shred gpu sigverify (#6520)
Implement APIs for verifying shred signatures on the GPU.
2019-10-28 10:29:38 -07:00
dependabot-preview[bot]
30c0a7d069 Bump serde from 1.0.101 to 1.0.102 (#6581)
automerge
2019-10-28 09:19:39 -07:00
dependabot-preview[bot]
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
dependabot-preview[bot]
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
Trent Nelson
96e209db49 Colo: Don't fail without a message (#6558) 2019-10-28 09:20:49 -06:00
Michael Vines
0c14ca58c7 Invoke on-reboot from cloud startup script to avoid racing with cron (#6579)
automerge
2019-10-27 10:56:16 -07:00
Michael Vines
f3c0aa154a -a is optional 2019-10-26 22:48:24 -07:00
carllin
6efaaa9d7a Blocktree metrics (#6527)
* Add metrics for blocktree performance
* Plumb metrics through window service
2019-10-26 16:15:59 -07:00
carllin
08238e8307 Add proposal for tick verification in slots (#6512)
* Add proposal for tick verification in slots
2019-10-26 16:14:30 -07:00
carllin
e1b35f9847 Fix race in blocktree.insert_shreds (#6550)
* Add guard for blocktree insert_shreds

* Add test
2019-10-26 04:09:58 -07:00
Pankaj Garg
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
Michael Vines
be74801236 Add NET_NUM_xyz variables 2019-10-25 23:00:14 -07:00
Michael Vines
68acfd36d0 Bootstrap leader's stake is now authorized to the bootstrap leader's identity key (#6571) 2019-10-25 22:58:35 -07:00
Rob Walker
c9cea2152b optimize verify_instruction (#6539) 2019-10-25 21:47:16 -07:00
Michael Vines
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
Dan Albert
73c31d873e Update Cargo.toml versions from 0.20.0 to 0.21.0 (#6568) 2019-10-25 17:40:49 -06:00
Dan Albert
a2a9d54985 Increase node start stagger (#6566) 2019-10-25 17:35:29 -06:00
Justin Starry
ea2b26e5f5 Fix scp client mint keypair (#6565) 2019-10-25 16:23:52 -07:00
Jack May
d68e2c4d06 Revert "Make instruction data opaque to runtime (#6470)" (#6564)
This reverts commit 6eeca9c6f1.
2019-10-25 16:22:41 -07:00
Justin Starry
0cfa3d3de7 Return error if stake history deser fails in cli (#6559) 2019-10-25 16:44:09 -05:00
Michael Vines
0d1f463f7f Update testnet-manager.sh 2019-10-25 10:56:20 -07:00
Dan Albert
ff34bfebde Define 10, 25, 50 node testcases (#6557) 2019-10-25 11:43:53 -06:00
Michael Vines
e103789994 Ignore exit code when the first mount fails 2019-10-25 10:11:32 -07:00
dependabot-preview[bot]
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
dependabot-preview[bot]
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
dependabot-preview[bot]
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
Justin Starry
71ff269780 Add show-stake-history command to cli (#6541) 2019-10-25 12:20:08 -04:00
Michael Vines
3879109e4c Display full blocktree error 2019-10-25 08:37:39 -07:00
Michael Vines
f901d71202 Update 2019-10-25 07:51:12 -07:00
dependabot-preview[bot]
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
dependabot-preview[bot]
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
Dan Albert
43c0103e4c Enforce machine type definition on GCE (#6555) 2019-10-25 08:10:25 -06:00
Jack May
6eeca9c6f1 Make instruction data opaque to runtime (#6470) 2019-10-24 22:38:57 -07:00
Sagar Dhawan
28d3af6f35 Add "bounds" command to ledger-tool and fix broken funtionality (#6540) 2019-10-24 22:20:52 -07:00
Michael Vines
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
Michael Vines
90461245f9 Reduce TdS fees to 1 lamport per sig, and slots_per_epoch/2 (#6542) 2019-10-24 20:37:23 -07:00
Michael Vines
1c91c1e880 Remount /mnt/extra-disk on reboot 2019-10-24 20:14:26 -07:00
sakridge
53c7be32b6 Add more retransmit and streamer stats (#6534) 2019-10-24 19:27:19 -07:00
Michael Vines
397ea05aa7 spy nodes are now gossip entrypoints (#6532) 2019-10-24 15:35:33 -07:00
Dan Albert
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
Michael Vines
2de2fbd5e3 Remove stray setup_secondary_mounts 2019-10-24 13:48:57 -07:00
Michael Vines
14eca5aea6 Remove setup_secondary_mount knowledge from multinode-demo/ (#6530) 2019-10-24 13:40:16 -07:00
Michael Vines
27f38a3770 Revert "Restore CUDA-based unit tests (#6518)"
This reverts commit dc52b17c4d.
2019-10-24 11:34:53 -07:00
Justin Starry
7a7abe692e Add mint keypair to solana clients for convenience (#6536) 2019-10-24 14:31:06 -04:00
Rob Walker
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
Michael Vines
8e5e48dd92 Add get-rpc-url --all flag (#6533) 2019-10-24 10:44:05 -07:00
Greg Fitzgerald
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
Tyera Eulberg
e9bdee3dc7 Add getEpochSchedule to rpc docs (#6535) 2019-10-24 11:30:11 -06:00
Justin Starry
88033bccbb Add mint keypair to validators for convenience (#6531) 2019-10-24 12:50:32 -04:00
Rob Walker
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
Michael Vines
d398898c38 show-validators: display current/delinquent stake, and flag delinquent nodes (#6525) 2019-10-23 21:40:35 -07:00
Dan Albert
39fc677781 Add 5 node GCE test cases (#6524)
* Add 5 node GCE test cases

* shell check
2019-10-23 22:05:05 -06:00
Michael Vines
dc52b17c4d Restore CUDA-based unit tests (#6518) 2019-10-23 20:09:28 -07:00
Jack May
ddefc96433 Limit deserialization of program inputs (#6522) 2019-10-23 19:56:07 -07:00
Greg Fitzgerald
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
sakridge
f1172617cc Purge accounts with lamports=0 on rooted forks (#6315) 2019-10-23 12:46:48 -07:00
carllin
6ce115ec95 Add commitment metrics implementation to book (#5903)
* Add commitment metrics implementation to book
2019-10-23 12:35:47 -07:00
sakridge
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
Michael Vines
35cc74ef25 Add GenesisBlock::OperatingMode to control how cluster features are activated (#6430) 2019-10-23 11:50:10 -07:00
Michael Vines
35d6196384 Surface nvidia-smi errors in CI 2019-10-23 10:59:30 -07:00
Dan Albert
01fe7c90a5 Do not break build on missing curl results (#6516) 2019-10-23 11:04:15 -06:00
Michael Vines
26b8747014 Exit cleanly for idle clients 2019-10-23 09:56:05 -07:00
Michael Vines
bedb05bdeb Plumb GEOLOCATION_API_KEY down to the blockexplorer (#6514) 2019-10-23 09:53:06 -07:00
Justin Starry
6829b8a6fb Ensure solana commands are added to idle clients (#6513) 2019-10-23 11:15:00 -04:00
Michael Vines
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
Sagar Dhawan
4c515d0ef1 Sagar: Add ssh keys for colo (#6507) 2019-10-22 15:59:39 -07:00
Dan Albert
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
Sunny Gleason
0b2d4f32fa feat: get epoch schedule rpc, update cli (#6500) 2019-10-22 16:41:18 -04:00
Dan Albert
4f25013954 Explicitly define commit SHA (#6499) 2019-10-22 13:55:58 -06:00
Dan Albert
5c7735c40f Increase drone airdrop request cap to 1_000_000 SOL (#6497) 2019-10-22 12:35:52 -07:00
sakridge
e6438098e1 Increase archiver polling timeout (#6501)
automerge
2019-10-22 12:15:55 -07:00
Greg Fitzgerald
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
TristanDebrunner
75d68edfe7 Remove unused re-exports of database types and related dead code (#6490) 2019-10-22 06:36:42 -06:00
Michael Vines
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
Dan Albert
1b1980ad49 Rename TEST_DURATION to TEST_DURATION_SECONDS (#6493) 2019-10-21 23:24:46 -04:00
Greg Fitzgerald
3b9b9b1500 Rename remaining uses of fullnode to validator (#6476)
automerge
2019-10-21 20:21:21 -07:00
Dan Albert
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
Michael Vines
929a81e636 Beautify solana validator-info get output (#6483)
automerge
2019-10-21 17:10:22 -07:00
Dan Albert
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
Michael Vines
d1b18a5060 archiver.rs -> multinode-demo/archiver.sh (#6487)
automerge
2019-10-21 16:46:04 -07:00
Michael Vines
3fb70b8d47 Ban XXX, TBD, FIXME comments (#6486) 2019-10-21 16:43:11 -07:00
carllin
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
Tyera Eulberg
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
Trent Nelson
564c14a2c6 net.sh: Ensure external disk link is setup before cleaning config dir (#6481)
automerge
2019-10-21 15:38:58 -07:00
sakridge
6996f45d54 Print machine hostname in log (#6480)
automerge
2019-10-21 14:59:03 -07:00
sakridge
b1c2c6009e Exclude net/log in rsync script (#6475)
automerge
2019-10-21 14:06:36 -07:00
Trent Nelson
934f69b660 Colo verbosity (#6473)
automerge
2019-10-21 13:49:12 -07:00
Pankaj Garg
84e911361a Use constants instead of lazy_static for shred header sizes (#6472) 2019-10-21 12:46:16 -07:00
Sagar Dhawan
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
Sunny Gleason
951e1f8b48 feat: grant access to sunny@ (#6471) 2019-10-21 11:17:06 -07:00
Greg Fitzgerald
9232057e95 Rename replicator to archiver (#6464)
* Rename replicator to archiver

* cargo fmt

* Fix grammar
2019-10-21 11:29:37 -06:00
Michael Vines
6c79f56c2c Add --skip-ledger-verify arg 2019-10-21 10:22:40 -07:00
Greg Fitzgerald
48eafcc74f Remove dead code in Rocks wrapper (#6469)
automerge
2019-10-21 10:18:54 -07:00
Michael Vines
dec9272813 Skip ledger verification on restart to avoid timing out net/ (#6468)
automerge
2019-10-21 09:27:45 -07:00
Michael Vines
eb3093d43e Beautify show-account output (#6467)
automerge
2019-10-21 08:48:21 -07:00
Justin Starry
09abbd93b1 Cleanup register_tick special handling (#6462) 2019-10-21 10:51:02 -04:00
dependabot-preview[bot]
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
dependabot-preview[bot]
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
Greg Fitzgerald
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
Justin Starry
31e9074ae5 Rename leader_after_slots to leader_after_n_slots (#6459) 2019-10-19 23:28:33 -04:00
Rob Walker
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
sakridge
74ee88d9bc Add storage stage and bank_forks tests to integration (#6458) 2019-10-19 12:09:45 -07:00
Michael Vines
f52c813fc2 Setup each bench-tps account with 1 SOL by default (#6457) 2019-10-19 07:57:57 -07:00
Pankaj Garg
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
Ryan Shea
e59af8269e Add increment docs infra to increment-cargo-version (#6456) 2019-10-18 20:53:45 -07:00
Tyera Eulberg
785c2574cd Check that transaction fee-payer is a debitable account (#6454)
automerge
2019-10-18 20:39:05 -07:00
sakridge
1a77f7ce3b Change to 0x7f which is a valid short_vec len (#6455)
automerge
2019-10-18 19:56:48 -07:00
Greg Fitzgerald
6e7dccbbfb Add an error enum to snapshot_utils (#6453) 2019-10-18 19:16:06 -06:00
sakridge
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
Jack May
985f5c7351 Use serde-bytes to serialize u8 efficiently (#6442)
automerge
2019-10-18 17:18:06 -07:00
Michael Vines
621c67a8cb Adjust default cluster signature fees (#6436) 2019-10-18 17:00:51 -07:00
Rob Walker
f2fd53e773 coverage over multiple packages (#6420) 2019-10-18 16:23:34 -07:00
Trent Nelson
0fc3c7eee2 Bump Trent's keys... (#6445)
automerge
2019-10-18 15:42:50 -07:00
Greg Fitzgerald
e81ba8e79f Split snapshot_package module (#6447)
automerge
2019-10-18 14:58:16 -07:00
Michael Vines
35461df92d Adjust crate-features to prevent rebuilds (#6444)
automerge
2019-10-18 13:52:05 -07:00
Greg Fitzgerald
a19ffb353d Don't hide serialization errors (#6443)
automerge
2019-10-18 13:35:05 -07:00
sakridge
35ed432d1a Make benchmark useful (#6440)
function is verify_hash_internal_state
2019-10-18 12:59:47 -07:00
TristanDebrunner
8c29700402 Remove the DbCursor struct (#6441) 2019-10-18 13:11:59 -06:00
dependabot-preview[bot]
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
dependabot-preview[bot]
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
dependabot-preview[bot]
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
Ryo Onodera
193c9a08e0 Reject TXs when there is a mismatch (#6236)
automerge
2019-10-18 09:48:35 -07:00
Greg Fitzgerald
5468be2ef9 Add solana-ledger crate (#6415)
automerge
2019-10-18 09:28:51 -07:00
Michael Vines
6f58bdfcb1 Remove validator sanity check (#6435)
automerge
2019-10-18 08:26:08 -07:00
TristanDebrunner
9cf9de6044 Remove the Cursor struct (#6426) 2019-10-18 09:18:36 -06:00
Ryan Shea
a48dcb1421 Add "Subject to change" for legal purposes. (#6432) 2019-10-18 08:06:46 -07:00
dependabot-preview[bot]
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
carllin
27c0d30a07 Fix logging (#6417) 2019-10-18 02:06:41 -07:00
Pankaj Garg
6c33c3a5ba Update shred tests to use specific error codes (#6428)
automerge
2019-10-17 22:50:38 -07:00
Michael Vines
e6198debd6 Remove unused set_thread_count() (#6424)
automerge
2019-10-17 20:55:05 -07:00
Sagar Dhawan
298ba34c3c Add flag to mark a packet as discarded (#6427) 2019-10-17 16:26:29 -07:00
dependabot-preview[bot]
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
dependabot-preview[bot]
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
Michael Vines
842eaf90df Exclude bench-exchange from coverage report 2019-10-17 16:03:49 -07:00
Greg Fitzgerald
24846b7b61 Don't use BlocktreeError from Shredder (#6423)
automerge
2019-10-17 15:44:15 -07:00
Pankaj Garg
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
Pankaj Garg
854c62e208 Reduce kernel networking buffer for rmem and wmem (#6422)
automerge
2019-10-17 14:52:24 -07:00
Trent Nelson
1759968c1e Colo: Put NVMe disks to use (#6357)
automerge
2019-10-17 14:44:45 -07:00
TristanDebrunner
9e52d11ad0 Remove Backend trait (#6407) 2019-10-17 15:19:27 -06:00
Michael Vines
d865f1f0c5 Add vest program to genesis 2019-10-17 14:07:09 -07:00
Pankaj Garg
2747c9db23 Fix metrics dashboard layout (#6419) 2019-10-17 13:39:50 -07:00
Michael Vines
bfc67e8680 gzip -f 2019-10-17 13:08:51 -07:00
Greg Fitzgerald
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
Greg Fitzgerald
a931ad40c8 Remove unused code in entry (#6414)
automerge
2019-10-17 09:59:40 -07:00
Dan Albert
b4ed88e0f7 Fail faster on boot up (#6412) 2019-10-17 12:26:12 -04:00
Ryo Onodera
b7b71b31d3 Magically improve coverage (#6345)
automerge
2019-10-16 16:53:07 -07:00
Pankaj Garg
83c1831a01 Fix replay stage test (#6406) 2019-10-16 15:41:43 -07:00
Jack May
b85996494b BPF script nits (#6405) 2019-10-16 15:35:16 -07:00
Jack May
26d31b68d7 Update Rust-BPF to v0.1.8 (#6404) 2019-10-16 15:08:29 -07:00
sakridge
8740bb42c0 Close down banking stage in banking_bench (#6401)
Maybe fixes pthread crash?
2019-10-16 14:45:05 -07:00
carllin
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
Michael Vines
2d351d3952 Prevent ping stats header from confusing buildkite log folding 2019-10-16 13:36:16 -07:00
Sagar Dhawan
7ae5ff838b Revert "collect rent from accounts (take:2) (#6360)" (#6400)
This reverts commit c1b401a04a.
2019-10-16 13:31:21 -07:00
Michael Vines
605b477e06 Permit finding more nodes than expected (./gce.sh config) 2019-10-16 13:21:00 -07:00
Justin Starry
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
Ryo Onodera
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
Ryo Onodera
f4c5da3c72 Fix unaligned read of short_vec pubkey_size in sigverify (#6388)
automerge
2019-10-16 11:09:17 -07:00
Pankaj Garg
a258e1e0b3 Fix flaky test_recv_mmsg_batch_size (#6399)
automerge
2019-10-16 11:01:41 -07:00
Jack May
1fd84cb52b Enforce only system program can allocate accounts (#6386) 2019-10-16 10:47:45 -07:00
Michael Vines
8dd24bc7d9 Put dedicated arg in the right place 2019-10-16 10:36:29 -07:00
Michael Vines
b7af5f08d6 Avoid more non-standard ping. macOS 💔 2019-10-16 10:35:41 -07:00
Michael Vines
781dfd9dc4 Drop non-standard ping -o option 2019-10-16 10:05:46 -07:00
dependabot-preview[bot]
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
Greg Fitzgerald
ee099b0880 Delete ref annotations (#6394)
automerge
2019-10-16 09:27:49 -07:00
Michael Vines
51ac05b3cf Request dedicated instances 2019-10-16 08:10:31 -07:00
Michael Vines
9267931ef6 Add support for preemptible GCP instances 2019-10-16 08:10:31 -07:00
dependabot-preview[bot]
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
Jack May
609d6cdf61 Enforce move loader program account size (#6385)
automerge
2019-10-15 23:42:59 -07:00
Jack May
a3ccbe02d0 Create genesis with the requested amount (#6384) 2019-10-15 22:40:31 -07:00
Justin Starry
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
Sagar Dhawan
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
Pankaj Garg
33052c1dd2 Cleanup shred header structures (#6378)
automerge
2019-10-15 20:48:45 -07:00
Parth
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
Jack May
78d5c1de9a Move loader enforces account size (#6379)
* Move loader enforces account size

* Fix librapay test
2019-10-15 18:30:45 -07:00
Jack May
2ee05f1234 Fix move testing (#6374) 2019-10-15 15:58:49 -07:00
Pankaj Garg
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
Michael Vines
37a29b979f --force 2019-10-15 15:12:25 -07:00
sakridge
1afc527919 Lower cluster_info-num_nodes datapoint (#6368) 2019-10-15 14:42:19 -07:00
Michael Vines
d89174ee82 Default to no client nodes to avoid unnecesary cost 2019-10-15 14:37:52 -07:00
Greg Fitzgerald
f6255c2f9e Fix blind keyed accounts indexing in Config program (#6369) 2019-10-15 14:35:42 -06:00
Greg Fitzgerald
ae41c88eb2 Boot the Builder pattern from GenesisBlock (#6364) 2019-10-15 13:52:44 -06:00
Rob Walker
41067de5e4 multiple deactivation (#6354) 2019-10-15 12:50:31 -07:00
sakridge
dfca2b510b Lower shred/receiver stats (#6365)
too many messages
2019-10-15 11:43:52 -07:00
Michael Vines
8bc9d8988f - 2019-10-15 07:58:40 -07:00
Michael Vines
f7279804b4 Ensure solana-cli has a keypair 2019-10-15 07:47:45 -07:00
Michael Vines
47e1ea107b Add show-validators 2019-10-14 23:04:31 -07:00
Michael Vines
799d6aeb19 Update cluster_query.rs 2019-10-14 23:00:13 -07:00
Tyera Eulberg
f8ccd90eeb Add ForkConfidenceCache methods (#6359)
automerge
2019-10-14 22:14:20 -07:00
Michael Vines
169b772398 Show validators during net sanity 2019-10-14 20:38:51 -07:00
Michael Vines
d2e28b0f7e Add show-validators command 2019-10-14 20:38:51 -07:00
Michael Vines
88bb55ffd2 Add get_vote_accounts() to RPC client 2019-10-14 20:38:51 -07:00
Michael Vines
5508ac6272 Add root slot to getVoteAccounts 2019-10-14 20:38:51 -07:00
dependabot-preview[bot]
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
Rob Walker
9803f167bd Revert "collect rent from the accounts (#6181)" (#6356)
automerge
2019-10-14 16:16:44 -07:00
Justin Starry
6a161c740d Stop activating stake after deactivation (#6351) 2019-10-14 18:40:24 -04:00
Tyera Eulberg
5d99853502 Add getBlockConfidence rpc endpoint (#6350)
automerge
2019-10-14 15:24:10 -07:00
Rob Walker
c2ebf466fd reestablish parameter semantics for withdraw (#6330) 2019-10-14 15:02:24 -07:00
Pankaj Garg
3313b2ff58 Fetch stage batching of forwarded txs (#6349)
automerge
2019-10-14 13:32:29 -07:00
Parth
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
Trent Nelson
b75438ff32 gce.sh: Unwind allocation upon failure (#6343)
automerge
2019-10-14 09:36:20 -07:00
Trent Nelson
82fea9ce73 net.sh: Add support for selecting validator GPU mode (#6326)
automerge
2019-10-14 09:33:32 -07:00
Michael Vines
79e32c92c1 Skip deploy attempt on sanity failure 2019-10-12 22:18:41 -07:00
Greg Fitzgerald
322fcea6e5 More fullnode to validator renaming (#6337) 2019-10-11 13:30:52 -06:00
Pankaj Garg
5650231df3 Increase buffer size for erasure meta DB column (#6335) 2019-10-11 12:18:11 -07:00
Justin Starry
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
carllin
bf9c815b9e Increase Index column buffers (#6268) 2019-10-10 23:17:39 -07:00
Greg Fitzgerald
798065fc71 Better Vest code coverage (#6329)
automerge
2019-10-10 21:35:10 -07:00
Justin Starry
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
Pankaj Garg
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
Trent Nelson
fa64a0b367 gce.sh: Be strict about fullnode count w/o --allow-boot-failures (#6321)
automerge
2019-10-10 17:13:59 -07:00
Greg Fitzgerald
ba46bc4624 Fix system program blind derefs (#6317)
automerge
2019-10-10 16:43:49 -07:00
Greg Fitzgerald
c6e4641781 Remove many uses of legacy term 'fullnode' (#6324) 2019-10-10 17:33:00 -06:00
Trent Nelson
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
Rob Walker
f8b36f4658 smaller fix for system_instruction_processor's blind indexing (#6322)
automerge
2019-10-10 15:43:32 -07:00
Pankaj Garg
753bd77b41 Use multicast to send retransmit packets (#6319) 2019-10-10 15:02:36 -07:00
Tyera Eulberg
a9276700ea Stake program: reorder withdraw keys to allow to == authorized withdrawer (#6314)
automerge
2019-10-10 14:46:38 -07:00
carllin
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
sakridge
1b775044f7 Use multiple retransmit stage threads/sockets (#6279) 2019-10-10 13:24:03 -07:00
Pankaj Garg
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
Trent Nelson
81fb9e6a59 gce.sh: Rename -f flag to better reflect usage (#6318)
automerge
2019-10-10 12:57:03 -07:00
dependabot-preview[bot]
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
Greg Fitzgerald
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
Dan Albert
60e8cf5a47 Implement nightly performance tests (#6140)
* Implement nightly performance tests on colo
2019-10-10 11:12:13 -04:00
Greg Fitzgerald
10cf728e11 More object-oriented version of Vest (#6310) 2019-10-10 08:54:18 -06:00
Greg Fitzgerald
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
Jack May
54d0168746 BPF call trace script (#6311)
automerge
2019-10-10 01:10:47 -07:00
Rob Walker
e58e48e919 make sysvar creation a bit more foolproof (#6294) 2019-10-09 23:22:33 -07:00
carllin
1f345ce2d9 Don't grab keypair from cluster info on every iteration of broadccast (#6303) 2019-10-09 17:36:45 -07:00
Pankaj Garg
ed85aa43a4 Implement sendmmsg() API (#6304)
* Implement sendmmsg()

* fixes
2019-10-09 17:06:56 -07:00
Greg Fitzgerald
33e34cbba9 Plug potential panic in Vest (#6302)
automerge
2019-10-09 16:27:49 -07:00
Sagar Dhawan
4b0250192a Remove remnants of the cuda feature flag (#6298)
automerge
2019-10-09 16:09:36 -07:00
carllin
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
Sagar Dhawan
de82e60c64 Fix unrealistic hash rate expectations in genesis (#6295) 2019-10-09 15:47:48 -07:00
Tyera Eulberg
72d227ae91 Bench-tps: swap consts (#6296) 2019-10-09 16:31:30 -06:00
Trent Nelson
4713cb8675 Colo: Prefer public IPs, part 2 (#6297)
automerge
2019-10-09 15:17:24 -07:00
Trent Nelson
fdaee4ab17 Colo: Add running process cleanup to delete logic (#6281) 2019-10-09 15:49:33 -06:00
Sagar Dhawan
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
Justin Starry
95d15dc720 Add jstarry to authorized keys (#6293) 2019-10-09 15:04:44 -04:00
Pankaj Garg
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
dependabot-preview[bot]
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
Justin Starry
c28633a949 Fix book SVGs (#6286) 2019-10-09 10:48:47 -04:00
Rob Walker
7cf90766a3 add epoch_schedule sysvar (#6256)
* add epoch_schedule sysvar

* book sheesh!
2019-10-08 22:34:26 -07:00
Justin Starry
f2ee01ace3 Fix blocktree processor entry callback test (#6285) 2019-10-08 20:38:05 -04:00
Greg Fitzgerald
9fbbb17c3b GitBook: [master] 17 pages and 65 assets modified 2019-10-08 23:35:34 +00:00
Justin Starry
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
Sagar Dhawan
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
sakridge
baf4e767e1 Increase number of transaction send retries. (#6273) 2019-10-08 13:04:27 -07:00
sakridge
c5e5342325 Rearrange broadcast stats (#6274) 2019-10-08 12:50:59 -07:00
sakridge
6123d2f9e8 Add print to bench-tps about blockhash time (#6272) 2019-10-08 11:34:10 -07:00
Pankaj Garg
788296047a Increase batch size for recvmmsg() (#6260)
* Increase batch size for recvmmsg()

* fix tests

* new test
2019-10-08 09:54:49 -07:00
carllin
9dceb8ac74 Broadcast/Shredding Metrics (#6270)
automerge
2019-10-08 01:42:42 -07:00
carllin
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
Trent Nelson
667f9e0d79 Colo: Factor out inlined scripts to own files (#6266)
automerge
2019-10-07 22:05:36 -07:00
Trent Nelson
57916f8be6 Colo: Prefer public IPs (#6264)
automerge
2019-10-07 20:44:57 -07:00
carllin
e12c577b16 remove verify_hash_internal_state (#6261) 2019-10-07 16:38:54 -07:00
sakridge
ba7efbb136 Retransmit stage optimization, don't copy packets (#6250) 2019-10-07 15:33:22 -07:00
Tyera Eulberg
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
Tyera Eulberg
4a071b06bd Remove deprecated script (#6258) 2019-10-07 14:14:55 -06:00
Pankaj Garg
17f169f446 BlobFetchStage cleanup post shred work (#6254) 2019-10-07 11:08:01 -07:00
Pankaj Garg
6662986169 Fix vest_api output filename (#6253)
automerge
2019-10-07 10:31:04 -07:00
Greg Fitzgerald
1c86160e16 Reorder parameters (#6252)
automerge
2019-10-07 09:42:56 -07:00
Michael Vines
c34cc4918f Prevent repeated accounts in genesis to avoid breaking account hashing 2019-10-07 08:12:18 +09:00
Michael Vines
4870a2cbac Panic when a snapshot fails to verify 2019-10-07 08:12:18 +09:00
sakridge
da7d94d0f0 Retransmit stage benchmark (#6249) 2019-10-06 12:56:17 -07:00
carllin
cdef065cca Broadcast Metrics (#6166)
* Add timing logigng to broadcast

* Shred metrics

* Fixes
2019-10-05 22:51:47 -07:00
Tyera Eulberg
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
dependabot-preview[bot]
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
Greg Fitzgerald
fb39bd45d7 Revert "Rename solana-runtime to sealevel (#6239)" (#6247)
This reverts commit 2e921437cd.
2019-10-04 19:33:29 -06:00
sakridge
5ef012b2c1 Tweak debug to remove unreadable datapoints (#6060) 2019-10-04 16:25:22 -07:00
Tyera Eulberg
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
Greg Fitzgerald
2e921437cd Rename solana-runtime to sealevel (#6239)
automerge
2019-10-04 15:02:44 -07:00
Greg Fitzgerald
5617162cb6 Add Vest program (#5987)
automerge
2019-10-04 14:43:50 -07:00
Tyera Eulberg
0c3ff6b75c Cli refactor: vote and storage program functionalities (#6242)
automerge
2019-10-04 14:18:19 -07:00
Michael Vines
7f53737000 Periodically pull from the entrypoint if it's no longer in Crdt (#6240) 2019-10-04 14:18:07 -07:00
Sagar Dhawan
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
anatoly yakovenko
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
Michael Vines
18653b825b Preserve previous fullnode log file on restart 2019-10-04 07:58:33 -07:00
Tyera Eulberg
aa3694cca8 Bench tps: improve fund_keys (#6225)
automerge
2019-10-04 01:16:07 -07:00
Michael Vines
844d231d74 Add default-run key for dev convenience (#6235)
automerge
2019-10-03 21:59:37 -07:00
dependabot-preview[bot]
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
Ryo Onodera
ffae4662bc Use AtomicU64 now that it's stabilized (#6222) 2019-10-03 20:02:28 -07:00
Pankaj Garg
a05d772aa9 Add colo access pubkey (#6232)
* Add colo access pubkey

* Change the key to ed25519
2019-10-03 19:55:39 -07:00
Michael Vines
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
Tyera Eulberg
d25576f8ef clippy (#6230) 2019-10-03 19:36:54 -06:00
Michael Vines
4b42fa2d75 Ensure all builds are triggered on a rust upgrade (#6229) 2019-10-03 16:31:50 -07:00
Michael Vines
c1c7e0ff08 Remove reduntant semicolon 2019-10-03 16:25:00 -07:00
Michael Vines
1d503faa2c clippy 2019-10-03 16:14:28 -07:00
Michael Vines
18c0f76f89 clippy 2019-10-03 15:59:37 -07:00
Michael Vines
4d458a5e00 Keep the build green when there's nowhere to publish 2019-10-03 14:55:04 -07:00
Parth
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
Michael Vines
cf2bcee607 Increase testnets to 4 validator nodes to avoid the need for 100% consensus 2019-10-03 09:53:31 -07:00
Michael Vines
db7a3ac826 Revert "GitBook: [master] 12 pages and 33 assets modified"
This reverts commit f792171ae9.
2019-10-02 23:53:20 -07:00
Michael Vines
f792171ae9 GitBook: [master] 12 pages and 33 assets modified 2019-10-03 06:41:01 +00:00
Michael Vines
81550e609b Assume stable is already installed 2019-10-02 23:35:10 -07:00
Michael Vines
c28d0d7c34 Avoid TRAVIS_RUST_VERSION check 2019-10-02 23:28:40 -07:00
Michael Vines
6cb0790796 Fix crate metadata 2019-10-02 23:20:19 -07:00
Michael Vines
c2961617bd Add description tag 2019-10-02 23:13:19 -07:00
Michael Vines
08e59b4a3c Add description tag 2019-10-02 22:59:58 -07:00
dependabot-preview[bot]
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
Michael Vines
586e0a67ef Suppress nighly safety_doc warning 2019-10-02 22:51:14 -07:00
Michael Vines
5aab2866e1 Rebuild SVGs 2019-10-02 22:51:14 -07:00
Michael Vines
a20f12865a Upgrade to rust 1.38 2019-10-02 22:51:14 -07:00
Michael Vines
0bf1a24bf5 Enable patch branches 2019-10-02 22:45:02 -07:00
Michael Vines
f9f5bc2eb5 More clippy 2019-10-02 21:21:07 -07:00
Michael Vines
9fe8c98047 Switch to solana-reed-solomon-erasure temporarily to fix windows build (#6211) 2019-10-02 19:01:55 -07:00
Michael Vines
13fc518268 Clippy work towards rust 1.38 (#6219) 2019-10-02 18:04:18 -07:00
Dan Albert
c06876eb3d Fix date formatting to work on Mac OS (#6214) 2019-10-02 14:44:52 -07:00
Pankaj Garg
f331f1d1e9 Don't forward transaction to self (#6218) 2019-10-02 14:07:34 -07:00
Jack May
054deb809b Remove token program (#6217) 2019-10-02 14:07:23 -07:00
Jack May
865ddfc63f fix clippy (#6215) 2019-10-02 13:51:54 -07:00
Jack May
315940b6a9 Bump BPF instruction cap (#6213) 2019-10-02 10:07:44 -07:00
sakridge
211cae5811 Remove dead constants (#6207) 2019-10-01 18:22:57 -07:00
Tyera Eulberg
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
Dan Albert
58139ce5ae Add buildkite-agent key for colo access (#6205) 2019-10-01 13:24:04 -07:00
Michael Vines
8e888059d8 Use built-in solana-gossip timeout for better error messages (#6189) 2019-10-01 12:30:11 -07:00
Justin Starry
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
Pankaj Garg
774e9df2e5 Finish unfininished slot before processing new slots (#6197) 2019-10-01 11:46:14 -07:00
Michael Vines
faae122375 Remove bogus wait 2019-10-01 11:08:52 -07:00
Justin Starry
a6363e56b6 Add native_token module to sdk (#6192) 2019-10-01 13:53:28 -04:00
Rob Walker
214c041bf7 cli code review (#6183) 2019-10-01 10:34:45 -07:00
sakridge
ae7700296d broadcast_shreds opt (#6175)
* Don't clone/copy/sort ContactInfo vec
2019-10-01 09:38:29 -07:00
Michael Vines
f09183765c Output timestamp to console for better logs 2019-10-01 09:17:47 -07:00
Justin Starry
2f92b92a8a Expose current stake accounts of a bank for use in cli tooling (#6184) 2019-09-30 21:57:49 -04:00
Tyera Eulberg
fee97236bf Create vote account with at least 1 lamport (#6188) 2019-09-30 17:07:44 -06:00
Jack May
520f7c3e18 Optimize BPF logs (#6186) 2019-09-30 14:21:29 -07:00
Tyera Eulberg
97752b4937 Fixup create-stake-account command (#6187)
automerge
2019-09-30 14:17:49 -07:00
Parth
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
Rob Walker
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
Rob Walker
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
Michael Vines
e5a7d08966 Add --expected-genesis-blockhash validator argument (#6174)
automerge
2019-09-29 19:09:24 -07:00
Michael Vines
11fc684f3c Clear download progress bar to avoid flicker during archive extraction (#6162) 2019-09-29 17:56:33 -07:00
Michael Vines
d50aef8404 Add get-epoch-info command (#6161)
automerge
2019-09-27 22:00:30 -07:00
Pankaj Garg
5637f88aff Don't try signging coding shred if fec rate is 0 (#6171)
automerge
2019-09-27 21:58:53 -07:00
dependabot-preview[bot]
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
Jack May
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
Michael Vines
284273a73f Cleanly error when trying to delegate-stake an existing stake account (#6158) 2019-09-27 14:35:49 -07:00
Jack May
4c5d0fc51f Validator-info doc update (#6152) 2019-09-27 13:26:02 -07:00
sakridge
75a92d58cb Featureize move (#5897)
* Featureize move

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

* fixups

* code review
2019-09-26 13:29:29 -07:00
Rob Walker
50bbe34b66 rename locktower to tower (#6120) 2019-09-26 13:29:05 -07:00
Jack May
c10b2e6cc0 Cleanup Rust BPF sysroot (#6124) 2019-09-26 13:27:33 -07:00
Trent Nelson
c4ed80d544 colo-utils: Disable StrictHostKeyChecking for SSH calls (#6117)
automerge
2019-09-26 11:22:07 -07:00
Parth
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
Michael Vines
74a648accb Enable SOL or lamports for create-vote-account, show-{stake,vote}-account commands (#6114)
automerge
2019-09-26 10:26:47 -07:00
carllin
35365974bf Remove serializing all ForkHashes (#6110) 2019-09-26 02:01:25 -07:00
Rob Walker
355a40800d remove consensus.msc (#6106) 2019-09-25 18:15:14 -07:00
carllin
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
Sagar Dhawan
56f6ee84f1 Fix Bench-tps being too strict (#6105)
automerge
2019-09-25 17:43:13 -07:00
Pankaj Garg
e2a5ec9cd2 Change formula used in erasure statistics graph (#6102)
automerge
2019-09-25 14:57:16 -07:00
Rob Walker
aea0326b82 coverage by package (#6099) 2019-09-25 14:01:09 -07:00
Dan Albert
93ad637c5c typo 2019-09-25 16:58:53 -04:00
Dan Albert
6be5e21aaf GitBook: [master] 17 pages and 59 assets modified 2019-09-25 20:58:40 +00:00
Rob Walker
43795193c4 add authorized parameters to vote api (#6072)
* add authorized parameters to vote api

* code review
2019-09-25 13:53:49 -07:00
dependabot-preview[bot]
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
Sagar Dhawan
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
sakridge
093b5b5267 Prune fork_hashes with dead forks (#6085) 2019-09-25 11:16:14 -07:00
Dan Albert
678a5aff83 Remove brace expansion in arg list (#6091) 2019-09-25 12:52:07 -04:00
Jack May
03dc4a20a1 Single threaded LLD (#6088) 2019-09-25 07:44:33 -07:00
Pankaj Garg
de3765ab70 Add erasure recovery stats to dashboard (#6079)
automerge
2019-09-24 19:59:42 -07:00
Michael Vines
5f079137e5 Remove kvstore (#6075)
automerge
2019-09-24 19:59:32 -07:00
Justin Starry
94f0c081a6 Fix staker / voter credit redemption (#6074)
* Fix staker / voter credit redemption

* Rename variables
2019-09-24 22:58:31 -04:00
carllin
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
Michael Vines
f2f041bb7c Avoid accidential tx_count mismatches when using an accounts file (#6069) 2019-09-24 18:46:43 -07:00
Tyera Eulberg
3562774f8b Reduce poll sleep (#6068)
* Reduce sleep in poll_for_signature_confirmations

* Unignore test_repairman_catchup
2019-09-24 17:01:18 -06:00
Sagar Dhawan
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
Pankaj Garg
5763d63737 Additional tests for should_retransmit_and_persist (#6062)
automerge
2019-09-24 14:54:10 -07:00
Michael Vines
9d805dfc59 Tweak Bank Slot Distance graph 2019-09-24 14:52:29 -07:00
dependabot-preview[bot]
e6390b754f Bump env_logger from 0.6.2 to 0.7.0 (#6044) 2019-09-24 14:22:26 -07:00
Tyera Eulberg
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
Justin Starry
571dc4e387 Update stale code references for vote program in book (#6061) 2019-09-24 15:55:32 -04:00
Pankaj Garg
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
Michael Vines
d7e4c8e3cf Support primordial accounts with no data (#6053) 2019-09-24 10:42:33 -07:00
Pankaj Garg
57e90948a8 Remove dead code from cluster_info (#6051) 2019-09-24 10:27:59 -07:00
Rob Walker
26a20a7e62 nits (#6032) 2019-09-24 10:10:49 -07:00
Justin Starry
b6a8268da3 Fix BPF program static linking (#5992) 2019-09-24 07:09:53 -04:00
Michael Vines
61d7467ba8 Flip order of arg to ensure -t sticks 2019-09-23 22:20:22 -07:00
Michael Vines
7fa809c16d Avoid hardlinking as that confuses tar (#6042) 2019-09-23 20:12:16 -07:00
Sagar Dhawan
84f74807d4 Skip considering banks older than the latest vote slot (#6037)
automerge
2019-09-23 19:40:03 -07:00
Pankaj Garg
4f59077318 Fix vote metrics (#6038)
automerge
2019-09-23 18:09:20 -07:00
Pankaj Garg
3a9c03cc89 Don't recover coding shreds (#6034)
* Don't recover coding shreds

* cleanup
2019-09-23 16:24:21 -07:00
Michael Vines
f055d2f0cc ' => " (#6035) 2019-09-23 16:03:38 -07:00
Rob Walker
72fb52ec60 rename balance (#5984) 2019-09-23 15:20:45 -07:00
Sagar Dhawan
62c22c6cb1 Fix really old banks triggering log spam (#6025) 2019-09-23 13:59:16 -07:00
Pankaj Garg
dbd337c616 Upgrade to ReedSolomon 4.0 release (#6026) 2019-09-23 13:53:52 -07:00
Michael Vines
eeda7338cc Dump tar stdout/err on failure for better debug (#6024) 2019-09-23 13:05:09 -07:00
carllin
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
Trent Nelson
02647c25a9 net: Add Trent's work laptop pubkey (#6022)
automerge
2019-09-23 10:25:36 -07:00
Michael Vines
433b0808e4 Remove the _/deps symlink, just copy instead (#6020) 2019-09-23 09:16:56 -07:00
Michael Vines
529b163bd0 GitBook: [master] 156 pages and 12 assets modified 2019-09-23 03:38:34 +00:00
Dan Albert
9c9991db1d Update cargo toml and lock files to v0.20.0 (#6016) 2019-09-22 21:45:56 -04:00
Michael Vines
aacead62c0 Move images from img/ to .gitbook/assets 2019-09-21 22:26:45 -07:00
Michael Vines
ae5a6a06bb Revert "GitBook: [master] 156 pages and 8 assets modified"
This reverts commit 60320e6b6e.
2019-09-21 22:24:11 -07:00
Michael Vines
60320e6b6e GitBook: [master] 156 pages and 8 assets modified 2019-09-22 04:31:10 +00:00
sakridge
169ece8226 Rename client.sh to bench-tps.sh (#6014) 2019-09-21 21:12:10 -07:00
sakridge
5020a4aa6b Add required port to --entrypoint arg in docs. (#6015) 2019-09-21 21:12:01 -07:00
Michael Vines
4c49566a89 Enable nvidia persistence mode on instance reboots 2019-09-21 10:45:20 -07:00
Michael Vines
ab60c578b9 Unconditionally redeploy the edge testnet hourly to better exercise snapshot restarts 2019-09-21 09:28:59 -07:00
Ryan Shea
050021cf77 Add SVGs for Gitbook (#6009) 2019-09-21 07:59:36 -07:00
carllin
8240d1fe0a Confidence implementation (#5993)
* Change confidence parameters

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

* Fix and add tests

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

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

* variable int fix

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

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

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

* make stake account rent exempt

* add rent exempted system instruction

* use rent exemption instruction in vote and stake api

* use rent exempted account while creating executable account

* updating chacha golden hash as instruction data has changed

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

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

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

* Add (new) update command to deploy testnet updates

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

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

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

* Minor comment reformat

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

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

* remove obsolete code

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

* Transaction input & output parsing

* public struct members, tx parsing test

* format and clippy fixes

* update block data/test material fetching utils

* update tx parsing tests

* format changes

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

* rename ShredInfo to Shred

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

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

* Remove setting thread count in local cluster

* Increase timeout

* Move local cluster to separate job

* Extract out local cluster test from bench-tps

* Make local cluster inaccessible from outside crate

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

* Move bench-exchange to local cluster

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

* fixup

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

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

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

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

And define "smart contract"

* Apply review feedback

* Rename secret key to private key

* Rename pubkey to public key in book

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

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

* Fix tests

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

* update magic numbers

* fixup

* fixup

* fixup

* no more blobs

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

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

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

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

* add rent sysvar

* integrate rent_calculator with bank

* rent_calculator integration with genesis

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

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

* fix chacha golden hash

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

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

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

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

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

* fix broken tests

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

* Generalize authorize names; implement for Lockup

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

* Use password input to retrieve mnemonic phrase

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

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

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

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

* Review comments

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

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

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

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

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

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

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

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

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

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

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

* remove self from type_of

* sheesh

* better

* add stake errors

* update wallet error handling

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

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

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

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

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

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

* clippy

* fixes

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

* Refactor fetching Index in blocktree

* Refactor get_slot_meta_entry

* Re-enable local cluster test

* cleanup

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

* Remove assert

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

* try again

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

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

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

* fixes and cleanup

* replace uninitialized() call with MaybeUninit

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

* add spv-instruction spv-state

* added spv_processor file

* cargo.tomls - bump versions, rm unneccessary deps

* add btc_spv_bin and top lvl workspace entry

* hex_decode util & errors

* add header parsing test

* update dependencies

* rustfmt

* refactor Requests

* fix dependencies/versions

* clippy fixes

* test improvements

* add gitignores

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

* Build/create test net ssh key path

* Rename testnet ssh dir

* Give testnetSSHDir a more generic name

* shellcheck

* favor hardcoded paths over `paths.sh`

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

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

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

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

* Update SUMMARY.md

* Update rent.md

* Update rent.md

* Update rent.md

* Update rent.md

* Update rent.md

* Update rent.md

* Update rent.md

* Update rent.md

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

* Remove solana-validator-info and update docs

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

cleanup

reverse test slot hashes

test check_slots_are_valid

updates

only send the minimum bank vote difference

fixup! only send the minimum bank vote difference

some banks may not have a voting account setup

fixup! votes only need slots and the last bank hash

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

fmt

fixed compare

fixed vote

fixup! fixed vote

poke ci

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

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

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

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

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

* fix cuda stuff

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

* hyphenate interchain

* spv -> SPV

* improve header store explanation

* networks -> platforms

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

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

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

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

* Don't repair earlier than last_root

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

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

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

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

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

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

* More tests for shreds and some fixes

* address review comments

* fixes to code shred generation

* unignore tests

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

* Add test case for u128 memory out of bounds error

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

* add actual test

* bigger timeout

* backout 90 min timeout

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

* bigger timeout

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

* nits

* fixups

* fixups

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

* Snapshot pipefitting through the validator cli

* Add download progress bar

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

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

* Rename the solana-wallet crate to solana-cli

* Rename solana-wallet program to solana

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

This reverts commit 63d62c33c6.

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

This reverts commit 9502082cda.

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

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

* trailing whitespace

* update staking rewards with points and warmup

* update

* Update stake-delegation-and-rewards.md

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

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

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

* old backticks bad!

* Move urlencode() to common.sh

* Make urlencode() vars local

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

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

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

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

* Integrate data shreds with rest of the code base

* address review comments, and some clippy fixes

* Fixes to some tests

* more test fixes

* ignore some local cluster tests

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

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

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

* fixups

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

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

* Update client apis

* Update docs

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

* batch all filters and immediately respond to messages in gossip

* Fix tests

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

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

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

* nits

* move tests to config_tests to eliminate config_api solana_runtime dependency

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

* lint

* re-enable leader_failure_4

* fixups

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

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

This reverts commit 97d57d168b.

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

* Refactor process_blocktree to support process_blocktree_from_root

* Refactor to process blocktree after loading from snapshot

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

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

* integrate stake history into runtime

* fixup core tests

* fixup

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

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

* Remove old env var

* Test that metrics counter is incrementing

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

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

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

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

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

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

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

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

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

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

* update tests

* update capitalization when burning fees

* verify capitalization in fee burn

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

* Update clap validation to check for pubkey|keypair file

* Update helper functions to process pubkey|keypair file

* Add parse pubkey|keypair file test

* Fix vote-account instruction

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

* @sakridge feedback

* Set default high metrics rate for multinode demo

* Fix tests

* Swap defaults and fix env var tests

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

* Add rpc-checks command suggestions

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

* Specify software version to download

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

* Add getSoftwareVersion to doc

* Rename to getVersion and return object

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

* fixes and unit test

* clippy

* review comments, additional tests, and some fixes

* address review comments

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

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

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

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

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

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

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

This reverts commit a81dd80d60.

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

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

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

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

* Add fork stake percentage to dashboard

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

* tests

* clippy

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

* Remove sdk-c from the virtual manifest temporarily

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

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

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

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

* fix stake_state to use stakers_epoch

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

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

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

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

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

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

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

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

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

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

* Remove Default::default

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

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

* Ignore flaky test_leader_failure_4, test_repairman_catchup

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

This reverts commit 7796e87814.

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

substitute for global flag.

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

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

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

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

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

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

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

* Include stake-weighted lockouts in cache

* Add cache test

* Move confidence cache updates to handle_votable_bank

* Prune confidence cache on prune_non_root()

* Spin thread to process aggregate_stake_lockouts

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

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

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

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

* rename deserialize_trade -> deserialize_order

* rename do_order_cancel params

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

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

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

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

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

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

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

* Fix tests, specify sender in ix data

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

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

* debug

* Revert "debug"

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

* debugggin

* debugggin

* debugggin

* debugggin

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

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

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

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

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

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

* Move test-checks.sh back to stable

* update nightly version to 2019-07-19

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

* Add ledger cleanup service

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

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

* Cleanup naming convention

*  Fix balance vs stake yml file logic

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

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

* fixup! cargo fmt

* fixup! cargo clippy

* fixup! Use a more representitive number of accounts

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

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

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

* Add getEpochInfo() RPC method

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

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

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

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

* Add tests

* Fix clippy

* Fix off by one

* Rework to force delete every column

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

* no more OUT_DIR

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

* fixup

* nits

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

* remove redundant check

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

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

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

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

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

* tx_data -> ix_data

* Add LoaderInstruction::InvokeMain

* Add test and allow loaders to be registered statically.

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

* Handle 'get' empty validator-info responses properly

* Improve 'get' argument flow

* Improve arg help text

* Improve 'publish' argument flow

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

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

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

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

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

* Apply review feedback

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

* missed one

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

* Turn on secondary config-local drive for tds net

* Enable long args bypass for GPU machine details

* bypass quoted long arg

* Pull external account file from wget

* typo

* Symlink config-local instead of changing the path variables

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

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

* Refactor commit credits for tests

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

* Restore wrongly deleted lines

* Shellcheck

* add args in the right place dummy

* Fix nits

* typo

* var naming cleanup

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

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

* address review comments

* new constructors for session and coding generator

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

* Add bank test

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

* Add GetProgramAccounts method to solana-client

* Update validator-info args, and add get subcommand

* Update ValidatorInfo lengths

* Add account filter for get --all

* Update testnet participation doc to reflect validator-info

* Flesh out tests

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

* Update bench-exchange: tradeOrder -> Order

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

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

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

* Fix unused imports

* Document new RPC APIs

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

* Correct slicing of blobs

* Mark coding blobs as coding when they're recovered

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

* Mark recovered blobs as present in the index

* Fix indexing error in recovery

* Fix broken tests, and some bug fixes

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

* fixup

* fixup

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

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

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

* Add a broadcast stage that puts bad sizes in blobs

* Resign blob after modifyign size

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

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

* Update install CLI

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

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

* track down create() failure

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

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

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

* Mark bad deserialization as dead fork

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

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

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

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

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

* Ignore unused attribute warning

* Enable parallel run in CI

* Try to fix lograte tests

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

* address review comments

* new local cluster test that uses fake blob broadcast

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

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

* Add test, and fix inconsistencies it exposes

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

* reduce polling frequency for transaction signature confirmation

* adjust wait time for transaction signature confirmation

* fix nominal test

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

* Remove unnecessary logic

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

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

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

* Update credit-only atomic on account load

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

* Commit credit-only credits on bank freeze

* Update core to CreditAccountLocks

* Impl credit-only in System Transfer

* Rework CreditAccountLocks, test, and fix bugs

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

* Only store credits on completed slot

* Check balance in bench_exchange funding to ensure commit_credits has completed

* Add is_debitable info to KeyedAccount meta to pass into programs

* Reinstate CreditOnlyLocks check on lock_account

* Rework CreditAccountLocks to remove strong_count usage

* Add multi-threaded credit-only locks test

* Improve RwLocks usage

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

* Assert lock_accounts race does not happen

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

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

Bring back recyclers and pin offset buffers

* Add packet recycler to streamer

* Add set_pinnable to sigverify vecs to pin them

* Add packets reset test

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

* Add recycler to recv_blobs path.

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

* Predict realloc and unpin beforehand.

* Add helper to reserve and pin

* Cap buffered packets length

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

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

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

* Prevent validators from updating their validations for a segment

* Fix test

* Retain syscall scoping for readability

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

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

* Fix compile error

* Fix clippy errors

* Add helper for creating a connected staked network

* Bug fixes and test groundwork

* Small refactor

* Anatoly's feedback and tests

* Doc updates

* @rob-solana's feedback

* Fix test bug and add log trace

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

* break circular deps

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

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

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

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

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

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

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

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

* rewrite redemption, touch a few other things

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

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

Remove unneeded `Iterator::collect` call

Document erasure module

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

* Filter dead forks from get_slots_since

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

* Mark dead forks in progress instead of removing them

* Fix logging process_entries failures in replay_stage

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

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

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

* some performance metrics

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

* Use seed_len

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

* Plumb switch on broadcast type through validator

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

* Fix bad initializers

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

* review comments

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

* fixup

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

* fixup

* finish rename of MINIMUM_SLOT_LENGTH to MINIMUM_SLOTS_PER_EPOCH

* deterministic miningpool location

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

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

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

* Add program_id to account constraints

* No longer require a signature for the account data witness

* Rename bank::store to store_account

* fmt

* Add a doc

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

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

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

* Change Signable trait to support returning references to signable data

* Add signing to broadcast

* Verify signatures in window_service

* Add testing for signatures to erasure

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

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

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

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

* shellcheck

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

* fixup, rebase

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

* clippy

* fixup

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

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

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

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

* move bpf_loader specification into genesis

* bpf tests to use genesis with bpf

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

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

This reverts commit 69eeb7cf08.

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

This reverts commit 083090817a.

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

* Store credits and pass to accounts_db

* Add InstructionErrors and tests

* Relax account locks for credit-only accounts

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

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

* Functionalize collect_accounts to unit test

* Review comments

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

* shellcheck

* support replicators

* disable airdrops if primordial accounts are used

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

* Don't take the accounts index lock unless needed

* Accounts_index remove insert return vec and add capacity stats

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

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

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

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

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

* Add chacha-sys crate

* Remove chacha feature

* Remove erasure feature

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

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

* Switch to single PoH verify function

* Add EntrySlice verify tests with hashes and txs

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

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

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

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

* Define the stages of the PoRep game

* Add that the stages are really transactions

* Update turn count

* Review comment + clarification

* More clarification

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

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

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

* tighter

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

* Fix nits and shellcheck

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

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

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

* fix clippy warnings

* bug fixes

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

This reverts commit d343c409e6.

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

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

* Impl tick_height syscall and use in storage program

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

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

This reverts commit 81fa69d347.

* keep saved and unsaved copies of status cache

* fix format check

* bench for status cache serialize

* misc cleanup

* remove appendvec storage on purge

* fix accounts restore

* cleanup

* Pass snapshot path as args

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

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

* Remove genesis blockhash from tests

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

* address review comments

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

* Reduce fn argument count

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

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

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

* fix clippy

* fix stable-perf

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

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

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

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

* Setup localtime

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

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

* Reduce repair redundancy to 1 for now

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

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

* s/from_id/from_pubkey/g

* s/node_id/node_pubkey/g

* s/stake_id/stake_pubkey/g

* s/voter_id/voter_pubkey/g

* s/vote_id/vote_pubkey/g

* s/delegate_id/delegate_pubkey/g

* s/account_id/account_pubkey/g

* s/to_id/to_pubkey/g

* s/my_id/my_pubkey/g

* cargo fmt

* s/staker_id/staker_pubkey/g

* s/mining_pool_id/mining_pool_pubkey/g

* s/leader_id/leader_pubkey/g

* cargo fmt

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

* s/FullnodeConfig/ValidatorConfig/g

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

* s/Fullnode/Validator/g

* Add replicator-x.sh

* Rename fullnode.md to validator.md

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

* fixup

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

* Sort keys by is_credit_only within signed/unsigned groupings

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

* Add message helper functions

* Fix test

* Improve comment

* s/is_credit_only/is_debitable

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

* Set gossip port

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

* Add claim-storage-reward wallet command

* Create storage account upfront

* Add storage program to genesis

* Use STORAGE_ACCOUNT_SPACE

* Fix tests

* Add wallet commands to create validator/replicator storage accounts

* Add create_validator_storage_account()

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

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

* more metrics

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

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

* Impl programs in account_keys

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

* Fix test

* Add temporary exchange faucet id

* Update chacha golden

* Split num_credit_only_accounts into separate fields

* Improve readability

* Move message field constants into Message

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

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

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

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

This reverts commit ef0580bd3d.

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

* fixups

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

* Add storage account genesis command to run.sh

* Update airdrop for all validators

* Remove unhelpful Short for arg

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

This reverts commit 55cee5742f.

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

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

* fixup

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

* Fix min => max in banking_stage threads.

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

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

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

* Fix test compile

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

* Clarify variable name

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

* man -> max

* Inline functions with single call site

* Move PohServiceConfig into GenesisBlock

* Add plumbing to enable real PoH on testnets

* Batch hashes to improve PoH hash rate

* Ensure a constant hashes_per_tick

* Remove PohEntry mixin field

* Poh/PohEntry no longer maintains tick_height

* Ensure a constant hashes_per_tick

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

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

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

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

* address review comments

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

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

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

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

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

* switch over to passive stakes

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

* Update discover to report nodes and replicators separately

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

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

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

* Clean up naming

* clippy

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

* Add test

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

* add stake_program to genesis

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

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

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

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

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

* Fixes to mining submission and ledger download

* Add todo over sleep

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

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

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

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

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

Raise limit on submission threshold

Pick nits and add metrics point

fmt

Fixup compiler warning

Cleanup if-else

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

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

* fixups

* clippy

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

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

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

* fix clippy

* load snapshot on start

* regenerate account index from the storage

* Remove rc feature dependency

* cleanup

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

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

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

* clippy

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

* The fullnode identity keypair can now be provided

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

* Add new gossip structure to support Repair

* remove unnecessary clones

* Setup dummy fast repair in repair_service

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

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

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

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

* Add tests for LockedAccountsResults

* Fix broken bench

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

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

* Revert tiny fanout

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

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

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

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

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

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

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

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

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

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

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

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

* Impl check-depth for signature subscriptions

* Impl check-depth for program subscriptions

* Plumb fork id through accounts

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

* Write tests in terms of bank_forks

* Fixup accounts tests

* Add pubsub-confirmations tests

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

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

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

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

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

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

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

* shellcheck

* fixup

* remove unused

* install grcov before setting RUSTFLAGS ;)

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

* cargo fmt

* cargo fmt

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

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

* nudge

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

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

And add bench_tps_fund_keys test.

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

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

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

* Relax sanity node count when validator bootup failure is permitted

* Less sanity for testnet-demo

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

* Fixup headers and pick nits

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

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

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

* Save zone info to config file

* Add geoip whitelist for common data centers

* Skip more of start

* Include -x for config

* Fetch private key from first validator node if necessary

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

* assert root order

* fixup! assert root order

* last root test

* update

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

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

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

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

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

* Check for pre-existing blob before insert

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

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

* Add metric for erasure failures

* add tests to `ErasureMeta` indexing logic

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

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

* Fixup

* Fix shellcheck errors

* More shellcheck and cleanup node creation and deletion

* More shellcheck and cleanup node creation and deletion

* Fixup instance wait API

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

* Include _this_ node in the contact info trace

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

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

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

This reverts commit 4f47fc00bc.

* fix get_exclusive_storage

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

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

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

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

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

* builds

* clippy fmt

* test

* purge dead forks on store

* rm println

* also fixed count_stores

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

* fixup

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

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

* Add transactions_addr method for logging

* Move cluster config outside do_bench_tps

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

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

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

* Pass clients, not constructors

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

This aims to process transactions at least as fast as LocalCluster

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

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

* Update drone/src/drone.rs

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

* Address comments and fix test

* Update core/src/cluster_info.rs

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

* Update core/src/cluster_info.rs

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

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

* update tests to be more rigorous

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

This reverts commit 6a878602f2.

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

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

* Move gen_keypair_file test to a more appropriate location

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

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

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

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

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

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

* remove redundant and aggressive metric submission

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

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

* fix bug that reported the number of erasures incorrectly

* Introduce erasure `Session` for consistent config

* Increase test coverage; fix bugs

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

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

* Remove unused functions in blocktree

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

* Add unit test for ErasureMeta index handling

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

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

* Updates around the code base to support instruction_processors rename

* Kabab instruction_processors

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

* Update Cargo.toml to use instruction-processors

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

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

* Use a large stake for net/ fullnodes

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

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

* cleanup

* checks

* comments

* clippy

* tests

* woot!

* comments

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

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-16 06:49:02 -07:00
Michael Vines
c67cc694ae Remove stake from ./net sanity ephemeral validator (#3797) 2019-04-15 21:42:25 -07:00
Michael Vines
d77359914f Log the spy node id by default for better debug (#3796) 2019-04-15 20:58:37 -07:00
Michael Vines
9293a54234 Remove stray + 2019-04-15 20:28:11 -07:00
Michael Vines
d9983905b3 Cargo.lock 2019-04-15 20:28:07 -07:00
Michael Vines
3dc47a46d5 Revert "Revert "disable staking of blockstreamer node""
This reverts commit 03da63b41b.
2019-04-15 20:11:00 -07:00
Dan Albert
8638b3bb19 Update Cargo.toml files for version = 0.14.0 2019-04-16 02:50:20 +00:00
Pankaj Garg
819a0c5c7e Update testnet automation script to reflect changes in metrics (#3779) 2019-04-15 18:56:04 -07:00
Dan Albert
7afd8644b3 Clarify release instructions (#3792) 2019-04-15 19:05:15 -06:00
anatoly yakovenko
68fc303b9b Rework Accounts for fast squash, hashing state and checkpoint recovery. (#3613)
* accounts rewrite

* ignore grow tests

* skip duplicate roots

* allow for a root race

* logger

* accounts_index tests

* tests

* tests
2019-04-15 17:15:50 -07:00
sakridge
2bbed7727f Wait a bit for the funding transactions to go through (#3788) 2019-04-15 16:30:00 -07:00
Michael Vines
63b1fd3675 Correctly fill out IP address for rpc ports (#3791) 2019-04-15 16:21:06 -07:00
Sagar Dhawan
3fcf03ff3e Refactor LocalCluster and add support for listener nodes (#3790) 2019-04-15 15:27:45 -07:00
Greg Fitzgerald
80f3568062 Upgrade to Rust 1.34.0 (#3781)
* Upgrade to Rust 1.34.0

* Remove redundant closures

Thanks Clippy!
2019-04-15 15:56:08 -06:00
Greg Fitzgerald
3e1214a871 Don't add reviewers to draft PRs (#3780) 2019-04-15 15:03:44 -06:00
Michael Vines
149d809e86 Minor cli help cleanup (#3786) 2019-04-15 13:36:14 -07:00
dependabot[bot]
784dbb00ab Bump reqwest from 0.9.14 to 0.9.15 (#3785)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.14 to 0.9.15.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.14...v0.9.15)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-15 13:31:33 -07:00
Michael Vines
87aef92e71 Fix up bash array handling (#3771) 2019-04-15 13:25:44 -07:00
Michael Vines
d026ebb83a Use tvu_peers() since validators no longer run an RPC port by default (#3784) 2019-04-15 13:25:09 -07:00
Rob Walker
64c6f05da2 persist set_root() and use it in blocktree_processor to limit squashes (#3782)
* rename locktower's slot to epoch

* persist set_root() and use it in blocktree_processor to limit squashes
2019-04-15 13:12:28 -07:00
dependabot[bot]
8963500aa8 Bump generic-array from 0.12.0 to 0.13.0
Bumps [generic-array](https://github.com/fizyk20/generic-array) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/fizyk20/generic-array/releases)
- [Changelog](https://github.com/fizyk20/generic-array/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fizyk20/generic-array/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-15 12:35:06 -06:00
dependabot[bot]
175c0090de Bump hashbrown from 0.2.0 to 0.2.1
Bumps [hashbrown](https://github.com/Amanieu/hashbrown) from 0.2.0 to 0.2.1.
- [Release notes](https://github.com/Amanieu/hashbrown/releases)
- [Changelog](https://github.com/Amanieu/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/hashbrown/compare/v0.2.0...v0.2.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-15 12:18:44 -06:00
Rob Walker
5c4689a326 rename locktower's slot to epoch (#3776) 2019-04-15 10:46:14 -07:00
Michael Vines
5e2831f09e Disable cluster restart attempt 2019-04-15 09:59:53 -07:00
Michael Vines
666882fbbd -r does not require an argument 2019-04-15 09:40:34 -07:00
Michael Vines
6c9fba058b Reenable validator sanity check for testnet-{beta,edge} 2019-04-15 08:58:29 -07:00
Michael Vines
0767c0c07f Add DNS resolution to cli tools 2019-04-14 21:25:46 -07:00
Rob Walker
6859907df9 more rigorous erasure constants, comments (#3766)
* more rigorous erasure constants, comments

* new header size means new golden
2019-04-14 21:10:09 -07:00
Rob Walker
de52747950 remove max_tick_height replicode (#3765) 2019-04-14 19:15:31 -07:00
Rob Walker
bd1db51e07 delete db_window.rs, move contents to window_service, clean up process_blobs (#3746) 2019-04-14 18:52:05 -07:00
Rob Walker
dd005fb50e fix broadcast to *always* call erasure generation, simplify generator, test slot reset better (#3764) 2019-04-14 18:12:37 -07:00
Rob Walker
542bafeb71 groom packet.rs, add blob.data alignment (#3763) 2019-04-14 17:30:08 -07:00
Rob Walker
e57a0ab05d test some bits (#3762) 2019-04-14 17:10:30 -07:00
Pankaj Garg
2c745ce108 Shorten recv wait when there are buffered packets in banking stage (#3757)
- packets are buffered on leader rotation, when the next leader is
  unknown
- shortening the wait allows the banking stage to poll for next
  leader more frequently
2019-04-14 12:34:07 -07:00
Michael Vines
f6aa90e193 Add fullnode --dynamic-port-range option 2019-04-14 07:08:29 -07:00
Michael Vines
c7a7d6db84 Use |solana-keygen pubkey| instead of |solana-wallet address|
Same end result but solana-keygen is a smaller program that builds
faster
2019-04-14 07:08:29 -07:00
Michael Vines
2277a39dd2 Default solana-gossip log-level to 'info' 2019-04-14 07:07:15 -07:00
Pankaj Garg
ee35ed5250 Refactored buffered packet forwarding code (#3750)
- Added unit tests
- Don't consume packets if bank is not known
2019-04-13 23:19:54 -07:00
Stephen Akridge
92b5e131fe Name sigverify threads 2019-04-13 11:24:36 -07:00
Michael Vines
1f35779821 Add solana-install usage info 2019-04-12 17:08:18 -07:00
Michael Vines
5b438d917d Create fullnode-x.sh wrapper script for use with |solana-install run ...| 2019-04-12 17:08:18 -07:00
Michael Vines
bf4d5745c9 Symlink the entire release to preserve relative paths from bin/ 2019-04-12 17:08:18 -07:00
Sagar Dhawan
1e8f83a74a Use a better name for new api 2019-04-12 14:58:22 -07:00
Sagar Dhawan
1db80d79fc Update get recent blockhashes to return confirmed blockhashes only 2019-04-12 14:58:22 -07:00
Stephen Akridge
1dac4c33b8 Change sigverify counter from entries to packets
batch or entries kind of useless since it can have some
variable number of packets
2019-04-12 13:19:46 -07:00
Rob Walker
656b3139e3 see perf-libs all the time (#3748) 2019-04-12 08:38:14 -07:00
anatoly yakovenko
8b08fe265a AppendVec PR with using "/tmp" as the default directory and a random file (#3743)
* AppendVec with raw pointers
* fixed test target directory
2019-04-12 04:30:17 -07:00
Michael Vines
29dc139a22 shellcheck 2019-04-11 17:39:04 -07:00
Pankaj Garg
44ebfa736a Don't forward buffered packet to the same node (#3712)
- instead, process the packets
2019-04-11 17:23:45 -07:00
Pankaj Garg
b001685e7b Added missing feature flag for erasure (#3741) 2019-04-11 15:25:32 -07:00
Rob Walker
ca6290b117 remove wallet stuff, bootstrap node is already staked (#3744) 2019-04-11 15:16:38 -07:00
Rob Walker
767e0a201e stak*->vote (#3740) 2019-04-11 14:52:56 -07:00
Sagar Dhawan
877ec08280 Send recent votes in Vote Transactions (#3734) 2019-04-11 14:48:36 -07:00
Greg Fitzgerald
485013b7ce Revert "AppendVecs that can return references and read/append without locks (#3713)"
This reverts commit f669ae5868.
2019-04-11 14:47:30 -07:00
Rob Walker
efd19b07e7 implement erasure-based recovery inside blocktree (#3739)
* implement recover in blocktree

* erasures metric

* erasure metrics only

* fixup
2019-04-11 14:14:57 -07:00
Tyera Eulberg
d31989f878 CustomError from Vec->u32 2019-04-11 13:59:48 -07:00
anatoly yakovenko
f669ae5868 AppendVecs that can return references and read/append without locks (#3713)
* AppendVec with raw pointers

* appendvecs

* imports

* review

* review comments

* clippy
2019-04-11 13:16:56 -07:00
Greg Fitzgerald
a28c3b0e9a Consume Bank in BankClient
This will allow BankClient to spin up a thread to use the Bank.
It'll also ease the transaction from BankClient to ThinClient since
it won't let you depend on Bank.

Drawback, you the transition from Bank to BankClient will be harder
because the Bank methods are inaccessible.
2019-04-11 12:16:33 -07:00
Michael Vines
0aa05158c9 Adjust noop/failure program names to be consistent with all other programs 2019-04-11 11:59:56 -07:00
carllin
787dc5748a Fixed DuplicateSigs (#3727)
* Fixed DuplicateSigs by not recording errors in signature cache of bank
2019-04-11 11:51:34 -07:00
Greg Fitzgerald
8ada4bfd1f Remove test now covered by Vote crate 2019-04-11 10:53:11 -07:00
Greg Fitzgerald
5d4624e75f Use Bank::add_instruction_processor to bypass manual build step 2019-04-11 10:53:11 -07:00
Michael Vines
2f1b0bf4f5 Add solana-install deployments to the testnets 2019-04-11 10:03:35 -07:00
Rob Walker
e1d5bb1a26 add redundant broadcast (#3724)
* add redundant broadcast

* crank up to full redundancy

* Update broadcast_stage.rs

* Update broadcast_stage.rs

* Update broadcast_stage.rs

* Update broadcast_stage.rs
2019-04-11 09:15:17 -07:00
Jack May
d0f46d6a8a Cleanup client traits and create super trait (#3728) 2019-04-11 00:25:14 -07:00
Rob Walker
4b6c0198ad reset coding generator on slot boundaries (#3726) 2019-04-10 18:18:55 -07:00
Rob Walker
f1e7237c09 vote_api cleanup (#3710)
* vote_api cleanup

* fixups

* fixup

* remove unused code

* revert removal of serialize and deserialize

* ...

* increase coverage, bootstrap staking

* Sagar's STAKE to my VOTE
2019-04-10 17:52:47 -07:00
Sagar Dhawan
1b5845ac3e Fix getting votes from gossip (#3723) 2019-04-10 17:16:08 -07:00
Rob Walker
58a049ebe5 pick up logs as artifacts (#3721) 2019-04-10 17:05:39 -07:00
Sagar Dhawan
c0808d01f8 Add tests 2019-04-10 15:51:00 -07:00
Sagar Dhawan
7fd5e51168 Make sure bank 0 is votable and correctly designate signer 2019-04-10 15:51:00 -07:00
Sagar Dhawan
d2ea782372 Always use bootstrap vote account for leader 2019-04-10 15:51:00 -07:00
Dan Albert
e6f02d1a10 Use latest release for testnet doc (#3711)
* Use latest release for testnet doc

* Clean up markdown
2019-04-10 15:01:37 -07:00
Greg Fitzgerald
894135a084 Less pub in PohRecorder 2019-04-10 12:50:45 -07:00
Michael Vines
df9cf92782 testnet-participation.md is now /implemented/ 2019-04-10 12:26:47 -07:00
Michael Vines
f243a96e01 Remove testnet/metrics server debug info from book 2019-04-10 12:26:47 -07:00
Michael Vines
842d146b0d Limit USE_INSTALL scope 2019-04-10 11:50:23 -07:00
Pankaj Garg
81d43c57a2 Add missing feature flags to gossip (#3708) 2019-04-10 06:52:46 -07:00
Pankaj Garg
7da4142d33 Process votes from gossip only in leader node (#3707) 2019-04-09 22:06:32 -07:00
Michael Vines
88e5b14afc Exit faster on sanity failures 2019-04-09 17:16:15 -07:00
Michael Vines
0b95a5c121 Include blockstreamer node in sanity 2019-04-09 16:52:57 -07:00
dependabot[bot]
62c28a8592 Bump reqwest from 0.9.13 to 0.9.14
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.13 to 0.9.14.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.13...v0.9.14)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-09 16:22:17 -07:00
Pankaj Garg
b80c6840da Metrics dashboard publish script updates for influx cloud 2019-04-09 15:44:01 -07:00
carllin
003fd6545c Logging for unexpected validator errors (#3697) 2019-04-09 15:05:43 -07:00
Pankaj Garg
393ed978d1 Update testnet monitor to use influx cloud end point (#3700) 2019-04-09 14:56:21 -07:00
Stephen Akridge
2c93062f54 Improve banking_stage performance messages
Use transaction count instead of batch count,
and set the recv_start from when we finished processing
the previous batch to get a more accurate number.
2019-04-09 14:54:12 -07:00
Sathish
7b2abf2087 Update count for the right store (#3683) 2019-04-09 13:48:13 -07:00
Dan Albert
a5254a3f7a Add TESTNET_TAG Env var to buildkite (#3692)
* Add TESTNET_TAG Env var to buildkite
2019-04-09 13:00:45 -07:00
Pankaj Garg
dc6c34da5d Fast-track vote signature verification and processing (#3695) 2019-04-09 12:57:12 -07:00
carllin
d4eebcc2aa Check for frozen in confirm_forks (#3678) 2019-04-09 11:45:38 -07:00
carllin
4f232cbc27 Make MAX_RECENT_BLOCKHASHES <= MAX_HASH_AGE_IN_SECONDS (#3679)
* Make MAX_RECENT_BLOCKHASHES == MAX_HASH_AGE_IN_SECONDS
2019-04-09 11:45:25 -07:00
Stephen Akridge
76e524ae48 Remove check for 0 additional nodes
Network with 1 leader is valid.
2019-04-09 11:16:55 -07:00
Michael Vines
6ac919c71a Set warn log level only for perf testnets 2019-04-09 11:09:16 -07:00
Michael Vines
1ba4806f8c Document recent -z and -x command-line arg changes 2019-04-09 10:39:55 -07:00
Stephen Akridge
20a2c59b70 Reduce udp read/write buffer sizes
With 18.04, these large values cause packet errors and mess up the system.
2019-04-08 15:21:45 -07:00
Stephen Akridge
6540fa9121 Add sleep for check_signature 2019-04-08 15:09:02 -07:00
dependabot[bot]
21287ba554 Bump clap from 2.32.0 to 2.33.0
Bumps [clap](https://github.com/clap-rs/clap) from 2.32.0 to 2.33.0.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-08 12:56:44 -07:00
dependabot[bot]
7295a84d69 Bump bincode from 1.1.2 to 1.1.3 (#3672)
Bumps [bincode](https://github.com/TyOverby/bincode) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/TyOverby/bincode/releases)
- [Commits](https://github.com/TyOverby/bincode/compare/v1.1.2...v1.1.3)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-08 12:55:18 -07:00
carllin
483cc2fa4e Support old repair strategy for reparing slots in a range for supporting replicators (#3665) 2019-04-08 12:46:23 -07:00
Jack May
e551f6b552 Support settable drone lamport cap (#3675) 2019-04-08 12:37:01 -07:00
Jack May
44b391096d Configurable local cluster native processors (#3676) 2019-04-08 11:15:58 -07:00
Michael Vines
d45d8e9670 s/credit/read/ 2019-04-08 08:39:59 -07:00
Rob Walker
88bda58836 remove unused (#3674) 2019-04-08 04:50:42 -07:00
Rob Walker
79bf3cf70d add rewards math (#3673)
* add rewards math

* fixup
2019-04-07 21:45:28 -07:00
Pankaj Garg
72b7419e1c Define list of valid cloud regions for GCE and AWS (#3670) 2019-04-07 14:29:09 -07:00
Pankaj Garg
7baff0920c Propagate cloud env variables to buildkite job 2019-04-07 11:48:25 -07:00
Pankaj Garg
d9ecc278b4 Configure cloud zones and nodes from buildkite for beta testnet (#3666) 2019-04-07 08:25:34 -07:00
Pankaj Garg
0904df327d Parallelize cloud node deployment commands in case of multiple zones (#3657) 2019-04-07 08:13:48 -07:00
carllin
444e87f888 Fix metric (#3664) 2019-04-06 21:57:01 -07:00
carllin
20aa4434e2 Fix repair (#3581)
Add DetachedHeads repair protocol

Add DetachedHeads repair test

Repair starting from root
2019-04-06 19:41:22 -07:00
Pankaj Garg
03da63b41b Revert "disable staking of blockstreamer node"
This reverts commit 42d8a7d9e7.
2019-04-06 08:57:06 -07:00
Greg Fitzgerald
878a842611 Move append_vec bench to the crate with append_vec (#3650)
* Move append_vec bench to the crate with append_vec

* Use black_box to tell the compiler not to optimize away test data

```
pub fn black_box<T>(dummy: T) -> T {
    unsafe {
        let ret = std::ptr::read_volatile(&dummy);
        std::mem::forget(dummy);
        ret
    }
}
```

* Revert "Use black_box to tell the compiler not to optimize away test data"

This reverts commit 5610b8ee95.

* Use black_box to tell the compiler not to optimize away test data

* Create bench directories
2019-04-06 07:18:56 -06:00
Carl
f3eda38b65 Fix broken lockout doubling 2019-04-05 23:15:46 -07:00
Tyera Eulberg
68e21911eb Remove redundant transfer_signed 2019-04-05 22:04:32 -07:00
Tyera Eulberg
95cc36af96 Impl SyncClient and AsyncClient for ThinClient 2019-04-05 22:04:32 -07:00
Tyera Eulberg
d3c4e4f7b3 Update docs 2019-04-05 22:09:29 -06:00
Tyera Eulberg
4068612300 Remove RpcSignatureStatus 2019-04-05 22:09:29 -06:00
Tyera Eulberg
f349c1f0dc Get everything off RpcSignatureStatus 2019-04-05 22:09:29 -06:00
Tyera Eulberg
90c1300bb6 Plumb TransactionError through Rpc 2019-04-05 22:09:29 -06:00
Tyera Eulberg
569a289a6f Cargo.lock, serde_derive 2019-04-05 22:09:29 -06:00
Pankaj Garg
89efe67e73 Fix the ordering of beta testnet zones 2019-04-05 17:53:31 -07:00
Greg Fitzgerald
c3654b0f65 Add sdk benches to ci
And add `-a` to `tee` for more reliable copypasta.
2019-04-05 17:58:11 -06:00
Sagar Dhawan
f5f4434e0a Remove unnecessary lock in sigverify 2019-04-05 16:57:45 -07:00
Rob Walker
d30049b8eb test for debit of TX fees on full process_transaction() (#3643)
* fix double debit of TX fees

* add test that fails when removing that line

* put that line back in

* comments
2019-04-05 16:55:58 -07:00
Pankaj Garg
42d8a7d9e7 disable staking of blockstreamer node
- this will stop it from entering leader rotation schedule
2019-04-05 16:48:52 -07:00
Sagar Dhawan
adcda3c715 Remove airdrop dependency from replicators 2019-04-05 16:11:39 -07:00
Rob Walker
a5b5248a09 move vote_accounts up (#3647) 2019-04-05 14:23:00 -07:00
Dan Albert
3fcca5bc0a Suppress shellcheck array expansion warnings 2019-04-05 13:25:14 -07:00
Dan Albert
9d4c6f6aaa Appease shellcheck 2019-04-05 13:25:14 -07:00
Dan Albert
d570b08134 Clean up array expansion 2019-04-05 13:25:14 -07:00
Dan Albert
8b6d7129f3 Fix option flag lettering 2019-04-05 13:25:14 -07:00
Dan Albert
50444181c5 Fix arg array ordering and rename network-name option 2019-04-05 13:25:14 -07:00
Dan Albert
0c51f156ae Reverse order of zone arg array building 2019-04-05 13:25:14 -07:00
Dan Albert
fe2fb40d88 Add multi-region deploy functionality 2019-04-05 13:25:14 -07:00
Dan Albert
9ba0439593 Add multi-region deploy functionality 2019-04-05 13:25:14 -07:00
Pankaj Garg
b33a1fa019 Fix clippy errors 2019-04-05 12:22:10 -07:00
Pankaj Garg
63fd4222aa Fix testnet sanity check for beta testnet 2019-04-05 12:22:10 -07:00
Tyera Eulberg
ef5df6f3fe Add server specification 2019-04-05 11:44:57 -07:00
Tyera Eulberg
2f90f9fbd4 Version all jsonrpc crates, in core too 2019-04-05 11:44:57 -07:00
dependabot[bot]
12b099ea78 Bump jsonrpc-core from 10.1.0 to 11.0.0
Bumps [jsonrpc-core](https://github.com/paritytech/jsonrpc) from 10.1.0 to 11.0.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-05 11:44:57 -07:00
Rob Walker
9f046a023e move transaction_count up (#3618)
* move transaction_count up

* fixup
2019-04-05 10:42:25 -07:00
Greg Fitzgerald
46e6911ec1 Add get_signature_status() to SyncClient
And move bank::Result to transaction module.
2019-04-05 10:22:05 -07:00
Greg Fitzgerald
d3844ef32a Add AsyncClient 2019-04-05 10:22:05 -07:00
Greg Fitzgerald
4507dca342 Boot exchange_transaction. No tests depend on it. 2019-04-05 11:10:57 -06:00
Pankaj Garg
c2fdd1362a bump release version in testnet participation document 2019-04-05 08:30:42 -07:00
carllin
4ea19b90a4 Fix update_ancestor_stakes in locktower (#3631)
* Fix update_ancestor_stakes in locktower

* Add test for vote threshold
2019-04-05 03:05:31 -07:00
Pankaj Garg
9cd555cad5 AWS script change for additional zones and regions 2019-04-04 15:59:59 -07:00
Pankaj Garg
ed78c8d3bb Fix beta testnet launch script 2019-04-04 15:16:01 -07:00
Sagar Dhawan
0b23af324b Refactor Storage Program (#3622)
* Refactor Storage Program

* Replace KeyedAccount trait with StorageAccount struct

* Implement State for Account, not StorageAccount

* Make State trait more generic

* Move validation check into function
2019-04-04 12:01:09 -07:00
Greg Fitzgerald
1598a02a7a Wrap all client errors with TransportError 2019-04-04 12:00:19 -06:00
Greg Fitzgerald
167f5bdc58 Add get_balance() and get_account_data() to SyncClient
Migrate tests to use them.
2019-04-04 12:00:19 -06:00
Greg Fitzgerald
5cd7bccdf3 Add SyncClient and use from BankClient 2019-04-04 12:00:19 -06:00
Tyera Eulberg
acbc261891 Add gossip to build script, and fix bash strings 2019-04-04 00:18:48 -07:00
dependabot[bot]
f97f0c4758 Bump serde_derive from 1.0.89 to 1.0.90
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.89 to 1.0.90.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.89...v1.0.90)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-03 19:54:50 -07:00
dependabot[bot]
e6ac5bc546 Bump serde from 1.0.89 to 1.0.90
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.89 to 1.0.90.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.89...v1.0.90)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-03 20:26:48 -06:00
Pankaj Garg
ef1e5db0ee Force delete all beta testnet nodes before restarting them 2019-04-03 17:58:54 -07:00
Sagar Dhawan
5cdfd79e96 Replace print with debug 2019-04-03 16:23:02 -07:00
Sagar Dhawan
b441bac7b2 Add separate Struct for Replicator submissions 2019-04-03 16:23:02 -07:00
Sagar Dhawan
00cb52c444 Update Storage Program to support multiple accounts 2019-04-03 16:23:02 -07:00
Jack May
9323a3e257 Use keyed_account index names (#3555) 2019-04-03 15:57:26 -07:00
Greg Fitzgerald
35298e01a8 Remove Instruction wrapper structs and name functions after enum fields 2019-04-03 13:34:27 -07:00
Greg Fitzgerald
867f6f107b Rename SystemInstruction::Move to SystemInstruction::Transfer 2019-04-03 08:35:57 -06:00
Greg Fitzgerald
43bb813cbe Rename 'new_account' to 'new_user_account'
And 'new_program_account' to 'new_account'
2019-04-02 21:24:42 -06:00
dependabot[bot]
7b82e96467 Bump libc from 0.2.50 to 0.2.51 (#3554)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.50 to 0.2.51.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.50...0.2.51)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-02 20:32:35 -05:00
Greg Fitzgerald
978ff87b76 Fix potential storage bug
The previous code was assuming the instruction index and the
program_id index were the same. That's always true for
single-instruction transactions, but not for multiples.
2019-04-02 19:00:35 -06:00
Greg Fitzgerald
4c0bc1fd88 Add program_ids() methods
Added CompiledInstruction::program_id() so that we don't need to pass
around instruction indexes just for Message::program_id().

Also added Message.program_ids() that returns a slice so that we
can move those pubkeys into Message::account_keys.
2019-04-02 19:00:35 -06:00
Jack May
025b4f90de Pre-populate tokens (#3605) 2019-04-02 16:50:53 -07:00
Greg Fitzgerald
20189c5d45 Bump hashbrown to 0.2.0 2019-04-02 16:37:21 -06:00
Pankaj Garg
2e4acba579 Remove second block streamer from testnet beta 2019-04-02 15:15:11 -07:00
Mark E. Sinclair
d90b8c331d Refactor blocktree storage abstraction (#3588) 2019-04-02 16:58:07 -05:00
Pankaj Garg
efbb49d579 Don't use external node ssh key if one is not configured 2019-04-02 14:20:00 -07:00
dependabot[bot]
f0079cd7b3 Bump hashbrown from 0.1.8 to 0.2.0
Bumps [hashbrown](https://github.com/Amanieu/hashbrown) from 0.1.8 to 0.2.0.
- [Release notes](https://github.com/Amanieu/hashbrown/releases)
- [Changelog](https://github.com/Amanieu/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/hashbrown/compare/v0.1.8...v0.2.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-02 13:45:49 -06:00
Greg Fitzgerald
a0041cec97 Rename Runtime to MessageProcessor 2019-04-02 12:49:26 -06:00
Pankaj Garg
77bb9e7ffc Fix the release number in testnet participation document 2019-04-02 11:26:54 -07:00
Pankaj Garg
f441177840 Deploy beta testnet with 100 nodes across AWS and GCP 2019-04-02 11:21:57 -07:00
Sagar Dhawan
cd634801a2 Re-enable test but remove replicators from config 2019-04-02 10:38:30 -07:00
Sagar Dhawan
5f10a87dec Ignore Flaky Local Cluster test 2019-04-02 10:56:29 -06:00
Greg Fitzgerald
fa1c1e3734 Rename native programs to native instruction processors 2019-04-02 10:36:19 -06:00
Greg Fitzgerald
947cdd8748 Rename system_program to system_instrution_processor 2019-04-02 10:36:19 -06:00
Greg Fitzgerald
0a9f063d3e Rename native_program.rs to instruction_processor_utils.rs
Prefer the term "instruction processor" over "program". Reserve
the term "native" for the loader and shared object it loads.
Compiling an instruction processor to BPF shouldn't imply changing
to a non-native entrypoint.
2019-04-02 10:36:19 -06:00
Greg Fitzgerald
dd4c512954 Rename Wallet's id to keypair 2019-04-02 07:38:28 -06:00
carllin
d228b6467c Implement finalizer so that all locked accounts are dropped (#3585)
* Implement finalizer so that all locked accounts are dropped when finalizer goes out of scope

* Add test for tx error with lock conflict

* Fix double unlock from destructor running after a call to unlock
2019-04-02 03:55:42 -07:00
Tyera Eulberg
92c66a411b Remove bench-tps converge-only 2019-04-01 23:05:25 -06:00
Tyera Eulberg
af97ad3d68 Add solana-gossip module 2019-04-01 23:05:25 -06:00
Tyera Eulberg
6ff2a0a75e Rework discover to handle additional parameters, and be unit-testable 2019-04-01 23:05:25 -06:00
dependabot[bot]
5b7d5e2e02 Bump reqwest from 0.9.12 to 0.9.13
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.12 to 0.9.13.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.12...v0.9.13)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-01 20:34:08 -06:00
Pankaj Garg
97bd7a00f1 Support for configuring testnet nodes across multiple cloud services 2019-04-01 17:11:41 -07:00
Rob Walker
25a2f08f8d add passive staking and rewards (#3579)
* add stake stuff

* more generic

* test decode bail cases

* favor early returns
2019-04-01 16:45:53 -07:00
Sathish Ambley
3152090a66 update with review comments 2019-04-01 15:54:53 -06:00
Sathish Ambley
9a0f9b910e add bench tests for squash operations 2019-04-01 15:54:53 -06:00
Sathish Ambley
f853c39169 remove unused member 2019-04-01 15:54:53 -06:00
Sathish Ambley
75ad1305c0 Cache vote accounts and optimize squash 2019-04-01 15:54:53 -06:00
Pankaj Garg
cb3adea94f Increase node count in beta testnet 2019-04-01 11:06:24 -07:00
Greg Fitzgerald
fcef54d062 Add a constructor to generate random pubkeys 2019-03-31 16:23:18 -06:00
Greg Fitzgerald
32683cac7c Move markdown into book 2019-03-31 16:23:06 -06:00
Greg Fitzgerald
15947b8642 Congestion stats, take 3 2019-03-31 16:23:06 -06:00
Greg Fitzgerald
4e0316f792 Apply review feedback 2019-03-31 16:23:06 -06:00
Greg Fitzgerald
9594b7fdce Use stake-weighted congestion statistics 2019-03-31 16:23:06 -06:00
Greg Fitzgerald
1adf8355f2 Add design proposal for deterministic transaction fees 2019-03-31 16:23:06 -06:00
carllin
8660c3581e Add squashing metrics (#3573) 2019-03-29 21:21:59 -07:00
carllin
f886b3b12b Fix resetting PohRecorder to wrong bank (#3553)
* Check whether future slot already has transmission
2019-03-29 20:00:36 -07:00
Greg Fitzgerald
5646daa820 Delete lots of fee parameters
So many zeros!
2019-03-29 19:21:51 -06:00
Greg Fitzgerald
7896e8288d Replace Transaction::fee with a FeeCalculator 2019-03-29 19:21:51 -06:00
carllin
9369ea86ea Track detached slots in blocktree (#3536)
* Add contains_all_parents flag to SlotMeta to prep for tracking detached heads

* Add new DetachedHeads column family

* Remove has_complete_parents

* Fix test
2019-03-29 16:07:24 -07:00
carllin
dee5ede16d Get rid of unnecessary frozen banks (#3572) 2019-03-29 16:06:48 -07:00
Greg Fitzgerald
3b516c0710 Fix build 2019-03-29 14:56:29 -06:00
Stephen Akridge
0887832b00 Early exit if buffered packets is empty 2019-03-29 13:40:07 -07:00
Greg Fitzgerald
8e04fadb05 Cleanup magic numbers
Rename `num_signatures` to `num_required_signatures` to
disambiguate it from `tx.signatures.len()`.
2019-03-29 13:03:29 -07:00
Greg Fitzgerald
31f8b6d352 Integrate Message into Transaction 2019-03-29 13:03:29 -07:00
Greg Fitzgerald
98d60e6124 Expose a method for getting the Message from a Transaction
This currently constructs the message, but when message
is integrated, it can return a `&Message`.
2019-03-29 13:03:29 -07:00
Pankaj Garg
fc678f53ba Send metrics data to the correct/configured database host 2019-03-29 12:14:15 -07:00
Pankaj Garg
8e25c39564 fix formatting of numbered list 2019-03-29 11:46:21 -07:00
Pankaj Garg
78ab79c322 fix build failure 2019-03-29 11:46:21 -07:00
Pankaj Garg
052fc9b74f Information on how to debug testnet issues 2019-03-29 11:46:21 -07:00
Tyera Eulberg
f482c9ab61 Functionalize tx serialization; make testing more explicit 2019-03-29 11:31:46 -06:00
Tyera Eulberg
75dcd97f5f Update test to deserialize txs 2019-03-29 11:31:46 -06:00
Tyera Eulberg
4776dc36ab Map entry txs to serialized txs in blockstream 2019-03-29 11:31:46 -06:00
anatoly yakovenko
10239c3b3c Replace recursive status cache with a single global fast status cache (#3541)
Fast Status Cache
2019-03-29 10:03:55 -07:00
Greg Fitzgerald
753d0dcabe Fix the cuda build
And add a test to check the condition that the cuda tests are
exercising.
2019-03-29 08:25:56 -06:00
Greg Fitzgerald
b708998d9d Fix chacha build 2019-03-29 08:25:56 -06:00
Greg Fitzgerald
3759b0d2a5 Fix Blockstreamer test 2019-03-29 08:25:56 -06:00
Greg Fitzgerald
c4bc710d3a Use Serde's with attribute to shorten length encodings in Transaction 2019-03-29 08:25:56 -06:00
Sathish Ambley
857dc2ba47 Remove custom serialization 2019-03-29 08:25:56 -06:00
Stephen Akridge
981e057363 Just test features in core 2019-03-28 21:40:52 -07:00
Tyera Eulberg
37494c67d0 Add pubkey read/write tools
Co-authored-by: Tyera Eulberg <tyera@solana.com>
Co-authored-by: Tristan Debrunner <tristan@solana.com>
2019-03-28 20:04:32 -06:00
Greg Fitzgerald
7a81f327ce Add sigverify tests 2019-03-28 19:42:11 -06:00
Tyera Eulberg
845ddc3496 Fixup wallet-sanity to match new balance string 2019-03-28 16:56:27 -07:00
Sagar Dhawan
c61bb16fdf Fix manifest path for cargo commands (#3549) 2019-03-28 15:56:08 -07:00
Pankaj Garg
15b945a652 Fix EC2 scripts for blockstream startup 2019-03-28 15:37:23 -07:00
Pankaj Garg
1d48c4dd45 enable leader rotation in beta testnet 2019-03-28 13:44:44 -07:00
Greg Fitzgerald
2ab50cbae8 Move untested code out of SDK
verify_signature() was only used in a test that was testing
binary layout. It only worked because the test transaction only
had one signature.

from() was only used by verify_signature() and that's something
we'd typically called `pubkey()`.

hash() didn't return the hash of the Transaction, as you might
guess. It's only used for PoH, so move it into Entry.
2019-03-28 14:24:59 -06:00
Stephen Akridge
0482f153d0 Lower a bunch of debug
Can't afford to be printing on every transaction error, it will slow
the system down.
2019-03-28 12:24:47 -07:00
Jack May
92e1c4c531 Report which account is in use (#3539) 2019-03-28 08:17:49 -07:00
Greg Fitzgerald
4bca60861e Specialize GenericInstruction 2019-03-28 05:45:46 -06:00
Mark E. Sinclair
50b0a5ae83 Blocktree+Erasure tests of basic erasure functionality (#3535)
* Remove WindowSlot; add Blocktree based tests to erasure
2019-03-28 01:55:51 -05:00
Jack May
c30eb6185c Enable logging in exchange program (#3538) 2019-03-27 23:02:05 -07:00
Pankaj Garg
a94bc80383 fix clippy errors 2019-03-27 18:05:17 -07:00
Pankaj Garg
586b6fc3d7 review comments 2019-03-27 18:05:17 -07:00
Pankaj Garg
a14c202d60 fix the ip address that's stored in the config file 2019-03-27 18:05:17 -07:00
Pankaj Garg
ed48c495a3 fix shell-check errors 2019-03-27 18:05:17 -07:00
Pankaj Garg
f0abd06a46 Added support for multi-region cloud testnet 2019-03-27 18:05:17 -07:00
Sagar Dhawan
7d0ff8e713 Re-enable Replicator test (#3534) 2019-03-27 17:21:49 -07:00
Sagar Dhawan
e8cc566b2b Storage Account setup for replicators and validators (#3516)
* Setup Storage Accounts for replicators

* Setup Storage Accounts for validators

* Add Replicator Info to Local Cluster and Add test
2019-03-27 15:54:09 -07:00
Anatoly Yakovenko
e45f7afd85 use the right id for delegate id 2019-03-27 15:04:09 -07:00
Greg Fitzgerald
054ae3a3e3 Document current transaction size awkwardness 2019-03-27 14:27:20 -06:00
Sagar Dhawan
36ea088387 Fix Storage Stage not receiving entries when node is leader (#3528) 2019-03-27 13:10:33 -07:00
Greg Fitzgerald
47b6707c07 Don't use a loader to test Storage instruction processor 2019-03-27 11:02:41 -06:00
Anatoly Yakovenko
0346b9cb5c hang out on progress until fork is confirmed 2019-03-27 08:41:41 -07:00
Anatoly Yakovenko
6bfe497ab5 remove leader confirmaiton 2019-03-27 08:41:41 -07:00
Anatoly Yakovenko
6956bf635e validator confirmaiton 2019-03-27 08:41:41 -07:00
Anatoly Yakovenko
e27d6d0988 validator confirmation 2019-03-27 08:41:41 -07:00
Greg Fitzgerald
3fc09fb23f Remove keypairs from BankClient
Bring its interface closer to the other clients.
2019-03-27 09:37:19 -06:00
Greg Fitzgerald
cecdb7061e Remove blockhash parameter from Bank::transfer
That parameter is an artifact from the Loom days, when I thought
Bank should implement the same interace as ThinClient.
2019-03-27 08:51:10 -06:00
Greg Fitzgerald
0ac865f08c Remove BankClient::process_instructions 2019-03-27 08:51:10 -06:00
Greg Fitzgerald
55115d0eeb Add process_message() to BankClient 2019-03-27 08:51:10 -06:00
Mark
16ff4ac1a8 Simplify storage interface in blocktree (#3522) 2019-03-27 01:36:39 -05:00
Greg Fitzgerald
5ce31168ef Remove Transaction::new_signed 2019-03-26 19:51:16 -07:00
Greg Fitzgerald
b9ff70c8ab pub Transaction::new_unsigned
Offer an incremental path off Transaction::new_unsigned_instructions().
2019-03-26 20:06:05 -06:00
Greg Fitzgerald
77498c6efe Expose Message via the new default Transaction constructor 2019-03-26 20:06:05 -06:00
Greg Fitzgerald
8c69c40834 Make space for a new Transaction::new 2019-03-26 20:06:05 -06:00
Rob Walker
d497b99abb use solana_entrypoint directly (#3518) 2019-03-26 16:40:34 -07:00
Greg Fitzgerald
ca2ac1e5ea Remove a mostly unused Transaction constructor 2019-03-26 15:46:58 -07:00
Pankaj Garg
c09e0eb536 propagate TESTNET_DB_HOST env variable to next step in buildkite 2019-03-26 14:40:18 -07:00
Pankaj Garg
0d90dfae1a Add provisions to specify a database server in testnet manager buildkite 2019-03-26 14:40:18 -07:00
Anatoly Yakovenko
bf61321cab fix metrics 2019-03-26 14:30:25 -07:00
Anatoly Yakovenko
591653981b fix metrics 2019-03-26 14:30:25 -07:00
Pankaj Garg
e651510805 Instructions on how to boot metrics server 2019-03-26 14:02:41 -07:00
Anatoly Yakovenko
9d73fbb84a also check the delegate_id 2019-03-26 12:03:22 -07:00
Rob Walker
215b07c1a9 remove status_cache.freeze (#3506) 2019-03-26 11:56:25 -07:00
anatoly yakovenko
420cbc45cd Record the current nodes locktower votes from the bank (#3502)
* observed_locktower_stats

* fixup! observed_locktower_stats
2019-03-26 11:06:31 -07:00
Greg Fitzgerald
df333e8b6e Move new_move_many to SystemInstruction 2019-03-26 09:22:29 -07:00
Greg Fitzgerald
9759ac2961 Mark book's javascript library as binary
highlight.js has a big dictionary of words. When git-grep includes
one of those words, it floods the screen with the whole dictionary.

Mark it as binary so that it'll now just report one line:

     Binary file book/theme/highlight.js matches
2019-03-26 07:39:34 -07:00
Anatoly Yakovenko
af9b173dfd fix link 2019-03-26 05:43:02 -07:00
Greg Fitzgerald
b61aed7250 Minor cleanup 2019-03-25 20:31:13 -07:00
Pankaj Garg
e1c0425c2b Remove rewards crate from publishing script 2019-03-25 20:19:58 -07:00
carllin
615472b52c Initailize locktower with heaviest bank (#3489) 2019-03-25 20:00:11 -07:00
Greg Fitzgerald
4d34102d9c Move stragglers into the book
The stuff added between the time we switched to proposals/ and the git-revert
2019-03-25 19:39:22 -07:00
Pankaj Garg
3e22ce4154 Added stats for locktower in testnet dashboard 2019-03-25 18:49:15 -07:00
Pankaj Garg
215f33680b Fix the filename in testnet pariticpation instructions 2019-03-25 17:33:41 -07:00
Rob Walker
a5420f19da Update testnet-participation.md
add instructions for finding metrics
2019-03-25 17:12:00 -07:00
Greg Fitzgerald
4bc3f70150 Boot VoteTransaction 2019-03-25 17:11:57 -07:00
Pankaj Garg
e8814b1297 Add support for influx cloud 2019-03-25 17:10:38 -07:00
Rob Walker
46ab0e6449 Update testnet-participation.md
multinode-demo/validator-x.sh uses cargo run unless USE_INSTALL==1
2019-03-25 16:30:56 -07:00
Anatoly Yakovenko
59b4f40f4e fixup! fixup! keep track of locktower slots and stakes 2019-03-25 16:05:28 -07:00
Anatoly Yakovenko
93c57934cb fixup! keep track of locktower slots and stakes 2019-03-25 16:05:28 -07:00
Anatoly Yakovenko
e8e1d6b8ce keep track of locktower slots and stakes 2019-03-25 16:05:28 -07:00
Stephen Akridge
4916cd8da5 bench-tps in a cargo test 2019-03-25 15:05:56 -07:00
Greg Fitzgerald
573dec63da Fix runtime benches 2019-03-25 14:32:01 -06:00
Rob Walker
34c051f183 add hash_fromstr (#3476) 2019-03-25 12:23:19 -07:00
anatoly yakovenko
51004881f8 filter out banks that have an older epoch (#3472) 2019-03-25 11:09:39 -07:00
Greg Fitzgerald
5c536e423c Inline InstructionCompiler
The object-oriented paradigm isn't helpful here; go functional.
2019-03-25 12:08:27 -06:00
Greg Fitzgerald
4efa144916 Generate a Message instead of a Transaction 2019-03-25 12:08:27 -06:00
Greg Fitzgerald
f3936c21a3 Add message 2019-03-25 12:08:27 -06:00
Greg Fitzgerald
caff603497 Less code 2019-03-24 21:44:04 -07:00
Greg Fitzgerald
aefa9891c0 Delete unused code 2019-03-24 21:44:04 -07:00
Greg Fitzgerald
6286947697 Inline payment_plan
This module predates Accounts. That was a separate module because
it used to be part of Bank and those types could be sent to any
smart contract. Now each instruction processor defines for itself
what instructions it accepts.
2019-03-24 14:52:06 -06:00
Greg Fitzgerald
33972ef89e Boot BudgetTransaction 2019-03-24 14:52:06 -06:00
Greg Fitzgerald
b53cbdd9e6 Punt on the Script abstraction
Low ROI
2019-03-24 14:52:06 -06:00
Greg Fitzgerald
c49e84c75b Boot StorageTransaction 2019-03-24 13:51:02 -07:00
Greg Fitzgerald
dcf2337e58 Add StorageInstruction constructors 2019-03-24 13:51:02 -07:00
Greg Fitzgerald
5a65c3f72e Test-drive StorageContract 2019-03-24 13:51:02 -07:00
Greg Fitzgerald
8ff1987d2d Reorg Storage program to look more like the others 2019-03-24 13:51:02 -07:00
Greg Fitzgerald
acedf4ca5a Move Instruction into its own module 2019-03-23 20:31:55 -07:00
carllin
68c35bfde6 Restart node test (#3459) (#3465)
* Restart node test (#3459)

* Add test to local_cluster for restarting a node

* fix so that we don't hit end of epoch - leader not found before trying to transfer

* Do not look for confirmations, b/c nobody is voting on empty transmissions in this single node test
2019-03-23 19:19:55 -07:00
Sathish
e1a3708844 Ensure accounts are unlocked (#3458) 2019-03-23 13:30:56 -07:00
Pankaj Garg
46ecac3310 Update leader slot in poh recorder if we skipped it (#3452)
* reset poh recorder with the original start slot
2019-03-23 13:07:09 -07:00
Greg Fitzgerald
028b9da0da Revert "Move the design proposals to a separate book"
This reverts commit 4ca18d6b9a.
2019-03-23 14:04:34 -06:00
Greg Fitzgerald
74cea2748c Revert "Publish design proposals"
This reverts commit fb44e2bf48.
2019-03-23 14:04:34 -06:00
dependabot[bot]
a478b2a05a Bump assert_cmd from 0.11.0 to 0.11.1
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd) from 0.11.0 to 0.11.1.
- [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.0...v0.11.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-23 13:18:51 -06:00
Michael Vines
41a52dbfea Document solana-install-init.sh 2019-03-23 09:01:08 -07:00
Michael Vines
4923f889c4 Add trick to ensure the entire script is downloaded 2019-03-23 09:01:08 -07:00
Rob Walker
31b8743052 delay freeze of status_cache until squash (#3453) 2019-03-22 22:14:56 -07:00
Jack May
6505221629 Add exchange program (#3444) 2019-03-22 21:07:36 -07:00
dependabot[bot]
de2b6bc9fc Bump tokio from 0.1.17 to 0.1.18
Bumps [tokio](https://github.com/tokio-rs/tokio) from 0.1.17 to 0.1.18.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-0.1.17...tokio-0.1.18)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-22 19:54:18 -06:00
Michael Vines
f565292852 Update testnet-participation.md 2019-03-22 17:58:58 -07:00
Michael Vines
90f17e8fd4 Update testnet-participation.md 2019-03-22 17:18:27 -07:00
Michael Vines
d6da7dc1b6 Initial testnet participation doc 2019-03-22 17:11:47 -07:00
Michael Vines
7e2aad2590 Refrain from trying to configure a staking account that was previously configured 2019-03-22 17:00:09 -07:00
Michael Vines
f09b8d3921 Demote log level 2019-03-22 17:00:09 -07:00
anatoly yakovenko
52f6c33ff9 Make sure banking stage is recording with the same bank that it read (#3447)
* make sure banking stage is recording with the same bank that it read with
2019-03-22 14:17:39 -07:00
Stephen Akridge
60dfb35924 Why do I need to see raw bytes from the drone? 2019-03-22 14:07:44 -07:00
Greg Fitzgerald
5f41909098 Stop using VoteTransaction in Vote processor 2019-03-22 14:07:00 -06:00
Michael Vines
a28f7db950 Retry more for a new blockhash 2019-03-22 11:14:03 -07:00
Greg Fitzgerald
38fdbbba3f Reduce remaining program crates to boilerplate crates 2019-03-22 06:46:44 -07:00
Michael Vines
0a5b6154e8 Use same gossip port for all testnet nodes 2019-03-22 00:16:58 -07:00
Michael Vines
4542a7042a Add --poll-for-new-genesis-block flag 2019-03-22 00:15:19 -07:00
Michael Vines
6113b64fee Include multinode-demo scripts in release tarball 2019-03-21 22:09:44 -07:00
Michael Vines
f777ed76a3 Use installed binaries if not within the cargo workspace 2019-03-21 22:09:44 -07:00
Michael Vines
e6b9babf53 Run a drone on blockstreamer nodes 2019-03-21 22:09:44 -07:00
Michael Vines
ed8bada439 Kill all node processes (blockexplorer) 2019-03-21 22:09:44 -07:00
Sathish
06b0c98c75 Remove accounts when the fork is removed (#3384)
* Fix test

* Cleanup accounts when the fork is removed

* Update test to check for deleted accounts
2019-03-21 17:36:10 -07:00
Michael Vines
dbb145c266 Fixup ledger path 2019-03-21 17:06:57 -07:00
Michael Vines
437481853b Ensure genesis ledger directory is populated on all validator nodes
This allows all nodes to serve the genesis ledger over rsync instead of
just the bootstrap leader
2019-03-21 16:35:40 -07:00
Michael Vines
3b5a9f512c Get client-id.json out of the genesis ledger directory 2019-03-21 16:35:40 -07:00
Greg Fitzgerald
045af04784 Reduce budget_program and config_program into boilerplate crates 2019-03-21 16:53:08 -06:00
Greg Fitzgerald
d0761f57e8 Add _program suffix to directories of crates with _program suffix 2019-03-21 16:24:06 -06:00
Greg Fitzgerald
4bb88619fd Move entrypoint boilerplate into a macro 2019-03-21 15:27:49 -06:00
Stephen Akridge
412ebfcaf2 ReplayStage::new is too long
break into more functions
2019-03-21 14:08:11 -07:00
Michael Vines
3a7647f611 Add curl-able install script 2019-03-21 13:45:54 -07:00
Michael Vines
d4cc48f99d Check from account balance and exit cleanly if 0 2019-03-21 13:00:46 -07:00
Michael Vines
852fcbd700 Automatically update PATH for the user 2019-03-21 13:00:46 -07:00
Michael Vines
8ab4b8e6ac Support local networks for easy testing 2019-03-21 13:00:46 -07:00
Greg Fitzgerald
a8095e204f Cleanup SystemTransaction 2019-03-21 12:41:39 -07:00
Michael Vines
98979c7d53 Cargo.lock 2019-03-21 11:24:10 -07:00
Michael Vines
c18fcde385 Move installer to the implemented section 2019-03-21 11:24:10 -07:00
Michael Vines
f286bbac99 Initial commands implementation 2019-03-21 11:24:10 -07:00
Michael Vines
4e029d81a2 Setup staking 2019-03-21 11:12:35 -07:00
Greg Fitzgerald
2b00a42b06 Boot Rewards program 2019-03-21 12:07:20 -06:00
Greg Fitzgerald
07d55d0092 Downgrade 'No next leader found' to warning 2019-03-21 11:18:49 -06:00
Michael Vines
fb44e2bf48 Publish design proposals 2019-03-21 10:54:59 -06:00
Mark E. Sinclair
9b0bf5ad66 Add tests for table mappers; Bugfix on-disk mapper (#3408)
add tests to `kvstore::mapper::{disk, memory}` modules

fix bug in disk mapper uncovered by tests

use `tempdir` crate for unit test-directories
2019-03-21 11:38:29 -05:00
Greg Fitzgerald
4247fa946e Add solana-wallet balance <PUBKEY> 2019-03-21 09:51:27 -06:00
Michael Vines
071b1d8b77 Cargo.lock 2019-03-21 08:47:58 -07:00
Michael Vines
63aadc4905 Turn top-level Cargo.toml into a virtual manifest 2019-03-21 08:47:58 -07:00
Greg Fitzgerald
d2415613de Migrate loader tests to BankClient 2019-03-21 09:19:24 -06:00
Greg Fitzgerald
58f071b7a0 Migrate loader to high-level instructions 2019-03-21 09:19:24 -06:00
anatoly yakovenko
148e08a8a5 Enable cluster tests (#3372)
* Cluster tests

* stable!

* fixup! stable!

* fixup! fixup! stable!

* fixup! fixup! fixup! stable!

* fixup! fixup! fixup! fixup! stable!

* fixed space

* add getNumBlocksSinceSignatureConfirmation entry for the json rpc docs

* Check in upcoming epochs for potential leadership slots in next_leader_slot()
2019-03-21 07:43:21 -07:00
Michael Vines
402a733cd7 Upload tarball as a github release asset 2019-03-20 21:39:35 -07:00
Michael Vines
78be3652de Add script to upload github release assets 2019-03-20 21:39:35 -07:00
Michael Vines
b03d9884a3 Ensure current crate versions match the tag before publishing to crates.io 2019-03-20 20:51:58 -07:00
Michael Vines
799085a105 Remove dead code 2019-03-20 20:51:58 -07:00
Mark
7812b67471 deduplicate some test code (#3401) 2019-03-20 19:35:25 -05:00
Michael Vines
4033fa031b Add convenience script for testnet deployments 2019-03-20 16:57:55 -07:00
Michael Vines
b41737259a Add GITHUB_TOKEN 2019-03-20 16:57:55 -07:00
Pankaj Garg
7c8a4bf6a4 use ticks per slot to check if the current tick is in the leader slot 2019-03-20 16:55:01 -07:00
Pankaj Garg
71314d79a7 address review comments 2019-03-20 16:55:01 -07:00
Pankaj Garg
d7ff6645a9 change pubkey to ref 2019-03-20 16:55:01 -07:00
Pankaj Garg
1824e09d0a find next leader slot before resetting working bank in Poh recorder 2019-03-20 16:55:01 -07:00
Pankaj Garg
205907d3d7 Check if poh recorder has over stepped the leader slot 2019-03-20 16:55:01 -07:00
Michael Vines
d4bcc4d474 🐳 2019-03-20 16:21:47 -07:00
Stephen Akridge
bcb190a12a Remove erroneous comment 2019-03-20 16:15:25 -07:00
Greg Fitzgerald
63e8496473 Cleanup pubkey parsing copypasta 2019-03-20 16:08:03 -07:00
dependabot[bot]
4107d70e93 Bump reqwest from 0.9.11 to 0.9.12
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.11 to 0.9.12.
- [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[bot] <support@dependabot.com>
2019-03-20 16:26:31 -06:00
Stephen Akridge
4fb0782892 Rename blocktree SlotMeta::is_rooted to is_connected
is_rooted is now is_connected and (still) indicates the set of connected
completed slots. 'rooted' slot terminology is used for a different
meaning in bank_forks and replay_stage.
2019-03-20 14:43:39 -07:00
Michael Vines
9b7c1d5650 Relocate *-help.sh to their respective packages 2019-03-20 14:34:57 -07:00
Michael Vines
985592cf40 Fix cp args 2019-03-20 14:29:30 -07:00
Stephen Akridge
2694654a98 Change fixed 8050 port to one from bind_in_range. 2019-03-20 14:17:21 -07:00
Stephen Akridge
4126461f87 Fix dupe port on cluster_info
and remove unintended grow file
2019-03-20 14:17:21 -07:00
Michael Vines
791ead6053 Include TARGET in release URL to make room for future targets 2019-03-20 13:54:32 -07:00
Rob Walker
3048de18bb add doc that should have been copy-pasta'd from bench (#3389) 2019-03-20 11:10:42 -07:00
Rob Walker
df9fd2bc0b stop copying Blooms (#3379)
* stop copying Blooms

* fixup

* clippy
2019-03-20 11:06:39 -07:00
Mark E. Sinclair
13c9d3d4e1 Kvstore: use bincode serialization (#3385)
* use bincode for SSTable serialization; add tests

* Fix bug uncovered in merge algorithm by unit tests

* use bincode in write-ahead-log serialization

* Add helper `Fill` trait for zeroing buffers
2019-03-20 09:55:44 -05:00
Michael Vines
0dc364c17a Relocate transaction reference verification to join the other validity checks 2019-03-20 07:46:01 -07:00
Mark
b3cdf58e4b Add WriteBatch to KvStore (#3364)
* implement write-batch in kvstore

* Add tests to writebatch, and in-memory table
2019-03-20 06:55:39 -05:00
Sagar Dhawan
61f950a60c Sign Gossip Vote Messages 2019-03-19 19:56:17 -07:00
Michael Vines
da77789881 Revert "Drop 'unchecked' from get_subset_mut()"
This reverts commit 70b21b3795.
2019-03-19 17:52:02 -07:00
Anatoly Yakovenko
61af87972e allow empty ancestors 2019-03-19 17:51:01 -07:00
carllin
fe9e771b9b Clear progress map on squash (#3377) 2019-03-19 17:30:36 -07:00
Greg Fitzgerald
94b5835738 Make AccountMeta a traditional struct instead of a tuple struct 2019-03-19 17:22:39 -06:00
Greg Fitzgerald
a4652a9aaf Label tuple with AccountMeta 2019-03-19 17:22:39 -06:00
Anatoly Yakovenko
7246d72f03 fix is_locked_out logic 2019-03-19 16:21:46 -07:00
Michael Vines
70b21b3795 Drop 'unchecked' from get_subset_mut() 2019-03-19 16:12:53 -07:00
Stephen Akridge
682b1b89b3 Adjust for vector of entries in blobs. 2019-03-19 13:49:48 -07:00
Stephen Akridge
f1802e592a Review comments: node creation functions for replicators
And rework download loop.
2019-03-19 13:49:48 -07:00
Stephen Akridge
ee58c1f960 Add test for replicator ledger download
Add an interface to query the storage slot a
  replicator is holding on storage_addr port.
Fix logic to poll blocktree for all slots
  replicated being filled.
Add test logic to ask replicator what slot it
  is replicating and then download an entry in
  the slot.
2019-03-19 13:49:48 -07:00
Stephen Akridge
07f4dd385d Cleanup replicator sockets
Add optional UdpSocket for storage interface.
Add new_localhost_replicator to create a new replicator local node.
2019-03-19 13:49:48 -07:00
Pankaj Garg
1be7ee51be Fix potential crash in banking stage 2019-03-19 12:06:42 -07:00
Pankaj Garg
56fcc93ef5 Schedule node for consecutive slots as leader (#3353)
* Also tweak epoch and slot duration

* new test for leader schedule
2019-03-19 06:36:45 -07:00
Rob Walker
c70412d7bb move core tests to core (#3355)
* move core tests to core

* remove window

* fix up flaky tests

* test_entryfication needs a singly-threaded banking_stage

* move core benches to core

* remove unnecessary dependencies

* remove core as a member for now, test it like runtime

* stop running tests twice

* remove duplicate runs of tests in perf
2019-03-18 22:08:21 -07:00
Carl
5e21268ca0 PR comments 2019-03-18 20:46:11 -07:00
Carl
b38e3bef01 Modify bank_forks to support squashing/filtering new root and also don't remove parents from bank_forks when inserting, otherwise we lose potential fork points when querying blocktree for child slots 2019-03-18 20:46:11 -07:00
Michael Vines
89cc82c71b Update cli interface 2019-03-18 18:34:08 -07:00
Michael Vines
1d0f6a5d85 Add scripts/install-help.sh 2019-03-18 18:34:08 -07:00
Michael Vines
d0292b1cf1 store transaction no longer takes the transaction fee from the config account 2019-03-18 18:34:08 -07:00
Michael Vines
15aed9f320 Self 2019-03-18 18:34:08 -07:00
Rob Walker
5a67362b8e update passive staking proposal (#3335)
* update passive staking proposal

* fixup
2019-03-18 18:25:29 -07:00
Mark E. Sinclair
5d73ab299b Clean up locks in KvStore (#3358)
* Lift all shared mutable state into Kvstore

commit is now an AtomicUsize

In-memory table and write-log are now struct members behind individual RwLocks
2019-03-18 19:04:31 -05:00
Stephen Akridge
ef111dcbe1 Decendent is not a word 2019-03-18 15:58:27 -07:00
Pankaj Garg
da7e49c880 Fix broken build
- build breaks if Cuda feature is used
2019-03-18 15:29:51 -07:00
Greg Fitzgerald
f16f88873d Add multiple signer support to BankClient 2019-03-18 16:07:45 -06:00
anatoly yakovenko
211c81f2a2 bank fork rpc (#3351) 2019-03-18 14:18:43 -07:00
Pankaj Garg
efc39ffdde Report how many grace ticks were afforded to previous leader (#3350) 2019-03-18 13:24:07 -07:00
anatoly yakovenko
61a4b998fa Implement locktower voting (#3251)
* locktower components and tests

* integrate locktower into replay stage

* track locktower duration

* make sure threshold is checked after simulating the vote

* check vote lockouts using the VoteState program

* duplicate vote test

* epoch stakes

* disable impossible to verify tests
2019-03-18 12:12:33 -07:00
Stephen Akridge
cedff2fca1 Cleanup sockets test 2019-03-18 11:56:18 -07:00
Greg Fitzgerald
8d032aba9d Merge InstructionError and ProgramError
From the user's perspective, it's just an instruction error.
For program-specific errors, we still have
InstructionError::CustomError.
2019-03-18 10:39:20 -06:00
Greg Fitzgerald
607b368fe3 Add back in test to check the account program id 2019-03-18 08:22:54 -07:00
Greg Fitzgerald
a54854abc7 Do Budget verification in BudgetScript 2019-03-18 08:22:54 -07:00
Greg Fitzgerald
ce6257a069 Delete misplaced unit-tests
These tests were from back in the day when Bank(then-called Accountant)
would call `verify_plan()` on all transactions. Nowadays `verify_plan`
is only useful to the client. At can be used to ensure a transaction
won't trigger runtime errors.
2019-03-18 08:22:54 -07:00
Greg Fitzgerald
7b28d3a231 Move Budget's verify_plan() into tests
This functionality is supposed to be the the interpreter
2019-03-18 08:22:54 -07:00
Greg Fitzgerald
ea01ff2aab Add pubkey to BudgetExpr::new_cancelable_future_payment for wallet 2019-03-18 08:22:54 -07:00
Greg Fitzgerald
3369019943 Add BudgetExpr::new_cancelable_authorized_payment 2019-03-18 08:22:54 -07:00
Greg Fitzgerald
dbd4176b97 Move script constructors into a separate module 2019-03-18 08:22:54 -07:00
Greg Fitzgerald
122c7bc2ef Rename TransactionCompiler to Script and use it to replace the type alias 2019-03-18 08:22:54 -07:00
Greg Fitzgerald
99671472d1 Migrate config tests to Bank 2019-03-18 08:22:54 -07:00
Greg Fitzgerald
0c0716abfb Move Bank-based tests into unit-tests 2019-03-18 08:22:54 -07:00
Greg Fitzgerald
c09accb685 Rename StaticEntrypoint to ProcessInstruction 2019-03-18 08:22:54 -07:00
Greg Fitzgerald
ae4d14a2ad Introducing Scripts
A sequence of instructions. A client compiles the script and then uses
the compiled script to construction a transaction. Then it adds a
adds a blockhash, signs the transaction, and sends it off for
processing.
2019-03-18 08:22:54 -07:00
Greg Fitzgerald
55cdbedb52 Allow tests to add instruction processors
Make runtime a private module again.
2019-03-18 08:22:54 -07:00
Greg Fitzgerald
ee39f31d81 Add Runtime object. Allow any number of static loaders. 2019-03-18 08:22:54 -07:00
Greg Fitzgerald
70b45de012 Get access to runtime errors in Budget unit-tests 2019-03-18 08:22:54 -07:00
carllin
60437a8dcb Multiple entries per blob (#3337)
* Pack multiple entries into blob

* fix tests

* Add test for deserializing multi-entry blobs in blocktree

* more test fixes
2019-03-17 18:48:23 -07:00
Michael Vines
a35ebe1186 Avoid RpcRequest 2019-03-17 01:34:58 -07:00
Michael Vines
c498775a3d Move generic rpc_client functions from wallet/ to client/ 2019-03-17 01:34:58 -07:00
Michael Vines
3ad019a176 Increment stable timeout 2019-03-16 23:56:35 -07:00
Michael Vines
9632136cda Clean up stray retry_get_balance() function 2019-03-16 23:56:35 -07:00
Michael Vines
42cea7a785 Remove metrics dependency 2019-03-16 23:56:35 -07:00
Michael Vines
4c9d852b08 Remove ThinClient::transfer() 2019-03-16 23:56:35 -07:00
Sathish
9566a5cc68 Organize accounts on a per fork basis (#3336)
* Organize accounts by fork

* Keep track of vote accounts in account info

* update comments
2019-03-16 23:42:32 -07:00
Michael Vines
ac03c59b41 client/: get_transaction_count() now returns a Result 2019-03-16 23:27:23 -07:00
Michael Vines
73ceaf07b1 client/: move RpcClient from rpc_request.rs to rpc_client.rs 2019-03-16 23:27:23 -07:00
Michael Vines
7b314f47f7 Factor RPC request mechanism out of RpcClient into *RpcClientRequest 2019-03-16 23:27:23 -07:00
Michael Vines
23337e08eb client/: Merge client.rs into thin_client.rs 2019-03-16 22:48:26 -07:00
Michael Vines
97e73311c5 Move mock request_airdrop_transaction into drone/, closer to the real impl 2019-03-16 22:14:09 -07:00
Michael Vines
e2c24481e4 wallet/ now only dev-depends on core/ 2019-03-16 21:40:39 -07:00
Michael Vines
ad252fe4c5 Remove unnecessary Option from get_account_data 2019-03-16 11:32:01 -07:00
Michael Vines
4b04bc8612 Move thin_client RPC requests into rpc_request; de-mut thin_client 2019-03-16 11:32:01 -07:00
Michael Vines
bcc34b906c Relieve the caller of having to care about the rpc request id 2019-03-16 11:32:01 -07:00
Michael Vines
c2b1010f18 Clarify url vs addr 2019-03-16 11:32:01 -07:00
Rob Walker
e3ef4f25d3 Update Dockerfile
install mscgen (for book art)
2019-03-15 20:44:35 -07:00
Michael Vines
ad12b0efce Bump kvstore version to 0.13.0 to match all other solana crates (#3334) 2019-03-15 19:05:24 -05:00
Sagar Dhawan
00f005af25 Fix leader rotation counter 2019-03-15 17:01:18 -07:00
Mark
656fb173f9 Extract kvstore into separate crate (#3327)
* extract kvstore into new crate

* add kvstore crate to CI publishing list
2019-03-15 18:42:47 -05:00
Michael Vines
5f58e9cd6e Config program - useful for storing/updating simple config items on chain 2019-03-15 16:39:45 -07:00
Michael Vines
1d876df8b3 Add command plumbing 2019-03-15 16:30:31 -07:00
Michael Vines
c8bbca08f8 Install the install program 2019-03-15 16:30:31 -07:00
Pankaj Garg
971da7325d Reduce log level for periodic debug messages 2019-03-15 15:41:26 -07:00
Michael Vines
ca4f874f52 Remove ci/run-local.sh 2019-03-15 15:09:25 -07:00
Greg Fitzgerald
a88b36d718 Rename TransactionBuilder to TransactionCompiler 2019-03-15 14:46:44 -06:00
Greg Fitzgerald
24d9138067 Abandon Builder pattern 2019-03-15 14:46:44 -06:00
Greg Fitzgerald
aca739b800 Boot fees from TransactionBuilder 2019-03-15 14:46:44 -06:00
Greg Fitzgerald
e091aa87ea More precise constructor names 2019-03-15 14:46:44 -06:00
Greg Fitzgerald
968022a1b0 Instruction name swap
* Instruction -> GenericInstruction
* Instruction<u8, u8> -> CompiledInstruction
* Instruction<Pubkey, (Pubkey, bool)> -> Instruction
2019-03-15 14:46:44 -06:00
Pankaj Garg
66fb1bbb2e Give last leader some grace ticks to catch up (#3299)
* Wait for last leader for some ticks

* New tests and fixed existing tests
2019-03-15 13:22:16 -07:00
Mark
fa3e1fa7c9 Add error correction to write-log (#3323) 2019-03-15 15:04:34 -05:00
carllin
36763d0802 Cleanup entry.rs packing code (#3303) 2019-03-15 12:48:32 -07:00
Sagar Dhawan
be5f800390 Use the Mining Proof's Signature as storage keys (#3321) 2019-03-15 11:44:10 -07:00
Mark
ca69b7b75b Add CRC Reader and Writer I/O wrappers (#3322)
* add CRC Reader and Writer I/O wrappers

* typo fix and variable rename
2019-03-15 13:17:49 -05:00
Mark
a15927f8d0 make KvStore Send+Sync (#3317) 2019-03-15 13:01:34 -05:00
Sunny Gleason
4ba4ad9878 Update README.md 2019-03-15 11:53:37 -06:00
Mark
be1511a7ff delete accidental file (#3316) 2019-03-15 11:28:08 -05:00
Michael Vines
41b98c603b Upgrade rust stable to 1.33.0 2019-03-15 09:25:28 -07:00
Michael Vines
5430dd28b6 Update docker-rust to 1.33 2019-03-15 09:25:28 -07:00
Michael Vines
e9d687329b Only push newly built container 2019-03-15 09:25:28 -07:00
Greg Fitzgerald
d72cac6e97 Fix chacha test 2019-03-15 09:06:54 -06:00
Greg Fitzgerald
4e51a444f4 Simplify TransactionBuilder::new_with_instructions 2019-03-15 09:06:54 -06:00
Greg Fitzgerald
48d86683e2 Abuse KeypairUtil 2019-03-15 09:06:54 -06:00
Greg Fitzgerald
42d5dde5b1 new_singleton -> new_with_instruction 2019-03-15 09:06:54 -06:00
Greg Fitzgerald
142eeffe5d Add BankClient to minimize copypasta 2019-03-15 09:06:54 -06:00
Greg Fitzgerald
6a68df3ebd Don't resign airdrop requests with the keypair asking for an airdrop
The correct thing to do here is retry until you get a
BlockhashNotFound error, and then send another request
to the drone for a new signed transaction.

Also, this test is an integration test masquerading as a unit-test..
2019-03-15 09:06:54 -06:00
Greg Fitzgerald
8306c1841c Fix build 2019-03-15 09:06:54 -06:00
Greg Fitzgerald
73bd396dfb Rewrite system integration test
Create Client helpers instead of Bank helpers.
2019-03-15 09:06:54 -06:00
Greg Fitzgerald
36fb0a0aef Add new preferred transaction constructors 2019-03-15 09:06:54 -06:00
Greg Fitzgerald
4d53be8350 Make it unappealing to build and sign transactions at the same time
Use a client to sign transactions. It'll need that keypair anyway
to resign new blockhashes on retries.
2019-03-15 09:06:54 -06:00
Greg Fitzgerald
f8bf9ca218 Make safe transaction signing the default 2019-03-15 09:06:54 -06:00
Greg Fitzgerald
7b4568b9bf Migrate to sign_checked() 2019-03-15 09:06:54 -06:00
Greg Fitzgerald
bd8502e87e Implement Transaction::new_unsigned with TransactionBuilder 2019-03-15 09:06:54 -06:00
Greg Fitzgerald
21815f26d5 Implement signed transaction using unsigned transaction 2019-03-15 09:06:54 -06:00
Greg Fitzgerald
8ef5195037 Don't test a transaction with a duplicate key 2019-03-15 09:06:54 -06:00
Michael Vines
57606c6bf8 Bump log level for better CI logs 2019-03-15 07:48:23 -07:00
anatoly yakovenko
0465abf75b move (#2738) 2019-03-15 06:58:45 -07:00
Michael Vines
8a142966be Avoid stray '' when rust version is not specified 2019-03-14 21:30:24 -07:00
Michael Vines
7498488f5f cloud_DeleteInstances() now waits for the instances to be terminated 2019-03-14 21:15:00 -07:00
Michael Vines
ede99d5913 Revert "Block until instances are confirmed to be deleted"
This reverts commit 47ddbbe53b.
2019-03-14 20:53:10 -07:00
Michael Vines
3ced91319f Upgrade nightly rust version 2019-03-14 20:22:46 -07:00
Michael Vines
3d1413e619 Preserve original nightly name 2019-03-14 20:22:46 -07:00
Michael Vines
8f25548781 Overhaul cargo/rustc version management 2019-03-14 20:22:46 -07:00
Michael Vines
47ddbbe53b Block until instances are confirmed to be deleted 2019-03-14 16:20:18 -07:00
Rob Walker
5741400713 add support for finding the next slot a node will be leader (#3298) 2019-03-14 16:06:56 -07:00
Rob Walker
9f02a8d3d0 remove ticks_per_slot from blocktree (#3297) 2019-03-14 15:18:37 -07:00
Stephen Akridge
c208f4dbb5 Add option of replicators to local cluster test 2019-03-14 13:55:11 -07:00
Michael Vines
a17843c8f6 solana-install design proposal 2019-03-14 13:21:00 -07:00
Sagar Dhawan
3f2fc21bb3 Rename hash_queue and fix boundary condition (#3289) 2019-03-14 11:56:36 -07:00
Greg Fitzgerald
9fac3b26ee Move the design proposals to a separate book
Fixes #3262
2019-03-14 10:08:43 -07:00
Greg Fitzgerald
c1eec0290e Rename userdata to data (#3282)
* Rename userdata to data

Instead of saying "userdata", which is ambiguous and imprecise,
say "instruction data" or "account data".

Also, add `ProgramError::InvalidInstructionData`

Fixes #2761
2019-03-14 10:48:27 -06:00
Eric
de13082347 add economic design mvp to summary and overview 2019-03-14 09:42:19 -06:00
Eric
48b5d666d0 some economic mvp features 2019-03-14 09:42:19 -06:00
Eric
70bb49a46d some economic mvp features 2019-03-14 09:42:19 -06:00
Eric
105fc7029e create mvp section 2019-03-14 09:42:19 -06:00
dependabot[bot]
77a7ffe543 Bump hex-literal from 0.1.3 to 0.1.4
Bumps [hex-literal](https://github.com/RustCrypto/utils) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/RustCrypto/utils/releases)
- [Commits](https://github.com/RustCrypto/utils/compare/hex-literal-v0.1.3...hex-literal-v0.1.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-14 07:21:32 -06:00
Michael Vines
7d593e6c61 Exit gracefully when no subcommand is specified 2019-03-14 00:35:34 -05:00
Michael Vines
bb420cb995 Use crate_description and crate_name Clap macros 2019-03-14 00:35:34 -05:00
Greg Fitzgerald
e58220282a Move TransactionError into the SDK 2019-03-13 21:26:57 -06:00
Greg Fitzgerald
4ca4038d54 Rename BankError to TransactionError 2019-03-13 21:26:57 -06:00
Greg Fitzgerald
150cd31ec0 Blur the line between Bank and Runtime 2019-03-13 21:26:57 -06:00
Greg Fitzgerald
6fd0d4dcf5 Boot error piggybacking on BankError 2019-03-13 21:26:57 -06:00
Greg Fitzgerald
296415945a Generalize error codes 2019-03-13 21:26:57 -06:00
Greg Fitzgerald
1de5ae1ef0 Remove SystemError from ProgramError 2019-03-13 21:26:57 -06:00
Greg Fitzgerald
6a89c68a1d Add utility function to help get System error out of ProgramError 2019-03-13 21:26:57 -06:00
Greg Fitzgerald
c14cce4c85 Add InstructionError for runtime instruction errors 2019-03-13 21:26:57 -06:00
Stephen Akridge
959961b596 Modified test 2019-03-13 18:18:27 -07:00
Pankaj Garg
6f76c2da6c Fix confirmation test 2019-03-13 17:50:53 -07:00
Pankaj Garg
8d2bd2b30f Reduce ticks per second
- It's improving TPS. Temp fix for beacons timeframe
2019-03-13 17:50:53 -07:00
Michael Vines
34a8d591fa Switch version file from .txt to .yaml; add target tuple to version.yml 2019-03-13 16:30:07 -07:00
dependabot[bot]
d94ff4bf4a Bump tokio from 0.1.15 to 0.1.17
Bumps [tokio](https://github.com/tokio-rs/tokio) from 0.1.15 to 0.1.17.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Changelog](https://github.com/tokio-rs/tokio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-0.1.15...tokio-0.1.17)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-13 15:45:33 -06:00
carllin
af03df38b9 Don't vote for empty leader transmissions (#3248)
* Don't vote for empty leader transmissions

* Add is_delta flag to bank to detect empty leader transmissions

* Plumb new is_votable flag through replay stage

* Fix PohRecorder tests

* Change is_delta to AtomicBool to avoid making Bank references mutable

* Reset start slot in poh_recorder when working bank is cleared, so that connsecutive TPU's will start from the correct place

* Use proper max tick height calculation

* Test for not voting on empty transmission

* tests for is_votable
2019-03-13 14:06:12 -07:00
Michael Vines
242bcf44db Replace stale --no-signer usage with --no-voting 2019-03-13 13:50:30 -07:00
Michael Vines
ebd540972d Remove duplicate --rpc-drone-address 2019-03-13 13:24:02 -07:00
Michael Vines
a17be9f8bd Revert "Add case for --rpc-drone-address"
This reverts commit 42ad297778.
2019-03-13 13:23:54 -07:00
Michael Vines
42ad297778 Add case for --rpc-drone-address 2019-03-13 13:04:44 -07:00
Greg Fitzgerald
0568d7238e Add implemented design proposals section 2019-03-13 13:20:37 -06:00
Greg Fitzgerald
9bc05313a2 Update TPU ASCII art 2019-03-13 13:14:15 -06:00
Michael Vines
fedbae6f8c Enable rpc for all testnet nodes 2019-03-13 10:49:40 -07:00
Stephen Akridge
64de639817 Fixes to replicator
Move functionality into more functions.
Break down the current test and just test creation/joining the network.
2019-03-13 10:15:03 -07:00
Stephen Akridge
ec9e13d1f4 Add repair slot range
Use default impl RepairSlotRange
2019-03-13 10:15:03 -07:00
Michael Vines
5d27f221f7 Drop socat for iptables 2019-03-13 12:03:56 -05:00
Michael Vines
61db74d98e Run socat in the background 2019-03-13 08:15:58 -07:00
Tyera Eulberg
1d689e84f1 Move and rename cluster_client 2019-03-12 22:05:38 -06:00
Tyera Eulberg
b7f420412b Update publish script 2019-03-12 22:05:38 -06:00
Tyera Eulberg
e3ac9e9679 Move thin client tests to integration test suite 2019-03-12 22:05:38 -06:00
Tyera Eulberg
12fde77ecd Update crate references 2019-03-12 22:05:38 -06:00
Tyera Eulberg
3fc96c4a18 Add solana-client crate 2019-03-12 22:05:38 -06:00
carllin
cb3eeace56 Replay Stage start_leader() can use wrong parent fork() (#3238)
*  Make sure start_leader starts on the last voted block, not necessarily the biggest indexed bank in frozen_slots()

* Fix tvu test
2019-03-12 17:42:53 -07:00
Pankaj Garg
76feb2098e Use same VM type for validators as leader, if CUDA is enabled (#3253)
- Since all nodes are created equal
2019-03-12 17:42:47 -07:00
Rob Walker
06cb266cfe remove unused code (#3252) 2019-03-12 16:46:41 -07:00
Sagar Dhawan
866d3f467f Fix flag to disable leader-rotation (#3243) 2019-03-12 16:35:13 -07:00
Sagar Dhawan
c1e726da87 Remove comment 2019-03-12 15:32:41 -07:00
Sagar Dhawan
7d7528eb18 Fix test_bank_storage 2019-03-12 15:32:41 -07:00
Rob Walker
9f916f9d47 remove Option<> wrapper for accounts 2019-03-12 15:03:26 -07:00
Michael Vines
a7d8bfdf8b Adjust crate list 2019-03-12 14:02:51 -07:00
Michael Vines
abdd4f371b Adjust readme path 2019-03-12 14:02:51 -07:00
carllin
13adee332e Add retry transfer logic to kill_entry_and_spend_and_verify_rest to account for dead forks (#3239) 2019-03-12 13:48:02 -07:00
Rob Walker
a799f8f4b1 tell blockexplorer to run on port 8080 (#3237)
* tell blockexplorer to run on port 8080

* forward port 80 to 5000 for a blockexplorer node
2019-03-12 13:39:09 -07:00
Michael Vines
1ee43a7633 Remove non-essential programs from runtime/ 2019-03-12 15:11:59 -05:00
Michael Vines
3d2b7dd1ef Move programs/system into runtime/ 2019-03-12 11:30:58 -05:00
Sagar Dhawan
7b35114c0f Filter vote accounts with no delegate from being selected in Rotation (#3224) 2019-03-11 17:58:21 -07:00
Pankaj Garg
b418525464 Update current leader information in metrics and dashboard 2019-03-11 17:43:59 -07:00
Pankaj Garg
8bba11367e Provide drone's host address while setting up staking account 2019-03-11 17:11:34 -07:00
anatoly yakovenko
9eb7e63819 Add staking rewards design proposal for delegation (#3148)
* proposal for single vote many delegators
2019-03-11 16:35:42 -07:00
Michael Vines
092501039c Cargo.lock 2019-03-11 16:27:22 -07:00
Michael Vines
6899bd7099 0.13.0 2019-03-11 16:21:19 -07:00
Michael Vines
5a0416b925 Keep stable dashboard on stable channel at all times 2019-03-11 16:19:16 -07:00
Michael Vines
ba2cdd0bf6 Move testnet/testnet-perf to the stable channel 2019-03-11 16:14:16 -07:00
Tyera Eulberg
fe1676bc3a Review comments 2019-03-11 16:58:43 -06:00
Tyera Eulberg
1a9ef37251 Update programs using simple error mapping to use CustomError 2019-03-11 16:58:43 -06:00
Tyera Eulberg
db5370c5df Add helper macro to implement bincode serialization of program-specific errors 2019-03-11 16:58:43 -06:00
Tyera Eulberg
804378e8f7 Add ProgramError::CustomError and truncate value to 32 bytes 2019-03-11 16:58:43 -06:00
Mark
56b0ba2601 KvStore - A data-store to support BlockTree (#2897)
* Mostly implement key-value store and add integration points

Essential key-value store functionality is implemented, needs more work to be integrated, tested, and activated.

Behind the `kvstore` feature.
2019-03-11 17:53:14 -05:00
Michael Vines
3073ebb20d reduce pub 2019-03-11 17:09:21 -05:00
Stephen Akridge
f8e07ef5a3 banking_stage_entryfication fails when run as cargo test
Add some retry for getting entries from the channel.
2019-03-11 14:13:32 -07:00
Carl
a4b6d181a2 rename forwarder ports to tpu_via_blobs 2019-03-11 14:07:17 -07:00
Pankaj Garg
0b8c5d807d code cleanup 2019-03-11 14:07:17 -07:00
Pankaj Garg
e201136eee more review comments 2019-03-11 14:07:17 -07:00
Pankaj Garg
55f660d5f9 address review comments 2019-03-11 14:07:17 -07:00
Carl
a4acc631ee Refactor packing packets into blobs into separate packets_to_blob() function in packets.rs 2019-03-11 14:07:17 -07:00
Carl
3ddf4b6c24 PR fixes 2019-03-11 14:07:17 -07:00
Carl
ccd1173a83 Add local cluster test for forwarding 2019-03-11 14:07:17 -07:00
Carl
cd1a9faacd Batch packet forwarding in banking stage 2019-03-11 14:07:17 -07:00
Carl
b60b8ec5ae Add logic for deserialzing packets embedded in blobs 2019-03-11 14:07:17 -07:00
Carl
536c8accf8 Add separate sockets for tpu forwarder and run different protocol for those sockets 2019-03-11 14:07:17 -07:00
Carl
7beefb3f81 Add forwarder sockets and address to contact info and sockets structs 2019-03-11 14:07:17 -07:00
Pankaj Garg
fe1f67ea9a clippy errors 2019-03-11 14:07:17 -07:00
Pankaj Garg
069ce71256 fix clippy 2019-03-11 14:07:17 -07:00
Pankaj Garg
e3cacb9296 Buffer unprocessed packets if next leader is the current node 2019-03-11 14:07:17 -07:00
anatoly yakovenko
0c592c52f6 Wake up replay stage when the poh bank is cleared. (#3211)
* wake up replay stage when the poh bank is cleared

* bump ticks per second

* Increase ticks per slot to match faster tick rate

* Remove check that working bank must be the bank for the greatest slot

* Make start_leader() skip starting TPU for slots we've already been leader for
2019-03-11 13:58:23 -07:00
Sagar Dhawan
78bb96ee51 Reduce bootstrap leader stake (#3218) 2019-03-11 13:29:44 -07:00
Greg Fitzgerald
86e2f35ac4 Only need the TPU and a light client implement Transact 2019-03-10 23:20:10 -06:00
Greg Fitzgerald
7696a64891 Add design doc for testing programs 2019-03-10 23:20:10 -06:00
Greg Fitzgerald
799ed24113 Integrate bank-forks proposal into the book 2019-03-10 20:13:36 -06:00
Greg Fitzgerald
63477dabcd Attempt to clarify bank forks 2019-03-10 20:13:36 -06:00
Rob Walker
cd0bc1dea5 updates to reflect new_from_parent() (#3076)
* design draft

* update

* section on updating root forks

* updates to reflect new_from_parent()

* fixup

* Grammar check
2019-03-10 13:59:16 -07:00
Rob Walker
195a880576 pass Pubkeys as refs, copy only where values needed (#3213)
* pass Pubkeys as refs, copy only where values needed

* Pubkey is pervasive

* fixup
2019-03-09 19:28:43 -08:00
Michael Vines
ac226c3e14 Remove superfluous set_leader() usage 2019-03-08 19:59:54 -08:00
Michael Vines
4d5b832775 Remove commented out and clearly broken test 2019-03-08 19:59:54 -08:00
Michael Vines
79b2542ca4 Remove CrdsValue::LeaderId 2019-03-08 19:41:51 -08:00
Michael Vines
17921c9fae Delete NodeInfo type 2019-03-08 18:37:36 -08:00
anatoly yakovenko
5de38852d2 Add cluster test framework doc. (#3189) 2019-03-08 19:29:41 -07:00
Rob Walker
0acdbc0d03 plumb staking_account and voting_keypair from multinode-demo to Vote (#3199)
* plumb staking_account and voting_keypair from bash to Vote
2019-03-08 19:29:08 -07:00
Sagar Dhawan
c8c85ff93b Fix propagation of incorrectly signed messages in Gossip (#3201) 2019-03-08 18:08:24 -08:00
Michael Vines
31cbb52654 Rename new_entry_point as new_gossip_entry_point to clarify usage 2019-03-08 17:42:25 -08:00
Michael Vines
cd88f81817 bench-tps no longer uses an invalid ContactInfo for RPC 2019-03-08 17:42:25 -08:00
Tyera Eulberg
6de24ff0be s/account/program in info msgs 2019-03-08 16:30:29 -07:00
Michael Vines
de4d14ddc0 set_leader() now remains local and doesn't emit a LeaderId gossip message 2019-03-08 15:10:19 -08:00
Michael Vines
5b386ec30a Delete cluster_info::get_gossip_top_leader() 2019-03-08 12:10:34 -08:00
Michael Vines
8f0aa956a3 bench-tps no longer cares who the leader is 2019-03-08 11:43:07 -08:00
Michael Vines
e04148ff44 Reduce leader_id visiblity 2019-03-08 11:42:06 -08:00
Michael Vines
d5d853838c RPC now sends transactions at the local TPU
The local TPU will forward the transactions as needed if it's not
currently the leader
2019-03-08 11:42:06 -08:00
Michael Vines
e18673953c Remove poll_gossip_for_leader() 2019-03-08 11:14:47 -08:00
Michael Vines
12f3fd75e8 StorageStage now sends transactions at the local TPU 2019-03-08 11:03:49 -08:00
Michael Vines
7bd0929157 Remove process_block() 2019-03-08 09:36:30 -08:00
Michael Vines
19488ba42a Speling 2019-03-08 09:36:30 -08:00
Michael Vines
f0dc10c67b Hide close(), the user is supposed to drop instead 2019-03-08 09:36:30 -08:00
Tyera Eulberg
f55103498f Remove commented test code 2019-03-07 19:18:53 -07:00
Tyera Eulberg
639cb49356 Fix wallet integration tests 2019-03-07 19:18:53 -07:00
Greg Fitzgerald
c5e9c6fdb6 Get chacha off Budget 2019-03-07 19:18:53 -07:00
Greg Fitzgerald
7a4ccc8719 Fix Budget's payment_with_fee test
Fee is now independent of the contract.
2019-03-07 19:18:53 -07:00
Greg Fitzgerald
125a345c90 Fix pubsub test 2019-03-07 19:18:53 -07:00
Greg Fitzgerald
3dc22e7323 Simulate auto-creation of system accounts 2019-03-07 19:18:53 -07:00
Greg Fitzgerald
17dcd1f62a Resurrect the tests 2019-03-07 19:18:53 -07:00
Greg Fitzgerald
a277f3e816 Migrate to TransactionBuilder
This code wasn't updated after we started batching instructions.
The current code does allocations instead of using CreateAccount.
The runtime shouldn't allow that, so getting this code out of the
way before we lock down the runtime.
2019-03-07 19:18:53 -07:00
Greg Fitzgerald
10b16753af Remove 'new' constructor 2019-03-07 19:18:53 -07:00
Tyera Eulberg
4625aed3a5 Make hypen/underscore consistent 2019-03-07 16:51:25 -08:00
Tyera Eulberg
259c820f15 Review comments 2019-03-07 17:21:32 -07:00
Tyera Eulberg
e888c90ecf Add program notifications to JSON RPC documentation 2019-03-07 17:21:32 -07:00
Tyera Eulberg
b053bc2790 Load accounts by program owner for program subscriptions 2019-03-07 17:21:32 -07:00
Tyera Eulberg
6a81f9e443 Add program subscriptions to rpc 2019-03-07 17:21:32 -07:00
Greg Fitzgerald
0ef1fa7c76 Replace RemoteVoteSigner with a user-supplied keypair
Vote program currently offers no path to vote with the
authorized voter. There should be a
VoteInstruction::new_authorized_vote() that accepts the
keypair of the authorized voter and the pubkey of the vote
account. The only option in current code is
VoteInstruction::new_vote() that accepts the voter's keypair
and assumes that pubkey is the vote account.
2019-03-07 17:15:36 -07:00
Sagar Dhawan
02eb234399 Fix TVU and PoH Recorder going out of sync (#3164)
* Fix broadcast_stage error

* Account for very fast ticks in tick verification
2019-03-07 15:49:07 -08:00
Stephen Akridge
8d80da6b46 Fix picking account store paths
Store the set of accounts paths in AccountsDB and choose with an rng
when we need to create a new one. Remove path from AccountStorageEntry object.
2019-03-07 14:58:52 -08:00
Stephen Akridge
22855def27 Fix race condition in store.
Multiple threads can enter the read lock and
all store the new empty set to account_maps.
Check again after taking write lock to make sure
only one thread actually inserts the new entry.
2019-03-07 14:58:52 -08:00
Michael Vines
0be59cad4e Remove dead code 2019-03-07 13:05:42 -08:00
Michael Vines
5edbd6a7fb gossip_service::discover() now reports the leader 2019-03-07 13:05:42 -08:00
Michael Vines
54ff9b3ac2 Shutdown gossip on failure 2019-03-07 13:05:42 -08:00
Michael Vines
5463226184 Give spy nodes a proper keypair 2019-03-07 13:05:42 -08:00
Michael Vines
b96bccd71f Use Self 2019-03-07 13:05:42 -08:00
Michael Vines
07a948a0d0 Replicator now uses its keypair for gossip 2019-03-07 13:05:42 -08:00
Michael Vines
8f034280dc Increase polling frequency to report convergence quicker 2019-03-07 13:05:42 -08:00
Michael Vines
83f551d9b9 Use poll_gossip_for_leader() 2019-03-07 13:05:42 -08:00
Michael Vines
f83a64d17f poll_gossip_for_leader: simplify timeout arg 2019-03-07 13:05:42 -08:00
Michael Vines
8bc7d5a172 Remove spy_node duplication 2019-03-07 13:05:42 -08:00
Michael Vines
96c0222b30 Employ gossip_service::discover() 2019-03-07 13:05:42 -08:00
Michael Vines
679a718cbf poll_gossip_for_leader() code cleanup 2019-03-07 13:05:42 -08:00
Michael Vines
b083e4db48 Resolve TODO 2019-03-07 13:05:42 -08:00
Michael Vines
a3cab470d3 Rename ClusterInfo::new_with_keypair() to ClusterInfo::new() 2019-03-07 13:05:42 -08:00
Michael Vines
bb93504965 Rename ClusterInfo::new() to ClusterInfo::new_with_invalid_keypair() 2019-03-07 13:05:42 -08:00
Greg Fitzgerald
4d58bf4b28 Don't use solana_entrypoint in static libraries 2019-03-07 12:42:13 -07:00
Greg Fitzgerald
505f77b108 Move a more generic process_transaction to runtime.rs 2019-03-07 12:42:13 -07:00
Greg Fitzgerald
5b672f8921 Generalize Budget tests to work on multi-ix txs 2019-03-07 12:42:13 -07:00
Rob Walker
9e9c0785e7 groom broadcast (#3170) 2019-03-07 09:43:42 -08:00
Greg Fitzgerald
94882418ab Simplify TransactionBuilder
A stepping stone to replacing all Transaction constructors with
TransactionBuilders.
2019-03-07 08:11:03 -07:00
dependabot[bot]
c6cb3bb0bc Bump env_logger from 0.6.0 to 0.6.1
Bumps [env_logger](https://github.com/sebasmagri/env_logger) from 0.6.0 to 0.6.1.
- [Release notes](https://github.com/sebasmagri/env_logger/releases)
- [Commits](https://github.com/sebasmagri/env_logger/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-06 22:29:44 -07:00
Tyera Eulberg
9fedc9513b Use generics for add/remove subscriptions 2019-03-06 20:50:48 -08:00
Tyera Eulberg
0badc90058 Wallet new tests 2019-03-06 20:46:18 -08:00
Stephen Akridge
61fbea3ee4 Cleanup AccountStorage apis
Remove duplicate code
2019-03-06 18:30:36 -08:00
Tyera Eulberg
a4a3995a84 Add staking commands to wallet 2019-03-06 17:50:15 -08:00
Rob Walker
01fb76f4bd add epoch warmup (#3166)
add epoch warmup
2019-03-06 16:32:23 -08:00
Greg Fitzgerald
d09639f7d2 Move the design out of the proposals section 2019-03-06 17:24:17 -07:00
Anatoly Yakovenko
946ee8a354 Add description of vote and rewards programs 2019-03-06 17:24:17 -07:00
Greg Fitzgerald
e63b899ca5 Boot staker setup from fullnode 2019-03-06 16:50:27 -07:00
Rob Walker
63a4ed74a4 consolidate logic for epoch and slot_index into Bank (#3144) 2019-03-06 14:44:21 -08:00
dependabot[bot]
a3782d699d Bump bytes from 0.4.11 to 0.4.12
Bumps [bytes](https://github.com/carllerche/bytes) from 0.4.11 to 0.4.12.
- [Release notes](https://github.com/carllerche/bytes/releases)
- [Changelog](https://github.com/carllerche/bytes/blob/v0.4.x/CHANGELOG.md)
- [Commits](https://github.com/carllerche/bytes/compare/v0.4.11...v0.4.12)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-06 15:05:01 -07:00
Greg Fitzgerald
97f2c96a7e Add a transaction and instruction 2019-03-06 15:04:15 -07:00
Greg Fitzgerald
5979627258 Add authorized voter 2019-03-06 15:04:15 -07:00
Pankaj Garg
9d580e363a Fix hostname part of queries in dashboard 2019-03-06 13:26:15 -08:00
Pankaj Garg
9163e5b004 Fix sorting order of stakes in confirmation time calculations 2019-03-06 13:11:04 -08:00
Pankaj Garg
0252bf2f46 fix fmt 2019-03-06 12:25:28 -08:00
Pankaj Garg
283bb84134 Create UDP socket once per process_loop for forwarding transactions 2019-03-06 12:25:28 -08:00
Michael Vines
0a4f909566 requestAirdrop RPC API is now optional 2019-03-06 10:23:57 -08:00
Michael Vines
516aa44aad Don't fetch the working_bank twice 2019-03-06 10:23:57 -08:00
Michael Vines
b1763f9187 Remove dead code 2019-03-06 10:23:57 -08:00
Michael Vines
b03fd782de Make room for more fields in JsonRpcConfig 2019-03-06 10:23:57 -08:00
Stephen Akridge
b850f3c1dd Remove unnecessary cleanup_paths
drop handles it
2019-03-06 11:17:37 -07:00
Tyera Eulberg
789a9df9f6 s/id/hash in block events 2019-03-06 08:51:10 -08:00
Michael Vines
bd39ab9365 Clean up exit signal handling 2019-03-05 19:20:29 -08:00
anatoly yakovenko
1c0cfb17a3 Start leader based on Poh tick height. (#3084)
* Start leader based on poh and test

* Equalize validator and leader stakes in LocalCluster

* Clear WorkingBank on poh_recorder reset
2019-03-05 17:56:51 -08:00
Michael Vines
9491999a95 Remove remaining erc20 references 2019-03-05 17:56:44 -08:00
Michael Vines
e2d30db7e1 Rename tokens to lamports 2019-03-05 17:56:44 -08:00
Michael Vines
3129e299e4 Rename tokens to lamports in programs/ 2019-03-05 17:56:44 -08:00
Michael Vines
0604bbb473 Rename tokens to lamports in wallet/ 2019-03-05 17:56:44 -08:00
Michael Vines
545feab6db Misc token to lamport renaming 2019-03-05 17:56:44 -08:00
Michael Vines
3794048c91 Rename tokens to lamports in book/ 2019-03-05 17:56:44 -08:00
Michael Vines
beb45f44ac solana-genesis: rename tokens to lamports 2019-03-05 17:28:06 -08:00
Michael Vines
f1d1852691 Rename tokens to lamports in core/ 2019-03-05 17:28:06 -08:00
Michael Vines
53f09c44f3 Rename tokens to lamports in sdk/ 2019-03-05 17:28:06 -08:00
Carl
bd237a2d6f Add transaction to test harness to set the delegate for validator vote accounts 2019-03-05 16:51:47 -07:00
Carl
76a7038335 Update test harness to set a delegate on validator vote accounts 2019-03-05 16:51:47 -07:00
Michael Vines
c24d95c885 Remove bench-tps, upload-perf, and bench-streamer from code coverage report 2019-03-05 15:35:31 -08:00
Rob Walker
cb0560df92 remove dead code 2019-03-05 15:35:24 -08:00
Sagar Dhawan
ec034a5cb9 Fix invalid Barrier transactions (#3139) 2019-03-05 15:16:36 -08:00
Greg Fitzgerald
ca99ebaaf4 Add way to create account with delegate in 1 tx 2019-03-05 16:14:57 -07:00
Rob Walker
b9e878ee80 slot_height considered harmful (#3135)
* slot_height considered harmful
* fix test_tick_slot_epoch_indexes
2019-03-05 14:18:29 -08:00
Tyera Eulberg
33c4c7e511 Split up long test 2019-03-05 15:16:51 -07:00
Tyera Eulberg
b67ac22336 Replace superfluous integration tests with needed one 2019-03-05 15:16:51 -07:00
Tyera Eulberg
6ff2572ebe Refactor system entrypoint to use helper fns; add unit tests 2019-03-05 15:16:51 -07:00
Michael Vines
a539c9ad67 Restore print ban, and widen the net 2019-03-05 14:09:40 -08:00
Michael Vines
1997640094 Remove prints 2019-03-05 14:09:40 -08:00
Michael Vines
e7eafbd24e Adapt to recent programs/ shuffle 2019-03-05 13:14:07 -08:00
Michael Vines
378a0f511e Stop looking for solana-fullnode-config 2019-03-05 12:44:27 -08:00
Sagar Dhawan
9349f90a59 Inherit transaction count from parent (#3134) 2019-03-05 12:34:21 -08:00
Stephen Akridge
0f1d6c6271 Check for no entries left in blocktree in a given slot
There may not be ENTRIES_PER_SEGMENT entries a slot, if so
then we will hang waiting for more.
2019-03-05 11:53:40 -08:00
Greg Fitzgerald
8e70f5bf84 Same fix, different location
What's this doing way up here?
2019-03-05 12:46:18 -07:00
Greg Fitzgerald
52fc974cdf The funder is not a staker 2019-03-05 12:46:18 -07:00
Sathish Ambley
6e9d803091 Remove usage of unsafe for Accounts 2019-03-05 10:13:03 -08:00
Greg Fitzgerald
fc8489a04d Stop using LocalVoteSigner 2019-03-05 09:34:54 -07:00
Tyera Eulberg
e248efce06 Add programs/system explicitly to CI test suite 2019-03-05 09:33:27 -07:00
Tyera Eulberg
b4084c6298 Fix random comment typo 2019-03-05 09:33:27 -07:00
Tyera Eulberg
2fdfa98d55 Fix process_pay SystemTransaction type 2019-03-05 09:33:27 -07:00
Tyera Eulberg
f506b0a224 Fix test: Prevent SystemInstruction CreateAccount from overwriting accounts in use 2019-03-05 09:33:27 -07:00
Tyera Eulberg
202adb1bf1 Create failing test 2019-03-05 09:33:27 -07:00
Greg Fitzgerald
885eeec3ed Boot storage program from the SDK 2019-03-05 07:16:33 -07:00
Greg Fitzgerald
5e9f802d7d Boot token_program from the SDK 2019-03-05 07:16:33 -07:00
dependabot[bot]
e4be57c3b6 Bump libc from 0.2.49 to 0.2.50
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.49 to 0.2.50.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.49...0.2.50)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-05 07:14:51 -07:00
Michael Vines
6ab6e6cb9b Clean up exit flag handing across TVU 2019-03-04 21:26:50 -08:00
Michael Vines
2a849ae268 Inline LeaderServices 2019-03-04 21:26:50 -08:00
Michael Vines
4808f6a9f8 Clean up exit flag handing in TPU 2019-03-04 21:26:50 -08:00
Michael Vines
96bfe92334 Clean up fullnode/tpu/tvu/fetch_stage exit signal 2019-03-04 21:26:50 -08:00
Michael Vines
e7cde846cb Clean up gossip service exit flag handling 2019-03-04 21:26:50 -08:00
Michael Vines
eb90d8d463 Clean up Rpc exit signal 2019-03-04 21:26:50 -08:00
Michael Vines
6a8a97f644 Remove dead code 2019-03-04 20:05:14 -08:00
Michael Vines
3fc846d789 Try to use the RPC exit API to cleanly exit nodes 2019-03-04 19:58:37 -08:00
Michael Vines
0f77531f09 Simplify pass-through arg handling 2019-03-04 19:58:37 -08:00
Michael Vines
20b831264e Properly plumb exit flag to PubSubService 2019-03-04 19:58:37 -08:00
Rob Walker
43bab23651 remove duplicate child creation (#3100)
* remove duplicate child creation
* resurrect test for partial slot
* simplify blocktree_processor some more (no tick_height, yay!)
* ensure frozen
2019-03-04 19:22:23 -08:00
Michael Vines
906df5e20e Exit signal cleanup: pass in references, make the receiver clone as needed 2019-03-04 18:43:21 -08:00
Rob Walker
794e961328 use Bank's notion of leader_id where possible (#3119) 2019-03-04 18:40:47 -08:00
Jack May
a481822321 Fix signatureUnsubscribe documentation (#3118) 2019-03-04 18:07:16 -08:00
Sagar Dhawan
dc42c12f2b Revert to more consistent naming (#3114) 2019-03-04 17:50:19 -08:00
Rob Walker
6d82123125 rename bank_id to bank_slot 2019-03-04 17:10:27 -08:00
Greg Fitzgerald
4f6d7702c5 Add a way to build unsigned transactions 2019-03-04 17:47:46 -07:00
Stephen Akridge
97274030b9 Add test with transaction with no signatures
Add checks for no signature
2019-03-04 16:42:52 -08:00
Michael Vines
9ce2bc94bf Add flag to enable the JSON RPC fullnodeExit API 2019-03-04 15:49:02 -08:00
Michael Vines
51502537b1 Remove extra reference 2019-03-04 15:49:02 -08:00
Michael Vines
7b49c9f09c Delete fullnode-config/ 2019-03-04 15:49:02 -08:00
Michael Vines
4714dc3a5c De-pub 2019-03-04 15:49:02 -08:00
Jack May
44013855d8 Book nits (#3096)
* Book nits

* nits
2019-03-04 15:44:54 -07:00
dependabot[bot]
846fdd3b2d Bump reqwest from 0.9.10 to 0.9.11
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.10 to 0.9.11.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.10...v0.9.11)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-04 13:47:37 -07:00
Michael Vines
03d6c9a552 Defeature bpf_loader; bpf_{c,rust} features now confined to programs/bpf 2019-03-04 11:02:37 -08:00
Michael Vines
d0be16b49a Remove duplicated code 2019-03-04 11:02:37 -08:00
Anatoly Yakovenko
3a4018cd03 review comments; rename Unsafe to TestOnlyAllowRpcFullnodeExit 2019-03-04 10:18:17 -08:00
Anatoly Yakovenko
5aaaa7f45c fixup! 2019-03-04 10:18:17 -08:00
Anatoly Yakovenko
c299dd390e Fullnode rpc to exit with unsafe config 2019-03-04 10:18:17 -08:00
Stephen Akridge
a3016aebaf Put accounts test data files in target directory
And gitignore it so those aren't added accidentally.
2019-03-04 10:17:02 -08:00
anatoly yakovenko
fb55d1c3d4 Design for leader to leader transition between slots (#2715) 2019-03-04 10:10:52 -08:00
Michael Vines
9c44c173df Remove ipv6 feature 2019-03-04 09:56:58 -08:00
Michael Vines
d708982f27 Remove unstable and test feature flags 2019-03-04 09:30:00 -08:00
anatoly yakovenko
bb774173bb Add PohRecorder reset tests (#3083)
* tests for reset

* fixup!
2019-03-04 08:08:22 -07:00
anatoly yakovenko
3906b1af6a deadcode (#3081) 2019-03-03 21:16:59 -08:00
carllin
de1d7ce312 Cleanup staking utils to divide functionality between delegate and normal node utitliites. Also replaces vote_states() with more generalized vote_accounts() in Bank. (#3070) 2019-03-03 18:04:13 -08:00
anatoly yakovenko
1654199b23 Use PohRecorder to synchronize instead of rotate. (#3080) 2019-03-03 16:44:06 -08:00
Greg Fitzgerald
2ec9bc9f05 Revive payments via Budget 2019-03-03 17:29:13 -07:00
Greg Fitzgerald
e8ae603a01 Add failing test for a Budget payment 2019-03-03 17:29:13 -07:00
Rob Walker
e4dba03e12 accounts shedding (#3078)
* accounts shedding

* fixup
2019-03-03 16:04:04 -08:00
Greg Fitzgerald
8ec10d4de9 Simplify Budget's serialize 2019-03-03 14:24:53 -08:00
Greg Fitzgerald
baca3e6b6b Cleanup Budget
* BudgetProgram -> BudgetState
* Instruction -> BudgetInstruction
* Move BudgetState into its own module
* BudgetInstruction::NewBudget -> BudgetInstruction::InitializeAccount
* BudgetInstruction::new_budget -> BudgetInstruction::new_initialize_account
2019-03-03 14:49:35 -07:00
Greg Fitzgerald
fc5fcd6cd4 Move native_loader into solana_runtime 2019-03-03 10:59:08 -07:00
Michael Vines
33496ffea2 Adjust paths 2019-03-02 22:11:48 -08:00
Michael Vines
b8b7de5522 Script can now be run from any directory 2019-03-02 22:11:48 -08:00
Michael Vines
109101c2dc Cleanup features and fix build errors 2019-03-02 22:11:48 -08:00
Michael Vines
534619f72f Update manifest-path 2019-03-02 22:11:48 -08:00
Greg Fitzgerald
44322124c8 Update paths 2019-03-02 22:11:48 -08:00
Greg Fitzgerald
9923c543e8 Fix ci scripts 2019-03-02 22:11:48 -08:00
Greg Fitzgerald
41b5899856 Move programs/Cargo.toml into bpf/ 2019-03-02 22:11:48 -08:00
Greg Fitzgerald
b830449f23 Move top-level native program tests to their respective crates 2019-03-02 22:11:48 -08:00
Greg Fitzgerald
037fcf6b3d Bump all native programs up a level
Don't categorize programs by a single backend.
2019-03-02 22:11:48 -08:00
Stephen Akridge
e1a1296b9b Fix cleanup_paths
Add back remove of parent in Accounts::drop, but
remove that in the cleanup_paths helper
for the account tests which do not use
make_default_dir.
2019-03-02 20:24:57 -08:00
Greg Fitzgerald
3f4ff3f7b5 Delete duplicate file 2019-03-02 18:57:11 -07:00
Michael Vines
cd4bccfd12 Remove snap support 2019-03-02 17:41:09 -08:00
Greg Fitzgerald
9c3e7e40cf Less pub 2019-03-02 17:36:51 -08:00
Michael Vines
a9a7fc56eb Purge MAX_RECENT_TICK_HASHES 2019-03-02 17:04:42 -08:00
Greg Fitzgerald
398b78dd97 Delete duplicate file 2019-03-02 16:44:36 -08:00
Greg Fitzgerald
1edf6c361e Move Vote program out of the SDK 2019-03-02 16:44:36 -08:00
Sagar Dhawan
b99e3eafdd Fix stakes not being setup correctly 2019-03-02 16:44:36 -08:00
Greg Fitzgerald
e6486b2824 Move Budget out of the SDK 2019-03-02 16:44:36 -08:00
Sagar Dhawan
d22a13257e Refactor bank get vote accounts (#3052) 2019-03-02 16:44:36 -08:00
Rob Walker
f4c5b9ccb0 remove remove_dir_all() of paths' parents (which we didn't make to begin with) 2019-03-02 12:36:41 -08:00
Michael Vines
a94880574b block_hash => blockhash 2019-03-02 12:13:30 -07:00
Michael Vines
0f1582c196 cargo fmt 2019-03-02 12:13:30 -07:00
Michael Vines
85159a0eb4 Rename JSON RPC getLastId to getRecentBlockHash 2019-03-02 12:13:30 -07:00
Michael Vines
258cf21416 Purge remaining last_id (now called block_hash) 2019-03-02 12:13:30 -07:00
Michael Vines
2bfad87a5f Rename Bank.last_id() to Bank.last_block_hash() 2019-03-02 12:13:30 -07:00
Michael Vines
95cbb8a5c0 Switch to recent_block_hash 2019-03-02 12:13:30 -07:00
Michael Vines
ce1b72809a Rename get_last_id() to get_recent_block_hash() 2019-03-02 12:13:30 -07:00
Michael Vines
4f3e149a98 Remove stale/wrong comments 2019-03-02 12:13:30 -07:00
Michael Vines
642d3d903f Rename get_storage_mining_entry_height to get_storage_entry_height for consistency 2019-03-02 12:13:30 -07:00
Michael Vines
81cd461591 Rename storage_last_id to storage_block_hash 2019-03-02 12:13:30 -07:00
Michael Vines
ea110efabd Rename AdvertiseStorageLastId to AdvertiseStorageRecentBlockHash 2019-03-02 12:13:30 -07:00
Michael Vines
0743f54dfe Rename LastIdNotFound to BlockHashNotFound 2019-03-02 12:13:30 -07:00
Michael Vines
176d5e0d37 Rename Transaction last_id field to recent_block_hash 2019-03-02 12:13:30 -07:00
Stephen Akridge
16b71a6be0 Cleanup fork id generation
Accounts could end up with id collision depending on how
banks are created, this shouldn't happen.
2019-03-02 10:34:41 -08:00
Michael Vines
13ee8efd42 Move build.rs into core/ 2019-03-02 09:52:18 -08:00
Michael Vines
5f5d779ee1 Move src/ into core/src. Top-level crate is now called solana-workspace 2019-03-02 09:52:18 -08:00
Greg Fitzgerald
7b849b042c Split rewards_program.rs 2019-03-02 10:11:37 -07:00
Michael Vines
d32f5b6cca Use process_blocktree to verify the ledger 2019-03-02 08:47:31 -08:00
Michael Vines
fcbcf000c4 Use a valid last_id 2019-03-02 08:47:31 -08:00
Michael Vines
2bc939f535 Adapt to slower moving last_ids 2019-03-02 08:47:31 -08:00
Michael Vines
d5de5bec4f Register a new last_id once per slot 2019-03-02 08:47:31 -08:00
Michael Vines
61beb42797 Decouple tick counting from hash queue 2019-03-02 08:47:31 -08:00
Michael Vines
e5be3e1dca HashQueue no longer hard codes max_entries 2019-03-02 08:47:31 -08:00
Greg Fitzgerald
986c54de58 Comment out test that's not actually testing anything
@sakridge, fyi
2019-03-02 07:50:32 -07:00
Greg Fitzgerald
49b7e67585 Return program error from process_transaction()
Our unit-test helper `process_transaction()` wasn't returning
program errors, which made testing programs tedious and
counter-intuitive.
2019-03-02 07:50:32 -07:00
Greg Fitzgerald
db825b6e26 Fix vote program bugs
Also:

* Add an assertion to the transaction builder if not enough
keypairs were provided for all keys that require signatures.
* Expose bugs in the runtime.
2019-03-02 07:50:32 -07:00
Tyera Eulberg
8e273caf7d Brush up data-plane-fanout to read less like a proposal 2019-03-01 22:50:42 -07:00
Anatoly Yakovenko
b1a648113f simple replay stage 2019-03-01 20:56:29 -08:00
Greg Fitzgerald
2782922f7a Rename BroadcastService back to BroadcastStage 2019-03-01 21:10:53 -07:00
anatoly yakovenko
041a06b432 kill multinode (#3038) 2019-03-01 20:09:13 -08:00
dependabot[bot]
269a82f796 Bump serde_derive from 1.0.88 to 1.0.89
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.88 to 1.0.89.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.88...v1.0.89)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-01 20:15:49 -07:00
Pankaj Garg
6b83ce4937 address review comments 2019-03-01 17:58:05 -08:00
Pankaj Garg
ae557104a5 Create vote account and fund it in local cluster test harness 2019-03-01 17:58:05 -08:00
Sagar Dhawan
6a34b11dd0 Sum up all stakes for a delegate when calculating stake (#3045) 2019-03-01 17:31:59 -08:00
Rob Walker
54417acfba changed vote_states to vote_accounts, more useable (#3047) 2019-03-01 17:22:49 -08:00
Rob Walker
29d12d9ff1 remove new_bank_from_parent_with_id() (#3039) 2019-03-01 16:39:23 -08:00
Stephen Akridge
4ee857ab7d More vote account fixes
vote_index not being maintained correctly during a squash.
The tokens==0 shielding accounts were being inserted with
owner=default Pubkey so they didn't know they are vote accounts
and should update the vote accounts set.
2019-03-01 16:25:14 -08:00
dependabot[bot]
771a88665c Bump serde from 1.0.88 to 1.0.89
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.88 to 1.0.89.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.88...v1.0.89)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-01 15:51:11 -07:00
Rob Walker
a7c18cc0b4 Fnbool_to_FnOptionT 2019-03-01 14:12:50 -08:00
Michael Vines
e30e4cc603 Remove get_confirmation_timestamp() from HashQueue 2019-03-01 13:38:17 -08:00
Michael Vines
fdc31e99df Clean up type casts 2019-03-01 13:38:17 -08:00
Michael Vines
a72325dbc2 entry_id -> entry 2019-03-01 13:38:17 -08:00
Michael Vines
67b6be66c8 Rename MAX_ENTRY_IDS 2019-03-01 13:38:17 -08:00
Michael Vines
8ec13d557f Generalize tick_height to hash_height 2019-03-01 13:38:17 -08:00
Michael Vines
31f570a9f4 Remove unused functions 2019-03-01 13:38:17 -08:00
Sagar Dhawan
46b7b795bf Fix Typo in Fullnode Diagram (#3036) 2019-03-01 11:58:09 -08:00
Rob Walker
38273427ad have banks save vote_state by epoch to support stable leader schedules (#3019)
have banks save vote_state by epoch to support stable leader schedules
2019-03-01 11:54:28 -08:00
Michael Vines
46fb0b1b94 Rename last_id to last_hash within HashQueue 2019-03-01 11:48:09 -08:00
Michael Vines
224b705f8d Rename genesis_block.last_id() to genesis_block.hash() 2019-03-01 11:48:09 -08:00
Greg Fitzgerald
028f41eb51 Move secure vote signing out of proposals 2019-03-01 12:16:28 -07:00
anatoly yakovenko
c27726e065 Add a black box local cluster harness (#3028)
Integration test harness for the network.
2019-03-01 10:36:52 -08:00
Michael Vines
a57fb00584 Rename last_id_queue.rs to hash_queue.rs 2019-03-01 09:50:51 -08:00
Michael Vines
360055ad70 Rename LastIdQueue to HashQueue 2019-03-01 09:50:51 -08:00
Michael Vines
558f10c862 Rename PohEntry.id to PohEntry.hash 2019-03-01 09:50:51 -08:00
Greg Fitzgerald
c53c351759 Rename erc20 to token-program
Everything it uses already had that name, just the crate was never
renamed.
2019-03-01 10:47:38 -07:00
Michael Vines
7c4473e0aa Rename Entry.id to Entry.hash 2019-03-01 09:31:49 -08:00
Michael Vines
7e7b79ef34 Rename prev_id to prev_hash 2019-03-01 09:31:49 -08:00
Michael Vines
e993d511e3 Rename last_entry_id variables to last_entry_hash 2019-03-01 09:01:59 -08:00
Michael Vines
251b0957f1 Ignore flaky test_dropped_handoff_recovery 2019-03-01 09:01:28 -08:00
Jack May
b9524217fe Update rust example to use BPF enabled infrastructure (#2974) 2019-02-28 22:05:11 -08:00
Michael Vines
6b228df3df Remove last_entry_id/next_blob_index from TvuRotationInfo 2019-02-28 21:57:17 -08:00
Michael Vines
6cf6a1ccc3 process_blocktree() now halts forks at the first partial slot 2019-02-28 21:57:17 -08:00
Michael Vines
d889e77fba Add reset_slot_consumed() 2019-02-28 21:57:17 -08:00
Michael Vines
93d65aa9cc Use your words 2019-02-28 21:02:29 -08:00
Michael Vines
f216a7179a Ignore test_full_leader_validator_network 2019-02-28 21:01:10 -08:00
Sagar Dhawan
434b8a8970 Fix another PR race 2019-02-28 20:11:50 -08:00
carllin
cc9191f1b0 Update blocktree API's (#3025) 2019-02-28 19:49:22 -08:00
Rob Walker
567bbecca0 use bank.id() where we want 'slot'; bank.slot_height() is not slot (#3014) 2019-02-28 19:07:47 -08:00
Sagar Dhawan
07e4f9a611 Fix PR race 2019-02-28 18:44:07 -08:00
Pankaj Garg
b41286919d Rename bank.id to bank.slot (#3018) 2019-02-28 18:02:45 -08:00
Jack May
564057c812 Bump rust-bpf-sysroot to pull in liballoc 2019-02-28 17:25:28 -08:00
Sagar Dhawan
20e4edec61 Refactor Vote Program Account setup (#2992) 2019-02-28 17:08:45 -08:00
Pankaj Garg
d5f0e49535 Refactor fullnode rotation test (#3015) 2019-02-28 15:53:09 -08:00
Pankaj Garg
30bccc0c68 Fix slot index used while calculating leader schedule
- slot_leader_at() was using absolute slot number instead of index in the epoch
2019-02-28 15:41:01 -08:00
Stephen Akridge
1c44b738fe Fix vote_accounts test 2019-02-28 15:22:47 -08:00
carllin
217f30f9c3 Add get_supermajority_slot() function (#2976)
* Moved supermajority functions into new module, staking_utils

* Move staking functions out of bank, and into staking_utils, change get_supermajority_slot to only use state from epoch boundary

* Move bank slot height in staked_nodes_at_slot() to be bank id
2019-02-28 13:15:25 -08:00
Greg Fitzgerald
fec867539d More SlotMeta docs (#3011) 2019-02-28 12:18:11 -07:00
Rob Walker
d123d86d84 remove forks.working_bank() where possible (#3010) 2019-02-28 10:57:58 -08:00
Greg Fitzgerald
485ccd20e4 Use TransactionBuilder in the Rewards transaction 2019-02-28 10:53:26 -08:00
Greg Fitzgerald
8d004ee947 Clarify is_full 2019-02-28 11:06:06 -07:00
Greg Fitzgerald
4704aa1f80 Rename SlotMeta::is_trunk to SlotMeta::is_rooted 2019-02-28 10:39:56 -07:00
Michael Vines
271115a6be Switch blockstream_service to create_new_tmp_ledger! 2019-02-28 07:59:17 -08:00
Greg Fitzgerald
a79caf7795 Test transaction with a fee 2019-02-28 08:56:55 -07:00
Greg Fitzgerald
404aa63147 Add TransactionBuilder 2019-02-28 08:56:55 -07:00
Greg Fitzgerald
4610706d9f Generalize instruction
For serialization: Instruction<u8, u8>
For users:         Instruction<Pubkey, (Pubkey, bool)>
For programs:      Instruction<Pubkey, (Pubkey, bool, Account)>
2019-02-28 08:56:55 -07:00
Greg Fitzgerald
8e4cd6fcc3 Delete leader scheduler artifact 2019-02-28 07:47:37 -08:00
Tyera Eulberg
6eb09a6901 Trigger blockstream on full-slot notification (clean up superfluous stuff) 2019-02-28 07:20:16 -07:00
Tyera Eulberg
e04d2379df Remove bank dependency from forward_entries 2019-02-28 07:20:16 -07:00
dependabot[bot]
5b72a984a3 Bump serde_json from 1.0.38 to 1.0.39
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.38 to 1.0.39.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.38...v1.0.39)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-28 06:57:17 -07:00
Jack May
cf545e64b8 xargo requiress sysroot as source to build dependent crates 2019-02-28 00:49:06 -08:00
Jack May
ac1e266588 Bump rust-bpf to pull in built-in target bpfel-unknown-unknown (#3001) 2019-02-28 00:26:50 -08:00
Sathish Ambley
0f2226901d Fix transaction count after squash 2019-02-27 23:21:49 -08:00
Michael Vines
dad1511484 test_bank_squash: validate transaction_count() before/after squashing 2019-02-27 23:21:49 -08:00
Michael Vines
05646d72b8 Remove unnecessary fetching of a new last_id 2019-02-27 22:58:59 -08:00
Michael Vines
7ccd601100 Remove incorrect file description 2019-02-27 22:36:18 -08:00
Rob Walker
d23f8a3e99 increase accounts coverage (#2993) 2019-02-27 21:42:14 -08:00
Michael Vines
0dc5af62ff Standardize on 'use log::*' for easy access to all log level macros 2019-02-27 21:16:23 -08:00
Michael Vines
855f1823a4 Include solana-logger for use by tests 2019-02-27 21:16:23 -08:00
Rob Walker
7fd40f1eb9 add failing test for #2994 (#2995) 2019-02-27 20:46:26 -08:00
Stephen Akridge
95f2f05f45 Refactor account serialize in appendvec
Remove dupe code and see how this compares to bincode.
Add benchmarks to justify custom serialize and also experiment with
safe solutions.
2019-02-27 19:57:50 -08:00
Michael Vines
cd976a8082 s/tx/transaction/ for function names 2019-02-27 17:00:10 -08:00
Michael Vines
163ed40efb Send program write transactions concurrently 2019-02-27 17:00:10 -08:00
Michael Vines
32aaa5fd06 Derive retry timeout from slot duration 2019-02-27 17:00:10 -08:00
Rob Walker
163874d4da remove purge parameter to accounts (#2990) 2019-02-27 16:06:06 -08:00
Tyera Eulberg
873007bae1 Fix tests and move bank dependency slightly 2019-02-27 15:31:23 -08:00
Tyera Eulberg
a67a88c8ef Hoist EntrySender in ReplayStage 2019-02-27 15:31:23 -08:00
carllin
6d1b43f1b1 Make leader_schedule a utitlity module named leader_schedule_utils (#2988) 2019-02-27 14:41:46 -08:00
Sagar Dhawan
3a20a20807 Reintroduce leader_id to blobs (#2986) 2019-02-27 13:37:08 -08:00
Greg Fitzgerald
e45559a1a7 Add slot 3 back to ASCII art (#2979)
* Add slot 3 back to ASCII art

* New slot-oriented diagrams

When 1-block-per-slotm, slots are drawn vertically. That's the ideal
case. Abandoning a block is what should look like something forking
off to the side.
2019-02-27 14:27:58 -07:00
Michael Vines
140954a53c Remove Tpu::is_leader(), fullnode doesn't need it anymore 2019-02-27 11:55:21 -08:00
Michael Vines
b5d7ac3ce3 Set delay based on ticks_per_slot to ensure the test makes it to a new block 2019-02-27 11:13:29 -08:00
Michael Vines
b5d714eec7 Derive retry timeout from slot duration 2019-02-27 11:13:29 -08:00
Michael Vines
36cdaffe25 Fix indent 2019-02-27 11:11:24 -08:00
Michael Vines
16e2443f61 Remove unnecessary if 2019-02-27 11:06:38 -08:00
Rob Walker
9adbc1dd60 nit: always pass &Arc<Bank>, clone() only where consumed 2019-02-27 10:55:43 -08:00
Michael Vines
b6ccb475f1 Clarify FIXME source 2019-02-27 10:37:48 -08:00
Sathish Ambley
ca0f16ccc0 Fix test failure 2019-02-27 08:22:52 -08:00
Stephen Akridge
c241a56fb0 Remove extraneous print. 2019-02-27 08:22:52 -08:00
Sathish Ambley
4149f7fd1c Fix review comments 2019-02-27 08:22:52 -08:00
Sathish Ambley
cc68ecdacf Use default if previous values do not exist 2019-02-27 08:22:52 -08:00
Sathish Ambley
96b349dcbb Performance optimizations 2019-02-27 08:22:52 -08:00
Stephen Akridge
5216952691 Change benchmark path to target/ or OUT_DIR
Also reduce some code duplication with cleanup_dirs fn.
2019-02-27 08:22:52 -08:00
Sathish Ambley
c46b2541fe - Fix lock/unlock of accounts
- Fix format check warnings
2019-02-27 08:22:52 -08:00
Stephen Akridge
2158ba5863 tx count per fork 2019-02-27 08:22:52 -08:00
Stephen Akridge
180d297df8 Rebase and panic with no accounts
Add Accounts::has_accounts function for hash_internal_state calculation.
2019-02-27 08:22:52 -08:00
Sathish Ambley
c276375a0e Persistent account storage across directories 2019-02-27 08:22:52 -08:00
Sathish Ambley
130563cd4c AppendVec 2019-02-27 08:22:52 -08:00
Michael Vines
9e2a7921c8 Recover from rebase 2019-02-26 22:08:17 -08:00
Michael Vines
9539154a4a Remove test_name arg 2019-02-26 22:08:17 -08:00
Michael Vines
84bd9296cd Centralize unwrap() within create_new_tmp_ledger! 2019-02-26 22:08:17 -08:00
Michael Vines
88ecce12a2 No longer need to give new_fullnode() a random string 2019-02-26 22:08:17 -08:00
Michael Vines
5a7b99ecc2 Add/employ create_new_tmp_ledger!() 2019-02-26 22:08:17 -08:00
Michael Vines
55a76ed4b0 Populate test ledgers with a full slots to reduce test boilerplate 2019-02-26 22:08:17 -08:00
carllin
033a04129a Add lockouts to vote program (#2944)
* Add lockouts to vote program

* Rename MAX_VOTE_HISTORY TO MAX_LOCKOUT_HISTORY, change process_vote() to only pop votes after MAX_LOCKOUT_HISTORY + 1 votes have arrived

* Correctly calculate serialized size of an Option, rename root_block to root_slot
2019-02-26 22:19:31 -07:00
Pankaj Garg
789fff2ae2 Replace LeaderScheduler with LeaderScheduler1 (#2962)
* Migrate to LeaderScheduler1 (and added some missing methods)
* Delete LeaderScheduler
* Rename LeaderScheduler1 to LeaderScheduler
2019-02-26 22:16:18 -07:00
Jack May
9750488200 Update rust-bpf-sysroot to pull in latest core,stdsimd (#2972) 2019-02-26 19:55:28 -08:00
dependabot[bot]
46ec5cf765 Bump dirs from 1.0.4 to 1.0.5
Bumps [dirs](https://github.com/soc/dirs-rs) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/soc/dirs-rs/releases)
- [Commits](https://github.com/soc/dirs-rs/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-26 20:04:36 -07:00
Carl
ee16cc77a3 Move last_ids to a simple Hash, unwrap from Arc<RwLock>> 2019-02-26 18:19:26 -08:00
Michael Vines
a669241cb1 Add/use get_tmp_ledger_path!() and tmp_copy_blocktree!() 2019-02-26 17:50:43 -08:00
Jack May
0174945853 Program tests now check signature status (#2965) 2019-02-26 17:09:57 -08:00
Rob Walker
ea0837973e blocktree_processor to use slots as bank ids, and squash 2019-02-26 17:35:22 -07:00
dependabot[bot]
85819983d7 Bump lazy_static from 1.2.0 to 1.3.0
Bumps [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/rust-lang-nursery/lazy-static.rs/releases)
- [Commits](https://github.com/rust-lang-nursery/lazy-static.rs/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-26 17:31:19 -07:00
Jack May
78841532f7 Add Rust helpers (#2959) 2019-02-26 15:17:38 -08:00
Stephen Akridge
72214b2b68 Squash test to test parent bank after squash 2019-02-26 15:15:34 -08:00
Sagar Dhawan
ee83a2ac29 Make stake sorting more deterministic for data plane 2019-02-26 14:11:08 -08:00
Michael Vines
82c759b6cb Add whitespace, comment cleanup 2019-02-26 14:07:39 -08:00
Michael Vines
6de5354b8e Update the RPC bank on fullnode rotation 2019-02-26 14:07:39 -08:00
Rob Walker
87281f6ed5 ensure at Accounts level that tokens == 0 means None (#2960) 2019-02-26 13:51:39 -08:00
Jack May
a8cd66ffa2 Pull Rust enabled LLVM (#2957) 2019-02-26 13:03:57 -08:00
Michael Vines
d1e1258f97 Revert "Ignore flaky test_active_set_refresh_with_bank"
This reverts commit 10ad536e09.
2019-02-26 12:04:58 -08:00
Sagar Dhawan
4d73bbe48f Fix flaky gossip weighted tests 2019-02-26 11:58:03 -08:00
Michael Vines
10ad536e09 Ignore flaky test_active_set_refresh_with_bank 2019-02-26 11:56:47 -08:00
Michael Vines
bc2d4c7681 Clean up test_boot_validator_from_file() 2019-02-26 11:12:05 -08:00
Michael Vines
a7f200847f Clean up test_leader_restart_validator_start_from_old_ledger 2019-02-26 11:12:05 -08:00
Michael Vines
411f154827 Reduce log spam 2019-02-26 11:12:05 -08:00
anatoly yakovenko
6dcb97af9e Move PohService and PohRecorder out of banking_stage and into fullnode (#2852)
* Move PohService out of banking_stage and into fullnode.

* 10 second slots
2019-02-26 10:48:18 -08:00
Michael Vines
9420ba52e9 Squash the new working bank to ensure zero-balance accounts get purged 2019-02-26 10:09:31 -08:00
Greg Fitzgerald
ec35c1fc79 Fix leader scheduling in replay stage 2019-02-26 09:51:12 -07:00
Greg Fitzgerald
b752511f41 Attempt to pull the completed replication work into the book 2019-02-26 09:23:12 -07:00
Greg Fitzgerald
af206111e2 Hoist new leader scheduler up to protocol level
Attempt to feel similar to LeaderScheduler to easy migration.
2019-02-26 08:23:01 -08:00
Greg Fitzgerald
ba50e1ac81 Move data plane fanout chapter out of proposals 2019-02-26 09:20:09 -07:00
Greg Fitzgerald
f9f493ee7a Tighten up storage_stage changes 2019-02-26 09:05:00 -07:00
Tyera Eulberg
137233b4a1 Add EntryMeta wrapper 2019-02-26 09:05:00 -07:00
Greg Fitzgerald
3897b66270 Let the bank creator decide where to send transaction fees 2019-02-26 08:06:08 -07:00
Greg Fitzgerald
feefdca969 Minor cleanup to Bank and LastIdQueue 2019-02-26 06:46:38 -08:00
Rob Walker
25690ff078 merge_parents() => squash() (#2943) 2019-02-25 20:34:05 -08:00
Michael Vines
897279eddb Encapsulate log::Level so counter macro users don't need to use it 2019-02-25 20:01:30 -08:00
Carl
5f5725a4ea Re-add leader scheduler 2019-02-25 19:28:24 -08:00
Jack May
6a61f25735 Only install rust-bpf if rust-bpf version changes (#2939) 2019-02-25 19:09:16 -08:00
Anatoly Yakovenko
454c66f988 fixup! 2019-02-25 18:17:36 -08:00
Carl
3e893ffddc Remove max_tick_height, leader_scheduler from broadcast_service 2019-02-25 18:17:36 -08:00
Anatoly Yakovenko
58eebd7f6c Remove tick counting from broadast service 2019-02-25 18:17:36 -08:00
Jack May
ba5077701d Avoid possible simplified lowering of passed struct (#2938) 2019-02-25 17:05:59 -08:00
Pankaj Garg
2f44555437 Fix fullnode test 2019-02-25 16:55:22 -08:00
Pankaj Garg
299b642803 Cleanup fullnode rotate integration test, and unignore two tests 2019-02-25 16:55:22 -08:00
Jack May
a2bf59cbba Ignore rust toolchain and sysroot 2019-02-25 16:40:35 -08:00
Jack May
329382f016 Pull BPF enabled rustc and sysroot into SDK (#2936) 2019-02-25 15:35:45 -08:00
Rob Walker
67c9bbc6b2 * drop parents once merged (#2930)
* add bank.id() which can be used by BankForks, blocktree_processor
* add bank.hash(), make hash_internal_state() private
* add bank.freeze()/is_frozen(), also useful for blocktree_processor, eventual freeze()ing in replay
2019-02-25 14:05:02 -08:00
Michael Vines
6088b3bfc8 Replace DEFAULT_SLOT_HEIGHT with 0 2019-02-25 13:09:13 -08:00
Jack May
2be7896157 Pull in latest rBPF that includes Rust dependent changes (#2929) 2019-02-25 12:42:48 -08:00
Carl
0b37f530ae Start replay stage from the slot-relative blob index, not the global entry height 2019-02-25 11:38:46 -08:00
Carl
c13ae10d31 Fix replay_stage to 1) skip leader slots, 2) create/set working banks properly 2019-02-25 11:38:46 -08:00
Carl
1e15e6375a Check for entry height in the unchanging bank_forks_info instead of a racy check to blocktree 2019-02-25 11:38:46 -08:00
Michael Vines
ed684c5ec6 Build docker image with rust 1.32 2019-02-25 09:16:11 -08:00
Greg Fitzgerald
2fbdec59cb Generalize access to staked nodes 2019-02-25 08:49:43 -08:00
Greg Fitzgerald
710f88edda Handle edge cases earlier
We have lots of tests that work off genesis block.  Also, one
might want to generate a future leader schedule under the assumption
the stakers stay the same.
2019-02-25 08:49:43 -08:00
Greg Fitzgerald
db899a2813 Inline LeaderSchedule::new_from_bank()
Breaks circular dependency and offers more flexibility in bank's
usage.
2019-02-25 08:49:43 -08:00
Greg Fitzgerald
aad0d90fdd Use epoch_height to generate schedule instead of last_id
I had suggested the last_id, but that puts an unnecessary dependency
on LastIdsQueue. Using epoch height is pretty interesting in that
given the same set of stakers, you simply increment the seed once
per epoch.

Also, tighten up the LeaderSchedule code.
2019-02-25 08:49:43 -08:00
Greg Fitzgerald
72b4834446 Add Bank::prev_slot_leader() and Bank::next_slot_leader() 2019-02-25 08:49:43 -08:00
Greg Fitzgerald
ec48c58df1 Award tx fees to validators in new leader schedule
Also, generalize the leader_schedule functions a bit to allow for
prev_slot_leader and next_slot_leader, should they be needed.
2019-02-25 08:49:43 -08:00
Greg Fitzgerald
0947ec59c9 Expose the new leader schedule functionality from the bank. 2019-02-25 08:49:43 -08:00
Greg Fitzgerald
d67211305c Ignore slow benchmarks 2019-02-24 23:15:05 -07:00
anatoly yakovenko
c65046e1a2 Use PohRecorder as the Poh synchronization point. (#2926)
Cleanup poh_recorder and poh_service.

* ticks are sent only if poh.tick_height > WorkingBank::min_tick_height and <= WorkingBank::max_tick_height
* entries are recorded only if poh.tick_height >= WorkingBank::min_tick_height and < WorkingBank::max_tick_height
2019-02-24 08:59:49 -08:00
Greg Fitzgerald
ba7d121724 Switch to Bank::staked_nodes(); want node_id, not staker_id
Also, update LeaderScheduler's code to use node_id as well.
Unfortuntely, no unit tests for this, because there's currently
only one way to set staker_id/node_id, and they are both set
to the same value.
2019-02-24 07:52:44 -07:00
Greg Fitzgerald
a1070e9572 Split ActiveStakers over Bank and LeaderScheduler 2019-02-24 07:52:44 -07:00
Greg Fitzgerald
f89e83ae49 Delete redundant code 2019-02-23 16:09:00 -08:00
Greg Fitzgerald
264f502ed7 Query the bank for the current slot leader 2019-02-23 15:51:37 -07:00
Greg Fitzgerald
c5876ddca9 Make LeaderScheduler::new_with_window_len private
It's useful for unit-testing, but generally isn't a variable
validators should be modifying. Blockstream and BlockstreamService
were the only ones using it. Switching them from a hard-coded 10
to the default didn't cause any test failures, so running with it.
2019-02-23 14:48:27 -07:00
Greg Fitzgerald
fdf6cae6fb Use bank for leader scheduler's config
This ensures GenesisBlock is always configured with the same
ticks_per_slot as LeaderScheduler. This will make it easier
to migrate to bank-generated schedules.
2019-02-23 14:48:27 -07:00
Greg Fitzgerald
d26f836212 tmp_copy_ledger -> tmp_copy_blocktree 2019-02-23 08:32:05 -07:00
Greg Fitzgerald
da98982732 Deprecate tmp_copy_ledger
This should allow us to get rid of all the manual routing of
ticks_per_slot in the test suite.
2019-02-23 07:57:45 -07:00
Greg Fitzgerald
cc10e84ab7 sample_ledger -> sample_blocktree 2019-02-23 07:08:11 -07:00
Greg Fitzgerald
6cd91cd7ec Hold slots_per_epoch, not ticks_per_epoch
Same as bank and less invariants to check
2019-02-22 22:02:23 -07:00
Greg Fitzgerald
e19dbdc527 Use Bank for ticks_per_slot 2019-02-22 22:02:23 -07:00
Stephen Akridge
0b8809da6e Fix duplicated path to fullnode
Fixes flaky tests.
2019-02-22 16:35:40 -08:00
Jack May
35aefdf1db Reduce test noise (#2907) 2019-02-22 16:27:19 -08:00
Stephen Akridge
66891d9d4e Don't use global storage account
Other accounts would not be able to modify the system accounts userdata.
2019-02-22 15:59:55 -08:00
dependabot[bot]
6bca577d6d Bump libc from 0.2.48 to 0.2.49
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.48 to 0.2.49.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-22 16:45:14 -07:00
Greg Fitzgerald
f5400ccefc Ignore storage test
@sakridge is working on a fix.
2019-02-22 16:18:10 -07:00
Greg Fitzgerald
a56d717ea8 Add a check that shows why the storage program is failing 2019-02-22 16:18:10 -07:00
Greg Fitzgerald
11c7aab023 Add some unit-tests 2019-02-22 16:18:10 -07:00
Greg Fitzgerald
5541eedcc4 Reject modifications to userdata if not owned by the program 2019-02-22 16:18:10 -07:00
Jack May
77ea4cd285 Reapply dependency Band-aid to make CI happy 2019-02-22 15:56:07 -07:00
Greg Fitzgerald
8353b420d1 Move blocktree-oriented diagram out of proposals 2019-02-22 15:24:36 -07:00
Jack May
71602fe04b Fix root package dependencies (#2899) 2019-02-22 14:08:25 -08:00
dependabot[bot]
054c12ea0f Bump hex-literal from 0.1.2 to 0.1.3
Bumps [hex-literal](https://github.com/RustCrypto/utils) from 0.1.2 to 0.1.3.
- [Release notes](https://github.com/RustCrypto/utils/releases)
- [Commits](https://github.com/RustCrypto/utils/compare/hex-literal-v0.1.2...hex-literal-v0.1.3)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-22 13:47:55 -07:00
Pankaj Garg
0003dbf3ba remove unnecessary imports 2019-02-22 12:13:05 -08:00
Pankaj Garg
c07b6c30a1 Remove special casing of ProgramError in blocktree processor
- Also refactor bank.rs and add unit tests
2019-02-22 12:13:05 -08:00
Stephen Akridge
bad48ce83c Split replicator doc into what is implemented and what is not 2019-02-22 13:12:49 -07:00
Greg Fitzgerald
2d03ae2fae Migrate fullnode to create_tmp_sample_blocktree 2019-02-22 11:18:01 -07:00
Jack May
3a7008949f Build all deps (#2896) 2019-02-22 09:49:25 -08:00
Michael Vines
973ad7554e Remove superfluous GenesisBlock::load() 2019-02-22 08:41:59 -08:00
Greg Fitzgerald
3be154490d Deprecate create_tmp_sample_ledger 2019-02-22 00:24:46 -07:00
Jack May
3610768888 Run featurized tests on sub-packages (#2867) 2019-02-21 22:38:36 -08:00
Greg Fitzgerald
4602d3bf46 Unit-tests can use ordinary keypairs 2019-02-21 22:01:20 -08:00
Greg Fitzgerald
778583ad08 Inline BlockConfig::ticks_per_slot 2019-02-21 20:37:21 -08:00
Michael Vines
fb904e7a29 Enable CUDA persistence mode to reduce surprises 2019-02-21 19:25:17 -08:00
Michael Vines
b501090443 Route BankForks into the ReplayStage 2019-02-21 19:25:17 -08:00
Greg Fitzgerald
f0f55af35b Add scheduler config to genesis
Anything that affects how the ledger is interpreted needs to be
in the genesis block or someplace on the ledger before later
parts of the ledger are interpreted. We currently don't have an
on-chain program for cluster parameters, so that leaves only
the genesis block option.
2019-02-21 17:29:55 -08:00
Pankaj Garg
3e8d96a95b fix failing tests 2019-02-21 16:35:23 -08:00
Pankaj Garg
9713a3ac02 fix clippy warnings 2019-02-21 16:35:23 -08:00
Pankaj Garg
5c9777970d moved fee collection code to runtime 2019-02-21 16:35:23 -08:00
Pankaj Garg
c142a82ae0 Charge transaction fee even in case of ProgramError 2019-02-21 16:35:23 -08:00
Tyera Eulberg
18d48f09f8 Plumb blockstreamer name through testnet scripts 2019-02-21 17:24:29 -07:00
Tyera Eulberg
deeabb862d Call it blockstreamer 2019-02-21 17:24:29 -07:00
Tyera Eulberg
d8f6865338 Rename EntryStream to Blockstream 2019-02-21 17:24:29 -07:00
Tyera Eulberg
4a0c759795 Fix misspellings stumbled on 2019-02-21 17:24:29 -07:00
Tyera Eulberg
a131c90260 Add doc for api node 2019-02-21 17:24:29 -07:00
Carl
fc48062867 Rename active_window_length to active_window_num_slots 2019-02-21 15:48:13 -08:00
Stephen Akridge
f77788447c Debug for Account
Derive prints the full userdata vec which is questionably useful.
2019-02-21 14:57:32 -08:00
Michael Vines
d25fc7a649 Stop passing blob_index unnecessarily into ReplayStage 2019-02-21 15:33:01 -07:00
Sagar Dhawan
bf3d2bd2ec Update Gossip entry in the book 2019-02-21 15:32:21 -07:00
Carl
60a6ff80ee Change votes and associated test/helper functions to vote based on slot height 2019-02-21 15:31:53 -07:00
Carl
9e1c5e1ab0 switch vote program to use slot height instead of tick height, change confirmation computation to use slots 2019-02-21 15:31:53 -07:00
Greg Fitzgerald
20fffd8abf Delete BankForks::finalized_bank() 2019-02-21 13:21:08 -08:00
Michael Vines
98ed785711 Cargo.lock 2019-02-21 13:00:19 -08:00
Michael Vines
7cb695df12 RetransmitStage now gets a BankForks 2019-02-21 12:56:56 -08:00
Michael Vines
c94bc2a0b6 Remove dead code 2019-02-21 12:38:43 -08:00
Greg Fitzgerald
511085b747 Make trait pub 2019-02-21 13:32:25 -07:00
Greg Fitzgerald
f76ac94d70 Remove leader_schedule_offset public method
Also,

* Rename the private variable to include units.
* Better doc
2019-02-21 12:28:11 -08:00
Greg Fitzgerald
32caa55d67 Offer a way to get the leader_schedule from any Bank instance 2019-02-21 12:28:11 -08:00
Jack May
b69475937f Program tests depend on native/noop (#2873) 2019-02-21 12:22:55 -08:00
Rob Walker
f6ff33db8e * add merge_parents(), which means 'eat your parent' (#2851)
* add is_root(), which is false if the bank has a parent
* use is_root() for store_slow and store_accounts to decide whether to purge on zero balance
2019-02-21 12:08:50 -08:00
Michael Vines
dcf1200d2a Make Fullnode do less work on rotation, ReplayStage can just pass along more details 2019-02-21 11:13:06 -08:00
Greg Fitzgerald
40977fa99f More forward-looking test 2019-02-21 10:54:25 -07:00
Greg Fitzgerald
f4df8ff5b3 Add slot_height() and epoch_height() methods to Bank 2019-02-21 10:54:25 -07:00
Michael Vines
080db1c62d Plumb BankForks into GossipService 2019-02-20 22:19:51 -08:00
Michael Vines
4d5e2c8a4d Plumb BankForks into RPC subsystem 2019-02-20 21:46:48 -08:00
Sagar Dhawan
13d018e3e1 Fix stake selection for the Data Plane (#2863)
* Update data-plane to use stakes instead of a bank directly

* Rename get_stakes to staked_nodes
2019-02-20 21:38:16 -08:00
Michael Vines
59ee2b8892 Fullnode now holds a BankForks instead of a Bank 2019-02-20 21:13:04 -08:00
Michael Vines
0dde79f42b Push BankForks into Fullnode::new() 2019-02-20 21:13:04 -08:00
Greg Fitzgerald
a4411ef6a1 Generate a schedule from a bank 2019-02-20 20:33:33 -08:00
Sagar Dhawan
3c62e2332e Cleanup stakes for gossip (#2860) 2019-02-20 20:02:47 -08:00
Michael Vines
1cd88968cf Remove get_leader_for_next_tick() 2019-02-20 19:33:03 -08:00
Michael Vines
28a53959e0 Remove dead types 2019-02-20 18:39:32 -08:00
carllin
7c26a4d0a0 Add weighted sampling based on stakes (#2854)
* Add weighted sampling based on stakes
2019-02-20 18:21:08 -08:00
Michael Vines
6ed2e4c187 process_blocktree now loads forks 2019-02-20 17:27:02 -08:00
Sagar Dhawan
a484c87354 Make gossip selection stake based (#2848) 2019-02-20 17:08:56 -08:00
Michael Vines
33c7f92f56 Dial down CI timeouts 2019-02-20 16:43:13 -08:00
Greg Fitzgerald
b8f6280fe5 Move hash_internal_state tests into runtime
This was intended as a Bank test, but only in blocktree_processor
because of its dependency on Entry, which solana_runtime doesn't
know about.
2019-02-20 16:13:26 -08:00
Greg Fitzgerald
822bebea46 Allow multiple forks without regenerating the hash 2019-02-20 16:13:26 -08:00
Greg Fitzgerald
582a7192ec Hold Bank's own parent hash instead of the parent's 2019-02-20 16:13:26 -08:00
Anatoly Yakovenko
5492aad61e Cache ticks until a working bank can pick them up 2019-02-20 14:14:38 -08:00
Anatoly Yakovenko
27f973c923 github review 2019-02-20 14:19:25 -07:00
Anatoly Yakovenko
3357cebcdb Added notes from discussion on discord 2019-02-20 14:19:25 -07:00
Anatoly Yakovenko
7ce9c0a2e9 cleanup runtime chapter 2019-02-20 14:18:43 -07:00
Greg Fitzgerald
e9daf57d7f Absorb LeaderScheduler's rank_active_set()
Delete overly-complicated tests
2019-02-20 13:13:31 -07:00
Greg Fitzgerald
1c2169aec7 Use rank_stakes() in LeaderScheduler 2019-02-20 13:13:31 -07:00
Greg Fitzgerald
cf163a9dab Remove unutilized cuteness 2019-02-20 13:13:31 -07:00
Greg Fitzgerald
dfcf3f94dc Absorb LeaderScheduler::get_active_set()
No functional changes
2019-02-20 13:13:31 -07:00
Greg Fitzgerald
b13fb6097f Get rid of the HashSet special case
ActiveSet ranks on construction. get_active_set() is on its way out.
This is a stepping stone.
2019-02-20 13:13:31 -07:00
Greg Fitzgerald
6e24a4aa50 Less copy pasta 2019-02-20 13:13:31 -07:00
Greg Fitzgerald
fb1c6cf4da Drop a bunch of dependencies on VotingKeypair
And de-Arc
2019-02-20 13:13:31 -07:00
Greg Fitzgerald
af1b8f8a26 Absorb vote utilities
But drop dependency on VotingKeypair. Only pass in VotingKeypair
in VotingKeypair tests or integration tests.
2019-02-20 13:13:31 -07:00
Greg Fitzgerald
88d6db8537 And ranking and simplify 2019-02-20 13:13:31 -07:00
Greg Fitzgerald
6ce2c06fd6 Add primitive ActiveStakers and LeaderSchedule objects 2019-02-20 13:13:31 -07:00
Tyera Eulberg
136f7e4b3b Update test to validate entry height 2019-02-20 11:42:06 -07:00
Tyera Eulberg
0a73bb7efd Add tick-height field to entry event payload 2019-02-20 11:42:06 -07:00
Michael Vines
2cf00021d9 Update golden hash to account for tick_height removal 2019-02-20 07:47:04 -08:00
Michael Vines
8d38c2f800 Remove Entry::tick_height field 2019-02-20 07:47:04 -08:00
Greg Fitzgerald
9848de6cda Remove special case in Bank::deposit()
And use it to process the genesis block.
2019-02-20 08:12:37 -07:00
Pankaj Garg
19a3606315 Fix broken test, added some tests to calculate tx fee
Some code cleanup
2019-02-20 08:12:37 -07:00
Pankaj Garg
cc2227d943 rename slot_num 2019-02-20 08:12:37 -07:00
Pankaj Garg
a33921ed34 address review comments 2019-02-20 08:12:37 -07:00
Pankaj Garg
2e75ff27ac Fix test 2019-02-20 08:12:37 -07:00
Pankaj Garg
a27cdf55e7 Credit transaction fees to the slot leader 2019-02-20 08:12:37 -07:00
Michael Vines
3d00992c95 Remove dependency on Entry::tick_height 2019-02-20 06:57:38 -08:00
Michael Vines
77cb70dd80 Remove dependency on Entry::tick_height 2019-02-19 22:40:10 -08:00
Michael Vines
8daba3e563 Add test demonstrating that process_blocktree()'s implementation is lacking 2019-02-19 20:37:06 -08:00
Greg Fitzgerald
94f9ac0332 DRY up GenesisBlock 2019-02-19 20:34:58 -08:00
Michael Vines
a17903a89f Tweak process_blocktree() signature to return a BankForks 2019-02-19 20:01:22 -08:00
Greg Fitzgerald
dda0a1f39b Move storage tests out of Bank 2019-02-19 17:26:33 -07:00
anatoly yakovenko
0ef670a865 Move sender out of poh_recorder (#2837) 2019-02-19 16:22:33 -08:00
Greg Fitzgerald
04f54655c2 Minor cleanup 2019-02-19 15:53:31 -08:00
Rob Walker
dc5590f2bf unuse std (#2833) 2019-02-19 15:27:07 -08:00
Pankaj Garg
bc52fce810 Fix the custom programs command in net.sh 2019-02-19 13:53:43 -07:00
Greg Fitzgerald
b9bb92099e Go object-oriented
Easy to imagine a trait here that's implemented using a Bank or
a testnet.
2019-02-19 10:59:06 -07:00
Greg Fitzgerald
64dcc31ac7 Migrate Rewards test from runtime to Bank 2019-02-19 10:59:06 -07:00
Greg Fitzgerald
36546b4c4c Expose a Bank API for adding native programs
Also use it to tighten up the code to add the builtin programs.
2019-02-19 10:20:27 -07:00
Greg Fitzgerald
dde886f058 Move Bank to its own crate
Also:
* counters.rs to solana_metrics
* genesis_block.rs to solana_sdk
2019-02-19 07:17:04 -07:00
Carl
781f7ef570 fix test_repair_empty_slot 2019-02-18 23:38:28 -08:00
Carl
3e8bb32ffd Add test for write_entries() 2019-02-18 23:38:28 -08:00
Carl
df310641fb Re-enable and add tests 2019-02-18 23:38:28 -08:00
Carl
21ef55f205 re-enable repair service tests 2019-02-18 23:38:28 -08:00
Michael Vines
ade36566ea i 2019-02-18 21:56:23 -08:00
Greg Fitzgerald
08d7a0d52d Upgrade to Rust 1.32.0
$ rustup update stable
2019-02-18 21:44:09 -07:00
Michael Vines
1fd2885995 Add missing - 2019-02-18 20:09:18 -08:00
Greg Fitzgerald
d357640fbf Centralize decentralized timing constants 2019-02-18 19:46:58 -08:00
Greg Fitzgerald
ad9cd23202 Notify subscribers from ReplayStage 2019-02-18 20:04:30 -07:00
Greg Fitzgerald
5916177dc8 Drop RpcPubSubService's dependency on the Bank
Pass in RpcSubscriptions instead, which let's you choose a
bank fork when it's time to send notifications.
2019-02-18 20:04:30 -07:00
Greg Fitzgerald
905b1e2775 Add notify_subscribers() 2019-02-18 20:04:30 -07:00
Greg Fitzgerald
377d45c9dd Pull RpcSubscriptions out of the Bank 2019-02-18 20:04:30 -07:00
Michael Vines
a444cac2aa Switch to upstream AMIs for non-CUDA EC2 testnets 2019-02-18 18:59:56 -08:00
Michael Vines
1e714eb6b2 Generate ec2 security group programmatically 2019-02-18 18:59:56 -08:00
Michael Vines
3f14466965 Limit blockexplorer versions to 1.x.y
Per semver semantics when blockexplorer 2.0.0 is released it will be
incompatible in some way with 1.x.y and thus should be opt in.
2019-02-18 16:48:33 -08:00
Greg Fitzgerald
e0b8f4202d Use slot height for BankForks ids 2019-02-18 17:27:20 -07:00
dependabot[bot]
11b14bd3ab Bump reqwest from 0.9.9 to 0.9.10
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.9 to 0.9.10.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.9...v0.9.10)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-18 13:28:55 -07:00
Greg Fitzgerald
90684483e2 Make Bank::hash_internal_state() work with checkpoints 2019-02-18 12:47:10 -07:00
Tyera Eulberg
760a82cb08 Add optional deploy of custom programs (#2817)
* Add optional deploy of custom programs

* Review comments
2019-02-18 11:43:36 -07:00
Greg Fitzgerald
0317583489 Move avalanche logic to ClusterInfo
The simulator doesn't depend on RetransmitStage. It depends on
just one function, which is similar in spirit to many of the
methods in ClusterInfo.
2019-02-18 09:08:18 -08:00
Greg Fitzgerald
1c3f2bba6d Move avalanche simulator to integration tests 2019-02-18 09:08:18 -08:00
Greg Fitzgerald
7d62bf9a3d Move crds_gossip simulator to integration tests 2019-02-18 09:55:52 -07:00
Greg Fitzgerald
7c248cd2ef Move expensive test to integration tests
This test passes consistently when the test suite is run with a
single thread. It fails consistently on MacOS when run as part
of the unit-test suite.

No idea why it passes in CI.
2019-02-18 09:27:23 -07:00
Greg Fitzgerald
e4119268ca Delete expensive integration test in unit-test suite 2019-02-18 09:27:09 -07:00
anatoly yakovenko
fc2760e761 Remove bank dependency from poh_recorder (#2810)
* Remove bank dependency from poh_recorder

* clippy
2019-02-18 06:33:07 -08:00
Greg Fitzgerald
c57084de36 Ignore test_two_fullnodes_rotate integration tests 2019-02-18 06:19:46 -08:00
Greg Fitzgerald
907aff3b43 Cleanup Poh code 2019-02-17 21:12:55 -07:00
Michael Vines
2793404116 Ensure blockexplorer comes back up when nodes are updated instead of restarted 2019-02-17 20:07:12 -08:00
Greg Fitzgerald
d850f67979 Remove 'Compute' from name ComputeLeaderConfirmationService
struct names should be a noun
2019-02-17 19:44:09 -08:00
Carl
8080063024 nit 2019-02-17 19:30:45 -07:00
Carl
f33c6eb95f delete leader rotation signal from banking stage 2019-02-17 19:30:45 -07:00
Carl
4e3d71c2c9 Batch joins on entire tpumode struct instead of individual services 2019-02-17 19:30:23 -07:00
Carl
a074cb78cd Ensure leader services are closed before starting new ones 2019-02-17 19:30:23 -07:00
Michael Vines
0dbc33f781 Finish removing getConfirmationTime 2019-02-17 16:27:50 -08:00
Anatoly Yakovenko
25bbc3bc2a wrong error 2019-02-17 15:43:13 -08:00
Anatoly Yakovenko
5f55a9be84 fmt 2019-02-17 15:43:13 -08:00
Anatoly Yakovenko
300e3d151d remove the signal sender since its superfelous to a recv error 2019-02-17 15:43:13 -08:00
Greg Fitzgerald
2f7911b62a Boot BankError::MaxHeightReached 2019-02-17 16:30:01 -07:00
Anatoly Yakovenko
54dfe708c1 use ref for new_from_parent; test that transactions don't leak to parent 2019-02-17 15:02:08 -07:00
Anatoly Yakovenko
8166925f04 copy a new bank 2019-02-17 15:02:08 -07:00
Anatoly Yakovenko
64f1d93cc3 Use the accounts list from parents up to finalized bank for Account::load apis.
Borrow checker

query the previous parents accounts

cleanup!

s/tree/parents

Tests!  Last_ids need to be inherited as well otherwise nothing works.

new_from_parent
2019-02-17 15:02:08 -07:00
Greg Fitzgerald
6d67568037 Delete useless wrappers 2019-02-17 14:10:34 -07:00
Greg Fitzgerald
5003e97479 Inline private functions
Better code coverage in exchange for calling `create_session()`
2019-02-17 14:10:34 -07:00
Michael Vines
858068cdc0 Drop sudo, it's now handled internally by the block explorer 2019-02-17 12:29:53 -08:00
Michael Vines
65fb307d0f Avoid '' argument to fullnode.sh 2019-02-17 11:43:41 -08:00
Greg Fitzgerald
2f1fe726f5 Expand imports
tokio is a heavy dependency. This gives us some visibility into
what we're using.
2019-02-17 12:20:05 -07:00
Greg Fitzgerald
e9b0e3cb9d Move RpcSignatureStatus into its own module
And fixup some imports from previous commits.
2019-02-17 12:20:05 -07:00
Greg Fitzgerald
34fceca7ff Fix compiler warnings 2019-02-17 12:20:05 -07:00
Greg Fitzgerald
c646845cd3 Move RpcService into its own module 2019-02-17 12:20:05 -07:00
Greg Fitzgerald
eb483bc053 Move RpcPubSubService into its own module 2019-02-17 12:20:05 -07:00
Greg Fitzgerald
50d3fa7437 Move RpcSubscriptions into its own module 2019-02-17 12:20:05 -07:00
Greg Fitzgerald
9f7fc5f054 Boot unused trait
Some ambitious unit-testing plans unimplemented?
2019-02-17 12:20:05 -07:00
Michael Vines
a27e9cb3c2 Add -u option 2019-02-17 10:45:25 -08:00
Michael Vines
10270dcbad Add an API node to non-perf testnets 2019-02-17 10:39:27 -08:00
Michael Vines
4ff4fb6c38 Add support for an API node that hosts the block explorer 2019-02-17 10:39:27 -08:00
anatoly yakovenko
c8c794e340 Use the accounts and status cache from parents up to finalized bank for calls. (#2798)
* Use the accounts list from parents up to finalized bank for Account::load apis.

* Borrow checker

* query the previous parents accounts

* cleanup!

* s/tree/parents

* Tests!  Last_ids need to be inherited as well otherwise nothing works.
2019-02-17 08:01:31 -08:00
carllin
97a1e950ef write entries in blocktree now sets parent slot properly (#2800) 2019-02-17 04:36:49 -08:00
Greg Fitzgerald
9fa8105ae8 Add a way to make a DAG of checkpointed Banks 2019-02-16 21:49:06 -07:00
Michael Vines
d68b6ea7b1 Default entry stream socket to location used by the block explorer 2019-02-16 19:14:19 -08:00
Michael Vines
58f4709362 Reduce log severity of entry stream errors 2019-02-16 19:10:00 -08:00
anatoly yakovenko
f71cd2c6f3 Status cache runs out of space in the bloom filter (#2796)
The cache is designed for 1m statuses, about 1 second worth of transactions at full capacity. Refresh the cache every 1 second worth of ticks.
2019-02-16 16:41:03 -08:00
Greg Fitzgerald
8ec1f6ea2e Applied review feedback 2019-02-16 17:15:31 -07:00
Greg Fitzgerald
d63c8ae1ae Add PR guidelines 2019-02-16 17:15:31 -07:00
Greg Fitzgerald
e39094ac37 Hoist Slot Leader dependencies up to BankingStage 2019-02-16 15:36:31 -07:00
Greg Fitzgerald
b539389741 Move all Validator dependencies from Bank to blocktree_processor 2019-02-16 15:01:26 -07:00
Greg Fitzgerald
ac35fe9ed1 Flip the dependency; Create bank before scheduler 2019-02-16 14:16:48 -07:00
Greg Fitzgerald
3d70afc578 Boot leader scheduler from the bank
Functional change: the leader scheduler is no longer implicitly
updated by PohRecorder via register_tick(). That's intended to
be a "feature" (crossing fingers).
2019-02-16 14:16:48 -07:00
Greg Fitzgerald
b919b3e3b2 Bank no longer updates a leader scheduler by default 2019-02-16 14:16:48 -07:00
Greg Fitzgerald
7a7349f2ff Don't update the leader scheduler in bank's default constructor 2019-02-16 14:16:48 -07:00
Greg Fitzgerald
07b57735b1 Move leader scheduler test out of bank 2019-02-16 14:16:48 -07:00
dependabot[bot]
e42c95a327 Bump bincode from 1.1.1 to 1.1.2
Bumps [bincode](https://github.com/TyOverby/bincode) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/TyOverby/bincode/releases)
- [Commits](https://github.com/TyOverby/bincode/compare/v1.1.1...v1.1.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-16 13:58:37 -07:00
Michael Vines
473af78368 Support --entry-stream argument 2019-02-16 10:40:47 -08:00
Michael Vines
ab6c7f6ca3 /it/ti/ 2019-02-16 10:40:47 -08:00
Michael Vines
599516473a Add top-level run.sh for easy local cluster startup 2019-02-16 10:40:47 -08:00
Michael Vines
83ac075b22 Use full app name for better cli help text 2019-02-16 10:40:47 -08:00
Michael Vines
3548c6c43a Add support for locally built programs 2019-02-16 10:40:47 -08:00
Greg Fitzgerald
3bfe2e75b5 Boot new_with_leader_scheduler_config
Only used in one place. Easy enough to use the one with the shared
leader scheduler.
2019-02-16 10:55:58 -07:00
Greg Fitzgerald
97c93629a5 Don't use the Bank's LeaderScheduler 2019-02-16 10:55:58 -07:00
Greg Fitzgerald
643384e1ec Add LeaderScheduler constructor to Bank
By passing a config and not a Arc'ed LeaderScheduler, callers
need to use `Bank::leader_scheduler` to access the scheduler.
By using the new constructor, there should be no incentive to
reach into the bank for that object.
2019-02-16 10:55:58 -07:00
Greg Fitzgerald
1809277e05 Encapsulate Bank accounts
That way we don't need to TODOs saying "don't forget to iterate
over checkpoints too". It should be assumed that when the bank
references its previous checkpoint all its methods would
acknowledge it.
2019-02-16 08:41:35 -07:00
Greg Fitzgerald
7981865fd2 Boot unused confirmation-time from Bank
This broken metric is already submitted to influx. Why make it
available via RPC too? If so, why store it in the bank and not
in the RPC service?
2019-02-16 08:11:43 -07:00
Greg Fitzgerald
4467d5eb4c Extract process_ledger from Bank
Fullnode was the only real consumer of process_ledger and it was
only there to process a Blocktree. Blocktree is a tree, and a
ledger is a sequence, so something's clearly not right here.
Drop all other dependencies on process_ledger (only one test) so
that it can be fixed up in isolation.
2019-02-16 08:07:26 -07:00
dependabot[bot]
38aed0c886 Bump serde_derive from 1.0.87 to 1.0.88
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.87 to 1.0.88.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.87...v1.0.88)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-16 04:57:32 -08:00
dependabot[bot]
02801b3e75 Bump serde from 1.0.87 to 1.0.88
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.87 to 1.0.88.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.87...v1.0.88)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-16 05:02:10 -07:00
Michael Vines
b79d361e6c Add --entry-stream support 2019-02-15 22:52:27 -08:00
Michael Vines
9eb8b67b5c Install blockexplorer dependencies 2019-02-15 20:17:46 -08:00
Greg Fitzgerald
132c664e18 No longer modify external userdata 2019-02-15 18:36:55 -07:00
Greg Fitzgerald
288645aeb7 Add rewards integration test 2019-02-15 18:36:55 -07:00
Greg Fitzgerald
55f06f5bad Make vote_program available to reward_program tests
Making `solana_vote_program` is not an option because
then vote_program's entrypoint conflicts with reward_program's
entrypoint.

This unfortunately turns the SDK into a dumping ground for all
things shared between vote_program and other programs. Better
would be to create a solana-vote-api crate similar to the
solana-rewards-api crate.
2019-02-15 18:36:55 -07:00
Greg Fitzgerald
a2cb18bfe9 Only require voting account to be signed 2019-02-15 18:36:55 -07:00
Greg Fitzgerald
d35b3754a2 Reorg
Now clients can use all the libraries to create transactions
and disect account data without needing to be constrained about
what can be compiled into a shared object or BPF.

Likewise, program development can move forward without being
concerned with bloating the shared object.
2019-02-15 18:36:55 -07:00
Greg Fitzgerald
7f3aca15dd Add a library for creating Rewards transactions
And move out of the SDK
2019-02-15 18:36:55 -07:00
Greg Fitzgerald
2c5cbaff25 Add unit-test for Rewards program 2019-02-15 18:36:55 -07:00
Greg Fitzgerald
134cd7ab04 Add Rewards program 2019-02-15 18:36:55 -07:00
anatoly yakovenko
c74b8b6df3 Add a design for leader schedule rotation and genesis. (#2714)
Leader schedule rotation.
2019-02-15 16:34:34 -08:00
Stephen Akridge
573116e259 Remove count_last_ids API 2019-02-15 11:05:41 -08:00
Michael Vines
71ab030ea4 Fiddle with timeouts to make CI happy 2019-02-14 18:40:31 -08:00
Michael Vines
c4125b80ec Reduce max_tick_height to speed up CI 2019-02-14 18:40:31 -08:00
Michael Vines
626a381ddc Collect and re-forward packets received while TpuForwarder is shutting down 2019-02-14 18:40:31 -08:00
Michael Vines
5333bda234 test_3_partitions is unstable, ignore 2019-02-14 17:30:42 -08:00
Michael Vines
cceeb8e52d On leader rotation forward any unprocessed transaction packets to the new leader 2019-02-14 14:49:48 -08:00
Michael Vines
94a0d10499 Avoid overrunning slot0 2019-02-14 14:49:48 -08:00
Michael Vines
3f6aba23dd Add custom BlocktreeConfig for bad tests that break with the default 2019-02-14 14:49:48 -08:00
Michael Vines
cd9dac4c7e Use a reasonable max_tick_height 2019-02-14 14:49:48 -08:00
Michael Vines
f478894729 Revert "Set DEFAULT_TICKS_PER_SLOT = 32 to stabilize integration tests"
This reverts commit 2d2572d2cb.
2019-02-14 14:49:48 -08:00
Michael Vines
97790480c9 Increase poll_for_signature retry timeout 2019-02-14 14:49:48 -08:00
Tyera Eulberg
9643c39bf6 Fix slot in block event 2019-02-14 14:25:54 -08:00
Carl
0a08d40237 fix repair service to support multinode tests that depend on repairs 2019-02-14 13:37:55 -08:00
Carl
d029997aef add parent slot to broadcast 2019-02-14 13:37:55 -08:00
Carl
ceb27b431e Add tree test to test multiple chaining children 2019-02-14 13:37:55 -08:00
Carl
d3761c2435 Change definitions in book to match current changes 2019-02-14 13:37:55 -08:00
Carl
b25d8ce764 Comment out repair service tests, to be fixed in another PR 2019-02-14 13:37:55 -08:00
Carl
34da362ee6 fix blocktree tests 2019-02-14 13:37:55 -08:00
Carl
de6109c599 replace num_blocks with parent block 2019-02-14 13:37:55 -08:00
carllin
736f08815e Add protocol request for requesting the highest blob in a slot (#2759) 2019-02-14 12:47:21 -08:00
Sunny Gleason
106645d9bd add message terminator (newline) to socket writer output to ease client integration 2019-02-14 12:27:53 -08:00
Greg Fitzgerald
c55ada2f26 Fix wallet test 2019-02-14 13:26:46 -07:00
Greg Fitzgerald
4e4a1643c4 Boot SystemInstruction::Spawn 2019-02-14 13:26:46 -07:00
Greg Fitzgerald
e1e84d4465 Don't reassign owner in Spawn 2019-02-14 13:26:46 -07:00
Greg Fitzgerald
4a0009365e Use Account::owner as loader for executable accounts 2019-02-14 13:26:46 -07:00
dependabot[bot]
3849b8ece4 Bump bincode from 1.0.1 to 1.1.1 (#2709)
* Bump bincode from 1.0.1 to 1.1.1

Bumps [bincode](https://github.com/TyOverby/bincode) from 1.0.1 to 1.1.1.
- [Release notes](https://github.com/TyOverby/bincode/releases)
- [Commits](https://github.com/TyOverby/bincode/commits)

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

* update autocfg 0.1.1 => 0.1.2
2019-02-14 12:46:22 -06:00
Eric
f2ab8f17c8 udpate staking section 2019-02-14 07:45:58 -07:00
Greg Fitzgerald
48671a1728 Let native_loader own native executable accounts 2019-02-13 20:55:36 -08:00
Greg Fitzgerald
72b6ec4aa8 Add native program account constructor 2019-02-13 20:55:36 -08:00
Michael Vines
8790a92f07 Adjust create_counter to avoid imposing an AtomicUsize import on users 2019-02-13 20:24:04 -08:00
Michael Vines
0f8ff07b51 tpu now hangs on to its cluster_info 2019-02-13 16:16:18 -08:00
Pankaj Garg
dca73068c5 address review comments 2019-02-13 15:31:45 -08:00
Pankaj Garg
4094e62ed3 propose architecture change for fullnode 2019-02-13 15:31:45 -08:00
Pankaj Garg
7a0e897960 address review comments 2019-02-13 15:31:45 -08:00
Pankaj Garg
e78fc74e03 Update fullnode diagram to reflect bank, voting and forks changes 2019-02-13 15:31:45 -08:00
Pankaj Garg
5054e74f7f update to edge book 2019-02-13 14:08:19 -07:00
Pankaj Garg
72e6a39172 Fix the link to proposals chapter in the CONTRIBUTING guidelines 2019-02-13 14:08:19 -07:00
Tyera Eulberg
be73db13e0 Improve EntryStream trait and struct names 2019-02-13 13:07:30 -08:00
Tyera Eulberg
cbaba5cbf3 Review comments 2019-02-13 13:07:30 -08:00
Tyera Eulberg
c1447b2695 Add block event logic to EntryStreamStage 2019-02-13 13:07:30 -08:00
Sunny Gleason
e58f08b60f Refactor EntryStream
Co-authored-by: Sunny Gleason <sunny.gleason@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2019-02-13 13:07:30 -08:00
Michael Vines
662d62f561 Always assert on the main test thread to abort quickly 2019-02-13 12:54:06 -08:00
Michael Vines
cf4813a1ec Add tests to transact with a cluster rotating at 1 tick per slot 2019-02-13 12:54:06 -08:00
Michael Vines
b03636dc33 Bolster test_fullnode_rotate() checks 2019-02-13 12:54:06 -08:00
Michael Vines
6187779d10 Wait for monitor threads to exit before Blocktree destruction 2019-02-13 12:54:06 -08:00
Stephen Akridge
ddc8bfed29 Fix bad window_send_test channel logic
Test could hang if the blobs are not sent in the right order.
2019-02-13 11:23:54 -08:00
Stephen Akridge
f1221d724d Consolidate logic with entry helper function
Creates an entry and updates the hash.
Also cleanup blobs creation in test_replay
2019-02-13 11:23:54 -08:00
anatoly yakovenko
aec44e3761 Add design for the leader validator loop (#2650) 2019-02-13 12:00:43 -07:00
dependabot[bot]
aed07f0f48 Bump jsonrpc-derive from 10.0.2 to 10.1.0 (#2748)
* Bump jsonrpc-derive from 10.0.2 to 10.1.0

Bumps [jsonrpc-derive](https://github.com/paritytech/jsonrpc) from 10.0.2 to 10.1.0.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v10.0.2...v10.1.0)

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

* Bump version for all jsonrpc crates; remove pubsub dependency in vote-signer
2019-02-13 10:44:22 -07:00
Greg Fitzgerald
c178fc7249 Rewrite get_votes()
Panic if deserialize fails.
2019-02-13 10:05:28 -07:00
Greg Fitzgerald
41554f433b Fix VoteTransaction::get_votes() 2019-02-13 10:05:28 -07:00
Michael Vines
863956d09c Add multinode test for two nodes rotating at 1 tick per slot 2019-02-12 21:17:06 -08:00
Michael Vines
7118178e2c Correctly compute max_tick_height when starting up a node 2019-02-12 21:17:06 -08:00
Michael Vines
1eabe66c85 setup_leader_validator: remove unnecessary ticks_per_slot parameter 2019-02-12 21:17:06 -08:00
Michael Vines
2de0a9e453 Log on bogus blobs 2019-02-12 21:17:06 -08:00
Stephen Akridge
0bb6940c1a Faster exit for storage_stage client
Shorten the timeout and check for exit on every iteration
of fetching a last id.
2019-02-12 20:45:22 -08:00
Michael Vines
e341b33f21 Remove ticks_per_slot from Blocktree::write_entries(), it already knows 2019-02-12 15:52:27 -08:00
Michael Vines
6abdd6401d clippy: passing BlocktreeConfig by ref is ok 2019-02-12 15:52:27 -08:00
Michael Vines
6632c7026d Pass a BlocktreeConfig into all ledger helper functions 2019-02-12 15:52:27 -08:00
Michael Vines
c474cf1eef Pass BlocktreeConfig around as a reference 2019-02-12 15:52:27 -08:00
Sagar Dhawan
e26cd2eb26 Make Genesis block handle extra tokens for the leader (#2743) 2019-02-12 15:49:23 -08:00
Carl
b33becabca rename flag 2019-02-12 15:06:52 -08:00
Carl
3c8a8640aa restructure test_broadcast_last_tick test to check for is_last_blob 2019-02-12 15:06:52 -08:00
Carl
a1b5ea9cb1 test for is_last_blob at end of broadcast 2019-02-12 15:06:52 -08:00
Carl
bc162637a6 Add is_last_blob flag to blob to signal the end of a slot 2019-02-12 15:06:52 -08:00
Sagar Dhawan
8f1b7c3fff Enable test_replay (#2741)
* Enable test_replay

* Refactor get_last_id

* Fix test ledger path
2019-02-12 15:03:11 -08:00
carllin
be71f49d80 Change write_entries() and create_tmp_ledger() to take ticks_per_slot (#2736)
* Change write_entries() and create_tmp_ledger() to take ticks_per_slot

* PR nits
2019-02-12 13:14:33 -08:00
Sagar Dhawan
8b39eb5e4e Replace Blob Ids with Forward property (#2734)
* Replace Blob Id with Blob forwarding

* Update simulation to properly propagate blobs
2019-02-12 10:56:48 -08:00
Pankaj Garg
1173cf7ed4 review comments 2019-02-12 08:41:02 -08:00
Pankaj Garg
b4fd141105 fix broken test 2019-02-12 08:41:02 -08:00
Pankaj Garg
0002b5dd02 Write to ledger in BroadcastService
- Also disconnect the channel between TPU and TVU
2019-02-12 08:41:02 -08:00
Michael Vines
709598541f Remove stale TODO comment 2019-02-11 22:13:07 -08:00
Michael Vines
aa781811af Add mulitnode tests demonstrating leader rotation at 1 tick per slot 2019-02-11 19:50:33 -08:00
Michael Vines
b595bf8f44 Set blob_index correctly when tick_height is at the last tick of a slot 2019-02-11 19:50:33 -08:00
Michael Vines
f6979a090e leader_scheduler: reduce the amount of special case handling for tick_height 0 2019-02-11 19:05:14 -08:00
Sagar Dhawan
2e1dcd84f9 Add Avalanche Simulation (#2727)
- No packet drops yet
- Optimistic retransmits without leader-id
2019-02-11 16:20:31 -08:00
Pankaj Garg
144d321193 Remove Box for RPC pubsub subscriptions 2019-02-11 15:47:29 -08:00
Tyera Eulberg
d41dec9395 Make EntryStreamStage optional 2019-02-11 14:07:24 -08:00
Tyera Eulberg
f977327c7b Move EntryStream into its own Tvu stage 2019-02-11 14:07:24 -08:00
Michael Vines
aac1a58651 Try harder to keep LeaderSchedulerConfig and BlocktreeConfig in sync 2019-02-11 13:10:12 -08:00
Michael Vines
095afdfe47 Merge leader_to_validator/validator_to_leader 2019-02-11 08:57:44 -08:00
Michael Vines
4ae1783b97 Remove code duplication between leader_to_validator/validator_to_leader 2019-02-10 17:53:42 -08:00
Michael Vines
cd92adb1c6 Stop sending metrics by default
`source scripts/configure-metrics.sh` can be used at any time to easily
activate metrics if desired for local development and test.
2019-02-10 17:24:45 -08:00
Michael Vines
7dec40ff05 slot 0 now contains the same number of ticks as all subsequent slots 2019-02-10 16:34:10 -08:00
carllin
4b38ecd916 fix tpu tvu bank race (#2707)
* Fix tpu tvu bank race

* Test highlighting race between tvu and tpu banks during leader to leader transitions
2019-02-10 16:28:52 -08:00
Michael Vines
02c0098d57 Less --verbose by default 2019-02-10 10:19:16 -08:00
Stephen Akridge
1e58c585d3 Add retry_get_balance function
clients don't need to know about json
2019-02-10 09:08:16 -08:00
Stephen Akridge
ed4e9febe0 Refactor wallet processing
Yuge functions
2019-02-10 09:08:16 -08:00
Michael Vines
1c61415cee Remove stale TODO. #1899 was resolved a while ago 2019-02-09 16:57:46 -08:00
Michael Vines
c02625f91a Ban Default::default() 2019-02-09 10:12:32 -08:00
Michael Vines
da5b777ee7 Purge Default::default() 2019-02-09 10:12:32 -08:00
Michael Vines
a6aaca814c Rename enum Config to enum PohServiceConfig 2019-02-09 10:12:32 -08:00
Greg Fitzgerald
ab3dd2a1b3 Integrate the blocktree proposal into the book (#2704) 2019-02-08 20:27:35 -07:00
Greg Fitzgerald
7b7a2fc52b Rename Appendix to API Reference
And move before the proposals, since all this stuff is already
implemented.
2019-02-08 18:08:00 -07:00
Stephen Akridge
95b28d4d8c Move now to after super majority time is calculated
'now' could end up being earlier than the supermajority calculated time.
Leading to underflow errors and thread panic.
2019-02-08 15:53:23 -08:00
carllin
1278396bd5 Cleanup consecutive entries code from window_service (#2697)
* Remove returning entries from db_ledger on insert

* Fix tests to check for correctness

* Delete generate_repairs and max_repair_entry_height
2019-02-08 14:19:28 -08:00
Rob Walker
0e29868e34 add ticks_left_in_block (#2694)
* add ticks_left_in_block

* de-combine tests
2019-02-08 10:30:14 -08:00
Michael Vines
0115a1f834 Remove unused SocketAddr 2019-02-08 10:23:39 -08:00
Michael Vines
cf103add54 Remove old Tpu leader rotation shutdown mechanism 2019-02-08 09:07:35 -08:00
Michael Vines
766af58cd8 Prune unnecessary test imports 2019-02-08 08:43:11 -08:00
Michael Vines
5200435bab Strip unused return type 2019-02-08 08:43:11 -08:00
Michael Vines
56734dca3b Align Tpu::new() and Tpu::switch_to_leader() arguments 2019-02-07 21:33:49 -08:00
Michael Vines
dbaf8e66ab Remove code duplication 2019-02-07 21:33:49 -08:00
carllin
6e7c5f205b Rename db_ledger to blocktree (#2698) 2019-02-07 20:52:39 -08:00
Michael Vines
e7df3cfe22 thin_client grooming: remove dead code, improve var names and error reporting 2019-02-07 19:41:58 -08:00
Michael Vines
0e8540417f Add get_next_last_id 2019-02-07 19:41:58 -08:00
Michael Vines
c3ad0eebec Clean up get_last_id() 2019-02-07 19:41:58 -08:00
Greg Fitzgerald
c82ffaabdc Rename, purge use of term delta
This would be a fine document to introduce the term delta, but
it looks like the content flows just fine without it.
2019-02-07 16:25:23 -07:00
Greg Fitzgerald
4e6a9b029a finalized -> frozen 2019-02-07 16:25:23 -07:00
Greg Fitzgerald
3e519faaa8 Move to 80-char lines 2019-02-07 16:25:23 -07:00
Greg Fitzgerald
e2eb7c1ba7 Render ASCII art 2019-02-07 16:25:23 -07:00
Greg Fitzgerald
87ba5b865d Fix markdown 2019-02-07 16:25:23 -07:00
Greg Fitzgerald
992f2790e7 Cleanup 2019-02-07 16:25:23 -07:00
Anatoly Yakovenko
e1a099632e fork design book 2019-02-07 16:25:23 -07:00
carllin
fd7db7a954 Support multiple forks in the ledger (#2277)
* Modify db_ledger to support per_slot metadata, add signal for updates, and add chaining to slots in db_ledger

* Modify replay stage to ask db_ledger for updates based on slots

* Add repair send/receive metrics

* Add repair service, remove old repair code

* Fix tmp_copy_ledger and setup for tests to account for multiple slots and tick limits within slots
2019-02-07 15:10:54 -08:00
Greg Fitzgerald
5bb4ac9873 Cleanup 2019-02-07 16:09:04 -07:00
Anatoly Yakovenko
31b0d14856 wip, initial explanation on vote signer validator and stake owner relationship 2019-02-07 16:09:04 -07:00
Tyera Eulberg
952ab2bde5 Runtime fix 2019-02-07 11:30:05 -08:00
Tyera Eulberg
3c6af52a71 Fix pay-to-self Accounts bug (#2682)
* Add failing tests

* Fix tests

* Plumb AccountLoadedTwice error

* Fixup budget cancel actions to not depend on duplicate accounts

* Use has_duplicates

* Update budget-based golden
2019-02-07 12:14:10 -07:00
Michael Vines
6317bec7aa Avoid empty --features= arg to avoid unnecessary cargo building 2019-02-07 10:42:57 -08:00
Michael Vines
eb3ba5ce2d tmi: disable --verbose by default. | export V=1| to request verbosity 2019-02-07 10:42:57 -08:00
Michael Vines
1f0b3f954a leader_scheduler: replace older terminology with ticks, slots and epochs 2019-02-07 10:42:57 -08:00
Greg Fitzgerald
cdb2a7bef3 Move runtime benchmark 2019-02-07 09:46:06 -08:00
Greg Fitzgerald
f6515b2b6a Remove top-level dependencies on solana-runtime's dependencies 2019-02-07 09:46:06 -08:00
Greg Fitzgerald
5128d7d6c3 Move runtime.rs into its own crate 2019-02-07 09:46:06 -08:00
Greg Fitzgerald
731e5e1291 Boot lua loader
Good fun, but unnecessary and I haven't been updating the rlua
dependency. If someone wants this, it can be developed outside
the solana repo.
2019-02-07 10:25:11 -07:00
Michael Vines
cedee73548 Temporarily bump DEFAULT_TICKS_PER_SLOT to 64
See solana-labs/solana#2675
2019-02-07 09:16:43 -08:00
Michael Vines
8136d52c0b Whitelist the metrics-solana-com buildkite agent from docker container cleanup 2019-02-07 08:33:53 -08:00
Greg Fitzgerald
d1945c29d7 Don't depend on solana_native_loader for IDs in the SDK 2019-02-07 08:23:44 -08:00
Greg Fitzgerald
83b40e4f30 Inline assertions from overreaching helper
The assert_counters() helper creates unreadable tests and makes
us have to update every test any time a counter is added. Instead,
we can just assert the values of any particular counters the test
may have affected.
2019-02-07 08:43:52 -07:00
Michael Vines
95ac6305bc Remove unnecessary dependencies on fullnode mod 2019-02-06 21:31:48 -08:00
Michael Vines
ab4828aae7 Replace role_notifiers tuple with two explicit fields 2019-02-06 21:31:48 -08:00
Michael Vines
c506423e70 Remove superfluous imports 2019-02-06 21:31:48 -08:00
Michael Vines
f0843fc5f1 NodeServices: de-pub, remove dead code 2019-02-06 21:31:48 -08:00
Michael Vines
c87e035302 Remove multinode test dependency on Fullnode internals 2019-02-06 20:38:22 -08:00
Michael Vines
abb9a72b27 Reduce Fullnode public API surface 2019-02-06 20:04:51 -08:00
Sagar Dhawan
acc6bf1564 Don't over complicate the solution 2019-02-06 19:55:12 -08:00
Sagar Dhawan
db688207a5 Add abort signals to tvu/tpu receivers 2019-02-06 19:55:12 -08:00
Sagar Dhawan
9681c4d468 Fix resource hogging when waiting for role transition 2019-02-06 19:55:12 -08:00
Michael Vines
d9e2b94d7a bank::new_with_leader_scheduler_config() - remove Option<> 2019-02-06 19:47:09 -08:00
Michael Vines
f789038baa Consolidate fullnode ledger helpers 2019-02-06 19:47:09 -08:00
Michael Vines
2e23b03f94 Remove dead code 2019-02-06 19:47:09 -08:00
Michael Vines
5181a2a9b1 Guard against invalid tick heights 2019-02-06 14:23:10 -08:00
Michael Vines
2d2572d2cb Set DEFAULT_TICKS_PER_SLOT = 32 to stabilize integration tests 2019-02-06 14:23:10 -08:00
Michael Vines
fa553029d5 Temporarily disable test_validator_to_leader_transition 2019-02-06 14:23:10 -08:00
Michael Vines
c986a20bcf Disable unstable test: test_multi_node_dynamic_network 2019-02-06 14:23:10 -08:00
Michael Vines
c5a74ada05 leader_scheduler: remove bootstrap_height 2019-02-06 14:23:10 -08:00
Michael Vines
73979d8f5a Remove sleep, fund the vote account faster 2019-02-06 14:23:10 -08:00
Michael Vines
f90d96367d Add Fullnode::run() to optionally manage node role transitions automatically 2019-02-06 14:23:10 -08:00
Jack May
5f565c92c9 cargo incremental builds breaks Rust BPF, locally disable it (#2674) 2019-02-06 13:59:10 -08:00
Michael Vines
7452486c72 Kill running docker containers left over from a previous job 2019-02-06 13:57:11 -08:00
Michael Vines
afdf0efd31 Disable bpf_rust temporarily 2019-02-06 13:31:35 -08:00
Michael Vines
7fc271ef97 Bump stable timeout 2019-02-06 13:31:35 -08:00
Greg Fitzgerald
582ba4f173 Move economics into the proposed changes
Once this is implemented, we'll move it into the "A Solana Cluster"
section.
2019-02-06 09:29:52 -07:00
Greg Fitzgerald
0229c97071 Move economics images into img/
And flip the exe bit
2019-02-06 09:29:52 -07:00
Greg Fitzgerald
c0b398c7c9 Fix markdown and typo 2019-02-06 09:29:52 -07:00
Greg Fitzgerald
549f9676f1 Allow validators to accumulate credits for voting 2019-02-05 14:24:49 -07:00
dependabot[bot]
6248624ee7 Bump jsonrpc-derive from 10.0.1 to 10.0.2
Bumps [jsonrpc-derive](https://github.com/paritytech/jsonrpc) from 10.0.1 to 10.0.2.
- [Release notes](https://github.com/paritytech/jsonrpc/releases)
- [Commits](https://github.com/paritytech/jsonrpc/compare/v10.0.1...v10.0.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-05 08:17:25 -07:00
Tyera Eulberg
0025d36880 Move solana proper back to paritytech/jsonrpc 2019-02-04 22:17:23 -07:00
Tyera Eulberg
4985b682c3 Move vote_signer back to paritytech/jsonrpc 2019-02-04 22:17:23 -07:00
dependabot[bot]
85333c5d62 Bump serde_derive from 1.0.85 to 1.0.87
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.85 to 1.0.87.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.85...v1.0.87)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-04 17:07:01 -07:00
carllin
3feda8a315 ReplayStage asking ledger for updates (#2597)
* Modify replay stage to ask db_ledger for updates instead of reading from upstream channel

* Add signal for db_ledger to update listeners about updates

* fix flaky test
2019-02-04 15:33:43 -08:00
Manuel
5375c420c1 headers style have been adjusted 2019-02-04 14:25:26 -07:00
Pankaj Garg
ac9f6a77c9 Fix compilation errors due to missing "features" section in Cargo.toml
- e.g. breaks in compilations during testnet deployment with Cuda enabled
2019-02-04 11:30:40 -08:00
Pankaj Garg
58f4e0653a Updates to edge testnet dashboard
- Update leader/validator pipeline stage graph, as any node can be
  doing either of the roles
- Update network stats graphs to remove hostname based filtering
2019-02-04 11:08:39 -08:00
Tyera Eulberg
03e6a56b3c Add datetime to EntryStream message 2019-02-04 11:03:54 -08:00
dependabot[bot]
32f19c5c19 Bump serde from 1.0.85 to 1.0.87
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.85 to 1.0.87.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.85...v1.0.87)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-04 09:08:09 -07:00
Michael Vines
98e893c69b Avoid empty --features= arg to avoid unnecessary cargo building 2019-02-02 20:08:49 -08:00
Michael Vines
fea480526b Add macOS tip 2019-02-02 20:08:49 -08:00
Michael Vines
4aa6695a13 source ulimit-n.sh so it applies to the current shell 2019-02-02 20:08:49 -08:00
Michael Vines
a7e5423ede Set ulimit -n 2019-02-02 20:08:49 -08:00
Greg Fitzgerald
3ff8bbcf65 Cleanup economic design (#2649)
* Remove section numbers
* Fix all hyperlinks
* Add detail on protocol-designated minimum tx fee amount
2019-02-02 18:35:18 -08:00
Sagar Dhawan
9d34ded5f3 Update and fix test_broadcast_last_tick (#2644) 2019-02-01 17:13:15 -08:00
Greg Fitzgerald
511d8275d6 Document current vote program semantics
And add a new 'staker_id' VoteState member variable to offer a path to
work our way out.  Update leader scheduler to use staker_id, but
continue setting it to 'from_id' for the moment.

No functional changes here.
2019-02-01 16:03:46 -08:00
Greg Fitzgerald
0a9226ec8e Use voting helper 2019-02-01 16:03:46 -08:00
Greg Fitzgerald
9c07a8c26a VoteProgram -> VoteState 2019-02-01 16:03:46 -08:00
Greg Fitzgerald
6058bfb687 Simplify voting helpers 2019-02-01 16:03:46 -08:00
Sagar Dhawan
7a6d730db3 Skip retransmit when node is leader (#2625)
* Skip retransmit when node is leader

* Fix window test
2019-02-01 14:30:26 -08:00
Sagar Dhawan
2985988f0d Re-enable test_broadcast_last_tick (#2639) 2019-02-01 14:23:20 -08:00
Michael Vines
d62c9ac309 Create program/ crate avoid / crate dependency on bpfloader
The bpfloader crate was triggering cargo to perform excessive rebuilds
of in-workspace dependencies.  Unclear why exactly, but seems related to
the special dual crate-type employed by bpfloader.
2019-02-01 12:42:46 -08:00
Michael Vines
85c8af08b3 Link dangling program cuda features to the src/ crate 2019-02-01 12:42:46 -08:00
Michael Vines
21c09073a1 Add help script to easily run all integration tests 2019-02-01 12:42:46 -08:00
Michael Vines
40acaee446 Remove unnecessary abstractions and helper functions 2019-02-01 12:42:46 -08:00
Pankaj Garg
d9a22705ce Broadcast Service should handle SendError
- After TVU shuts down, the brroadcast service will get a SendError
  when it tries to send blobs to it
2019-02-01 12:28:00 -08:00
Greg Fitzgerald
dad0bfe447 Replace transaction traits with structs
Also:
* SystemTransaction::new -> new_account
* SystemTransaction::new_create -> new_program_account
2019-02-01 11:38:25 -08:00
Tyera Eulberg
1b3e7f734a Update solana-vote-signer to Rust 2018 2019-02-01 12:12:26 -07:00
dependabot[bot]
0e58023794 Bump serde_json from 1.0.37 to 1.0.38
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.37 to 1.0.38.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.37...v1.0.38)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-01 10:06:21 -07:00
Michael Vines
4fb9c8a547 Bump timeout 2019-02-01 07:11:17 -08:00
Michael Vines
43cce3a8fc speling 2019-02-01 07:11:17 -08:00
Michael Vines
344427c1dc Update to rust nightly 2019-01-31 2019-02-01 07:11:17 -08:00
Greg Fitzgerald
82a2080e45 Rename VoteSignerProxy to VotingKeypair
Works just like a normal Keypair, but will only sign voting
transactions.
2019-02-01 07:11:17 -07:00
Greg Fitzgerald
9a4abe96c7 Reduce VoteSignerProxy to KeypairUtil 2019-02-01 07:11:17 -07:00
Michael Vines
d87c2eb903 Fullnode::new() - provide FullnodeConfig as a ref 2019-01-31 21:12:36 -08:00
Michael Vines
65708f234d Remove unused import 2019-01-31 21:12:36 -08:00
Carl
b6b179af97 Fix bad merge 2019-01-31 20:15:04 -08:00
carllin
37003da854 Fix potential of checking tvu bank for truth when its behind (#2614)
* Fix race between tpu and tvu, where tvu bank is not caught up to tpu bank

* Add test

* Cleanup Fullnode tests
2019-01-31 19:21:02 -08:00
Michael Vines
3f323aba1a Search and destroy loitering processes from previous CI runs 2019-01-31 16:17:44 -08:00
Rob Walker
29889a90e5 ignore ledger-tool/target (#2624) 2019-01-31 16:09:56 -08:00
Sagar Dhawan
ed478675ba Push and query the ClusterInfo for votes. (#2622) 2019-02-01 05:21:29 +05:30
Michael Vines
9767468b7f Remove unneeded Option 2019-01-31 13:53:59 -08:00
Rob Walker
8ba1d5f426 treat genesis special (#2615)
* treat genesis special

* fix poh_recorder to understand new world order
2019-01-31 13:53:08 -08:00
carllin
84567d36cf Leader scheduler groundwork for Blocktree (#2599)
* Groundwork for entry tree, align constants with definitions in the book

* Fix edge case in test, node can keep generating ticks between handle_role_transition and exit() call
2019-01-31 13:44:24 -08:00
Pankaj Garg
32162ef0f1 Connect TPU's broadcast service with TVU's blob fetch stage (#2587)
* Connect TPU's broadcast service with TVU's blob fetch stage

- This is needed since ledger is being written only in TVU now

* fix clippy warnings

* fix failing test

* fix broken tests

* fixed failing tests
2019-01-31 13:43:22 -08:00
Pankaj Garg
2dd20c38b2 fix the test 2019-01-31 12:55:17 -08:00
Pankaj Garg
aa1bd603e6 Fix recvmmsg test for timeout 2019-01-31 12:55:17 -08:00
anatoly yakovenko
e104941569 Add design proposal for reliable vote transmission (#2601)
* reliable vote transmission design proposal

* summary

* comments
2019-01-31 07:34:49 -08:00
anatoly yakovenko
2754ceec60 StatusDeque split into separate objects with their own root checkpoint strategy (#2613)
Split up StatusDeque into different modules

* LastIdQueue tracks last_ids
* StatusCache keeps track of signature statuses
* StatusCache stores success as a bit in a bloom filter
* Overhead for 1m Ok transactions is 4mb in memory
* Less concurrency between the objects, last_id and status_cache are read and written to at different points in the pipeline
* Each object has its own strategy for merging into the root checkpoint
2019-01-31 06:53:52 -08:00
Greg Fitzgerald
609e915169 Fix clippy warning
Always pass Arcs by reference. Then you'll only need to clone()
to cross thread boundaries.
2019-01-30 21:59:05 -07:00
Greg Fitzgerald
11f1c00ca7 Only send pubkey to ReplayStage 2019-01-30 21:59:05 -07:00
Greg Fitzgerald
a74b24fdf0 Only store the fullnode's pubkey
Only vote_signer is used for signing
2019-01-30 21:59:05 -07:00
Greg Fitzgerald
e25992a011 Always give Fullnode a vote signer
This will allow us to use the the signer's pubkey as the node id.

Disable voting with a configuration option.
2019-01-30 21:59:05 -07:00
Rob Walker
00bb5925e1 use a .gitignore'd file name for transactionCount (#2609) 2019-01-30 20:19:10 -08:00
Rob Walker
1b50fbbc90 remove Result<> from Blob accessors, add parent (#2608)
* remove Result<> from Blob accessors, add parent
* update chacha's golden
* fixup benches
2019-01-30 20:18:28 -08:00
Pankaj Garg
a746969995 Don't set socket as blocking in recvmmsg for non Linux targets (#2611)
* Don't set socket as blocking in recvmmsg for non Linux targets

- The user of the function is controling this flag

* added a test
2019-01-30 19:47:53 -08:00
Greg Fitzgerald
c536a0bf04 Remove mention of BCC 2019-01-30 18:00:04 -07:00
Anatoly Yakovenko
5b8e7bfcf2 s/voter/validator 2019-01-30 15:44:51 -07:00
Anatoly Yakovenko
3cbbceec78 rewarding 2019-01-30 15:44:51 -07:00
Anatoly Yakovenko
e684fafb68 fmt 2019-01-30 15:44:51 -07:00
Anatoly Yakovenko
651342b3db cleanup fork selection 2019-01-30 15:44:51 -07:00
Michael Vines
c01290438f Move virtual genesis tick into the ledger proper as entry 0 2019-01-30 14:02:07 -08:00
Michael Vines
9e9c82869a create_tmp_sample_ledger() need not return the genesis block 2019-01-30 14:02:07 -08:00
Michael Vines
494b143453 Delete create_tmp_genesis 2019-01-30 14:02:07 -08:00
Michael Vines
8cc1cde0fe create_tmp_sample_ledger() now returns entry_height and last_id 2019-01-30 14:02:07 -08:00
Greg Fitzgerald
883fc39c80 Rename EntryTree to Blocktree 2019-01-30 13:29:34 -07:00
Anatoly Yakovenko
1c0758e3bd Accounts refactoring for forking.
* Move last_id and signature dup handling out of Accounts.
* Accounts that handle overlays.
2019-01-30 11:36:49 -08:00
Greg Fitzgerald
668d353add Inline VoteSigner::new_vote_account
So that we can stop using the validator keypair to fund the
the voting account.
2019-01-30 10:42:42 -07:00
Greg Fitzgerald
06a1681fdc Remove redundant annotations 2019-01-30 10:42:42 -07:00
Anatoly Yakovenko
a16e41002e reduce gossip nodes in concurrent tests for CI 2019-01-30 10:26:28 -07:00
Michael Vines
16e705dc75 Boil away unneeded Fullnode::new_* functions 2019-01-29 20:10:10 -08:00
Michael Vines
b52228feb9 Remove assumption that the mint starts with 10_000 tokens 2019-01-29 20:10:10 -08:00
Michael Vines
25f25d0f82 new_fullnode: don't return the genesis_block, nobody uses it 2019-01-29 17:51:07 -08:00
Greg Fitzgerald
85e7046caf Use signer for signing transactions, not constructing them 2019-01-29 18:35:05 -07:00
Greg Fitzgerald
c741a960b9 Generalize Transaction::new to accept anything that implements KeypairUtil 2019-01-29 18:35:05 -07:00
Greg Fitzgerald
34c8b2cc2f Remove redundant Arc 2019-01-29 18:35:05 -07:00
Greg Fitzgerald
278effad49 Implement KeypairUtil for VoteSignerProxy 2019-01-29 18:35:05 -07:00
Rob Walker
a0bed5375d remove println!, add check to keep it out (#2585)
* remove debugging prints

* remove println!, add check to keep it out
2019-01-29 16:02:03 -08:00
dependabot[bot]
9eecd549e4 Bump rand from 0.6.4 to 0.6.5 (#2564)
* Bump rand from 0.6.4 to 0.6.5

Bumps [rand](https://github.com/rust-random/rand) from 0.6.4 to 0.6.5.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/0.6.4...0.6.5)

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

* Update rand_core, rand_jitter, rand_os

fixes compile errors due to type mismatch from differing versions
2019-01-29 17:44:34 -06:00
Michael Vines
a2c3369713 storage_state field doesn't actually exist 2019-01-29 12:34:59 -08:00
Rob Walker
1f9ab7f58f copy bank for TPU 2019-01-29 12:11:48 -08:00
Anatoly Yakovenko
3e1a926aa6 wip 2019-01-29 12:11:48 -08:00
dependabot[bot]
57f82934f2 Bump hex-literal from 0.1.1 to 0.1.2 (#2565)
Bumps [hex-literal](https://github.com/RustCrypto/utils) from 0.1.1 to 0.1.2.
- [Release notes](https://github.com/RustCrypto/utils/releases)
- [Commits](https://github.com/RustCrypto/utils/compare/opaque-debug_v0.1.1...hex-literal-v0.1.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-29 13:15:49 -06:00
dependabot[bot]
f3a8aec64d Bump tokio from 0.1.14 to 0.1.15 (#2557)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 0.1.14 to 0.1.15.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Changelog](https://github.com/tokio-rs/tokio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-0.1.14...tokio-0.1.15)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-29 13:12:50 -06:00
dependabot[bot]
e2e5bc65a9 Bump assert_cmd from 0.10.2 to 0.11.0 (#2580)
* Bump assert_cmd from 0.10.2 to 0.11.0

Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd) from 0.10.2 to 0.11.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.10.2...v0.11.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>, Mark Sinclair Jr <mark@solana.com>

* Replace use of removed `Command::main_binary`

assert_cmd 11.0 removed this. replaced with
`Command::cargo_bin(env!("CARGO_PKG_NAME"))`
2019-01-29 13:10:48 -06:00
Michael Vines
df136578d4 Remove unnecessary FullnodeConfig::rpc_port option 2019-01-29 10:22:39 -08:00
Michael Vines
ae7f169027 Add FullnodeConfig struct to Fullnode::new* functions
This avoids having to touch *every* Fullnode::new* call site when
a new fullnode option is added
2019-01-29 09:42:48 -08:00
Tyera Eulberg
6da7a784f2 Stream entries (#2582)
* Add entry streaming option

* Fix tests

* Remove obsolete comment

* Move entry stream functionality to struct w/ trait in order to test without i/o
2019-01-29 00:21:27 -08:00
Michael Vines
12cddf725e Harmonize Fullnode::new* function arguments 2019-01-28 22:37:56 -08:00
Michael Vines
d8861c2a5f Wait until the leader shows up on gossip 2019-01-28 22:37:56 -08:00
Rob Walker
145fb3675d check for debugging lint in CI (#2578)
* check for debugging lint in CI
* nit
* add TODO
2019-01-28 18:32:30 -08:00
Michael Vines
77e8cb2718 Update nominal() checks for json genesis block 2019-01-28 17:08:59 -08:00
Michael Vines
a8ea6471e7 Add ledger-tool tests to CI 2019-01-28 17:08:59 -08:00
Michael Vines
bfaf5634a1 .unwrap() in tests instead of assert!()ing .is_ok() for a better failure message 2019-01-28 16:10:32 -08:00
Stephen Akridge
53afa64634 Remove storage_state from the bank
Construct in TVU and pass to RPC and StorageStage instead.
2019-01-28 15:41:41 -08:00
Rob Walker
c9bf9ce094 eliminate re-use of a TX here, we're testing for empty account balance (#2576) 2019-01-28 15:21:08 -08:00
Tyera Eulberg
a2e29fa71f Alphabetize and make consistent fullnode arguments 2019-01-28 14:32:32 -08:00
Pankaj Garg
637f58364a remove io from the tests 2019-01-28 13:52:13 -08:00
Pankaj Garg
1bd04b26e5 Remove ignore flag from rpc_pubsub tests 2019-01-28 13:52:13 -08:00
Michael Vines
29ef9370a6 Remove LeaderSchedulerConfig options 2019-01-28 13:51:01 -08:00
Stephen Akridge
2262f279d5 Reduce boilerplate code with helper function to create
fullnode/bank/genesis
2019-01-28 13:48:58 -08:00
Michael Vines
e4f477cf90 Retype num_ticks as u64 to reduce casting 2019-01-28 11:24:50 -08:00
Greg Fitzgerald
33f921235d Improve message-signing ergonomics 2019-01-26 14:57:22 -07:00
Greg Fitzgerald
1bae87d4b3 Add unit-test-friendly VoteSignerProxy constructor 2019-01-26 14:56:49 -07:00
Greg Fitzgerald
1e43fb587e Rename the module that now contains only GenKeys 2019-01-26 06:57:24 -08:00
Sagar Dhawan
d65e7b9fcc Speedup rotation (#2468)
Speedup leader to validator transitions
2019-01-26 13:58:08 +05:30
Michael Vines
4bb6549895 Genesis block is now a json file 2019-01-25 09:05:15 -08:00
dependabot[bot]
06e3cd3d2a Bump serde_json from 1.0.36 to 1.0.37
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.36 to 1.0.37.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.36...v1.0.37)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-25 03:34:06 -08:00
Rob Walker
e9e01557b7 fix leaked threads from unclosed fullnode 2019-01-25 03:02:49 -08:00
Sathish
e0f046b7a5 Optimize Transaction/Instruction serialization with custom routine (#2515)
* Optimize transaction serialization with custom routine to reduce the serialized size.

* Update serialized_size to accept self as parameter

* Optimize serialize / deserialize operations
2019-01-24 21:14:15 -08:00
Stephen Akridge
9845aec007 Rename data_replicator tests module
replicator name is associated with storage replicators, so
data_replicator sounds like that but it is actually a bunch of gossip
tests.
2019-01-24 15:49:55 -08:00
Pankaj Garg
81c82b5af9 Add test for ignore ProgramErrors in process_entries (#2544) 2019-01-24 13:37:12 -08:00
Pankaj Garg
a9b083e585 Set fetch stage socket non blocking to false while during recv (#2542)
* Set fetch stage socket non blocking to false while during recv

* remove ProgramError changes from this PR
2019-01-24 12:46:40 -08:00
Jack May
9abc500269 Fix BPF C tests and run as part of CI (#2540) 2019-01-24 12:15:37 -08:00
Tyera Eulberg
b9eb7e14e6 Use clap arg conflicts check 2019-01-24 10:47:37 -08:00
Tyera Eulberg
b7be5b9a7a Add no-signer argument 2019-01-24 10:47:37 -08:00
Greg Fitzgerald
ce41760fdd Update definitions of block and slot 2019-01-23 18:22:20 -08:00
dependabot[bot]
a7503050c2 Bump libc from 0.2.47 to 0.2.48
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.47 to 0.2.48.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.47...0.2.48)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-23 18:22:05 -08:00
dependabot[bot]
d4eb69ca14 Bump reqwest from 0.9.8 to 0.9.9
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.8 to 0.9.9.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.8...v0.9.9)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-23 17:24:48 -08:00
Greg Fitzgerald
aba9df8457 Remove get_stake placeholder 2019-01-23 17:03:20 -08:00
Rob Walker
6aa80e431d increase startup timeout for localnet sanity (#2534) 2019-01-23 15:06:08 -08:00
Michael Vines
bae7612f36 Revert "Wait until the node successfully boots"
This reverts commit e84f1f6de7.
2019-01-23 11:27:08 -08:00
Jack May
a0bc8b8af3 BPF programs can support up to 5 arguments (#2528) 2019-01-23 09:55:08 -08:00
Michael Vines
73930b5eac Unfold log on errors 2019-01-23 07:48:59 -08:00
Michael Vines
fbeba259b3 Reorg tests 2019-01-23 00:02:30 -08:00
Michael Vines
d1bedeae13 Wait for nodes to finish booting before running sanity checks 2019-01-23 00:02:30 -08:00
Michael Vines
e84f1f6de7 Wait until the node successfully boots 2019-01-23 00:02:30 -08:00
Michael Vines
cc88f9bcd6 Add mechanism to determine when a node has finished booting 2019-01-23 00:02:30 -08:00
Michael Vines
f630b50902 Check for new vote account signature explicitly for better error reporting on failures 2019-01-23 00:02:30 -08:00
Michael Vines
9a7082d0d5 Report stuck last_id in error message 2019-01-23 00:02:30 -08:00
Michael Vines
8dc9089611 Display confirmation time 2019-01-23 00:02:30 -08:00
Michael Vines
222d2d7953 Verify transaction count as reported by the bootstrap-leader node is advancing 2019-01-23 00:02:30 -08:00
Michael Vines
27c10d4468 cargo fmt 2019-01-22 21:56:04 -08:00
Stephen Akridge
a17467aefd Lower level of message from storage_stage 2019-01-22 21:23:10 -08:00
Greg Fitzgerald
73b10c196e Disable integration test that fails in CI 2019-01-22 19:24:44 -08:00
Rob Walker
965dbbe835 stop enumeration if next entry is disjoint, band-aid (#2518)
* stop enumeration if next entry is disjoint, band-aid, fies #2426
* clippy
2019-01-22 15:50:36 -08:00
Michael Vines
e3ae10bacc User-initiated builds now select the correct channel 2019-01-22 14:23:46 -08:00
Michael Vines
fcda94b673 Use beta channel for stable dashboard once a beta tag exists 2019-01-22 12:22:57 -08:00
dependabot[bot]
b1109b813e Bump byteorder from 1.3.0 to 1.3.1
Bumps [byteorder](https://github.com/BurntSushi/byteorder) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/BurntSushi/byteorder/releases)
- [Changelog](https://github.com/BurntSushi/byteorder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/byteorder/compare/1.3.0...1.3.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-22 09:58:48 -08:00
Michael Vines
122a5b2f69 dedup the 2019-01-22 09:47:43 -08:00
Michael Vines
dea20248c4 Increase job timeout 2019-01-22 09:35:03 -08:00
Michael Vines
ae90ac238c Use unique log file for each additional (-x/-X) fullnodes 2019-01-22 08:27:36 -08:00
Michael Vines
3b0ca9f478 Add rolling update test 2019-01-22 08:27:36 -08:00
Michael Vines
61e79e6d02 Add -c to resume a previous run 2019-01-22 08:27:36 -08:00
Michael Vines
1cdab81a3c Add -R option to restart the cluster incrementally 2019-01-22 08:27:36 -08:00
Michael Vines
dca0ba6a5d Use -X for dynamic fullnodes, to ensure keypair remains constant during iterations 2019-01-22 08:27:36 -08:00
Greg Fitzgerald
d666ebc558 Add tests for vote_program 2019-01-21 18:05:52 -07:00
Rob Walker
c84b796e17 remove dead code (#2512) 2019-01-21 16:24:11 -08:00
Pankaj Garg
7204bb40bf Don't fail process_entries with ProgramErrors (#2509) 2019-01-21 15:26:06 -08:00
Tyera Eulberg
637d5c6691 Fix rpc port argument name 2019-01-21 16:25:51 -07:00
Michael Vines
3c86f41769 Run buildkite iterations in parallel 2019-01-21 14:04:19 -08:00
Mark
f37eb533f1 Replicator timeout (#2480)
* Add timeout to Replicator::new; used when polling for leader

* Add timeout functionality to replicator ledger download

Shares the same timeout as polling for leader

Defaults to 30 seconds

* Add docs for Replicator::new
2019-01-21 15:37:41 -06:00
Michael Vines
6e8b69fc88 Cleanup leader_addr, it's really entrypoint_addr 2019-01-21 13:06:30 -08:00
Tyera Eulberg
cb23070dfe Remove sleeps on fullnode spin-up in integration tests 2019-01-21 13:27:31 -07:00
Greg Fitzgerald
5d9d83d312 Less clones 2019-01-21 12:56:27 -07:00
Greg Fitzgerald
823252dd41 Cleanup terminology 2019-01-21 12:56:27 -07:00
Tyera Eulberg
35764225ed Remove socket from rpc test and move integration test 2019-01-21 12:29:04 -07:00
Michael Vines
c7e5006bcf Remove assert!()s that hide error codes, making failure debug harder 2019-01-21 10:36:56 -08:00
dependabot[bot]
b0149a54d8 Bump serde_derive from 1.0.84 to 1.0.85
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.84 to 1.0.85.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.84...v1.0.85)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-21 11:25:42 -07:00
Rob Walker
e6030d66eb split load+execute from commit in bank, insert record between them in TPU code (#2487)
* split load+execute from commit in bank, insert record between them in TPU code
* clippy
* remove clear_signatures() race with commit_transactions()
* add #[test] back
2019-01-21 10:17:04 -08:00
Pankaj Garg
6611188edf Move subscriptions to rpc_pubsub (#2490)
* Move subscriptions to rpc_pubsub

- this helps avoid recreating pubsub_service on node's role change

* fixed tests and addressed review comments

* fix clippy errors

* address review comments
2019-01-21 09:59:09 -08:00
Stephen Akridge
abbb037888 Implement storage contract logic 2019-01-21 08:36:49 -08:00
Michael Vines
132d59ca6a new_bank_from_db_ledger need not be public 2019-01-21 08:11:13 -08:00
dependabot[bot]
200d5e62c2 Bump byteorder from 1.2.7 to 1.3.0
Bumps [byteorder](https://github.com/BurntSushi/byteorder) from 1.2.7 to 1.3.0.
- [Release notes](https://github.com/BurntSushi/byteorder/releases)
- [Changelog](https://github.com/BurntSushi/byteorder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/byteorder/compare/1.2.7...1.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-21 09:07:17 -07:00
dependabot[bot]
b748942d6a Bump serde from 1.0.84 to 1.0.85
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.84 to 1.0.85.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.84...v1.0.85)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-21 08:25:24 -07:00
Michael Vines
648b6597bf configure ulimit 2019-01-20 10:54:12 -08:00
Michael Vines
5b73a8eceb Rework fullnode boot sequence 2019-01-19 21:35:46 -08:00
Michael Vines
514bf32b99 Enable ledger verification for non-perf testnets 2019-01-19 20:28:56 -08:00
Michael Vines
2073188345 Fullnode no longer fails to process a ledger with ProgramErrors in it 2019-01-18 21:06:50 -08:00
Michael Vines
c0b472292b Revert "Entries that result in a ProgramError are still valid entries"
This reverts commit ab23b41998.
2019-01-18 21:06:50 -08:00
Stephen Akridge
1b15fd1da6 Fix build, add new parameter to new_with_bank 2019-01-18 15:07:46 -08:00
Michael Vines
6883ea0944 Give the fullnode one million tokens as a #2355 workaround 2019-01-18 13:42:04 -08:00
Michael Vines
303289777f rsync/airdrop only if ledger doesn't exist (eg, on first run after setup.sh) 2019-01-18 13:42:04 -08:00
Michael Vines
a8bf00fe20 Timeout if a leader is not found within 30 seconds 2019-01-18 13:42:04 -08:00
Michael Vines
6282c53fe5 Add iterations with leader rotation enabled and periodic restarts 2019-01-18 13:42:04 -08:00
Michael Vines
dac28e0961 Temporarily ignore wallet sanity failures when leader rotation is enabled
This commit should be reverted once https://github.com/solana-labs/solana/issues/2474 is fixed
2019-01-18 13:42:04 -08:00
Michael Vines
4f86563352 Entries that result in a ProgramError are still valid entries 2019-01-18 13:42:04 -08:00
Michael Vines
818afc68c1 Report number of entries and last_id on successful verification 2019-01-18 13:42:04 -08:00
Michael Vines
443d8ce7c4 Add option to restart the cluster during iterations 2019-01-18 13:42:04 -08:00
Michael Vines
da5cb0b012 Verify ledger before starting up the fullnode 2019-01-18 13:42:04 -08:00
Michael Vines
922ffdfc28 Remove unnecessary ledger/ subdirectory 2019-01-18 13:42:04 -08:00
Stephen Akridge
2f1107ff4f Add randomness to broadcast 2019-01-18 13:05:35 -08:00
Stephen Akridge
1fd7bd7ede Storage fixes
* replicators generate their sample values
* fixes to replicator block height logic
2019-01-18 13:05:35 -08:00
Michael Vines
c0c38463c7 Remove hard coded ports 2019-01-17 23:34:21 -08:00
Michael Vines
c1e142d1dc Revert "test_rpc_new fails locally, ignore for now"
This reverts commit 0c46f15f94.
2019-01-17 23:34:21 -08:00
Michael Vines
6933f2bad1 Remove stale TODO 2019-01-17 23:22:07 -08:00
Michael Vines
b03d1d8894 Enable integration test logging for better debug on CI failure 2019-01-17 23:14:18 -08:00
Michael Vines
8e4a86e329 Recovery multinode tests 2019-01-17 23:14:18 -08:00
Rob Walker
1f87d9ba4a add bloom benchmarking, perf improvement from Fnv ~= 8X (#2477)
* add bloom benchmarking, perf improvement from Fnv ~= 8X
* have a look at bits.set()
* ignore new benches to pacify CI (solana_upload_perf?)
2019-01-17 18:22:21 -08:00
Tyera Eulberg
14267e172d Add local drone integration test 2019-01-17 15:06:04 -08:00
Tyera Eulberg
95e83cfe3f Add tested process_drone_request method 2019-01-17 15:06:04 -08:00
Michael Vines
e74574706e Record Transactions with program errors in the ledger, they paid the fee 2019-01-17 13:55:56 -08:00
Eric
b381d9e06d add pngs and formatting 2019-01-17 14:30:20 -07:00
Eric
a416b53d11 file permissions 2019-01-17 14:30:20 -07:00
Eric
6fd13e3af0 rename files 2019-01-17 14:30:20 -07:00
Eric
4b7dc8200c reference reformatting 2019-01-17 14:30:20 -07:00
Eric
b83279848a html table to md table 2019-01-17 14:30:20 -07:00
Eric
a48b278c10 add economic design sections to TOC 2019-01-17 14:30:20 -07:00
Tyera Eulberg
75e19f4f0f Add build script 2019-01-17 12:38:04 -08:00
Tyera Eulberg
1a5bf0c689 Remove sleep 2019-01-17 12:38:04 -08:00
Tyera Eulberg
3e245f16c0 Add wallet deploy integration test 2019-01-17 12:38:04 -08:00
Tyera Eulberg
2698b7614b Add wallet deploy unit tests, incl program test fixture 2019-01-17 12:38:04 -08:00
Stephen Akridge
b296a9a0c7 Rename slice to segment to match book terminology 2019-01-17 10:19:45 -08:00
Michael Vines
9c8e853567 Rename --rpc arg to --rpc-port to match wallet cli 2019-01-17 09:04:57 -08:00
Michael Vines
825d8ef6c9 Add ability to use the RPC endpoint from a node other than the bootstrap leader 2019-01-17 09:04:57 -08:00
Michael Vines
da1201c552 Add --rpc-port option to select a custom RPC port 2019-01-17 09:04:57 -08:00
Michael Vines
e0c05bf437 Minor clean up 2019-01-17 09:04:57 -08:00
Michael Vines
a84b6bc7e4 Overhaul wallet rpc/drone command-line arguments 2019-01-17 08:36:05 -08:00
Pankaj Garg
00c4c30d72 Fix testnet bootup issue (#2465)
* Fix testnet bootup issue

* address review comments
2019-01-16 19:18:32 -08:00
Mark
72c7139d8c Allow chained BudgetExpr via indirection (#2461)
* Allow chained BudgetExpr via indirection

Change `And`, `Or`, and `After` expressions to contain
`Box<BudgetExpr>`s instead of directly holding payments

* run cargo fmt
2019-01-16 18:51:50 -06:00
dependabot[bot]
e287ba1a7e Bump bv from 0.10.0 to 0.11.0
Bumps [bv](https://github.com/tov/bv-rs) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/tov/bv-rs/releases)
- [Changelog](https://github.com/tov/bv-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tov/bv-rs/compare/0.10.0...0.11.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-16 16:47:35 -08:00
Stephen Akridge
8e67a18551 Add network timeouts and fix tests
test_rpc_send_tx could fail if it didn't succeed on the first try
* add some retries to consistently pass
2019-01-16 15:59:40 -08:00
dependabot[bot]
590b88f718 Bump serde_json from 1.0.35 to 1.0.36
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.35 to 1.0.36.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.35...v1.0.36)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-16 15:57:01 -07:00
Mark
00ee8813f7 Add initial build step to getting started (#2455) 2019-01-16 14:46:57 -06:00
Greg Fitzgerald
e76f2ea89c Add record to runtime pipeline 2019-01-16 13:39:30 -07:00
Greg Fitzgerald
c9f57c2d96 Review feedback 2019-01-16 13:38:32 -07:00
Greg Fitzgerald
438d36341d Add note about implications on previous blocks 2019-01-16 13:38:32 -07:00
Greg Fitzgerald
3ab54b1591 Review feedback 2019-01-16 13:38:32 -07:00
Greg Fitzgerald
77a2f186ee Add block confirmation proposal 2019-01-16 13:38:32 -07:00
Michael Vines
526344c9ac Log signature status uniformly 2019-01-16 12:17:46 -08:00
Michael Vines
f8bd19f5db Log the time it look to process the ledger for easier log inspection 2019-01-16 10:45:47 -08:00
Michael Vines
e4c6e4bf26 Report full node info before starting/updating network 2019-01-16 10:24:00 -08:00
Michael Vines
8783563176 Report full node info before running sanity 2019-01-16 10:24:00 -08:00
Michael Vines
6015a0ff15 Add info command 2019-01-16 10:24:00 -08:00
Greg Fitzgerald
63b76c32f9 80-char lines 2019-01-16 09:40:45 -08:00
Greg Fitzgerald
c9264ee12c Cleanup fanout docs and ASCII art 2019-01-16 09:40:45 -08:00
Tyera Eulberg
0d7b1a84cb Remove unused timeout wallet arg and config field 2019-01-16 09:20:45 -08:00
Michael Vines
81e17bad40 Failure to write a datapoint should not be fatal 2019-01-16 09:08:47 -08:00
Sagar Dhawan
97d90b99e2 Describe Data-Plane fanout and distribution (#2008) 2019-01-16 21:38:10 +05:30
Pankaj Garg
03d4d1cb36 Store and resend votes if leader's TPU port is unknown (#2438)
* Store and resend votes if leader's TPU port is unknown

* fix build errors

* fix failing tests
2019-01-16 06:14:55 -08:00
Michael Vines
3282cb85ae Refactor request_and_confirm_airdrop() to use send_and_confirm_tx() 2019-01-15 19:29:59 -08:00
Michael Vines
9354e797b6 Cleanly handle balance underflows 2019-01-15 19:29:59 -08:00
Michael Vines
3f9c2bc33b Resend transactions a couple times before giving up 2019-01-15 16:07:32 -08:00
Michael Vines
4369c1a113 RPC port is no longer reset on leader-to-validator transition 2019-01-15 16:06:56 -08:00
Michael Vines
b1e57e2a30 Retry rpc requests on connection failures
Applied a blanket default retry count of 5, which seems like enough but
not excessive retries.
2019-01-15 15:30:10 -08:00
Michael Vines
4d9489aeb1 Use RPC endpoint of the provided network entrypoint rather than searching for the leader 2019-01-15 15:13:57 -08:00
Rob Walker
45c247fa5b bloom for forking (#2431)
* bloom for forking
* clippy fixes
* remove bloom_hash_index
2019-01-15 13:56:54 -08:00
dependabot[bot]
4e2663023b Bump nix from 0.12.0 to 0.13.0
Bumps [nix](https://github.com/nix-rust/nix) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/nix-rust/nix/releases)
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-15 14:35:22 -07:00
Pankaj Garg
fa4608a95d Change leader rotation time to a multiple of ticks per block (#2414)
* Change leader rotation time to a multiple of ticks per block

* fix component dependencies

* review comments
2019-01-15 12:07:58 -08:00
Tyera Eulberg
fec47a09a9 Add test from drone business logic; remove flaky, mis-placed integration test 2019-01-15 12:53:09 -07:00
Rob Walker
022a97da99 revert revert of kill window (#2427)
* remove window code from most places
* window used only for testing
* remove unecessary clippy directives
2019-01-15 10:51:53 -08:00
dependabot[bot]
e9116736cd Bump libc from 0.2.46 to 0.2.47
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.46 to 0.2.47.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.46...0.2.47)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-15 08:56:16 -07:00
dependabot[bot]
2b549e3af6 Bump hashbrown from 0.1.7 to 0.1.8
Bumps [hashbrown](https://github.com/Amanieu/hashbrown) from 0.1.7 to 0.1.8.
- [Release notes](https://github.com/Amanieu/hashbrown/releases)
- [Changelog](https://github.com/Amanieu/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/hashbrown/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-15 08:55:24 -07:00
Jak May
b2afd1ea0b Bump rbpf to 0.1.9 (#2422) 2019-01-15 00:42:30 -08:00
Jack May
ef8e5b40b6 Use dep files and restore tests 2019-01-14 23:41:07 -08:00
Jack May
a6773ad442 Specify entrypoint when building rust programs 2019-01-14 20:13:01 -08:00
Jack May
c2add08efb Move parameter to make flags variable 2019-01-14 20:12:06 -08:00
Michael Vines
a33c76a456 Remove JsonRpcRequestProcessor dependency 2019-01-14 17:39:31 -08:00
Michael Vines
11b1bd278a Remove unused exit field 2019-01-14 17:39:12 -08:00
Michael Vines
e3a96ed3fc Minor new cleanup 2019-01-14 16:04:29 -08:00
Rob Walker
447243f994 Revert "remove window code from most places" (#2417)
* Revert "Fix link to book in Local Testnet section (#2416)"

This reverts commit 710c0c9980.

* Revert "Add current leader information to dashboard (#2413)"

This reverts commit f0300c1711.

* Revert "remove window code from most places (#2389)"

This reverts commit e3c0bd5a3f.
2019-01-14 15:11:18 -08:00
Pankaj Garg
710c0c9980 Fix link to book in Local Testnet section (#2416) 2019-01-14 14:57:12 -08:00
Pankaj Garg
f0300c1711 Add current leader information to dashboard (#2413) 2019-01-14 14:20:05 -08:00
Rob Walker
e3c0bd5a3f remove window code from most places (#2389)
* remove window code from most places
* window used only for testing
* remove unecessary clippy directives
2019-01-14 12:11:55 -08:00
Tyera Eulberg
8af61f561b Improve Wallet coverage (#2385)
* Add trait for RpcRequestHandler trait for RpcClient and add MockRpcClient for unit tests

* Add request_airdrop integration test

* Add timestamp_tx, witness_tx, and cancel_tx to wallet integration tests; add wallet integration tests to test-stable

* Add test cases

* Ignore plentiful sleeps in unit tests
2019-01-14 00:10:03 -07:00
Michael Vines
780360834d Iteration testing v0.1 2019-01-13 21:49:09 -08:00
Michael Vines
74e503da92 Hold an accounts_db read lock as briefly as possible to avoid deadlocking 2019-01-13 21:49:09 -08:00
Michael Vines
d28b643c84 localnet-sanity.sh now supports iterations testing 2019-01-13 21:49:09 -08:00
dependabot[bot]
dc1049a6e7 Bump serde_json from 1.0.34 to 1.0.35
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.34 to 1.0.35.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.34...v1.0.35)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-12 21:26:45 -07:00
dependabot[bot]
f965b3de46 Bump reqwest from 0.9.7 to 0.9.8
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.7 to 0.9.8.
- [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[bot] <support@dependabot.com>
2019-01-12 12:44:00 -07:00
Michael Vines
eb54a4fe91 Update book URL 2019-01-12 11:08:29 -08:00
Michael Vines
5d3847d14d Publish book from both the edge and beta channels 2019-01-12 11:08:29 -08:00
Michael Vines
5b92286568 Remove channel duplication 2019-01-12 11:08:29 -08:00
Michael Vines
094bc59553 refactor: reduce node_info scope 2019-01-12 10:28:38 -07:00
Jak May
e9a0b3a8f3 Add BPF-to-BPF and PC relative call tests (#2395) 2019-01-11 19:33:08 -08:00
Pankaj Garg
1724430489 Remove clippy override for cyclomatic complexity (#2392)
* Remove clippy override for cyclomatic complexity

* reduce cyclomatic complexity of main function

* fix compilation errors
2019-01-11 16:49:18 -08:00
Jak May
23c43ed21b Multi-file BPF C builds (#2393) 2019-01-11 15:33:21 -08:00
Greg Fitzgerald
79b334b7f1 Don't use count_valid_ids in bench 2019-01-11 14:54:17 -07:00
Greg Fitzgerald
9328ee4f63 Revert "Revert "Delete unused code and its tests""
This reverts commit d6b3991d49.
2019-01-11 14:54:17 -07:00
Pankaj Garg
d7594b19fc Implemented a trait for vote signer service (#2386)
* Implemented a trait for vote signer service

* removes need for RPC in unit tests for vote signing

* fix build errors

* address some review comments
2019-01-11 12:58:31 -08:00
Michael Vines
d6b3991d49 Revert "Delete unused code and its tests"
This reverts commit e713ba06f1.
2019-01-11 07:30:28 -08:00
dependabot[bot]
ec63bacdc1 Bump reqwest from 0.9.6 to 0.9.7
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.6 to 0.9.7.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.6...v0.9.7)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-10 23:23:38 -07:00
Greg Fitzgerald
e713ba06f1 Delete unused code and its tests 2019-01-10 23:19:38 -07:00
Greg Fitzgerald
37cb218437 Drop the serialization length 2019-01-10 17:05:03 -08:00
Greg Fitzgerald
4f79a8a204 Use serialized_size - less fragile 2019-01-10 17:05:03 -08:00
Greg Fitzgerald
7341298a11 Cleanup tpu forwarder (#2377)
* Use unwrap() on locks

An error there generally indicates a programmer error, not a
runtime error, so a detailed runtime message is not generally useful.

* Only clone Arcs when passing them across thread boundaries

* Cleanup TPU forwarder

By separating the query from the update, all the branches get easier to
test. Also, the update operation gets so simple, that we see it
belongs over in packet.rs.

* Thanks clippy

cute
2019-01-10 13:34:48 -07:00
dependabot[bot]
b9c27e3a9d Bump rocksdb from 0.10.1 to 0.11.0 (#2376)
Bumps [rocksdb](https://github.com/spacejam/rust-rocksdb) from 0.10.1 to 0.11.0.
- [Release notes](https://github.com/spacejam/rust-rocksdb/releases)
- [Changelog](https://github.com/rust-rocksdb/rust-rocksdb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spacejam/rust-rocksdb/compare/v0.10.1...v0.11.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-10 11:12:06 -08:00
Greg Fitzgerald
885fe38c01 Move BloomHashIndex into its own module
This trait is for bloom, not crds.

Slightly better would be to put it in the SDK so that the trait
implementations could go into hash and pubkey, but if we don't
want compatibility constraints, this is the next best thing.
2019-01-10 10:22:16 -08:00
Pankaj Garg
2dbe8fc1a9 Refactor vote signer code (#2368)
* Refactor vote signer code

* fixed test compilation errors

* address clippy errors

* fix missing macro_use

* move macro use

* review comments
2019-01-10 09:21:38 -08:00
Sagar Dhawan
7122139e12 Rewrite TPU forwarder test (#2344) 2019-01-10 13:50:28 +05:30
Michael Vines
4e6c03c9da Avoid holding a read lock during IO 2019-01-10 00:34:50 -07:00
Michael Vines
d5f27f9b1e shellcheck 2019-01-09 22:06:58 -07:00
Michael Vines
86f19a3ab3 Propagate PS4 to prevent unintentional buildkite log unfolding 2019-01-09 22:02:31 -07:00
Michael Vines
be0eefb0af Add timeout to prevent stuck bench-tps when a cluster goes bad 2019-01-09 19:21:53 -07:00
Michael Vines
c1cd92bbee Avoid -d arg conflict
-D is now "delete"
-d is now "disk type"
2019-01-09 16:39:24 -08:00
Stephen Akridge
44b7684d56 Fix some instances of ledger to db_ledger 2019-01-09 16:33:37 -08:00
Stephen Akridge
0c90e1eff6 Make entry_sender optional on window_service
window_service in replicator has no need to consume the the produced entries.
2019-01-09 15:15:47 -08:00
Stephen Akridge
491bca5e4b Remove ledger.rs
Split into entry.rs for entry-constructing functions and EntrySlice
trait and db_ledger.rs for ledger helper test functions.
2019-01-09 15:15:47 -08:00
Stephen Akridge
ebd676faaa Rename Block to EntrySlice 2019-01-09 15:15:47 -08:00
Stephen Akridge
045c5e8556 Remove most of the old ledger code
Removes LedgerWriter, read_ledger, LedgerWindow
2019-01-09 15:15:47 -08:00
Stephen Akridge
45b4cf2887 Remove store_ledger_stage which is no longer needed 2019-01-09 15:15:47 -08:00
Michael Vines
4b5acc065a Give the bootstrap leader one million tokens as a #2355 workaround 2019-01-09 13:30:20 -08:00
Stephen Akridge
73eca72f14 Switch test to send a repair request to try and download from replicator
Removes need for read_ledger in the test and also tests replicator
download path.
2019-01-09 13:24:12 -08:00
Michael Vines
28431ff22c Add configurable RUST_LOG for ./net.sh sanity 2019-01-09 12:12:50 -08:00
Michael Vines
639bed2f6d Reorder sanity.
1. Check for presence of nodes
2. Check for functioning RPC API
3. Then try the wallet
2019-01-09 12:05:30 -08:00
Michael Vines
77794eebdb Remove |cargo package| sanity step
Unfortunately due to our multi-crate repo, as soon as
|./scripts/increment-cargo-version.sh| is run after a release, |cargo
package| will fail for crates that depend on other in-tree crates, as
the new crate version has not yet been published to crates.io.
For now this means that we need to continue flying blind and be prepared
to deal with minor publishing issues on each new release.
2019-01-09 11:59:24 -08:00
Michael Vines
eb37aa2bba Kill monitoring scripts by process group to ensure a full shutdown 2019-01-09 11:59:01 -08:00
Michael Vines
048fe371aa set -x for more detailed logs 2019-01-09 11:59:01 -08:00
Michael Vines
0b666ad9fd De-dup error messages 2019-01-09 11:59:01 -08:00
Michael Vines
87c9af142f Preserve config/ when skipSetup 2019-01-09 11:59:01 -08:00
Michael Vines
6b46c22b42 Use restart 2019-01-09 11:59:01 -08:00
Rob Walker
94494b64d7 whack commented out, obsolete, superceded test 2019-01-09 11:30:07 -08:00
Rob Walker
b648f37b97 encapsulate erasure_cf (#2349) 2019-01-09 10:21:55 -08:00
Michael Vines
78d3b83900 Remove vestigial vote account configuration from fullnode-config 2019-01-09 09:56:44 -08:00
jackcmay
56b6ed6730 Rerun build if any file in a directory has changed (#2343) 2019-01-09 09:56:23 -08:00
Michael Vines
e0c68bf9ad docs: -z is a common option 2019-01-08 21:11:43 -08:00
Michael Vines
64ebd9a194 Add update-to-restart operation. Also try to update before restarting on sanity failures 2019-01-08 21:11:43 -08:00
Michael Vines
35fe08b3bc Add update support 2019-01-08 21:11:43 -08:00
Michael Vines
aedab3f83f Run sanity when previous ledger/setup is preserved 2019-01-08 21:11:43 -08:00
Michael Vines
5c87ddc80e nit: hide echo 2019-01-08 21:11:43 -08:00
Greg Fitzgerald
f53810fcd2 Remove unused exit variable
The exit variable was only used by a test.
2019-01-08 20:22:31 -08:00
Michael Vines
56fa3a09c8 Surface the spy node's id, useful for log analysis 2019-01-08 17:43:41 -08:00
Tyera Eulberg
58bca04a3f Couple edits 2019-01-08 17:44:09 -07:00
Stephen Akridge
3c6afe7707 Rename get_blob_bytes to read_blobs_bytes 2019-01-08 16:00:39 -08:00
Stephen Akridge
09296e0d71 Fix two storage tests
* test_encrypt_files_many_keys_multiple_keys passing
  - buffer chunk size unified between single key and multiple key path,
    which shouldn't be necessary but can fix later.
* test_encrypt_file_many_keys_bad_key_length passing
2019-01-08 16:00:39 -08:00
Stephen Akridge
4b3d64ec9f Convert chacha_encrypt_file to work with db_ledger blobs directly 2019-01-08 16:00:39 -08:00
Rob Walker
a904e15ecc enscapsulate data_cf (#2336)
* enscapsulate data_cf
2019-01-08 15:53:44 -08:00
Greg Fitzgerald
a82a5ae184 Delete unused code
The ignored test is still broken, but at least no longer creates a
window for no reason.

Also removed all remaining references to "ncp".
2019-01-08 14:09:50 -08:00
Rob Walker
bafd90807d encapsulate meta_cf (#2335) 2019-01-08 11:41:55 -08:00
dependabot[bot]
08924ea36a Bump rand from 0.6.3 to 0.6.4
Bumps [rand](https://github.com/rust-random/rand) from 0.6.3 to 0.6.4.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/0.6.3...0.6.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-08 11:09:03 -07:00
jackcmay
0f8ea6872e Add missing error counters and load_account test cases (#2327) 2019-01-08 09:20:25 -08:00
Michael Vines
1b7598e351 Add retries to RPC API probe 2019-01-08 08:50:51 -08:00
Greg Fitzgerald
d2431128c7 Remove WriteStage from TPU/TVU diagrams
Fixes #2312
2019-01-08 08:42:06 -08:00
dependabot[bot]
8e0e12e5c9 Bump reqwest from 0.9.5 to 0.9.6
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.5 to 0.9.6.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.5...v0.9.6)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-08 09:11:14 -07:00
Michael Vines
e883117a7d Add missing description field, required for crate publishing 2019-01-07 23:02:32 -08:00
Michael Vines
cd0e08cae5 Add fullnode-config crate 2019-01-07 23:02:32 -08:00
Michael Vines
1490c42d9f Use docker rust docker image to avoid rocksdb build errors 2019-01-07 23:02:32 -08:00
Michael Vines
789ee9f138 package or publish. Also package on branch builds 2019-01-07 23:02:32 -08:00
Michael Vines
2c52e82352 Use retry_make_rpc_request to avoid occasional CI test failures 2019-01-07 21:25:25 -08:00
Michael Vines
0a981a6606 Double publish crate timeout 2019-01-07 20:46:21 -08:00
Michael Vines
534f8d7a4e Don't turn the build red if channel cannot be figured (eg, building a tag) 2019-01-07 19:56:07 -08:00
Michael Vines
c4ca76e39e Only check TRIGGERED_BUILDKITE_TAG 2019-01-07 19:56:01 -08:00
Michael Vines
a8b9899dee Add retry, restore ignored tests 2019-01-07 19:30:08 -08:00
Stephen Akridge
d2cb4e003c Re-enable the --lib tests 2019-01-07 15:28:20 -08:00
Pankaj Garg
0a0c62f384 Fixes to CI bench comparison (#2319)
* Fixes to CI bench comparison

- The table columns did not match the header
- The last commit was not identified correctly

* review comments
2019-01-07 14:26:21 -08:00
Greg Fitzgerald
6000df9779 Optimize has_duplicates() for short slices 2019-01-07 13:20:04 -07:00
Greg Fitzgerald
24963e547c with_subset() -> get_subset_unchecked_mut()
A simpler, safer, and better documented use of unsafe code
2019-01-07 13:20:04 -07:00
Michael Vines
3ad3dee4ef Retry node registration to avoid failing before the local vote signer starts 2019-01-07 11:02:35 -08:00
Michael Vines
46d44ca99c Add make_rpc_request retry mechanism 2019-01-07 11:02:35 -08:00
Michael Vines
06d1af8b18 Remove stale comment 2019-01-07 09:35:39 -08:00
dependabot[bot]
d34b2c4ffd Bump tokio from 0.1.13 to 0.1.14
Bumps [tokio](https://github.com/tokio-rs/tokio) from 0.1.13 to 0.1.14.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Changelog](https://github.com/tokio-rs/tokio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-0.1.13...tokio-0.1.14)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-07 08:38:15 -07:00
jackcmay
0c52df7569 Consolidate locks and error handling when loading accounts(#2309) 2019-01-06 22:06:55 -08:00
Pankaj Garg
91bd38504e Use vote signer service in fullnode (#2009)
* Use vote signer service in fullnode

* Use native types for signature and pubkey, and address other review comments

* Start local vote signer if a remote service address is not provided

* Rebased to master

* Fixes after rebase
2019-01-05 12:57:52 -08:00
Michael Vines
71a2b794b4 Enable info logging on non-perf clusters to aid debug of failures 2019-01-05 08:28:32 -08:00
Michael Vines
373714bf0b Disable publish snap again 2019-01-04 21:20:33 -08:00
Michael Vines
ee769171b9 Restore publish snap 2019-01-04 20:46:44 -08:00
Michael Vines
6ebadbcca3 Plot testnet-manager events 2019-01-04 20:12:11 -08:00
jackcmay
3f60d98163 Update comments (#2310) 2019-01-04 19:19:56 -08:00
Michael Vines
ea00c1274e Add net sanity failure metric 2019-01-04 18:45:55 -08:00
Michael Vines
b7dc9dbc76 RPC API now assumes a drone running on the bootstrap leader 2019-01-04 18:45:55 -08:00
Michael Vines
8b357dcb32 cargo fmt 2019-01-04 16:39:04 -08:00
Michael Vines
1f6346d880 De-dup ledgers - db_ledger is now the only ledger written to disk 2019-01-04 16:37:00 -08:00
Jack May
b7bd38744c Spelling and formatting 2019-01-04 16:04:31 -08:00
Jack May
f8a67e282a Ignore test_tpu_forwarder (#2307) 2019-01-04 16:02:50 -08:00
Michael Vines
0a7e199c82 Don't follow the leader: assume drone runs on the network entrypoint 2019-01-04 15:58:42 -08:00
Greg Fitzgerald
5143f6d6f1 Boot unused crate 2019-01-04 14:34:23 -07:00
Greg Fitzgerald
30b662df39 Remove clones in native programs 2019-01-04 13:38:03 -07:00
Stephen Akridge
33f2d83506 Add timeout and prints to port search
Otherwise nc can hang forever.
2019-01-04 11:07:17 -08:00
dependabot[bot]
4244a14ad3 Bump rand from 0.6.2 to 0.6.3
Bumps [rand](https://github.com/rust-random/rand) from 0.6.2 to 0.6.3.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/0.6.2...0.6.3)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-04 11:09:27 -07:00
dependabot[bot]
f031fe58fa Bump rand from 0.6.1 to 0.6.2
Bumps [rand](https://github.com/rust-random/rand) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/0.6.1...0.6.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-04 08:43:36 -07:00
Kevin Hart
84cc240f34 Enhance ledger-tool
Add a command-line argument (min-hashes) to restrict the entries
processed by ledger-tool.  For example, --min-hashes 1 will strip
"empty" Entries, i.e. those with num_hashes = 0.

Add basic ledger tool test
2019-01-04 08:17:43 -07:00
dependabot[bot]
b26906df1b Bump rand_chacha from 0.1.0 to 0.1.1
Bumps [rand_chacha](https://github.com/rust-random/rand) from 0.1.0 to 0.1.1.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/rand_chacha-0.1.0...rand_isaac-0.1.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-04 08:15:18 -07:00
Michael Vines
56a3197f7f spelling 2019-01-03 18:48:24 -08:00
Greg Fitzgerald
0505d7bd32 Don't double-clone every account 2019-01-03 17:42:37 -07:00
Sunny Gleason
a448c0b81e implement per-thread, per-batch sleep in ms (throttling allows easier UI dev) (#2293)
* implement per-thread, per-batch sleep in ms (throttling allows easier UI development)
* tidy up sleep() call with Duration::from_millis() instead of Duration::new()
* fixup indentation style
* removing multinode-demo/client-throttled.sh (same functionality available via arguments)
2019-01-03 17:16:06 -05:00
carllin
8116fe8def Add proposed design for db_ledger (#2253)
* Add proposed design for db_ledger
2019-01-03 14:12:55 -08:00
Jack May
7c6dcc8c73 Ignore wallet/target 2019-01-03 10:28:43 -08:00
Michael Vines
1a9401e1f3 Permit build on Cargo.{lock,toml} changes 2019-01-03 09:35:11 -08:00
Pankaj Garg
00d310f86d Remove some metrics datapoint, as it was causing excessive logging (#2287)
- 100 nodes test was bringing down the influx DB server
2019-01-03 09:25:11 -08:00
dependabot[bot]
c4259fc8cc Bump libc from 0.2.45 to 0.2.46
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.45 to 0.2.46.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.45...0.2.46)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-03 09:13:03 -07:00
dependabot[bot]
8c5614daa1 Bump serde_derive from 1.0.82 to 1.0.84
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.82 to 1.0.84.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.82...v1.0.84)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-02 15:54:13 -08:00
dependabot[bot]
eb668c6466 Bump serde from 1.0.82 to 1.0.84
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.82 to 1.0.84.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.82...v1.0.84)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-02 16:42:35 -07:00
jackcmay
a461c5682d First stab at Rust BPF (#2269)
First stab at Rust BPF
2019-01-02 15:12:42 -08:00
Manuel
e3478ee2ab svg logo and increased font size for better reading experience 2019-01-02 08:33:57 -07:00
Sagar Dhawan
0bea870b22 Dynamic N layer 'avalanche' broadcast and retransmit (#2058)
* Dynamic N layer avalanche broadcast and retransmit
2019-01-02 14:16:15 +05:30
dependabot[bot]
5fbdc6450d Bump serde_json from 1.0.33 to 1.0.34
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.33 to 1.0.34.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.33...v1.0.34)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-30 21:15:59 -08:00
Michael Vines
1531a1777a Add RPC API check 2018-12-24 22:51:36 -08:00
Michael Vines
f38345fdad Cargo.lock 2018-12-24 22:51:36 -08:00
Michael Vines
04d46ea33f Run oom-monitor as root 2018-12-24 22:51:36 -08:00
Michael Vines
3a2fa9a650 Enable ledger/validator sanity for non-perf testnets 2018-12-24 22:51:36 -08:00
Michael Vines
f5bbc5e961 Fix args 2018-12-23 20:56:13 -08:00
Michael Vines
95c9fefbd0 Make sanity failure message more visible 2018-12-23 17:30:59 -08:00
Michael Vines
073a48ab85 Restore timeout 2018-12-23 17:30:41 -08:00
Michael Vines
753a783ba9 Add solana user to adm group for /var/log/syslog access 2018-12-23 17:28:35 -08:00
Michael Vines
58f2598d5d Revert "Validators make a transaction to advertise their storage last_id"
This reverts commit a1759aed19.
2018-12-23 14:02:09 -08:00
Michael Vines
3c835b692b Use netLogDir 2018-12-23 10:33:43 -08:00
Michael Vines
7f2fa8bbcb Collect and upload network logs 2018-12-23 10:19:10 -08:00
Michael Vines
a6fd1ca3db Add logs subcommand to fetch remote logs from each network node 2018-12-23 10:19:10 -08:00
carllin
58a4905916 Make reconstruct_entries_from_blobs() support Blobs and borrowed SharedBlobs, make distinction between to_blobs and to_shared_blobs (#2270) 2018-12-22 19:30:30 -08:00
Michael Vines
2c9607d5da Rename getConfirmation -> getConfirmationTime 2018-12-22 12:47:02 -08:00
Michael Vines
371cb4f0f3 Document getConfirmationTime 2018-12-22 12:47:02 -08:00
Michael Vines
b46c809544 source ci/upload-ci-artifact.sh 2018-12-22 12:34:30 -08:00
Michael Vines
eb29a2898c Uplaod net/log/ files as buildkite artifacts 2018-12-22 12:22:58 -08:00
Michael Vines
c3a74e5e63 Avoid unnecessary shellcheck directives 2018-12-22 11:57:47 -08:00
Stephen Akridge
a1759aed19 Validators make a transaction to advertise their storage last_id
* Also implement more storage contract logic
* Add transactions for proof validation,
* Move storage state members into system storage account userdata
2018-12-21 15:45:30 -08:00
Sathish
1a3387706d Spawn threads based on cpu count (#2232) 2018-12-21 13:55:45 -08:00
Pankaj Garg
41f8764232 Ignore error while enabling nvidia persistence mode (#2265) 2018-12-21 12:37:51 -08:00
Pankaj Garg
4bf797c8f1 Load nvidia drivers on node startup (#2263)
* Load nvidia drivers on node startup

* added new script to enable nvidia driver persistent mode

* remove set -ex
2018-12-21 11:43:52 -08:00
jackcmay
7e3b54f826 Remove llc step when building BPF C programs (#2254) 2018-12-21 08:49:29 -08:00
Pankaj Garg
23d3a9ae42 Use CUDA for testnet automation performance calculations (#2259) 2018-12-21 04:27:31 -08:00
Pankaj Garg
756156e9db Use SSD for testnet automation (#2257) 2018-12-20 20:13:56 -08:00
Michael Vines
4807fb4c5c Use if to be more explict about error handling (set -e trouble?) 2018-12-20 19:07:17 -08:00
Michael Vines
dd25c5b085 Link Cargo.toml features 2018-12-20 19:07:17 -08:00
Michael Vines
becfd1e9fa ci/test-stable-perf.sh now runs on macOS 2018-12-20 17:23:22 -08:00
Pankaj Garg
951d6398a0 Rename finality to confirmation (#2250)
* Rename finality to confirmation

* fix cargo fmt errors
2018-12-20 15:47:48 -08:00
Pankaj Garg
7c98545b33 Use newer votes to calculate confirmation time (#2247) 2018-12-20 15:27:47 -08:00
Pankaj Garg
bb1060bdad Reduce ticks per block to increase voting frequency (#2242) 2018-12-20 14:43:03 -08:00
Michael Vines
7ad45a91ec Fix compile error 2018-12-20 13:47:36 -08:00
Michael Vines
51045962d3 Adjust settings 2018-12-20 12:32:25 -08:00
Michael Vines
034c5d0422 db_ledger now fully encapsulates rocksdb 2018-12-20 12:32:25 -08:00
carllin
7148c14178 Debug broadcast (#2233)
* Account for duplicate blobs in process_blobs

* Increase max bytes for level base to match write buffer
2018-12-20 12:12:04 -08:00
Michael Vines
93fb61dc8f Re-export rocksdb::DBRawIterator until it can be encapsulated 2018-12-20 10:38:03 -08:00
Michael Vines
b36ceb5be4 Remove rocksdb dependency from result.rs 2018-12-20 10:38:03 -08:00
Michael Vines
37d7ad819b Purge DB::destroy() usage 2018-12-20 10:38:03 -08:00
Michael Vines
6bb6785936 Document updating Cargo.lock during a version bump 2018-12-20 09:20:00 -08:00
Michael Vines
cb70824ed1 Cargo.lock 2018-12-20 09:20:00 -08:00
Michael Vines
ddc1082e8c Stable dashboard can now actually come from the stable channel 2018-12-20 08:04:59 -08:00
Michael Vines
f98d72a30b Fetch latest tag 2018-12-19 20:17:49 -08:00
Greg Fitzgerald
71df71c601 Revert Clang to C lang change 2018-12-19 20:17:23 -08:00
Sbhargava
1d0f7c44e2 Copy editing introduction
Not sure how else to comment, but I'd encourage keeping the content timeless rather than an update. So don't talk about recent releases or next we're doing X. (just a suggestion ;)
2018-12-19 20:17:23 -08:00
Michael Vines
d78f19f8bb Select correct branch for {testnet,-perf} when using a stable channel tag 2018-12-19 17:46:18 -08:00
Michael Vines
0e567381fb v0.12.0 2018-12-19 17:03:28 -08:00
1167 changed files with 188734 additions and 46305 deletions

42
.appveyor.yml Normal file
View File

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

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

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

View File

@@ -1,10 +1,12 @@
{
"_public_key": "ae29f4f7ad2fc92de70d470e411c8426d5d48db8817c9e3dae574b122192335f",
"environment": {
"CODECOV_TOKEN": "EJ[1:Kqnm+k1Z4p8nr7GqMczXnzh6azTk39tj3bAbCKPitUc=:EzVa4Gpj2Qn5OhZQlVfGFchuROgupvnW:CbWc6sNh1GCrAbrncxDjW00zUAD/Sa+ccg7CFSz8Ua6LnCYnSddTBxJWcJEbEs0MrjuZRQ==]",
"CRATES_IO_TOKEN": "EJ[1:Kqnm+k1Z4p8nr7GqMczXnzh6azTk39tj3bAbCKPitUc=:qF7QrUM8j+19mptcE1YS71CqmrCM13Ah:TZCatJeT1egCHiufE6cGFC1VsdJkKaaqV6QKWkEsMPBKvOAdaZbbVz9Kl+lGnIsF]",
"INFLUX_DATABASE": "EJ[1:Kqnm+k1Z4p8nr7GqMczXnzh6azTk39tj3bAbCKPitUc=:PetD/4c/EbkQmFEcK21g3cBBAPwFqHEw:wvYmDZRajy2WngVFs9AlwyHk]",
"INFLUX_USERNAME": "EJ[1:Kqnm+k1Z4p8nr7GqMczXnzh6azTk39tj3bAbCKPitUc=:WcnqZdmDFtJJ01Zu5LbeGgbYGfRzBdFc:a7c5zDDtCOu5L1Qd2NKkxT6kljyBcbck]",
"INFLUX_PASSWORD": "EJ[1:Kqnm+k1Z4p8nr7GqMczXnzh6azTk39tj3bAbCKPitUc=:LIZgP9Tp9yE9OlpV8iogmLOI7iW7SiU3:x0nYdT1A6sxu+O+MMLIN19d2t6rrK1qJ3+HnoWG3PDodsXjz06YJWQKU/mx6saqH+QbGtGV5mk0=]"
"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]"
}
}

View File

@@ -1,2 +1,42 @@
CI_BUILD_START=$(date +%s)
export CI_BUILD_START
source ci/env.sh
#
# Kill any running docker containers, which are potentially left over from the
# previous CI job
#
(
containers=$(docker ps -q)
if [[ $(hostname) != metrics-solana-com && -n $containers ]]; then
echo "+++ Killing stale docker containers"
docker ps
# shellcheck disable=SC2086 # Don't want to double quote $containers
docker kill $containers
fi
)
# Processes from previously aborted CI jobs seem to loiter, unclear why as one
# would expect the buildkite-agent to clean up all child processes of the
# aborted CI job.
# But as a workaround for now manually kill some known loiterers. These
# processes will all have the `init` process as their PPID:
(
victims=
for name in bash cargo docker solana; do
victims="$victims $(pgrep -u "$(id -u)" -P 1 -d \ $name)"
done
for victim in $victims; do
echo "Killing pid $victim"
kill -9 "$victim" || true
done
)
# HACK: These are in our docker images, need to be removed from CARGO_HOME
# because we try to cache downloads across builds with CARGO_HOME
# cargo lacks a facility for "system" tooling, always tries CARGO_HOME first
cargo uninstall cargo-audit || true
cargo uninstall svgbob_cli || true
cargo uninstall mdbook || true

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,12 @@
ignore:
- "src/bin"
coverage:
range: 50..100
round: down
precision: 1
status:
project: off
patch: off
comment:
layout: "diff"
behavior: default
require_changes: no

5
.gitbook.yaml Normal file
View File

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

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

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

16
.gitignore vendored
View File

@@ -1,20 +1,24 @@
/docs/html/
/docs/src/tests.ok
/docs/src/.gitbook/assets/*.svg
/farf/
/solana-release/
/solana-release.tar.bz2
/solana-metrics/
/solana-metrics.tar.bz2
/target/
/book/html/
/book/src/img/
/book/src/tests.ok
**/*.rs.bk
.cargo
# node config that is rsynced
/config/
# node config that remains local
/config-local/
# log files
*.log
log-*.txt
log-*/
# intellij files
/.idea/
/solana.iml
/.vscode/

53
.mergify.yml Normal file
View File

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

43
.travis.yml Normal file
View File

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

View File

@@ -1,69 +1,248 @@
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.
Rust coding conventions
---
## Pull Requests
* 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`.
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.
* All Rust code is linted with Clippy. If you'd prefer to ignore its advice, do so explicitly:
```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
```
```rust
#[allow(clippy::too_many_arguments)]
```
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
```
### 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 1000 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.
## 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. Old PRs will be marked stale and then
closed automatically 7 days later.
### 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
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.
## 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 linted with Clippy. If you'd prefer to ignore its advice, do
so explicitly:
```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)
[Terms currently in use](docs/src/terminology.md)
Proposing architectural changes
---
## 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
change the architecture, you'll need to at least propose a change the content
under the [Proposed
Changes](https://solana-labs.github.io/solana/proposals.html) chapter. Here's
the full process:
Solana's architecture is described by docs generated from markdown files in
the `docs/src/` directory, maintained by an *editor* (currently @garious). To
add a design proposal, you'll need to include it in the
[Accepted Design Proposals](https://docs.solana.com/proposals)
section of the Solana docs. Here's the full process:
1. Propose to a change to the architecture 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 the editor and any relevant
*maintainers* to the PR review.
1. Propose a design by creating a PR that adds a markdown document to the
`docs/src/proposals` directory and references it from the [table of
contents](docs/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
editor and maintainers support your plan of attack.
maintainers support your plan of attack.
3. Submit PRs that implement the proposal. When the implementation reveals the
need for tweaks to the architecture, 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, the editor will then work to integrate
the document into the book.
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.

5094
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,117 +1,66 @@
[package]
name = "solana"
description = "Blockchain, Rebuilt for Scale"
version = "0.11.0"
documentation = "https://docs.rs/solana"
homepage = "https://solana.com/"
readme = "README.md"
repository = "https://github.com/solana-labs/solana"
authors = ["Solana Maintainers <maintainers@solana.com>"]
license = "Apache-2.0"
edition = "2018"
[badges]
codecov = { repository = "solana-labs/solana", branch = "master", service = "github" }
[features]
bpf_c = ["solana-bpfloader/bpf_c"]
chacha = []
cuda = []
erasure = []
ipv6 = []
test = []
unstable = []
[dependencies]
bincode = "1.0.0"
bs58 = "0.2.0"
bv = { version = "0.10.0", features = ["serde"] }
byteorder = "1.2.1"
chrono = { version = "0.4.0", features = ["serde"] }
hashbrown = "0.1.7"
indexmap = "1.0"
itertools = "0.8.0"
libc = "0.2.45"
log = "0.4.2"
nix = "0.12.0"
rand = "0.6.1"
rand_chacha = "0.1.0"
rayon = "1.0.0"
reqwest = "0.9.0"
ring = "0.13.2"
rocksdb = "0.10.1"
serde = "1.0.82"
serde_derive = "1.0.82"
serde_json = "1.0.10"
solana-bpfloader = { path = "programs/native/bpf_loader", version = "0.11.0" }
solana-drone = { path = "drone", version = "0.11.0" }
solana-jsonrpc-core = "0.4.0"
solana-jsonrpc-http-server = "0.4.0"
solana-jsonrpc-macros = "0.4.0"
solana-jsonrpc-pubsub = "0.4.0"
solana-jsonrpc-ws-server = "0.4.0"
solana-logger = { path = "logger", version = "0.11.0" }
solana-metrics = { path = "metrics", version = "0.11.0" }
solana-native-loader = { path = "programs/native/native_loader", version = "0.11.0" }
solana-netutil = { path = "netutil", version = "0.11.0" }
solana-sdk = { path = "sdk", version = "0.11.0" }
solana-system-program = { path = "programs/native/system", version = "0.11.0" }
tokio = "0.1"
tokio-codec = "0.1"
untrusted = "0.6.2"
[dev-dependencies]
hex-literal = "0.1.1"
matches = "0.1.6"
[[bench]]
name = "bank"
[[bench]]
name = "banking_stage"
[[bench]]
name = "db_ledger"
[[bench]]
name = "ledger"
[[bench]]
name = "signature"
[[bench]]
name = "sigverify"
[[bench]]
required-features = ["chacha"]
name = "chacha"
[workspace]
members = [
".",
"bench-exchange",
"bench-streamer",
"bench-tps",
"drone",
"fullnode",
"fullnode-config",
"banking-bench",
"chacha",
"chacha-cuda",
"chacha-sys",
"cli-config",
"client",
"core",
"faucet",
"perf",
"validator",
"genesis",
"genesis-programs",
"gossip",
"install",
"keygen",
"ledger",
"ledger-tool",
"local-cluster",
"logger",
"log-analyzer",
"merkle-tree",
"measure",
"metrics",
"programs/bpf/rust/noop",
"programs/native/bpf_loader",
"programs/native/budget",
"programs/native/erc20",
"programs/native/lua_loader",
"programs/native/native_loader",
"programs/native/noop",
"programs/native/storage",
"programs/native/system",
"programs/native/vote",
"replicator",
"net-shaper",
"programs/bpf_loader",
"programs/budget",
"programs/btc_spv",
"programs/btc_spv_bin",
"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",
"stake-monitor",
"sys-tuner",
"transaction-status",
"upload-perf",
"net-utils",
"vote-signer",
"wallet",
"cli",
"rayon-threadlimit",
"watchtower",
]
exclude = [
"programs/bpf",
"programs/move_loader",
"programs/librapay",
]

134
README.md
View File

@@ -1,5 +1,5 @@
[![Solana crate](https://img.shields.io/crates/v/solana.svg)](https://crates.io/crates/solana)
[![Solana documentation](https://docs.rs/solana/badge.svg)](https://docs.rs/solana)
[![Solana crate](https://img.shields.io/crates/v/solana-core.svg)](https://crates.io/crates/solana-core)
[![Solana documentation](https://docs.rs/solana-core/badge.svg)](https://docs.rs/solana-core)
[![Build status](https://badge.buildkite.com/8cc350de251d61483db98bdfc895b9ea0ac8ffa4a32ee850ed.svg?branch=master)](https://buildkite.com/solana-labs/solana/builds?branch=master)
[![codecov](https://codecov.io/gh/solana-labs/solana/branch/master/graph/badge.svg)](https://codecov.io/gh/solana-labs/solana)
@@ -9,24 +9,46 @@ Blockchain Rebuilt for Scale
Solana&trade; is a new blockchain architecture built from the ground up for scale. The architecture supports
up to 710 thousand transactions per second on a gigabit network.
Disclaimer
Documentation
===
All claims, content, designs, algorithms, estimates, roadmaps, specifications, and performance measurements described in this project are done with the author's best effort. It is up to the reader to check and validate their accuracy and truthfulness. Furthermore nothing in this project constitutes a solicitation for investment.
Before you jump into the code, review the documentation [Solana: Blockchain Rebuilt for Scale](https://docs.solana.com).
Introduction
(The _latest_ development version of the docs is [available here](https://docs.solana.com/v/master).)
Release Binaries
===
Official release binaries are available at [Github Releases](https://github.com/solana-labs/solana/releases).
It's possible for a centralized database to process 710,000 transactions per second on a standard gigabit network if the transactions are, on average, no more than 176 bytes. A centralized database can also replicate itself and maintain high availability without significantly compromising that transaction rate using the distributed system technique known as Optimistic Concurrency Control [\[H.T.Kung, J.T.Robinson (1981)\]](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.65.4735). At Solana, we're demonstrating that these same theoretical limits apply just as well to blockchain on an adversarial network. The key ingredient? Finding a way to share time when nodes can't trust one-another. Once nodes can trust time, suddenly ~40 years of distributed systems research becomes applicable to blockchain!
Additionally we provide pre-release binaries for the latest code on the edge and
beta channels. Note that these pre-release binaries may be less stable than an
official release.
> Perhaps the most striking difference between algorithms obtained by our method and ones based upon timeout is that using timeout produces a traditional distributed algorithm in which the processes operate asynchronously, while our method produces a globally synchronous one in which every process does the same thing at (approximately) the same time. Our method seems to contradict the whole purpose of distributed processing, which is to permit different processes to operate independently and perform different functions. However, if a distributed system is really a single system, then the processes must be synchronized in some way. Conceptually, the easiest way to synchronize processes is to get them all to do the same thing at the same time. Therefore, our method is used to implement a kernel that performs the necessary synchronization--for example, making sure that two different processes do not try to modify a file at the same time. Processes might spend only a small fraction of their time executing the synchronizing kernel; the rest of the time, they can operate independently--e.g., accessing different files. This is an approach we have advocated even when fault-tolerance is not required. The method's basic simplicity makes it easier to understand the precise properties of a system, which is crucial if one is to know just how fault-tolerant the system is. [\[L.Lamport (1984)\]](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.71.1078)
### Edge channel
#### Linux (x86_64-unknown-linux-gnu)
* [solana.tar.bz2](http://release.solana.com/edge/solana-release-x86_64-unknown-linux-gnu.tar.bz2)
* [solana-install-init](http://release.solana.com/edge/solana-install-init-x86_64-unknown-linux-gnu) as a stand-alone executable
#### mac OS (x86_64-apple-darwin)
* [solana.tar.bz2](http://release.solana.com/edge/solana-release-x86_64-apple-darwin.tar.bz2)
* [solana-install-init](http://release.solana.com/edge/solana-install-init-x86_64-apple-darwin) as a stand-alone executable
#### Windows (x86_64-pc-windows-msvc)
* [solana.tar.bz2](http://release.solana.com/edge/solana-release-x86_64-pc-windows-msvc.tar.bz2)
* [solana-install-init.exe](http://release.solana.com/edge/solana-install-init-x86_64-pc-windows-msvc.exe) as a stand-alone executable
#### All platforms
* [solana-metrics.tar.bz2](http://release.solana.com.s3.amazonaws.com/edge/solana-metrics.tar.bz2)
Furthermore, and much to our surprise, it can be implemented using a mechanism that has existed in Bitcoin since day one. The Bitcoin feature is called nLocktime and it can be used to postdate transactions using block height instead of a timestamp. As a Bitcoin client, you'd use block height instead of a timestamp if you don't trust the network. Block height turns out to be an instance of what's being called a Verifiable Delay Function in cryptography circles. It's a cryptographically secure way to say time has passed. In Solana, we use a far more granular verifiable delay function, a SHA 256 hash chain, to checkpoint the ledger and coordinate consensus. With it, we implement Optimistic Concurrency Control and are now well en route towards that theoretical limit of 710,000 transactions per second.
Architecture
===
Before you jump into the code, review the online book [Solana: Blockchain Rebuilt for Scale](https://solana-labs.github.io/solana/).
### Beta channel
#### Linux (x86_64-unknown-linux-gnu)
* [solana.tar.bz2](http://release.solana.com/beta/solana-release-x86_64-unknown-linux-gnu.tar.bz2)
* [solana-install-init](http://release.solana.com/beta/solana-install-init-x86_64-unknown-linux-gnu) as a stand-alone executable
#### mac OS (x86_64-apple-darwin)
* [solana.tar.bz2](http://release.solana.com/beta/solana-release-x86_64-apple-darwin.tar.bz2)
* [solana-install-init](http://release.solana.com/beta/solana-install-init-x86_64-apple-darwin) as a stand-alone executable
#### Windows (x86_64-pc-windows-msvc)
* [solana.tar.bz2](http://release.solana.com/beta/solana-release-x86_64-pc-windows-msvc.tar.bz2)
* [solana-install-init.exe](http://release.solana.com/beta/solana-install-init-x86_64-pc-windows-msvc.exe) as a stand-alone executable
#### All platforms
* [solana-metrics.tar.bz2](http://release.solana.com.s3.amazonaws.com/beta/solana-metrics.tar.bz2)
Developing
===
@@ -39,10 +61,10 @@ Install rustc, cargo and rustfmt:
```bash
$ curl https://sh.rustup.rs -sSf | sh
$ source $HOME/.cargo/env
$ rustup component add rustfmt-preview
$ rustup component add rustfmt
```
If your rustc version is lower than 1.31.0, please update it:
If your rustc version is lower than 1.39.0, please update it:
```bash
$ rustup update
@@ -51,7 +73,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:
@@ -64,7 +87,12 @@ $ cd solana
Build
```bash
$ cargo build --all
$ cargo build
```
Then to run a minimal local cluster
```bash
$ ./run.sh
```
Testing
@@ -73,40 +101,25 @@ Testing
Run the test suite:
```bash
$ cargo test --all
```
To emulate all the tests that will run on a Pull Request, run:
```bash
$ ./ci/run-local.sh
$ cargo test
```
Local Testnet
---
Start your own testnet locally, instructions are in the book [Solana: Blockchain Rebuild for Scale: Getting Started](https://solana-labs.github.io/solana/getting-started.html).
Start your own testnet locally, instructions are in the online docs [Solana: Blockchain Rebuild for Scale: Getting Started](https://docs.solana.com/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, with an https proxy for web apps at api.testnet.solana.com. Runs 24/7
* `testnet-beta` - public beta channel testnet accessible via beta.testnet.solana.com. Runs 24/7
* `testnet-edge` - public edge channel testnet accessible via edge.testnet.solana.com. Runs 24/7
* `testnet-perf` - permissioned stable testnet running a 24/7 soak test
* `testnet-beta-perf` - permissioned beta channel testnet running a multi-hour soak test weekday mornings
* `testnet-edge-perf` - permissioned edge channel testnet running a multi-hour soak test weekday mornings
## Deploy process
They are deployed with the `ci/testnet-manager.sh` script through a list of [scheduled
buildkite jobs](https://buildkite.com/solana-labs/testnet-management/settings/schedules).
Each testnet can be manually manipulated from buildkite as well. The `-perf`
testnets use a release tarball while the non`-perf` builds use the snap build
(we've observed that the snap build runs slower than a tarball but this has yet
to be root caused).
Each testnet can be manually manipulated from buildkite as well.
## How do I reset the testnet?
Manually trigger the [testnet-management](https://buildkite.com/solana-labs/testnet-management) pipeline
@@ -127,10 +140,52 @@ can run your own testnet using the scripts in the `net/` directory.
Edit `ci/testnet-manager.sh`
## Metrics Server Maintenance
Sometimes the dashboard becomes unresponsive. This happens due to glitch in the metrics server.
The current solution is to reset the metrics server. Use the following steps.
1. The server is hosted in a GCP VM instance. Check if the VM instance is down by trying to SSH
into it from the GCP console. The name of the VM is ```metrics-solana-com```.
2. If the VM is inaccessible, reset it from the GCP console.
3. Once VM is up (or, was already up), the metrics services can be restarted from build automation.
1. Navigate to https://buildkite.com/solana-labs/metrics-dot-solana-dot-com in your web browser
2. Click on ```New Build```
3. This will show a pop up dialog. Click on ```options``` drop down.
4. Type in ```FORCE_START=true``` in ```Environment Variables``` text box.
5. Click ```Create Build```
6. This will restart the metrics services, and the dashboards should be accessible afterwards.
## Debugging Testnet
Testnet may exhibit different symptoms of failures. Primary statistics to check are
1. Rise in Confirmation Time
2. Nodes are not voting
3. Panics, and OOM notifications
Check the following if there are any signs of failure.
1. Did testnet deployment fail?
1. View buildkite logs for the last deployment: https://buildkite.com/solana-labs/testnet-management
2. Use the relevant branch
3. If the deployment failed, look at the build logs. The build artifacts for each remote node is uploaded.
It's a good first step to triage from these logs.
2. You may have to log into remote node if the deployment succeeded, but something failed during runtime.
1. Get the private key for the testnet deployment from ```metrics-solana-com``` GCP instance.
2. SSH into ```metrics-solana-com``` using GCP console and do the following.
```bash
sudo bash
cd ~buildkite-agent/.ssh
ls
```
3. Copy the relevant private key to your local machine
4. Find the public IP address of the AWS instance for the remote node using AWS console
5. ```ssh -i <private key file> ubuntu@<ip address of remote node>```
6. The logs are in ```~solana\solana``` folder
Benchmarking
---
First install the nightly build of rustc. `cargo bench` requires unstable features:
First install the nightly build of rustc. `cargo bench` requires use of the
unstable features only available in the nightly build.
```bash
$ rustup install nightly
@@ -139,7 +194,7 @@ $ rustup install nightly
Run the benchmarks:
```bash
$ cargo +nightly bench --features="unstable"
$ cargo +nightly bench
```
Release Process
@@ -170,4 +225,7 @@ better way to solve the same problem, a Pull Request with your solution would mo
welcome! Likewise, if rewriting a test can better communicate what code it's protecting, please
send us that patch!
Disclaimer
===
All claims, content, designs, algorithms, estimates, roadmaps, specifications, and performance measurements described in this project are done with the author's best effort. It is up to the reader to check and validate their accuracy and truthfulness. Furthermore nothing in this project constitutes a solicitation for investment.

View File

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

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

@@ -0,0 +1,42 @@
[package]
name = "solana-archiver-lib"
version = "1.0.22"
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.3"
log = "0.4.8"
rand = "0.7.0"
rand_chacha = "0.2.2"
solana-client = { path = "../client", version = "1.0.22" }
solana-storage-program = { path = "../programs/storage", version = "1.0.22" }
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.22" }
solana-chacha = { path = "../chacha", version = "1.0.22" }
solana-chacha-sys = { path = "../chacha-sys", version = "1.0.22" }
solana-ledger = { path = "../ledger", version = "1.0.22" }
solana-logger = { path = "../logger", version = "1.0.22" }
solana-perf = { path = "../perf", version = "1.0.22" }
solana-sdk = { path = "../sdk", version = "1.0.22" }
solana-core = { path = "../core", version = "1.0.22" }
solana-archiver-utils = { path = "../archiver-utils", version = "1.0.22" }
solana-metrics = { path = "../metrics", version = "1.0.22" }
[dev-dependencies]
hex = "0.4.0"
[lib]
name = "solana_archiver_lib"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -0,0 +1,937 @@
use crate::result::ArchiverError;
use crossbeam_channel::unbounded;
use rand::{thread_rng, Rng};
use rand_chacha::{rand_core::SeedableRng, ChaChaRng};
use solana_archiver_utils::sample_file;
use solana_chacha::chacha::{chacha_cbc_encrypt_ledger, CHACHA_BLOCK_SIZE};
use solana_client::{
rpc_client::RpcClient, rpc_request::RpcRequest, rpc_response::RpcStorageTurn,
thin_client::ThinClient,
};
use solana_core::{
cluster_info::{ClusterInfo, Node, VALIDATOR_PORT_RANGE},
contact_info::ContactInfo,
gossip_service::GossipService,
packet::{limited_deserialize, PACKET_DATA_SIZE},
repair_service,
repair_service::{RepairService, RepairSlotRange, RepairStrategy},
serve_repair::ServeRepair,
shred_fetch_stage::ShredFetchStage,
sigverify_stage::{DisabledSigVerifier, SigVerifyStage},
storage_stage::NUM_STORAGE_SAMPLES,
streamer::{receiver, responder, PacketReceiver},
window_service::WindowService,
};
use solana_ledger::{
blockstore::Blockstore, leader_schedule_cache::LeaderScheduleCache, shred::Shred,
};
use solana_net_utils::bind_in_range;
use solana_perf::packet::Packets;
use solana_perf::recycler::Recycler;
use solana_sdk::packet::Packet;
use solana_sdk::{
account_utils::StateMut,
client::{AsyncClient, SyncClient},
clock::{get_complete_segment_from_slot, get_segment_from_slot, Slot},
commitment_config::CommitmentConfig,
hash::Hash,
message::Message,
signature::{Keypair, Signature, Signer},
timing::timestamp,
transaction::Transaction,
transport::TransportError,
};
use solana_storage_program::{
storage_contract::StorageContract,
storage_instruction::{self, StorageAccountType},
};
use std::{
io::{self, ErrorKind},
net::{IpAddr, Ipv4Addr, SocketAddr, UdpSocket},
path::{Path, PathBuf},
result,
sync::atomic::{AtomicBool, Ordering},
sync::mpsc::{channel, Receiver, Sender},
sync::{Arc, RwLock},
thread::{sleep, spawn, JoinHandle},
time::Duration,
};
type Result<T> = std::result::Result<T, ArchiverError>;
static ENCRYPTED_FILENAME: &str = "ledger.enc";
#[derive(Serialize, Deserialize)]
pub enum ArchiverRequest {
GetSlotHeight(SocketAddr),
}
pub struct Archiver {
thread_handles: Vec<JoinHandle<()>>,
exit: Arc<AtomicBool>,
}
// Shared Archiver Meta struct used internally
#[derive(Default)]
struct ArchiverMeta {
slot: Slot,
slots_per_segment: u64,
ledger_path: PathBuf,
signature: Signature,
ledger_data_file_encrypted: PathBuf,
sampling_offsets: Vec<u64>,
blockhash: Hash,
sha_state: Hash,
num_chacha_blocks: usize,
client_commitment: CommitmentConfig,
}
fn get_slot_from_signature(
signature: &Signature,
storage_turn: u64,
slots_per_segment: u64,
) -> u64 {
let signature_vec = signature.as_ref();
let mut segment_index = u64::from(signature_vec[0])
| (u64::from(signature_vec[1]) << 8)
| (u64::from(signature_vec[1]) << 16)
| (u64::from(signature_vec[2]) << 24);
let max_segment_index =
get_complete_segment_from_slot(storage_turn, slots_per_segment).unwrap();
segment_index %= max_segment_index as u64;
segment_index * slots_per_segment
}
fn create_request_processor(
socket: UdpSocket,
exit: &Arc<AtomicBool>,
slot_receiver: Receiver<u64>,
) -> Vec<JoinHandle<()>> {
let mut thread_handles = vec![];
let (s_reader, r_reader) = channel();
let (s_responder, r_responder) = channel();
let storage_socket = Arc::new(socket);
let recycler = Recycler::default();
let t_receiver = receiver(storage_socket.clone(), exit, s_reader, recycler, "archiver");
thread_handles.push(t_receiver);
let t_responder = responder("archiver-responder", storage_socket, r_responder);
thread_handles.push(t_responder);
let exit = exit.clone();
let t_processor = spawn(move || {
let slot = poll_for_slot(slot_receiver, &exit);
loop {
if exit.load(Ordering::Relaxed) {
break;
}
let packets = r_reader.recv_timeout(Duration::from_secs(1));
if let Ok(packets) = packets {
for packet in &packets.packets {
let req: result::Result<ArchiverRequest, Box<bincode::ErrorKind>> =
limited_deserialize(&packet.data[..packet.meta.size]);
match req {
Ok(ArchiverRequest::GetSlotHeight(from)) => {
let packet = Packet::from_data(&from, slot);
let _ = s_responder.send(Packets::new(vec![packet]));
}
Err(e) => {
info!("invalid request: {:?}", e);
}
}
}
}
}
});
thread_handles.push(t_processor);
thread_handles
}
fn poll_for_slot(receiver: Receiver<u64>, exit: &Arc<AtomicBool>) -> u64 {
loop {
let slot = receiver.recv_timeout(Duration::from_secs(1));
if let Ok(slot) = slot {
return slot;
}
if exit.load(Ordering::Relaxed) {
return 0;
}
}
}
impl Archiver {
/// Returns a Result that contains an archiver on success
///
/// # Arguments
/// * `ledger_path` - path to where the ledger will be stored.
/// Causes panic if none
/// * `node` - The archiver node
/// * `cluster_entrypoint` - ContactInfo representing an entry into the network
/// * `keypair` - Keypair for this archiver
#[allow(clippy::new_ret_no_self)]
pub fn new(
ledger_path: &Path,
node: Node,
cluster_entrypoint: ContactInfo,
keypair: Arc<Keypair>,
storage_keypair: Arc<Keypair>,
client_commitment: CommitmentConfig,
) -> Result<Self> {
let exit = Arc::new(AtomicBool::new(false));
info!("Archiver: id: {}", keypair.pubkey());
info!("Creating cluster info....");
let mut cluster_info = ClusterInfo::new(node.info.clone(), keypair.clone());
cluster_info.set_entrypoint(cluster_entrypoint.clone());
let cluster_info = Arc::new(RwLock::new(cluster_info));
// Note for now, this ledger will not contain any of the existing entries
// in the ledger located at ledger_path, and will only append on newly received
// entries after being passed to window_service
let blockstore = Arc::new(
Blockstore::open(ledger_path).expect("Expected to be able to open database ledger"),
);
let gossip_service = GossipService::new(&cluster_info, None, node.sockets.gossip, &exit);
info!("Connecting to the cluster via {:?}", cluster_entrypoint);
let (nodes, _) =
match solana_core::gossip_service::discover_cluster(&cluster_entrypoint.gossip, 2) {
Ok(nodes_and_archivers) => nodes_and_archivers,
Err(e) => {
//shutdown services before exiting
exit.store(true, Ordering::Relaxed);
gossip_service.join()?;
return Err(e.into());
}
};
let client = solana_core::gossip_service::get_client(&nodes);
info!("Setting up mining account...");
if let Err(e) =
Self::setup_mining_account(&client, &keypair, &storage_keypair, client_commitment)
{
//shutdown services before exiting
exit.store(true, Ordering::Relaxed);
gossip_service.join()?;
return Err(e);
};
let repair_socket = Arc::new(node.sockets.repair);
let shred_sockets: Vec<Arc<UdpSocket>> =
node.sockets.tvu.into_iter().map(Arc::new).collect();
let shred_forward_sockets: Vec<Arc<UdpSocket>> = node
.sockets
.tvu_forwards
.into_iter()
.map(Arc::new)
.collect();
let (shred_fetch_sender, shred_fetch_receiver) = channel();
let fetch_stage = ShredFetchStage::new(
shred_sockets,
shred_forward_sockets,
repair_socket.clone(),
&shred_fetch_sender,
None,
&exit,
);
let (slot_sender, slot_receiver) = channel();
let request_processor =
create_request_processor(node.sockets.storage.unwrap(), &exit, slot_receiver);
let t_archiver = {
let exit = exit.clone();
let node_info = node.info.clone();
let mut meta = ArchiverMeta {
ledger_path: ledger_path.to_path_buf(),
client_commitment,
..ArchiverMeta::default()
};
spawn(move || {
// setup archiver
let window_service = match Self::setup(
&mut meta,
cluster_info.clone(),
&blockstore,
&exit,
&node_info,
&storage_keypair,
repair_socket,
shred_fetch_receiver,
slot_sender,
) {
Ok(window_service) => window_service,
Err(e) => {
//shutdown services before exiting
error!("setup failed {:?}; archiver thread exiting...", e);
exit.store(true, Ordering::Relaxed);
request_processor
.into_iter()
.for_each(|t| t.join().unwrap());
fetch_stage.join().unwrap();
gossip_service.join().unwrap();
return;
}
};
info!("setup complete");
// run archiver
Self::run(
&mut meta,
&blockstore,
cluster_info,
&keypair,
&storage_keypair,
&exit,
);
// wait until exit
request_processor
.into_iter()
.for_each(|t| t.join().unwrap());
fetch_stage.join().unwrap();
gossip_service.join().unwrap();
window_service.join().unwrap()
})
};
Ok(Self {
thread_handles: vec![t_archiver],
exit,
})
}
fn run(
meta: &mut ArchiverMeta,
blockstore: &Arc<Blockstore>,
cluster_info: Arc<RwLock<ClusterInfo>>,
archiver_keypair: &Arc<Keypair>,
storage_keypair: &Arc<Keypair>,
exit: &Arc<AtomicBool>,
) {
// encrypt segment
Self::encrypt_ledger(meta, blockstore).expect("ledger encrypt not successful");
let enc_file_path = meta.ledger_data_file_encrypted.clone();
// do replicate
loop {
if exit.load(Ordering::Relaxed) {
break;
}
// TODO check if more segments are available - based on space constraints
Self::create_sampling_offsets(meta);
let sampling_offsets = &meta.sampling_offsets;
meta.sha_state =
match Self::sample_file_to_create_mining_hash(&enc_file_path, sampling_offsets) {
Ok(hash) => hash,
Err(err) => {
warn!("Error sampling file, exiting: {:?}", err);
break;
}
};
Self::submit_mining_proof(meta, &cluster_info, archiver_keypair, storage_keypair);
// TODO make this a lot more frequent by picking a "new" blockhash instead of picking a storage blockhash
// prep the next proof
let (storage_blockhash, _) = match Self::poll_for_blockhash_and_slot(
&cluster_info,
meta.slots_per_segment,
&meta.blockhash,
exit,
) {
Ok(blockhash_and_slot) => blockhash_and_slot,
Err(e) => {
warn!(
"Error couldn't get a newer blockhash than {:?}. {:?}",
meta.blockhash, e
);
break;
}
};
meta.blockhash = storage_blockhash;
Self::redeem_rewards(
&cluster_info,
archiver_keypair,
storage_keypair,
meta.client_commitment,
);
}
exit.store(true, Ordering::Relaxed);
}
fn redeem_rewards(
cluster_info: &Arc<RwLock<ClusterInfo>>,
archiver_keypair: &Arc<Keypair>,
storage_keypair: &Arc<Keypair>,
client_commitment: CommitmentConfig,
) {
let nodes = cluster_info.read().unwrap().tvu_peers();
let client = solana_core::gossip_service::get_client(&nodes);
if let Ok(Some(account)) =
client.get_account_with_commitment(&storage_keypair.pubkey(), client_commitment)
{
if let Ok(StorageContract::ArchiverStorage { validations, .. }) = account.state() {
if !validations.is_empty() {
let ix = storage_instruction::claim_reward(
&archiver_keypair.pubkey(),
&storage_keypair.pubkey(),
);
let message = Message::new_with_payer(&[ix], Some(&archiver_keypair.pubkey()));
if let Err(e) = client.send_message(&[archiver_keypair.as_ref()], message) {
error!("unable to redeem reward, tx failed: {:?}", e);
} else {
info!(
"collected mining rewards: Account balance {:?}",
client.get_balance_with_commitment(
&archiver_keypair.pubkey(),
client_commitment
)
);
}
}
}
} else {
info!("Redeem mining reward: No account data found");
}
}
// Find a segment to replicate and download it.
fn setup(
meta: &mut ArchiverMeta,
cluster_info: Arc<RwLock<ClusterInfo>>,
blockstore: &Arc<Blockstore>,
exit: &Arc<AtomicBool>,
node_info: &ContactInfo,
storage_keypair: &Arc<Keypair>,
repair_socket: Arc<UdpSocket>,
shred_fetch_receiver: PacketReceiver,
slot_sender: Sender<u64>,
) -> Result<WindowService> {
let slots_per_segment =
match Self::get_segment_config(&cluster_info, meta.client_commitment) {
Ok(slots_per_segment) => slots_per_segment,
Err(e) => {
error!("unable to get segment size configuration, exiting...");
//shutdown services before exiting
exit.store(true, Ordering::Relaxed);
return Err(e);
}
};
let (segment_blockhash, segment_slot) = match Self::poll_for_segment(
&cluster_info,
slots_per_segment,
&Hash::default(),
exit,
) {
Ok(blockhash_and_slot) => blockhash_and_slot,
Err(e) => {
//shutdown services before exiting
exit.store(true, Ordering::Relaxed);
return Err(e);
}
};
let signature = storage_keypair.sign_message(segment_blockhash.as_ref());
let slot = get_slot_from_signature(&signature, segment_slot, slots_per_segment);
info!("replicating slot: {}", slot);
slot_sender.send(slot)?;
meta.slot = slot;
meta.slots_per_segment = slots_per_segment;
meta.signature = signature;
meta.blockhash = segment_blockhash;
let mut repair_slot_range = RepairSlotRange::default();
repair_slot_range.end = slot + slots_per_segment;
repair_slot_range.start = slot;
let (retransmit_sender, _) = channel();
let (verified_sender, verified_receiver) = unbounded();
let _sigverify_stage = SigVerifyStage::new(
shred_fetch_receiver,
verified_sender,
DisabledSigVerifier::default(),
);
let window_service = WindowService::new(
blockstore.clone(),
cluster_info.clone(),
verified_receiver,
retransmit_sender,
repair_socket,
&exit,
RepairStrategy::RepairRange(repair_slot_range),
&Arc::new(LeaderScheduleCache::default()),
|_, _, _, _| true,
);
info!("waiting for ledger download");
Self::wait_for_segment_download(
slot,
slots_per_segment,
&blockstore,
&exit,
&node_info,
cluster_info,
);
Ok(window_service)
}
fn wait_for_segment_download(
start_slot: Slot,
slots_per_segment: u64,
blockstore: &Arc<Blockstore>,
exit: &Arc<AtomicBool>,
node_info: &ContactInfo,
cluster_info: Arc<RwLock<ClusterInfo>>,
) {
info!(
"window created, waiting for ledger download starting at slot {:?}",
start_slot
);
let mut current_slot = start_slot;
'outer: loop {
while blockstore.is_full(current_slot) {
current_slot += 1;
info!("current slot: {}", current_slot);
if current_slot >= start_slot + slots_per_segment {
break 'outer;
}
}
if exit.load(Ordering::Relaxed) {
break;
}
sleep(Duration::from_secs(1));
}
info!("Done receiving entries from window_service");
// Remove archiver from the data plane
let mut contact_info = node_info.clone();
contact_info.tvu = "0.0.0.0:0".parse().unwrap();
contact_info.wallclock = timestamp();
// copy over the adopted shred_version from the entrypoint
contact_info.shred_version = cluster_info.read().unwrap().my_data().shred_version;
{
let mut cluster_info_w = cluster_info.write().unwrap();
cluster_info_w.insert_self(contact_info);
}
}
fn encrypt_ledger(meta: &mut ArchiverMeta, blockstore: &Arc<Blockstore>) -> Result<()> {
meta.ledger_data_file_encrypted = meta.ledger_path.join(ENCRYPTED_FILENAME);
{
let mut ivec = [0u8; 64];
ivec.copy_from_slice(&meta.signature.as_ref());
let num_encrypted_bytes = chacha_cbc_encrypt_ledger(
blockstore,
meta.slot,
meta.slots_per_segment,
&meta.ledger_data_file_encrypted,
&mut ivec,
)?;
meta.num_chacha_blocks = num_encrypted_bytes / CHACHA_BLOCK_SIZE;
}
info!(
"Done encrypting the ledger: {:?}",
meta.ledger_data_file_encrypted
);
Ok(())
}
fn create_sampling_offsets(meta: &mut ArchiverMeta) {
meta.sampling_offsets.clear();
let mut rng_seed = [0u8; 32];
rng_seed.copy_from_slice(&meta.blockhash.as_ref());
let mut rng = ChaChaRng::from_seed(rng_seed);
for _ in 0..NUM_STORAGE_SAMPLES {
meta.sampling_offsets
.push(rng.gen_range(0, meta.num_chacha_blocks) as u64);
}
}
fn sample_file_to_create_mining_hash(
enc_file_path: &Path,
sampling_offsets: &[u64],
) -> Result<Hash> {
let sha_state = sample_file(enc_file_path, sampling_offsets)?;
info!("sampled sha_state: {}", sha_state);
Ok(sha_state)
}
fn setup_mining_account(
client: &ThinClient,
keypair: &Keypair,
storage_keypair: &Keypair,
client_commitment: CommitmentConfig,
) -> Result<()> {
// make sure archiver has some balance
info!("checking archiver keypair...");
if client.poll_balance_with_timeout_and_commitment(
&keypair.pubkey(),
&Duration::from_millis(100),
&Duration::from_secs(5),
client_commitment,
)? == 0
{
return Err(ArchiverError::EmptyStorageAccountBalance);
}
info!("checking storage account keypair...");
// check if the storage account exists
let balance =
client.poll_get_balance_with_commitment(&storage_keypair.pubkey(), client_commitment);
if balance.is_err() || balance.unwrap() == 0 {
let blockhash = match client.get_recent_blockhash_with_commitment(client_commitment) {
Ok((blockhash, _)) => blockhash,
Err(e) => {
return Err(ArchiverError::TransportError(e));
}
};
let ix = storage_instruction::create_storage_account(
&keypair.pubkey(),
&keypair.pubkey(),
&storage_keypair.pubkey(),
1,
StorageAccountType::Archiver,
);
let tx = Transaction::new_signed_instructions(&[keypair], ix, blockhash);
let signature = client.async_send_transaction(tx)?;
client
.poll_for_signature_with_commitment(&signature, client_commitment)
.map_err(|err| match err {
TransportError::IoError(e) => e,
TransportError::TransactionError(_) => io::Error::new(
ErrorKind::Other,
"setup_mining_account: signature not found",
),
TransportError::Custom(e) => io::Error::new(ErrorKind::Other, e),
})?;
}
Ok(())
}
fn submit_mining_proof(
meta: &ArchiverMeta,
cluster_info: &Arc<RwLock<ClusterInfo>>,
archiver_keypair: &Arc<Keypair>,
storage_keypair: &Arc<Keypair>,
) {
// No point if we've got no storage account...
let nodes = cluster_info.read().unwrap().tvu_peers();
let client = solana_core::gossip_service::get_client(&nodes);
let storage_balance = client
.poll_get_balance_with_commitment(&storage_keypair.pubkey(), meta.client_commitment);
if storage_balance.is_err() || storage_balance.unwrap() == 0 {
error!("Unable to submit mining proof, no storage account");
return;
}
// ...or no lamports for fees
let balance = client
.poll_get_balance_with_commitment(&archiver_keypair.pubkey(), meta.client_commitment);
if balance.is_err() || balance.unwrap() == 0 {
error!("Unable to submit mining proof, insufficient Archiver Account balance");
return;
}
let blockhash = match client.get_recent_blockhash_with_commitment(meta.client_commitment) {
Ok((blockhash, _)) => blockhash,
Err(_) => {
error!("unable to get recent blockhash, can't submit proof");
return;
}
};
let instruction = storage_instruction::mining_proof(
&storage_keypair.pubkey(),
meta.sha_state,
get_segment_from_slot(meta.slot, meta.slots_per_segment),
Signature::new(&meta.signature.as_ref()),
meta.blockhash,
);
let message = Message::new_with_payer(&[instruction], Some(&archiver_keypair.pubkey()));
let mut transaction = Transaction::new(
&[archiver_keypair.as_ref(), storage_keypair.as_ref()],
message,
blockhash,
);
if let Err(err) = client.send_and_confirm_transaction(
&[archiver_keypair.as_ref(), storage_keypair.as_ref()],
&mut transaction,
10,
0,
) {
error!("Error: {:?}; while sending mining proof", err);
}
}
pub fn close(self) {
self.exit.store(true, Ordering::Relaxed);
self.join()
}
pub fn join(self) {
for handle in self.thread_handles {
handle.join().unwrap();
}
}
fn get_segment_config(
cluster_info: &Arc<RwLock<ClusterInfo>>,
client_commitment: CommitmentConfig,
) -> Result<u64> {
let rpc_peers = {
let cluster_info = cluster_info.read().unwrap();
cluster_info.all_rpc_peers()
};
debug!("rpc peers: {:?}", rpc_peers);
if !rpc_peers.is_empty() {
let rpc_client = {
let node_index = thread_rng().gen_range(0, rpc_peers.len());
RpcClient::new_socket(rpc_peers[node_index].rpc)
};
Ok(rpc_client
.send(
&RpcRequest::GetSlotsPerSegment,
serde_json::json!([client_commitment]),
0,
)
.map_err(|err| {
warn!("Error while making rpc request {:?}", err);
ArchiverError::ClientError(err)
})?
.as_u64()
.unwrap())
} else {
Err(ArchiverError::NoRpcPeers)
}
}
/// Waits until the first segment is ready, and returns the current segment
fn poll_for_segment(
cluster_info: &Arc<RwLock<ClusterInfo>>,
slots_per_segment: u64,
previous_blockhash: &Hash,
exit: &Arc<AtomicBool>,
) -> Result<(Hash, u64)> {
loop {
let (blockhash, turn_slot) = Self::poll_for_blockhash_and_slot(
cluster_info,
slots_per_segment,
previous_blockhash,
exit,
)?;
if get_complete_segment_from_slot(turn_slot, slots_per_segment).is_some() {
return Ok((blockhash, turn_slot));
}
}
}
/// Poll for a different blockhash and associated max_slot than `previous_blockhash`
fn poll_for_blockhash_and_slot(
cluster_info: &Arc<RwLock<ClusterInfo>>,
slots_per_segment: u64,
previous_blockhash: &Hash,
exit: &Arc<AtomicBool>,
) -> Result<(Hash, u64)> {
info!("waiting for the next turn...");
loop {
let rpc_peers = {
let cluster_info = cluster_info.read().unwrap();
cluster_info.all_rpc_peers()
};
debug!("rpc peers: {:?}", rpc_peers);
if !rpc_peers.is_empty() {
let rpc_client = {
let node_index = thread_rng().gen_range(0, rpc_peers.len());
RpcClient::new_socket(rpc_peers[node_index].rpc)
};
let response = rpc_client
.send(
&RpcRequest::GetStorageTurn,
serde_json::value::Value::Null,
0,
)
.map_err(|err| {
warn!("Error while making rpc request {:?}", err);
ArchiverError::ClientError(err)
})?;
let RpcStorageTurn {
blockhash: storage_blockhash,
slot: turn_slot,
} = serde_json::from_value::<RpcStorageTurn>(response)
.map_err(ArchiverError::JsonError)?;
let turn_blockhash = storage_blockhash.parse().map_err(|err| {
io::Error::new(
io::ErrorKind::Other,
format!(
"Blockhash parse failure: {:?} on {:?}",
err, storage_blockhash
),
)
})?;
if turn_blockhash != *previous_blockhash {
info!("turn slot: {}", turn_slot);
if get_segment_from_slot(turn_slot, slots_per_segment) != 0 {
return Ok((turn_blockhash, turn_slot));
}
}
}
if exit.load(Ordering::Relaxed) {
return Err(ArchiverError::IO(io::Error::new(
ErrorKind::Other,
"exit signalled...",
)));
}
sleep(Duration::from_secs(5));
}
}
/// Ask an archiver to populate a given blockstore with its segment.
/// Return the slot at the start of the archiver's segment
///
/// It is recommended to use a temporary blockstore for this since the download will not verify
/// shreds received and might impact the chaining of shreds across slots
pub fn download_from_archiver(
serve_repair: &ServeRepair,
archiver_info: &ContactInfo,
blockstore: &Arc<Blockstore>,
slots_per_segment: u64,
) -> Result<u64> {
let ip_addr = IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0));
// Create a client which downloads from the archiver and see that it
// can respond with shreds.
let start_slot = Self::get_archiver_segment_slot(ip_addr, archiver_info.storage_addr);
info!("Archiver download: start at {}", start_slot);
let exit = Arc::new(AtomicBool::new(false));
let (s_reader, r_reader) = channel();
let repair_socket = Arc::new(bind_in_range(ip_addr, VALIDATOR_PORT_RANGE).unwrap().1);
let t_receiver = receiver(
repair_socket.clone(),
&exit,
s_reader,
Recycler::default(),
"archiver_reeciver",
);
let id = serve_repair.keypair().pubkey();
info!(
"Sending repair requests from: {} to: {}",
serve_repair.my_info().id,
archiver_info.gossip
);
let repair_slot_range = RepairSlotRange {
start: start_slot,
end: start_slot + slots_per_segment,
};
// try for upto 180 seconds //TODO needs tuning if segments are huge
for _ in 0..120 {
// Strategy used by archivers
let repairs = RepairService::generate_repairs_in_range(
blockstore,
repair_service::MAX_REPAIR_LENGTH,
&repair_slot_range,
);
//iter over the repairs and send them
if let Ok(repairs) = repairs {
let reqs: Vec<_> = repairs
.into_iter()
.filter_map(|repair_request| {
serve_repair
.map_repair_request(&repair_request)
.map(|result| ((archiver_info.gossip, result), repair_request))
.ok()
})
.collect();
for ((to, req), repair_request) in reqs {
if let Ok(local_addr) = repair_socket.local_addr() {
datapoint_info!(
"archiver_download",
("repair_request", format!("{:?}", repair_request), String),
("to", to.to_string(), String),
("from", local_addr.to_string(), String),
("id", id.to_string(), String)
);
}
repair_socket
.send_to(&req, archiver_info.gossip)
.unwrap_or_else(|e| {
error!("{} repair req send_to({}) error {:?}", id, to, e);
0
});
}
}
let res = r_reader.recv_timeout(Duration::new(1, 0));
if let Ok(mut packets) = res {
while let Ok(mut more) = r_reader.try_recv() {
packets.packets.append_pinned(&mut more.packets);
}
let shreds: Vec<Shred> = packets
.packets
.into_iter()
.filter_map(|p| Shred::new_from_serialized_shred(p.data.to_vec()).ok())
.collect();
blockstore.insert_shreds(shreds, None, false)?;
}
// check if all the slots in the segment are complete
if Self::segment_complete(start_slot, slots_per_segment, blockstore) {
break;
}
sleep(Duration::from_millis(500));
}
exit.store(true, Ordering::Relaxed);
t_receiver.join().unwrap();
// check if all the slots in the segment are complete
if !Self::segment_complete(start_slot, slots_per_segment, blockstore) {
return Err(ArchiverError::SegmentDownloadError);
}
Ok(start_slot)
}
fn segment_complete(
start_slot: Slot,
slots_per_segment: u64,
blockstore: &Arc<Blockstore>,
) -> bool {
for slot in start_slot..(start_slot + slots_per_segment) {
if !blockstore.is_full(slot) {
return false;
}
}
true
}
fn get_archiver_segment_slot(bind_ip_addr: IpAddr, to: SocketAddr) -> u64 {
let (_port, socket) = bind_in_range(bind_ip_addr, VALIDATOR_PORT_RANGE).unwrap();
socket
.set_read_timeout(Some(Duration::from_secs(5)))
.unwrap();
let req = ArchiverRequest::GetSlotHeight(socket.local_addr().unwrap());
let serialized_req = bincode::serialize(&req).unwrap();
for _ in 0..10 {
socket.send_to(&serialized_req, to).unwrap();
let mut buf = [0; 1024];
if let Ok((size, _addr)) = socket.recv_from(&mut buf) {
// Ignore bad packet and try again
if let Ok(slot) = bincode::config()
.limit(PACKET_DATA_SIZE as u64)
.deserialize(&buf[..size])
{
return slot;
}
}
sleep(Duration::from_millis(500));
}
panic!("Couldn't get segment slot from archiver!");
}
}

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,47 @@
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)
}
}

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

@@ -0,0 +1,28 @@
[package]
name = "solana-archiver-utils"
version = "1.0.22"
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.7.0"
solana-chacha = { path = "../chacha", version = "1.0.22" }
solana-chacha-sys = { path = "../chacha-sys", version = "1.0.22" }
solana-ledger = { path = "../ledger", version = "1.0.22" }
solana-logger = { path = "../logger", version = "1.0.22" }
solana-perf = { path = "../perf", version = "1.0.22" }
solana-sdk = { path = "../sdk", version = "1.0.22" }
[dev-dependencies]
hex = "0.4.0"
[lib]
name = "solana_archiver_utils"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

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());
}
}

2
archiver/.gitignore vendored Normal file
View File

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

23
archiver/Cargo.toml Normal file
View File

@@ -0,0 +1,23 @@
[package]
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-archiver"
version = "1.0.22"
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.22" }
solana-core = { path = "../core", version = "1.0.22" }
solana-logger = { path = "../logger", version = "1.0.22" }
solana-metrics = { path = "../metrics", version = "1.0.22" }
solana-archiver-lib = { path = "../archiver-lib", version = "1.0.22" }
solana-net-utils = { path = "../net-utils", version = "1.0.22" }
solana-sdk = { path = "../sdk", version = "1.0.22" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

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

@@ -0,0 +1,131 @@
use clap::{crate_description, crate_name, App, Arg};
use console::style;
use solana_archiver_lib::archiver::Archiver;
use solana_clap_utils::{
input_parsers::keypair_of, input_validators::is_keypair_or_ask_keyword,
keypair::SKIP_SEED_PHRASE_VALIDATION_ARG,
};
use solana_core::{
cluster_info::{Node, VALIDATOR_PORT_RANGE},
contact_info::ContactInfo,
};
use solana_sdk::{
commitment_config::CommitmentConfig,
signature::{Keypair, Signer},
};
use std::{
net::{IpAddr, Ipv4Addr, SocketAddr},
path::PathBuf,
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")
.value_name("PATH")
.takes_value(true)
.validator(is_keypair_or_ask_keyword)
.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_or_ask_keyword)
.help("File containing the storage account keypair"),
)
.arg(
Arg::with_name(SKIP_SEED_PHRASE_VALIDATION_ARG.name)
.long(SKIP_SEED_PHRASE_VALIDATION_ARG.long)
.help(SKIP_SEED_PHRASE_VALIDATION_ARG.help),
)
.get_matches();
let ledger_path = PathBuf::from(matches.value_of("ledger").unwrap());
let identity_keypair = keypair_of(&matches, "identity_keypair").unwrap_or_else(Keypair::new);
let storage_keypair = keypair_of(&matches, "storage_keypair").unwrap_or_else(|| {
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,
IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)),
);
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();
}

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

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

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

@@ -0,0 +1,23 @@
[package]
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-banking-bench"
version = "1.0.22"
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.22" }
solana-ledger = { path = "../ledger", version = "1.0.22" }
solana-logger = { path = "../logger", version = "1.0.22" }
solana-runtime = { path = "../runtime", version = "1.0.22" }
solana-measure = { path = "../measure", version = "1.0.22" }
solana-sdk = { path = "../sdk", version = "1.0.22" }
rand = "0.7.0"
crossbeam-channel = "0.3"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

306
banking-bench/src/main.rs Normal file
View File

@@ -0,0 +1,306 @@
use crossbeam_channel::unbounded;
use log::*;
use rand::{thread_rng, Rng};
use rayon::prelude::*;
use solana_core::banking_stage::{create_test_recorder, BankingStage};
use solana_core::cluster_info::ClusterInfo;
use solana_core::cluster_info::Node;
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_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;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::Keypair;
use solana_sdk::signature::Signature;
use solana_sdk::system_transaction;
use solana_sdk::timing::{duration_as_us, timestamp};
use solana_sdk::transaction::Transaction;
use std::sync::atomic::Ordering;
use std::sync::mpsc::Receiver;
use std::sync::{Arc, Mutex, RwLock};
use std::thread::sleep;
use std::time::{Duration, Instant};
fn check_txs(
receiver: &Arc<Receiver<WorkingBankEntry>>,
ref_tx_count: usize,
poh_recorder: &Arc<Mutex<PohRecorder>>,
) -> bool {
let mut total = 0;
let now = Instant::now();
let mut no_bank = false;
loop {
if let Ok((_bank, (entry, _tick_height))) = receiver.recv_timeout(Duration::from_millis(10))
{
total += entry.transactions.len();
}
if total >= ref_tx_count {
break;
}
if now.elapsed().as_secs() > 60 {
break;
}
if poh_recorder.lock().unwrap().bank().is_none() {
trace!("no bank");
no_bank = true;
break;
}
}
if !no_bank {
assert!(total >= ref_tx_count);
}
no_bank
}
fn make_accounts_txs(txes: usize, mint_keypair: &Keypair, hash: Hash) -> Vec<Transaction> {
let to_pubkey = Pubkey::new_rand();
let dummy = system_transaction::transfer(mint_keypair, &to_pubkey, 1, hash);
(0..txes)
.into_par_iter()
.map(|_| {
let mut new = dummy.clone();
let sig: Vec<u8> = (0..64).map(|_| thread_rng().gen()).collect();
new.message.account_keys[0] = Pubkey::new_rand();
new.message.account_keys[1] = Pubkey::new_rand();
new.signatures = vec![Signature::new(&sig[0..64])];
new
})
.collect()
}
struct Config {
packets_per_batch: usize,
chunk_len: usize,
num_threads: usize,
}
impl Config {
fn get_transactions_index(&self, chunk_index: usize) -> usize {
chunk_index * (self.chunk_len / self.num_threads) * self.packets_per_batch
}
}
fn bytes_as_usize(bytes: &[u8]) -> usize {
bytes[0] as usize | (bytes[1] as usize) << 8
}
fn main() {
solana_logger::setup();
let num_threads = BankingStage::num_threads() as usize;
// a multiple of packet chunk duplicates to avoid races
const CHUNKS: usize = 8 * 2;
const PACKETS_PER_BATCH: usize = 192;
let txes = PACKETS_PER_BATCH * num_threads * CHUNKS;
let mint_total = 1_000_000_000_000;
let GenesisConfigInfo {
genesis_config,
mint_keypair,
..
} = create_genesis_config(mint_total);
let (verified_sender, verified_receiver) = unbounded();
let (vote_sender, vote_receiver) = unbounded();
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_config.hash());
// fund all the accounts
transactions.iter().for_each(|tx| {
let fund = system_transaction::transfer(
&mint_keypair,
&tx.message.account_keys[0],
mint_total / txes as u64,
genesis_config.hash(),
);
let x = bank.process_transaction(&fund);
x.unwrap();
});
//sanity check, make sure all the transactions can execute sequentially
transactions.iter().for_each(|tx| {
let res = bank.process_transaction(&tx);
assert!(res.is_ok(), "sanity test transactions");
});
bank.clear_signatures();
//sanity check, make sure all the transactions can execute in parallel
let res = bank.process_transactions(&transactions);
for r in res {
assert!(r.is_ok(), "sanity parallel execution");
}
bank.clear_signatures();
let mut verified: Vec<_> = to_packets_chunked(&transactions.clone(), PACKETS_PER_BATCH);
let ledger_path = get_tmp_ledger_path!();
{
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, &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(
&cluster_info,
&poh_recorder,
verified_receiver,
vote_receiver,
None,
);
poh_recorder.lock().unwrap().set_bank(&bank);
let chunk_len = verified.len() / CHUNKS;
let mut start = 0;
// This is so that the signal_receiver does not go out of scope after the closure.
// If it is dropped before poh_service, then poh_service will error when
// calling send() on the channel.
let signal_receiver = Arc::new(signal_receiver);
let mut total_us = 0;
let mut tx_total_us = 0;
let mut txs_processed = 0;
let mut root = 1;
let collector = Pubkey::new_rand();
const ITERS: usize = 1_000;
let config = Config {
packets_per_batch: PACKETS_PER_BATCH,
chunk_len,
num_threads,
};
let mut total_sent = 0;
for _ in 0..ITERS {
let now = Instant::now();
let mut sent = 0;
for (i, v) in verified[start..start + chunk_len]
.chunks(chunk_len / num_threads)
.enumerate()
{
let mut byte = 0;
let index = config.get_transactions_index(start + i);
if index < transactions.len() {
byte = bytes_as_usize(transactions[index].signatures[0].as_ref());
}
trace!(
"sending... {}..{} {} v.len: {} sig: {} transactions.len: {} index: {}",
start + i,
start + chunk_len,
timestamp(),
v.len(),
byte,
transactions.len(),
index,
);
for xv in v {
sent += xv.packets.len();
}
verified_sender.send(v.to_vec()).unwrap();
}
let start_tx_index = config.get_transactions_index(start);
let end_tx_index = config.get_transactions_index(start + chunk_len);
for tx in &transactions[start_tx_index..end_tx_index] {
loop {
if bank.get_signature_status(&tx.signatures[0]).is_some() {
break;
}
if poh_recorder.lock().unwrap().bank().is_none() {
break;
}
sleep(Duration::from_millis(5));
}
}
if check_txs(&signal_receiver, txes / CHUNKS, &poh_recorder) {
debug!(
"resetting bank {} tx count: {} txs_proc: {}",
bank.slot(),
bank.transaction_count(),
txs_processed
);
assert!(txs_processed < bank.transaction_count());
txs_processed = bank.transaction_count();
tx_total_us += duration_as_us(&now.elapsed());
let mut poh_time = Measure::start("poh_time");
poh_recorder.lock().unwrap().reset(
bank.last_blockhash(),
bank.slot(),
Some((bank.slot(), bank.slot() + 1)),
);
poh_time.stop();
let mut new_bank_time = Measure::start("new_bank");
let new_bank = Bank::new_from_parent(&bank, &collector, bank.slot() + 1);
new_bank_time.stop();
let mut insert_time = Measure::start("insert_time");
bank_forks.insert(new_bank);
bank = bank_forks.working_bank();
insert_time.stop();
poh_recorder.lock().unwrap().set_bank(&bank);
assert!(poh_recorder.lock().unwrap().bank().is_some());
if bank.slot() > 32 {
bank_forks.set_root(root, &None, None);
root += 1;
}
debug!(
"new_bank_time: {}us insert_time: {}us poh_time: {}us",
new_bank_time.as_us(),
insert_time.as_us(),
poh_time.as_us(),
);
} else {
tx_total_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_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() {
tx.message.recent_blockhash = bank.last_blockhash();
let sig: Vec<u8> = (0..64).map(|_| thread_rng().gen()).collect();
tx.signatures[0] = Signature::new(&sig[0..64]);
}
verified = to_packets_chunked(&transactions.clone(), PACKETS_PER_BATCH);
}
start += chunk_len;
start %= verified.len();
}
eprintln!(
"{{'name': 'banking_bench_total', 'median': '{}'}}",
(1000.0 * 1000.0 * total_sent as f64) / (total_us as f64),
);
eprintln!(
"{{'name': 'banking_bench_tx_total', 'median': '{}'}}",
(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 = Blockstore::destroy(&ledger_path);
}

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

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

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

@@ -0,0 +1,37 @@
[package]
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-bench-exchange"
version = "1.0.22"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
publish = false
[dependencies]
clap = "2.32.0"
itertools = "0.8.2"
log = "0.4.8"
num-derive = "0.3"
num-traits = "0.2"
rand = "0.7.0"
rayon = "1.2.0"
serde_json = "1.0.46"
serde_yaml = "0.8.11"
solana-clap-utils = { path = "../clap-utils", version = "1.0.22" }
solana-core = { path = "../core", version = "1.0.22" }
solana-genesis = { path = "../genesis", version = "1.0.22" }
solana-client = { path = "../client", version = "1.0.22" }
solana-faucet = { path = "../faucet", version = "1.0.22" }
solana-exchange-program = { path = "../programs/exchange", version = "1.0.22" }
solana-logger = { path = "../logger", version = "1.0.22" }
solana-metrics = { path = "../metrics", version = "1.0.22" }
solana-net-utils = { path = "../net-utils", version = "1.0.22" }
solana-runtime = { path = "../runtime", version = "1.0.22" }
solana-sdk = { path = "../sdk", version = "1.0.22" }
[dev-dependencies]
solana-local-cluster = { path = "../local-cluster", version = "1.0.22" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

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

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

1037
bench-exchange/src/bench.rs Normal file

File diff suppressed because it is too large Load Diff

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

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,103 @@
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_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_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();
const NUM_NODES: usize = 1;
let mut config = Config::default();
config.identity = Keypair::new();
config.duration = Duration::from_secs(1);
config.fund_amount = 100_000;
config.threads = 1;
config.transfer_delay = 20; // 15
config.batch_size = 100; // 1000;
config.chunk_size = 10; // 200;
config.account_groups = 1; // 10;
let Config {
fund_amount,
batch_size,
account_groups,
..
} = config;
let accounts_in_groups = batch_size * account_groups;
let cluster = LocalCluster::new(&ClusterConfig {
node_stakes: vec![100_000; NUM_NODES],
cluster_lamports: 100_000_000_000_000,
validator_configs: vec![ValidatorConfig::default(); NUM_NODES],
native_instruction_processors: [solana_exchange_program!()].to_vec(),
..ClusterConfig::default()
});
let faucet_keypair = Keypair::new();
cluster.transfer(
&cluster.funding_keypair,
&faucet_keypair.pubkey(),
2_000_000_000_000,
);
let (addr_sender, addr_receiver) = channel();
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, _) =
discover_cluster(&cluster.entry_point_info.gossip, NUM_NODES).unwrap_or_else(|err| {
error!("Failed to discover {} nodes: {:?}", NUM_NODES, err);
exit(1);
});
let (client, num_clients) = get_multi_client(&nodes);
info!("clients: {}", num_clients);
assert!(num_clients >= NUM_NODES);
const NUM_SIGNERS: u64 = 2;
airdrop_lamports(
&client,
&faucet_addr,
&config.identity,
fund_amount * (accounts_in_groups + 1) as u64 * NUM_SIGNERS,
);
do_bench_exchange(vec![client], config);
}
#[test]
fn test_exchange_bank_client() {
solana_logger::setup();
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)];
let mut config = Config::default();
config.identity = identity;
config.duration = Duration::from_secs(1);
config.fund_amount = 100_000;
config.threads = 1;
config.transfer_delay = 20; // 0;
config.batch_size = 100; // 1500;
config.chunk_size = 10; // 1500;
config.account_groups = 1; // 50;
do_bench_exchange(clients, config);
}

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

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

View File

@@ -2,16 +2,17 @@
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-bench-streamer"
version = "0.11.0"
version = "1.0.22"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
[dependencies]
clap = "2.32.0"
solana = { path = "..", version = "0.11.0" }
solana-logger = { path = "../logger", version = "0.11.0" }
solana-netutil = { path = "../netutil", version = "0.11.0" }
clap = "2.33.0"
solana-clap-utils = { path = "../clap-utils", version = "1.0.22" }
solana-core = { path = "../core", version = "1.0.22" }
solana-logger = { path = "../logger", version = "1.0.22" }
solana-net-utils = { path = "../net-utils", version = "1.0.22" }
[features]
cuda = []
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -1,34 +1,33 @@
use clap::{App, Arg};
use solana::packet::{Packet, SharedPackets, BLOB_SIZE, PACKET_DATA_SIZE};
use solana::result::Result;
use solana::streamer::{receiver, PacketReceiver};
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};
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;
fn producer(addr: &SocketAddr, exit: Arc<AtomicBool>) -> JoinHandle<()> {
let send = UdpSocket::bind("0.0.0.0:0").unwrap();
let msgs = SharedPackets::default();
let msgs_ = msgs.clone();
msgs.write().unwrap().packets.resize(10, Packet::default());
for w in &mut msgs.write().unwrap().packets {
let mut msgs = Packets::default();
msgs.packets.resize(10, Packet::default());
for w in msgs.packets.iter_mut() {
w.meta.size = PACKET_DATA_SIZE;
w.meta.set_addr(&addr);
}
let msgs = Arc::new(msgs);
spawn(move || loop {
if exit.load(Ordering::Relaxed) {
return;
}
let mut num = 0;
for p in &msgs_.read().unwrap().packets {
for p in &msgs.packets {
let a = p.meta.addr();
assert!(p.meta.size < BLOB_SIZE);
assert!(p.meta.size < PACKET_DATA_SIZE);
send.send_to(&p.data[..p.meta.size], &a).unwrap();
num += 1;
}
@@ -43,7 +42,7 @@ fn sink(exit: Arc<AtomicBool>, rvs: Arc<AtomicUsize>, r: PacketReceiver) -> Join
}
let timer = Duration::new(1, 0);
if let Ok(msgs) = r.recv_timeout(timer) {
rvs.fetch_add(msgs.read().unwrap().packets.len(), Ordering::Relaxed);
rvs.fetch_add(msgs.packets.len(), Ordering::Relaxed);
}
})
}
@@ -51,7 +50,9 @@ fn sink(exit: Arc<AtomicBool>, rvs: Arc<AtomicUsize>, r: PacketReceiver) -> Join
fn main() -> Result<()> {
let mut num_sockets = 1usize;
let matches = App::new("solana-bench-streamer")
let matches = App::new(crate_name!())
.about(crate_description!())
.version(solana_clap_utils::version!())
.arg(
Arg::with_name("num-recv-sockets")
.long("num-recv-sockets")
@@ -66,14 +67,16 @@ fn main() -> Result<()> {
}
let mut port = 0;
let mut addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 0);
let ip_addr = IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0));
let mut addr = SocketAddr::new(ip_addr, 0);
let exit = Arc::new(AtomicBool::new(false));
let mut read_channels = Vec::new();
let mut read_threads = Vec::new();
let recycler = PacketsRecycler::default();
for _ in 0..num_sockets {
let read = solana_netutil::bind_to(port, false).unwrap();
let read = solana_net_utils::bind_to(ip_addr, port, false).unwrap();
read.set_read_timeout(Some(Duration::new(1, 0))).unwrap();
addr = read.local_addr().unwrap();
@@ -83,9 +86,10 @@ fn main() -> Result<()> {
read_channels.push(r_reader);
read_threads.push(receiver(
Arc::new(read),
exit.clone(),
&exit,
s_reader,
"bench-streamer",
recycler.clone(),
"bench-streamer-test",
));
}

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

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

View File

@@ -2,20 +2,39 @@
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-bench-tps"
version = "0.11.0"
version = "1.0.22"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
[dependencies]
clap = "2.32.0"
rayon = "1.0.3"
serde_json = "1.0.10"
solana = { path = "..", version = "0.11.0" }
solana-drone = { path = "../drone", version = "0.11.0" }
solana-logger = { path = "../logger", version = "0.11.0" }
solana-metrics = { path = "../metrics", version = "0.11.0" }
solana-sdk = { path = "../sdk", version = "0.11.0" }
bincode = "1.2.1"
clap = "2.33.0"
log = "0.4.8"
rayon = "1.2.0"
serde_json = "1.0.46"
serde_yaml = "0.8.11"
solana-clap-utils = { path = "../clap-utils", version = "1.0.22" }
solana-core = { path = "../core", version = "1.0.22" }
solana-genesis = { path = "../genesis", version = "1.0.22" }
solana-client = { path = "../client", version = "1.0.22" }
solana-faucet = { path = "../faucet", version = "1.0.22" }
#solana-librapay = { path = "../programs/librapay", version = "1.0.20", optional = true }
solana-logger = { path = "../logger", version = "1.0.22" }
solana-metrics = { path = "../metrics", version = "1.0.22" }
solana-measure = { path = "../measure", version = "1.0.22" }
solana-net-utils = { path = "../net-utils", version = "1.0.22" }
solana-runtime = { path = "../runtime", version = "1.0.22" }
solana-sdk = { path = "../sdk", version = "1.0.22" }
#solana-move-loader-program = { path = "../programs/move_loader", version = "1.0.20", optional = true }
[features]
cuda = []
[dev-dependencies]
serial_test = "0.3.2"
serial_test_derive = "0.4.0"
solana-local-cluster = { path = "../local-cluster", version = "1.0.22" }
#[features]
#move = ["solana-librapay", "solana-move-loader-program"]
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

File diff suppressed because it is too large Load Diff

View File

@@ -1,61 +1,75 @@
use std::net::SocketAddr;
use std::process::exit;
use std::time::Duration;
use clap::{crate_description, crate_name, App, Arg, ArgMatches};
use solana_faucet::faucet::FAUCET_PORT;
use solana_sdk::fee_calculator::FeeRateGovernor;
use solana_sdk::signature::{read_keypair_file, Keypair};
use std::{net::SocketAddr, process::exit, time::Duration};
use clap::{crate_version, App, Arg, ArgMatches};
use solana_drone::drone::DRONE_PORT;
use solana_sdk::signature::{read_keypair, Keypair, KeypairUtil};
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 network_addr: SocketAddr,
pub drone_addr: SocketAddr,
pub entrypoint_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 reject_extra_nodes: bool,
pub converge_only: 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,
}
impl Default for Config {
fn default() -> Config {
Config {
network_addr: SocketAddr::from(([127, 0, 0, 1], 8001)),
drone_addr: SocketAddr::from(([127, 0, 0, 1], DRONE_PORT)),
entrypoint_addr: SocketAddr::from(([127, 0, 0, 1], 8001)),
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,
tx_count: 50_000,
keypair_multiplier: 8,
thread_batch_sleep_ms: 1000,
sustained: false,
reject_extra_nodes: false,
converge_only: false,
client_ids_and_stake_file: String::new(),
write_to_client_file: false,
read_from_client_file: false,
target_lamports_per_signature: FeeRateGovernor::default().target_lamports_per_signature,
multi_client: true,
use_move: false,
num_lamports_per_account: NUM_LAMPORTS_PER_ACCOUNT_DEFAULT,
}
}
}
/// Defines and builds the CLI args for a run of the benchmark
pub fn build_args<'a, 'b>() -> App<'a, 'b> {
App::new("solana-bench-tps")
.version(crate_version!())
pub fn build_args<'a, 'b>(version: &'b str) -> App<'a, 'b> {
App::new(crate_name!()).about(crate_description!())
.version(version)
.arg(
Arg::with_name("network")
Arg::with_name("entrypoint")
.short("n")
.long("network")
.long("entrypoint")
.value_name("HOST:PORT")
.takes_value(true)
.help("Rendezvous with the network at this gossip entry point; defaults to 127.0.0.1:8001"),
.help("Rendezvous with the cluster at this entry point; defaults to 127.0.0.1:8001"),
)
.arg(
Arg::with_name("drone")
Arg::with_name("faucet")
.short("d")
.long("drone")
.long("faucet")
.value_name("HOST:PORT")
.takes_value(true)
.help("Location of the drone; defaults to network:DRONE_PORT"),
.help("Location of the faucet; defaults to entrypoint:FAUCET_PORT"),
)
.arg(
Arg::with_name("identity")
@@ -73,11 +87,6 @@ pub fn build_args<'a, 'b>() -> App<'a, 'b> {
.takes_value(true)
.help("Wait for NUM nodes to converge"),
)
.arg(
Arg::with_name("reject-extra-nodes")
.long("reject-extra-nodes")
.help("Require exactly `num-nodes` on convergence. Appropriate only for internal networks"),
)
.arg(
Arg::with_name("threads")
.short("t")
@@ -93,16 +102,21 @@ pub fn build_args<'a, 'b>() -> App<'a, 'b> {
.takes_value(true)
.help("Seconds to run benchmark, then exit; default is forever"),
)
.arg(
Arg::with_name("converge-only")
.long("converge-only")
.help("Exit immediately after converging"),
)
.arg(
Arg::with_name("sustained")
.long("sustained")
.help("Use sustained performance mode vs. peak mode. This overlaps the tx generation with transfers."),
)
.arg(
Arg::with_name("use-move")
.long("use-move")
.help("Use Move language transactions to perform transfers."),
)
.arg(
Arg::with_name("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")
@@ -110,6 +124,54 @@ 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")
.long("thread-batch-sleep-ms")
.value_name("NUM")
.takes_value(true)
.help("Per-thread-per-iteration sleep in ms"),
)
.arg(
Arg::with_name("write-client-keys")
.long("write-client-keys")
.value_name("FILENAME")
.takes_value(true)
.help("Generate client keys and stakes and write the list to YAML file"),
)
.arg(
Arg::with_name("read-client-keys")
.long("read-client-keys")
.value_name("FILENAME")
.takes_value(true)
.help("Read client keys and stakes from the YAML file"),
)
.arg(
Arg::with_name("target_lamports_per_signature")
.long("target-lamports-per-signature")
.value_name("LAMPORTS")
.takes_value(true)
.help(
"The cost in lamports that the cluster will charge for signature \
verification when the cluster is operating at target-signatures-per-slot",
),
)
.arg(
Arg::with_name("num_lamports_per_account")
.long("num-lamports-per-account")
.value_name("LAMPORTS")
.takes_value(true)
.help(
"Number of lamports per account.",
),
)
}
/// Parses a clap `ArgMatches` structure into a `Config`
@@ -120,22 +182,22 @@ pub fn build_args<'a, 'b>() -> App<'a, 'b> {
pub fn extract_args<'a>(matches: &ArgMatches<'a>) -> Config {
let mut args = Config::default();
if let Some(addr) = matches.value_of("network") {
args.network_addr = addr.parse().unwrap_or_else(|e| {
eprintln!("failed to parse network: {}", e);
if let Some(addr) = matches.value_of("entrypoint") {
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 = addr.parse().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");
}
@@ -155,12 +217,47 @@ 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") {
args.thread_batch_sleep_ms = t
.to_string()
.parse()
.expect("can't parse thread-batch-sleep-ms");
}
args.sustained = matches.is_present("sustained");
args.converge_only = matches.is_present("converge-only");
args.reject_extra_nodes = matches.is_present("reject-extra-nodes");
if let Some(s) = matches.value_of("write-client-keys") {
args.write_to_client_file = true;
args.client_ids_and_stake_file = s.to_string();
}
if let Some(s) = matches.value_of("read-client-keys") {
assert!(!args.write_to_client_file);
args.read_from_client_file = true;
args.client_ids_and_stake_file = s.to_string();
}
if let Some(v) = matches.value_of("target_lamports_per_signature") {
args.target_lamports_per_signature = v.to_string().parse().expect("can't parse lamports");
}
args.use_move = matches.is_present("use-move");
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");
}
args
}

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

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

View File

@@ -1,304 +1,137 @@
mod bench;
mod cli;
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_client, get_multi_client};
use solana_genesis::Base64Account;
use solana_sdk::fee_calculator::FeeRateGovernor;
use solana_sdk::signature::{Keypair, Signer};
use solana_sdk::system_program;
use std::{collections::HashMap, fs::File, io::prelude::*, path::Path, process::exit, sync::Arc};
use solana::client::mk_client;
use solana::cluster_info::{ClusterInfo, NodeInfo};
use solana::gossip_service::GossipService;
use solana::service::Service;
use solana::signature::GenKeys;
use solana::thin_client::poll_gossip_for_leader;
use solana_metrics;
use solana_sdk::signature::KeypairUtil;
use std::collections::VecDeque;
use std::process::exit;
use std::sync::atomic::{AtomicBool, AtomicIsize, AtomicUsize, Ordering};
use std::sync::{Arc, RwLock};
use std::thread::sleep;
use std::thread::Builder;
use std::time::Duration;
use std::time::Instant;
use crate::bench::*;
/// Creates a cluster and waits for the network to converge, returning the peers, leader, and gossip service
/// # Arguments
/// `leader` - the input leader node
/// `exit_signal` - atomic bool used to signal early exit to cluster
/// `num_nodes` - the number of nodes
/// # Panics
/// Panics if the spy node `RwLock` somehow ends up unreadable
fn converge(
leader: &NodeInfo,
exit_signal: &Arc<AtomicBool>,
num_nodes: usize,
) -> (Vec<NodeInfo>, Option<NodeInfo>, GossipService) {
//lets spy on the network
let (node, gossip_socket) = ClusterInfo::spy_node();
let mut spy_cluster_info = ClusterInfo::new(node);
spy_cluster_info.insert_info(leader.clone());
spy_cluster_info.set_leader(leader.id);
let spy_ref = Arc::new(RwLock::new(spy_cluster_info));
let gossip_service = GossipService::new(&spy_ref, None, gossip_socket, exit_signal.clone());
let mut v: Vec<NodeInfo> = vec![];
// wait for the network to converge, 30 seconds should be plenty
for _ in 0..30 {
{
let spy_ref = spy_ref.read().unwrap();
println!("{}", spy_ref.node_info_trace());
if spy_ref.leader_data().is_some() {
v = spy_ref.rpc_peers();
if v.len() >= num_nodes {
println!("CONVERGED!");
break;
} else {
println!(
"{} node(s) discovered (looking for {} or more)",
v.len(),
num_nodes
);
}
}
}
sleep(Duration::new(1, 0));
}
let leader = spy_ref.read().unwrap().leader_data().cloned();
(v, leader, gossip_service)
}
/// Number of signatures for all transactions in ~1 week at ~100K TPS
pub const NUM_SIGNATURES_FOR_TXS: u64 = 100_000 * 60 * 60 * 24 * 7;
fn main() {
solana_logger::setup();
solana_logger::setup_with_default("solana=info");
solana_metrics::set_panic_hook("bench-tps");
let matches = cli::build_args().get_matches();
let cfg = cli::extract_args(&matches);
let matches = cli::build_args(solana_clap_utils::version!()).get_matches();
let cli_config = cli::extract_args(&matches);
let cli::Config {
network_addr: network,
drone_addr,
entrypoint_addr,
faucet_addr,
id,
threads,
num_nodes,
duration,
tx_count,
sustained,
reject_extra_nodes,
converge_only,
} = cfg;
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;
println!("Looking for leader at {:?}", network);
let leader = poll_gossip_for_leader(network, None).expect("unable to find leader on network");
let keypair_count = *tx_count * keypair_multiplier;
if *write_to_client_file {
info!("Generating {} keypairs", keypair_count);
let (keypairs, _) = generate_keypairs(&id, keypair_count as u64);
let num_accounts = keypairs.len() as u64;
let max_fee =
FeeRateGovernor::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;
let mut accounts = HashMap::new();
keypairs.iter().for_each(|keypair| {
accounts.insert(
serde_json::to_string(&keypair.to_bytes().to_vec()).unwrap(),
Base64Account {
balance: num_lamports_per_account,
executable: false,
owner: system_program::id().to_string(),
data: String::new(),
},
);
});
let exit_signal = Arc::new(AtomicBool::new(false));
let (nodes, leader, gossip_service) = converge(&leader, &exit_signal, num_nodes);
if nodes.len() < num_nodes {
println!(
"Error: Insufficient nodes discovered. Expecting {} or more",
num_nodes
);
exit(1);
}
if reject_extra_nodes && nodes.len() > num_nodes {
println!(
"Error: Extra nodes discovered. Expecting exactly {}",
num_nodes
);
exit(1);
}
if leader.is_none() {
println!("no leader");
exit(1);
}
if converge_only {
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();
file.write_all(&serialized.into_bytes()).unwrap();
return;
}
let leader = leader.unwrap();
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);
});
println!("leader RPC is at {} {}", leader.rpc, leader.id);
let mut client = mk_client(&leader);
let mut barrier_client = mk_client(&leader);
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))
};
let mut seed = [0u8; 32];
seed.copy_from_slice(&id.public_key_bytes()[..32]);
let mut rnd = GenKeys::new(seed);
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();
println!("Creating {} keypairs...", tx_count * 2);
let mut total_keys = 0;
let mut target = tx_count * 2;
while target > 0 {
total_keys += target;
target /= MAX_SPENDS_PER_TX;
}
let gen_keypairs = rnd.gen_n_keypairs(total_keys as u64);
let barrier_id = rnd.gen_n_keypairs(1).pop().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;
println!("Get tokens...");
let num_tokens_per_account = 20;
accounts
.into_iter()
.for_each(|(keypair, primordial_account)| {
let bytes: Vec<u8> = serde_json::from_str(keypair.as_str()).unwrap();
keypairs.push(Keypair::from_bytes(&bytes).unwrap());
last_balance = primordial_account.balance;
});
// Sample the first keypair, see if it has tokens, if so then resume
// to avoid token loss
let keypair0_balance = client
.poll_get_balance(&gen_keypairs.last().unwrap().pubkey())
.unwrap_or(0);
if num_tokens_per_account > keypair0_balance {
let extra = num_tokens_per_account - keypair0_balance;
let total = extra * (gen_keypairs.len() as u64);
airdrop_tokens(&mut client, &drone_addr, &id, total);
println!("adding more tokens {}", extra);
fund_keys(&mut client, &id, &gen_keypairs, extra);
}
let start = gen_keypairs.len() - (tx_count * 2) as usize;
let keypairs = &gen_keypairs[start..];
airdrop_tokens(&mut barrier_client, &drone_addr, &barrier_id, 1);
println!("Get last ID...");
let mut last_id = client.get_last_id();
println!("Got last ID {:?}", last_id);
let first_tx_count = client.transaction_count();
println!("Initial transaction count {}", first_tx_count);
// Setup a thread per validator to sample every period
// collect the max transaction rate and total tx count seen
let maxes = Arc::new(RwLock::new(Vec::new()));
let sample_period = 1; // in seconds
println!("Sampling TPS every {} second...", sample_period);
let v_threads: Vec<_> = nodes
.into_iter()
.map(|v| {
let exit_signal = exit_signal.clone();
let maxes = maxes.clone();
Builder::new()
.name("solana-client-sample".to_string())
.spawn(move || {
sample_tx_count(&exit_signal, &maxes, first_tx_count, &v, sample_period);
})
.unwrap()
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)
} else {
generate_and_fund_keypairs(
client.clone(),
Some(*faucet_addr),
&id,
keypair_count,
*num_lamports_per_account,
*use_move,
)
.unwrap_or_else(|e| {
eprintln!("Error could not fund keys: {:?}", e);
exit(1);
})
.collect();
};
let shared_txs: SharedTransactions = Arc::new(RwLock::new(VecDeque::new()));
let shared_tx_active_thread_count = Arc::new(AtomicIsize::new(0));
let total_tx_sent_count = Arc::new(AtomicUsize::new(0));
let s_threads: Vec<_> = (0..threads)
.map(|_| {
let exit_signal = exit_signal.clone();
let shared_txs = shared_txs.clone();
let leader = leader.clone();
let shared_tx_active_thread_count = shared_tx_active_thread_count.clone();
let total_tx_sent_count = total_tx_sent_count.clone();
Builder::new()
.name("solana-client-sender".to_string())
.spawn(move || {
do_tx_transfers(
&exit_signal,
&shared_txs,
&leader,
&shared_tx_active_thread_count,
&total_tx_sent_count,
);
})
.unwrap()
})
.collect();
// generate and send transactions for the specified duration
let start = Instant::now();
let mut reclaim_tokens_back_to_source_account = false;
let mut i = keypair0_balance;
while start.elapsed() < duration {
let balance = client.poll_get_balance(&id.pubkey()).unwrap_or(0);
metrics_submit_token_balance(balance);
// ping-pong between source and destination accounts for each loop iteration
// this seems to be faster than trying to determine the balance of individual
// accounts
let len = tx_count as usize;
generate_txs(
&shared_txs,
&keypairs[..len],
&keypairs[len..],
threads,
reclaim_tokens_back_to_source_account,
&leader,
);
// In sustained mode overlap the transfers with generation
// this has higher average performance but lower peak performance
// in tested environments.
if !sustained {
while shared_tx_active_thread_count.load(Ordering::Relaxed) > 0 {
sleep(Duration::from_millis(100));
}
}
// It's not feasible (would take too much time) to confirm each of the `tx_count / 2`
// transactions sent by `generate_txs()` so instead send and confirm a single transaction
// to validate the network is still functional.
send_barrier_transaction(&mut barrier_client, &mut last_id, &barrier_id);
i += 1;
if should_switch_directions(num_tokens_per_account, i) {
reclaim_tokens_back_to_source_account = !reclaim_tokens_back_to_source_account;
}
}
// Stop the sampling threads so it will collect the stats
exit_signal.store(true, Ordering::Relaxed);
println!("Waiting for validator threads...");
for t in v_threads {
if let Err(err) = t.join() {
println!(" join() failed with: {:?}", err);
}
}
// join the tx send threads
println!("Waiting for transmit threads...");
for t in s_threads {
if let Err(err) = t.join() {
println!(" join() failed with: {:?}", err);
}
}
let balance = client.poll_get_balance(&id.pubkey()).unwrap_or(0);
metrics_submit_token_balance(balance);
compute_and_report_stats(
&maxes,
sample_period,
&start.elapsed(),
total_tx_sent_count.load(Ordering::Relaxed),
);
// join the cluster_info client threads
gossip_service.join().unwrap();
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_switch_directions() {
assert_eq!(should_switch_directions(20, 0), false);
assert_eq!(should_switch_directions(20, 1), false);
assert_eq!(should_switch_directions(20, 14), false);
assert_eq!(should_switch_directions(20, 15), true);
assert_eq!(should_switch_directions(20, 16), false);
assert_eq!(should_switch_directions(20, 19), false);
assert_eq!(should_switch_directions(20, 20), true);
assert_eq!(should_switch_directions(20, 21), false);
assert_eq!(should_switch_directions(20, 99), false);
assert_eq!(should_switch_directions(20, 100), true);
assert_eq!(should_switch_directions(20, 101), false);
}
do_bench_tps(client, cli_config, keypairs, move_keypairs);
}

View File

@@ -0,0 +1,86 @@
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::VALIDATOR_PORT_RANGE;
use solana_core::validator::ValidatorConfig;
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,
..ClusterConfig::default()
});
let faucet_keypair = Keypair::new();
cluster.transfer(
&cluster.funding_keypair,
&faucet_keypair.pubkey(),
100_000_000,
);
let client = Arc::new(create_client(
(cluster.entry_point_info.rpc, cluster.entry_point_info.tpu),
VALIDATOR_PORT_RANGE,
));
let (addr_sender, addr_receiver) = channel();
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 keypair_count = config.tx_count * config.keypair_multiplier;
let (keypairs, move_keypairs) = generate_and_fund_keypairs(
client.clone(),
Some(faucet_addr),
&config.id,
keypair_count,
lamports_per_account,
config.use_move,
)
.unwrap();
let _total = do_bench_tps(client, config, keypairs, move_keypairs);
#[cfg(not(debug_assertions))]
assert!(_total > 100);
}
#[test]
#[serial]
fn test_bench_tps_local_cluster_solana() {
let mut config = Config::default();
config.tx_count = 100;
config.duration = Duration::from_secs(10);
test_bench_tps_local_cluster(config);
}
#[test]
#[serial]
fn test_bench_tps_local_cluster_move() {
let mut config = Config::default();
config.tx_count = 100;
config.duration = Duration::from_secs(10);
config.use_move = true;
test_bench_tps_local_cluster(config);
}

View File

@@ -1,57 +0,0 @@
#![feature(test)]
extern crate test;
use solana::bank::*;
use solana::mint::Mint;
use solana::status_deque::MAX_ENTRY_IDS;
use solana_sdk::hash::hash;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::system_transaction::SystemTransaction;
use solana_sdk::transaction::Transaction;
use test::Bencher;
#[bench]
fn bench_process_transaction(bencher: &mut Bencher) {
let mint = Mint::new(100_000_000);
let bank = Bank::new(&mint);
// Create transactions between unrelated parties.
let transactions: Vec<_> = (0..4096)
.into_iter()
.map(|_| {
// Seed the 'from' account.
let rando0 = Keypair::new();
let tx = Transaction::system_move(
&mint.keypair(),
rando0.pubkey(),
10_000,
bank.last_id(),
0,
);
assert_eq!(bank.process_transaction(&tx), Ok(()));
// Seed the 'to' account and a cell for its signature.
let rando1 = Keypair::new();
let tx = Transaction::system_move(&rando0, rando1.pubkey(), 1, bank.last_id(), 0);
assert_eq!(bank.process_transaction(&tx), Ok(()));
// Finally, return the transaction to the benchmark.
tx
})
.collect();
let mut id = bank.last_id();
for _ in 0..(MAX_ENTRY_IDS - 1) {
bank.register_tick(&id);
id = hash(&id.as_ref())
}
bencher.iter(|| {
// Since benchmarker runs this multiple times, we need to clear the signatures.
bank.clear_signatures();
let results = bank.process_transactions(&transactions);
assert!(results.iter().all(Result::is_ok));
})
}

View File

@@ -1,232 +0,0 @@
#![feature(test)]
extern crate test;
use rand::{thread_rng, Rng};
use rayon::prelude::*;
use solana::bank::Bank;
use solana::banking_stage::{BankingStage, NUM_THREADS};
use solana::entry::Entry;
use solana::mint::Mint;
use solana::packet::to_packets_chunked;
use solana::status_deque::MAX_ENTRY_IDS;
use solana_sdk::hash::hash;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::{Keypair, KeypairUtil, Signature};
use solana_sdk::system_transaction::SystemTransaction;
use solana_sdk::transaction::Transaction;
use std::iter;
use std::sync::mpsc::{channel, Receiver};
use std::sync::Arc;
use std::time::Duration;
use test::Bencher;
fn check_txs(receiver: &Receiver<Vec<Entry>>, ref_tx_count: usize) {
let mut total = 0;
loop {
let entries = receiver.recv_timeout(Duration::new(1, 0));
if let Ok(entries) = entries {
for entry in &entries {
total += entry.transactions.len();
}
} else {
break;
}
if total >= ref_tx_count {
break;
}
}
assert_eq!(total, ref_tx_count);
}
#[bench]
fn bench_banking_stage_multi_accounts(bencher: &mut Bencher) {
let txes = 1000 * NUM_THREADS;
let mint_total = 1_000_000_000_000;
let mint = Mint::new(mint_total);
let (verified_sender, verified_receiver) = channel();
let bank = Arc::new(Bank::new(&mint));
let dummy_leader_id = Keypair::new().pubkey();
let dummy = Transaction::system_move(
&mint.keypair(),
mint.keypair().pubkey(),
1,
mint.last_id(),
0,
);
let transactions: Vec<_> = (0..txes)
.into_par_iter()
.map(|_| {
let mut new = dummy.clone();
let from: Vec<u8> = (0..64).map(|_| thread_rng().gen()).collect();
let to: Vec<u8> = (0..64).map(|_| thread_rng().gen()).collect();
let sig: Vec<u8> = (0..64).map(|_| thread_rng().gen()).collect();
new.account_keys[0] = Pubkey::new(&from[0..32]);
new.account_keys[1] = Pubkey::new(&to[0..32]);
new.signatures = vec![Signature::new(&sig[0..64])];
new
})
.collect();
// fund all the accounts
transactions.iter().for_each(|tx| {
let fund = Transaction::system_move(
&mint.keypair(),
tx.account_keys[0],
mint_total / txes as u64,
mint.last_id(),
0,
);
let x = bank.process_transaction(&fund);
assert!(x.is_ok());
});
//sanity check, make sure all the transactions can execute sequentially
transactions.iter().for_each(|tx| {
let res = bank.process_transaction(&tx);
assert!(res.is_ok(), "sanity test transactions");
});
bank.clear_signatures();
//sanity check, make sure all the transactions can execute in parallel
let res = bank.process_transactions(&transactions);
for r in res {
assert!(r.is_ok(), "sanity parallel execution");
}
bank.clear_signatures();
let verified: Vec<_> = to_packets_chunked(&transactions.clone(), 192)
.into_iter()
.map(|x| {
let len = x.read().unwrap().packets.len();
(x, iter::repeat(1).take(len).collect())
})
.collect();
let (_stage, signal_receiver) = BankingStage::new(
&bank,
verified_receiver,
Default::default(),
&mint.last_id(),
None,
dummy_leader_id,
);
let mut id = mint.last_id();
for _ in 0..MAX_ENTRY_IDS {
id = hash(&id.as_ref());
bank.register_tick(&id);
}
bencher.iter(move || {
// make sure the tx last id is still registered
if bank.count_valid_ids(&[mint.last_id()]).len() == 0 {
bank.register_tick(&mint.last_id());
}
for v in verified.chunks(verified.len() / NUM_THREADS) {
verified_sender.send(v.to_vec()).unwrap();
}
check_txs(&signal_receiver, txes);
bank.clear_signatures();
});
}
#[bench]
fn bench_banking_stage_multi_programs(bencher: &mut Bencher) {
let progs = 4;
let txes = 1000 * NUM_THREADS;
let mint_total = 1_000_000_000_000;
let mint = Mint::new(mint_total);
let (verified_sender, verified_receiver) = channel();
let bank = Arc::new(Bank::new(&mint));
let dummy_leader_id = Keypair::new().pubkey();
let dummy = Transaction::system_move(
&mint.keypair(),
mint.keypair().pubkey(),
1,
mint.last_id(),
0,
);
let transactions: Vec<_> = (0..txes)
.into_par_iter()
.map(|_| {
let mut new = dummy.clone();
let from: Vec<u8> = (0..32).map(|_| thread_rng().gen()).collect();
let sig: Vec<u8> = (0..64).map(|_| thread_rng().gen()).collect();
let to: Vec<u8> = (0..32).map(|_| thread_rng().gen()).collect();
new.account_keys[0] = Pubkey::new(&from[0..32]);
new.account_keys[1] = Pubkey::new(&to[0..32]);
let prog = new.instructions[0].clone();
for i in 1..progs {
//generate programs that spend to random keys
let to: Vec<u8> = (0..32).map(|_| thread_rng().gen()).collect();
let to_key = Pubkey::new(&to[0..32]);
new.account_keys.push(to_key);
assert_eq!(new.account_keys.len(), i + 2);
new.instructions.push(prog.clone());
assert_eq!(new.instructions.len(), i + 1);
new.instructions[i].accounts[1] = 1 + i as u8;
assert_eq!(new.key(i, 1), Some(&to_key));
assert_eq!(
new.account_keys[new.instructions[i].accounts[1] as usize],
to_key
);
}
assert_eq!(new.instructions.len(), progs);
new.signatures = vec![Signature::new(&sig[0..64])];
new
})
.collect();
transactions.iter().for_each(|tx| {
let fund = Transaction::system_move(
&mint.keypair(),
tx.account_keys[0],
mint_total / txes as u64,
mint.last_id(),
0,
);
assert!(bank.process_transaction(&fund).is_ok());
});
//sanity check, make sure all the transactions can execute sequentially
transactions.iter().for_each(|tx| {
let res = bank.process_transaction(&tx);
assert!(res.is_ok(), "sanity test transactions");
});
bank.clear_signatures();
//sanity check, make sure all the transactions can execute in parallel
let res = bank.process_transactions(&transactions);
for r in res {
assert!(r.is_ok(), "sanity parallel execution");
}
bank.clear_signatures();
let verified: Vec<_> = to_packets_chunked(&transactions.clone(), 96)
.into_iter()
.map(|x| {
let len = x.read().unwrap().packets.len();
(x, iter::repeat(1).take(len).collect())
})
.collect();
let (_stage, signal_receiver) = BankingStage::new(
&bank,
verified_receiver,
Default::default(),
&mint.last_id(),
None,
dummy_leader_id,
);
let mut id = mint.last_id();
for _ in 0..MAX_ENTRY_IDS {
id = hash(&id.as_ref());
bank.register_tick(&id);
}
bencher.iter(move || {
// make sure the transactions are still valid
if bank.count_valid_ids(&[mint.last_id()]).len() == 0 {
bank.register_tick(&mint.last_id());
}
for v in verified.chunks(verified.len() / NUM_THREADS) {
verified_sender.send(v.to_vec()).unwrap();
}
check_txs(&signal_receiver, txes);
bank.clear_signatures();
});
}

View File

@@ -1,199 +0,0 @@
#![feature(test)]
use rand;
extern crate test;
use rand::seq::SliceRandom;
use rand::{thread_rng, Rng};
use rocksdb::{Options, DB};
use solana::db_ledger::{DataCf, DbLedger, LedgerColumnFamilyRaw};
use solana::ledger::{get_tmp_ledger_path, make_large_test_entries, make_tiny_test_entries, Block};
use solana::packet::{Blob, BLOB_HEADER_SIZE};
use test::Bencher;
// Given some blobs and a ledger at ledger_path, benchmark writing the blobs to the ledger
fn bench_write_blobs(bench: &mut Bencher, blobs: &mut [&mut Blob], ledger_path: &str) {
let db_ledger =
DbLedger::open(&ledger_path).expect("Expected to be able to open database ledger");
let slot = 0;
let num_blobs = blobs.len();
bench.iter(move || {
for blob in blobs.iter_mut() {
let index = blob.index().unwrap();
let key = DataCf::key(slot, index);
let size = blob.size().unwrap();
db_ledger
.data_cf
.put(&db_ledger.db, &key, &blob.data[..BLOB_HEADER_SIZE + size])
.unwrap();
blob.set_index(index + num_blobs as u64).unwrap();
}
});
DB::destroy(&Options::default(), &ledger_path)
.expect("Expected successful database destruction");
}
// Insert some blobs into the ledger in preparation for read benchmarks
fn setup_read_bench(
db_ledger: &mut DbLedger,
num_small_blobs: u64,
num_large_blobs: u64,
slot: u64,
) {
// Make some big and small entries
let mut entries = make_large_test_entries(num_large_blobs as usize);
entries.extend(make_tiny_test_entries(num_small_blobs as usize));
// Convert the entries to blobs, write the blobs to the ledger
let shared_blobs = entries.to_blobs();
for b in shared_blobs.iter() {
b.write().unwrap().set_slot(slot).unwrap();
}
db_ledger
.write_shared_blobs(&shared_blobs)
.expect("Expectd successful insertion of blobs into ledger");
}
// Write small blobs to the ledger
#[bench]
#[ignore]
fn bench_write_small(bench: &mut Bencher) {
let ledger_path = get_tmp_ledger_path("bench_write_small");
let num_entries = 32 * 1024;
let entries = make_tiny_test_entries(num_entries);
let shared_blobs = entries.to_blobs();
let mut blob_locks: Vec<_> = shared_blobs.iter().map(|b| b.write().unwrap()).collect();
let mut blobs: Vec<&mut Blob> = blob_locks.iter_mut().map(|b| &mut **b).collect();
bench_write_blobs(bench, &mut blobs, &ledger_path);
}
// Write big blobs to the ledger
#[bench]
#[ignore]
fn bench_write_big(bench: &mut Bencher) {
let ledger_path = get_tmp_ledger_path("bench_write_big");
let num_entries = 32 * 1024;
let entries = make_tiny_test_entries(num_entries);
let shared_blobs = entries.to_blobs();
let mut blob_locks: Vec<_> = shared_blobs.iter().map(|b| b.write().unwrap()).collect();
let mut blobs: Vec<&mut Blob> = blob_locks.iter_mut().map(|b| &mut **b).collect();
bench_write_blobs(bench, &mut blobs, &ledger_path);
}
#[bench]
#[ignore]
fn bench_read_sequential(bench: &mut Bencher) {
let ledger_path = get_tmp_ledger_path("bench_read_sequential");
let mut db_ledger =
DbLedger::open(&ledger_path).expect("Expected to be able to open database ledger");
// Insert some big and small blobs into the ledger
let num_small_blobs = 32 * 1024;
let num_large_blobs = 32 * 1024;
let total_blobs = num_small_blobs + num_large_blobs;
let slot = 0;
setup_read_bench(&mut db_ledger, num_small_blobs, num_large_blobs, slot);
let num_reads = total_blobs / 15;
let mut rng = rand::thread_rng();
bench.iter(move || {
// Generate random starting point in the range [0, total_blobs - 1], read num_reads blobs sequentially
let start_index = rng.gen_range(0, num_small_blobs + num_large_blobs);
for i in start_index..start_index + num_reads {
let _ =
db_ledger
.data_cf
.get_by_slot_index(&db_ledger.db, slot, i as u64 % total_blobs);
}
});
DB::destroy(&Options::default(), &ledger_path)
.expect("Expected successful database destruction");
}
#[bench]
#[ignore]
fn bench_read_random(bench: &mut Bencher) {
let ledger_path = get_tmp_ledger_path("bench_read_random");
let mut db_ledger =
DbLedger::open(&ledger_path).expect("Expected to be able to open database ledger");
// Insert some big and small blobs into the ledger
let num_small_blobs = 32 * 1024;
let num_large_blobs = 32 * 1024;
let total_blobs = num_small_blobs + num_large_blobs;
let slot = 0;
setup_read_bench(&mut db_ledger, num_small_blobs, num_large_blobs, slot);
let num_reads = total_blobs / 15;
// Generate a num_reads sized random sample of indexes in range [0, total_blobs - 1],
// simulating random reads
let mut rng = rand::thread_rng();
let indexes: Vec<usize> = (0..num_reads)
.map(|_| rng.gen_range(0, total_blobs) as usize)
.collect();
bench.iter(move || {
for i in indexes.iter() {
let _ = db_ledger
.data_cf
.get_by_slot_index(&db_ledger.db, slot, *i as u64);
}
});
DB::destroy(&Options::default(), &ledger_path)
.expect("Expected successful database destruction");
}
#[bench]
#[ignore]
fn bench_insert_data_blob_small(bench: &mut Bencher) {
let ledger_path = get_tmp_ledger_path("bench_insert_data_blob_small");
let db_ledger =
DbLedger::open(&ledger_path).expect("Expected to be able to open database ledger");
let num_entries = 32 * 1024;
let entries = make_tiny_test_entries(num_entries);
let mut shared_blobs = entries.to_blobs();
shared_blobs.shuffle(&mut thread_rng());
bench.iter(move || {
for blob in shared_blobs.iter_mut() {
let index = blob.read().unwrap().index().unwrap();
db_ledger.write_shared_blobs(vec![blob.clone()]).unwrap();
blob.write()
.unwrap()
.set_index(index + num_entries as u64)
.unwrap();
}
});
DB::destroy(&Options::default(), &ledger_path)
.expect("Expected successful database destruction");
}
#[bench]
#[ignore]
fn bench_insert_data_blob_big(bench: &mut Bencher) {
let ledger_path = get_tmp_ledger_path("bench_insert_data_blob_big");
let db_ledger =
DbLedger::open(&ledger_path).expect("Expected to be able to open database ledger");
let num_entries = 32 * 1024;
let entries = make_large_test_entries(num_entries);
let mut shared_blobs = entries.to_blobs();
shared_blobs.shuffle(&mut thread_rng());
bench.iter(move || {
for blob in shared_blobs.iter_mut() {
let index = blob.read().unwrap().index().unwrap();
db_ledger.write_shared_blobs(vec![blob.clone()]).unwrap();
blob.write()
.unwrap()
.set_index(index + num_entries as u64)
.unwrap();
}
});
DB::destroy(&Options::default(), &ledger_path)
.expect("Expected successful database destruction");
}

View File

@@ -1,26 +0,0 @@
#![feature(test)]
extern crate test;
use solana::entry::reconstruct_entries_from_blobs;
use solana::ledger::{next_entries, Block};
use solana_sdk::hash::{hash, Hash};
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::system_transaction::SystemTransaction;
use solana_sdk::transaction::Transaction;
use test::Bencher;
#[bench]
fn bench_block_to_blobs_to_block(bencher: &mut Bencher) {
let zero = Hash::default();
let one = hash(&zero.as_ref());
let keypair = Keypair::new();
let tx0 = Transaction::system_move(&keypair, keypair.pubkey(), 1, one, 0);
let transactions = vec![tx0; 10];
let entries = next_entries(&zero, 1, transactions);
bencher.iter(|| {
let blobs = entries.to_blobs();
assert_eq!(reconstruct_entries_from_blobs(blobs).unwrap().0, entries);
});
}

View File

@@ -1,21 +0,0 @@
#![feature(test)]
extern crate test;
use solana::packet::to_packets;
use solana::sigverify;
use solana::test_tx::test_tx;
use test::Bencher;
#[bench]
fn bench_sigverify(bencher: &mut Bencher) {
let tx = test_tx();
// generate packet vector
let batches = to_packets(&vec![tx; 128]);
// verify packets
bencher.iter(|| {
let _ans = sigverify::ed25519_verify(&batches);
})
}

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

@@ -1,25 +0,0 @@
.-------------.
| |
.-------------+ Leader +══════════════╗
| | | ║
| `-------------` ║
v v
.-------------. .-------------.
| +--------------------------->| |
.----+ Validator 1 | | Validator 2 +═══╗
| | |<═══════════════════════════+ | ║
| `------+------` `------+------` ║
| | ║ ║
| `------------------------------. ║ ║
| | ║ ║
| ╔════════════════════════════════╝ ║
| ║ | ║
V v V v
.-------------. .-------------. .-------------. .-------------.
| | | | | | | |
| Validator 3 +------>| Validator 4 +══════>| Validator 5 +------>| Validator 6 |
| | | | | | | |
`-------------` `-------------` `-------------` `------+------`
^ ║
║ ║
╚═════════════════════════════════════════════════════════════════╝

View File

@@ -1,27 +0,0 @@
.---------------------------.
| Fullnode |
| |
.--------. | .------------------. |
| |---->| | |
| Client | | | JSON RPC Service | |
| |<----| | |
`----+---` | `------------------` |
| | ^ | .------------------.
| | | .----------------. | | Validators |
| | | | Gossip Service +----->| |
| | | `--------+-------` | | .------------. |
| | | ^ | | | | | |
| | | | v | | | Upstream | |
| | .--+---. .-+---. | | | Validators | |
| | | Bank |<--| TVU |<--------------+ | |
| | `------` `-----` | | `------------` |
| | ^ | | |
| | | | | .------------. |
| | .--+--. .-----------. | | | | |
`-------->| TPU +-->| Broadcast +--------->| Downstream | |
| `-----` | Service | | | | Validators | |
| `-----------` | | | | |
| | | `------------` |
`---------------------------` | |
`------------------`

View File

@@ -1,9 +0,0 @@
.-----------. .-------------. .--------------. .--------------------.
| sigverify +--->| lock memory +--->| validate fee +--->| allocate accounts +--->
`-----------` `-------------` `--------------` `--------------------`
.------------. .---------. .--------------. .--------------.
--->| load data +--->| execute +--->| commit data +-->|unlock memory |
`------------` `---------` `--------------` `--------------`

View File

@@ -1,18 +0,0 @@
.------------------------------------------------------.
| TPU .-------------. |
| | PoH Service | |
| `--------+----` |
| ^ | |
| | v |
| .-------. .-----------. .-+-------. .--------. | .------------.
.---------. | | Fetch | | SigVerify | | Banking | | Ledger | | | Broadcast |
| Clients |--->| Stage |->| Stage |->| Stage |-->| Write +---->| Service |
`---------` | | | | | | | | Stage | | | |
| `-------` `-----------` `----+----` `--------` | `------------`
| | |
`---------------------------------|--------------------`
|
v
.------.
| Bank |
`------`

View File

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

View File

@@ -1,33 +0,0 @@
BOB_SRCS=$(wildcard art/*.bob)
MD_SRCS=$(wildcard src/*.md)
SVG_IMGS=$(BOB_SRCS:art/%.bob=src/img/%.svg)
all: html/index.html
test: src/tests.ok
open: all
mdbook build --open
watch: $(SVG_IMGS)
mdbook watch
src/img/%.svg: art/%.bob
@mkdir -p $(@D)
svgbob < $< > $@
src/%.md: %.md
@mkdir -p $(@D)
@cp $< $@
src/tests.ok: $(SVG_IMGS) $(MD_SRCS)
mdbook test
touch $@
html/index.html: src/tests.ok
mdbook build
clean:
rm -f $(SVG_IMGS) src/tests.ok
rm -rf html

View File

@@ -1,37 +0,0 @@
# Solana Architecture
- [Introduction](introduction.md)
- [Terminology](terminology.md)
- [Getting Started](getting-started.md)
- [Example: Web Wallet](webwallet.md)
- [Programming Model](programs.md)
- [Example: Tic-Tac-Toe](tictactoe.md)
- [Drones](drones.md)
- [A Solana Cluster](cluster.md)
- [Synchronization](synchronization.md)
- [Leader Rotation](leader-rotation.md)
- [Fork Generation](fork-generation.md)
- [Anatomy of a Fullnode](fullnode.md)
- [TPU](tpu.md)
- [TVU](tvu.md)
- [Gossip Service](gossip.md)
- [The Runtime](runtime.md)
- [Proposed Architectural Changes](proposals.md)
- [Ledger Replication](ledger-replication.md)
- [Secure Enclave](enclave.md)
- [Staking Rewards](staking-rewards.md)
- [Fork Selection](fork-selection.md)
- [Entry Tree](entry-tree.md)
## Appendix
- [Appendix](appendix.md)
- [JSON RPC API](jsonrpc-api.md)
- [JavaScript API](javascript-api.md)
- [solana-wallet CLI](wallet.md)

View File

@@ -1,4 +0,0 @@
# Appendix
The following sections contain reference material you may find useful in your
Solana journey.

View File

@@ -1,99 +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 secret key is
responsible for appending the first entries to the ledger. It initializes its
internal state with the mint's account. That account will hold the number of
native tokens defined by the genesis block. The second fullnode then contacts
the bootstrap leader to register as a *validator* or *replicator*. Additional
fullnodes then register with any registered member of the cluster.
A validator receives all entries from the leader and submits votes confirming
those entries are valid. After voting, the validator is expected to store those
entries until replicator nodes submit proofs that they have stored copies of
it. Once the validator observes a sufficient number of copies exist, it deletes
its copy.
## Joining a Cluster
Fullnodes 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*, but it is not yet implemented.

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::Move` 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 last_id
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
`last_id` to ensure the previous request is expired before signing another.
Note that the Solana cluster will reject any transaction with a `last_id`
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 `Move` 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,181 +0,0 @@
# Signing using Secure Enclave
This document defines the security mechanism of signing keys used by the
fullnodes. Every node contains an asymmetric key that's used for signing
and verifying the votes. The node signs the vote transactions using its private
key. Other entities can verify the signature using the node's public key.
The node's stake or its resources could be compromised if its private key is
used to sign incorrect data (e.g. voting on multiple forks of the ledger). So,
it's important to safeguard the private key.
Secure Enclaves (such as SGX) provide a layer of memory and computation
protection. An enclave can be used to generate an asymmetric key and keep the
private key in its protected memory. It can expose an API that user (untrusted)
code can use for signing the transactions.
## Message Flow
1. The node initializes the enclave at startup
* The enclave generates an asymmetric key and returns the public key to the
node
* The keypair is ephemeral. A new keypair is generated on node bootup. A
new keypair might also be generated at runtime based on some TBD
criteria.
* The enclave returns its attestation report to the node
2. The node performs attestation of the enclave (e.g using Intel's IAS APIs)
* The node ensures that the Secure Enclave is running on a TPM and is
signed by a trusted party
3. The owner of the node grants ephemeral key permission to use its stake. This
process is TBD.
4. The node's untrusted, non-enclave software calls trusted enclave software
using its interface to sign transactions and other data.
* In case of vote signing, the node needs to verify the PoH. The PoH
verification is an integral part of signing. The enclave would be
presented with some verifiable data that it'll check before signing the vote.
* The process of generating the verifiable data in untrusted space is TBD
## PoH Verification
1. When the node votes on an en entry `X`, there's a lockout period `N`, for
which it cannot vote on a fork that does not contain `X` in its history.
2. Every time the node votes on the derivative of `X`, say `X+y`, the lockout
period for `X` increases by a factor `F` (i.e. the duration node cannot vote on
a fork that does not contain `X` increases).
* The lockout period for `X+y` is still `N` until the node votes again.
3. The lockout period increment is capped (e.g. factor `F` applies maximum 32
times).
4. The signing enclave must not sign a vote that violates this policy. This
means
* Enclave is initialized with `N`, `F` and `Factor cap`
* Enclave stores `Factor cap` number of entry IDs on which the node had
previously voted
* The sign request contains the entry ID for the new vote
* Enclave verifies that new vote's entry ID is on the correct fork
(following the rules #1 and #2 above)
## Ancestor Verification
This is alternate, albeit, less certain approach to verifying voting fork.
1. The validator maintains an active set of nodes in the cluster
2. It observes the votes from the active set in the last voting period
3. It stores the ancestor/last_tick at which each node voted
4. It sends new vote request to vote-signing service
* It includes previous votes from nodes in the active set, and their
corresponding ancestors
5. The signer checks if the previous votes contains a vote from the validator,
and the vote ancestor matches with majority of the nodes
* It signs the new vote if the check is successful
* It asserts (raises an alarm of some sort) if the check is unsuccessful
The premise is that the validator can be spoofed at most once to vote on
incorrect data. If someone hijacks the validator and submits a vote request for
bogus data, that vote will not be included in the PoH (as it'll be rejected by
the cluster). The next time the validator sends a request to sign the vote, the
signing service will detect that validator's last vote is missing (as part of
#5 above).
## Fork determination
Due to the fact that the enclave cannot process PoH, it has no direct knowledge
of fork history of a submitted validator vote. Each enclave should be initiated
with the current *active set* of public keys. A validator should submit its
current vote along with the votes of the active set (including itself) that it
observed in the slot of its previous vote. In this way, the enclave can surmise
the votes accompanying the validator's previous vote and thus the fork being
voted on. This is not possible for the validator's initial submitted vote, as
it will not have a 'previous' slot to reference. To account for this, a short
voting freeze should apply until the second vote is submitted containing the
votes within the active set, along with it's own vote, at the height of the
initial vote.
## Enclave configuration
A staking client should be configurable to prevent voting on inactive forks.
This mechanism should use the client's known active set `N_active` along with a
threshold vote `N_vote` and a threshold depth `N_depth` to determine whether or
not to continue voting on a submitted fork. This configuration should take the
form of a rule such that the client will only vote on a fork if it observes
more than `N_vote` at `N_depth`. Practically, this represents the client from
confirming that it has observed some probability of economic finality of the
submitted fork at a depth where an additional vote would create a lockout for
an undesirable amount of time if that fork turns out not to be live.
## Signing service
The signing service consists of a a JSON RPC server, and a request processor.
At startup, it starts the RPC server at a configured port and waits for
client/validator requests. It expects the following type of requests.
1. Register a new validator node
* The request contains validator's identity (public key)
* The request is signed with validator's private key
* The service will drop the request if signature of the request cannot be
verified
* The service will create a new voting asymmetric key for the validator,
and return the public key as a response
* If a validator retries to register, it'll return the public key from the
pre-existing keypair
2. Sign a vote
* The request contains voting transaction, and all verification data (as
described in Ancestor Verification)
* The request is signed with validator's private key
* The service will drop the request if signature of the request cannot be
verified
* The service will verify the voting data
* The service will return a signed transaction (or signature for the
transaction)
The service could potentially have different variations, depending on the
hardware platform capabilities. For example, if the hardware supports a secure
enclave, the service can offload asymmetric key generation, and private key
protection to the enclave. A less secure implementation of the service could
simply carry the keypair in the process memory.
## Validator voting
A validator node, at startup, creates a new vote account and registers it with
the cluster. This is done by submitting a new "vote register" transaction. The
transaction contains validator's keypair, it's vote signing public key, and
some additional information. 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 on a voting event.
This vote is signed with validator's voting private key.
The validator code will change to interface with Signing service for "vote
register" and "new vote" use cases.
### Configuration
The validator node will be configured with Signing service's network endpoint
(IP/Port).
### Register
At startup, the validator will call Signing service using JSON RPC to register
itself. The RPC call will return the voting public key for the validator node.
The validator will create a new "vote register" transaction including this
public key in it, and submit it to the cluster.
### Collect votes for last period
The validator will look up the votes submitted by all the nodes in the cluster
for the last voting period. This information will be submitted to signing
service with new vote signing request.
### New Vote Signing
The validator will create a "new vote" transaction and send it to the signing
service using JSON RPC. The RPC request will also include the vote verification
data. On success, RPC call will return the signature for the vote. On failure,
RPC call will return the failure code.
## Challenges
1. The nodes are currently being configured with asymmetric keys that are
generated and stored in PKCS8 files.
2. The genesis block contains an entry that's signed with leader's private key.
This entry is used to identify the primordial leader.
3. Generation of verifiable data in untrusted space for PoH verification in the
enclave.
4. Need infrastructure for granting stake to an ephemeral key.

View File

@@ -1,121 +0,0 @@
# Entry Tree
This document proposes a change to ledger and window to support Solana's [fork
generation](fork-generation.md) behavior.
## Current Design
### Functionality of Window And Ledger
The basic responsibilities of the window and the ledger in a Solana fullnode
are:
1. Window: serve as a temporary, RAM-backed store of blobs of the PoH chain
for re-ordering and assembly into contiguous blocks to be sent to the bank
for verification.
2. Window: serve as a RAM-backed repair facility for other validator nodes,
which may query the network for as-yet unreceived blobs.
3. Ledger: provide disk-based storage of the PoH chain in case of node
restart.
4. Ledger: provide disk-backed repair facility for when the (smaller)
RAM-backed window doesn't cover the repair request.
The window is at the front of a validator node's processing pipeline, blobs are
received, cached, re-ordered before being deserialized into Entries, passed to
the bank for verification, and finally on to the ledger, which is at the back
of a validator node's pipeline.
The window holds blobs (the over-the-air format, serialized Entries,
one-per-blob). The ledger holds serialized Entries without any blob
information.
### Limitations
#### One-dimensional key space
The window and the ledger are indexed by ledger height, which is number of
Entries ever generated in the PoH chain until the current blob. This
limitation prevents the window and the ledger from storing the overlapping
histories possible in Solana's consensus protocol.
#### Limited caching
The window is a circular buffer. It cannot accept blobs that are farther in
the future than the window is currently working. If a blob arrives that is too
far ahead, it is dropped and will subsequently need to be repaired, incurring
further delay for the node.
#### Loss of blob signatures
Because the blob signatures are stripped before being stored by the ledger,
repair requests served from the ledger can't be verified to the original
leader.
#### Rollback and checkpoint, switching forks, separate functions
The window and the ledger can't handle replay of alternate forks. Once a Blob
has passed through the window, it's in the past. The replay stage of a
validator will need to roll back to a previous checkpoint and decode an
alternate set of Blobs to the Bank. The separated and one-way nature of window
and ledger makes this hard.
## New Design
A unified window and ledger allows a validator to record every blob it observes
on the network, in any order, as long as the blob is consistent with the
network's leader schedule.
Blobs are moved to a fork-able key space the tuple of `leader slot` + `blob
index` (within the slot). This permits the skip-list structure of the Solana
protocol to be stored in its entirety, without a-priori choosing which fork to
follow, which Entries to persist or when to persist them.
Repair requests for recent blobs are served out of RAM or recent files and out
of deeper storage for less recent blobs, as implemented by the store backing
EntryTree.
### Functionalities of EntryTree
1. Persistence: the EntryTree lives in the front of the nodes verification
pipeline, right behind network receive and signature verification. If the
blob received is consistent with the leader schedule (i.e. was signed by the
leader for the indicated slot), it is immediately stored.
2. Repair: repair is the same as window repair above, but able to serve any
blob that's been received. EntryTree stores blobs with signatures,
preserving the chain of origination.
3. Forks: EntryTree supports random access of blobs, so can support a
validator's need to rollback and replay from a Bank checkpoint.
4. Restart: with proper pruning/culling, the EntryTree 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 EntryTree.
### Interfacing with Bank
The bank exposes to replay stage:
1. prev_id: which PoH chain it's working on as indicated by the id 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_ids: 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 EntryTree 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 EntryTree
Once EntryTree 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 EntryTree 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

@@ -1,102 +0,0 @@
# Fork Generation
The chapter describes how forks naturally occur as a consequence of [leader
rotation](leader-rotation.md).
## Overview
Nodes take turns being leader and generating the PoH that encodes state
changes. The cluster can tolerate loss of connection to any leader by
synthesizing what the leader ***would*** have generated had it been connected
but not ingesting any state changes. The possible number of forks is thereby
limited to a "there/not-there" skip list of forks that may arise on leader
rotation slot boundaries. At any given slot, only a single leader's
transactions will be accepted.
## Message Flow
1. Transactions are ingested by the current leader.
2. Leader filters valid transactions.
3. Leader executes valid transactions updating its state.
4. Leader packages transactions into entries based off its current PoH slot.
5. Leader transmits the entries to validator nodes (in signed blobs)
1. The PoH stream includes ticks; empty entries that indicate liveness of
the leader and the passage of time on the cluster.
2. A leader's stream begins with the tick entries necessary complete the PoH
back to the leaders most recently observed prior leader slot.
6. Validators retransmit entries to peers in their set and to further
downstream nodes.
7. Validators validate the transactions and execute them on their state.
8. Validators compute the hash of the state.
9. At specific times, i.e. specific PoH tick counts, validators transmit votes
to the leader.
1. Votes are signatures of the hash of the computed state at that PoH tick
count
2. Votes are also propagated via gossip
10. Leader executes the votes as any other transaction and broadcasts them to
the cluster.
11. Validators observe their votes and all the votes from the cluster.
## Partitions, Forks
Forks can arise at PoH tick counts that correspond to a vote. The next leader
may not have observed the last vote slot and may start their slot with
generated virtual PoH entries. These empty ticks are generated by all nodes in
the cluster at a cluster-configured rate for hashes/per/tick `Z`.
There are only two possible versions of the PoH during a voting slot: PoH with
`T` ticks and entries generated by the current leader, or PoH with just ticks.
The "just ticks" version of the PoH can be thought of as a virtual ledger, one
that all nodes in the cluster can derive from the last tick in the previous
slot.
Validators can ignore forks at other points (e.g. from the wrong leader), or
slash the leader responsible for the fork.
Validators vote based on a greedy choice to maximize their reward described in
[forks selection](fork-selection.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 slot, 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.
<img alt="Fork generation" src="img/fork-generation.svg" class="center"/>
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

@@ -1,155 +0,0 @@
# Fork Selection
This article describes Solana's *Nakomoto Fork Selection* algorithm based on time
locks. It satisfies the following properties:
* A voter can eventually recover from voting on a fork that doesn't become the
fork with the desired network finality.
* If the voters share a common ancestor then they will converge to a fork
containing that ancestor no matter how they are partitioned. The converged
ancestor may not be the latest possible ancestor at the start of the fork.
* Rollback requires exponentially more time for older votes than for newer
votes.
* Voters have the freedom to set a minimum network confirmation threshold
before committing a vote to a higher lockout. This allows each voter to make
a trade-off between risk and reward. See [cost of rollback](#cost-of-rollback).
## Time
For networks like Solana, time can be the PoH hash count, which is a VDF that
provides a source of time before consensus. Other networks adopting this
approach would need to consider a global source of time.
For Solana, time uniquely identifies a specific leader for fork generation. At
any given time only 1 leader, which can be computed from the ledger itself, can
propose a fork. For more details, see [fork generation](fork-generation.md)
and [leader rotation](leader-rotation.md).
## Algorithm
The basic idea to this approach is to stack consensus votes. Each vote in the
stack is a confirmation of a fork. Each confirmed fork is an ancestor of the
fork above it. Each consensus vote has a `lockout` in units of time before the
validator can submit a vote that does not contain the confirmed fork as an
ancestor.
When a vote is added to the stack, the lockouts of all the previous votes in
the stack are doubled (more on this in [Rollback](#Rollback)). With each new
vote, a voter commits the previous votes to an ever-increasing lockout. At 32
votes we can consider the vote to be at `max lockout` any votes with a lockout
equal to or above `1<<32` are dequeued (FIFO). Dequeuing a vote is the trigger
for a reward. If a vote expires before it is dequeued, it and all the votes
above it are popped (LIFO) from the vote stack. The voter needs to start
rebuilding the stack from that point.
### Rollback
Before a vote is pushed to the stack, all the votes leading up to vote with a
lower lock time than the new vote are popped. After rollback lockouts are not
doubled until the voter catches up to the rollback height of votes.
For example, a vote stack with the following state:
| vote | vote time | lockout | lock expiration time |
|-----:|----------:|--------:|---------------------:|
| 4 | 4 | 2 | 6 |
| 3 | 3 | 4 | 7 |
| 2 | 2 | 8 | 10 |
| 1 | 1 | 16 | 17 |
*Vote 5* is at time 9, and the resulting state is
| vote | vote time | lockout | lock expiration time |
|-----:|----------:|--------:|---------------------:|
| 5 | 9 | 2 | 11 |
| 2 | 2 | 8 | 10 |
| 1 | 1 | 16 | 17 |
*Vote 6* is at time 10
| vote | vote time | lockout | lock expiration time |
|-----:|----------:|--------:|---------------------:|
| 6 | 10 | 2 | 12 |
| 5 | 9 | 4 | 13 |
| 2 | 2 | 8 | 10 |
| 1 | 1 | 16 | 17 |
At time 10 the new votes caught up to the previous votes. But *vote 2* expires
at 10, so the when *vote 7* at time 11 is applied the votes including and above
*vote 2* will be popped.
| vote | vote time | lockout | lock expiration time |
|-----:|----------:|--------:|---------------------:|
| 7 | 11 | 2 | 13 |
| 1 | 1 | 16 | 17 |
The lockout for vote 1 will not increase from 16 until the stack contains 5
votes.
### Slashing and Rewards
The purpose of the lockout is to force a voter to commit opportunity cost to a
specific fork. Voters that violate the lockouts and vote for a diverging fork
within the lockout should be punished. Slashing or simply freezing the voter
from rewards for a long period of time can be used as punishment.
Voters should be rewarded for selecting the fork that the rest of the network
selected as often as possible. This is well-aligned with generating a reward
when the vote stack is full and the oldest vote needs to be dequeued. Thus a
reward should be generated for each successful dequeue.
### Cost of Rollback
Cost of rollback of *fork A* is defined as the cost in terms of lockout time to
the validators to confirm any other fork that does not include *fork A* as an
ancestor.
The **Economic Finality** of *fork A* can be calculated as the loss of all the
rewards from rollback of *fork A* and its descendants, plus the opportunity
cost of reward due to the exponentially growing lockout of the votes that have
confirmed *fork A*.
### Thresholds
Each voter can independently set a threshold of network commitment to a fork
before that voter commits to a fork. For example, at vote stack index 7, the
lockout is 256 time units. A voter may withhold votes and let votes 0-7 expire
unless the vote at index 7 has at greater than 50% commitment in the network.
This allows each voter to independently control how much risk to commit to a
fork. Committing to forks at a higher frequency would allow the voter to earn
more rewards.
### Algorithm parameters
These parameters need to be tuned.
* Number of votes in the stack before dequeue occurs (32).
* Rate of growth for lockouts in the stack (2x).
* Starting default lockout (2).
* Threshold depth for minimum network commitment before committing to the fork
(8).
* Minimum network commitment size at threshold depth (50%+).
### Free Choice
A "Free Choice" is an unenforcible voter action. A voter that maximizes
self-reward over all possible futures should behave in such a way that the
system is stable, and the local greedy choice should result in a greedy choice
over all possible futures. A set of voter that are engaging in choices to
disrupt the protocol should be bound by their stake weight to the denial of
service. Two options exits for voter:
* a voter can outrun previous voters in virtual generation and submit a
concurrent fork
* a voter can withhold a vote to observe multiple forks before voting
In both cases, the voters in the network have several forks to pick from
concurrently, even though each fork represents a different height. In both
cases it is impossible for the protocol to detect if the voter behavior is
intentional or not.
### Greedy Choice for Concurrent Forks
When evaluating multiple forks, each voter should pick the fork that will
maximize economic finality for the network, or the latest fork if all are equal.

View File

@@ -1,29 +0,0 @@
# Anatomy of a Fullnode
<img alt="Fullnode block diagrams" src="img/fullnode.svg" class="center"/>
## Pipelining
The fullnodes make extensive use of an optimization common in CPU design,
called *pipelining*. Pipelining is the right tool for the job when there's a
stream of input data that needs to be processed by a sequence of steps, and
there's different hardware responsible for each. The quintessential example is
using a washer and dryer to wash/dry/fold several loads of laundry. Washing
must occur before drying and drying before folding, but each of the three
operations is performed by a separate unit. To maximize efficiency, one creates
a pipeline of *stages*. We'll call the washer one stage, the dryer another, and
the folding process a third. To run the pipeline, one adds a second load of
laundry to the washer just after the first load is added to the dryer.
Likewise, the third load is added to the washer after the second is in the
dryer and the first is being folded. In this way, one can make progress on
three loads of laundry simultaneously. Given infinite loads, the pipeline will
consistently complete a load at the rate of the slowest stage in the pipeline.
## Pipelining in the Fullnode
The fullnode contains two pipelined processes, one used in leader mode called
the TPU and one used in validator mode called the TVU. In both cases, the
hardware being pipelined is the same, the network input, the GPU cards, the CPU
cores, writes to disk, and the network output. What it does with that hardware
is different. The TPU exists to create ledger entries whereas the TVU exists
to validate them.

View File

@@ -1,254 +0,0 @@
# Getting Started
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
The network is initialized with a genesis ledger and fullnode configuration files.
These files can be generated by running the following script.
```bash
$ ./multinode-demo/setup.sh
```
### Drone
In order for the fullnodes and clients to work, we'll need to
spin up a drone to give out some test tokens. The drone delivers Milton
Friedman-style "air drops" (free tokens to requesting clients) to be used in
test transactions.
Start the drone with:
```bash
$ ./multinode-demo/drone.sh
```
### Singlenode Testnet
Before you start a fullnode, make sure you know the IP address of the machine you
want to be the bootstrap leader 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 leader in a separate shell:
```bash
$ ./multinode-demo/bootstrap-leader.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 drone if it doesn't have any.
The drone 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 full nodes in separate shells:
```bash
$ ./multinode-demo/fullnode-x.sh
```
To run a performance-enhanced full node on Linux,
[CUDA 10.0](https://developer.nvidia.com/cuda-downloads) must be installed on
your system:
```bash
$ ./fetch-perf-libs.sh
$ SOLANA_CUDA=1 ./multinode-demo/bootstrap-leader.sh
$ SOLANA_CUDA=1 ./multinode-demo/fullnode-x.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
$ ./multinode-demo/client.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-fullnode_:
```bash
$ sudo gdb
attach <PID>
set logging on
thread apply all bt
```
This will dump all the threads stack traces into gdb.txt
## 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
$ ./multinode-demo/client.sh --network $(dig +short testnet.solana.com):8001 --duration 60
```
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)
## Linux Snap
A Linux [Snap](https://snapcraft.io/) is available, which can be used to easily
get Solana running on supported Linux systems without building anything from
source for evaluation. Note that CUDA is not supported by the Snap so
performance will be limited.
The `edge` Snap channel is updated daily with the latest
development from the `master` branch. To install:
```bash
$ sudo snap install solana --edge --devmode
```
Once installed the usual Solana programs will be available as `solona.*` instead
of `solana-*`. For example, `solana.fullnode` instead of `solana-fullnode`.
Update to the latest version at any time with:
```bash
$ snap info solana
$ sudo snap refresh solana --devmode
```
### Daemon Support
The snap supports running fullnodes and a drone as system daemons.
Run `sudo snap get solana` to view the current daemon configuration. To view
daemon logs:
1. Run `sudo snap logs -n=all solana` to view the daemon initialization log
2. Runtime logging can be found under `/var/snap/solana/current/bootstrap-leader/`,
`/var/snap/solana/current/fullnode/`, or `/var/snap/solana/current/drone/` depending
on which `mode=` was selected. Within each log directory the file `current`
contains the latest log, and the files `*.s` (if present) contain older rotated
logs.
Disable the daemon at any time by running:
```bash
$ sudo snap set solana mode=
```
Runtime configuration files for the daemon can be found in
`/var/snap/solana/current/config`.
#### Leader Daemon
```bash
$ sudo snap set solana mode=bootstrap-leader
```
`rsync` must be configured and running on the leader.
1. Ensure rsync is installed with `sudo apt-get -y install rsync`
2. Edit `/etc/rsyncd.conf` to include the following
```ini
[config]
path = /var/snap/solana/current/config
hosts allow = *
read only = true
```
3. Run `sudo systemctl enable rsync; sudo systemctl start rsync`
4. Test by running `rsync -Pzravv rsync://<ip-address-of-leader>/config
solana-config` from another machine. **If the leader is running on a cloud
provider it may be necessary to configure the Firewall rules to permit ingress
to port tcp:873, tcp:9900 and the port range udp:8000-udp:10000**
To run both the Leader and Drone:
```bash
$ sudo snap set solana mode=bootstrap-leader+drone
```
#### Validator daemon
```bash
$ sudo snap set solana mode=fullnode
```
By default the node will attempt to connect to **testnet.solana.com**, override the
cluster entrypoint IP address by running:
```bash
$ sudo snap set solana mode=fullnode entrypoint-ip=127.0.0.1 #<-- change IP address
```
It's assumed that the node at the entrypoint IP will be running `rsync`
configured as described in the previous **Leader daemon** section.

View File

@@ -1,79 +0,0 @@
# Gossip Service
The Gossip Service acts as a gateway to nodes in the control plane. Fullnodes
use the service to ensure information is available to all other nodes in a cluster.
The service broadcasts information using a gossip protocol.
## Gossip Overview
Nodes continuously share signed data objects among themselves in order to
manage a cluster. For example, they share their contact information, ledger
height, and votes.
Every tenth of a second, each node sends a "push" message and/or a "pull"
message. Push and pull messages may elicit responses, and push messages may be
forwarded on to others in the cluster.
Gossip runs on a well-known UDP/IP port or a port in a well-known range. Once
a cluster is bootstrapped, nodes advertise to each other where to find their
gossip endpoint (a socket address).
## Gossip Records
Records shared over gossip are arbitrary, but signed and versioned (with a
timestamp) as needed to make sense to the node receiving them. If a node
recieves two records from the same source, it it updates its own copy with the
record with the most recent timestamp.
## Gossip Service Interface
### Push Message
A node sends a push message to tells the cluster it has information to share.
Nodes send push messages to `PUSH_FANOUT` push peers.
Upon receiving a push message, a node examines the message for:
1. Duplication: if the message has been seen before, the node responds with
`PushMessagePrune` and drops the message
2. New data: if the message is new to the node
* Stores the new information with an updated version in its cluster info and
purges any previous older value
* Stores the message in `pushed_once` (used for detecting duplicates,
purged after `PUSH_MSG_TIMEOUT * 5` ms)
* Retransmits the messages to its own push peers
3. Expiration: nodes drop push messages that are older than `PUSH_MSG_TIMEOUT`
### Push Peers, Prune Message
A nodes selects its push peers at random from the active set of known peers.
The node keeps this selection for a relatively long time. When a prune message
is received, the node drops the push peer that sent the prune. Prune is an
indication that there is another, faster path to that node than direct push.
The set of push peers is kept fresh by rotating a new node into the set every
`PUSH_MSG_TIMEOUT/2` milliseconds.
### Pull Message
A node sends a pull message to ask the cluster if there is any new information.
A pull message is sent to a single peer at random and comprises a Bloom filter
that represents things it already has. A node receiving a pull message
iterates over its values and constructs a pull response of things that miss the
filter and would fit in a message.
A node constructs the pull Bloom filter by iterating over current values and
recently purged values.
A node handles items in a pull response the same way it handles new data in a
push message.
## Purging
Nodes retain prior versions of values (those updated by a pull or push) and
expired values (those older than `GOSSIP_PULL_CRDS_TIMEOUT_MS`) in
`purged_values` (things I recently had). Nodes purge `purged_values` that are
older than `5 * GOSSIP_PULL_CRDS_TIMEOUT_MS`.

View File

@@ -1,117 +0,0 @@
# What is Solana?
Solana is the name of an open source project that is implementing a new
high-performance, permissionless blockchain. Solana is also the name of a
company headquartered in San Francisco that maintains the open source project.
# About this Book
This book describes the Solana open source project, a blockchain built from the
ground up for scale. The book covers why to use it, how to use it, how it
works, and why it will continue to work long after the company Solana closes
its doors. The goal of the Solana architecture is to demonstrate there exists a
set of software algorithms that when used in combination to implement a
blockchain, removes software as a performance bottleneck, allowing transaction
throughput to scale proportionally with network bandwidth. The architecture
goes on to satisfy all three desirable properties of a proper blockchain: that
it not only be scalable, but that it is also secure and decentralized.
The architecture describes a theoretical upper bound of 710 thousand
transactions per second (tps) on a standard gigabit network and 28.4 million
tps on 40 gigabit. Furthermore, the architecture supports safe, concurrent
execution of programs authored in general purpose programming languages such as
C or Rust.
# Disclaimer
All claims, content, designs, algorithms, estimates, roadmaps, specifications,
and performance measurements described in this project are done with the
author's best effort. It is up to the reader to check and validate their
accuracy and truthfulness. Furthermore, nothing in this project constitutes a
solicitation for investment.
# History of the Solana Codebase
In November of 2017 Anatoly Yakovenko published a whitepaper describing Proof
of History, a technique for keeping time between computers that do not trust
one another. From Anatoly's previous experience designing distributed systems
at Qualcomm, Mesosphere and Dropbox, he knew that a reliable clock makes
network synchronization very simple. When synchronization is simple the
resulting network can be blazing fast, bound only by network bandwidth.
Anatoly watched as blockchain systems without clocks, such as Bitcoin and
Ethereum, struggled to scale beyond 15 transactions per second worldwide when
centralized payment systems such as Visa required peaks of 65,000. Without a
clock, it was clear they'd never graduate to being the global payment system or
global supercomputer they had dreamed to be. When Anatoly solved the problem of
getting computers that dont trust each other to agree on time, he knew he had
the key to bring 40 years of distributed systems research to the world of
blockchain. The resulting cluster wouldn't be just 10 times faster, or a 100
times, or a 1,000 times, but 10,000 times faster right out of the gate!
Anatoly's implementation began in a private codebase and was implemented in the
C programming language. Greg Fitzgerald, who had previously worked with Anatoly
at semiconductor giant Qualcomm Incorporated, encouraged him to reimplement the
project in the Rust programming language. Greg had worked on the LLVM compiler
infrastructure, which underlies both the Clang C/C++ compiler as well as the
Rust compiler. Greg claimed that the language's safety guarantees would improve
software productivity and that its lack of a garbage collector would allow
programs to perform as well as those written in C. Anatoly gave it a shot and
just two weeks later, had migrated his entire codebase to Rust. Sold. With
plans to weave all the world's transactions together on a single, scalable
blockchain, Anatoly called the project Loom.
On February 13th of 2018, Greg began prototyping the first open source
implementation of Anatoly's whitepaper. The project was published to GitHub
under the name Silk in the loomprotocol organization. On February 28th, Greg
made his first release, demonstrating 10 thousand signed transactions could be
verified and processed in just over half a second. Shortly after, another
former Qualcomm cohort, Stephen Akridge, demonstrated throughput could be
massively improved by offloading signature verification to graphics processors.
Anatoly recruited Greg, Stephen and three others to co-found a company, then
called Loom.
Around the same time, Ethereum-based project Loom Network sprung up and many
people were confused if they were the same project. The Loom team decided it
would rebrand. They chose the name Solana, a nod to a small beach town North of
San Diego called Solana Beach, where Anatoly, Greg and Stephen lived and surfed
for three years when they worked for Qualcomm. On March 28th, the team created
the Solana Labs GitHub organization and renamed Greg's prototype Silk to
Solana.
In June of 2018, the team scaled up the technology to run on cloud-based
networks and on July 19th, published a 50-node, permissioned, public testnet
consistently supporting bursts of 250,000 transactions per second. In the most
recent release, v0.10 Pillbox, the team published a permissioned testnet
running 150 nodes on a gigabit network and demonstrated soak tests processing
an *average* of 200 thousand transactions per second with bursts over 500
thousand. The project was also extended to support on-chain programs written in
the C programming language and run concurrently in a safe execution environment
called BPF. Next step: going permissionless.
# What is a Solana Cluster?
A cluster is a set of computers that work together and can be viewed from the
outside as a single system. A Solana cluster is a set of independently owned
computers working together (and sometimes against each other) to verify the
output of untrusted, user-submitted programs. A Solana cluster can be utilized
any time a user wants to preserve an immutable record of events in time or
programmatic interpretations of those events. One use is to track which of the
computers did meaningful work to keep the cluster running. Another use might be
to track the possession of real-world assets. In each case, the cluster
produces a record of events called the ledger. It will be preserved for the
lifetime of the cluster. As long as someone somewhere in the world maintains a
copy of the ledger, the output of its programs (which may contain a record of
who possesses what) will forever be reproducible, independent of the
organization that launched it.
# What are Sols?
A sol is the name of Solana's native token, which can be passed to nodes in a
Solana cluster in exchange for running an on-chain program or validating its
output. The Solana protocol defines that only 1 billion sols will ever exist,
but that the system may perform micropayments of fractional sols and that a sol
may be split as many as 34 times. The fractional sol is called a *lamport*. It
is named in honor of Solana's biggest technical influence, [Leslie
Lamport](https://en.wikipedia.org/wiki/Leslie_Lamport). A lamport has a value
of approximately 0.0000000000582 sol (2^-34).

View File

@@ -1,361 +0,0 @@
JSON RPC API
===
Solana nodes accept HTTP requests using the [JSON-RPC 2.0](https://www.jsonrpc.org/specification) specification.
To interact with a Solana node inside a JavaScript application, use the [solana-web3.js](https://github.com/solana-labs/solana-web3.js) library, which gives a convenient interface for the RPC methods.
RPC HTTP Endpoint
---
**Default port:** 8899
eg. http://localhost:8899, http://192.168.1.88:8899
RPC PubSub WebSocket Endpoint
---
**Default port:** 8900
eg. ws://localhost:8900, http://192.168.1.88:8900
Methods
---
* [confirmTransaction](#confirmtransaction)
* [getAccountInfo](#getaccountinfo)
* [getBalance](#getbalance)
* [getConfirmationTime](#getconfirmationTime)
* [getLastId](#getlastid)
* [getSignatureStatus](#getsignaturestatus)
* [getTransactionCount](#gettransactioncount)
* [requestAirdrop](#requestairdrop)
* [sendTransaction](#sendtransaction)
* [startSubscriptionChannel](#startsubscriptionchannel)
* [Subscription Websocket](#subscription-websocket)
* [accountSubscribe](#accountsubscribe)
* [accountUnsubscribe](#accountunsubscribe)
* [signatureSubscribe](#signaturesubscribe)
* [signatureUnsubscribe](#signatureunsubscribe)
Request Formatting
---
To make a JSON-RPC request, send an HTTP POST request with a `Content-Type: application/json` header. The JSON request data should contain 4 fields:
* `jsonrpc`, set to `"2.0"`
* `id`, a unique client-generated identifying integer
* `method`, a string containing the method to be invoked
* `params`, a JSON array of ordered parameter values
Example using curl:
```bash
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getBalance", "params":["83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri"]}' 192.168.1.88:8899
```
The response output will be a JSON object with the following fields:
* `jsonrpc`, matching the request specification
* `id`, matching the request identifier
* `result`, requested data or success confirmation
Requests can be sent in batches by sending an array of JSON-RPC request objects as the data for a single POST.
Definitions
---
* Hash: A SHA-256 hash of a chunk of data.
* Pubkey: The public key of a Ed25519 key-pair.
* Signature: An Ed25519 signature of a chunk of data.
* Transaction: A Solana instruction signed by a client key-pair.
JSON RPC API Reference
---
### confirmTransaction
Returns a transaction receipt
##### Parameters:
* `string` - Signature of Transaction to confirm, as base-58 encoded string
##### Results:
* `boolean` - Transaction status, true if Transaction is confirmed
##### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"confirmTransaction", "params":["5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"]}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":true,"id":1}
```
---
### getBalance
Returns the balance of the account of provided Pubkey
##### Parameters:
* `string` - Pubkey of account to query, as base-58 encoded string
##### Results:
* `integer` - quantity, as a signed 64-bit integer
##### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getBalance", "params":["83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri"]}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":0,"id":1}
```
---
### getAccountInfo
Returns all information associated with the account of provided Pubkey
##### Parameters:
* `string` - Pubkey of account to query, as base-58 encoded string
##### Results:
The result field will be a JSON object with the following sub fields:
* `tokens`, number of tokens assigned to this account, as a signed 64-bit integer
* `owner`, array of 32 bytes representing the program this account has been assigned to
* `userdata`, array of bytes representing any userdata associated with the account
* `executable`, boolean indicating if the account contains a program (and is strictly read-only)
* `loader`, array of 32 bytes representing the loader for this program (if `executable`), otherwise all
##### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getAccountInfo", "params":["2gVkYWexTHR5Hb2aLeQN3tnngvWzisFKXDUPrgMHpdST"]}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":{"executable":false,"loader":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"owner":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"tokens":1,"userdata":[3,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,50,48,53,48,45,48,49,45,48,49,84,48,48,58,48,48,58,48,48,90,252,10,7,28,246,140,88,177,98,82,10,227,89,81,18,30,194,101,199,16,11,73,133,20,246,62,114,39,20,113,189,32,50,0,0,0,0,0,0,0,247,15,36,102,167,83,225,42,133,127,82,34,36,224,207,130,109,230,224,188,163,33,213,13,5,117,211,251,65,159,197,51,0,0,0,0,0,0]},"id":1}
```
---
### getLastId
Returns the last entry ID from the ledger
##### Parameters:
None
##### Results:
* `string` - the ID of last entry, a Hash as base-58 encoded string
##### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getLastId"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":"GH7ome3EiwEr7tu9JuTh2dpYWBJK3z69Xm1ZE3MEE6JC","id":1}
```
---
### getSignatureStatus
Returns the status of a given signature. This method is similar to
[confirmTransaction](#confirmtransaction) but provides more resolution for error
events.
##### Parameters:
* `string` - Signature of Transaction to confirm, as base-58 encoded string
##### Results:
* `string` - Transaction status:
* `Confirmed` - Transaction was successful
* `SignatureNotFound` - Unknown transaction
* `ProgramRuntimeError` - An error occurred in the program that processed this Transaction
* `AccountInUse` - Another Transaction had a write lock one of the Accounts specified in this Transaction. The Transaction may succeed if retried
* `GenericFailure` - Some other error occurred. **Note**: In the future new Transaction statuses may be added to this list. It's safe to assume that all new statuses will be more specific error conditions that previously presented as `GenericFailure`
##### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getSignatureStatus", "params":["5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"]}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":"SignatureNotFound","id":1}
```
---
### getTransactionCount
Returns the current Transaction count from the ledger
##### Parameters:
None
##### Results:
* `integer` - count, as unsigned 64-bit integer
##### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getTransactionCount"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":268,"id":1}
```
---
### getConfirmationTime
Returns the current cluster confirmation time in milliseconds
##### Parameters:
None
##### Results:
* `integer` - confirmation time in milliseconds, as unsigned 64-bit integer
##### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getConfirmationTime"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":500,"id":1}
```
---
### requestAirdrop
Requests an airdrop of tokens to a Pubkey
##### Parameters:
* `string` - Pubkey of account to receive tokens, as base-58 encoded string
* `integer` - token quantity, as a signed 64-bit integer
##### Results:
* `string` - Transaction Signature of airdrop, as base-58 encoded string
##### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"requestAirdrop", "params":["83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri", 50]}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":"5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW","id":1}
```
---
### sendTransaction
Creates new transaction
##### Parameters:
* `array` - array of octets containing a fully-signed Transaction
##### Results:
* `string` - Transaction Signature, as base-58 encoded string
##### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"sendTransaction", "params":[[61, 98, 55, 49, 15, 187, 41, 215, 176, 49, 234, 229, 228, 77, 129, 221, 239, 88, 145, 227, 81, 158, 223, 123, 14, 229, 235, 247, 191, 115, 199, 71, 121, 17, 32, 67, 63, 209, 239, 160, 161, 2, 94, 105, 48, 159, 235, 235, 93, 98, 172, 97, 63, 197, 160, 164, 192, 20, 92, 111, 57, 145, 251, 6, 40, 240, 124, 194, 149, 155, 16, 138, 31, 113, 119, 101, 212, 128, 103, 78, 191, 80, 182, 234, 216, 21, 121, 243, 35, 100, 122, 68, 47, 57, 13, 39, 0, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 40, 240, 124, 194, 149, 155, 16, 138, 31, 113, 119, 101, 212, 128, 103, 78, 191, 80, 182, 234, 216, 21, 121, 243, 35, 100, 122, 68, 47, 57, 11, 12, 106, 49, 74, 226, 201, 16, 161, 192, 28, 84, 124, 97, 190, 201, 171, 186, 6, 18, 70, 142, 89, 185, 176, 154, 115, 61, 26, 163, 77, 1, 88, 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":"2EBVM6cB8vAAD93Ktr6Vd8p67XPbQzCJX47MpReuiCXJAtcjaxpvWpcg9Ege1Nr5Tk3a2GFrByT7WPBjdsTycY9b","id":1}
```
---
### Subscription Websocket
After connect to the RPC PubSub websocket at `ws://<ADDRESS>/`:
- Submit subscription requests to the websocket using the methods below
- Multiple subscriptions may be active at once
---
### accountSubscribe
Subscribe to an account to receive notifications when the userdata for a given account public key changes
##### Parameters:
* `string` - account Pubkey, as base-58 encoded string
##### Results:
* `integer` - Subscription id (needed to unsubscribe)
##### Example:
```bash
// Request
{"jsonrpc":"2.0", "id":1, "method":"accountSubscribe", "params":["CM78CPUeXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNH12"]}
// Result
{"jsonrpc": "2.0","result": 0,"id": 1}
```
##### Notification Format:
```bash
{"jsonrpc": "2.0","method": "accountNotification", "params": {"result": {"executable":false,"loader":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"owner":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"tokens":1,"userdata":[3,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,50,48,53,48,45,48,49,45,48,49,84,48,48,58,48,48,58,48,48,90,252,10,7,28,246,140,88,177,98,82,10,227,89,81,18,30,194,101,199,16,11,73,133,20,246,62,114,39,20,113,189,32,50,0,0,0,0,0,0,0,247,15,36,102,167,83,225,42,133,127,82,34,36,224,207,130,109,230,224,188,163,33,213,13,5,117,211,251,65,159,197,51,0,0,0,0,0,0]},"subscription":0}}
```
---
### accountUnsubscribe
Unsubscribe from account userdata change notifications
##### Parameters:
* `integer` - id of account Subscription to cancel
##### Results:
* `bool` - unsubscribe success message
##### Example:
```bash
// Request
{"jsonrpc":"2.0", "id":1, "method":"accountUnsubscribe", "params":[0]}
// Result
{"jsonrpc": "2.0","result": true,"id": 1}
```
---
### signatureSubscribe
Subscribe to a transaction signature to receive notification when the transaction is confirmed
On `signatureNotification`, the subscription is automatically cancelled
##### Parameters:
* `string` - Transaction Signature, as base-58 encoded string
##### Results:
* `integer` - subscription id (needed to unsubscribe)
##### Example:
```bash
// Request
{"jsonrpc":"2.0", "id":1, "method":"signatureSubscribe", "params":["2EBVM6cB8vAAD93Ktr6Vd8p67XPbQzCJX47MpReuiCXJAtcjaxpvWpcg9Ege1Nr5Tk3a2GFrByT7WPBjdsTycY9b"]}
// Result
{"jsonrpc": "2.0","result": 0,"id": 1}
```
##### Notification Format:
```bash
{"jsonrpc": "2.0","method": "signatureNotification", "params": {"result": "Confirmed","subscription":0}}
```
---
### signatureUnsubscribe
Unsubscribe from account userdata change notifications
##### Parameters:
* `integer` - id of account subscription to cancel
##### Results:
* `bool` - unsubscribe success message
##### Example:
```bash
// Request
{"jsonrpc":"2.0", "id":1, "method":"signatureUnsubscribe", "params":[0]}
// Result
{"jsonrpc": "2.0","result": true,"id": 1}
```

View File

@@ -1,52 +0,0 @@
# Leader Rotation
At any given moment, a cluster expects only one fullnode to produce ledger
entries. By having only one leader at a time, all validators are able to replay
identical copies of the ledger. The drawback of only one leader at a time,
however, is that a malicious leader is cabable 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 malcioius
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.
## Leader Schedule Generation
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.
The seed that is selected is predictable but unbiasable. There is no grinding
attack to influence its outcome. The active set, however, can be biased by a
leader by censoring validator votes. To reduce the likelihood of censorship,
the active set is sampled many slots in advance, such that votes will have been
collected by multiple leaders. If even one node is honest, the malicious
leaders will not be able to use censorship to influence the leader schedule.
## 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

@@ -1,266 +0,0 @@
# 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 full nodes that have
to store the full data set this protocol proposes a way for mining nodes to
provide storage capacity for pieces of the network.
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 its hashed. The simple solution is to force
the hash to be done on the reverse of the encryption, or perhaps with a random
order. This ensures that all the data is present during the generation of the
proof and it also requires the validator 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`
## Terminology
#### replicator
Storage mining client, stores some part of the ledger enumerated in blocks and
submits storage proofs to the chain. Not a full-node.
#### ledger segment
Portion of the ledger which is downloaded by the replicator where storage proof
data is derived.
#### CBC block
Smallest encrypted chunk of ledger, an encrypted ledger segment would be made of
many CBC blocks. `ledger_segment_size / cbc_block_size` to be exact.
#### storage proof
A set of sha hash state which is constructed by sampling the encrypted version
of the stored ledger segment at certain offsets.
#### fake storage proof
A proof which has the same format as a storage proof, but the sha state is
actually from hashing a known ledger value which the storage client can reveal
and is also easily verifiable by the network on-chain.
#### storage proof confirmation
A transaction by a validator which indicates the set of real and fake proofs
submitted by a storage miner. The transaction would contain a list of proof
hash values and a bit which says if this hash is valid or fake.
#### storage proof challenge
A transaction from a replicator that verifiably proves that a validator
confirmed a fake proof.
#### storage proof claim
A transaction from a validator which is after the timeout period given from the
storage proof confirmation and which no successful challenges have been
observed which rewards the parties of the storage proofs and confirmations.
#### storage validation capacity
The number of keys and samples that a validator can verify each storage epoch.
## 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 of 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.
They have some stake that they have put up as collateral that ensures that
their work is honest. If you can prove that a validator verified a fake PoRep,
then the validators stake can be slashed.
Replicators are specialized *light clients*. They download a part of the ledger
and store it, and provide PoReps of storing the ledger. For each verified PoRep
replicators earn a reward of sol from the mining pool.
## Constraints
We have the following constraints:
* Verification requires generating the CBC blocks. That requires space of 2
blocks per identity, and 1 CUDA core per identity for the same dataset. So as
many identities at once should be batched with as many proofs for those
identities verified concurrently for the same dataset.
* Validators will randomly sample the set of storage proofs to the set that
they can handle, and only the creators of those chosen proofs will be
rewarded. The validator can run a benchmark whenever its hardware configuration
changes to determine what rate it can validate storage proofs.
## Validation and Replication Protocol
### Constants
1. NUM\_STORAGE\_ENTRIES: Number of entries in a segment of ledger data. The
unit of storage for a replicator.
2. NUM\_KEY\_ROTATION\_TICKS: Number of ticks to save a PoH value and cause a
key generation for the section of ledger just generated and the rotation of
another key in the set.
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.
### Validator behavior
1. Validator joins the network and submits a storage validation capacity
transaction which tells the network how many proofs it can process in a given
period defined by NUM\_KEY\_ROTATION\_TICKS.
2. Every NUM\_KEY\_ROTATION\_TICKS the validator stores the PoH value at that
height.
3. Every NUM\_KEY\_ROTATION\_TICKS it also validates samples received from
replicators. It signs the PoH hash at that point and uses the following
algorithm with the signature as the input:
- The low 5 bits of the first byte of the signature creates an index into
another starting byte of the signature.
- The validator then looks at the set of storage proofs where the byte of
the proof's sha state vector starting from the low byte matches exactly
with the chosen byte(s) of the signature.
- If the set of proofs is larger than the validator can handle, then it
increases to matching 2 bytes in the signature.
- Validator continues to increase the number of matching bytes until a
workable set is found.
- It then creates a mask of valid proofs and fake proofs and sends it to
the leader. This is a storage proof confirmation transaction.
4. The storage proof confirmation transaction is integrated into the ledger.
5. After a lockout period of NUM\_SECONDS\_STORAGE\_LOCKOUT seconds, the
validator then submits a storage proof claim transaction which then causes the
distribution of the storage reward if no challenges were seen for the proof to
the validators and replicators party to the proofs.
6. Validator responds to RPC interfaces for what the last storage epoch PoH
value is and its entry\_height.
### Replicator behavior
1. Since a replicator is somewhat of a light client and not downloading all the
ledger data, they have to rely on other full nodes (validators) for
information. Any given validator may or may not be malicious and give incorrect
information, although there are not any obvious attack vectors that this could
accomplish besides having the replicator do extra wasted work. For many of the
operations there are number of options depending on how paranoid a replicator
is:
- (a) replicator can ask a validator
- (b) replicator can ask multiple validators
- (c) replicator can subscribe to the full transaction stream and generate
the information itself
- (d) replicator can subscribe to an abbreviated transaction stream to
generate the information itself
2. A replicator obtains the PoH hash corresponding to the last key rotation
along with its entry\_height.
3. The replicator signs the PoH hash with its keypair. That signature is the
seed used to pick the segment to replicate and also the encryption key. The
replicator mods the signature with the entry\_height to get which segment to
replicate.
4. The replicator retrives the ledger by asking peer validators and
replicators. See 6.5.
5. The replicator then encrypts that segment with the key with chacha algorithm
in CBC mode with NUM\_CHACHA\_ROUNDS of encryption.
6. The replicator initializes a chacha rng with the signature from step 2 as
the seed.
7. The replicator generates NUM\_STORAGE\_SAMPLES samples in the range of the
entry size and samples the encrypted segment with sha256 for 32-bytes at each
offset value. Sampling the state should be faster than generating the encrypted
segment.
8. The replicator sends a PoRep proof transaction which contains its sha state
at the end of the sampling operation, its seed and the samples it used to the
current leader and it is put onto the ledger.
9. The replicator then generates another set of offsets which it submits a fake
proof with an incorrect sha state. It can be proven to be fake by providing the
seed for the hash result.
- A fake proof should consist of a replicator hash of a signature of a PoH
value. That way when the replicator reveals the fake proof, it can be
verified on chain.
10. The replicator monitors the ledger, if it sees a fake proof integrated, it
creates a challenge transaction and submits it to the current leader. The
transacation proves the validator incorrectly validated a fake storage proof.
The replicator is rewarded and the validator's staking balance is slashed or
frozen.
### Finding who has a given block of ledger
1. Validators monitor the transaction stream for storage mining proofs, and
keep a mapping of ledger segments by entry\_height to public keys. When it sees
a storage mining proof it updates this mapping and provides an RPC interface
which takes an entry\_height and hands back a list of public keys. The client
then looks up in their cluster\_info table to see which network address that
corresponds to and sends a repair request to retrieve the necessary blocks of
ledger.
2. Validators would need to prune this list which it could do by periodically
looking at the oldest entries in its mappings and doing a network query to see
if the storage host is still serving the first entry.
## Sybil attacks
For any random seed, we force everyone to use a signature that is derived from
a PoH hash. Everyone must use the same count, so the same PoH hash is signed by
every participant. The signatures are then each cryptographically tied to the
keypair, which prevents a leader from grinding on the resulting value for more
than 1 identity.
Since there are many more client identities then encryption identities, we need
to split the reward for multiple clients, and prevent Sybil attacks from
generating many clients to acquire the same block of data. To remain BFT we
want to avoid a single human entity from storing all the replications of a
single chunk of the ledger.
Our solution to this is to force the clients to continue using the same
identity. If the first round is used to acquire the same block for many client
identities, the second round for the same client identities will force a
redistribution of the signatures, and therefore PoRep identities and blocks.
Thus to get a reward for replicators need to store the first block for free and
the network can reward long lived client identities more than new ones.
## Validator attacks
- If a validator approves fake proofs, replicator can easily out them by
showing the initial state for the hash.
- If a validator marks real proofs as fake, no on-chain computation can be done
to distinguish who is correct. Rewards would have to rely on the results from
multiple validators in a stake-weighted fashion to catch bad actors and
replicators from being locked out of the network.
- Validator stealing mining proof results for itself. The proofs are derived
from a signature from a replicator, since the validator does not know the
private key used to generate the encryption key, it cannot be the generator of
the proof.
## Reward incentives
Fake proofs are easy to generate but difficult to verify. For this reason,
PoRep proof transactions generated by replicators may require a higher fee than
a normal transaction to represent the computational cost required by
validators.
Some percentage of fake proofs are also necessary to receive a reward from
storage mining.
## Notes
* We can reduce the costs of verification of PoRep by using PoH, and actually
make it feasible to verify a large number of proofs for a global dataset.
* We can eliminate grinding by forcing everyone to sign the same PoH hash and
use the signatures as the seed
* The game between validators and replicators is over random blocks and random
encryption identities and random data samples. The goal of randomization is
to prevent colluding groups from having overlap on data or validation.
* Replicator clients fish for lazy validators by submitting fake proofs that
they can prove are fake.
* To defend against Sybil client identities that try to store the same block we
force the clients to store for multiple rounds before receiving a reward.
* Validators should also get rewarded for validating submitted storage proofs
as incentive for storing the ledger. They can only validate proofs if they
are storing that slice of the ledger.

View File

@@ -1,67 +0,0 @@
# Programming Model
A client *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 move *tokens* from one *account* to another or create an interactive
contract that governs how tokens are moved. Instructions are executed
atomically. If any instruction is invalid, any changes made within the
transaction are discarded.
## Deploying Programs to a Cluster
<img alt="SDK tools" src="img/sdk-tools.svg" class="center"/>
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). Alternatively, a client might
choose to bypass LLVM and use Python, Lua or C++ to generate BPF directly via
the [BPF Compiler Collection](https://github.com/iovisor/bcc) (BCC).
## 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 fullnode 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. Once registered, transactions reference account keys to grant
programs access to accounts. The runtime grants programs read access by
default. To grant write access, the client must either assign the account to a
program or sign the transaction using the keypair's *secret key*. Since only
the holder of the secret key can produce valid signatures matching the
account's public key, the runtime recognizes the signature as authorization to
modify account data or debit the account.
After the runtime executes each of the transaction's instructions, it uses the
account metadata and transaction signatures 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.

View File

@@ -1,7 +0,0 @@
# Proposed Architectural Changes
The following architectural proposals have been accepted by the Solana team, but
are not yet fully implemented. The proposals may be implemented as described,
implemented differently as issues in the designs become evident, or not
implemented at all. If implemented, the descriptions will be moved from this
section to earlier chapters in a future version of this book.

View File

@@ -1,84 +0,0 @@
# The Runtime
The runtime is a concurrent transaction processor. Transactions specify their
data dependencies upfront and dynamic memory allocation is explicit. By
separating program code from the state it operates on, the runtime is able to
choreograph concurrent access. Transactions accessing only credit-only
accounts are executed in parallel whereas transactions accessing writable
accounts are serialized. The runtime interacts with the program through an
entrypoint with a well-defined interface. The userdata stored in an account is
an opaque type, an array of bytes. The program has full control over its
contents.
The transaction structure specifies a list of public keys and signatures for
those keys and a sequential list of instructions that will operate over the
states associated with the account keys. For the transaction to be committed
all the instructions must execute successfully; if any abort the whole
transaction fails to commit.
### Account Structure
Accounts maintain a token balance and program-specific memory.
# Transaction Engine
The engine maps public keys to accounts and routes them to the program's
entrypoint.
## Execution
Transactions are batched and processed in a pipeline
<img alt="Runtime pipeline" src="img/runtime.svg" class="center"/>
At the *execute* stage, the loaded pages have no data dependencies, so all the
programs can be executed in parallel.
The runtime enforces the following rules:
1. Only the *owner* program may modify the contents of an account. This means
that upon assignment userdata vector is guaranteed to be zero.
2. Total balances on all the accounts is equal before and after execution of a
transaction.
3. After the transaction is executed, balances of credit-only accounts must be
greater than or equal to the balances before the transaction.
4. All instructions in the transaction executed atomically. If one fails, all
account modifications are discarded.
Execution of the program involves mapping the program's public key to an
entrypoint which takes a pointer to the transaction, and an array of loaded
pages.
## SystemProgram Interface
The interface is best described by the `Instruction::userdata` that the user
encodes.
* `CreateAccount` - This allows the user to create and assign an account to a
Program.
* `Assign` - allows the user to assign an existing account to a program.
* `Move` - moves tokens between account's that are associated with
* `Spawn` - spawn a new program from an account
## Notes
1. There is no dynamic memory allocation. Client's need to use `CreateAccount`
instructions to create memory before passing it to another program. This
instruction can be composed into a single transaction with the call to the
program itself.
2. Runtime guarantees that when memory is assigned to the program it is zero
initialized.
3. Runtime guarantees that a program's code is the only thing that can modify
memory that its assigned to
4. Runtime guarantees that the program can only spend tokens that are in
accounts that are assigned to it
5. Runtime guarantees the balances belonging to accounts are balanced before
and after the transaction
6. Runtime guarantees that multiple instructions all executed successfully when
a transaction is committed.
# Future Work
* [Continuations and Signals for long running
Transactions](https://github.com/solana-labs/solana/issues/1485)

View File

@@ -1,168 +0,0 @@
# Staking Rewards
Initial Proof of Stake (PoS) (i.e. using in-protocol asset, SOL, to provide
secure consensus) design ideas outlined here. Solana will implement a proof of
stake reward/security scheme for node validators in the cluster. The purpose is
threefold:
- Align validator incentives with that of the greater cluster through
skin-in-the-game deposits at risk
- Avoid 'nothing at stake' fork voting issues by implementing slashing rules
aimed at promoting fork convergence
- Provide an avenue for validator rewards provided as a function of validator
participation in the cluster.
While many of the details of the specific implementation are currently under
consideration and are expected to come into focus through specific modeling
studies and parameter exploration on the Solana testnet, we outline here our
current thinking on the main components of the PoS system. Much of this
thinking is based on the current status of Casper FFG, with optimizations and
specific attributes to be modified as is allowed by Solana's Proof of History
(PoH) blockchain data structure.
### General Overview
Solana's ledger validation design is based on a rotating, stake-weighted
randomly selected leader broadcasting transactions in a PoH data
structure to validating nodes. These nodes, upon receiving the leader's
broadcast, have the opportunity to vote on the current state and PoH height by
signing a transaction into the PoH stream.
To become a Solana validator, a fullnode must deposit/lock-up some amount
of SOL in a contract. This SOL will not be accessible for a specific time
period. The precise duration of the staking lockup period has not been
determined. However we can consider three phases of this time for which
specific parameters will be necessary:
- *Warm-up period*: which SOL is deposited and inaccessible to the node,
however PoH transaction validation has not begun. Most likely on the order of
days to weeks
- *Validation period*: a minimum duration for which the deposited SOL will be
inaccessible, at risk of slashing (see slashing rules below) and earning
rewards for the validator participation. Likely duration of months to a
year.
- *Cool-down period*: a duration of time following the submission of a
'withdrawal' transaction. During this period validation responsibilities have
been removed and the funds continue to be inaccessible. Accumulated rewards
should be delivered at the end of this period, along with the return of the
initial deposit.
Solana's trustless sense of time and ordering provided by its PoH data
structure, along with its
[avalanche](https://www.youtube.com/watch?v=qt_gDRXHrHQ&t=1s) data broadcast
and transmission design, should provide subsecond confirmation times that scale
with the log of the number of nodes in the cluster. This means we shouldn't
have to restrict the number of validating nodes with a prohibitive 'minimum
deposits' and expect nodes to be able to become validators with nominal amounts
of SOL staked. This should also render validation pools, a proposed solution
for economic censorship imposed by minimum staking amounts currently described
in Casper, unnecessary and remove the concern for needing to put slashable
stake at risk while relying on others to play by the rules.
### Stake-weighted Rewards
Rewards are expected to be paid out to active validators as a function of
validator activity and as a proportion of the percentage of SOL they have at
stake out of the entirety of the staking pool.
We expect to define a baseline annual validator payout/inflation rate based on
the total SOL deposited. E.g. 10% annual interest on SOL deposited with X total
SOL deposited as slashable on the cluster. This is the same design as currently
proposed in Casper FFG which has additionally specifies how inflation rates
adjust as a function of total ETH deposited. Specifically, Casper validator
returns are proportional to the inverse square root of the total deposits and
initial annual rates are estimated as:
| Deposit Size | Annual Validator Interest |
|-------------:|--------------------------:|
| 2.5M ETH | 10.12% |
| 10M ETH | 5.00% |
| 20M ETH | 3.52% |
| 40M ETH | 2.48% |
This has the nice property of potentially incentivizing participation around a
target deposit size. Incentivisation of specific participation rates more
directly (rather than deposit size) may something also worth exploring.
The specifics of the Solana validator reward scheme are to be worked out in
parallel with a design for transaction fee assignment as well as our storage
mining reward scheme.
### Slashing rules
Unlike Proof of Work (PoW) where off-chain capital expenses are already
deployed at the time of block construction/voting, PoS systems require
capital-at-risk to prevent a logical/optimal strategy of multiple chain voting.
We intend to implement slashing rules which, if broken, result some amount of
the offending validator's deposited stake to be removed from circulation. Given
the ordering properties of the PoH data structure, we believe we can simplify
our slashing rules to the level of a voting lockout time assigned per vote.
I.e. Each vote has an associated lockout time (PoH duration) that represents a
duration by any additional vote from that validator must be in a PoH that
contains the original vote, or a portion of that validator's stake is
slashable. This duration time is a function of the initial vote PoH count and
all additional vote PoH counts. It will likely take the form:
Lockout<sub>i</sub>(PoH<sub>i</sub>, PoH<sub>j</sub>) = PoH<sub>j</sub> + K *
exp((PoH<sub>j</sub> - PoH<sub>i</sub>) / K)
Where PoH<sub>i</sub> is the height of the vote that the lockout is to be
applied to and PoH<sub>j</sub> is the height of the current vote on the same
fork. If the validator submits a vote on a different PoH fork on any
PoH<sub>k</sub> where k > j > i and PoH<sub>k</sub> < Lockout(PoH<sub>i</sub>,
PoH<sub>j</sub>), then a portion of that validator's stake is at risk of being
slashed.
In addition to the functional form lockout described above, early
implementation may be a numerical approximation based on a First In, First Out
(FIFO) data structure and the following logic:
- FIFO queue holding 32 votes per active validator
- new votes are pushed on top of queue (`push_front`)
- expired votes are popped off top (`pop_front`)
- as votes are pushed into the queue, the lockout of each queued vote doubles
- votes are removed from back of queue if `queue.len() > 32`
- the earliest and latest height that has been removed from the back of the
queue should be stored
It is likely that a reward will be offered as a % of the slashed amount to any
node that submits proof of this slashing condition being violated to the PoH.
#### Partial Slashing
In the schema described so far, when a validator votes on a given PoH stream,
they are committing themselves to that fork for a time determined by the vote
lockout. An open question is whether validators will be hesitant to begin
voting on an available fork if the penalties are perceived too harsh for an
honest mistake or flipped bit.
One way to address this concern would be a partial slashing design that results
in a slashable amount as a function of either:
1. the fraction of validators, out of the total validator pool, that were also
slashed during the same time period (ala Casper)
2. the amount of time since the vote was cast (e.g. a linearly increasing % of
total deposited as slashable amount over time), or both.
This is an area currently under exploration
### Penalties
As previously discussed, annual validator reward rates are to be specified as a
function of total amount staked. The cluster rewards validators who are online
and actively participating in the validation process throughout the entirety of
their *validation period*. For validators that go offline/fail to validate
transactions during this period, their annual reward is effectively reduced.
Similarly, we may consider an algorithmic reduction in a validator's active
amount staked amount in the case that they are offline. I.e. if a validator is
inactive for some amount of time, either due to a partition or otherwise, the
amount of their stake that is considered active (eligible to earn rewards)
may be reduced. This design would be structured to help long-lived partitions
to eventually reach finality on their respective chains as the % of non-voting
total stake is reduced over time until a super-majority can be achieved by the
active validators in each partition. Similarly, upon re-engaging, the active
amount staked will come back online at some defined rate. Different rates of
stake reduction may be considered depending on the size of the partition/active
set.

View File

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

@@ -1,259 +0,0 @@
# Terminology
The following terms are used throughout this book.
#### account
A persistent file addressed by [public key](#public-key) and with
[lamports](#lamport) tracking its lifetime.
#### app
A front-end application that interacts with a Solana cluster.
#### blob
A fraction of a [block](#block); the smallest unit sent between
[fullnodes](#fullnode).
#### block
A contiguous set of [entries](#entry) on the ledger covered by a
[vote](#ledger-vote). The duration of a block is some cluster-configured
number of [ticks](#tick). Also called [voting period](#voting-period).
#### block height
The number of [blocks](#block) beneath the current block plus one. The [genesis
block](#genesis-block), for example, has block height 1.
#### bootstrap leader
The first [fullnode](#fullnode) to take the [leader](#leader) role.
#### client
A [node](#node) that utilizes the [cluster](#cluster).
#### cluster
A set of [fullnodes](#fullnode) maintaining a single [ledger](#ledger).
#### confirmation
The wallclock duration between a [leader](#leader) creating a [tick
entry](#tick) and recognizing a supermajority of [ledger votes](#ledger-vote)
with a ledger interpretation that matches the leader's.
#### control plane
A gossip network connecting all [nodes](#node) of a [cluster](#cluster).
#### data plane
A multicast network used to efficiently validate [entries](#entry) and gain
consensus.
#### drone
An off-chain service that acts as a custodian for a user's private key. It
typically serves to validate and sign transactions.
#### entry
An entry on the [ledger](#ledger) either a [tick](#tick) or a [transactions
entry](#transactions-entry).
#### epoch
The time, i.e. number of [slots](#slot), for which a [leader
schedule](#leader-schedule) is valid.
#### fork
A [ledger](#ledger) derived from common entries but then diverged.
#### fullnode
A full participant in the [cluster](#cluster) either a [leader](#leader) or
[validator](#validator) node.
#### fullnode state
The result of interpreting all programs on the ledger a given [tick
height](#tick-height). It includes at least the set of all [accounts](#account)
holding nonzero [native tokens](#native-tokens).
#### genesis block
The first [block](#block) of the [ledger](#ledger).
#### hash
A digital fingerprint of a sequence of bytes.
#### instruction
The smallest unit of a [program](#program) that a [client](#client) can include
in a [transaction](#instruction).
#### keypair
A [public key](#public-key) and coesponding [secret key](#secret-key).
#### lamport
A fractional [native token](#native-token) with the value of approximately
0.0000000000582 [sol](#sol) (2^-34).
#### loader
A [program](#program) with the ability to interpret the binary encoding of
other on-chain programs.
#### leader
The role of a [fullnode](#fullnode) when it is appending [entries](#entry) to
the [ledger](#ledger).
#### leader schedule
A sequence of [fullnode](#fullnode) [public keys](#public-key). The cluster
uses the leader schedule to determine which fullnode is the [leader](#leader)
at any moment in time.
#### ledger
A list of [entries](#entry) containing [transactions](#transaction) signed by
[clients](#client).
#### ledger vote
A [hash](#hash) of the [fullnode's state](#fullnode-state) at a given [tick
height](#tick-height). It comprises a validator's affirmation that a
[block](#block) it has received has been verified, as well as a promise not to
vote for a conflicting [block](#block) (i.e. [fork](#fork)) for a specific
amount of time, the [lockout](#lockout) period.
#### light client
A type of [client](#client) that can verify it's pointing to a valid
[cluster](#cluster). It performs more ledger verification than a [thin
client](#thin-client) and less than a [fullnode](#fullnode).
#### lockout
The duration of time for which a [fullnode](#fullnode) is unable to
[vote](#ledger-vote) on another [fork](#fork).
#### native token
The [token](#token) used to track work done by [nodes](#node) in a cluster.
#### node
A computer particpating in a [cluster](#cluster).
#### node count
The number of [fullnodes](#fullnode) participating in a [cluster](#cluster).
#### PoH
See [Proof of History](#proof-of-history).
#### program
The code that interprets [instructions](#instruction).
#### program ID
The public key of the [account](#account) containing a [program](#program).
#### Proof of History
A stack of proofs, each which proves that some data existed before the proof
was created and that a precise duration of time passed before the previous
proof. Like a [VDF](#verifiable-delay-function), a Proof of History can be
verified in less time than it took to produce.
#### public key
The public key of a [keypair](#keypair).
#### runtime
The component of a [fullnode](#fullnode) responsible for [program](#program)
execution.
#### secret key
The private key of a [keypair](#keypair).
#### slot
The time (i.e. number of [blocks](#block)) for which a [leader](#leader)
ingests transactions and produces [entries](#entry).
#### sol
The [native token](#native-token) tracked by a [cluster](#cluster) recognized
by the company Solana.
#### stake
Tokens forfeit to the [cluster](#cluster) if malicious [fullnode](#fullnode)
behavior can be proven.
#### thin client
A type of [client](#client) that trusts it is communicating with a valid
[cluster](#cluster).
#### tick
A ledger [entry](#entry) that estimates wallclock duration.
#### tick height
The Nth [tick](#tick) in the [ledger](#ledger).
#### token
A scarce, fungible member of a set of tokens.
#### tps
[Transactions](#transaction) per second.
#### transaction
One or more [instructions](#instruction) signed by the [client](#client) and
executed atomically.
#### transactions entry
A set of [transactions](#transaction) that may be executed in parallel.
#### validator
The role of a [fullnode](#fullnode) when it is validating the
[leader's](#leader) latest [entries](#entry).
#### VDF
See [verifiable delay function](#verifiable-delay-function).
#### verifiable delay function
A function that takes a fixed amount of time to execute that produces a proof
that it ran, which can then be verified in less time than it took to produce.
#### vote
See [ledger vote](#ledger-vote).
#### voting period
The duration of a [block](#block).

View File

@@ -1,35 +0,0 @@
# Example app: 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:
```sh
$ 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 tokens to users
You may have noticed you interacted with the Solana cluster without first
needing to aquire tokens 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 transation authorizes 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 tokens 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 tokens.

View File

@@ -1,3 +0,0 @@
# The Transaction Processing Unit
<img alt="TPU Block Diagram" src="img/tpu.svg" class="center"/>

View File

@@ -1,3 +0,0 @@
# The Transaction Validation Unit
<img alt="TVU Block Diagram" src="img/tvu.svg" class="center"/>

View File

@@ -1,353 +0,0 @@
## solana-wallet CLI
The [solana crate](https://crates.io/crates/solana) is distributed with a command-line interface tool
### Examples
#### Get Pubkey
```sh
// Command
$ solana-wallet address
// Return
<PUBKEY>
```
#### Airdrop Tokens
```sh
// Command
$ solana-wallet airdrop 123
// Return
"Your balance is: 123"
```
#### Get Balance
```sh
// Command
$ solana-wallet balance
// Return
"Your balance is: 123"
```
#### Confirm Transaction
```sh
// Command
$ solana-wallet confirm <TX_SIGNATURE>
// Return
"Confirmed" / "Not found"
```
#### Deploy program
```sh
// Command
$ solana-wallet deploy <PATH>
// Return
<PROGRAM_ID>
```
#### Unconditional Immediate Transfer
```sh
// Command
$ solana-wallet pay <PUBKEY> 123
// Return
<TX_SIGNATURE>
```
#### Post-Dated Transfer
```sh
// Command
$ solana-wallet pay <PUBKEY> 123 \
--after 2018-12-24T23:59:00 --require-timestamp-from <PUBKEY>
// Return
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
```
*`require-timestamp-from` is optional. If not provided, the transaction will expect a timestamp signed by this wallet's secret key*
#### Authorized Transfer
A third party must send a signature to unlock the tokens.
```sh
// Command
$ solana-wallet pay <PUBKEY> 123 \
--require-signature-from <PUBKEY>
// Return
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
```
#### Post-Dated and Authorized Transfer
```sh
// Command
$ solana-wallet 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-wallet pay <PUBKEY> 123 \
--require-signature-from <PUBKEY> \
--require-signature-from <PUBKEY>
// Return
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
```
#### Cancelable Transfer
```sh
// Command
$ solana-wallet pay <PUBKEY> 123 \
--require-signature-from <PUBKEY> \
--cancelable
// Return
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
```
#### Cancel Transfer
```sh
// Command
$ solana-wallet cancel <PROCESS_ID>
// Return
<TX_SIGNATURE>
```
#### Send Signature
```sh
// Command
$ solana-wallet send-signature <PUBKEY> <PROCESS_ID>
// Return
<TX_SIGNATURE>
```
#### Indicate Elapsed Time
Use the current system time:
```sh
// Command
$ solana-wallet send-timestamp <PUBKEY> <PROCESS_ID>
// Return
<TX_SIGNATURE>
```
Or specify some other arbitrary timestamp:
```sh
// Command
$ solana-wallet send-timestamp <PUBKEY> <PROCESS_ID> --date 2018-12-24T23:59:00
// Return
<TX_SIGNATURE>
```
### Usage
```manpage
solana-wallet 0.11.0
USAGE:
solana-wallet [OPTIONS] [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-k, --keypair <PATH> /path/to/id.json
-n, --network <HOST:PORT> Rendezvous with the network at this gossip entry point; defaults to 127.0.0.1:8001
--proxy <URL> Address of TLS proxy
--port <NUM> Optional rpc-port configuration to connect to non-default nodes
--timeout <SECS> Max seconds to wait to get necessary gossip from the network
SUBCOMMANDS:
address Get your public key
airdrop Request a batch of tokens
balance Get your balance
cancel Cancel a transfer
confirm Confirm transaction by signature
deploy Deploy a program
get-transaction-count Get current transaction count
help Prints this message or the help of the given subcommand(s)
pay Send a payment
send-signature Send a signature to authorize a transfer
send-timestamp Send a timestamp to unlock a transfer
```
```manpage
solana-wallet-address
Get your public key
USAGE:
solana-wallet address
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
```
```manpage
solana-wallet-airdrop
Request a batch of tokens
USAGE:
solana-wallet airdrop <NUM>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
ARGS:
<NUM> The number of tokens to request
```
```manpage
solana-wallet-balance
Get your balance
USAGE:
solana-wallet balance
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
```
```manpage
solana-wallet-cancel
Cancel a transfer
USAGE:
solana-wallet cancel <PROCESS_ID>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
ARGS:
<PROCESS_ID> The process id of the transfer to cancel
```
```manpage
solana-wallet-confirm
Confirm transaction by signature
USAGE:
solana-wallet confirm <SIGNATURE>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
ARGS:
<SIGNATURE> The transaction signature to confirm
```
```manpage
solana-wallet-deploy
Deploy a program
USAGE:
solana-wallet deploy <PATH>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
ARGS:
<PATH> /path/to/program.o
```
```manpage
solana-wallet-get-transaction-count
Get current transaction count
USAGE:
solana-wallet get-transaction-count
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
```
```manpage
solana-wallet-pay
Send a payment
USAGE:
solana-wallet pay [FLAGS] [OPTIONS] <PUBKEY> <NUM>
FLAGS:
--cancelable
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--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 tokens
ARGS:
<PUBKEY> The pubkey of recipient
<NUM> The number of tokens to send
```
```manpage
solana-wallet-send-signature
Send a signature to authorize a transfer
USAGE:
solana-wallet send-signature <PUBKEY> <PROCESS_ID>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
ARGS:
<PUBKEY> The pubkey of recipient
<PROCESS_ID> The process id of the transfer to authorize
```
```manpage
solana-wallet-send-timestamp
Send a timestamp to unlock a transfer
USAGE:
solana-wallet send-timestamp [OPTIONS] <PUBKEY> <PROCESS_ID>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--date <DATETIME> Optional arbitrary timestamp to apply
ARGS:
<PUBKEY> The pubkey of recipient
<PROCESS_ID> The process id of the transfer to unlock
```

View File

@@ -1,13 +0,0 @@
# Example app: Web Wallet
## Build and run a web wallet locally
First fetch the example code:
```sh
$ git clone https://github.com/solana-labs/example-webwallet.git
$ cd example-webwallet
```
Next, follow the steps in the git repository's
[README](https://github.com/solana-labs/example-webwallet/blob/master/README.md).

View File

@@ -1,46 +0,0 @@
use std::env;
use std::fs;
fn main() {
println!("cargo:rerun-if-changed=build.rs");
// Ensure target/perf-libs/ exists. It's been observed that
// a cargo:rerun-if-changed= directive with a non-existent
// directory triggers a rebuild on every |cargo build| invocation
fs::create_dir_all("target/perf-libs").unwrap_or_else(|err| {
if err.kind() != std::io::ErrorKind::AlreadyExists {
panic!("Unable to create target/perf-libs: {:?}", err);
}
});
let chacha = !env::var("CARGO_FEATURE_CHACHA").is_err();
let cuda = !env::var("CARGO_FEATURE_CUDA").is_err();
let erasure = !env::var("CARGO_FEATURE_ERASURE").is_err();
if chacha || cuda || erasure {
println!("cargo:rerun-if-changed=target/perf-libs");
println!("cargo:rustc-link-search=native=target/perf-libs");
}
if chacha {
println!("cargo:rerun-if-changed=target/perf-libs/libcpu-crypt.a");
}
if cuda {
let cuda_home = match env::var("CUDA_HOME") {
Ok(cuda_home) => cuda_home,
Err(_) => String::from("/usr/local/cuda"),
};
println!("cargo:rerun-if-changed=target/perf-libs/libcuda-crypt.a");
println!("cargo:rustc-link-lib=static=cuda-crypt");
println!("cargo:rustc-link-search=native={}/lib64", cuda_home);
println!("cargo:rustc-link-lib=dylib=cudart");
println!("cargo:rustc-link-lib=dylib=cuda");
println!("cargo:rustc-link-lib=dylib=cudadevrt");
}
if erasure {
println!("cargo:rerun-if-changed=target/perf-libs/libgf_complete.so");
println!("cargo:rerun-if-changed=target/perf-libs/libJerasure.so");
println!("cargo:rustc-link-lib=dylib=Jerasure");
println!("cargo:rustc-link-lib=dylib=gf_complete");
}
}

27
chacha-cuda/Cargo.toml Normal file
View File

@@ -0,0 +1,27 @@
[package]
name = "solana-chacha-cuda"
version = "1.0.22"
description = "Solana Chacha Cuda APIs"
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"
solana-archiver-utils = { path = "../archiver-utils", version = "1.0.22" }
solana-chacha = { path = "../chacha", version = "1.0.22" }
solana-ledger = { path = "../ledger", version = "1.0.22" }
solana-logger = { path = "../logger", version = "1.0.22" }
solana-perf = { path = "../perf", version = "1.0.22" }
solana-sdk = { path = "../sdk", version = "1.0.22" }
[dev-dependencies]
hex-literal = "0.2.1"
[lib]
name = "solana_chacha_cuda"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -0,0 +1,280 @@
// Module used by validators to approve storage mining proofs in parallel using the GPU
use solana_chacha::chacha::{CHACHA_BLOCK_SIZE, CHACHA_KEY_SIZE};
use solana_ledger::blockstore::Blockstore;
use solana_perf::perf_libs;
use solana_sdk::hash::Hash;
use std::io;
use std::mem::size_of;
use std::sync::Arc;
// Encrypt a file with multiple starting IV states, determined by ivecs.len()
//
// Then sample each block at the offsets provided by samples argument with sha256
// and return the vec of sha states
pub fn chacha_cbc_encrypt_file_many_keys(
blockstore: &Arc<Blockstore>,
segment: u64,
slots_per_segment: u64,
ivecs: &mut [u8],
samples: &[u64],
) -> io::Result<Vec<Hash>> {
let api = perf_libs::api().expect("no perf libs");
if ivecs.len() % CHACHA_BLOCK_SIZE != 0 {
return Err(io::Error::new(
io::ErrorKind::Other,
format!(
"bad IV length({}) not divisible by {} ",
ivecs.len(),
CHACHA_BLOCK_SIZE,
),
));
}
const BUFFER_SIZE: usize = 8 * 1024;
let mut buffer = [0; BUFFER_SIZE];
let num_keys = ivecs.len() / CHACHA_BLOCK_SIZE;
let mut sha_states = vec![0; num_keys * size_of::<Hash>()];
let mut int_sha_states = vec![0; num_keys * 112];
let keys: Vec<u8> = vec![0; num_keys * CHACHA_KEY_SIZE]; // keys not used ATM, uniqueness comes from IV
let mut current_slot = segment * slots_per_segment;
let mut start_index = 0;
let start_slot = current_slot;
let mut total_size = 0;
let mut time: f32 = 0.0;
unsafe {
(api.chacha_init_sha_state)(int_sha_states.as_mut_ptr(), num_keys as u32);
}
loop {
match blockstore.get_data_shreds(current_slot, start_index, std::u64::MAX, &mut buffer) {
Ok((last_index, mut size)) => {
debug!(
"chacha_cuda: encrypting segment: {} num_shreds: {} data_len: {}",
segment,
last_index.saturating_sub(start_index),
size
);
if size == 0 {
if current_slot.saturating_sub(start_slot) < slots_per_segment {
current_slot += 1;
start_index = 0;
continue;
} else {
break;
}
}
if size < BUFFER_SIZE {
// round to the nearest key_size boundary
size = (size + CHACHA_KEY_SIZE - 1) & !(CHACHA_KEY_SIZE - 1);
}
unsafe {
(api.chacha_cbc_encrypt_many_sample)(
buffer[..size].as_ptr(),
int_sha_states.as_mut_ptr(),
size,
keys.as_ptr(),
ivecs.as_mut_ptr(),
num_keys as u32,
samples.as_ptr(),
samples.len() as u32,
total_size,
&mut time,
);
}
total_size += size as u64;
start_index = last_index + 1;
}
Err(e) => {
info!("Error encrypting file: {:?}", e);
break;
}
}
}
unsafe {
(api.chacha_end_sha_state)(
int_sha_states.as_ptr(),
sha_states.as_mut_ptr(),
num_keys as u32,
);
}
let mut res = Vec::new();
for x in 0..num_keys {
let start = x * size_of::<Hash>();
let end = start + size_of::<Hash>();
res.push(Hash::new(&sha_states[start..end]));
}
Ok(res)
}
#[cfg(test)]
mod tests {
use super::*;
use solana_archiver_utils::sample_file;
use solana_chacha::chacha::chacha_cbc_encrypt_ledger;
use solana_ledger::entry::create_ticks;
use solana_ledger::get_tmp_ledger_path;
use solana_sdk::clock::DEFAULT_SLOTS_PER_SEGMENT;
use solana_sdk::signature::Keypair;
use std::fs::{remove_dir_all, remove_file};
use std::path::Path;
#[test]
fn test_encrypt_file_many_keys_single() {
solana_logger::setup();
if perf_libs::api().is_none() {
info!("perf-libs unavailable, skipped");
return;
}
let slots_per_segment = 32;
let entries = create_ticks(slots_per_segment, 0, Hash::default());
let ledger_path = get_tmp_ledger_path!();
let ticks_per_slot = 16;
let blockstore = Arc::new(Blockstore::open(&ledger_path).unwrap());
blockstore
.write_entries(
0,
0,
0,
ticks_per_slot,
Some(0),
true,
&Arc::new(Keypair::new()),
entries,
0,
)
.unwrap();
let out_path = Path::new("test_chacha_encrypt_file_many_keys_single_output.txt.enc");
let samples = [0];
let mut ivecs = hex!(
"abcd1234abcd1234abcd1234abcd1234 abcd1234abcd1234abcd1234abcd1234
abcd1234abcd1234abcd1234abcd1234 abcd1234abcd1234abcd1234abcd1234"
);
let mut cpu_iv = ivecs.clone();
chacha_cbc_encrypt_ledger(
&blockstore,
0,
slots_per_segment as u64,
out_path,
&mut cpu_iv,
)
.unwrap();
let ref_hash = sample_file(&out_path, &samples).unwrap();
let hashes = chacha_cbc_encrypt_file_many_keys(
&blockstore,
0,
slots_per_segment as u64,
&mut ivecs,
&samples,
)
.unwrap();
assert_eq!(hashes[0], ref_hash);
let _ignored = remove_dir_all(&ledger_path);
let _ignored = remove_file(out_path);
}
#[test]
fn test_encrypt_file_many_keys_multiple_keys() {
solana_logger::setup();
if perf_libs::api().is_none() {
info!("perf-libs unavailable, skipped");
return;
}
let ledger_path = get_tmp_ledger_path!();
let ticks_per_slot = 90;
let entries = create_ticks(2 * ticks_per_slot, 0, Hash::default());
let blockstore = Arc::new(Blockstore::open(&ledger_path).unwrap());
blockstore
.write_entries(
0,
0,
0,
ticks_per_slot,
Some(0),
true,
&Arc::new(Keypair::new()),
entries,
0,
)
.unwrap();
let out_path = Path::new("test_chacha_encrypt_file_many_keys_multiple_output.txt.enc");
let samples = [0, 1, 3, 4, 5, 150];
let mut ivecs = Vec::new();
let mut ref_hashes: Vec<Hash> = vec![];
for i in 0..2 {
let mut ivec = hex!(
"abc123abc123abc123abc123abc123abc123abababababababababababababab
abc123abc123abc123abc123abc123abc123abababababababababababababab"
);
ivec[0] = i;
ivecs.extend(ivec.clone().iter());
chacha_cbc_encrypt_ledger(
&blockstore.clone(),
0,
DEFAULT_SLOTS_PER_SEGMENT,
out_path,
&mut ivec,
)
.unwrap();
ref_hashes.push(sample_file(&out_path, &samples).unwrap());
info!(
"ivec: {:?} hash: {:?} ivecs: {:?}",
ivec.to_vec(),
ref_hashes.last(),
ivecs
);
}
let hashes = chacha_cbc_encrypt_file_many_keys(
&blockstore,
0,
DEFAULT_SLOTS_PER_SEGMENT,
&mut ivecs,
&samples,
)
.unwrap();
assert_eq!(hashes, ref_hashes);
let _ignored = remove_dir_all(&ledger_path);
let _ignored = remove_file(out_path);
}
#[test]
fn test_encrypt_file_many_keys_bad_key_length() {
solana_logger::setup();
if perf_libs::api().is_none() {
info!("perf-libs unavailable, skipped");
return;
}
let mut keys = hex!("abc123");
let ledger_path = get_tmp_ledger_path!();
let samples = [0];
let blockstore = Arc::new(Blockstore::open(&ledger_path).unwrap());
assert!(chacha_cbc_encrypt_file_many_keys(
&blockstore,
0,
DEFAULT_SLOTS_PER_SEGMENT,
&mut keys,
&samples,
)
.is_err());
}
}

8
chacha-cuda/src/lib.rs Normal file
View File

@@ -0,0 +1,8 @@
#[macro_use]
extern crate log;
#[cfg(test)]
#[macro_use]
extern crate hex_literal;
pub mod chacha_cuda;

2
chacha-sys/.gitignore vendored Normal file
View File

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

15
chacha-sys/Cargo.toml Normal file
View File

@@ -0,0 +1,15 @@
[package]
name = "solana-chacha-sys"
version = "1.0.22"
description = "Solana chacha-sys"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
homepage = "https://solana.com/"
license = "Apache-2.0"
edition = "2018"
[build-dependencies]
cc = "1.0.49"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

8
chacha-sys/build.rs Normal file
View File

@@ -0,0 +1,8 @@
extern crate cc;
fn main() {
cc::Build::new()
.file("cpu-crypt/chacha20_core.c")
.file("cpu-crypt/chacha_cbc.c")
.compile("libcpu-crypt");
}

1
chacha-sys/cpu-crypt/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
release/

View File

@@ -0,0 +1,25 @@
V:=debug
LIB:=cpu-crypt
CFLAGS_common:=-Wall -Werror -pedantic -fPIC
CFLAGS_release:=-march=native -O3 $(CFLAGS_common)
CFLAGS_debug:=-g $(CFLAGS_common)
CFLAGS:=$(CFLAGS_$V)
all: $V/lib$(LIB).a
$V/chacha20_core.o: chacha20_core.c chacha.h
@mkdir -p $(@D)
$(CC) $(CFLAGS) -c $< -o $@
$V/chacha_cbc.o: chacha_cbc.c chacha.h
@mkdir -p $(@D)
$(CC) $(CFLAGS) -c $< -o $@
$V/lib$(LIB).a: $V/chacha20_core.o $V/chacha_cbc.o
$(AR) rcs $@ $^
.PHONY:clean
clean:
rm -rf $V

View File

@@ -0,0 +1,35 @@
#ifndef HEADER_CHACHA_H
# define HEADER_CHACHA_H
#include <string.h>
#include <inttypes.h>
# include <stddef.h>
# ifdef __cplusplus
extern "C" {
# endif
typedef unsigned int u32;
#define CHACHA_KEY_SIZE 32
#define CHACHA_NONCE_SIZE 12
#define CHACHA_BLOCK_SIZE 64
#define CHACHA_ROUNDS 500
void chacha20_encrypt(const u32 input[16],
unsigned char output[64],
int num_rounds);
void chacha20_encrypt_ctr(const uint8_t *in, uint8_t *out, size_t in_len,
const uint8_t key[CHACHA_KEY_SIZE], const uint8_t nonce[CHACHA_NONCE_SIZE],
uint32_t counter);
void chacha20_cbc128_encrypt(const unsigned char* in, unsigned char* out,
uint32_t len, const uint8_t* key,
unsigned char* ivec);
# ifdef __cplusplus
}
# endif
#endif

View File

@@ -0,0 +1,102 @@
#include "chacha.h"
#define ROTL32(v, n) (((v) << (n)) | ((v) >> (32 - (n))))
#define ROTATE(v, c) ROTL32((v), (c))
#define XOR(v, w) ((v) ^ (w))
#define PLUS(x, y) ((x) + (y))
#define U32TO8_LITTLE(p, v) \
{ (p)[0] = ((v) ) & 0xff; (p)[1] = ((v) >> 8) & 0xff; \
(p)[2] = ((v) >> 16) & 0xff; (p)[3] = ((v) >> 24) & 0xff; }
#define U8TO32_LITTLE(p) \
(((u32)((p)[0]) ) | ((u32)((p)[1]) << 8) | \
((u32)((p)[2]) << 16) | ((u32)((p)[3]) << 24) )
#define QUARTERROUND(a,b,c,d) \
x[a] = PLUS(x[a],x[b]); x[d] = ROTATE(XOR(x[d],x[a]),16); \
x[c] = PLUS(x[c],x[d]); x[b] = ROTATE(XOR(x[b],x[c]),12); \
x[a] = PLUS(x[a],x[b]); x[d] = ROTATE(XOR(x[d],x[a]), 8); \
x[c] = PLUS(x[c],x[d]); x[b] = ROTATE(XOR(x[b],x[c]), 7);
// sigma contains the ChaCha constants, which happen to be an ASCII string.
static const uint8_t sigma[16] = { 'e', 'x', 'p', 'a', 'n', 'd', ' ', '3',
'2', '-', 'b', 'y', 't', 'e', ' ', 'k' };
void chacha20_encrypt(const u32 input[16],
unsigned char output[64],
int num_rounds)
{
u32 x[16];
int i;
memcpy(x, input, sizeof(u32) * 16);
for (i = num_rounds; i > 0; i -= 2) {
QUARTERROUND( 0, 4, 8,12)
QUARTERROUND( 1, 5, 9,13)
QUARTERROUND( 2, 6,10,14)
QUARTERROUND( 3, 7,11,15)
QUARTERROUND( 0, 5,10,15)
QUARTERROUND( 1, 6,11,12)
QUARTERROUND( 2, 7, 8,13)
QUARTERROUND( 3, 4, 9,14)
}
for (i = 0; i < 16; ++i) {
x[i] = PLUS(x[i], input[i]);
}
for (i = 0; i < 16; ++i) {
U32TO8_LITTLE(output + 4 * i, x[i]);
}
}
void chacha20_encrypt_ctr(const uint8_t *in, uint8_t *out, size_t in_len,
const uint8_t key[CHACHA_KEY_SIZE],
const uint8_t nonce[CHACHA_NONCE_SIZE],
uint32_t counter)
{
uint32_t input[16];
uint8_t buf[64];
size_t todo, i;
input[0] = U8TO32_LITTLE(sigma + 0);
input[1] = U8TO32_LITTLE(sigma + 4);
input[2] = U8TO32_LITTLE(sigma + 8);
input[3] = U8TO32_LITTLE(sigma + 12);
input[4] = U8TO32_LITTLE(key + 0);
input[5] = U8TO32_LITTLE(key + 4);
input[6] = U8TO32_LITTLE(key + 8);
input[7] = U8TO32_LITTLE(key + 12);
input[8] = U8TO32_LITTLE(key + 16);
input[9] = U8TO32_LITTLE(key + 20);
input[10] = U8TO32_LITTLE(key + 24);
input[11] = U8TO32_LITTLE(key + 28);
input[12] = counter;
input[13] = U8TO32_LITTLE(nonce + 0);
input[14] = U8TO32_LITTLE(nonce + 4);
input[15] = U8TO32_LITTLE(nonce + 8);
while (in_len > 0) {
todo = sizeof(buf);
if (in_len < todo) {
todo = in_len;
}
chacha20_encrypt(input, buf, 20);
for (i = 0; i < todo; i++) {
out[i] = in[i] ^ buf[i];
}
out += todo;
in += todo;
in_len -= todo;
input[12]++;
}
}

View File

@@ -0,0 +1,72 @@
#include "chacha.h"
#if !defined(STRICT_ALIGNMENT) && !defined(PEDANTIC)
# define STRICT_ALIGNMENT 0
#endif
void chacha20_cbc128_encrypt(const unsigned char* in, unsigned char* out,
uint32_t len, const uint8_t* key,
unsigned char* ivec)
{
size_t n;
unsigned char *iv = ivec;
(void)key;
if (len == 0) {
return;
}
#if !defined(OPENSSL_SMALL_FOOTPRINT)
if (STRICT_ALIGNMENT &&
((size_t)in | (size_t)out | (size_t)ivec) % sizeof(size_t) != 0) {
while (len >= CHACHA_BLOCK_SIZE) {
for (n = 0; n < CHACHA_BLOCK_SIZE; ++n) {
out[n] = in[n] ^ iv[n];
//printf("%x ", out[n]);
}
chacha20_encrypt((const u32*)out, out, CHACHA_ROUNDS);
iv = out;
len -= CHACHA_BLOCK_SIZE;
in += CHACHA_BLOCK_SIZE;
out += CHACHA_BLOCK_SIZE;
}
} else {
while (len >= CHACHA_BLOCK_SIZE) {
for (n = 0; n < CHACHA_BLOCK_SIZE; n += sizeof(size_t)) {
*(size_t *)(out + n) =
*(size_t *)(in + n) ^ *(size_t *)(iv + n);
//printf("%zu ", *(size_t *)(iv + n));
}
chacha20_encrypt((const u32*)out, out, CHACHA_ROUNDS);
iv = out;
len -= CHACHA_BLOCK_SIZE;
in += CHACHA_BLOCK_SIZE;
out += CHACHA_BLOCK_SIZE;
}
}
#endif
while (len) {
for (n = 0; n < CHACHA_BLOCK_SIZE && n < len; ++n) {
out[n] = in[n] ^ iv[n];
}
for (; n < CHACHA_BLOCK_SIZE; ++n) {
out[n] = iv[n];
}
chacha20_encrypt((const u32*)out, out, CHACHA_ROUNDS);
iv = out;
if (len <= CHACHA_BLOCK_SIZE) {
break;
}
len -= CHACHA_BLOCK_SIZE;
in += CHACHA_BLOCK_SIZE;
out += CHACHA_BLOCK_SIZE;
}
memcpy(ivec, iv, CHACHA_BLOCK_SIZE);
}
void chacha20_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t in_len,
const uint8_t key[CHACHA_KEY_SIZE], uint8_t* ivec)
{
chacha20_cbc128_encrypt(in, out, in_len, key, ivec);
}

21
chacha-sys/src/lib.rs Normal file
View File

@@ -0,0 +1,21 @@
extern "C" {
fn chacha20_cbc_encrypt(
input: *const u8,
output: *mut u8,
in_len: usize,
key: *const u8,
ivec: *mut u8,
);
}
pub fn chacha_cbc_encrypt(input: &[u8], output: &mut [u8], key: &[u8], ivec: &mut [u8]) {
unsafe {
chacha20_cbc_encrypt(
input.as_ptr(),
output.as_mut_ptr(),
input.len(),
key.as_ptr(),
ivec.as_mut_ptr(),
);
}
}

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