Commit Graph

446 Commits

Author SHA1 Message Date
mergify[bot] b57b883355
v2.0: Fix BankForks::new_rw_arc memory leak (backport of #1893) (#2066)
* Fix BankForks::new_rw_arc memory leak (#1893)

(cherry picked from commit d441c0f577)

* Fix flaky test test_banking_stage_entries_only_central_scheduler (#2082)

---------

Co-authored-by: Andrei Silviu Dragnea <andreisilviudragnea@gmail.com>
Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
2024-07-17 16:11:40 -07:00
ryleung-solana ed500b5afc
Solana ping tpu client (#923)
Add support for using the TPU client in solana-ping to better isolate the effect of the transport layer on ping performance.
2024-06-05 03:55:08 +00:00
Emil Kuban dfa48eb6d8
Renaming --identity to --authority in bench-tps (#1435)
* add --authority argument

* test for --identity cli

---------

Co-authored-by: kirill lykov <lykov.kirill@gmail.com>
2024-05-28 19:35:47 +00:00
Yihau Chen 1ccc2e8230
clippy: remove the unused field, elapsed, from SampleStats (#1346)
* clippy: allow dead_code for SampleStats

* remove unused filed

* remove dead_code annotation
2024-05-15 14:55:39 +08:00
Yihau Chen ec9bd79849
clippy: fix legacy_numeric_constants (#1314)
clippy: legacy_numeric_constants
2024-05-15 11:29:19 +08:00
Lijun Wang f54c120450
Connection rate limiting (#948)
* use rate limit on connectings

use rate limit on connectings; missing file

* Change connection rate limit to 8/min instead of 4/s

* Addressed some feedback from Trent

* removed some comments

* fix test failures which are opening connections more frequently

* moved the flag up

* turn off rate limiting to debug CI

* Fix CI test failures

* differentiate of the two throttling cases in stats: across connections or per ip addr

* fmt issues

* Addressed some feedback from Trent

* Added unit tests

Cleanup connection cache rate limiter if exceeding certain threshold

missing files

CONNECITON_RATE_LIMITER_CLEANUP_THRESHOLD to 100_000

clippy issue

clippy issue

sort crates

* revert Cargo.lock changes

* Addressed some feedback from Pankaj
2024-05-14 17:33:43 -07:00
Ashwin Sekar 70c4cb0ba1
consensus: add dev-context-only-utils to tower (#687) 2024-04-09 16:39:57 -07:00
kirill lykov 1261f1f900
Add analysis for bench-tps transactions (#92)
* save progress

* rename threads handler

* added writer for txs

* after extracting structure to handle tx confirmations

* extract LogWriter

* Replace pair TimestampedTransaction with struct

* add compute_unit_price to TimestampedTransaction

* add cu_price to LogWriter

* add block time to the logs

* Fix warnings

* add comments and restructure code

* some small improvements

* Renamed conformation_processing.rs to log_transaction_service.rs

* address numerous PR comments

* split LogWriter into two structs

* simplify code of LogWriters

* extract process_blocks

* specify commitment in LogTransactionService

* break thread loop if receiver happens to be dropped

* update start_slot when processing blocks

* address pr comments

* fix clippy error

* minor changes

* fix ms problem

* fix bug with time in clear transaction map
2024-03-26 11:47:24 +01:00
Greg Cusack 792d7454d9
switch to `solana-tpu-client` from `solana_client::tpu_client` for `bench-tps`, `dos/`, `LocalCluster`, `gossip/` (#310)
* switch over to solana-tpu-client for bench-tps, dos, gossip, local-cluster

* put TpuClientWrapper back in solana_client
2024-03-21 09:25:54 -07:00
Greg Cusack ed573ff60c
add in method for building a `TpuClient` for `LocalCluster` tests (#258)
* add in method for building a TpuClient for LocalCluster tests

* add cluster trait. leave dependency on solana_client::tpu_client
2024-03-18 17:58:11 -07:00
Yihau Chen 51dc7e6fb7
[anza migration]: add 'agave=info' to default log level (#223) 2024-03-14 20:35:33 +08:00
anwayde 926c5713fc
bench-tps: allow option to not set account data size on every transaction (#209)
bench-tps: allow option to not set account data size
2024-03-13 20:29:27 +01:00
Greg Cusack 8c446f26cd
Fully remove `ThinClient` from `bench-tps` (#132)
remove ThinClient from bench-tps
2024-03-12 11:41:54 -07:00
kirill lykov c6bd388346
Add get_blocks and get_slot methods to bench-tps-client (#94)
* add get_block(s)/slot methods to BenchTpsClient

* Update Cargo.lock

* add commitment level for get_slot/blocks
2024-03-07 21:51:44 +01:00
Greg Cusack 5f6d66e87b
Deprecate `ThinClient` and remove `ThinClient` from `bench-tps` (#35365)
* deprecate ThinClient

* switch localcluster bench test to use tpuclient

add back in command line args for thinclient. add thin-client deprecation README

refactor TpuClient connection

* remove thin-client from net/

* change 2.0.0 to 1.19.0
2024-03-01 12:14:52 -08:00
Greg Cusack 98ec72e6ed
change default `bench-tps` client to `tpu-client` (#35335)
* change default bench-tps client to tpu-client

* remote client default to tpu-client

* add --use-tpu-client back in. hide --use-thin-client

* address nit, inform of future thinclient deprecation
2024-02-28 12:30:24 -08:00
Greg Cusack fe571bbab3
Plumb `CommitmentConfig` through `bench-tps` client types (#35282)
* use --commitment-config <commitment-level> for setting blockhash commitment level for sending transactions with rpc-client

* clarify default

* leave get_balance_with_commitment at processed()

* rm unused variable

* refactor commitment_config flag read in

* update cli and change send_batch's get_latest_blockhash() to get_latest_blockhash_with_client_commitment() and use client's internal commitment level

* change fix some nits based on PR comments

* rm unused import
2024-02-23 11:50:41 -08:00
Pankaj Garg 6bbd3661e1
Throttle unstaked quic streams for a given connection (#34562)
* Throttle unstaked quic streams for a given connection

* Fix interval duration check

* move wait to handle_chunk

* set max unistreams to 0

* drop new streams

* cleanup

* some more cleanup

* fix tests

* update test and stop code

* fix bench-tps
2023-12-21 18:47:52 -08:00
GoodDaisy 03386cc7b9
Fix typos (#34459)
* Fix typos

* Fix typos

* fix typo
2023-12-21 13:06:00 -07:00
Lucas Steuernagel 1877fdb273
Use BankForks on tests - Part 4 (#34271)
* Use BankForks on tests - Part 4

* Ensure the correct slot is set
2023-12-06 13:32:04 -03: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
Lijun Wang 344e466e12
Async connection creation in connection cache (#33302)
If there is a connection in the cache available, use it and create the additional connection asynchronously.
2023-09-25 18:17:47 -07:00
kirill lykov c6b0d4a496
specify compute budget when padding program is used (#33234)
* specify compute budget when padding program is used

* fix numeric const format
2023-09-14 14:18:58 +02:00
kirill lykov ec9b30965e
Increase loaded accounts data size when padding program is used (#33219)
* Increase loaded accounts data size when padding program is used

* fix dos tool accordingly
2023-09-13 11:20:40 +02: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
Andrew Fitzgerald 0996b5e245
BenchTPS: Allow a fixed compute-unit-price (#32775) 2023-08-15 15:20:04 -07:00
Andrew Fitzgerald a875562ccd
Funding transactions must specify data limit (#32131) 2023-06-15 18:53:04 +00:00
Andrew Fitzgerald 90812fac76
bench-tps tests use bank w/ all features enabled (#32142) 2023-06-15 17:38:39 +00:00
Tao Zhu 4b30454193
bench-tps add 1_000 as multiplier to compute-unit-price (#32132)
add 1_000 as multiplier to compute-unit-price
2023-06-14 14:50:18 -05:00
Tao Zhu e83a06d85e
set Transfer transaction loaded_accounts_data_size in bench-tps (#32105)
* set Transfer transaction loaded_accounts_data_size in bench-tps

* increase compute_unit_limit for additional ix
2023-06-14 13:30:43 -05:00
behzad nouri 5760390d3b
removes redundant NewConnectionConfig trait (#31979)
Working towards removing hard-coded TPU specific configurations from
QUIC code; NewConnectionConfig is redundant and gets in the way.
2023-06-06 21:28:29 +00:00
Illia Bobyr 4353ac6797
Pass Arc<AtomicBool> by value, not by reference. (#31916)
`Arc` is already a reference internally, so it does not seem to be
beneficial to pass a reference to it.  Just adds an extra layer of
indirection.

Functions that need to be able to increment `Arc` reference count need
to take `Arc<AtomicBool>`, but those that just want to read the
`AtomicBool` value can accept `&AtomicBool`, making them a bit more
generic.

This change focuses specifically on `Arc<AtomicBool>`.  There are other
uses of `&Arc<T>` in the code base that could be converted in a similar
manner.  But it would make the change even larger.
2023-06-01 17:25:48 -07:00
Yihau Chen 420784d19e
chore: use workspace's tempfile (#31895) 2023-05-31 16:58:40 +00:00
behzad nouri 9281ab7d97
separates out connection-cache metrics for different protocols (#31803) 2023-05-25 14:48:22 +00:00
Illia Bobyr 00405bbc42
Cargo.toml: Remove duplicate solana dependencies (#31607)
See comment in Cargo.toml for an explanation of the issue.

This change removes duplicate dependencies for older version of solana-*
crates, and any of the dependencies that are no longer needed.
2023-05-15 19:02:11 -07:00
behzad nouri 4e34abbf3d
specifies protocol in contact-info get-socket api (#31602) 2023-05-12 16:16:20 +00:00
behzad nouri 6a4a0418a6
removes hard-coded QUIC_PORT_OFFSET from connection-cache (#31541)
New ContactInfo has api identifying QUIC vs UDP ports; no need to hard-code
port-offset deep in connection-cache.
2023-05-09 13:46:17 +00:00
dependabot[bot] d6f65ccc27
Bump tempfile from 3.4.0 to 3.5.0 (#31439)
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/commits)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: illia.bobyr@solana.com
2023-05-02 11:29:23 -07:00
behzad nouri aafcac27d8
removes pubkey from LegacyContactInfo public interface (#31375)
Working towards LegacyContactInfo => ContactInfo migration, the commit
adds more api parity between the two.
2023-04-28 12:05:15 +00:00
Andrew Fitzgerald 6f014710ff
Fix keypair multiplier check (#31374) 2023-04-27 18:00:09 -07:00
Andrew Fitzgerald 99cd1a51f5
Set compute unit limit correctly (#31352) 2023-04-26 18:28:56 -07:00
Andrew Fitzgerald 843ff9e5d2
bench-tps: rename tx_count arg to tx-count for consistency (#31213) 2023-04-17 10:59:39 -07:00
behzad nouri ce21a58b65
reworks streamer::StakedNodes (#31082)
{min,max}_stake are computed but never assigned:
https://github.com/solana-labs/solana/blob/4564bcdc1/core/src/staked_nodes_updater_service.rs#L54-L57

The updater code is also inefficient and verbose.
2023-04-10 17:07:40 +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
behzad nouri 3cc74a6087
updates tempfile to 3.4.0 (#30727)
Patching below rustsec advisory:

    Crate:     remove_dir_all
    Version:   0.5.3
    Title:     Race Condition Enabling Link Following and Time-of-check Time-of-use (TOCTOU)
    Date:      2023-02-24
    ID:        RUSTSEC-2023-0018
    URL:       https://rustsec.org/advisories/RUSTSEC-2023-0018
    Solution:  Upgrade to >=0.8.0
2023-03-15 18:25:35 -06:00
kirill lykov 2c37763d7c
Improve cli args parsing in bench-tps (#30307)
* Improve cli args parsing in bench-tps

* Rename parse funciton
* Get rid of panics, exit and println
* Add basic unit tests

* add allow dead_code and unused_imports for cli tests

* simplify code by using map_err instead of macro

* simplify data_size parsing

* use tempfile crate to create temp keypair files

* fix bug with reading client_id from config by default, re-added client_id tests

* minor fix of an error message

* add Eq to bench_tps::cli::Congig

* some minor error messages corrections
2023-02-24 15:39:43 +01:00
Yihau Chen df3ef111f7
chore: workspace inheritance (#29893)
* introduce workspace.package

* introduce workspace.dependencies

* read version from root cargo.toml

* pass check when version = { workspace = true }

* don't bump version when version = { workspace = true }

* including workspace Cargo.toml when bump version

* programs/sbf use workspace inheritance

* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-02-23 22:01:54 +08:00
Michael Vines 5136ed3448
Update homepage value for all crates (#30444) 2023-02-23 02:20:18 +00:00
kirill lykov 069ebb8081
Node identity for bench (#29929)
* add beind_address and client_node_id to bench cli

* use provided node_id and bind_address in connection cache

* add two cli args client_node_stake and client_node_total_stake

* update connection cache construction after upstream update

* use ConnectionCache without Arc to use BackendConnectionCache

* remove comments

* Extend client_node_od cli arg help message

* address PR comments

* simplified staked_nodes creation

* remove delinquent nodes when computing total stake at bench-tps
2023-02-18 09:52:48 +01: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