Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace solana-client with its constituent parts where possible #2086

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Cargo.lock

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

1 change: 1 addition & 0 deletions accounts-cluster-bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ solana-logger = { workspace = true }
solana-measure = { workspace = true }
solana-net-utils = { workspace = true }
solana-rpc-client = { workspace = true, features = ["default"] }
solana-rpc-client-api = { workspace = true }
solana-runtime = { workspace = true }
solana-sdk = { workspace = true }
solana-streamer = { workspace = true }
Expand Down
3 changes: 2 additions & 1 deletion accounts-cluster-bench/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ use {
hidden_unless_forced, input_parsers::pubkey_of, input_validators::is_url_or_moniker,
},
solana_cli_config::{ConfigInput, CONFIG_FILE},
solana_client::{rpc_request::TokenAccountsFilter, transaction_executor::TransactionExecutor},
solana_client::transaction_executor::TransactionExecutor,
solana_gossip::gossip_service::discover,
solana_inline_spl::token,
solana_measure::measure::Measure,
solana_rpc_client::rpc_client::RpcClient,
solana_rpc_client_api::request::TokenAccountsFilter,
solana_sdk::{
commitment_config::CommitmentConfig,
hash::Hash,
Expand Down
3 changes: 2 additions & 1 deletion bench-tps/src/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ use {
log::*,
rand::distributions::{Distribution, Uniform},
rayon::prelude::*,
solana_client::{nonce_utils, rpc_request::MAX_MULTIPLE_ACCOUNTS},
solana_client::nonce_utils,
solana_metrics::{self, datapoint_info},
solana_rpc_client_api::request::MAX_MULTIPLE_ACCOUNTS,
solana_sdk::{
account::Account,
clock::{DEFAULT_MS_PER_SLOT, DEFAULT_S_PER_SLOT, MAX_PROCESSING_AGE},
Expand Down
2 changes: 1 addition & 1 deletion bench-tps/src/log_transaction_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use {
crossbeam_channel::{select, tick, unbounded, Receiver, Sender},
log::*,
serde::Serialize,
solana_client::rpc_config::RpcBlockConfig,
solana_measure::measure::Measure,
solana_rpc_client_api::config::RpcBlockConfig,
solana_sdk::{
clock::{DEFAULT_MS_PER_SLOT, MAX_PROCESSING_AGE},
commitment_config::{CommitmentConfig, CommitmentLevel},
Expand Down
1 change: 1 addition & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ solana-cli-output = { workspace = true }
solana-client = { workspace = true }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if we could remove this dependency from solana-cli altogether. It's the send-transaction stuff in program that's preventing that?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that plus connection_cache I think

solana-compute-budget = { workspace = true }
solana-config-program = { workspace = true }
solana-connection-cache = { workspace = true }
solana-loader-v4-program = { workspace = true }
solana-logger = { workspace = true }
solana-program-runtime = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion cli/src/compute_budget.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use {
solana_clap_utils::compute_budget::ComputeUnitLimit,
solana_client::rpc_config::RpcSimulateTransactionConfig,
solana_compute_budget::compute_budget_processor::MAX_COMPUTE_UNIT_LIMIT,
solana_rpc_client::rpc_client::RpcClient,
solana_rpc_client_api::config::RpcSimulateTransactionConfig,
solana_sdk::{
borsh1::try_from_slice_unchecked,
compute_budget::{self, ComputeBudgetInstruction},
Expand Down
6 changes: 2 additions & 4 deletions cli/tests/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ use {
test_utils::wait_n_slots,
},
solana_cli_output::{parse_sign_only_reply_string, OutputFormat},
solana_client::{
rpc_client::GetConfirmedSignaturesForAddress2Config, rpc_config::RpcTransactionConfig,
},
solana_faucet::faucet::run_local_faucet,
solana_rpc::rpc::JsonRpcConfig,
solana_rpc_client::rpc_client::RpcClient,
solana_rpc_client::rpc_client::{GetConfirmedSignaturesForAddress2Config, RpcClient},
solana_rpc_client_api::config::RpcTransactionConfig,
solana_rpc_client_nonce_utils::blockhash_query::BlockhashQuery,
solana_sdk::{
account::ReadableAccount,
Expand Down
1 change: 1 addition & 0 deletions gossip/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ solana-metrics = { workspace = true }
solana-net-utils = { workspace = true }
solana-perf = { workspace = true }
solana-rayon-threadlimit = { workspace = true }
solana-rpc-client = { workspace = true }
solana-runtime = { workspace = true }
solana-sanitize = { workspace = true }
solana-sdk = { workspace = true }
Expand Down
5 changes: 2 additions & 3 deletions gossip/src/gossip_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ use {
crate::{cluster_info::ClusterInfo, contact_info::ContactInfo},
crossbeam_channel::{unbounded, Sender},
rand::{thread_rng, Rng},
solana_client::{
connection_cache::ConnectionCache, rpc_client::RpcClient, tpu_client::TpuClientWrapper,
},
solana_client::{connection_cache::ConnectionCache, tpu_client::TpuClientWrapper},
solana_net_utils::DEFAULT_IP_ECHO_SERVER_THREADS,
solana_perf::recycler::Recycler,
solana_rpc_client::rpc_client::RpcClient,
solana_runtime::bank_forks::BankForks,
solana_sdk::{
pubkey::Pubkey,
Expand Down
3 changes: 2 additions & 1 deletion local-cluster/src/local_cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use {
itertools::izip,
log::*,
solana_accounts_db::utils::create_accounts_run_and_snapshot_dirs,
solana_client::{connection_cache::ConnectionCache, rpc_client::RpcClient},
solana_client::connection_cache::ConnectionCache,
solana_core::{
consensus::tower_storage::FileTowerStorage,
validator::{Validator, ValidatorConfig, ValidatorStartProgress},
Expand All @@ -19,6 +19,7 @@ use {
gossip_service::discover_cluster,
},
solana_ledger::{create_new_tmp_ledger, shred::Shred},
solana_rpc_client::rpc_client::RpcClient,
solana_runtime::{
genesis_utils::{
create_genesis_config_with_vote_accounts_and_cluster_type, GenesisConfigInfo,
Expand Down
3 changes: 2 additions & 1 deletion programs/sbf/Cargo.lock

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

1 change: 1 addition & 0 deletions rpc-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ solana-transaction-status = { workspace = true }
tokio = { workspace = true, features = ["full"] }

[dev-dependencies]
solana-connection-cache = { workspace = true }
solana-logger = { workspace = true }

[package.metadata.docs.rs]
Expand Down
8 changes: 3 additions & 5 deletions rpc-test/tests/nonblocking.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
use {
solana_client::{
connection_cache::Protocol,
nonblocking::tpu_client::{LeaderTpuService, TpuClient},
tpu_client::TpuClientConfig,
},
solana_client::nonblocking::tpu_client::{LeaderTpuService, TpuClient},
solana_connection_cache::connection_cache::Protocol,
solana_sdk::{clock::DEFAULT_MS_PER_SLOT, pubkey::Pubkey, system_transaction},
solana_test_validator::TestValidatorGenesis,
solana_tpu_client::tpu_client::TpuClientConfig,
std::sync::{
atomic::{AtomicBool, Ordering},
Arc,
Expand Down
7 changes: 2 additions & 5 deletions rpc-test/tests/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ use {
reqwest::{self, header::CONTENT_TYPE},
serde_json::{json, Value},
solana_account_decoder::UiAccount,
solana_client::{
connection_cache::ConnectionCache,
tpu_client::{TpuClient, TpuClientConfig},
},
solana_client::connection_cache::ConnectionCache,
solana_pubsub_client::nonblocking::pubsub_client::PubsubClient,
solana_rpc_client::rpc_client::RpcClient,
solana_rpc_client_api::{
Expand All @@ -29,7 +26,7 @@ use {
},
solana_streamer::socket::SocketAddrSpace,
solana_test_validator::TestValidator,
solana_tpu_client::tpu_client::DEFAULT_TPU_CONNECTION_POOL_SIZE,
solana_tpu_client::tpu_client::{TpuClient, TpuClientConfig, DEFAULT_TPU_CONNECTION_POOL_SIZE},
solana_transaction_status::TransactionStatus,
std::{
collections::HashSet,
Expand Down
5 changes: 4 additions & 1 deletion send-transaction-service/src/tpu_info.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
use {solana_client::connection_cache::Protocol, solana_sdk::clock::Slot, std::net::SocketAddr};
use {
solana_connection_cache::connection_cache::Protocol, solana_sdk::clock::Slot,
std::net::SocketAddr,
};

pub trait TpuInfo {
fn refresh_recent_peers(&mut self);
Expand Down
2 changes: 1 addition & 1 deletion test-validator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ serde_derive = { workspace = true }
serde_json = { workspace = true }
solana-accounts-db = { workspace = true }
solana-cli-output = { workspace = true }
solana-client = { workspace = true }
solana-compute-budget = { workspace = true }
solana-core = { workspace = true }
solana-geyser-plugin-manager = { workspace = true }
Expand All @@ -29,6 +28,7 @@ solana-net-utils = { workspace = true }
solana-program-test = { workspace = true }
solana-rpc = { workspace = true }
solana-rpc-client = { workspace = true }
solana-rpc-client-api = { workspace = true }
solana-runtime = { workspace = true }
solana-sdk = { workspace = true }
solana-streamer = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion test-validator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use {
utils::create_accounts_run_and_snapshot_dirs,
},
solana_cli_output::CliAccount,
solana_client::rpc_request::MAX_MULTIPLE_ACCOUNTS,
solana_compute_budget::compute_budget::ComputeBudget,
solana_core::{
admin_rpc_post_init::AdminRpcRequestMetadataPostInit,
Expand All @@ -32,6 +31,7 @@ use {
solana_net_utils::PortRange,
solana_rpc::{rpc::JsonRpcConfig, rpc_pubsub_service::PubSubConfig},
solana_rpc_client::{nonblocking, rpc_client::RpcClient},
solana_rpc_client_api::request::MAX_MULTIPLE_ACCOUNTS,
solana_runtime::{
bank_forks::BankForks, genesis_utils::create_genesis_config_with_leader_ex,
runtime_config::RuntimeConfig, snapshot_config::SnapshotConfig,
Expand Down