Commit Graph

40 Commits

Author SHA1 Message Date
Tyera 6c4746dc14
accounts-cluster-bench: Break early when a max-accounts limit is reached (#34922)
* Improve help text

* Add max_accounts cli arg and halt loop accordingly

* Log totals before max_account exit

* Add test of early end on max_accounts

* Add logging when account-creation loop breaks
2024-01-25 19:46:43 +00:00
sakridge 709e934d4c
Add RPC bench threads to accounts-cluster-bench (#34520) 2024-01-06 13:32:29 +01:00
Alexander Meißner 9e703f85de
Upgrades Rust to 1.72.0 & nightly-2023-08-25 (#32961)
* allow pedantic invalid cast lint

* allow lint with false-positive triggered by `test-case` crate

* nightly `fmt` correction

* adapt to rust layout changes

* remove dubious test

* Use transmute instead of pointer cast and de/ref when check_aligned is false.

* Renames clippy::integer_arithmetic to clippy::arithmetic_side_effects.

* bump rust nightly to 2023-08-25

* Upgrades Rust to 1.72.0

---------

Co-authored-by: Trent Nelson <trent@solana.com>
2023-09-01 07:26:13 +00:00
Jon Cinque 0fe902ced7
Bump rand to 0.8, rand_chacha to 0.3, getrandom to 0.2 (#32871)
* sdk: Add concurrent support for rand 0.7 and 0.8

* Update rand, rand_chacha, and getrandom versions

* Run command to replace `gen_range`

Run `git grep -l gen_range | xargs sed -i'' -e 's/gen_range(\(\S*\), /gen_range(\1../'

* sdk: Fix users of older `gen_range`

* Replace `hash::new_rand` with `hash::new_with_thread_rng`

Run:
```
git grep -l hash::new_rand | xargs sed -i'' -e 's/hash::new_rand([^)]*/hash::new_with_thread_rng(/'
```

* perf: Use `Keypair::new()` instead of `generate`

* Use older rand version in zk-token-sdk

* program-runtime: Inline random key generation

* bloom: Fix clippy warnings in tests

* streamer: Scope rng usage correctly

* perf: Fix clippy warning

* accounts-db: Map to char to generate a random string

* Remove `from_secret_key_bytes`, it's just `keypair_from_seed`

* ledger: Generate keypairs by hand

* ed25519-tests: Use new rand

* runtime: Use new rand in all tests

* gossip: Clean up clippy and inline keypair generators

* core: Inline keypair generation for tests

* Push sbf lockfile change

* sdk: Sort dependencies correctly

* Remove `hash::new_with_thread_rng`, use `Hash::new_unique()`

* Use Keypair::new where chacha isn't used

* sdk: Fix build by marking rand 0.7 optional

* Hardcode secret key length, add static assertion

* Unify `getrandom` crate usage to fix linking errors

* bloom: Fix tests that require a random hash

* Remove some dependencies, try to unify others

* Remove unnecessary uses of rand and rand_core

* Update lockfiles

* Add back some dependencies to reduce rebuilds

* Increase max rebuilds from 14 to 15

* frozen-abi: Remove `getrandom`

* Bump rebuilds to 17

* Remove getrandom from zk-token-proof
2023-08-21 19:11:21 +02:00
Pankaj Garg f4287d70bb
Move accounts-db code to its own crate (#32766) 2023-08-09 13:03:36 -07:00
Tyera 6bd4ae6955
Clean up Spl type conversions (#31845)
* Use spl-token ids directly in program-id checks

* Remove id redefinitions

* Deprecate pubkey_from_spl_token and remove usage

* Deprecate spl_token_pubkey and remove usage

* Deprecate native mint helpers and remove usage

* Deprecate spl_token_instruction and remove usage
2023-05-30 14:34:38 -06:00
Jon Cinque c0e107a97d
gossip-service: Spy multiple nodes by pubkey at once (#31597)
* gossip: Spy multiple pubkeys

* Address behzad's feedback
2023-05-11 18:24:35 +02:00
behzad nouri cb65a785bc
makes sockets in LegacyContactInfo private (#31248)
Working towards LegacyContactInfo => ContactInfo migration, the commit
hides some implementation details of LegacyContactInfo and expands API
parity with the new ContactInfo.
2023-04-21 15:39:16 +00:00
Ryo Onodera 721719d776
Add solana_clap_utils::hidden_unless_forced() (#30843)
* Add solana_clap_utils::hidden_unless_forced()

* Use more descriptive env name

Co-authored-by: mvines <mvines@gmail.com>

---------

Co-authored-by: mvines <mvines@gmail.com>
2023-03-22 08:59:17 +00:00
Tyera cbbae8fcd4
Update accounts-cluster-bench to work against public clusters (#30781)
* Move client ctor outside start_sig_clear_thread

* Add TransactionExecutor::new_with_url method and dedupe

* Remove unnecessary pub

* Update airdrop to use RpcClient

* Construct client outside run_accounts_bench

* Add config and url parameters
2023-03-20 09:46:06 -06:00
behzad nouri ded457cd73
embeds the new gossip ContactInfo in ClusterInfo (#30022)
Working towards replacing the legacy gossip contact-info with the new
one, the commit updates the respective field in gossip cluster-info.
2023-02-10 20:07:45 +00:00
Kevin Ji dd92f225bb
Use Ipv4Addr::{LOCALHOST, UNSPECIFIED} constants (#29813) 2023-01-23 16:49:51 -06:00
HaoranYi b3a3e03c6a
Refresh blockhash for retrials of failed get_fee calls (#29494)
* add log for error for failed rpc calls

* refresh blockhash when retry get_fee_for_message

* clippy
2023-01-06 08:53:38 -06:00
behzad nouri 5c9beef498
fixes errors from clippy::useless_conversion (#29534)
https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
2023-01-05 18:05:32 +00:00
HaoranYi d22c1d1ce4
Add retries for get_latest_blockhash for accounts cluster bench (#29456)
* retry get_latest_blockhash

* more retries for get_latest_blockhash

* retry for get_fee too

* clippy

* fmt

* sleep

* Update accounts-cluster-bench/src/main.rs

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

* Update accounts-cluster-bench/src/main.rs

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

* rename

Co-authored-by: Tyera <teulberg@gmail.com>
2023-01-03 13:35:12 -06:00
behzad nouri 9524c9dbff patches errors from clippy::uninlined_format_args
https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
2022-12-06 19:32:15 +00:00
Haoran Yi 597828630b fix account-cluster-bench logging 2022-11-30 09:00:14 -06:00
Haoran Yi ed1d0788ed fix typo 2022-11-30 09:00:14 -06:00
Tyera Eulberg b8b3d723da
Use new client crates (#27360)
* Update ancillary cli crates

* Update cli

* Update command-line tools

* Update rpc, etc

* Update client-test

* Update core, validator

* Update local-cluster
2022-08-24 10:47:02 -06:00
Trent Nelson eac4a6df68 rpc: use minimal mode by default 2022-02-01 19:00:06 -07:00
Michael Vines 6d5bbca630 Pacify clippy 2022-01-21 19:12:57 -08:00
Tyera Eulberg 205fd95722
Add option to reclaim accounts-cluster-bench accounts/lamports (#21656)
* Add option to reclaim accounts-cluster-bench accounts/lamports

* lint
2021-12-06 23:52:57 -07:00
Michael Vines b8837c04ec Reformat imports to a consistent style for imports
rustfmt.toml configuration:
  imports_granularity = "One"
  group_imports = "One"
2021-12-03 09:19:13 -08:00
Jon Cinque 02bc4e3fc1
spl-token: New program feature flag (#21354)
* spl-token: Add feature flag for new release

* Remove all spl token version declarations
2021-11-21 14:27:03 +01:00
Jack May bced07a099
Update fee api to use blockhash (#21054) 2021-10-29 13:52:59 -07:00
Jack May da45be366a
Remove blockhash from fee calculation (#20641) 2021-10-13 13:10:58 -07:00
sakridge 60fe29b63e
Move transaction executor (#19946) 2021-10-13 13:06:23 +02:00
Jack May 0b50bb2b20
Deprecate FeeCalculator returning APIs (#19120) 2021-08-13 09:08:20 -07:00
Trent Nelson 06a7a9e544 remove superfluous `collect()`s 2021-08-04 07:21:55 +00:00
behzad nouri d2d5f36a3c
adds validator flag to allow private ip addresses (#18850) 2021-07-23 15:25:03 +00:00
Alexander Meißner 6514096a67 chore: cargo +nightly clippy --fix -Z unstable-options 2021-06-18 10:42:46 -07:00
carllin ed18add7d3
accounts-cluster-bench, close all accounts in a sliding window (#17993) 2021-06-16 14:42:00 -07:00
Tyera Eulberg 9a5330b7eb
Move gossip modules into solana-gossip crate (#17352)
* Move gossip modules to solana-gossip

* Update Protocol abi digest due to move

* Move gossip benches and hook up CI

* Remove unneeded Result entries

* Single use statements
2021-05-26 09:15:46 -06:00
behzad nouri cf1acfb021 uses Duration type for gossip discover timeout 2021-05-22 19:17:36 +00:00
Tyera Eulberg 283f587afe
Enable multiple payers in accounts-cluster-bench (#16889)
* Enable multiple payer keypairs

* Suppress tx creation if batch size == 0

* Suppress logs when waiting to create txs

* Double airdrop threshold to prevent stall when closing accounts
2021-04-27 21:26:16 +00:00
François Garillot b08cff9e77
Simplify some pattern-matches (#16402)
When those match an exact combinator on Option / Result.

Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust).
2021-04-08 12:40:37 -06:00
Tyera Eulberg 67b747938f
Helpful const and Arg doc (#16248) 2021-03-31 05:11:38 +00:00
Tyera Eulberg 1d145e1fc2
Add handling to close accounts to many-accounts bench (#16199)
* gitignore farf

* Improve cli args

* Use derived addresses for accounts

* Add parameter to close every nth account created
2021-03-29 15:30:00 -06:00
Tyera Eulberg a4f0033bd7
Remove ValidatorConfig derive Clone, and fix local-cluster tests (#15647)
* Remove ValidatorConfig derive Clone

* Add local-cluster ValidatorConfig helpers

* Fix benches
2021-03-03 04:21:30 +00:00
sakridge 9b204febf3
Add accounts cluster bench (#14096)
* Add accounts cluster bench

* Transaction executor

* Re-allow clippy::integer_arithmetic

* Enable spl-token accounts and fixup transaction send/conf

* saturating_sub for debug builds

* Initialize RpcClients with confirmed commitment

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-02-25 19:51:46 -08:00