From 0f34f04c3eaaf81182a8156ba1cd360a7b9bb4f3 Mon Sep 17 00:00:00 2001 From: Jon C Date: Tue, 27 Jan 2026 00:06:53 +0100 Subject: [PATCH] quic-definitions: Remove the crate #### Problem With https://github.com/anza-xyz/agave/pull/10013, the quic-definitions crate is no longer used. Since the crate was only ever used by Agave, and isn't re-exported from the sdk anymore, it's no longer needed at all. #### Summary of changes Remove the crate and all code that references it in the repo. --- Cargo.lock | 7 ---- Cargo.toml | 2 - quic-definitions/Cargo.toml | 20 ---------- quic-definitions/src/lib.rs | 61 ------------------------------- scripts/build-sbf.sh | 1 - scripts/patch-crates-functions.sh | 1 - 6 files changed, 92 deletions(-) delete mode 100644 quic-definitions/Cargo.toml delete mode 100644 quic-definitions/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 15cb4e9b6..030dc17f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3856,13 +3856,6 @@ dependencies = [ "solana-address", ] -[[package]] -name = "solana-quic-definitions" -version = "3.0.0" -dependencies = [ - "solana-keypair", -] - [[package]] name = "solana-rent" version = "3.1.0" diff --git a/Cargo.toml b/Cargo.toml index f9331760e..d502e54ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -69,7 +69,6 @@ members = [ "program-option", "program-pack", "pubkey", - "quic-definitions", "rent", "reward-info", "sanitize", @@ -290,7 +289,6 @@ solana-program-memory = { path = "program-memory", version = "3.0.0" } solana-program-option = { path = "program-option", version = "3.0.0" } solana-program-pack = { path = "program-pack", version = "3.0.0" } solana-pubkey = { path = "pubkey", version = "4.0.0", default-features = false } -solana-quic-definitions = { path = "quic-definitions", version = "3.0.0" } solana-rent = { path = "rent", version = "3.0.0", default-features = false } solana-reward-info = { path = "reward-info", version = "4.0.0" } solana-sanitize = { path = "sanitize", version = "3.0.0" } diff --git a/quic-definitions/Cargo.toml b/quic-definitions/Cargo.toml deleted file mode 100644 index edefd1c91..000000000 --- a/quic-definitions/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] -name = "solana-quic-definitions" -description = "Definitions related to Solana over QUIC." -documentation = "https://docs.rs/solana-quic-definitions" -version = "3.0.0" -rust-version = "1.81.0" -authors = { workspace = true } -repository = { workspace = true } -homepage = { workspace = true } -license = { workspace = true } -edition = { workspace = true } - -[package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] - -[dependencies] -solana-keypair = { workspace = true } - -[lints] -workspace = true diff --git a/quic-definitions/src/lib.rs b/quic-definitions/src/lib.rs deleted file mode 100644 index c4acd6eed..000000000 --- a/quic-definitions/src/lib.rs +++ /dev/null @@ -1,61 +0,0 @@ -//! Definitions related to Solana over QUIC. -#![cfg_attr(docsrs, feature(doc_cfg))] -use {solana_keypair::Keypair, std::time::Duration}; - -pub const QUIC_PORT_OFFSET: u16 = 6; -// Empirically found max number of concurrent streams -// that seems to maximize TPS on GCE (higher values don't seem to -// give significant improvement or seem to impact stability) -pub const QUIC_MAX_UNSTAKED_CONCURRENT_STREAMS: usize = 128; -pub const QUIC_MIN_STAKED_CONCURRENT_STREAMS: usize = 128; - -pub const QUIC_TOTAL_STAKED_CONCURRENT_STREAMS: usize = 100_000; - -// Set the maximum concurrent stream numbers to avoid excessive streams. -// The value was lowered from 2048 to reduce contention of the limited -// receive_window among the streams which is observed in CI bench-tests with -// forwarded packets from staked nodes. -pub const QUIC_MAX_STAKED_CONCURRENT_STREAMS: usize = 512; - -/// QUIC connection idle timeout. The connection will be closed if -/// there are no activities on it within the timeout window. -pub const QUIC_MAX_TIMEOUT: Duration = Duration::from_secs(60); - -/// To avoid idle timeout, the QUIC endpoint sends a ping every -/// QUIC_KEEP_ALIVE. This shouldn't be too low to avoid unnecessary ping traffic. -pub const QUIC_KEEP_ALIVE: Duration = Duration::from_secs(45); - -// Disable Quic send fairness. -// When set to false, streams are still scheduled based on priority, -// but once a chunk of a stream has been written out, quinn tries to complete -// the stream instead of trying to round-robin balance it among the streams -// with the same priority. -// See https://github.com/quinn-rs/quinn/pull/2002. -pub const QUIC_SEND_FAIRNESS: bool = false; - -// Based on commonly-used handshake timeouts for various TCP -// applications. Different applications vary, but most seem to -// be in the 30-60 second range -pub const QUIC_CONNECTION_HANDSHAKE_TIMEOUT: Duration = Duration::from_secs(60); - -/// The receive window for QUIC connection from unstaked nodes is -/// set to this ratio times [`solana_packet::PACKET_DATA_SIZE`] -/// -/// [`solana_packet::PACKET_DATA_SIZE`]: https://docs.rs/solana-packet/latest/solana_packet/constant.PACKET_DATA_SIZE.html -pub const QUIC_UNSTAKED_RECEIVE_WINDOW_RATIO: u64 = 128; - -/// The receive window for QUIC connection from minimum staked nodes is -/// set to this ratio times [`solana_packet::PACKET_DATA_SIZE`] -/// -/// [`solana_packet::PACKET_DATA_SIZE`]: https://docs.rs/solana-packet/latest/solana_packet/constant.PACKET_DATA_SIZE.html -pub const QUIC_MIN_STAKED_RECEIVE_WINDOW_RATIO: u64 = 128; - -/// The receive window for QUIC connection from maximum staked nodes is -/// set to this ratio times [`solana_packet::PACKET_DATA_SIZE`] -/// -/// [`solana_packet::PACKET_DATA_SIZE`]: https://docs.rs/solana-packet/latest/solana_packet/constant.PACKET_DATA_SIZE.html -pub const QUIC_MAX_STAKED_RECEIVE_WINDOW_RATIO: u64 = 512; - -pub trait NotifyKeyUpdate { - fn update_key(&self, key: &Keypair) -> Result<(), Box>; -} diff --git a/scripts/build-sbf.sh b/scripts/build-sbf.sh index 1dd287c8d..0820ee1ca 100755 --- a/scripts/build-sbf.sh +++ b/scripts/build-sbf.sh @@ -14,7 +14,6 @@ build_sbf_excludes=( --exclude solana-keypair --exclude solana-offchain-message --exclude solana-presigner - --exclude solana-quic-definitions --exclude solana-sdk-wasm-js --exclude solana-sdk-wasm-js-tests --exclude solana-secp256k1-program diff --git a/scripts/patch-crates-functions.sh b/scripts/patch-crates-functions.sh index f665aace9..d50a5499c 100644 --- a/scripts/patch-crates-functions.sh +++ b/scripts/patch-crates-functions.sh @@ -70,7 +70,6 @@ all_crate_dirs=( program-option program-pack pubkey - quic-definitions rent reward-info sanitize