diff --git a/Cargo.lock b/Cargo.lock index 9d6ebdc4f58b82..3c006224870ccc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6277,19 +6277,45 @@ dependencies = [ "libsecp256k1", "rand 0.8.5", "scopeguard", + "solana-account", + "solana-account-info", + "solana-bincode", "solana-bn254", + "solana-clock", "solana-compute-budget", + "solana-cpi", "solana-curve25519", "solana-define-syscall", + "solana-epoch-rewards", + "solana-epoch-schedule", "solana-feature-set", + "solana-fee-calculator", + "solana-hash", + "solana-instruction", + "solana-keccak-hasher", + "solana-last-restart-slot", "solana-log-collector", "solana-measure", + "solana-packet", "solana-poseidon", + "solana-precompiles", + "solana-program", + "solana-program-entrypoint", "solana-program-memory", "solana-program-runtime", + "solana-pubkey", + "solana-rent", "solana-sbpf", - "solana-sdk", + "solana-sdk-ids", + "solana-secp256k1-recover", + "solana-sha256-hasher", + "solana-slot-hashes", + "solana-stable-layout", + "solana-system-interface", + "solana-sysvar", + "solana-sysvar-id", "solana-timings", + "solana-transaction-context", "solana-type-overrides", "test-case", "thiserror 2.0.9", diff --git a/programs/bpf_loader/Cargo.toml b/programs/bpf_loader/Cargo.toml index b7290567310d33..4ccb0da3ebdd5f 100644 --- a/programs/bpf_loader/Cargo.toml +++ b/programs/bpf_loader/Cargo.toml @@ -14,26 +14,53 @@ bincode = { workspace = true } byteorder = { workspace = true } libsecp256k1 = { workspace = true } scopeguard = { workspace = true } +solana-account = { workspace = true } +solana-account-info = { workspace = true } +solana-bincode = { workspace = true } solana-bn254 = { workspace = true } +solana-clock = { workspace = true } solana-compute-budget = { workspace = true } +solana-cpi = { workspace = true } solana-curve25519 = { workspace = true } solana-define-syscall = { workspace = true } solana-feature-set = { workspace = true } +solana-hash = { workspace = true } +solana-instruction = { workspace = true } +solana-keccak-hasher = { workspace = true } solana-log-collector = { workspace = true } solana-measure = { workspace = true } +solana-packet = { workspace = true } solana-poseidon = { workspace = true } +solana-precompiles = { workspace = true } +solana-program = { workspace = true } +solana-program-entrypoint = { workspace = true } solana-program-memory = { workspace = true } solana-program-runtime = { workspace = true, features = ["metrics"] } +solana-pubkey = { workspace = true } solana-sbpf = { workspace = true } -solana-sdk = { workspace = true } +solana-sdk-ids = { workspace = true } +solana-secp256k1-recover = { workspace = true } +solana-sha256-hasher = { workspace = true } +solana-stable-layout = { workspace = true } +solana-system-interface = { workspace = true } +solana-sysvar = { workspace = true } +solana-sysvar-id = { workspace = true } solana-timings = { workspace = true } +solana-transaction-context = { workspace = true, features = ["bincode"] } solana-type-overrides = { workspace = true } thiserror = { workspace = true } [dev-dependencies] assert_matches = { workspace = true } rand = { workspace = true } -solana-sdk = { workspace = true, features = ["dev-context-only-utils"] } +solana-epoch-rewards = { workspace = true } +solana-epoch-schedule = { workspace = true } +solana-fee-calculator = { workspace = true } +solana-last-restart-slot = { workspace = true } +solana-pubkey = { workspace = true, features = ["rand"] } +solana-rent = { workspace = true } +solana-slot-hashes = { workspace = true } +solana-transaction-context = { workspace = true, features = ["dev-context-only-utils"] } test-case = { workspace = true } [lib] diff --git a/programs/bpf_loader/benches/serialization.rs b/programs/bpf_loader/benches/serialization.rs index 5d3c55a165e399..c8d7a47678a3a0 100644 --- a/programs/bpf_loader/benches/serialization.rs +++ b/programs/bpf_loader/benches/serialization.rs @@ -3,19 +3,17 @@ extern crate test; use { + solana_account::{Account, AccountSharedData}, solana_bpf_loader_program::serialization::serialize_parameters, - solana_sdk::{ - account::{Account, AccountSharedData}, - bpf_loader, bpf_loader_deprecated, - pubkey::Pubkey, - sysvar::rent::Rent, - transaction_context::{IndexOfAccount, InstructionAccount, TransactionContext}, - }, + solana_pubkey::Pubkey, + solana_rent::Rent, + solana_sdk_ids::{bpf_loader, bpf_loader_deprecated}, + solana_transaction_context::{IndexOfAccount, InstructionAccount, TransactionContext}, test::Bencher, }; fn create_inputs(owner: Pubkey, num_instruction_accounts: usize) -> TransactionContext { - let program_id = solana_sdk::pubkey::new_rand(); + let program_id = solana_pubkey::new_rand(); let transaction_accounts = vec![ ( program_id, @@ -28,7 +26,7 @@ fn create_inputs(owner: Pubkey, num_instruction_accounts: usize) -> TransactionC }), ), ( - solana_sdk::pubkey::new_rand(), + solana_pubkey::new_rand(), AccountSharedData::from(Account { lamports: 1, data: vec![1u8; 100000], @@ -38,7 +36,7 @@ fn create_inputs(owner: Pubkey, num_instruction_accounts: usize) -> TransactionC }), ), ( - solana_sdk::pubkey::new_rand(), + solana_pubkey::new_rand(), AccountSharedData::from(Account { lamports: 2, data: vec![11u8; 100000], @@ -48,7 +46,7 @@ fn create_inputs(owner: Pubkey, num_instruction_accounts: usize) -> TransactionC }), ), ( - solana_sdk::pubkey::new_rand(), + solana_pubkey::new_rand(), AccountSharedData::from(Account { lamports: 3, data: vec![], @@ -58,7 +56,7 @@ fn create_inputs(owner: Pubkey, num_instruction_accounts: usize) -> TransactionC }), ), ( - solana_sdk::pubkey::new_rand(), + solana_pubkey::new_rand(), AccountSharedData::from(Account { lamports: 4, data: vec![1u8; 100000], @@ -68,7 +66,7 @@ fn create_inputs(owner: Pubkey, num_instruction_accounts: usize) -> TransactionC }), ), ( - solana_sdk::pubkey::new_rand(), + solana_pubkey::new_rand(), AccountSharedData::from(Account { lamports: 5, data: vec![11u8; 10000], @@ -78,7 +76,7 @@ fn create_inputs(owner: Pubkey, num_instruction_accounts: usize) -> TransactionC }), ), ( - solana_sdk::pubkey::new_rand(), + solana_pubkey::new_rand(), AccountSharedData::from(Account { lamports: 6, data: vec![], diff --git a/programs/bpf_loader/src/lib.rs b/programs/bpf_loader/src/lib.rs index 5b65d610afe18d..395b0581dc375c 100644 --- a/programs/bpf_loader/src/lib.rs +++ b/programs/bpf_loader/src/lib.rs @@ -5,13 +5,22 @@ pub mod serialization; pub mod syscalls; use { + solana_account::WritableAccount, + solana_bincode::limited_deserialize, + solana_clock::Slot, solana_compute_budget::compute_budget::MAX_INSTRUCTION_STACK_DEPTH, solana_feature_set::{ bpf_account_data_direct_mapping, enable_bpf_loader_set_authority_checked_ix, remove_accounts_executable_flag_checks, }, + solana_instruction::{error::InstructionError, AccountMeta}, solana_log_collector::{ic_logger_msg, ic_msg, LogCollector}, solana_measure::measure::Measure, + solana_program::{ + bpf_loader_upgradeable::UpgradeableLoaderState, + loader_upgradeable_instruction::UpgradeableLoaderInstruction, + }, + solana_program_entrypoint::{MAX_PERMITTED_DATA_INCREASE, SUCCESS}, solana_program_runtime::{ invoke_context::{BpfAllocator, InvokeContext, SerializedAccountMetadata, SyscallContext}, loaded_programs::{ @@ -22,6 +31,7 @@ use { stable_log, sysvar_cache::get_sysvar_with_account_check, }, + solana_pubkey::Pubkey, solana_sbpf::{ declare_builtin_function, ebpf::{self, MM_HEAP_START}, @@ -32,20 +42,11 @@ use { verifier::RequisiteVerifier, vm::{ContextObject, EbpfVm}, }, - solana_sdk::{ - account::WritableAccount, - bpf_loader, bpf_loader_deprecated, - bpf_loader_upgradeable::{self, UpgradeableLoaderState}, - clock::Slot, - entrypoint::{MAX_PERMITTED_DATA_INCREASE, SUCCESS}, - instruction::{AccountMeta, InstructionError}, - loader_upgradeable_instruction::UpgradeableLoaderInstruction, - loader_v4, native_loader, - program_utils::limited_deserialize, - pubkey::Pubkey, - system_instruction::{self, MAX_PERMITTED_DATA_LENGTH}, - transaction_context::{IndexOfAccount, InstructionContext, TransactionContext}, + solana_sdk_ids::{ + bpf_loader, bpf_loader_deprecated, bpf_loader_upgradeable, loader_v4, native_loader, }, + solana_system_interface::{instruction as system_instruction, MAX_PERMITTED_DATA_LENGTH}, + solana_transaction_context::{IndexOfAccount, InstructionContext, TransactionContext}, solana_type_overrides::sync::{atomic::Ordering, Arc}, std::{cell::RefCell, mem, rc::Rc}, syscalls::{create_program_runtime_environment_v1, morph_into_deployment_environment_v1}, @@ -511,7 +512,7 @@ fn process_loader_upgradeable_instruction( let instruction_data = instruction_context.get_instruction_data(); let program_id = instruction_context.get_last_program_key(transaction_context)?; - match limited_deserialize(instruction_data)? { + match limited_deserialize(instruction_data, solana_packet::PACKET_DATA_SIZE as u64)? { UpgradeableLoaderInstruction::InitializeBuffer => { instruction_context.check_number_of_instruction_accounts(2)?; let mut buffer = @@ -677,7 +678,7 @@ fn process_loader_upgradeable_instruction( let signers = [[new_program_id.as_ref(), &[bump_seed]]] .iter() .map(|seeds| Pubkey::create_program_address(seeds, caller_program_id)) - .collect::, solana_sdk::pubkey::PubkeyError>>()?; + .collect::, solana_pubkey::PubkeyError>>()?; invoke_context.native_invoke(instruction.into(), signers.as_slice())?; // Load and verify the program bits @@ -1572,9 +1573,8 @@ pub fn execute<'a, 'b: 'a>( pub mod test_utils { use { - super::*, + super::*, solana_account::ReadableAccount, solana_program::loader_v4::LoaderV4State, solana_program_runtime::loaded_programs::DELAY_VISIBILITY_SLOT_OFFSET, - solana_sdk::{account::ReadableAccount, loader_v4::LoaderV4State}, }; pub fn load_all_invoked_programs(invoke_context: &mut InvokeContext) { @@ -1637,22 +1637,19 @@ mod tests { super::*, assert_matches::assert_matches, rand::Rng, + solana_account::{ + create_account_shared_data_for_test as create_account_for_test, state_traits::StateMut, + AccountSharedData, ReadableAccount, WritableAccount, + }, + solana_clock::Clock, + solana_epoch_schedule::EpochSchedule, + solana_instruction::{error::InstructionError, AccountMeta}, solana_program_runtime::{ invoke_context::mock_process_instruction, with_mock_invoke_context, }, - solana_sdk::{ - account::{ - create_account_shared_data_for_test as create_account_for_test, AccountSharedData, - ReadableAccount, WritableAccount, - }, - account_utils::StateMut, - clock::Clock, - epoch_schedule::EpochSchedule, - instruction::{AccountMeta, InstructionError}, - pubkey::Pubkey, - rent::Rent, - system_program, sysvar, - }, + solana_pubkey::Pubkey, + solana_rent::Rent, + solana_sdk_ids::{system_program, sysvar}, std::{fs::File, io::Read, ops::Range, sync::atomic::AtomicU64}, }; diff --git a/programs/bpf_loader/src/serialization.rs b/programs/bpf_loader/src/serialization.rs index e04fd730aa7c80..6c436527702441 100644 --- a/programs/bpf_loader/src/serialization.rs +++ b/programs/bpf_loader/src/serialization.rs @@ -2,21 +2,19 @@ use { byteorder::{ByteOrder, LittleEndian}, + solana_instruction::error::InstructionError, + solana_program_entrypoint::{BPF_ALIGN_OF_U128, MAX_PERMITTED_DATA_INCREASE, NON_DUP_MARKER}, solana_program_runtime::invoke_context::SerializedAccountMetadata, + solana_pubkey::Pubkey, solana_sbpf::{ aligned_memory::{AlignedMemory, Pod}, ebpf::{HOST_ALIGN, MM_INPUT_START}, memory_region::{MemoryRegion, MemoryState}, }, - solana_sdk::{ - bpf_loader_deprecated, - entrypoint::{BPF_ALIGN_OF_U128, MAX_PERMITTED_DATA_INCREASE, NON_DUP_MARKER}, - instruction::InstructionError, - pubkey::Pubkey, - system_instruction::MAX_PERMITTED_DATA_LENGTH, - transaction_context::{ - BorrowedAccount, IndexOfAccount, InstructionContext, TransactionContext, - }, + solana_sdk_ids::bpf_loader_deprecated, + solana_system_interface::MAX_PERMITTED_DATA_LENGTH, + solana_transaction_context::{ + BorrowedAccount, IndexOfAccount, InstructionContext, TransactionContext, }, std::mem::{self, size_of}, }; @@ -622,14 +620,12 @@ pub(crate) fn account_data_region_memory_state(account: &BorrowedAccount<'_>) -> mod tests { use { super::*, + solana_account::{Account, AccountSharedData, WritableAccount}, + solana_account_info::AccountInfo, + solana_program_entrypoint::deserialize, solana_program_runtime::with_mock_invoke_context, - solana_sdk::{ - account::{Account, AccountSharedData, WritableAccount}, - account_info::AccountInfo, - bpf_loader, - entrypoint::deserialize, - transaction_context::InstructionAccount, - }, + solana_sdk_ids::bpf_loader, + solana_transaction_context::InstructionAccount, std::{ cell::RefCell, mem::transmute, @@ -673,7 +669,7 @@ mod tests { expected_err: Some(InstructionError::MaxAccountsExceeded), }, ] { - let program_id = solana_sdk::pubkey::new_rand(); + let program_id = solana_pubkey::new_rand(); let mut transaction_accounts = vec![( program_id, AccountSharedData::from(Account { @@ -779,7 +775,7 @@ mod tests { #[test] fn test_serialize_parameters() { for copy_account_data in [false, true] { - let program_id = solana_sdk::pubkey::new_rand(); + let program_id = solana_pubkey::new_rand(); let transaction_accounts = vec![ ( program_id, @@ -792,7 +788,7 @@ mod tests { }), ), ( - solana_sdk::pubkey::new_rand(), + solana_pubkey::new_rand(), AccountSharedData::from(Account { lamports: 1, data: vec![1u8, 2, 3, 4, 5], @@ -802,7 +798,7 @@ mod tests { }), ), ( - solana_sdk::pubkey::new_rand(), + solana_pubkey::new_rand(), AccountSharedData::from(Account { lamports: 2, data: vec![11u8, 12, 13, 14, 15, 16, 17, 18, 19], @@ -812,7 +808,7 @@ mod tests { }), ), ( - solana_sdk::pubkey::new_rand(), + solana_pubkey::new_rand(), AccountSharedData::from(Account { lamports: 3, data: vec![], @@ -822,7 +818,7 @@ mod tests { }), ), ( - solana_sdk::pubkey::new_rand(), + solana_pubkey::new_rand(), AccountSharedData::from(Account { lamports: 4, data: vec![1u8, 2, 3, 4, 5], @@ -832,7 +828,7 @@ mod tests { }), ), ( - solana_sdk::pubkey::new_rand(), + solana_pubkey::new_rand(), AccountSharedData::from(Account { lamports: 5, data: vec![11u8, 12, 13, 14, 15, 16, 17, 18, 19], @@ -842,7 +838,7 @@ mod tests { }), ), ( - solana_sdk::pubkey::new_rand(), + solana_pubkey::new_rand(), AccountSharedData::from(Account { lamports: 6, data: vec![], diff --git a/programs/bpf_loader/src/syscalls/cpi.rs b/programs/bpf_loader/src/syscalls/cpi.rs index 8492363d2f6808..b247b0b33d94da 100644 --- a/programs/bpf_loader/src/syscalls/cpi.rs +++ b/programs/bpf_loader/src/syscalls/cpi.rs @@ -4,18 +4,19 @@ use { scopeguard::defer, solana_feature_set::{self as feature_set, enable_bpf_loader_set_authority_checked_ix}, solana_measure::measure::Measure, + solana_program::{ + bpf_loader_upgradeable, + syscalls::{ + MAX_CPI_ACCOUNT_INFOS, MAX_CPI_INSTRUCTION_ACCOUNTS, MAX_CPI_INSTRUCTION_DATA_LEN, + }, + }, solana_program_runtime::invoke_context::SerializedAccountMetadata, solana_sbpf::{ ebpf, memory_region::{MemoryRegion, MemoryState}, }, - solana_sdk::{ - stable_layout::stable_instruction::StableInstruction, - syscalls::{ - MAX_CPI_ACCOUNT_INFOS, MAX_CPI_INSTRUCTION_ACCOUNTS, MAX_CPI_INSTRUCTION_DATA_LEN, - }, - transaction_context::BorrowedAccount, - }, + solana_stable_layout::stable_instruction::StableInstruction, + solana_transaction_context::BorrowedAccount, std::{mem, ptr}, }; @@ -1605,20 +1606,18 @@ mod tests { super::*, crate::mock_create_vm, assert_matches::assert_matches, + solana_account::{Account, AccountSharedData, ReadableAccount}, + solana_clock::Epoch, solana_feature_set::bpf_account_data_direct_mapping, + solana_instruction::Instruction, solana_program_runtime::{ invoke_context::SerializedAccountMetadata, with_mock_invoke_context, }, solana_sbpf::{ ebpf::MM_INPUT_START, memory_region::MemoryRegion, program::SBPFVersion, vm::Config, }, - solana_sdk::{ - account::{Account, AccountSharedData, ReadableAccount}, - clock::Epoch, - instruction::Instruction, - system_program, - transaction_context::TransactionAccount, - }, + solana_sdk_ids::system_program, + solana_transaction_context::TransactionAccount, std::{ cell::{Cell, RefCell}, mem, ptr, diff --git a/programs/bpf_loader/src/syscalls/mod.rs b/programs/bpf_loader/src/syscalls/mod.rs index cdf36ef9cf22b8..4f2e322026025f 100644 --- a/programs/bpf_loader/src/syscalls/mod.rs +++ b/programs/bpf_loader/src/syscalls/mod.rs @@ -12,12 +12,14 @@ pub use self::{ }; #[allow(deprecated)] use { + solana_account_info::AccountInfo, solana_bn254::prelude::{ alt_bn128_addition, alt_bn128_multiplication, alt_bn128_pairing, AltBn128Error, ALT_BN128_ADDITION_OUTPUT_LEN, ALT_BN128_MULTIPLICATION_OUTPUT_LEN, ALT_BN128_PAIRING_ELEMENT_LEN, ALT_BN128_PAIRING_OUTPUT_LEN, }, solana_compute_budget::compute_budget::ComputeBudget, + solana_cpi::MAX_RETURN_DATA, solana_define_syscall::codes, solana_feature_set::{ self as feature_set, abort_on_invalid_curve, blake3_syscall_enabled, @@ -30,34 +32,35 @@ use { last_restart_slot_sysvar, reenable_sbpf_v0_execution, remaining_compute_units_syscall_enabled, FeatureSet, }, + solana_hash::Hash, + solana_instruction::{error::InstructionError, AccountMeta, ProcessedSiblingInstruction}, + solana_keccak_hasher as keccak, solana_log_collector::{ic_logger_msg, ic_msg}, solana_poseidon as poseidon, + solana_precompiles::is_precompile, + solana_program::{ + big_mod_exp::{big_mod_exp, BigModExpParams}, + blake3, + }, + solana_program_entrypoint::{BPF_ALIGN_OF_U128, MAX_PERMITTED_DATA_INCREASE, SUCCESS}, solana_program_memory::is_nonoverlapping, solana_program_runtime::{invoke_context::InvokeContext, stable_log}, + solana_pubkey::{Pubkey, PubkeyError, MAX_SEEDS, MAX_SEED_LEN, PUBKEY_BYTES}, solana_sbpf::{ declare_builtin_function, memory_region::{AccessType, MemoryMapping}, program::{BuiltinProgram, FunctionRegistry, SBPFVersion}, vm::Config, }, - solana_sdk::{ - account_info::AccountInfo, - big_mod_exp::{big_mod_exp, BigModExpParams}, - blake3, bpf_loader, bpf_loader_deprecated, bpf_loader_upgradeable, - entrypoint::{BPF_ALIGN_OF_U128, MAX_PERMITTED_DATA_INCREASE, SUCCESS}, - hash::{Hash, Hasher}, - instruction::{AccountMeta, InstructionError, ProcessedSiblingInstruction}, - keccak, native_loader, - precompiles::is_precompile, - program::MAX_RETURN_DATA, - pubkey::{Pubkey, PubkeyError, MAX_SEEDS, MAX_SEED_LEN, PUBKEY_BYTES}, - secp256k1_recover::{ - Secp256k1RecoverError, SECP256K1_PUBLIC_KEY_LENGTH, SECP256K1_SIGNATURE_LENGTH, - }, - sysvar::{Sysvar, SysvarId}, - transaction_context::{IndexOfAccount, InstructionAccount}, + solana_sdk_ids::{bpf_loader, bpf_loader_deprecated, native_loader}, + solana_secp256k1_recover::{ + Secp256k1RecoverError, SECP256K1_PUBLIC_KEY_LENGTH, SECP256K1_SIGNATURE_LENGTH, }, + solana_sha256_hasher::Hasher, + solana_sysvar::Sysvar, + solana_sysvar_id::SysvarId, solana_timings::ExecuteTimings, + solana_transaction_context::{IndexOfAccount, InstructionAccount}, solana_type_overrides::sync::Arc, std::{ alloc::Layout, @@ -2192,31 +2195,30 @@ declare_builtin_function!( #[allow(clippy::indexing_slicing)] mod tests { #[allow(deprecated)] - use solana_sdk::sysvar::fees::Fees; + use solana_sysvar::fees::Fees; use { super::*, crate::mock_create_vm, assert_matches::assert_matches, core::slice, + solana_account::{create_account_shared_data_for_test, AccountSharedData}, + solana_clock::Clock, + solana_epoch_rewards::EpochRewards, + solana_epoch_schedule::EpochSchedule, + solana_fee_calculator::FeeCalculator, + solana_hash::HASH_BYTES, + solana_instruction::Instruction, + solana_last_restart_slot::LastRestartSlot, + solana_program::program::check_type_assumptions, solana_program_runtime::{invoke_context::InvokeContext, with_mock_invoke_context}, solana_sbpf::{ error::EbpfError, memory_region::MemoryRegion, program::SBPFVersion, vm::Config, }, - solana_sdk::{ - account::{create_account_shared_data_for_test, AccountSharedData}, - bpf_loader, - fee_calculator::FeeCalculator, - hash::{hashv, HASH_BYTES}, - instruction::Instruction, - program::check_type_assumptions, - slot_hashes::{self, SlotHashes}, - stable_layout::stable_instruction::StableInstruction, - stake_history::{self, StakeHistory, StakeHistoryEntry}, - sysvar::{ - self, clock::Clock, epoch_rewards::EpochRewards, epoch_schedule::EpochSchedule, - last_restart_slot::LastRestartSlot, - }, - }, + solana_sdk_ids::{bpf_loader, bpf_loader_upgradeable, sysvar}, + solana_sha256_hasher::hashv, + solana_slot_hashes::{self as slot_hashes, SlotHashes}, + solana_stable_layout::stable_instruction::StableInstruction, + solana_sysvar::stake_history::{self, StakeHistory, StakeHistoryEntry}, std::{mem, str::FromStr}, test_case::test_case, }; @@ -2307,7 +2309,7 @@ mod tests { let config = Config::default(); // Pubkey - let pubkey = solana_sdk::pubkey::new_rand(); + let pubkey = solana_pubkey::new_rand(); let memory_mapping = MemoryMapping::new( vec![MemoryRegion::new_readonly(bytes_of(&pubkey), 0x100000000)], &config, @@ -2320,9 +2322,9 @@ mod tests { // Instruction let instruction = Instruction::new_with_bincode( - solana_sdk::pubkey::new_rand(), + solana_pubkey::new_rand(), &"foobar", - vec![AccountMeta::new(solana_sdk::pubkey::new_rand(), false)], + vec![AccountMeta::new(solana_pubkey::new_rand(), false)], ); let instruction = StableInstruction::from(instruction); let memory_region = MemoryRegion::new_readonly(bytes_of(&instruction), 0x100000000); @@ -2398,7 +2400,7 @@ mod tests { assert!(translate_slice::(&memory_mapping, 0x100000000, u64::MAX, true).is_err()); // Pubkeys - let mut data = vec![solana_sdk::pubkey::new_rand(); 5]; + let mut data = vec![solana_pubkey::new_rand(); 5]; let memory_mapping = MemoryMapping::new( vec![MemoryRegion::new_readonly( unsafe { @@ -2414,7 +2416,7 @@ mod tests { translate_slice::(&memory_mapping, 0x100000000, data.len() as u64, true) .unwrap(); assert_eq!(data, translated_data); - *data.first_mut().unwrap() = solana_sdk::pubkey::new_rand(); // Both should point to same place + *data.first_mut().unwrap() = solana_pubkey::new_rand(); // Both should point to same place assert_eq!(data, translated_data); } @@ -2652,7 +2654,7 @@ mod tests { let memory_mapping = &mut vm.memory_mapping; let result = SyscallAllocFree::rust( invoke_context, - solana_sdk::entrypoint::HEAP_LENGTH as u64, + solana_program_entrypoint::HEAP_LENGTH as u64, 0, 0, 0, @@ -2662,7 +2664,7 @@ mod tests { assert_ne!(result.unwrap(), 0); let result = SyscallAllocFree::rust( invoke_context, - solana_sdk::entrypoint::HEAP_LENGTH as u64, + solana_program_entrypoint::HEAP_LENGTH as u64, 0, 0, 0, @@ -2689,7 +2691,7 @@ mod tests { } let result = SyscallAllocFree::rust( invoke_context, - solana_sdk::entrypoint::HEAP_LENGTH as u64, + solana_program_entrypoint::HEAP_LENGTH as u64, 0, 0, 0, @@ -2712,7 +2714,7 @@ mod tests { } let result = SyscallAllocFree::rust( invoke_context, - solana_sdk::entrypoint::HEAP_LENGTH as u64, + solana_program_entrypoint::HEAP_LENGTH as u64, 0, 0, 0, diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index 5e13558cb073d1..0ef13db1dac0f4 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -5146,19 +5146,39 @@ dependencies = [ "byteorder 1.5.0", "libsecp256k1 0.6.0", "scopeguard", + "solana-account", + "solana-account-info", + "solana-bincode", "solana-bn254", + "solana-clock", "solana-compute-budget", + "solana-cpi", "solana-curve25519", "solana-define-syscall", "solana-feature-set", + "solana-hash", + "solana-instruction", + "solana-keccak-hasher", "solana-log-collector", "solana-measure", + "solana-packet", "solana-poseidon", + "solana-precompiles", + "solana-program", + "solana-program-entrypoint", "solana-program-memory", "solana-program-runtime", + "solana-pubkey", "solana-sbpf", - "solana-sdk", + "solana-sdk-ids", + "solana-secp256k1-recover", + "solana-sha256-hasher", + "solana-stable-layout", + "solana-system-interface", + "solana-sysvar", + "solana-sysvar-id", "solana-timings", + "solana-transaction-context", "solana-type-overrides", "thiserror 2.0.9", ] diff --git a/svm/examples/Cargo.lock b/svm/examples/Cargo.lock index e80658fd5dfbd1..8e6d0a02da945e 100644 --- a/svm/examples/Cargo.lock +++ b/svm/examples/Cargo.lock @@ -4997,19 +4997,39 @@ dependencies = [ "byteorder", "libsecp256k1", "scopeguard", + "solana-account", + "solana-account-info", + "solana-bincode", "solana-bn254", + "solana-clock", "solana-compute-budget", + "solana-cpi", "solana-curve25519", "solana-define-syscall", "solana-feature-set", + "solana-hash", + "solana-instruction", + "solana-keccak-hasher", "solana-log-collector", "solana-measure", + "solana-packet", "solana-poseidon", + "solana-precompiles", + "solana-program", + "solana-program-entrypoint", "solana-program-memory", "solana-program-runtime", + "solana-pubkey", "solana-sbpf", - "solana-sdk", + "solana-sdk-ids", + "solana-secp256k1-recover", + "solana-sha256-hasher", + "solana-stable-layout", + "solana-system-interface", + "solana-sysvar", + "solana-sysvar-id", "solana-timings", + "solana-transaction-context", "solana-type-overrides", "thiserror 2.0.9", ]