From cda90bb35e7590f87cbe490df01fe542e7e2684a Mon Sep 17 00:00:00 2001 From: kevinheavey Date: Sat, 2 Nov 2024 16:15:26 +0400 Subject: [PATCH] remove solana-sdk from solana-udp-client --- Cargo.lock | 4 +++- programs/sbf/Cargo.lock | 3 ++- udp-client/Cargo.toml | 6 +++++- udp-client/src/lib.rs | 2 +- udp-client/src/nonblocking/udp_client.rs | 4 ++-- udp-client/src/udp_client.rs | 2 +- 6 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 694d238ba4966a..9295aa9524dfc8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8882,8 +8882,10 @@ dependencies = [ "async-trait", "solana-connection-cache", "solana-net-utils", - "solana-sdk", + "solana-packet", + "solana-signer", "solana-streamer", + "solana-transaction-error", "thiserror", "tokio", ] diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index abc97f019a7188..32b67a07eac455 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -7375,8 +7375,9 @@ dependencies = [ "async-trait", "solana-connection-cache", "solana-net-utils", - "solana-sdk", + "solana-signer", "solana-streamer", + "solana-transaction-error", "thiserror", "tokio", ] diff --git a/udp-client/Cargo.toml b/udp-client/Cargo.toml index e285159ff26c04..619d9e7e30d51c 100644 --- a/udp-client/Cargo.toml +++ b/udp-client/Cargo.toml @@ -13,7 +13,11 @@ edition = { workspace = true } async-trait = { workspace = true } solana-connection-cache = { workspace = true } solana-net-utils = { workspace = true } -solana-sdk = { workspace = true } +solana-signer = { workspace = true, features = ["keypair"] } solana-streamer = { workspace = true } +solana-transaction-error = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true, features = ["full"] } + +[dev-dependencies] +solana-packet = { workspace = true } diff --git a/udp-client/src/lib.rs b/udp-client/src/lib.rs index bb0c897a3dbc7a..7b1db0af474e38 100644 --- a/udp-client/src/lib.rs +++ b/udp-client/src/lib.rs @@ -15,7 +15,7 @@ use { }, connection_cache_stats::ConnectionCacheStats, }, - solana_sdk::signature::Keypair, + solana_signer::keypair::Keypair, std::{ net::{IpAddr, Ipv4Addr, SocketAddr, UdpSocket}, sync::Arc, diff --git a/udp-client/src/nonblocking/udp_client.rs b/udp-client/src/nonblocking/udp_client.rs index ab904914702954..65569985bcd8bb 100644 --- a/udp-client/src/nonblocking/udp_client.rs +++ b/udp-client/src/nonblocking/udp_client.rs @@ -4,7 +4,7 @@ use { async_trait::async_trait, core::iter::repeat, solana_connection_cache::nonblocking::client_connection::ClientConnection, - solana_sdk::transport::Result as TransportResult, + solana_transaction_error::TransportResult, solana_streamer::nonblocking::sendmmsg::batch_send, std::net::SocketAddr, tokio::net::UdpSocket, }; @@ -47,7 +47,7 @@ impl ClientConnection for UdpClientConnection { mod tests { use { super::*, - solana_sdk::packet::{Packet, PACKET_DATA_SIZE}, + solana_packet::{Packet, PACKET_DATA_SIZE}, solana_streamer::nonblocking::recvmmsg::recv_mmsg, std::net::{IpAddr, Ipv4Addr}, tokio::net::UdpSocket, diff --git a/udp-client/src/udp_client.rs b/udp-client/src/udp_client.rs index 9ca7d23df94b6a..b2bc64c5866601 100644 --- a/udp-client/src/udp_client.rs +++ b/udp-client/src/udp_client.rs @@ -4,7 +4,7 @@ use { core::iter::repeat, solana_connection_cache::client_connection::ClientConnection, - solana_sdk::transport::Result as TransportResult, + solana_transaction_error::TransportResult, solana_streamer::sendmmsg::batch_send, std::{ net::{SocketAddr, UdpSocket},