Commit Graph

883 Commits

Author SHA1 Message Date
GHA: Update Upstream From Fork 27eff8408b Revert "Allow configuration of replay thread pools from CLI (#236)"
This reverts commit 973d05c098.
2024-03-22 15:58:10 -05:00
steviez 973d05c098 Allow configuration of replay thread pools from CLI (#236)
Bubble up the constants to the CLI that control the sizes of the
following two thread pools:
- The thread pool used to replay multiple forks in parallel
- The thread pool used to execute transactions in parallel
2024-03-20 16:29:43 -05:00
Trent Nelson 81c8ed73bc rpc-sts: add config options for stake-weighted qos (#197)
* rpc-sts: plumb options for swqos config

* rpc-sts: send to specific tpu peers when configured
2024-03-20 16:28:38 -05:00
steviez be38278281 Move default value for --rpc-pubsub-notification-threads to CLI (#158)
The default value was previously being determined down where the thread
pool is being created. Providing a default value at the CLI level is
consistent with other args, and gives an operator better visibility into
what the default will actually be
2024-03-15 22:24:45 -05:00
steviez 1ffdca5773 Make --wait-for-supermajority require --expected-shred-version (#192)
In cluster restart scenarios, an important step is scanning the
Blockstore for blocks that occur after the chosen restart slot with an
incorrect shred version. This check ensures that any blocks that
occurred pre-cluster restart and after the chosen restart slot get
deleted. If a node skips this step, the node can encounter problems when
that block is created again, after the cluster has restarted.

This check only occurs if --wait-for-supermajority AND
--expected-shred-version are set; however, --expected-... is currently
optional when using --wait-...

Our restart instructions typically mention that one should specify
--expected-... as well, but we should just enforce it at the CLI level
to prevent mistakes / wasted time debuggging.
2024-03-15 22:22:45 -05:00
steviez 365922d814 Move AccountsDb replication arguments to deprecated list (#157)
These arguments are not read by anything, and they appear to correspond
to a proposed feature that is no longer in the codebase.
2024-03-15 22:22:45 -05:00
Dmitri Makarov 264f4dfdd0 [SVM] Move RuntimeConfig to program-runtime (#96)
RuntimeConfig doesn't use anything SVM specific and logically belongs
in program runtime rather than SVM.  This change moves the definition
of RuntimeConfig struct from the SVM crate to program-runtime and
adjusts `use` statements accordingly.
2024-03-09 13:27:11 -06:00
steviez d0cb5e273a Name previously unnamed thread pool threads (#104)
Several rayon and tokio threadpools did not have names; give them names
to make tracking them in debug tools easier
2024-03-09 13:26:34 -06:00
steviez f944227dba Use tokio directly instead of jsonrpc_server_utils's re-export (#116) 2024-03-09 13:24:55 -06:00
Will Hickey df57657985 Revert "[anza migration] rename crates (#10)"
This reverts commit 3f9a7a52ea.
2024-03-05 10:18:50 -06:00
Yihau Chen 14cb9cff92 [anza migration] rename crates (#10)
* rename geyser-plugin-interface

* rename cargo registry

* rename watchtower

* rename ledger tool

* rename validator

* rename install

* rename geyser plugin interface when patch
2024-03-05 09:43:25 -06:00
Ryo Onodera 024d6ecc4f
Add --unified-scheduler-handler-threads (#35195)
* Add --unified-scheduler-handler-threads

* Adjust value name

* Warn if the flag was ignored

* Tweak message a bit
2024-02-22 09:05:17 +09:00
steviez 537c3d8e2c
Format the string literals in /validator directory (#35261)
There are lots of string literals in the /validator directory,
including many for CLI help and error messages. Any string literals
that exceed 100 characters prevent rustfmt from running properly.

This change temporarily set format_string = true in rustfmt.toml, and
then ran the linter on the validator directory. This was followed up
by manually tweaking several strings that were already well crafted
for readability (and within the 100 character limit)
2024-02-21 16:12:23 -06:00
steviez a1c39a3c22
List the default value for `--accounts` in CLI help (#35254) 2024-02-20 13:12:41 -06:00
Brooks e656e46b24
Makes help's default for `--accounts-index-path` consistent (#35255) 2024-02-20 18:32:06 +00:00
Pankaj Garg 46b9586630
SVM: Move SVM code to its own crate folder (#35119) 2024-02-06 16:06:32 -08:00
Kirill Fomichev adc9da5f12
cli: add transaction retry pool max size (#35080)
* cli: add transaction retry pool max size

* Update send-transaction-service/src/send_transaction_service.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* rename transaction_retry_pool_max_size

---------

Co-authored-by: Tyera <teulberg@gmail.com>
2024-02-06 01:31:14 -07:00
Tyera Eulberg f01f361f13 Revert "Add rpc support for partitioned rewards (#34773)"
This reverts commit 22500c23db.
2024-02-05 19:54:19 -07:00
Pankaj Garg 3cf5dd2afb
SVM: Move RuntimeConfig to svm folder (#35085) 2024-02-05 13:49:36 -08:00
Brooks daa2449ad4
Removes RwLock on AccountsDb::shrink_paths (#35027) 2024-02-01 09:35:34 -05:00
Tyera 22500c23db
Add rpc support for partitioned rewards (#34773)
* Check feature_set for enable_partitioned_epoch_reward

* Keep common variable outside if case

* Keep common early return out of if case, since the first_slot_in_epoch must exist for partiion PDA to exist

* Get and parse epoch partition data PDA

* Find partition index for all addresses

* Pull relevant blocks and get rewards

* Reuse ordering and reformatting

* Remove feature deactivation from TestValidator

* Restore rewards iteration in first block in epoch for feature case to catch Voting rewards

* Add fn get_reward_map helper to dedupe code

* No need to start 2nd get_block_with_limit call with first block again

* Replace filter_map to parameterize RewardType filter expression

* Weird thing to make clippy and compiler agree (https://github.com/rust-lang/rust-clippy/issues/8098)

* Use activated_slot to ensure the right approach for past rewards epochs
2024-01-25 13:39:06 -07:00
Brooks 8ff511e8fa
Moves create_and_canonicalize_directories() into accounts-db utils (#34882) 2024-01-23 06:46:27 -05:00
Brooks 2f744f1639
Moves create_all_accounts_run_and_snapshot_dirs() into accounts-db utils (#34877) 2024-01-22 18:18:43 -05:00
Brennan 3d7ee19348
Sample peers if input peer missing for repair shred (#34818) 2024-01-18 18:33:38 -08:00
Brennan 8fe4f5d0b9
Shred Repair Request (#34771)
* shred repair admin rpc
2024-01-17 14:19:32 -08:00
Tyera 166be2995e
Bigtable: update google proto files and allow configuration of max_message_size (#34740)
* Update proto files with tonic-build v0.9.2

* Manually ignore invalid doc-tests

* Add new ReadRowsRequest fields

* Add LedgerStorageConfig::max_message_size and default value

* Add BigtableConnection::max_message_size and use on client creation

* Add max_message_size to RpcBigtableConfig and make const pub

* Add solana-validator cli arg
2024-01-10 21:20:15 -07:00
Nick Frostbutter fc2a8794be
[docs] updated readme and fix links (#34565)
* feat: updated readme

* fix: updated links

* fix: proposal links

* fix: more links

* fix: json-rpc links

* fix: more links

* fix: zk links

* fix: managing forks

* fix: links for deprecated methods
2024-01-03 09:06:06 -05:00
Brooks d6146af02d
clippy: validator lints (#34631)
```
warning: in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
   --> validator/src/dashboard.rs:223:38
    |
223 |                       match async move {
    |  ______________________________________^
224 | |                         let rpc_addr = admin_client.rpc_addr().await?;
225 | |                         let start_time = admin_client.start_time().await?;
226 | |                         Ok::<_, jsonrpc_core_client::RpcError>((rpc_addr, start_time))
227 | |                     }
    | |_____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_conditions
    = note: `#[warn(clippy::blocks_in_conditions)]` on by default

warning: `solana-validator` (lib) generated 1 warning
```
2024-01-03 07:20:34 +00:00
Brooks f8c3e24e73
clippy: Removes ineffective open options (#34599)
```
error: unnecessary use of `.write(true)` because there is `.append(true)`
  --> logger/src/lib.rs:61:9
   |
61 |         .write(true)
   |         ^^^^^^^^^^^^ help: remove `.write(true)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ineffective_open_options
   = note: `-D clippy::ineffective-open-options` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::ineffective_open_options)]`
```
2023-12-27 22:20:17 -05:00
Andrew Fitzgerald 88b25854e6
Unhide --block-production-method (#34416) 2023-12-13 13:10:58 -08:00
ryleung-solana 132c910f81
Quic update identity (#33865)
Update the Quic transport layer keypair and identity when the Validator's identity keypair is updated
2023-12-08 14:53:19 +08:00
Lucas Steuernagel b97b3dd4ab
Use BankForks on tests - Part 3 (#34248)
* Add BankForks to core tests

* Refactor functions under DCOU
2023-12-01 13:47:22 -03:00
Brooks e02f25d5a2
Removes filler accounts (#34115) 2023-11-19 20:36:57 -05:00
Brooks b4c652ef6c
cli: Hides the filler accounts args (#34113) 2023-11-16 12:58:52 -05:00
Trent Nelson c55a6e55a1
validator: deprecates `--disable-accounts-disk-index` (#33850)
* validator: deprecates `--disable-accounts-disk-index`

* Fix checks failure

* Move disable_accounts_disk_index arg to alphabetical order

---------

Co-authored-by: Will Hickey <will.hickey@solana.com>
2023-11-14 15:56:47 -07:00
Brooks 725ab37bf4
clippy: Replaces .get(0) with .first() (#34048) 2023-11-13 17:22:17 -05:00
steviez 73815aee51
Move and rename ledger services from core to ledger (#33947)
These services currently live in core/; however, they operate on the
ledger. Mores so, these two services operate on the blockstore only,
and not necessarily the entire ledger. So, it makes sense to move these
services out of core and into ledger. We've recently been doing similar
changes with breaking things out into individual crates in order to
reduce the scope of core.

So, this change moves the services from core/ to ledger/, and replaces
ledger with blockstore.
2023-11-08 11:58:31 -06:00
Jeff Washington (jwash) a18debc34a
allow test feature to skip rewrites (#33851)
* allow test feature to skip rewrites

* hook up cli arg for test skip rewrites, update tests

* fix sanity checker

* add account hash to abi to fix a test

* reviews

* use hashmap to collect skip_rewrites. exclude skip_rewrites from dirty
pubkey set

* accumulate skipped_rewrite in reduce

* mutex

* fmt

* skip hash verify for this test flag

* add skipped rewrites num stat

* skip bank hash verify not account hash verify

* reviews

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-10-27 09:14:05 -05:00
Pankaj Garg 9d42cd7efe
Initialize fork graph in program cache during bank_forks creation (#33810)
* Initialize fork graph in program cache during bank_forks creation

* rename BankForks::new to BankForks::new_rw_arc

* fix compilation

* no need to set fork_graph on insert()

* fix partition tests
2023-10-23 09:32:41 -07:00
steviez 8bd0e4cd95
Change getHealth to compare optimistically confirmed slots (#33651)
The current getHealth mechanism checks a local accounts hash slot vs.
those of other nodes as specified by --known-validator. This is a
very coarse comparison given that the default for this value is 100
slots. More so, any nodes using a value larger than the default
(ie --incremental-snapshot-interval 500) will likely see getHealth
return status behind at some point.

Change the underlying mechanism of how health is computed. Instead of
using the accounts hash slots published in gossip, use the latest
optimistically confirmed slot from the cluster. Even when a node is
behind, it is able to observe cluster optimistically confirmed by slots
by viewing votes published in gossip.

Thus, the latest cluster optimistically confirmed slot can be compared
against the latest optimistically confirmed bank from replay to
determine health. This new comparison is much more granular, and not
needing to depend on individual known validators is also a plus.
2023-10-16 11:21:33 -05:00
Brooks 452fd5d384
Adds `--no-skip-initial-accounts-db-clean` *hidden* CLI flag (#33664) 2023-10-12 13:32:40 -04:00
Wen 7c80fa1f67
Hide wen_restart and do not take default value for now. (#33637) 2023-10-10 15:05:55 -07:00
DimAn 7afb11f1e6
validator: skip health check (#33568)
* validator: skip health check

* keep `healthy` as a boolean
2023-10-08 16:33:53 -07:00
Wen 630feeddf2
Add wen_restart module (#33344)
* Add wen_restart module:
- Implement reading LastVotedForkSlots from blockstore.
- Add proto file to record the intermediate results.
- Also link wen_restart into validator.
- Move recreation of tower outside replay_stage so we can get last_vote.

* Update lock file.

* Fix linter errors.

* Fix depencies order.

* Update wen_restart explanation and small fixes.

* Generate tower outside tvu.

* Update validator/src/cli.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* Update wen-restart/protos/wen_restart.proto

Co-authored-by: Tyera <teulberg@gmail.com>

* Update wen-restart/build.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* Update wen-restart/src/wen_restart.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* Rename proto directory.

* Rename InitRecord to MyLastVotedForkSlots, add imports.

* Update wen-restart/Cargo.toml

Co-authored-by: Tyera <teulberg@gmail.com>

* Update wen-restart/src/wen_restart.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* Move prost-build dependency to project toml.

* No need to continue if the distance between slot and last_vote is
already larger than MAX_SLOTS_ON_VOTED_FORKS.

* Use 16k slots instead of 81k slots, a few more wording changes.

* Use AncestorIterator which does the same thing.

* Update Cargo.lock

* Update Cargo.lock

---------

Co-authored-by: Tyera <teulberg@gmail.com>
2023-10-06 15:04:37 -07:00
Brooks 35a0295376
Improves error text when snapshot intervals are incompatible (#33551) 2023-10-06 07:51:49 -04:00
Ryo Onodera eb262aabe3
Enable the banking trace by default (#33497) 2023-10-04 09:01:28 +09:00
Brooks 1d39c3167d
Adds default info to cli arg for --accounts-hash-cache-path (#33331) 2023-09-20 23:45:55 -04:00
Brooks 2839d51d5e
Unhides fastboot cli arg (#33329) 2023-09-20 16:52:52 -04:00
Tyera efb6846fe7
Boot solana-test-validator without enable_partitioned_epoch_reward feature (#33146) 2023-09-05 15:24:17 -06:00
Jeff Washington (jwash) fb1ba216f5
Revert "Add an RPC API that can query the list of Top N secondary index keys and their sizes (#28887)" (#33121)
* Revert "Add an RPC API that can query the list of Top N secondary index keys and their sizes (#28887)"

This reverts commit 1e3d6349aa.

* Revert "Add Admin RPC Front End for Top N Secondary Index Key Sizes Query. (#29352)"

This reverts commit aa353e4b83.

* fix test uses

* fmt
2023-09-01 14:36:06 -07:00