Skip to content

Commit

Permalink
remove solana-sdk from tpu-client (#3842)
Browse files Browse the repository at this point in the history
* remove solana-sdk from tpu-client

* fix dep

* remove solana-program

* sort deps
  • Loading branch information
kevinheavey authored Dec 5, 2024
1 parent c5473e4 commit 62daa16
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 25 deletions.
12 changes: 11 additions & 1 deletion Cargo.lock

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

12 changes: 11 additions & 1 deletion programs/sbf/Cargo.lock

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

12 changes: 11 additions & 1 deletion svm/examples/Cargo.lock

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

18 changes: 16 additions & 2 deletions tpu-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,35 @@ indexmap = { workspace = true }
indicatif = { workspace = true, optional = true }
log = { workspace = true }
rayon = { workspace = true }
solana-client-traits = { workspace = true }
solana-clock = { workspace = true }
solana-commitment-config = { workspace = true }
solana-connection-cache = { workspace = true }
solana-epoch-info = { workspace = true }
solana-measure = { workspace = true }
solana-message = { workspace = true, optional = true }
solana-net-utils = { workspace = true }
solana-pubkey = { workspace = true }
solana-pubsub-client = { workspace = true }
solana-quic-definitions = { workspace = true }
solana-rpc-client = { workspace = true }
solana-rpc-client-api = { workspace = true }
solana-sdk = { workspace = true }
solana-signature = { workspace = true }
solana-signer = { workspace = true }
solana-transaction = { workspace = true }
solana-transaction-error = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["full"] }

[features]
default = ["spinner"]
# Support tpu-client methods that feature a spinner progress bar for
# command-line interfaces
spinner = ["dep:indicatif", "solana-rpc-client/spinner"]
spinner = [
"dep:indicatif",
"dep:solana-message",
"solana-rpc-client/spinner"
]

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
22 changes: 11 additions & 11 deletions tpu-client/src/nonblocking/tpu_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,28 @@ use {
bincode::serialize,
futures_util::{future::join_all, stream::StreamExt},
log::*,
solana_clock::{Slot, DEFAULT_MS_PER_SLOT, NUM_CONSECUTIVE_LEADER_SLOTS},
solana_commitment_config::CommitmentConfig,
solana_connection_cache::{
connection_cache::{
ConnectionCache, ConnectionManager, ConnectionPool, NewConnectionConfig, Protocol,
DEFAULT_CONNECTION_POOL_SIZE,
},
nonblocking::client_connection::ClientConnection,
},
solana_epoch_info::EpochInfo,
solana_pubkey::Pubkey,
solana_pubsub_client::nonblocking::pubsub_client::{PubsubClient, PubsubClientError},
solana_quic_definitions::QUIC_PORT_OFFSET,
solana_rpc_client::nonblocking::rpc_client::RpcClient,
solana_rpc_client_api::{
client_error::{Error as ClientError, ErrorKind, Result as ClientResult},
request::RpcError,
response::{RpcContactInfo, SlotUpdate},
},
solana_sdk::{
clock::{Slot, DEFAULT_MS_PER_SLOT, NUM_CONSECUTIVE_LEADER_SLOTS},
commitment_config::CommitmentConfig,
epoch_info::EpochInfo,
pubkey::Pubkey,
quic::QUIC_PORT_OFFSET,
signature::SignerError,
transaction::Transaction,
transport::{Result as TransportResult, TransportError},
},
solana_signer::SignerError,
solana_transaction::Transaction,
solana_transaction_error::{TransportError, TransportResult},
std::{
collections::{HashMap, HashSet},
net::SocketAddr,
Expand All @@ -48,9 +46,11 @@ use {
crate::tpu_client::{SEND_TRANSACTION_INTERVAL, TRANSACTION_RESEND_INTERVAL},
futures_util::FutureExt,
indicatif::ProgressBar,
solana_message::Message,
solana_rpc_client::spinner::{self, SendTransactionProgress},
solana_rpc_client_api::request::MAX_GET_SIGNATURE_STATUSES_QUERY_ITEMS,
solana_sdk::{message::Message, signers::Signers, transaction::TransactionError},
solana_signer::signers::Signers,
solana_transaction_error::TransactionError,
std::{future::Future, iter},
};

Expand Down
16 changes: 7 additions & 9 deletions tpu-client/src/tpu_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ pub use crate::nonblocking::tpu_client::TpuSenderError;
use {
crate::nonblocking::tpu_client::TpuClient as NonblockingTpuClient,
rayon::iter::{IntoParallelIterator, ParallelIterator},
solana_client_traits::AsyncClient,
solana_clock::Slot,
solana_connection_cache::{
client_connection::ClientConnection,
connection_cache::{
Expand All @@ -10,13 +12,9 @@ use {
},
solana_net_utils::bind_to_unspecified,
solana_rpc_client::rpc_client::RpcClient,
solana_sdk::{
client::AsyncClient,
clock::Slot,
signature::Signature,
transaction::{Transaction, VersionedTransaction},
transport::Result as TransportResult,
},
solana_signature::Signature,
solana_transaction::{versioned::VersionedTransaction, Transaction},
solana_transaction_error::TransportResult,
std::{
collections::VecDeque,
net::UdpSocket,
Expand All @@ -25,8 +23,8 @@ use {
};
#[cfg(feature = "spinner")]
use {
solana_sdk::{message::Message, signers::Signers, transaction::TransactionError},
tokio::time::Duration,
solana_message::Message, solana_signer::signers::Signers,
solana_transaction_error::TransactionError, tokio::time::Duration,
};

pub const DEFAULT_TPU_ENABLE_UDP: bool = false;
Expand Down

0 comments on commit 62daa16

Please sign in to comment.