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

remove solana-sdk from tpu-client #3842

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft
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
69 changes: 68 additions & 1 deletion Cargo.lock

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

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ members = [
"sdk/borsh",
"sdk/cargo-build-sbf",
"sdk/cargo-test-sbf",
"sdk/client-traits",
"sdk/clock",
"sdk/cluster-type",
"sdk/commitment-config",
Expand Down Expand Up @@ -171,6 +172,7 @@ members = [
"sdk/sysvar",
"sdk/sysvar-id",
"sdk/time-utils",
"sdk/transaction",
"sdk/transaction-context",
"sdk/transaction-error",
"send-transaction-service",
Expand Down Expand Up @@ -437,6 +439,7 @@ solana-cli = { path = "cli", version = "=2.2.0" }
solana-cli-config = { path = "cli-config", version = "=2.2.0" }
solana-cli-output = { path = "cli-output", version = "=2.2.0" }
solana-client = { path = "client", version = "=2.2.0" }
solana-client-traits = { path = "sdk/client-traits", version = "=2.2.0" }
solana-clock = { path = "sdk/clock", version = "=2.2.0" }
solana-cluster-type = { path = "sdk/cluster-type", version = "=2.2.0" }
solana-commitment-config = { path = "sdk/commitment-config", version = "=2.2.0" }
Expand Down Expand Up @@ -564,6 +567,7 @@ solana-sysvar = { path = "sdk/sysvar", version = "=2.2.0" }
solana-sysvar-id = { path = "sdk/sysvar-id", version = "=2.2.0" }
solana-test-validator = { path = "test-validator", version = "=2.2.0" }
solana-thin-client = { path = "thin-client", version = "=2.2.0" }
solana-transaction = { path = "sdk/transaction", version = "=2.2.0" }
solana-transaction-error = { path = "sdk/transaction-error", version = "=2.2.0" }
solana-tpu-client = { path = "tpu-client", version = "=2.2.0", default-features = false }
solana-tpu-client-next = { path = "tpu-client-next", version = "=2.2.0" }
Expand Down
2 changes: 1 addition & 1 deletion gossip/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub(crate) const PULL_RESPONSE_MIN_SERIALIZED_SIZE: usize = 161;
#[cfg_attr(
feature = "frozen-abi",
derive(AbiExample, AbiEnumVisitor),
frozen_abi(digest = "D8HvpYCkdo6JweUW61WQ9ZQH2AFvzh3G1qthicnvz4E8")
frozen_abi(digest = "CFvnYRePV1TT51ArsF5Js69ntt1CJpWxJGq4kMJVnNjk")
)]
#[derive(Serialize, Deserialize, Debug)]
#[allow(clippy::large_enum_variant)]
Expand Down
57 changes: 56 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: 6 additions & 6 deletions rpc/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8533,7 +8533,7 @@ pub mod tests {
decode_and_deserialize::<Transaction>(tx58, TransactionBinaryEncoding::Base58)
.unwrap_err(),
Error::invalid_params(format!(
"base58 encoded solana_sdk::transaction::Transaction too large: {tx58_len} bytes (max: encoded/raw {MAX_BASE58_SIZE}/{PACKET_DATA_SIZE})",
"base58 encoded solana_transaction::Transaction too large: {tx58_len} bytes (max: encoded/raw {MAX_BASE58_SIZE}/{PACKET_DATA_SIZE})",
)
));

Expand All @@ -8543,7 +8543,7 @@ pub mod tests {
decode_and_deserialize::<Transaction>(tx64, TransactionBinaryEncoding::Base64)
.unwrap_err(),
Error::invalid_params(format!(
"base64 encoded solana_sdk::transaction::Transaction too large: {tx64_len} bytes (max: encoded/raw {MAX_BASE64_SIZE}/{PACKET_DATA_SIZE})",
"base64 encoded solana_transaction::Transaction too large: {tx64_len} bytes (max: encoded/raw {MAX_BASE64_SIZE}/{PACKET_DATA_SIZE})",
)
));

Expand All @@ -8554,7 +8554,7 @@ pub mod tests {
decode_and_deserialize::<Transaction>(tx58, TransactionBinaryEncoding::Base58)
.unwrap_err(),
Error::invalid_params(format!(
"decoded solana_sdk::transaction::Transaction too large: {too_big} bytes (max: {PACKET_DATA_SIZE} bytes)"
"decoded solana_transaction::Transaction too large: {too_big} bytes (max: {PACKET_DATA_SIZE} bytes)"
))
);

Expand All @@ -8563,7 +8563,7 @@ pub mod tests {
decode_and_deserialize::<Transaction>(tx64, TransactionBinaryEncoding::Base64)
.unwrap_err(),
Error::invalid_params(format!(
"decoded solana_sdk::transaction::Transaction too large: {too_big} bytes (max: {PACKET_DATA_SIZE} bytes)"
"decoded solana_transaction::Transaction too large: {too_big} bytes (max: {PACKET_DATA_SIZE} bytes)"
))
);

Expand All @@ -8573,7 +8573,7 @@ pub mod tests {
decode_and_deserialize::<Transaction>(tx64.clone(), TransactionBinaryEncoding::Base64)
.unwrap_err(),
Error::invalid_params(
"failed to deserialize solana_sdk::transaction::Transaction: invalid value: \
"failed to deserialize solana_transaction::Transaction: invalid value: \
continue signal on byte-three, expected a terminal signal on or before byte-three"
.to_string()
)
Expand All @@ -8591,7 +8591,7 @@ pub mod tests {
decode_and_deserialize::<Transaction>(tx58.clone(), TransactionBinaryEncoding::Base58)
.unwrap_err(),
Error::invalid_params(
"failed to deserialize solana_sdk::transaction::Transaction: invalid value: \
"failed to deserialize solana_transaction::Transaction: invalid value: \
continue signal on byte-three, expected a terminal signal on or before byte-three"
.to_string()
)
Expand Down
13 changes: 12 additions & 1 deletion sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ full = [
"solana-commitment-config",
"digest",
"solana-pubkey/rand",
"dep:solana-client-traits",
"dep:solana-cluster-type",
"dep:solana-ed25519-program",
"dep:solana-compute-budget-interface",
Expand All @@ -47,6 +48,7 @@ full = [
"dep:solana-seed-derivable",
"dep:solana-seed-phrase",
"dep:solana-signer",
"dep:solana-transaction",
"dep:solana-transaction-error",
]
borsh = [
Expand All @@ -60,6 +62,7 @@ dev-context-only-utils = [
"solana-account/dev-context-only-utils",
"solana-compute-budget-interface/dev-context-only-utils",
"solana-rent-debits/dev-context-only-utils",
"solana-transaction/dev-context-only-utils",
"solana-transaction-context/dev-context-only-utils",
]
frozen-abi = [
Expand All @@ -74,7 +77,8 @@ frozen-abi = [
"solana-reward-info/frozen-abi",
"solana-short-vec/frozen-abi",
"solana-signature/frozen-abi",
"solana-transaction-error/frozen-abi",
"solana-transaction/frozen-abi",
"solana-transaction-error/frozen-abi"
]
# Enables the "vendored" feature of openssl inside of secp256r1-program
openssl-vendored = ["solana-precompiles/openssl-vendored"]
Expand Down Expand Up @@ -112,6 +116,7 @@ sha3 = { workspace = true, optional = true }
siphasher = { workspace = true }
solana-account = { workspace = true, features = ["bincode"] }
solana-bn254 = { workspace = true }
solana-client-traits = { workspace = true, optional = true }
solana-cluster-type = { workspace = true, features = [
"serde",
], optional = true }
Expand Down Expand Up @@ -173,6 +178,12 @@ solana-signature = { workspace = true, features = [
], optional = true }
solana-signer = { workspace = true, optional = true }
solana-time-utils = { workspace = true }
solana-transaction = { workspace = true, features = [
"bincode",
"precompiles",
"serde",
"verify"
], optional = true }
solana-transaction-context = { workspace = true, features = ["bincode"] }
solana-transaction-error = { workspace = true, features = [
"serde",
Expand Down
27 changes: 27 additions & 0 deletions sdk/client-traits/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[package]
name = "solana-client-traits"
description = "Traits for Solana clients"
documentation = "https://docs.rs/solana-client-traits"
version = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
edition = { workspace = true }

[dependencies]
solana-account = { workspace = true }
solana-commitment-config = { workspace = true }
solana-epoch-info = { workspace = true }
solana-hash = { workspace = true }
solana-instruction = { workspace = true }
solana-keypair = { workspace = true }
solana-program = { workspace = true }
solana-pubkey = { workspace = true }
solana-signature = { workspace = true }
solana-signer = { workspace = true }
solana-transaction = { workspace = true }
solana-transaction-error = { workspace = true }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Loading
Loading