From 06b8d689a00afcad8430ee5df0a86c55a4ccfeaa Mon Sep 17 00:00:00 2001 From: kevinheavey Date: Sat, 2 Nov 2024 16:03:45 +0400 Subject: [PATCH 1/2] remove solana-sdk from solana-connection-cache --- Cargo.lock | 4 +++- connection-cache/Cargo.toml | 4 +++- connection-cache/src/client_connection.rs | 2 +- connection-cache/src/connection_cache.rs | 5 +++-- connection-cache/src/nonblocking/client_connection.rs | 5 +---- programs/sbf/Cargo.lock | 4 +++- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cc437e886f238b..eccc9aeda8513e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6578,7 +6578,9 @@ dependencies = [ "solana-measure", "solana-metrics", "solana-net-utils", - "solana-sdk", + "solana-signer", + "solana-time-utils", + "solana-transaction-error", "thiserror", "tokio", ] diff --git a/connection-cache/Cargo.toml b/connection-cache/Cargo.toml index 28577bac0c066e..b42d0f2b23af1f 100644 --- a/connection-cache/Cargo.toml +++ b/connection-cache/Cargo.toml @@ -21,7 +21,9 @@ rand = { workspace = true } rayon = { workspace = true } solana-measure = { workspace = true } solana-metrics = { workspace = true } -solana-sdk = { workspace = true } +solana-signer = { workspace = true, features = ["keypair"] } +solana-time-utils = { workspace = true } +solana-transaction-error = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true, features = ["full"] } diff --git a/connection-cache/src/client_connection.rs b/connection-cache/src/client_connection.rs index 6579157b79df9c..1469910633e703 100644 --- a/connection-cache/src/client_connection.rs +++ b/connection-cache/src/client_connection.rs @@ -1,6 +1,6 @@ use { solana_metrics::MovingStat, - solana_sdk::transport::Result as TransportResult, + solana_transaction_error::TransportResult, std::{net::SocketAddr, sync::atomic::AtomicU64}, }; diff --git a/connection-cache/src/connection_cache.rs b/connection-cache/src/connection_cache.rs index 5e44b98d4c911d..330b4d84d3d34a 100644 --- a/connection-cache/src/connection_cache.rs +++ b/connection-cache/src/connection_cache.rs @@ -9,7 +9,8 @@ use { log::*, rand::{thread_rng, Rng}, solana_measure::measure::Measure, - solana_sdk::{signature::Keypair, timing::AtomicInterval}, + solana_signer::keypair::Keypair, + solana_time_utils::AtomicInterval, std::{ net::SocketAddr, sync::{atomic::Ordering, Arc, RwLock}, @@ -513,7 +514,7 @@ mod tests { async_trait::async_trait, rand::{Rng, SeedableRng}, rand_chacha::ChaChaRng, - solana_sdk::transport::Result as TransportResult, + solana_transaction_error::TransportResult, std::{ net::{IpAddr, Ipv4Addr, SocketAddr, UdpSocket}, sync::Arc, diff --git a/connection-cache/src/nonblocking/client_connection.rs b/connection-cache/src/nonblocking/client_connection.rs index ef79674057088f..8213a38d51ea84 100644 --- a/connection-cache/src/nonblocking/client_connection.rs +++ b/connection-cache/src/nonblocking/client_connection.rs @@ -1,9 +1,6 @@ //! Trait defining async send functions, to be used for UDP or QUIC sending -use { - async_trait::async_trait, solana_sdk::transport::Result as TransportResult, - std::net::SocketAddr, -}; +use {async_trait::async_trait, solana_transaction_error::TransportResult, std::net::SocketAddr}; #[async_trait] pub trait ClientConnection { diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index 498441efb8766f..6b0bc21a76eac5 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -5289,7 +5289,9 @@ dependencies = [ "rayon", "solana-measure", "solana-metrics", - "solana-sdk", + "solana-signer", + "solana-time-utils", + "solana-transaction-error", "thiserror", "tokio", ] From dc0f17491c4d91158822e9286aac590554355e9f Mon Sep 17 00:00:00 2001 From: kevinheavey Date: Tue, 5 Nov 2024 13:57:58 +0400 Subject: [PATCH 2/2] post-rebase fix --- Cargo.lock | 2 +- connection-cache/Cargo.toml | 2 +- connection-cache/src/connection_cache.rs | 2 +- programs/sbf/Cargo.lock | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eccc9aeda8513e..da3ad0ded3a65c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6574,11 +6574,11 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rayon", + "solana-keypair", "solana-logger", "solana-measure", "solana-metrics", "solana-net-utils", - "solana-signer", "solana-time-utils", "solana-transaction-error", "thiserror", diff --git a/connection-cache/Cargo.toml b/connection-cache/Cargo.toml index b42d0f2b23af1f..c246526e16d559 100644 --- a/connection-cache/Cargo.toml +++ b/connection-cache/Cargo.toml @@ -19,9 +19,9 @@ indicatif = { workspace = true, optional = true } log = { workspace = true } rand = { workspace = true } rayon = { workspace = true } +solana-keypair = { workspace = true } solana-measure = { workspace = true } solana-metrics = { workspace = true } -solana-signer = { workspace = true, features = ["keypair"] } solana-time-utils = { workspace = true } solana-transaction-error = { workspace = true } thiserror = { workspace = true } diff --git a/connection-cache/src/connection_cache.rs b/connection-cache/src/connection_cache.rs index 330b4d84d3d34a..8e4363117d361b 100644 --- a/connection-cache/src/connection_cache.rs +++ b/connection-cache/src/connection_cache.rs @@ -8,8 +8,8 @@ use { indexmap::map::IndexMap, log::*, rand::{thread_rng, Rng}, + solana_keypair::Keypair, solana_measure::measure::Measure, - solana_signer::keypair::Keypair, solana_time_utils::AtomicInterval, std::{ net::SocketAddr, diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index 6b0bc21a76eac5..1b4c5ccd0e2707 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -5287,9 +5287,9 @@ dependencies = [ "log", "rand 0.8.5", "rayon", + "solana-keypair", "solana-measure", "solana-metrics", - "solana-signer", "solana-time-utils", "solana-transaction-error", "thiserror",