diff --git a/Cargo.lock b/Cargo.lock index 8df165733c5c87..278851a56f8508 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -239,9 +239,19 @@ dependencies = [ "agave-transaction-view", "bincode", "criterion", - "solana-sdk", + "solana-hash", + "solana-instruction", + "solana-keypair", + "solana-message", + "solana-packet", + "solana-pubkey", "solana-sdk-ids", + "solana-short-vec", + "solana-signature", + "solana-signer", "solana-svm-transaction", + "solana-system-interface", + "solana-transaction", ] [[package]] diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index d30186c24c18d6..1255b38bdc2336 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -77,8 +77,13 @@ dependencies = [ name = "agave-transaction-view" version = "2.2.0" dependencies = [ - "solana-sdk", + "solana-hash", + "solana-message", + "solana-packet", + "solana-pubkey", "solana-sdk-ids", + "solana-short-vec", + "solana-signature", "solana-svm-transaction", ] diff --git a/svm/examples/Cargo.lock b/svm/examples/Cargo.lock index 1b7291092c71ac..4c339ef24f31d9 100644 --- a/svm/examples/Cargo.lock +++ b/svm/examples/Cargo.lock @@ -77,8 +77,13 @@ dependencies = [ name = "agave-transaction-view" version = "2.2.0" dependencies = [ - "solana-sdk", + "solana-hash", + "solana-message", + "solana-packet", + "solana-pubkey", "solana-sdk-ids", + "solana-short-vec", + "solana-signature", "solana-svm-transaction", ] diff --git a/transaction-view/Cargo.toml b/transaction-view/Cargo.toml index cb4a43aa7753bd..575e2022139d50 100644 --- a/transaction-view/Cargo.toml +++ b/transaction-view/Cargo.toml @@ -10,8 +10,13 @@ license = { workspace = true } edition = { workspace = true } [dependencies] -solana-sdk = { workspace = true } +solana-hash = { workspace = true } +solana-message = { workspace = true } +solana-packet = { workspace = true } +solana-pubkey = { workspace = true } solana-sdk-ids = { workspace = true } +solana-short-vec = { workspace = true } +solana-signature = { workspace = true } solana-svm-transaction = { workspace = true } [dev-dependencies] @@ -19,6 +24,13 @@ solana-svm-transaction = { workspace = true } agave-transaction-view = { path = ".", features = ["dev-context-only-utils"] } bincode = { workspace = true } criterion = { workspace = true } +solana-instruction = { workspace = true } +solana-keypair = { workspace = true } +solana-message = { workspace = true, features = ["serde"] } +solana-signature = { workspace = true, features = ["serde"] } +solana-signer = { workspace = true } +solana-system-interface = { workspace = true, features = ["bincode"] } +solana-transaction = { workspace = true, features = ["bincode"] } [features] dev-context-only-utils = [] diff --git a/transaction-view/benches/bytes.rs b/transaction-view/benches/bytes.rs index e5803cf1dec822..d60cfdc8141530 100644 --- a/transaction-view/benches/bytes.rs +++ b/transaction-view/benches/bytes.rs @@ -2,10 +2,8 @@ use { agave_transaction_view::bytes::{optimized_read_compressed_u16, read_compressed_u16}, bincode::{serialize_into, DefaultOptions, Options}, criterion::{black_box, criterion_group, criterion_main, Criterion, Throughput}, - solana_sdk::{ - packet::PACKET_DATA_SIZE, - short_vec::{decode_shortu16_len, ShortU16}, - }, + solana_packet::PACKET_DATA_SIZE, + solana_short_vec::{decode_shortu16_len, ShortU16}, }; fn setup() -> Vec<(u16, usize, Vec)> { diff --git a/transaction-view/benches/transaction_view.rs b/transaction-view/benches/transaction_view.rs index 10901023908fcd..815cf59d4076a8 100644 --- a/transaction-view/benches/transaction_view.rs +++ b/transaction-view/benches/transaction_view.rs @@ -4,18 +4,18 @@ use { black_box, criterion_group, criterion_main, measurement::Measurement, BenchmarkGroup, Criterion, Throughput, }, - solana_sdk::{ - hash::Hash, - instruction::Instruction, - message::{ - v0::{self, MessageAddressTableLookup}, - Message, MessageHeader, VersionedMessage, - }, - pubkey::Pubkey, - signature::Keypair, - signer::Signer, - system_instruction, - transaction::{SanitizedVersionedTransaction, VersionedTransaction}, + solana_hash::Hash, + solana_instruction::Instruction, + solana_keypair::Keypair, + solana_message::{ + v0::{self, MessageAddressTableLookup}, + Message, MessageHeader, VersionedMessage, + }, + solana_pubkey::Pubkey, + solana_signer::Signer, + solana_system_interface::instruction as system_instruction, + solana_transaction::versioned::{ + sanitized::SanitizedVersionedTransaction, VersionedTransaction, }, }; diff --git a/transaction-view/src/address_table_lookup_frame.rs b/transaction-view/src/address_table_lookup_frame.rs index 307e328a7cacba..b56f7c8c937dcc 100644 --- a/transaction-view/src/address_table_lookup_frame.rs +++ b/transaction-view/src/address_table_lookup_frame.rs @@ -7,7 +7,10 @@ use { result::{Result, TransactionViewError}, }, core::fmt::{Debug, Formatter}, - solana_sdk::{hash::Hash, packet::PACKET_DATA_SIZE, pubkey::Pubkey, signature::Signature}, + solana_hash::Hash, + solana_packet::PACKET_DATA_SIZE, + solana_pubkey::Pubkey, + solana_signature::Signature, solana_svm_transaction::message_address_table_lookup::SVMMessageAddressTableLookup, }; @@ -211,10 +214,7 @@ impl Debug for AddressTableLookupIterator<'_> { #[cfg(test)] mod tests { - use { - super::*, - solana_sdk::{message::v0::MessageAddressTableLookup, short_vec::ShortVec}, - }; + use {super::*, solana_message::v0::MessageAddressTableLookup, solana_short_vec::ShortVec}; #[test] fn test_zero_atls() { diff --git a/transaction-view/src/bytes.rs b/transaction-view/src/bytes.rs index 6a147b69c2038e..bde60b9d515216 100644 --- a/transaction-view/src/bytes.rs +++ b/transaction-view/src/bytes.rs @@ -199,7 +199,8 @@ mod tests { use { super::*, bincode::{serialize_into, DefaultOptions, Options}, - solana_sdk::{packet::PACKET_DATA_SIZE, short_vec::ShortU16}, + solana_packet::PACKET_DATA_SIZE, + solana_short_vec::ShortU16, }; #[test] diff --git a/transaction-view/src/instructions_frame.rs b/transaction-view/src/instructions_frame.rs index 9e25c9743542be..5d03e1d506dd85 100644 --- a/transaction-view/src/instructions_frame.rs +++ b/transaction-view/src/instructions_frame.rs @@ -149,8 +149,8 @@ impl Debug for InstructionsIterator<'_> { #[cfg(test)] mod tests { use { - super::*, - solana_sdk::{instruction::CompiledInstruction, short_vec::ShortVec}, + super::*, solana_message::compiled_instruction::CompiledInstruction, + solana_short_vec::ShortVec, }; #[test] diff --git a/transaction-view/src/message_header_frame.rs b/transaction-view/src/message_header_frame.rs index bfaec5092db3b1..1fca4e407ebb85 100644 --- a/transaction-view/src/message_header_frame.rs +++ b/transaction-view/src/message_header_frame.rs @@ -4,7 +4,7 @@ use { result::{Result, TransactionViewError}, transaction_version::TransactionVersion, }, - solana_sdk::message::MESSAGE_VERSION_PREFIX, + solana_message::MESSAGE_VERSION_PREFIX, }; /// Metadata for accessing message header fields in a transaction view. diff --git a/transaction-view/src/resolved_transaction_view.rs b/transaction-view/src/resolved_transaction_view.rs index 98d395bc9dc749..0eb69616c800cd 100644 --- a/transaction-view/src/resolved_transaction_view.rs +++ b/transaction-view/src/resolved_transaction_view.rs @@ -9,15 +9,13 @@ use { fmt::{Debug, Formatter}, ops::Deref, }, - solana_sdk::{ - bpf_loader_upgradeable, ed25519_program, - hash::Hash, - message::{v0::LoadedAddresses, AccountKeys, TransactionSignatureDetails}, - pubkey::Pubkey, - secp256k1_program, - signature::Signature, + solana_hash::Hash, + solana_message::{v0::LoadedAddresses, AccountKeys, TransactionSignatureDetails}, + solana_pubkey::Pubkey, + solana_sdk_ids::{ + bpf_loader_upgradeable, ed25519_program, secp256k1_program, secp256r1_program, }, - solana_sdk_ids::secp256r1_program, + solana_signature::Signature, solana_svm_transaction::{ instruction::SVMInstruction, message_address_table_lookup::SVMMessageAddressTableLookup, svm_message::SVMMessage, svm_transaction::SVMTransaction, @@ -222,7 +220,7 @@ impl SVMMessage for ResolvedTransactionView { &self, ) -> impl Iterator< Item = ( - &solana_sdk::pubkey::Pubkey, + &solana_pubkey::Pubkey, solana_svm_transaction::instruction::SVMInstruction, ), > + Clone { @@ -289,16 +287,14 @@ mod tests { use { super::*, crate::transaction_view::SanitizedTransactionView, - solana_sdk::{ - instruction::CompiledInstruction, - message::{ - v0::{self, MessageAddressTableLookup}, - MessageHeader, VersionedMessage, - }, - signature::Signature, - system_program, sysvar, - transaction::VersionedTransaction, + solana_message::{ + compiled_instruction::CompiledInstruction, + v0::{self, MessageAddressTableLookup}, + MessageHeader, VersionedMessage, }, + solana_sdk_ids::{system_program, sysvar}, + solana_signature::Signature, + solana_transaction::versioned::VersionedTransaction, }; #[test] diff --git a/transaction-view/src/sanitize.rs b/transaction-view/src/sanitize.rs index 3e71bd30d32fde..992a24e3086d92 100644 --- a/transaction-view/src/sanitize.rs +++ b/transaction-view/src/sanitize.rs @@ -105,18 +105,16 @@ mod tests { use { super::*, crate::transaction_view::TransactionView, - solana_sdk::{ - hash::Hash, - instruction::CompiledInstruction, - message::{ - v0::{self, MessageAddressTableLookup}, - Message, MessageHeader, VersionedMessage, - }, - pubkey::Pubkey, - signature::Signature, - system_instruction, - transaction::VersionedTransaction, + solana_hash::Hash, + solana_message::{ + compiled_instruction::CompiledInstruction, + v0::{self, MessageAddressTableLookup}, + Message, MessageHeader, VersionedMessage, }, + solana_pubkey::Pubkey, + solana_signature::Signature, + solana_system_interface::instruction as system_instruction, + solana_transaction::versioned::VersionedTransaction, }; fn create_legacy_transaction( diff --git a/transaction-view/src/signature_frame.rs b/transaction-view/src/signature_frame.rs index 2f4e96b1e48883..5dee5902c20815 100644 --- a/transaction-view/src/signature_frame.rs +++ b/transaction-view/src/signature_frame.rs @@ -3,7 +3,9 @@ use { bytes::{advance_offset_for_array, read_byte}, result::{Result, TransactionViewError}, }, - solana_sdk::{packet::PACKET_DATA_SIZE, pubkey::Pubkey, signature::Signature}, + solana_packet::PACKET_DATA_SIZE, + solana_pubkey::Pubkey, + solana_signature::Signature, }; // The packet has a maximum length of 1232 bytes. @@ -51,7 +53,7 @@ impl SignatureFrame { #[cfg(test)] mod tests { - use {super::*, solana_sdk::short_vec::ShortVec}; + use {super::*, solana_short_vec::ShortVec}; #[test] fn test_zero_signatures() { diff --git a/transaction-view/src/static_account_keys_frame.rs b/transaction-view/src/static_account_keys_frame.rs index daea4401936ad3..73ea8887ccf8d9 100644 --- a/transaction-view/src/static_account_keys_frame.rs +++ b/transaction-view/src/static_account_keys_frame.rs @@ -3,7 +3,8 @@ use { bytes::{advance_offset_for_array, read_byte}, result::{Result, TransactionViewError}, }, - solana_sdk::{packet::PACKET_DATA_SIZE, pubkey::Pubkey}, + solana_packet::PACKET_DATA_SIZE, + solana_pubkey::Pubkey, }; // The packet has a maximum length of 1232 bytes. @@ -49,7 +50,7 @@ impl StaticAccountKeysFrame { #[cfg(test)] mod tests { - use {super::*, solana_sdk::short_vec::ShortVec}; + use {super::*, solana_short_vec::ShortVec}; #[test] fn test_zero_accounts() { diff --git a/transaction-view/src/transaction_frame.rs b/transaction-view/src/transaction_frame.rs index d2c97edbeb07bb..dc8b71c96f6aff 100644 --- a/transaction-view/src/transaction_frame.rs +++ b/transaction-view/src/transaction_frame.rs @@ -9,7 +9,9 @@ use { static_account_keys_frame::StaticAccountKeysFrame, transaction_version::TransactionVersion, }, - solana_sdk::{hash::Hash, pubkey::Pubkey, signature::Signature}, + solana_hash::Hash, + solana_pubkey::Pubkey, + solana_signature::Signature, }; #[derive(Debug)] @@ -258,14 +260,11 @@ impl TransactionFrame { mod tests { use { super::*, - solana_sdk::{ - address_lookup_table::AddressLookupTableAccount, - message::{v0, Message, MessageHeader, VersionedMessage}, - pubkey::Pubkey, - signature::Signature, - system_instruction::{self, SystemInstruction}, - transaction::VersionedTransaction, - }, + solana_message::{v0, AddressLookupTableAccount, Message, MessageHeader, VersionedMessage}, + solana_pubkey::Pubkey, + solana_signature::Signature, + solana_system_interface::instruction::{self as system_instruction, SystemInstruction}, + solana_transaction::versioned::VersionedTransaction, }; fn verify_transaction_view_frame(tx: &VersionedTransaction) { diff --git a/transaction-view/src/transaction_view.rs b/transaction-view/src/transaction_view.rs index c186902c053f89..d84507a6e004f8 100644 --- a/transaction-view/src/transaction_view.rs +++ b/transaction-view/src/transaction_view.rs @@ -6,7 +6,9 @@ use { transaction_version::TransactionVersion, }, core::fmt::{Debug, Formatter}, - solana_sdk::{hash::Hash, pubkey::Pubkey, signature::Signature}, + solana_hash::Hash, + solana_pubkey::Pubkey, + solana_signature::Signature, solana_svm_transaction::instruction::SVMInstruction, }; @@ -228,13 +230,11 @@ impl Debug for TransactionView