Commit Graph

173 Commits

Author SHA1 Message Date
Michael Vines
65b247a922 Bind to correct RPC addresses 2020-09-20 07:32:25 +00:00
Michael Vines
76dada3118 Use validator_config for RPC address instead of cluster_info for port verification checks 2020-09-20 02:34:20 +00:00
Michael Vines
1a03afccb1 validator/ cleanup 2020-09-19 08:35:26 -07:00
Ryo Onodera
cb8661bd49 Persistent tower (#10718)
* Save/restore Tower

* Avoid unwrap()

* Rebase cleanups

* Forcibly pass test

* Correct reconcilation of votes after validator resume

* d b g

* Add more tests

* fsync and fix test

* Add test

* Fix fmt

* Debug

* Fix tests...

* save

* Clarify error message and code cleaning around it

* Move most of code out of tower save hot codepath

* Proper comment for the lack of fsync on tower

* Clean up

* Clean up

* Simpler type alias

* Manage tower-restored ancestor slots without banks

* Add comment

* Extract long code blocks...

* Add comment

* Simplify returned tuple...

* Tweak too aggresive log

* Fix typo...

* Add test

* Update comment

* Improve test to require non-empty stray restored slots

* Measure tower save and dump all tower contents

* Log adjust and add threshold related assertions

* cleanup adjust

* Properly lower stray restored slots priority...

* Rust fmt

* Fix test....

* Clarify comments a bit and add TowerError::TooNew

* Further clean-up arround TowerError

* Truly create ancestors by excluding last vote slot

* Add comment for stray_restored_slots

* Add comment for stray_restored_slots

* Use BTreeSet

* Consider root_slot into post-replay adjustment

* Tweak logging

* Add test for stray_restored_ancestors

* Reorder some code

* Better names for unit tests

* Add frozen_abi to SavedTower

* Fold long lines

* Tweak stray ancestors and too old slot history

* Re-adjust error conditon of too old slot history

* Test normal ancestors is checked before stray ones

* Fix conflict, update tests, adjust behavior a bit

* Fix test

* Address review comments

* Last touch!

* Immediately after creating cleaning pr

* Revert stray slots

* Revert comment...

* Report error as metrics

* Revert not to panic! and ignore unfixable test...

* Normalize lockouts.root_slot more strictly

* Add comments for panic! and more assertions

* Proper initialize root without vote account

* Clarify code and comments based on review feedback

* Fix rebase

* Further simplify based on assured tower root

* Reorder code for more readability

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-09-19 14:03:54 +09:00
Michael Vines
98cfe92745 Rework snapshot download logic to be more forgiving when --expected-shred-version is not provided 2020-09-16 20:34:02 +00:00
Ryo Onodera
b85e8497b5 Really skip private rpc port reachable checks (#12239) 2020-09-15 16:36:15 +00:00
Michael Vines
daae638781 Add --gossip-validator argument 2020-09-14 20:18:27 -07:00
Michael Vines
63a67f415e Add --restricted-repair-only-mode flag 2020-09-14 20:18:27 -07:00
Michael Vines
bdf5274d18 Default snapshot compression is now included in --help output 2020-09-11 18:08:34 +00:00
Michael Vines
6f325d4594 solana-validator --rpc-bind-address argument now works as expected 2020-09-10 13:36:13 -07:00
Michael Vines
9ade73841f Default snapshot compression to zstd instead of bzip2 for quicker snapshot generation 2020-09-06 22:48:12 -07:00
Michael Vines
d8e2038dda Add --enable-bigtable-ledger-upload flag 2020-09-04 16:01:49 -07:00
sakridge
9b9d559312 Increase message_processor logging to error level (#11945) 2020-08-31 13:11:12 -07:00
Michael Vines
f8bb93a0f4 Bump RPC banks up 1 port to avoid web3.js wss port conflict 2020-08-31 06:34:15 +00:00
carllin
c8d67aa8eb Add option for repairing only from trusted validators (#11752)
Co-authored-by: Carl <carl@solana.com>
2020-08-21 00:35:11 -07:00
Michael Vines
ea88bbdc33 Do not delete any ledger when --limit-ledger-size is not provided 2020-08-20 16:15:27 +00:00
Greg Fitzgerald
bad486823c Add a client for BankForks (#10728)
Also:
* Use BanksClient in solana-tokens
2020-08-07 08:45:17 -06:00
Michael Vines
dfae9a9864 Plumb Bigtable ledger storage into the RPC subsystem 2020-08-05 14:27:12 -07:00
Michael Vines
1d40685b8e Remove support for 1.1.0 version snapshots 2020-08-04 01:01:50 +00:00
sakridge
b85538c532 Turn off gossip before downloading snapshot. (#11087) 2020-07-16 17:05:52 -07:00
sakridge
960f6f6f07 Decouple genesis fetch and snapshot fetch (#10931) 2020-07-06 16:09:12 -07:00
sakridge
58a475b789 Add db recovery methods (#10838) 2020-07-06 12:43:45 -07:00
sakridge
1ffad2d051 More guard rails for restart with ledger procedure (#10853)
* Add expected_bank_hash required for supermajority
* Print snapshot hash in ledger-tool create-snapshot.
2020-06-30 12:43:48 -07:00
Kristofer Peterson
6d81eede93 Add CLI options and runtime support for selection of output snapshot version. (#10536) 2020-06-19 14:38:37 +09:00
Greg Fitzgerald
6ee222363e Move BankForks to solana_runtime (#10637)
* Move BankForks to solana_runtime

* Update imports
2020-06-17 15:27:03 +00:00
sakridge
0de6c444d6 Simd poh (#10604)
* Simd poh

* Fix poh verify bench
2020-06-16 23:03:26 -07:00
Ryo Onodera
a39df7ee5d Fix udp port check retry and check all udp ports (#10385)
* Don't start if udp port is really closed

* Fully check all udp ports

* Remove test code.......

* Add tests and adjust impl a bit

* Add comment

* Move comment a bit

* Move a bit

* clean ups
2020-06-15 07:36:08 +09:00
Kristofer Peterson
e23340d89e Clippy cleanup for all targets and nighly rust (also support 1.44.0) (#10445)
* address warnings from 'rustup run beta cargo clippy --workspace'

minor refactoring in:
- cli/src/cli.rs
- cli/src/offline/blockhash_query.rs
- logger/src/lib.rs
- runtime/src/accounts_db.rs

expect some performance improvement AccountsDB::clean_accounts()

* address warnings from 'rustup run beta cargo clippy --workspace --tests'

* address warnings from 'rustup run nightly cargo clippy --workspace --all-targets'

* rustfmt

* fix warning stragglers

* properly fix clippy warnings test_vote_subscribe()
replace ref-to-arc with ref parameters where arc not cloned

* Remove lock around JsonRpcRequestProcessor (#10417)

automerge

* make ancestors parameter optional to avoid forcing construction of empty hash maps

Co-authored-by: Greg Fitzgerald <greg@solana.com>
2020-06-09 09:38:14 +09:00
Michael Vines
eb45aaa6c3 Added --health-check-slot-distance (#10324) 2020-05-29 15:31:52 -07:00
Michael Vines
f60b101920 Verify TPU and serve repair ports are reachable (#10291) 2020-05-28 08:41:06 -07:00
Michael Vines
269db1710e Retry a couple times before declaring a UDP port unreachable (#10181) 2020-05-22 14:33:01 -07:00
Jack May
eb1acaf927 Remove archiver and storage program (#9992)
automerge
2020-05-14 18:22:47 -07:00
Michael Vines
4e4a21f9b7 solana-gossip spy can now specify a shred version (#10040) 2020-05-13 19:37:40 -07:00
Michael Vines
a75086287c Use CommitmentConfig::root() when checking accounts, CommitmentConfig::max() may not be available yet (#9999)
automerge
2020-05-12 00:24:04 -07:00
Michael Vines
2521f75c18 Advertise node software version in gossip (#9981)
* Advertise node version in gossip

* Remove solana_clap_utils::version! macro
2020-05-11 15:02:01 -07:00
sakridge
f98bfda6f9 Security changes (#9923)
* Move test-only functions to test modules

* Remove sigverify disable

* Remove chacha CTR code
2020-05-08 10:00:23 -07:00
Ryo Onodera
a91236012d Pass around --max-genesis-archive-unpacked-size (#9161)
automerge
2020-04-29 18:53:34 -07:00
Michael Vines
50f1ec0374 Add support for log rotation, sending SIGUSR1 will cause the log file to be re-opened (#9713) 2020-04-24 14:26:53 -07:00
carllin
bab3502260 Push down cluster_info lock (#9594)
* Push down cluster_info lock

* Rework budget decrement

Co-authored-by: Carl <carl@solana.com>
2020-04-21 12:54:45 -07:00
sakridge
66abe45ea1 Decouple accounts hash calculation from snapshot hash (#9507) 2020-04-16 15:12:20 -07:00
Michael Vines
4ac15e68cf Default to RUST_BACKTRACE=1 for more informative validator logs 2020-04-15 22:37:22 -07:00
Michael Vines
83a96c557d Ensure --dynamic-port-range is wide enough 2020-04-14 12:21:05 -07:00
Michael Vines
37b048effb Improve address in use error message for RPC pubsub 2020-04-13 12:13:37 -07:00
sakridge
be77bdef12 Allow lower shred count (#9410) 2020-04-09 16:36:44 -07:00
sakridge
9493de4443 Add snapshot compression option (#9276) 2020-04-03 13:13:49 -07:00
sakridge
a61ddb6f61 max_ledger_slots -> max_ledger_shreds (#9198)
automerge
2020-03-31 17:21:19 -07:00
Michael Vines
0e2722c638 solana-validator now supports multiple --authorized-voter arguments (#9174)
* Use Epoch type

* Vote account's authorized voter is now supported without a validator restart
2020-03-31 08:23:42 -07:00
sakridge
73e99cc513 Ledger cleanup fixes (#9131)
* Fix purging happening every slot when cleanup service is not started at slot 0
* Purge by shred count instead of slots since slots can have variable
number of shreds
2020-03-30 19:02:12 -07:00
Ryo Onodera
f987c18a7e Strictly validate the contents of snapshot/genesis (#8959)
automerge
2020-03-25 02:46:41 -07:00
Tyera Eulberg
1b8f9e75dd Update getSignatureStatus: support multiple signatures, include slot in each response item (#9022)
* Rename enable-rpc-get-confirmed-block

* Rename RpcTransactionStatus -> RpcTransactionStatusMeta

* Return simplified RpcTransactionStatus; Add support for multiple transactions

* Update docs

* typo
2020-03-23 11:25:39 -06:00