Skip to content

Commit

Permalink
Added unit tests
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lijunwangs committed May 6, 2024
1 parent 07ee465 commit 0f27864
Show file tree
Hide file tree
Showing 14 changed files with 259 additions and 173 deletions.
73 changes: 1 addition & 72 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ generic-array = { version = "0.14.7", default-features = false }
gethostname = "0.2.3"
getrandom = "0.2.10"
goauth = "0.13.1"
governor = "0.6.3"
hex = "0.4.3"
hidapi = { version = "2.6.1", default-features = false }
histogram = "0.6.9"
Expand Down
2 changes: 1 addition & 1 deletion bench-tps/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub struct Config {
pub external_client_type: ExternalClientType,
pub use_quic: bool,
pub tpu_connection_pool_size: usize,
pub tpu_max_connections_per_ipaddr_per_minute: u32,
pub tpu_max_connections_per_ipaddr_per_minute: u64,
pub compute_unit_price: Option<ComputeUnitPrice>,
pub skip_tx_account_data_size: bool,
pub use_durable_nonce: bool,
Expand Down
2 changes: 1 addition & 1 deletion core/src/tpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl Tpu {
banking_tracer: Arc<BankingTracer>,
tracer_thread_hdl: TracerThread,
tpu_enable_udp: bool,
tpu_max_connections_per_ipaddr_per_minute: u32,
tpu_max_connections_per_ipaddr_per_minute: u64,
prioritization_fee_cache: &Arc<PrioritizationFeeCache>,
block_production_method: BlockProductionMethod,
_generator_config: Option<GeneratorConfig>, /* vestigial code for replay invalidator */
Expand Down
2 changes: 1 addition & 1 deletion core/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ impl Validator {
use_quic: bool,
tpu_connection_pool_size: usize,
tpu_enable_udp: bool,
tpu_max_connections_per_ipaddr_per_minute: u32,
tpu_max_connections_per_ipaddr_per_minute: u64,
admin_rpc_service_post_init: Arc<RwLock<Option<AdminRpcRequestMetadataPostInit>>>,
) -> Result<Self, String> {
let id = identity_keypair.pubkey();
Expand Down
73 changes: 1 addition & 72 deletions programs/sbf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion streamer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ edition = { workspace = true }
async-channel = { workspace = true }
bytes = { workspace = true }
crossbeam-channel = { workspace = true }
dashmap = { workspace = true }
futures-util = { workspace = true }
governor = { workspace = true }
histogram = { workspace = true }
indexmap = { workspace = true }
itertools = { workspace = true }
Expand Down
Loading

0 comments on commit 0f27864

Please sign in to comment.