diff --git a/Cargo.lock b/Cargo.lock
index 50042ccc311f2e..5e79950af54b42 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -8306,12 +8306,29 @@ dependencies = [
"serde",
"serde_derive",
"serde_json",
+ "solana-account",
"solana-account-decoder",
"solana-account-decoder-client-types",
+ "solana-clock",
+ "solana-commitment-config",
+ "solana-epoch-info",
+ "solana-epoch-schedule",
+ "solana-feature-gate-interface",
+ "solana-hash",
+ "solana-instruction",
+ "solana-keypair",
+ "solana-message",
+ "solana-program",
+ "solana-pubkey",
"solana-rpc-client-api",
- "solana-sdk",
+ "solana-signature",
+ "solana-signer",
+ "solana-system-transaction",
+ "solana-transaction",
+ "solana-transaction-error",
"solana-transaction-status-client-types",
"solana-version",
+ "static_assertions",
"tokio",
]
diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock
index e33cf437905ca9..55107d5a55cf9c 100644
--- a/programs/sbf/Cargo.lock
+++ b/programs/sbf/Cargo.lock
@@ -6573,9 +6573,21 @@ dependencies = [
"serde",
"serde_derive",
"serde_json",
+ "solana-account",
"solana-account-decoder-client-types",
+ "solana-clock",
+ "solana-commitment-config",
+ "solana-epoch-info",
+ "solana-epoch-schedule",
+ "solana-feature-gate-interface",
+ "solana-hash",
+ "solana-instruction",
+ "solana-message",
+ "solana-pubkey",
"solana-rpc-client-api",
- "solana-sdk",
+ "solana-signature",
+ "solana-transaction",
+ "solana-transaction-error",
"solana-transaction-status-client-types",
"solana-version",
"tokio",
diff --git a/rpc-client-nonce-utils/Cargo.toml b/rpc-client-nonce-utils/Cargo.toml
index 0c861a54bdd92b..e3ebdfea412735 100644
--- a/rpc-client-nonce-utils/Cargo.toml
+++ b/rpc-client-nonce-utils/Cargo.toml
@@ -11,12 +11,12 @@ edition = { workspace = true }
[dependencies]
clap = { version = "2.33.0", optional = true }
-solana-account = { workspace = true }
+solana-account = { workspace = true, features = ["bincode"] }
solana-clap-utils = { workspace = true, optional = true }
solana-commitment-config = { workspace = true }
solana-hash = { workspace = true }
solana-message = { workspace = true }
-solana-nonce = { workspace = true }
+solana-nonce = { workspace = true, features = ["serde"] }
solana-pubkey = { workspace = true }
solana-rpc-client = { workspace = true }
solana-sdk-ids = { workspace = true }
diff --git a/rpc-client/Cargo.toml b/rpc-client/Cargo.toml
index bb5adfef1d36c2..e26ca3b539eaa9 100644
--- a/rpc-client/Cargo.toml
+++ b/rpc-client/Cargo.toml
@@ -22,9 +22,21 @@ semver = { workspace = true }
serde = { workspace = true }
serde_derive = { workspace = true }
serde_json = { workspace = true }
+solana-account = { workspace = true }
solana-account-decoder-client-types = { workspace = true, features = ["zstd"] }
+solana-clock = { workspace = true }
+solana-commitment-config = { workspace = true }
+solana-epoch-info = { workspace = true, features = ["serde"] }
+solana-epoch-schedule = { workspace = true, features = ["serde"] }
+solana-feature-gate-interface = { workspace = true, features = ["serde"] }
+solana-hash = { workspace = true }
+solana-instruction = { workspace = true }
+solana-message = { workspace = true }
+solana-pubkey = { workspace = true }
solana-rpc-client-api = { workspace = true }
-solana-sdk = { workspace = true }
+solana-signature = { workspace = true }
+solana-transaction = { workspace = true, features = ["bincode"] }
+solana-transaction-error = { workspace = true }
solana-transaction-status-client-types = { workspace = true }
solana-version = { workspace = true }
tokio = { workspace = true, features = ["full"] }
@@ -36,6 +48,11 @@ futures = { workspace = true }
jsonrpc-core = { workspace = true }
jsonrpc-http-server = { workspace = true }
solana-account-decoder = { workspace = true }
+solana-keypair = { workspace = true }
+solana-program = { workspace = true, default-features = false }
+solana-signer = { workspace = true }
+solana-system-transaction = { workspace = true }
+static_assertions = { workspace = true }
[features]
default = ["spinner"]
diff --git a/rpc-client/src/mock_sender.rs b/rpc-client/src/mock_sender.rs
index 92e384ecc89a94..c81a6afe042bc8 100644
--- a/rpc-client/src/mock_sender.rs
+++ b/rpc-client/src/mock_sender.rs
@@ -6,6 +6,12 @@ use {
base64::{prelude::BASE64_STANDARD, Engine},
serde_json::{json, Number, Value},
solana_account_decoder_client_types::{UiAccount, UiAccountData, UiAccountEncoding},
+ solana_clock::{Slot, UnixTimestamp},
+ solana_epoch_info::EpochInfo,
+ solana_epoch_schedule::EpochSchedule,
+ solana_instruction::error::InstructionError,
+ solana_message::MessageHeader,
+ solana_pubkey::Pubkey,
solana_rpc_client_api::{
client_error::Result,
config::RpcBlockProductionConfig,
@@ -19,16 +25,9 @@ use {
RpcVoteAccountStatus,
},
},
- solana_sdk::{
- clock::{Slot, UnixTimestamp},
- epoch_info::EpochInfo,
- instruction::InstructionError,
- message::MessageHeader,
- pubkey::Pubkey,
- signature::Signature,
- sysvar::epoch_schedule::EpochSchedule,
- transaction::{self, Transaction, TransactionError, TransactionVersion},
- },
+ solana_signature::Signature,
+ solana_transaction::{versioned::TransactionVersion, Transaction},
+ solana_transaction_error::{TransactionError, TransactionResult},
solana_transaction_status_client_types::{
option_serializer::OptionSerializer, EncodedConfirmedBlock,
EncodedConfirmedTransactionWithStatusMeta, EncodedTransaction,
@@ -124,7 +123,7 @@ impl RpcSender for MockSender {
transaction_count: Some(123),
})?,
"getSignatureStatuses" => {
- let status: transaction::Result<()> = if self.url == "account_in_use" {
+ let status: TransactionResult<()> = if self.url == "account_in_use" {
Err(TransactionError::AccountInUse)
} else if self.url == "instruction_error" {
Err(TransactionError::InstructionError(
@@ -455,7 +454,7 @@ pub(crate) fn mock_encoded_account(pubkey: &Pubkey) -> UiAccount {
#[cfg(test)]
mod tests {
- use {super::*, solana_account_decoder::encode_ui_account, solana_sdk::account::Account};
+ use {super::*, solana_account::Account, solana_account_decoder::encode_ui_account};
#[test]
fn test_mock_encoded_account() {
diff --git a/rpc-client/src/nonblocking/rpc_client.rs b/rpc-client/src/nonblocking/rpc_client.rs
index 33bf1c119bd2f5..7d509fc80f7bb3 100644
--- a/rpc-client/src/nonblocking/rpc_client.rs
+++ b/rpc-client/src/nonblocking/rpc_client.rs
@@ -8,7 +8,7 @@
pub use crate::mock_sender::Mocks;
#[cfg(feature = "spinner")]
-use {crate::spinner, solana_sdk::clock::MAX_HASH_AGE_IN_SECONDS, std::cmp::min};
+use {crate::spinner, solana_clock::MAX_HASH_AGE_IN_SECONDS, std::cmp::min};
use {
crate::{
http_sender::HttpSender,
@@ -23,10 +23,17 @@ use {
bincode::serialize,
log::*,
serde_json::{json, Value},
+ solana_account::Account,
solana_account_decoder_client_types::{
token::{TokenAccountType, UiTokenAccount, UiTokenAmount},
UiAccount, UiAccountData, UiAccountEncoding,
},
+ solana_clock::{Epoch, Slot, UnixTimestamp, DEFAULT_MS_PER_SLOT},
+ solana_commitment_config::CommitmentConfig,
+ solana_epoch_info::EpochInfo,
+ solana_epoch_schedule::EpochSchedule,
+ solana_hash::Hash,
+ solana_pubkey::Pubkey,
solana_rpc_client_api::{
client_error::{
Error as ClientError, ErrorKind as ClientErrorKind, Result as ClientResult,
@@ -35,18 +42,8 @@ use {
request::{RpcError, RpcRequest, RpcResponseErrorData, TokenAccountsFilter},
response::*,
},
- solana_sdk::{
- account::Account,
- clock::{Epoch, Slot, UnixTimestamp, DEFAULT_MS_PER_SLOT},
- commitment_config::CommitmentConfig,
- epoch_info::EpochInfo,
- epoch_schedule::EpochSchedule,
- hash::Hash,
- pubkey::Pubkey,
- signature::Signature,
- transaction,
- vote::state::MAX_LOCKOUT_HISTORY,
- },
+ solana_signature::Signature,
+ solana_transaction_error::TransactionResult,
solana_transaction_status_client_types::{
EncodedConfirmedBlock, EncodedConfirmedTransactionWithStatusMeta, TransactionStatus,
UiConfirmedBlock, UiTransactionEncoding,
@@ -58,6 +55,13 @@ use {
},
tokio::time::sleep,
};
+// inlined to avoid a solana_program dep
+const MAX_LOCKOUT_HISTORY: usize = 31;
+#[cfg(test)]
+static_assertions::const_assert_eq!(
+ MAX_LOCKOUT_HISTORY,
+ solana_program::vote::state::MAX_LOCKOUT_HISTORY
+);
/// A client of a remote Solana node.
///
@@ -115,14 +119,15 @@ use {
/// field, so it is common for the value to be accessed with `?.value`, as in
///
/// ```
-/// # use solana_sdk::system_transaction;
+/// # use solana_hash::Hash;
+/// # use solana_system_transaction as system_transaction;
/// # use solana_rpc_client_api::client_error::Error;
/// # use solana_rpc_client::rpc_client::RpcClient;
-/// # use solana_sdk::signature::{Keypair, Signer};
-/// # use solana_sdk::hash::Hash;
+/// # use solana_keypair::Keypair;
+/// # use solana_signer::Signer;
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
/// # let key = Keypair::new();
-/// # let to = solana_sdk::pubkey::new_rand();
+/// # let to = solana_pubkey::new_rand();
/// # let lamports = 50;
/// # let latest_blockhash = Hash::default();
/// # let tx = system_transaction::transfer(&key, &to, lamports, latest_blockhash);
@@ -193,7 +198,7 @@ impl RpcClient {
/// # Examples
///
/// ```
- /// # use solana_sdk::commitment_config::CommitmentConfig;
+ /// # use solana_commitment_config::CommitmentConfig;
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
/// let url = "http://localhost:8899".to_string();
/// let commitment_config = CommitmentConfig::processed();
@@ -244,7 +249,7 @@ impl RpcClient {
/// ```
/// # use std::time::Duration;
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::commitment_config::CommitmentConfig;
+ /// # use solana_commitment_config::CommitmentConfig;
/// let url = "http://localhost::8899".to_string();
/// let timeout = Duration::from_secs(1);
/// let commitment_config = CommitmentConfig::processed();
@@ -285,7 +290,7 @@ impl RpcClient {
/// ```
/// # use std::time::Duration;
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::commitment_config::CommitmentConfig;
+ /// # use solana_commitment_config::CommitmentConfig;
/// let url = "http://localhost::8899".to_string();
/// let timeout = Duration::from_secs(1);
/// let commitment_config = CommitmentConfig::processed();
@@ -465,7 +470,7 @@ impl RpcClient {
/// ```
/// # use std::net::{Ipv4Addr, SocketAddr};
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::commitment_config::CommitmentConfig;
+ /// # use solana_commitment_config::CommitmentConfig;
/// let addr = SocketAddr::from((Ipv4Addr::LOCALHOST, 8899));
/// let commitment_config = CommitmentConfig::processed();
/// let client = RpcClient::new_socket_with_commitment(
@@ -571,12 +576,10 @@ impl RpcClient {
/// ```
/// # use solana_rpc_client_api::client_error::Error;
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::{
- /// # signature::Signer,
- /// # signature::Signature,
- /// # signer::keypair::Keypair,
- /// # system_transaction,
- /// # };
+ /// # use solana_keypair::Keypair;
+ /// # use solana_system_transaction as system_transaction;
+ /// # use solana_signature::Signature;
+ /// # use solana_signer::Signer;
/// # futures::executor::block_on(async {
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
/// # let alice = Keypair::new();
@@ -742,13 +745,11 @@ impl RpcClient {
/// ```
/// # use solana_rpc_client_api::client_error::Error;
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::{
- /// # signature::Signer,
- /// # signature::Signature,
- /// # signer::keypair::Keypair,
- /// # hash::Hash,
- /// # system_transaction,
- /// # };
+ /// # use solana_hash::Hash;
+ /// # use solana_keypair::Keypair;
+ /// # use solana_system_transaction as system_transaction;
+ /// # use solana_signature::Signature;
+ /// # use solana_signer::Signer;
/// # futures::executor::block_on(async {
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
/// // Transfer lamports from Alice to Bob
@@ -830,13 +831,11 @@ impl RpcClient {
/// # config::RpcSendTransactionConfig,
/// # };
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::{
- /// # signature::Signer,
- /// # signature::Signature,
- /// # signer::keypair::Keypair,
- /// # hash::Hash,
- /// # system_transaction,
- /// # };
+ /// # use solana_hash::Hash;
+ /// # use solana_keypair::Keypair;
+ /// # use solana_system_transaction as system_transaction;
+ /// # use solana_signature::Signature;
+ /// # use solana_signer::Signer;
/// # futures::executor::block_on(async {
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
/// // Transfer lamports from Alice to Bob
@@ -950,12 +949,10 @@ impl RpcClient {
/// ```
/// # use solana_rpc_client_api::client_error::Error;
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::{
- /// # signature::Signer,
- /// # signature::Signature,
- /// # signer::keypair::Keypair,
- /// # system_transaction,
- /// # };
+ /// # use solana_keypair::Keypair;
+ /// # use solana_system_transaction as system_transaction;
+ /// # use solana_signature::Signature;
+ /// # use solana_signer::Signer;
/// # futures::executor::block_on(async {
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
/// // Transfer lamports from Alice to Bob and wait for confirmation
@@ -1009,13 +1006,11 @@ impl RpcClient {
/// ```
/// # use solana_rpc_client_api::client_error::Error;
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::{
- /// # commitment_config::CommitmentConfig,
- /// # signature::Signer,
- /// # signature::Signature,
- /// # signer::keypair::Keypair,
- /// # system_transaction,
- /// # };
+ /// # use solana_commitment_config::CommitmentConfig;
+ /// # use solana_keypair::Keypair;
+ /// # use solana_signature::Signature;
+ /// # use solana_signer::Signer;
+ /// # use solana_system_transaction as system_transaction;
/// # use std::time::Duration;
/// # futures::executor::block_on(async {
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
@@ -1184,13 +1179,11 @@ impl RpcClient {
/// # response::RpcSimulateTransactionResult,
/// # };
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::{
- /// # signature::Signer,
- /// # signature::Signature,
- /// # signer::keypair::Keypair,
- /// # hash::Hash,
- /// # system_transaction,
- /// # };
+ /// # use solana_hash::Hash;
+ /// # use solana_keypair::Keypair;
+ /// # use solana_system_transaction as system_transaction;
+ /// # use solana_signature::Signature;
+ /// # use solana_signer::Signer;
/// # futures::executor::block_on(async {
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
/// // Transfer lamports from Alice to Bob
@@ -1259,18 +1252,16 @@ impl RpcClient {
/// # Examples
///
/// ```
+ /// # use solana_hash::Hash;
+ /// # use solana_keypair::Keypair;
/// # use solana_rpc_client_api::{
/// # client_error::Error,
/// # config::RpcSimulateTransactionConfig,
/// # response::RpcSimulateTransactionResult,
/// # };
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::{
- /// # signature::Signer,
- /// # signer::keypair::Keypair,
- /// # hash::Hash,
- /// # system_transaction,
- /// # };
+ /// # use solana_signer::Signer;
+ /// # use solana_system_transaction as system_transaction;
/// # futures::executor::block_on(async {
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
/// // Transfer lamports from Alice to Bob
@@ -1355,11 +1346,11 @@ impl RpcClient {
/// and the transaction failed, this method returns `Ok(Some(Err(_)))`,
/// where the interior error is type [`TransactionError`].
///
- /// [`TransactionError`]: solana_sdk::transaction::TransactionError
+ /// [`TransactionError`]: solana_transaction_error::TransactionError
///
/// This function only searches a node's recent history, including all
/// recent slots, plus up to
- /// [`MAX_RECENT_BLOCKHASHES`][solana_sdk::clock::MAX_RECENT_BLOCKHASHES]
+ /// [`MAX_RECENT_BLOCKHASHES`][solana_clock::MAX_RECENT_BLOCKHASHES]
/// rooted slots. To search the full transaction history use the
/// [`get_signature_status_with_commitment_and_history`][RpcClient::get_signature_status_with_commitment_and_history]
/// method.
@@ -1375,13 +1366,11 @@ impl RpcClient {
/// ```
/// # use solana_rpc_client_api::client_error::Error;
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::{
- /// # signature::Signer,
- /// # signature::Signature,
- /// # signer::keypair::Keypair,
- /// # hash::Hash,
- /// # system_transaction,
- /// # };
+ /// # use solana_hash::Hash;
+ /// # use solana_keypair::Keypair;
+ /// # use solana_system_transaction as system_transaction;
+ /// # use solana_signature::Signature;
+ /// # use solana_signer::Signer;
/// # futures::executor::block_on(async {
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
/// # let alice = Keypair::new();
@@ -1398,7 +1387,7 @@ impl RpcClient {
pub async fn get_signature_status(
&self,
signature: &Signature,
- ) -> ClientResult