From ad3a5de0aac683680174eecbac5adf15755ce1f9 Mon Sep 17 00:00:00 2001 From: Sergey Timoshin Date: Sat, 14 Mar 2026 16:32:06 +0000 Subject: [PATCH 1/8] feat: optimize address batch pipeline --- forester-utils/src/address_staging_tree.rs | 17 +- forester/src/processor/v2/helpers.rs | 63 ++++-- forester/src/processor/v2/strategy/address.rs | 79 +++---- program-tests/utils/src/e2e_test_env.rs | 103 ++++----- .../utils/src/mock_batched_forester.rs | 23 +- .../utils/src/test_batch_forester.rs | 71 +++--- prover/client/src/errors.rs | 3 + prover/client/src/helpers.rs | 10 +- .../batch_address_append/proof_inputs.rs | 84 ++++--- .../proof_types/batch_append/proof_inputs.rs | 7 +- .../proof_types/batch_update/proof_inputs.rs | 2 +- prover/client/tests/batch_address_append.rs | 23 +- sdk-libs/client/src/indexer/types/queue.rs | 208 ++++++++++++++++-- .../program-test/src/indexer/test_indexer.rs | 20 +- sparse-merkle-tree/src/indexed_changelog.rs | 6 +- sparse-merkle-tree/tests/indexed_changelog.rs | 14 +- 16 files changed, 472 insertions(+), 261 deletions(-) diff --git a/forester-utils/src/address_staging_tree.rs b/forester-utils/src/address_staging_tree.rs index 786ddb6ac0..a6b1aa89bd 100644 --- a/forester-utils/src/address_staging_tree.rs +++ b/forester-utils/src/address_staging_tree.rs @@ -121,7 +121,7 @@ impl AddressStagingTree { low_element_next_values: &[[u8; 32]], low_element_indices: &[u64], low_element_next_indices: &[u64], - low_element_proofs: &[Vec<[u8; 32]>], + low_element_proofs: &[[[u8; 32]; HEIGHT]], leaves_hashchain: [u8; 32], zkp_batch_size: usize, epoch: u64, @@ -145,15 +145,12 @@ impl AddressStagingTree { let inputs = get_batch_address_append_circuit_inputs::( next_index, old_root, - low_element_values.to_vec(), - low_element_next_values.to_vec(), - low_element_indices.iter().map(|v| *v as usize).collect(), - low_element_next_indices - .iter() - .map(|v| *v as usize) - .collect(), - low_element_proofs.to_vec(), - addresses.to_vec(), + low_element_values, + low_element_next_values, + low_element_indices, + low_element_next_indices, + low_element_proofs, + addresses, &mut self.sparse_tree, leaves_hashchain, zkp_batch_size, diff --git a/forester/src/processor/v2/helpers.rs b/forester/src/processor/v2/helpers.rs index ed135cb6a4..a0f3e3bb5b 100644 --- a/forester/src/processor/v2/helpers.rs +++ b/forester/src/processor/v2/helpers.rs @@ -9,6 +9,7 @@ use light_client::{ indexer::{AddressQueueData, Indexer, QueueElementsV2Options, StateQueueData}, rpc::Rpc, }; +use light_hasher::hash_chain::create_hash_chain_from_slice; use crate::processor::v2::{common::clamp_to_u16, BatchContext}; @@ -22,6 +23,17 @@ pub(crate) fn lock_recover<'a, T>(mutex: &'a Mutex, name: &'static str) -> Mu } } +#[derive(Debug, Clone)] +pub struct AddressBatchSnapshot { + pub addresses: Vec<[u8; 32]>, + pub low_element_values: Vec<[u8; 32]>, + pub low_element_next_values: Vec<[u8; 32]>, + pub low_element_indices: Vec, + pub low_element_next_indices: Vec, + pub low_element_proofs: Vec<[[u8; 32]; HEIGHT]>, + pub leaves_hashchain: [u8; 32], +} + pub async fn fetch_zkp_batch_size(context: &BatchContext) -> crate::Result { let rpc = context.rpc_pool.get_connection().await?; let mut account = rpc @@ -474,20 +486,52 @@ impl StreamingAddressQueue { } } - pub fn get_batch_data(&self, start: usize, end: usize) -> Option { + pub fn get_batch_snapshot( + &self, + start: usize, + end: usize, + hashchain_idx: usize, + ) -> crate::Result>> { let available = self.wait_for_batch(end); if start >= available { - return None; + return Ok(None); } let actual_end = end.min(available); let data = lock_recover(&self.data, "streaming_address_queue.data"); - Some(BatchDataSlice { - addresses: data.addresses[start..actual_end].to_vec(), + + let addresses = data.addresses[start..actual_end].to_vec(); + if addresses.is_empty() { + return Err(anyhow!("Empty batch at start={}", start)); + } + + let leaves_hashchain = match data.leaves_hash_chains.get(hashchain_idx).copied() { + Some(hashchain) => hashchain, + None => { + tracing::debug!( + "Missing leaves_hash_chain for batch {} (available: {}), deriving from addresses", + hashchain_idx, + data.leaves_hash_chains.len() + ); + create_hash_chain_from_slice(&addresses).map_err(|error| { + anyhow!( + "Failed to derive leaves_hash_chain for batch {} from {} addresses: {}", + hashchain_idx, + addresses.len(), + error + ) + })? + } + }; + + Ok(Some(AddressBatchSnapshot { low_element_values: data.low_element_values[start..actual_end].to_vec(), low_element_next_values: data.low_element_next_values[start..actual_end].to_vec(), low_element_indices: data.low_element_indices[start..actual_end].to_vec(), low_element_next_indices: data.low_element_next_indices[start..actual_end].to_vec(), - }) + low_element_proofs: data.reconstruct_proofs::(start..actual_end)?, + addresses, + leaves_hashchain, + })) } pub fn into_data(self) -> AddressQueueData { @@ -553,15 +597,6 @@ impl StreamingAddressQueue { } } -#[derive(Debug, Clone)] -pub struct BatchDataSlice { - pub addresses: Vec<[u8; 32]>, - pub low_element_values: Vec<[u8; 32]>, - pub low_element_next_values: Vec<[u8; 32]>, - pub low_element_indices: Vec, - pub low_element_next_indices: Vec, -} - pub async fn fetch_streaming_address_batches( context: &BatchContext, total_elements: u64, diff --git a/forester/src/processor/v2/strategy/address.rs b/forester/src/processor/v2/strategy/address.rs index 06e94d5500..51ab05143a 100644 --- a/forester/src/processor/v2/strategy/address.rs +++ b/forester/src/processor/v2/strategy/address.rs @@ -14,11 +14,10 @@ use tracing::{debug, info, instrument}; use crate::processor::v2::{ batch_job_builder::BatchJobBuilder, - common::get_leaves_hashchain, errors::V2Error, helpers::{ fetch_address_zkp_batch_size, fetch_onchain_address_root, fetch_streaming_address_batches, - lock_recover, StreamingAddressQueue, + AddressBatchSnapshot, StreamingAddressQueue, }, proof_worker::ProofInput, root_guard::{reconcile_alignment, AlignmentDecision}, @@ -267,9 +266,23 @@ impl BatchJobBuilder for AddressQueueData { let batch_end = start + zkp_batch_size_usize; - let batch_data = self - .streaming_queue - .get_batch_data(start, batch_end) + let streaming_queue = &self.streaming_queue; + let staging_tree = &mut self.staging_tree; + let hashchain_idx = start / zkp_batch_size_usize; + let AddressBatchSnapshot { + addresses, + low_element_values, + low_element_next_values, + low_element_indices, + low_element_next_indices, + low_element_proofs, + leaves_hashchain, + } = streaming_queue + .get_batch_snapshot::<{ DEFAULT_BATCH_ADDRESS_TREE_HEIGHT as usize }>( + start, + batch_end, + hashchain_idx, + )? .ok_or_else(|| { anyhow!( "Batch data not available: start={}, end={}, available={}", @@ -278,31 +291,21 @@ impl BatchJobBuilder for AddressQueueData { self.streaming_queue.available_batches() * zkp_batch_size_usize ) })?; - - let addresses = &batch_data.addresses; let zkp_batch_size_actual = addresses.len(); - - if zkp_batch_size_actual == 0 { - return Err(anyhow!("Empty batch at start={}", start)); - } - - let low_element_values = &batch_data.low_element_values; - let low_element_next_values = &batch_data.low_element_next_values; - let low_element_indices = &batch_data.low_element_indices; - let low_element_next_indices = &batch_data.low_element_next_indices; - - let low_element_proofs: Vec> = { - let data = lock_recover(self.streaming_queue.data.as_ref(), "streaming_queue.data"); - (start..start + zkp_batch_size_actual) - .map(|i| data.reconstruct_proof(i, DEFAULT_BATCH_ADDRESS_TREE_HEIGHT as u8)) - .collect::, _>>()? - }; - - let hashchain_idx = start / zkp_batch_size_usize; - let leaves_hashchain = { - let data = lock_recover(self.streaming_queue.data.as_ref(), "streaming_queue.data"); - get_leaves_hashchain(&data.leaves_hash_chains, hashchain_idx)? - }; + let result = staging_tree + .process_batch( + &addresses, + &low_element_values, + &low_element_next_values, + &low_element_indices, + &low_element_next_indices, + &low_element_proofs, + leaves_hashchain, + zkp_batch_size_actual, + epoch, + tree, + ) + .map_err(|err| map_address_staging_error(tree, err))?; let tree_batch = tree_next_index / zkp_batch_size_usize; let absolute_index = data_start + start; @@ -318,24 +321,6 @@ impl BatchJobBuilder for AddressQueueData { self.streaming_queue.is_complete() ); - let result = self.staging_tree.process_batch( - addresses, - low_element_values, - low_element_next_values, - low_element_indices, - low_element_next_indices, - &low_element_proofs, - leaves_hashchain, - zkp_batch_size_actual, - epoch, - tree, - ); - - let result = match result { - Ok(r) => r, - Err(err) => return Err(map_address_staging_error(tree, err)), - }; - Ok(Some(( ProofInput::AddressAppend(result.circuit_inputs), result.new_root, diff --git a/program-tests/utils/src/e2e_test_env.rs b/program-tests/utils/src/e2e_test_env.rs index a16a7925a7..097ae1f9a9 100644 --- a/program-tests/utils/src/e2e_test_env.rs +++ b/program-tests/utils/src/e2e_test_env.rs @@ -73,7 +73,6 @@ use account_compression::{ use anchor_lang::{prelude::AccountMeta, AnchorSerialize, Discriminator}; use create_address_test_program::create_invoke_cpi_instruction; use forester_utils::{ - account_zero_copy::AccountZeroCopy, address_merkle_tree_config::{address_tree_ready_for_rollover, state_tree_ready_for_rollover}, forester_epoch::{Epoch, Forester, TreeAccounts}, utils::airdrop_lamports, @@ -194,6 +193,7 @@ use crate::{ }, test_batch_forester::{perform_batch_append, perform_batch_nullify}, test_forester::{empty_address_queue_test, nullify_compressed_accounts}, + AccountZeroCopy, }; pub struct User { @@ -748,70 +748,67 @@ where .with_address_queue(None, Some(batch.batch_size as u16)); let result = self .indexer - .get_queue_elements(merkle_tree_pubkey.to_bytes(), options, None) + .get_queue_elements( + merkle_tree_pubkey.to_bytes(), + options, + None, + ) .await .unwrap(); - let addresses = result - .value - .address_queue - .map(|aq| aq.addresses) - .unwrap_or_default(); + let address_queue = result.value.address_queue.unwrap(); + let low_element_proofs = address_queue + .reconstruct_all_proofs::<{ + DEFAULT_BATCH_ADDRESS_TREE_HEIGHT as usize + }>() + .unwrap(); // // local_leaves_hash_chain is only used for a test assertion. // let local_nullifier_hash_chain = create_hash_chain_from_array(&addresses); // assert_eq!(leaves_hash_chain, local_nullifier_hash_chain); - let start_index = merkle_tree.next_index as usize; + let start_index = address_queue.start_index as usize; assert!( start_index >= 2, "start index should be greater than 2 else tree is not inited" ); let current_root = *merkle_tree.root_history.last().unwrap(); - let mut low_element_values = Vec::new(); - let mut low_element_indices = Vec::new(); - let mut low_element_next_indices = Vec::new(); - let mut low_element_next_values = Vec::new(); - let mut low_element_proofs: Vec> = Vec::new(); - let non_inclusion_proofs = self - .indexer - .get_multiple_new_address_proofs( - merkle_tree_pubkey.to_bytes(), - addresses.clone(), - None, - ) - .await - .unwrap(); - for non_inclusion_proof in &non_inclusion_proofs.value.items { - low_element_values.push(non_inclusion_proof.low_address_value); - low_element_indices - .push(non_inclusion_proof.low_address_index as usize); - low_element_next_indices - .push(non_inclusion_proof.low_address_next_index as usize); - low_element_next_values - .push(non_inclusion_proof.low_address_next_value); - - low_element_proofs - .push(non_inclusion_proof.low_address_proof.to_vec()); - } - - let subtrees = self.indexer - .get_subtrees(merkle_tree_pubkey.to_bytes(), None) - .await - .unwrap(); - let mut sparse_merkle_tree = SparseMerkleTree::::new(<[[u8; 32]; DEFAULT_BATCH_ADDRESS_TREE_HEIGHT as usize]>::try_from(subtrees.value.items).unwrap(), start_index); + assert_eq!(address_queue.initial_root, current_root); + let light_client::indexer::AddressQueueData { + addresses, + low_element_values, + low_element_next_values, + low_element_indices, + low_element_next_indices, + subtrees, + .. + } = address_queue; + let mut sparse_merkle_tree = SparseMerkleTree::< + Poseidon, + { DEFAULT_BATCH_ADDRESS_TREE_HEIGHT as usize }, + >::new( + subtrees.as_slice().try_into().unwrap(), + start_index, + ); - let mut changelog: Vec> = Vec::new(); - let mut indexed_changelog: Vec> = Vec::new(); + let mut changelog: Vec< + ChangelogEntry<{ DEFAULT_BATCH_ADDRESS_TREE_HEIGHT as usize }>, + > = Vec::new(); + let mut indexed_changelog: Vec< + IndexedChangelogEntry< + usize, + { DEFAULT_BATCH_ADDRESS_TREE_HEIGHT as usize }, + >, + > = Vec::new(); let inputs = get_batch_address_append_circuit_inputs::< { DEFAULT_BATCH_ADDRESS_TREE_HEIGHT as usize }, >( start_index, current_root, - low_element_values, - low_element_next_values, - low_element_indices, - low_element_next_indices, - low_element_proofs, - addresses, + &low_element_values, + &low_element_next_values, + &low_element_indices, + &low_element_next_indices, + &low_element_proofs, + &addresses, &mut sparse_merkle_tree, leaves_hash_chain, batch.zkp_batch_size as usize, @@ -834,9 +831,13 @@ where if response_result.status().is_success() { let body = response_result.text().await.unwrap(); - let proof_json = deserialize_gnark_proof_json(&body).unwrap(); - let (proof_a, proof_b, proof_c) = proof_from_json_struct(proof_json); - let (proof_a, proof_b, proof_c) = compress_proof(&proof_a, &proof_b, &proof_c); + let proof_json = deserialize_gnark_proof_json(&body) + .map_err(|error| RpcError::CustomError(error.to_string())) + .unwrap(); + let (proof_a, proof_b, proof_c) = + proof_from_json_struct(proof_json); + let (proof_a, proof_b, proof_c) = + compress_proof(&proof_a, &proof_b, &proof_c); let instruction_data = InstructionDataBatchNullifyInputs { new_root: circuit_inputs_new_root, compressed_proof: CompressedProof { diff --git a/program-tests/utils/src/mock_batched_forester.rs b/program-tests/utils/src/mock_batched_forester.rs index 4458aa03b3..2a93f772ba 100644 --- a/program-tests/utils/src/mock_batched_forester.rs +++ b/program-tests/utils/src/mock_batched_forester.rs @@ -260,7 +260,7 @@ impl MockBatchedAddressForester { let mut low_element_indices = Vec::new(); let mut low_element_next_indices = Vec::new(); let mut low_element_next_values = Vec::new(); - let mut low_element_proofs: Vec> = Vec::new(); + let mut low_element_proofs: Vec<[[u8; 32]; HEIGHT]> = Vec::new(); for new_element_value in &new_element_values { let non_inclusion_proof = self .merkle_tree @@ -270,7 +270,14 @@ impl MockBatchedAddressForester { low_element_indices.push(non_inclusion_proof.leaf_index); low_element_next_indices.push(non_inclusion_proof.next_index); low_element_next_values.push(non_inclusion_proof.leaf_higher_range_value); - low_element_proofs.push(non_inclusion_proof.merkle_proof.as_slice().to_vec()); + let proof = non_inclusion_proof.merkle_proof.as_slice().try_into().map_err(|_| { + ProverClientError::InvalidProofData(format!( + "invalid low element proof length: expected {}, got {}", + HEIGHT, + non_inclusion_proof.merkle_proof.len() + )) + })?; + low_element_proofs.push(proof); } let subtrees = self.merkle_tree.merkle_tree.get_subtrees(); let mut merkle_tree = match <[[u8; 32]; HEIGHT]>::try_from(subtrees) { @@ -287,12 +294,12 @@ impl MockBatchedAddressForester { let inputs = match get_batch_address_append_circuit_inputs::( start_index, current_root, - low_element_values, - low_element_next_values, - low_element_indices, - low_element_next_indices, - low_element_proofs, - new_element_values.clone(), + &low_element_values, + &low_element_next_values, + &low_element_indices, + &low_element_next_indices, + &low_element_proofs, + &new_element_values, &mut merkle_tree, leaves_hashchain, zkp_batch_size as usize, diff --git a/program-tests/utils/src/test_batch_forester.rs b/program-tests/utils/src/test_batch_forester.rs index 8e6909704f..0952a7fd76 100644 --- a/program-tests/utils/src/test_batch_forester.rs +++ b/program-tests/utils/src/test_batch_forester.rs @@ -165,7 +165,9 @@ pub async fn create_append_batch_ix_data( bundle.merkle_tree.root() ); let proof_client = ProofClient::local(); - let inputs_json = BatchAppendInputsJson::from_inputs(&circuit_inputs).to_string(); + let inputs_json = BatchAppendInputsJson::from_inputs(&circuit_inputs) + .to_string() + ; match proof_client.generate_proof(inputs_json).await { Ok(compressed_proof) => ( @@ -319,13 +321,13 @@ pub async fn get_batched_nullify_ix_data( }) } -use forester_utils::{ - account_zero_copy::AccountZeroCopy, instructions::create_account::create_account_instruction, -}; +use forester_utils::instructions::create_account::create_account_instruction; use light_client::indexer::{Indexer, QueueElementsV2Options}; use light_program_test::indexer::state_tree::StateMerkleTreeBundle; use light_sparse_merkle_tree::SparseMerkleTree; +use crate::AccountZeroCopy; + pub async fn assert_registry_created_batched_state_merkle_tree( rpc: &mut R, payer_pubkey: Pubkey, @@ -663,50 +665,33 @@ pub async fn create_batch_update_address_tree_instruction_data_with_proof() + .unwrap(); // // local_leaves_hash_chain is only used for a test assertion. // let local_nullifier_hash_chain = create_hash_chain_from_slice(addresses.as_slice()).unwrap(); // assert_eq!(leaves_hash_chain, local_nullifier_hash_chain); - let start_index = merkle_tree.next_index as usize; + let start_index = address_queue.start_index as usize; assert!( start_index >= 1, "start index should be greater than 2 else tree is not inited" ); let current_root = *merkle_tree.root_history.last().unwrap(); - let mut low_element_values = Vec::new(); - let mut low_element_indices = Vec::new(); - let mut low_element_next_indices = Vec::new(); - let mut low_element_next_values = Vec::new(); - let mut low_element_proofs: Vec> = Vec::new(); - let non_inclusion_proofs = indexer - .get_multiple_new_address_proofs(merkle_tree_pubkey.to_bytes(), addresses.clone(), None) - .await - .unwrap(); - for non_inclusion_proof in &non_inclusion_proofs.value.items { - low_element_values.push(non_inclusion_proof.low_address_value); - low_element_indices.push(non_inclusion_proof.low_address_index as usize); - low_element_next_indices.push(non_inclusion_proof.low_address_next_index as usize); - low_element_next_values.push(non_inclusion_proof.low_address_next_value); - - low_element_proofs.push(non_inclusion_proof.low_address_proof.to_vec()); - } - - let subtrees = indexer - .get_subtrees(merkle_tree_pubkey.to_bytes(), None) - .await - .unwrap(); + assert_eq!(address_queue.initial_root, current_root); + let light_client::indexer::AddressQueueData { + addresses, + low_element_values, + low_element_indices, + low_element_next_indices, + low_element_next_values, + subtrees, + .. + } = address_queue; let mut sparse_merkle_tree = SparseMerkleTree::< Poseidon, { DEFAULT_BATCH_ADDRESS_TREE_HEIGHT as usize }, - >::new( - <[[u8; 32]; DEFAULT_BATCH_ADDRESS_TREE_HEIGHT as usize]>::try_from(subtrees.value.items) - .unwrap(), - start_index, - ); + >::new(subtrees.as_slice().try_into().unwrap(), start_index); let mut changelog: Vec> = Vec::new(); @@ -718,12 +703,12 @@ pub async fn create_batch_update_address_tree_instruction_data_with_proof( start_index, current_root, - low_element_values, - low_element_next_values, - low_element_indices, - low_element_next_indices, - low_element_proofs, - addresses, + &low_element_values, + &low_element_next_values, + &low_element_indices, + &low_element_next_indices, + &low_element_proofs, + &addresses, &mut sparse_merkle_tree, leaves_hash_chain, batch.zkp_batch_size as usize, diff --git a/prover/client/src/errors.rs b/prover/client/src/errors.rs index 85c1bc8fbe..e095bf3579 100644 --- a/prover/client/src/errors.rs +++ b/prover/client/src/errors.rs @@ -37,6 +37,9 @@ pub enum ProverClientError { #[error("Invalid proof data: {0}")] InvalidProofData(String), + #[error("Integer conversion failed: {0}")] + IntegerConversion(String), + #[error("Hashchain mismatch: computed {computed:?} != expected {expected:?} (batch_size={batch_size}, next_index={next_index})")] HashchainMismatch { computed: [u8; 32], diff --git a/prover/client/src/helpers.rs b/prover/client/src/helpers.rs index 6ea223e79f..98457479e2 100644 --- a/prover/client/src/helpers.rs +++ b/prover/client/src/helpers.rs @@ -6,6 +6,8 @@ use num_bigint::{BigInt, BigUint}; use num_traits::{Num, ToPrimitive}; use serde::Serialize; +use crate::errors::ProverClientError; + pub fn get_project_root() -> Option { let output = Command::new("git") .args(["rev-parse", "--show-toplevel"]) @@ -48,7 +50,7 @@ pub fn compute_root_from_merkle_proof( leaf: [u8; 32], path_elements: &[[u8; 32]; HEIGHT], path_index: u32, -) -> ([u8; 32], ChangelogEntry) { +) -> Result<([u8; 32], ChangelogEntry), ProverClientError> { let mut changelog_entry = ChangelogEntry::default_with_index(path_index as usize); let mut current_hash = leaf; @@ -56,14 +58,14 @@ pub fn compute_root_from_merkle_proof( for (level, path_element) in path_elements.iter().enumerate() { changelog_entry.path[level] = Some(current_hash); if current_index.is_multiple_of(2) { - current_hash = Poseidon::hashv(&[¤t_hash, path_element]).unwrap(); + current_hash = Poseidon::hashv(&[¤t_hash, path_element])?; } else { - current_hash = Poseidon::hashv(&[path_element, ¤t_hash]).unwrap(); + current_hash = Poseidon::hashv(&[path_element, ¤t_hash])?; } current_index /= 2; } - (current_hash, changelog_entry) + Ok((current_hash, changelog_entry)) } pub fn big_uint_to_string(big_uint: &BigUint) -> String { diff --git a/prover/client/src/proof_types/batch_address_append/proof_inputs.rs b/prover/client/src/proof_types/batch_address_append/proof_inputs.rs index f80e8d49e4..32408fdc02 100644 --- a/prover/client/src/proof_types/batch_address_append/proof_inputs.rs +++ b/prover/client/src/proof_types/batch_address_append/proof_inputs.rs @@ -1,4 +1,4 @@ -use std::collections::HashMap; +use std::{collections::HashMap, fmt::Debug}; use light_hasher::{ bigint::bigint_to_be_bytes_array, @@ -187,21 +187,28 @@ impl BatchAddressAppendInputs { pub fn get_batch_address_append_circuit_inputs( next_index: usize, current_root: [u8; 32], - low_element_values: Vec<[u8; 32]>, - low_element_next_values: Vec<[u8; 32]>, - low_element_indices: Vec, - low_element_next_indices: Vec, - low_element_proofs: Vec>, - new_element_values: Vec<[u8; 32]>, + low_element_values: &[[u8; 32]], + low_element_next_values: &[[u8; 32]], + low_element_indices: &[impl Copy + TryInto + Debug], + low_element_next_indices: &[impl Copy + TryInto + Debug], + low_element_proofs: &[[[u8; 32]; HEIGHT]], + new_element_values: &[[u8; 32]], sparse_merkle_tree: &mut SparseMerkleTree, leaves_hashchain: [u8; 32], zkp_batch_size: usize, changelog: &mut Vec>, indexed_changelog: &mut Vec>, ) -> Result { - let new_element_values = new_element_values[0..zkp_batch_size].to_vec(); - - let computed_hashchain = create_hash_chain_from_slice(&new_element_values).map_err(|e| { + let new_element_values = &new_element_values[..zkp_batch_size]; + let mut new_root = [0u8; 32]; + let mut low_element_circuit_merkle_proofs = Vec::with_capacity(new_element_values.len()); + let mut new_element_circuit_merkle_proofs = Vec::with_capacity(new_element_values.len()); + let mut patched_low_element_next_values = Vec::with_capacity(new_element_values.len()); + let mut patched_low_element_next_indices = Vec::with_capacity(new_element_values.len()); + let mut patched_low_element_values = Vec::with_capacity(new_element_values.len()); + let mut patched_low_element_indices = Vec::with_capacity(new_element_values.len()); + + let computed_hashchain = create_hash_chain_from_slice(new_element_values).map_err(|e| { ProverClientError::GenericError(format!("Failed to compute hashchain: {}", e)) })?; if computed_hashchain != leaves_hashchain { @@ -229,15 +236,6 @@ pub fn get_batch_address_append_circuit_inputs( next_index ); - let mut new_root = [0u8; 32]; - let mut low_element_circuit_merkle_proofs = vec![]; - let mut new_element_circuit_merkle_proofs = vec![]; - - let mut patched_low_element_next_values: Vec<[u8; 32]> = Vec::new(); - let mut patched_low_element_next_indices: Vec = Vec::new(); - let mut patched_low_element_values: Vec<[u8; 32]> = Vec::new(); - let mut patched_low_element_indices: Vec = Vec::new(); - let mut patcher = ChangelogProofPatcher::new::(changelog); let is_first_batch = indexed_changelog.is_empty(); @@ -245,21 +243,33 @@ pub fn get_batch_address_append_circuit_inputs( for i in 0..new_element_values.len() { let mut changelog_index = 0; + let low_element_index = low_element_indices[i].try_into().map_err(|_| { + ProverClientError::IntegerConversion(format!( + "low element index {:?} does not fit into usize", + low_element_indices[i] + )) + })?; + let low_element_next_index = low_element_next_indices[i].try_into().map_err(|_| { + ProverClientError::IntegerConversion(format!( + "low element next index {:?} does not fit into usize", + low_element_next_indices[i] + )) + })?; let new_element_index = next_index + i; let mut low_element: IndexedElement = IndexedElement { - index: low_element_indices[i], + index: low_element_index, value: BigUint::from_bytes_be(&low_element_values[i]), - next_index: low_element_next_indices[i], + next_index: low_element_next_index, }; let mut new_element: IndexedElement = IndexedElement { index: new_element_index, value: BigUint::from_bytes_be(&new_element_values[i]), - next_index: low_element_next_indices[i], + next_index: low_element_next_index, }; - let mut low_element_proof = low_element_proofs[i].to_vec(); + let mut low_element_proof = low_element_proofs[i]; let mut low_element_next_value = BigUint::from_bytes_be(&low_element_next_values[i]); patch_indexed_changelogs( 0, @@ -293,18 +303,10 @@ pub fn get_batch_address_append_circuit_inputs( next_value: bigint_to_be_bytes_array::<32>(&new_element.value)?, index: new_low_element.index, }; + let low_element_changelog_proof = low_element_proof; let intermediate_root = { - let mut low_element_proof_arr: [[u8; 32]; HEIGHT] = low_element_proof - .clone() - .try_into() - .map_err(|v: Vec<[u8; 32]>| { - ProverClientError::ProofPatchFailed(format!( - "low element proof length mismatch: expected {}, got {}", - HEIGHT, - v.len() - )) - })?; + let mut low_element_proof_arr = low_element_changelog_proof; patcher.update_proof::(low_element.index(), &mut low_element_proof_arr); let merkle_proof = low_element_proof_arr; @@ -321,7 +323,7 @@ pub fn get_batch_address_append_circuit_inputs( old_low_leaf_hash, &merkle_proof, low_element.index as u32, - ); + )?; if computed_root != expected_root_for_low { let low_value_bytes = bigint_to_be_bytes_array::<32>(&low_element.value) .map_err(|e| { @@ -362,7 +364,7 @@ pub fn get_batch_address_append_circuit_inputs( new_low_leaf_hash, &merkle_proof, new_low_element.index as u32, - ); + )?; patcher.push_changelog_entry::(changelog, changelog_entry); low_element_circuit_merkle_proofs.push( @@ -376,13 +378,7 @@ pub fn get_batch_address_append_circuit_inputs( }; let low_element_changelog_entry = IndexedChangelogEntry { element: new_low_element_raw, - proof: low_element_proof.as_slice()[..HEIGHT] - .try_into() - .map_err(|_| { - ProverClientError::ProofPatchFailed( - "low_element_proof slice conversion failed".to_string(), - ) - })?, + proof: low_element_changelog_proof, changelog_index: indexed_changelog.len(), //change_log_index, }; @@ -409,7 +405,7 @@ pub fn get_batch_address_append_circuit_inputs( new_element_leaf_hash, &merkle_proof_array, current_index as u32, - ); + )?; if i == 0 && changelog.len() == 1 { if sparse_next_idx_before != current_index { @@ -436,7 +432,7 @@ pub fn get_batch_address_append_circuit_inputs( zero_hash, &merkle_proof_array, current_index as u32, - ); + )?; if root_with_zero != intermediate_root { tracing::error!( "ELEMENT {} NEW_PROOF MISMATCH: proof + ZERO = {:?}[..4] but expected \ diff --git a/prover/client/src/proof_types/batch_append/proof_inputs.rs b/prover/client/src/proof_types/batch_append/proof_inputs.rs index ef0327ac1d..7dd578e599 100644 --- a/prover/client/src/proof_types/batch_append/proof_inputs.rs +++ b/prover/client/src/proof_types/batch_append/proof_inputs.rs @@ -187,8 +187,11 @@ pub fn get_batch_append_inputs( }; // Update the root based on the current proof and nullifier - let (updated_root, changelog_entry) = - compute_root_from_merkle_proof(final_leaf, &merkle_proof_array, start_index + i as u32); + let (updated_root, changelog_entry) = compute_root_from_merkle_proof( + final_leaf, + &merkle_proof_array, + start_index + i as u32, + )?; new_root = updated_root; changelog.push(changelog_entry); circuit_merkle_proofs.push( diff --git a/prover/client/src/proof_types/batch_update/proof_inputs.rs b/prover/client/src/proof_types/batch_update/proof_inputs.rs index 2136d01d10..7f8c08e0d1 100644 --- a/prover/client/src/proof_types/batch_update/proof_inputs.rs +++ b/prover/client/src/proof_types/batch_update/proof_inputs.rs @@ -175,7 +175,7 @@ pub fn get_batch_update_inputs( index_bytes[28..].copy_from_slice(&(*index).to_be_bytes()); let nullifier = Poseidon::hashv(&[leaf, &index_bytes, &tx_hashes[i]]).unwrap(); let (root, changelog_entry) = - compute_root_from_merkle_proof(nullifier, &merkle_proof_array, *index); + compute_root_from_merkle_proof(nullifier, &merkle_proof_array, *index)?; new_root = root; changelog.push(changelog_entry); circuit_merkle_proofs.push( diff --git a/prover/client/tests/batch_address_append.rs b/prover/client/tests/batch_address_append.rs index 22f58d5362..ac73c3809e 100644 --- a/prover/client/tests/batch_address_append.rs +++ b/prover/client/tests/batch_address_append.rs @@ -45,7 +45,8 @@ async fn prove_batch_address_append() { let mut low_element_indices = Vec::new(); let mut low_element_next_indices = Vec::new(); let mut low_element_next_values = Vec::new(); - let mut low_element_proofs: Vec> = Vec::new(); + let mut low_element_proofs: Vec<[[u8; 32]; DEFAULT_BATCH_ADDRESS_TREE_HEIGHT as usize]> = + Vec::new(); // Generate non-inclusion proofs for each element for new_element_value in &new_element_values { @@ -57,7 +58,13 @@ async fn prove_batch_address_append() { low_element_indices.push(non_inclusion_proof.leaf_index); low_element_next_indices.push(non_inclusion_proof.next_index); low_element_next_values.push(non_inclusion_proof.leaf_higher_range_value); - low_element_proofs.push(non_inclusion_proof.merkle_proof.as_slice().to_vec()); + low_element_proofs.push( + non_inclusion_proof + .merkle_proof + .as_slice() + .try_into() + .unwrap(), + ); } // Convert big integers to byte arrays @@ -87,12 +94,12 @@ async fn prove_batch_address_append() { get_batch_address_append_circuit_inputs::<{ DEFAULT_BATCH_ADDRESS_TREE_HEIGHT as usize }>( start_index, current_root, - low_element_values, - low_element_next_values, - low_element_indices, - low_element_next_indices, - low_element_proofs, - new_element_values, + &low_element_values, + &low_element_next_values, + &low_element_indices, + &low_element_next_indices, + &low_element_proofs, + &new_element_values, &mut sparse_merkle_tree, hash_chain, zkp_batch_size, diff --git a/sdk-libs/client/src/indexer/types/queue.rs b/sdk-libs/client/src/indexer/types/queue.rs index 40e7cc0f6e..de97ca7739 100644 --- a/sdk-libs/client/src/indexer/types/queue.rs +++ b/sdk-libs/client/src/indexer/types/queue.rs @@ -1,3 +1,5 @@ +use std::collections::HashMap; + use super::super::IndexerError; #[derive(Debug, Clone, PartialEq, Default)] @@ -65,12 +67,10 @@ pub struct AddressQueueData { impl AddressQueueData { /// Reconstruct a merkle proof for a given low_element_index from the deduplicated nodes. - /// The tree_height is needed to know how many levels to traverse. - pub fn reconstruct_proof( + pub fn reconstruct_proof( &self, address_idx: usize, - tree_height: u8, - ) -> Result, IndexerError> { + ) -> Result<[[u8; 32]; HEIGHT], IndexerError> { let leaf_index = *self.low_element_indices.get(address_idx).ok_or_else(|| { IndexerError::MissingResult { context: "reconstruct_proof".to_string(), @@ -81,10 +81,10 @@ impl AddressQueueData { ), } })?; - let mut proof = Vec::with_capacity(tree_height as usize); + let mut proof = [[0u8; 32]; HEIGHT]; let mut pos = leaf_index; - for level in 0..tree_height { + for (level, proof_element) in proof.iter_mut().enumerate() { let sibling_pos = if pos.is_multiple_of(2) { pos + 1 } else { @@ -114,30 +114,212 @@ impl AddressQueueData { self.node_hashes.len(), ), })?; - proof.push(*hash); + *proof_element = *hash; pos /= 2; } Ok(proof) } + /// Reconstruct a contiguous batch of proofs while reusing a single node lookup table. + pub fn reconstruct_proofs( + &self, + address_range: std::ops::Range, + ) -> Result, IndexerError> { + let node_lookup = self.build_node_lookup(); + let mut proofs = Vec::with_capacity(address_range.len()); + + for address_idx in address_range { + proofs.push(self.reconstruct_proof_with_lookup::(address_idx, &node_lookup)?); + } + + Ok(proofs) + } + /// Reconstruct all proofs for all addresses - pub fn reconstruct_all_proofs( + pub fn reconstruct_all_proofs( &self, - tree_height: u8, - ) -> Result>, IndexerError> { - (0..self.addresses.len()) - .map(|i| self.reconstruct_proof(i, tree_height)) + ) -> Result, IndexerError> { + self.reconstruct_proofs::(0..self.addresses.len()) + } + + fn build_node_lookup(&self) -> HashMap { + self.nodes + .iter() + .copied() + .enumerate() + .map(|(idx, node)| (node, idx)) .collect() } + fn reconstruct_proof_with_lookup( + &self, + address_idx: usize, + node_lookup: &HashMap, + ) -> Result<[[u8; 32]; HEIGHT], IndexerError> { + let leaf_index = *self.low_element_indices.get(address_idx).ok_or_else(|| { + IndexerError::MissingResult { + context: "reconstruct_proof".to_string(), + message: format!( + "address_idx {} out of bounds for low_element_indices (len {})", + address_idx, + self.low_element_indices.len(), + ), + } + })?; + let mut proof = [[0u8; 32]; HEIGHT]; + let mut pos = leaf_index; + + for (level, proof_element) in proof.iter_mut().enumerate() { + let sibling_pos = if pos.is_multiple_of(2) { + pos + 1 + } else { + pos - 1 + }; + let sibling_idx = Self::encode_node_index(level, sibling_pos); + let hash_idx = node_lookup.get(&sibling_idx).copied().ok_or_else(|| { + IndexerError::MissingResult { + context: "reconstruct_proof".to_string(), + message: format!( + "Missing proof node at level {} position {} (encoded: {})", + level, sibling_pos, sibling_idx + ), + } + })?; + let hash = + self.node_hashes + .get(hash_idx) + .ok_or_else(|| IndexerError::MissingResult { + context: "reconstruct_proof".to_string(), + message: format!( + "node_hashes index {} out of bounds (len {})", + hash_idx, + self.node_hashes.len(), + ), + })?; + *proof_element = *hash; + pos /= 2; + } + + Ok(proof) + } + /// Encode node index: (level << 56) | position #[inline] - fn encode_node_index(level: u8, position: u64) -> u64 { + fn encode_node_index(level: usize, position: u64) -> u64 { ((level as u64) << 56) | position } } +#[cfg(test)] +mod tests { + use std::{collections::BTreeMap, hint::black_box, time::Instant}; + + use super::AddressQueueData; + + fn hash_from_node(node_index: u64) -> [u8; 32] { + let mut hash = [0u8; 32]; + hash[..8].copy_from_slice(&node_index.to_le_bytes()); + hash[8..16].copy_from_slice(&node_index.rotate_left(17).to_le_bytes()); + hash[16..24].copy_from_slice(&node_index.rotate_right(9).to_le_bytes()); + hash[24..32].copy_from_slice(&(node_index ^ 0xA5A5_A5A5_A5A5_A5A5).to_le_bytes()); + hash + } + + fn build_queue_data(num_addresses: usize) -> AddressQueueData { + let low_element_indices = (0..num_addresses) + .map(|i| (i as u64).saturating_mul(2)) + .collect::>(); + let mut nodes = BTreeMap::new(); + + for &leaf_index in &low_element_indices { + let mut pos = leaf_index; + for level in 0..HEIGHT { + let sibling_pos = if pos.is_multiple_of(2) { + pos + 1 + } else { + pos - 1 + }; + let node_index = ((level as u64) << 56) | sibling_pos; + nodes + .entry(node_index) + .or_insert_with(|| hash_from_node(node_index)); + pos /= 2; + } + } + + let (nodes, node_hashes): (Vec<_>, Vec<_>) = nodes.into_iter().unzip(); + + AddressQueueData { + addresses: vec![[0u8; 32]; num_addresses], + low_element_values: vec![[1u8; 32]; num_addresses], + low_element_next_values: vec![[2u8; 32]; num_addresses], + low_element_indices, + low_element_next_indices: (0..num_addresses).map(|i| (i as u64) + 1).collect(), + nodes, + node_hashes, + initial_root: [9u8; 32], + leaves_hash_chains: vec![[3u8; 32]; num_addresses.max(1)], + subtrees: vec![[4u8; 32]; HEIGHT], + start_index: 0, + root_seq: 0, + } + } + + #[test] + fn batched_reconstruction_matches_individual_reconstruction() { + let queue = build_queue_data::<40>(128); + + let expected = (0..queue.addresses.len()) + .map(|i| queue.reconstruct_proof::<40>(i).unwrap()) + .collect::>(); + let actual = queue + .reconstruct_proofs::<40>(0..queue.addresses.len()) + .unwrap(); + + assert_eq!(actual, expected); + } + + #[test] + #[ignore = "profiling helper"] + fn profile_reconstruct_proofs_batch() { + const HEIGHT: usize = 40; + const NUM_ADDRESSES: usize = 2_048; + const ITERS: usize = 25; + + let queue = build_queue_data::(NUM_ADDRESSES); + + let baseline_start = Instant::now(); + for _ in 0..ITERS { + let proofs = (0..queue.addresses.len()) + .map(|i| queue.reconstruct_proof::(i).unwrap()) + .collect::>(); + black_box(proofs); + } + let baseline = baseline_start.elapsed(); + + let batched_start = Instant::now(); + for _ in 0..ITERS { + black_box( + queue + .reconstruct_proofs::(0..queue.addresses.len()) + .unwrap(), + ); + } + let batched = batched_start.elapsed(); + + println!( + "queue reconstruction profile: addresses={}, height={}, iters={}, individual={:?}, batched={:?}, speedup={:.2}x", + NUM_ADDRESSES, + HEIGHT, + ITERS, + baseline, + batched, + baseline.as_secs_f64() / batched.as_secs_f64(), + ); + } +} + /// V2 Queue Elements Result with deduplicated node data #[derive(Debug, Clone, PartialEq, Default)] pub struct QueueElementsResult { diff --git a/sdk-libs/program-test/src/indexer/test_indexer.rs b/sdk-libs/program-test/src/indexer/test_indexer.rs index 0b5b0583a3..cbaea17320 100644 --- a/sdk-libs/program-test/src/indexer/test_indexer.rs +++ b/sdk-libs/program-test/src/indexer/test_indexer.rs @@ -2170,18 +2170,20 @@ impl TestIndexer { let inclusion_proof_inputs = InclusionProofInputs::new(inclusion_proofs.as_slice()).unwrap(); ( - Some(BatchInclusionJsonStruct::from_inclusion_proof_inputs( - &inclusion_proof_inputs, - )), + Some( + BatchInclusionJsonStruct::from_inclusion_proof_inputs(&inclusion_proof_inputs), + ), None, ) } else if height == STATE_MERKLE_TREE_HEIGHT as usize { let inclusion_proof_inputs = InclusionProofInputsLegacy(inclusion_proofs.as_slice()); ( None, - Some(BatchInclusionJsonStructLegacy::from_inclusion_proof_inputs( - &inclusion_proof_inputs, - )), + Some( + BatchInclusionJsonStructLegacy::from_inclusion_proof_inputs( + &inclusion_proof_inputs, + ), + ), ) } else { return Err(IndexerError::CustomError( @@ -2358,7 +2360,11 @@ impl TestIndexer { if let Some(payload) = payload { (indices, Vec::new(), payload.to_string()) } else { - (indices, Vec::new(), payload_legacy.unwrap().to_string()) + ( + indices, + Vec::new(), + payload_legacy.unwrap().to_string(), + ) } } (None, Some(addresses)) => { diff --git a/sparse-merkle-tree/src/indexed_changelog.rs b/sparse-merkle-tree/src/indexed_changelog.rs index bbd30e1ee6..7e6a26cff7 100644 --- a/sparse-merkle-tree/src/indexed_changelog.rs +++ b/sparse-merkle-tree/src/indexed_changelog.rs @@ -29,7 +29,7 @@ pub fn patch_indexed_changelogs( low_element: &mut IndexedElement, new_element: &mut IndexedElement, low_element_next_value: &mut BigUint, - low_leaf_proof: &mut Vec<[u8; 32]>, + low_leaf_proof: &mut [[u8; 32]; HEIGHT], ) -> Result<(), SparseMerkleTreeError> { // Tests are in program-tests/merkle-tree/tests/indexed_changelog.rs let next_indexed_changelog_indices: Vec = (*indexed_changelogs) @@ -69,7 +69,7 @@ pub fn patch_indexed_changelogs( // Patch the next value. *low_element_next_value = BigUint::from_bytes_be(&changelog_entry.element.next_value); // Patch the proof. - *low_leaf_proof = changelog_entry.proof.to_vec(); + *low_leaf_proof = changelog_entry.proof; } // If we found a new low element. @@ -82,7 +82,7 @@ pub fn patch_indexed_changelogs( next_index: new_low_element_changelog_entry.element.next_index, }; - *low_leaf_proof = new_low_element_changelog_entry.proof.to_vec(); + *low_leaf_proof = new_low_element_changelog_entry.proof; new_element.next_index = low_element.next_index; if new_low_element_changelog_index == indexed_changelogs.len() - 1 { return Ok(()); diff --git a/sparse-merkle-tree/tests/indexed_changelog.rs b/sparse-merkle-tree/tests/indexed_changelog.rs index 7d37142b46..59efda6fde 100644 --- a/sparse-merkle-tree/tests/indexed_changelog.rs +++ b/sparse-merkle-tree/tests/indexed_changelog.rs @@ -92,7 +92,8 @@ fn test_indexed_changelog() { next_index: low_element_next_indices[i], }; println!("unpatched new_element: {:?}", new_element); - let mut low_element_proof = low_element_proofs[i].to_vec(); + let mut low_element_proof: [[u8; 32]; 8] = + low_element_proofs[i].as_slice().try_into().unwrap(); let mut low_element_next_value = BigUint::from_bytes_be(&low_element_next_values[i]); if i > 0 { @@ -114,7 +115,7 @@ fn test_indexed_changelog() { next_value: bigint_to_be_bytes_array::<32>(&new_element.value).unwrap(), index: low_element.index, }, - proof: low_element_proof.as_slice().to_vec().try_into().unwrap(), + proof: low_element_proof, changelog_index: indexed_changelog.len(), }); indexed_changelog.push(IndexedChangelogEntry { @@ -124,7 +125,7 @@ fn test_indexed_changelog() { next_value: bigint_to_be_bytes_array::<32>(&low_element_next_value).unwrap(), index: new_element.index, }, - proof: low_element_proof.as_slice().to_vec().try_into().unwrap(), + proof: low_element_proof, changelog_index: indexed_changelog.len(), }); println!("patched -------------------"); @@ -206,7 +207,8 @@ fn debug_test_indexed_changelog() { next_index: low_element_next_indices[i], }; println!("unpatched new_element: {:?}", new_element); - let mut low_element_proof = low_element_proofs[i].to_vec(); + let mut low_element_proof: [[u8; 32]; 8] = + low_element_proofs[i].as_slice().try_into().unwrap(); let mut low_element_next_value = BigUint::from_bytes_be(&low_element_next_values[i]); if i > 0 { @@ -228,7 +230,7 @@ fn debug_test_indexed_changelog() { next_value: bigint_to_be_bytes_array::<32>(&new_element.value).unwrap(), index: low_element.index, }, - proof: low_element_proof.as_slice().to_vec().try_into().unwrap(), + proof: low_element_proof, changelog_index: indexed_changelog.len(), }); indexed_changelog.push(IndexedChangelogEntry { @@ -238,7 +240,7 @@ fn debug_test_indexed_changelog() { next_value: bigint_to_be_bytes_array::<32>(&low_element_next_value).unwrap(), index: new_element.index, }, - proof: low_element_proof.as_slice().to_vec().try_into().unwrap(), + proof: low_element_proof, changelog_index: indexed_changelog.len(), }); man_indexed_array.elements[low_element.index()] = low_element.clone(); From bed226922006bf357d8de144122b010ac13df046 Mon Sep 17 00:00:00 2001 From: Sergey Timoshin Date: Sat, 14 Mar 2026 19:30:35 +0000 Subject: [PATCH 2/8] format --- .../utils/src/mock_batched_forester.rs | 18 ++++++++++------- .../utils/src/test_batch_forester.rs | 4 +--- .../program-test/src/indexer/test_indexer.rs | 20 +++++++------------ .../tests/integration_tests.rs | 2 +- 4 files changed, 20 insertions(+), 24 deletions(-) diff --git a/program-tests/utils/src/mock_batched_forester.rs b/program-tests/utils/src/mock_batched_forester.rs index 2a93f772ba..0101b235aa 100644 --- a/program-tests/utils/src/mock_batched_forester.rs +++ b/program-tests/utils/src/mock_batched_forester.rs @@ -270,13 +270,17 @@ impl MockBatchedAddressForester { low_element_indices.push(non_inclusion_proof.leaf_index); low_element_next_indices.push(non_inclusion_proof.next_index); low_element_next_values.push(non_inclusion_proof.leaf_higher_range_value); - let proof = non_inclusion_proof.merkle_proof.as_slice().try_into().map_err(|_| { - ProverClientError::InvalidProofData(format!( - "invalid low element proof length: expected {}, got {}", - HEIGHT, - non_inclusion_proof.merkle_proof.len() - )) - })?; + let proof = non_inclusion_proof + .merkle_proof + .as_slice() + .try_into() + .map_err(|_| { + ProverClientError::InvalidProofData(format!( + "invalid low element proof length: expected {}, got {}", + HEIGHT, + non_inclusion_proof.merkle_proof.len() + )) + })?; low_element_proofs.push(proof); } let subtrees = self.merkle_tree.merkle_tree.get_subtrees(); diff --git a/program-tests/utils/src/test_batch_forester.rs b/program-tests/utils/src/test_batch_forester.rs index 0952a7fd76..a28efa9ca3 100644 --- a/program-tests/utils/src/test_batch_forester.rs +++ b/program-tests/utils/src/test_batch_forester.rs @@ -165,9 +165,7 @@ pub async fn create_append_batch_ix_data( bundle.merkle_tree.root() ); let proof_client = ProofClient::local(); - let inputs_json = BatchAppendInputsJson::from_inputs(&circuit_inputs) - .to_string() - ; + let inputs_json = BatchAppendInputsJson::from_inputs(&circuit_inputs).to_string(); match proof_client.generate_proof(inputs_json).await { Ok(compressed_proof) => ( diff --git a/sdk-libs/program-test/src/indexer/test_indexer.rs b/sdk-libs/program-test/src/indexer/test_indexer.rs index cbaea17320..0b5b0583a3 100644 --- a/sdk-libs/program-test/src/indexer/test_indexer.rs +++ b/sdk-libs/program-test/src/indexer/test_indexer.rs @@ -2170,20 +2170,18 @@ impl TestIndexer { let inclusion_proof_inputs = InclusionProofInputs::new(inclusion_proofs.as_slice()).unwrap(); ( - Some( - BatchInclusionJsonStruct::from_inclusion_proof_inputs(&inclusion_proof_inputs), - ), + Some(BatchInclusionJsonStruct::from_inclusion_proof_inputs( + &inclusion_proof_inputs, + )), None, ) } else if height == STATE_MERKLE_TREE_HEIGHT as usize { let inclusion_proof_inputs = InclusionProofInputsLegacy(inclusion_proofs.as_slice()); ( None, - Some( - BatchInclusionJsonStructLegacy::from_inclusion_proof_inputs( - &inclusion_proof_inputs, - ), - ), + Some(BatchInclusionJsonStructLegacy::from_inclusion_proof_inputs( + &inclusion_proof_inputs, + )), ) } else { return Err(IndexerError::CustomError( @@ -2360,11 +2358,7 @@ impl TestIndexer { if let Some(payload) = payload { (indices, Vec::new(), payload.to_string()) } else { - ( - indices, - Vec::new(), - payload_legacy.unwrap().to_string(), - ) + (indices, Vec::new(), payload_legacy.unwrap().to_string()) } } (None, Some(addresses)) => { diff --git a/sdk-tests/csdk-anchor-full-derived-test/tests/integration_tests.rs b/sdk-tests/csdk-anchor-full-derived-test/tests/integration_tests.rs index 9b40b900e5..2c3e82972a 100644 --- a/sdk-tests/csdk-anchor-full-derived-test/tests/integration_tests.rs +++ b/sdk-tests/csdk-anchor-full-derived-test/tests/integration_tests.rs @@ -3863,7 +3863,7 @@ async fn test_d9_edge_many_literals() { #[tokio::test] async fn test_d9_edge_mixed() { use csdk_anchor_full_derived_test::d9_seeds::{ - edge_cases::{AB, SEED_123, _UNDERSCORE_CONST}, + edge_cases::{_UNDERSCORE_CONST, AB, SEED_123}, D9EdgeMixedParams, }; From 177136b9ed7167c461061233b56900a3521bf819 Mon Sep 17 00:00:00 2001 From: Sergey Timoshin Date: Sat, 14 Mar 2026 19:42:28 +0000 Subject: [PATCH 3/8] feat: stabilize address batch pipeline --- Cargo.lock | 18 ++++++++++++++++++ prover/client/src/constants.rs | 2 +- prover/client/src/prover.rs | 5 ++++- .../program-test/src/indexer/test_indexer.rs | 4 +++- .../tests/integration_tests.rs | 2 +- 5 files changed, 27 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dfc954f985..40a870166f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10933,9 +10933,15 @@ dependencies = [ [[package]] name = "time" +<<<<<<< HEAD version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" +======= +version = "0.3.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" +>>>>>>> 4650c0ab3 (feat: stabilize address batch pipeline) dependencies = [ "deranged", "itoa", @@ -10948,6 +10954,7 @@ dependencies = [ [[package]] name = "time-core" +<<<<<<< HEAD version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" @@ -10957,6 +10964,17 @@ name = "time-macros" version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" +======= +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" + +[[package]] +name = "time-macros" +version = "0.2.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" +>>>>>>> 4650c0ab3 (feat: stabilize address batch pipeline) dependencies = [ "num-conv", "time-core", diff --git a/prover/client/src/constants.rs b/prover/client/src/constants.rs index 18a5c05a45..151bf87918 100644 --- a/prover/client/src/constants.rs +++ b/prover/client/src/constants.rs @@ -1,4 +1,4 @@ -pub const SERVER_ADDRESS: &str = "http://localhost:3001"; +pub const SERVER_ADDRESS: &str = "http://127.0.0.1:3001"; pub const HEALTH_CHECK: &str = "/health"; pub const PROVE_PATH: &str = "/prove"; diff --git a/prover/client/src/prover.rs b/prover/client/src/prover.rs index 3bf1bab785..56ae20d98a 100644 --- a/prover/client/src/prover.rs +++ b/prover/client/src/prover.rs @@ -51,7 +51,10 @@ pub async fn spawn_prover() { } pub async fn health_check(retries: usize, timeout: usize) -> bool { - let client = reqwest::Client::new(); + let client = match reqwest::Client::builder().no_proxy().build() { + Ok(client) => client, + Err(_) => return false, + }; let mut result = false; for _ in 0..retries { match client diff --git a/sdk-libs/program-test/src/indexer/test_indexer.rs b/sdk-libs/program-test/src/indexer/test_indexer.rs index 0b5b0583a3..c51298b9cd 100644 --- a/sdk-libs/program-test/src/indexer/test_indexer.rs +++ b/sdk-libs/program-test/src/indexer/test_indexer.rs @@ -726,7 +726,9 @@ impl Indexer for TestIndexer { initial_root: address_tree_bundle.root(), leaves_hash_chains: Vec::new(), subtrees: address_tree_bundle.get_subtrees(), - start_index: start as u64, + // Consumers use start_index as the sparse tree's next insertion index, + // not the pagination offset used for queue slicing. + start_index: address_tree_bundle.right_most_index() as u64, root_seq: address_tree_bundle.sequence_number(), }) } else { diff --git a/sdk-tests/csdk-anchor-full-derived-test/tests/integration_tests.rs b/sdk-tests/csdk-anchor-full-derived-test/tests/integration_tests.rs index 2c3e82972a..9b40b900e5 100644 --- a/sdk-tests/csdk-anchor-full-derived-test/tests/integration_tests.rs +++ b/sdk-tests/csdk-anchor-full-derived-test/tests/integration_tests.rs @@ -3863,7 +3863,7 @@ async fn test_d9_edge_many_literals() { #[tokio::test] async fn test_d9_edge_mixed() { use csdk_anchor_full_derived_test::d9_seeds::{ - edge_cases::{_UNDERSCORE_CONST, AB, SEED_123}, + edge_cases::{AB, SEED_123, _UNDERSCORE_CONST}, D9EdgeMixedParams, }; From b937409fdb410fff19ce35e24963b5148160e1db Mon Sep 17 00:00:00 2001 From: Sergey Timoshin Date: Tue, 24 Mar 2026 12:36:56 +0000 Subject: [PATCH 4/8] chore: update subproject commit for photon --- external/photon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/photon b/external/photon index 7a649f9c45..52ca110cf8 160000 --- a/external/photon +++ b/external/photon @@ -1 +1 @@ -Subproject commit 7a649f9c45a138ef47b090445163abe84775145c +Subproject commit 52ca110cf8e3d5aca6e65e1ef8e98b7632d3a16f From c82a185baf7e854c2c9dcd8d5f112162341e740b Mon Sep 17 00:00:00 2001 From: Sergey Timoshin Date: Tue, 24 Mar 2026 13:13:06 +0000 Subject: [PATCH 5/8] fix: update deranged and time package versions in Cargo.lock --- Cargo.lock | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 40a870166f..657f5422fa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1903,9 +1903,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.11" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" dependencies = [ "powerfmt", ] @@ -10933,15 +10933,9 @@ dependencies = [ [[package]] name = "time" -<<<<<<< HEAD -version = "0.3.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" -======= version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" ->>>>>>> 4650c0ab3 (feat: stabilize address batch pipeline) dependencies = [ "deranged", "itoa", @@ -10954,17 +10948,6 @@ dependencies = [ [[package]] name = "time-core" -<<<<<<< HEAD -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" -======= version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" @@ -10974,7 +10957,6 @@ name = "time-macros" version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" ->>>>>>> 4650c0ab3 (feat: stabilize address batch pipeline) dependencies = [ "num-conv", "time-core", From acca8fb02b0977aacfe8a3523feb87a337db99ba Mon Sep 17 00:00:00 2001 From: Sergey Timoshin Date: Tue, 24 Mar 2026 14:22:52 +0000 Subject: [PATCH 6/8] feat: add input validation for batch size in get_batch_address_append_circuit_inputs --- .../batch_address_append/proof_inputs.rs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/prover/client/src/proof_types/batch_address_append/proof_inputs.rs b/prover/client/src/proof_types/batch_address_append/proof_inputs.rs index 32408fdc02..5b3321427d 100644 --- a/prover/client/src/proof_types/batch_address_append/proof_inputs.rs +++ b/prover/client/src/proof_types/batch_address_append/proof_inputs.rs @@ -199,6 +199,26 @@ pub fn get_batch_address_append_circuit_inputs( changelog: &mut Vec>, indexed_changelog: &mut Vec>, ) -> Result { + if zkp_batch_size > new_element_values.len() + || zkp_batch_size > low_element_values.len() + || zkp_batch_size > low_element_indices.len() + || zkp_batch_size > low_element_next_indices.len() + || zkp_batch_size > low_element_next_values.len() + || zkp_batch_size > low_element_proofs.len() + { + return Err(ProverClientError::GenericError(format!( + "zkp_batch_size {} exceeds input slice lengths \ + (new_element_values={}, low_element_values={}, low_element_indices={}, \ + low_element_next_indices={}, low_element_next_values={}, low_element_proofs={})", + zkp_batch_size, + new_element_values.len(), + low_element_values.len(), + low_element_indices.len(), + low_element_next_indices.len(), + low_element_next_values.len(), + low_element_proofs.len(), + ))); + } let new_element_values = &new_element_values[..zkp_batch_size]; let mut new_root = [0u8; 32]; let mut low_element_circuit_merkle_proofs = Vec::with_capacity(new_element_values.len()); From d027949504334a589f6e2ba1eca999c3c4d739f2 Mon Sep 17 00:00:00 2001 From: Sergey Timoshin Date: Fri, 27 Mar 2026 12:01:54 +0000 Subject: [PATCH 7/8] solana 3 --- .gitmodules | 4 + Cargo.lock | 4294 +++++++++-------- Cargo.toml | 104 +- anchor-programs/system/src/lib.rs | 6 +- external/anchor | 1 + forester-utils/Cargo.toml | 1 + forester-utils/src/rpc_pool.rs | 2 +- forester/Cargo.toml | 1 + forester/src/compressible/subscriber.rs | 3 +- forester/src/epoch_manager.rs | 16 +- forester/src/forester_status.rs | 6 +- forester/src/health_check.rs | 2 +- forester/src/lib.rs | 2 +- forester/src/processor/v2/common.rs | 2 +- forester/src/processor/v2/tx_sender.rs | 6 +- forester/src/pubsub_client.rs | 3 +- forester/src/rollover/operations.rs | 5 +- forester/src/smart_transaction.rs | 5 +- forester/tests/e2e_test.rs | 14 +- forester/tests/legacy/address_v2_test.rs | 10 +- .../batched_state_async_indexer_test.rs | 22 +- forester/tests/test_batch_append_spent.rs | 6 +- forester/tests/test_compressible_ctoken.rs | 2 +- forester/tests/test_compressible_mint.rs | 4 +- forester/tests/test_compressible_pda.rs | 10 +- forester/tests/test_indexer_interface.rs | 6 +- js/compressed-token/CHANGELOG.md | 2 +- js/stateless.js/src/utils/instruction.ts | 3 +- .../src/compressed_account.rs | 4 +- .../src/instruction_data/invoke_cpi.rs | 5 +- .../src/instruction_data/traits.rs | 3 +- .../src/instruction_data/with_readonly.rs | 2 +- program-libs/compressed-account/src/lib.rs | 20 +- .../compressed-account/tests/zero_copy_set.rs | 122 +- .../compressible/src/registry_instructions.rs | 2 +- .../compressible/tests/compression_info.rs | 4 +- program-libs/hasher/src/hash_to_field_size.rs | 2 +- .../hasher/tests/hash_to_field_size.rs | 2 +- program-libs/token-interface/Cargo.toml | 4 +- .../src/state/compressed_token/hash.rs | 2 +- .../src/state/compressed_token/token_data.rs | 4 +- .../src/state/extensions/extension_struct.rs | 2 +- .../src/state/extensions/extension_type.rs | 5 +- .../src/state/mint/compressed_mint.rs | 2 +- .../src/state/mint/zero_copy.rs | 2 +- .../src/state/token/token_struct.rs | 6 +- .../token-interface/tests/compressed_mint.rs | 10 +- .../tests/cross_deserialization.rs | 14 +- .../tests/mint_borsh_zero_copy.rs | 12 +- .../token-interface/tests/mint_compat.rs | 2 +- .../tests/token/borsh_deser.rs | 4 +- .../token-interface/tests/token_metadata.rs | 2 +- .../zero-copy/src/traits/zero_copy_at_mut.rs | 18 +- program-libs/zero-copy/tests/borsh.rs | 20 +- .../tests/batched_merkle_tree_test.rs | 14 +- .../compressed-token-test/src/lib.rs | 6 +- .../tests/compress_only/ata_decompress.rs | 2 +- .../tests/compress_only/mod.rs | 3 +- .../tests/light_token/create_ata.rs | 2 +- .../tests/light_token/delegate_compress.rs | 4 +- .../tests/light_token/extensions.rs | 4 +- .../tests/mint/functional.rs | 2 +- .../no_system_program_cpi_failing.rs | 3 +- .../create-address-test-program/Cargo.toml | 1 + .../src/create_pda.rs | 10 +- .../create-address-test-program/src/lib.rs | 14 +- .../registry-test/tests/compressible.rs | 2 +- program-tests/registry-test/tests/tests.rs | 6 +- program-tests/system-cpi-test/Cargo.toml | 1 + .../system-cpi-test/src/cpi_context_event.rs | 2 +- .../src/cpi_context_event_inputs.rs | 2 +- .../system-cpi-test/src/create_pda.rs | 21 +- .../src/invalidate_not_owned_account.rs | 40 +- program-tests/system-cpi-test/src/lib.rs | 16 +- program-tests/system-cpi-test/src/sdk.rs | 4 +- program-tests/system-cpi-test/tests/test.rs | 2 +- .../system-cpi-v2-test/tests/event.rs | 2 +- program-tests/system-test/tests/test.rs | 2 +- .../system-test/tests/v2_failing_tests.rs | 10 +- program-tests/utils/Cargo.toml | 2 + .../utils/src/address_tree_rollover.rs | 4 - .../utils/src/assert_ctoken_transfer.rs | 3 +- program-tests/utils/src/assert_transfer2.rs | 8 +- .../src/create_address_test_program_sdk.rs | 2 +- program-tests/utils/src/e2e_test_env.rs | 6 +- program-tests/utils/src/setup_accounts.rs | 2 +- .../utils/src/state_tree_rollover.rs | 4 - program-tests/utils/src/system_program.rs | 2 +- .../utils/src/test_batch_forester.rs | 4 +- .../tests/instruction_data.rs | 2 +- .../tests/ui/pass/02_single_u8_field.rs | 2 +- .../tests/ui/pass/03_all_primitives.rs | 2 +- .../tests/ui/pass/04_nested_vecs.rs | 2 +- .../tests/ui/pass/05_nested_options.rs | 2 +- .../tests/ui/pass/06_array_fields.rs | 2 +- .../tests/ui/pass/09_enum_unit_variants.rs | 2 +- .../tests/ui/pass/10_enum_mixed_variants.rs | 2 +- .../tests/ui/pass/11_pubkey_fields.rs | 2 +- .../tests/ui/pass/12_mixed_visibility.rs | 2 +- .../tests/ui/pass/13_large_struct.rs | 2 +- .../tests/ui/pass/14_vec_of_arrays.rs | 2 +- .../tests/ui/pass/15_option_vec.rs | 2 +- .../tests/ui/pass/16_bool_fields.rs | 2 +- .../tests/ui/pass/17_signed_integers.rs | 2 +- .../tests/ui/pass/18_zero_sized_arrays.rs | 2 +- .../tests/ui/pass/19_max_sized_array.rs | 2 +- .../tests/ui/pass/20_nested_struct_fields.rs | 2 +- .../tests/ui/pass/21_enum_single_variant.rs | 2 +- .../tests/ui/pass/22_primitive_after_vec.rs | 2 +- .../ui/pass/23_multiple_options_after_vec.rs | 2 +- .../tests/ui/pass/24_vec_option_vec.rs | 2 +- .../tests/ui/pass/25_all_optional.rs | 2 +- .../tests/ui/pass/26_deep_nesting.rs | 2 +- .../tests/ui/pass/27_mixed_arrays.rs | 2 +- .../tests/ui/pass/28_field_named_data.rs | 2 +- .../tests/ui/pass/29_field_named_bytes.rs | 2 +- .../tests/ui/pass/30_underscore_fields.rs | 2 +- .../tests/ui/pass/31_numeric_suffix_fields.rs | 2 +- .../tests/ui/pass/32_camel_case_fields.rs | 2 +- .../tests/ui/pass/33_single_letter_fields.rs | 2 +- .../tests/ui/pass/34_vec_of_bools.rs | 2 +- .../tests/ui/pass/35_option_bool.rs | 2 +- .../tests/ui/pass/36_array_of_bools.rs | 2 +- .../ui/pass/37_meta_boundary_primitive.rs | 2 +- .../tests/ui/pass/38_meta_boundary_option.rs | 2 +- .../tests/ui/pass/39_enum_with_array.rs | 2 +- .../ui/pass/40_enum_discriminant_order.rs | 2 +- .../ui/pass/41_struct_with_lifetime_name.rs | 2 +- .../tests/ui/pass/42_reserved_keywords.rs | 2 +- .../tests/ui/pass/43_alternating_types.rs | 2 +- .../tests/ui/pass/44_all_vecs.rs | 2 +- .../tests/ui/pass/45_single_vec.rs | 2 +- .../tests/ui/pass/46_single_option.rs | 2 +- .../tests/ui/pass/49_max_meta_fields.rs | 2 +- .../ui/pass/50_combination_all_features.rs | 2 +- .../tests/ui/pass/51_deep_nested_structs.rs | 2 +- .../ui/pass/52_enum_containing_struct.rs | 2 +- .../tests/ui/pass/53_enum_containing_vec.rs | 2 +- .../tests/ui/pass/56_all_derives.rs | 2 +- .../tests/ui/pass/57_option_of_array.rs | 2 +- .../tests/ui/pass/59_vec_of_options.rs | 2 +- .../tests/ui/pass/60_option_pubkey.rs | 2 +- .../tests/ui/pass/61_vec_pubkey.rs | 2 +- .../tests/ui/pass/62_array_pubkey.rs | 2 +- .../tests/ui/pass/63_arrays_only.rs | 2 +- .../tests/ui/pass/64_option_first_field.rs | 2 +- .../tests/ui/pass/65_vec_of_vec.rs | 2 +- .../tests/ui/pass/66_triple_nested_option.rs | 2 +- .../ui/pass/68_enum_containing_option.rs | 2 +- .../tests/ui/pass/69_very_long_field_names.rs | 2 +- .../tests/ui/pass/70_rust_type_field_names.rs | 2 +- .../tests/ui/pass/basic_enum.rs | 2 +- .../tests/ui/pass/basic_struct.rs | 2 +- .../tests/ui/pass/complex_enum.rs | 2 +- .../tests/ui/pass/repr_c_packed_test.rs | 4 +- .../tests/ui/pass/with_arrays.rs | 2 +- .../tests/ui/pass/with_options.rs | 2 +- .../tests/ui/pass/with_pubkey.rs | 2 +- .../tests/ui/pass/with_vectors.rs | 2 +- .../src/instructions/batch_append.rs | 4 +- .../src/instructions/batch_nullify.rs | 4 +- .../instructions/batch_update_address_tree.rs | 4 +- ...nitialize_address_merkle_tree_and_queue.rs | 2 +- .../initialize_batched_address_merkle_tree.rs | 2 +- .../initialize_batched_state_merkle_tree.rs | 2 +- ...e_state_merkle_tree_and_nullifier_queue.rs | 2 +- .../src/instructions/migrate_state.rs | 4 +- .../src/instructions/nullify_leaves.rs | 10 +- .../resize_registered_program_account.rs | 7 +- .../rollover_address_merkle_tree_and_queue.rs | 2 +- .../rollover_batched_address_merkle_tree.rs | 2 +- .../rollover_batched_state_merkle_tree.rs | 2 +- .../rollover_state_merkle_tree_and_queue.rs | 2 +- .../update_address_merkle_tree.rs | 4 +- programs/account-compression/src/lib.rs | 38 +- .../src/processor/insert_into_queues.rs | 2 +- ...check_signer_is_registered_or_authority.rs | 2 +- programs/compressed-token/anchor/Cargo.toml | 4 +- programs/compressed-token/anchor/src/burn.rs | 8 +- .../compressed-token/anchor/src/delegation.rs | 8 +- .../compressed-token/anchor/src/freeze.rs | 6 +- .../src/instructions/create_token_pool.rs | 2 +- programs/compressed-token/anchor/src/lib.rs | 25 +- .../src/process_compress_spl_token_account.rs | 4 +- .../anchor/src/process_mint.rs | 6 +- .../anchor/src/process_transfer.rs | 6 +- .../anchor/src/spl_compression.rs | 8 +- programs/compressed-token/program/Cargo.toml | 3 +- .../compressed_token/mint_action/accounts.rs | 2 +- .../mint_action/actions/authority.rs | 2 +- .../actions/compress_and_close_cmint.rs | 2 +- .../mint_action/actions/create_mint.rs | 2 +- .../mint_action/actions/decompress_mint.rs | 2 +- .../mint_action/actions/process_actions.rs | 2 +- .../mint_action/actions/update_metadata.rs | 2 +- .../mint_action/mint_input.rs | 4 +- .../mint_action/mint_output.rs | 9 +- .../mint_action/zero_copy_config.rs | 2 +- .../compressed_token/transfer2/accounts.rs | 2 +- .../transfer2/check_extensions.rs | 2 +- .../compression/ctoken/compress_and_close.rs | 2 +- .../ctoken/compress_or_decompress_ctokens.rs | 2 +- .../compression/ctoken/decompress.rs | 2 +- .../transfer2/compression/ctoken/inputs.rs | 2 +- .../transfer2/compression/mod.rs | 2 +- .../compressed_token/transfer2/processor.rs | 2 +- .../compressed_token/transfer2/sum_check.rs | 2 +- .../program/src/compressible/claim.rs | 2 +- .../src/compressible/withdraw_funding_pool.rs | 2 +- .../program/src/convert_account_infos.rs | 4 +- .../program/src/ctoken/close/processor.rs | 2 +- .../program/src/ctoken/create.rs | 2 +- .../program/src/ctoken/create_ata.rs | 2 +- .../program/src/extensions/mod.rs | 2 +- .../program/src/shared/config_account.rs | 3 +- .../program/src/shared/transfer_lamports.rs | 2 +- .../program/tests/compress_and_close.rs | 2 +- .../program/tests/extensions_metadata.rs | 2 +- .../compressed-token/program/tests/mint.rs | 2 +- .../program/tests/mint_action.rs | 2 +- .../program/tests/multi_sum_check.rs | 16 +- .../program/tests/queue_indices.rs | 2 +- .../program/tests/token_input.rs | 2 +- .../program/tests/token_output.rs | 6 +- programs/registry/Cargo.toml | 1 + .../account_compression_cpi/batch_append.rs | 2 +- .../account_compression_cpi/batch_nullify.rs | 2 +- .../batch_update_address_tree.rs | 2 +- .../initialize_batched_address_tree.rs | 2 +- .../initialize_batched_state_tree.rs | 2 +- .../initialize_tree_and_queue.rs | 6 +- .../account_compression_cpi/migrate_state.rs | 2 +- .../src/account_compression_cpi/nullify.rs | 2 +- .../rollover_batched_address_tree.rs | 2 +- .../rollover_batched_state_tree.rs | 2 +- .../rollover_state_tree.rs | 4 +- .../src/account_compression_cpi/sdk.rs | 4 +- .../update_address_tree.rs | 2 +- programs/registry/src/compressible/claim.rs | 2 +- .../src/compressible/compress_and_close.rs | 2 +- .../compressed_token/compress_and_close.rs | 10 +- programs/registry/src/epoch/register_epoch.rs | 7 +- programs/registry/src/lib.rs | 38 +- programs/registry/src/sdk.rs | 4 +- programs/system/src/invoke/verify_signer.rs | 6 +- programs/system/tests/cpi_context.rs | 28 +- scripts/devenv/versions.sh | 4 +- sdk-libs/client/Cargo.toml | 2 +- .../client/src/interface/initialize_config.rs | 5 +- sdk-libs/client/src/interface/instructions.rs | 8 +- sdk-libs/client/src/rpc/errors.rs | 2 +- sdk-libs/compressed-token-sdk/src/compat.rs | 6 +- .../v1/approve/instruction.rs | 5 +- .../v1/batch_compress/instruction.rs | 5 +- .../v1/transfer/instruction.rs | 5 +- .../v2/transfer2/instruction.rs | 5 +- sdk-libs/event/src/error.rs | 3 +- sdk-libs/event/tests/parse_test.rs | 6 +- .../src/attribute_impl.rs | 2 +- sdk-libs/instruction-decoder/Cargo.toml | 6 +- sdk-libs/macros/src/hasher/data_hasher.rs | 2 +- sdk-libs/macros/src/hasher/to_byte_array.rs | 2 +- .../macros/src/light_pdas/accounts/pda.rs | 6 +- .../macros/src/light_pdas/program/compress.rs | 17 +- .../src/light_pdas/program/decompress.rs | 16 +- .../src/light_pdas/program/instructions.rs | 4 +- .../macros/src/light_pdas/program/parsing.rs | 2 +- sdk-libs/program-test/Cargo.toml | 4 + .../program-test/src/accounts/address_tree.rs | 2 +- .../src/accounts/compressible_config.rs | 2 +- .../src/accounts/register_program.rs | 2 +- .../src/accounts/state_tree_v2.rs | 2 +- .../src/accounts/test_accounts.rs | 21 +- .../src/accounts/test_keypairs.rs | 38 +- .../src/program_test/compressible_setup.rs | 6 +- sdk-libs/program-test/src/program_test/rpc.rs | 3 +- sdk-libs/program-test/src/registry_sdk.rs | 4 +- sdk-libs/program-test/src/utils/assert.rs | 4 +- .../src/utils/setup_light_programs.rs | 7 +- sdk-libs/sdk-pinocchio/src/cpi/v1/invoke.rs | 5 +- sdk-libs/sdk-types/src/error.rs | 2 +- .../src/interface/account/compression_info.rs | 6 +- .../interface/program/decompression/pda.rs | 4 +- sdk-libs/sdk/src/account.rs | 46 +- sdk-libs/sdk/src/lib.rs | 2 +- sdk-libs/sdk/tests/light_account_poseidon.rs | 2 +- sdk-libs/sdk/tests/light_account_sha.rs | 2 +- sdk-libs/token-sdk/src/instruction/create.rs | 2 +- .../token-sdk/src/instruction/create_ata.rs | 2 +- .../token-sdk/src/instruction/create_mint.rs | 2 +- .../token-sdk/src/instruction/create_mints.rs | 4 +- .../src/instruction/decompress_mint.rs | 4 +- sdk-libs/token-sdk/tests/pack_test.rs | 4 +- .../src/instruction/update_compressed_mint.rs | 4 +- .../src/derived_compress.rs | 26 +- .../src/derived_decompress.rs | 26 +- .../src/derived_light_config.rs | 4 +- sdk-tests/anchor-manual-test/src/lib.rs | 20 +- .../tests/account_loader.rs | 2 +- sdk-tests/anchor-manual-test/tests/all.rs | 2 +- sdk-tests/anchor-manual-test/tests/ata.rs | 4 +- sdk-tests/anchor-manual-test/tests/shared.rs | 2 +- sdk-tests/anchor-manual-test/tests/test.rs | 2 +- .../anchor-manual-test/tests/token_account.rs | 2 +- .../anchor-manual-test/tests/two_mints.rs | 2 +- sdk-tests/anchor-semi-manual-test/src/lib.rs | 48 +- .../tests/stress_test.rs | 2 +- .../tests/test_create_all.rs | 2 +- .../tests/test_create_ata.rs | 2 +- .../tests/test_create_mint.rs | 2 +- .../tests/test_create_pda.rs | 2 +- .../tests/test_create_token_vault.rs | 2 +- .../tests/test_create_two_mints.rs | 2 +- .../tests/test_create_zero_copy_record.rs | 2 +- sdk-tests/client-test/Cargo.toml | 2 +- .../src/amm_test/initialize.rs | 2 +- .../csdk-anchor-full-derived-test/src/lib.rs | 210 +- .../src/processors/create_single_record.rs | 2 +- .../tests/amm_stress_test.rs | 6 +- .../tests/amm_test.rs | 6 +- .../tests/basic_test.rs | 26 +- .../tests/compressibility_check_test.rs | 2 +- .../tests/d10_ata_idempotent_test.rs | 4 +- .../tests/d10_token_accounts_test.rs | 12 +- .../tests/d11_zero_copy_test.rs | 14 +- .../tests/failing_tests.rs | 2 +- .../tests/integration_tests.rs | 152 +- .../tests/mint/metadata_test.rs | 2 +- .../tests/stress_test.rs | 2 +- .../tests/test_create_all.rs | 2 +- .../tests/test_create_ata.rs | 2 +- .../tests/test_create_mint.rs | 2 +- .../tests/test_create_multi_byte_records.rs | 2 +- .../tests/test_create_one_byte_record.rs | 2 +- .../tests/test_create_pda.rs | 2 +- .../tests/test_create_token_vault.rs | 2 +- .../tests/test_create_two_mints.rs | 2 +- .../tests/test_create_zero_copy_record.rs | 2 +- .../tests/account_loader.rs | 2 +- sdk-tests/pinocchio-manual-test/tests/all.rs | 2 +- sdk-tests/pinocchio-manual-test/tests/ata.rs | 4 +- .../pinocchio-manual-test/tests/shared.rs | 2 +- sdk-tests/pinocchio-manual-test/tests/test.rs | 2 +- .../tests/token_account.rs | 2 +- .../pinocchio-manual-test/tests/two_mints.rs | 2 +- .../programs/sdk-anchor-test/Cargo.toml | 1 + .../programs/sdk-anchor-test/src/lib.rs | 28 +- .../programs/sdk-anchor-test/src/read_only.rs | 8 +- .../sdk-light-token-pinocchio/Cargo.toml | 8 +- .../tests/test_create_ata.rs | 8 +- .../tests/test_create_mint.rs | 4 +- .../tests/test_create_token_account.rs | 24 +- .../tests/test_ctoken_mint_to.rs | 2 +- .../tests/test_transfer.rs | 6 +- .../tests/test_transfer_interface.rs | 28 +- .../tests/test_transfer_spl_ctoken.rs | 12 +- sdk-tests/sdk-light-token-test/Cargo.toml | 10 +- .../tests/test_create_ata.rs | 4 +- .../tests/test_create_mint.rs | 4 +- .../tests/test_create_token_account.rs | 12 +- .../tests/test_ctoken_mint_to.rs | 2 +- .../tests/test_transfer.rs | 6 +- .../tests/test_transfer_interface.rs | 28 +- .../tests/test_transfer_spl_ctoken.rs | 12 +- sdk-tests/sdk-native-test/tests/test.rs | 4 +- sdk-tests/sdk-pinocchio-v1-test/tests/test.rs | 4 +- sdk-tests/sdk-pinocchio-v2-test/tests/test.rs | 4 +- sdk-tests/sdk-token-test/Cargo.toml | 2 +- .../sdk-token-test/src/ctoken_pda/mint.rs | 2 +- .../src/ctoken_pda/processor.rs | 2 +- sdk-tests/sdk-token-test/src/lib.rs | 32 +- .../src/mint_compressed_tokens_cpi_write.rs | 2 +- .../sdk-token-test/src/pda_ctoken/mint.rs | 2 +- .../src/pda_ctoken/processor.rs | 2 +- .../src/process_batch_compress_tokens.rs | 2 +- .../src/process_compress_full_and_close.rs | 2 +- .../src/process_compress_tokens.rs | 2 +- .../src/process_create_compressed_account.rs | 18 +- ...s_create_ctoken_with_compress_to_pubkey.rs | 2 +- .../src/process_create_escrow_pda.rs | 2 +- .../src/process_create_two_mints.rs | 2 +- .../process_decompress_full_cpi_context.rs | 2 +- .../src/process_decompress_tokens.rs | 2 +- .../src/process_four_invokes.rs | 2 +- .../src/process_four_transfer2.rs | 2 +- .../src/process_transfer_tokens.rs | 2 +- .../src/process_update_deposit.rs | 2 +- sdk-tests/sdk-token-test/tests/ctoken_pda.rs | 2 +- .../tests/test_compress_to_pubkey.rs | 2 +- sdk-tests/sdk-v1-native-test/tests/test.rs | 4 +- .../single-account-loader-test/src/lib.rs | 2 +- .../single-account-loader-test/tests/test.rs | 4 +- sdk-tests/single-ata-test/src/lib.rs | 2 +- sdk-tests/single-ata-test/tests/test.rs | 2 +- sdk-tests/single-mint-test/src/lib.rs | 2 +- sdk-tests/single-mint-test/tests/test.rs | 2 +- sdk-tests/single-pda-test/src/lib.rs | 2 +- sdk-tests/single-pda-test/tests/test.rs | 2 +- sdk-tests/single-token-test/src/lib.rs | 2 +- sdk-tests/single-token-test/tests/test.rs | 2 +- xtask/Cargo.toml | 2 + xtask/src/fetch_block_events.rs | 2 +- xtask/src/fetch_failed_txs.rs | 3 +- xtask/src/fetch_keypair_txs.rs | 13 +- xtask/src/new_deployment.rs | 2 +- 405 files changed, 3531 insertions(+), 3339 deletions(-) create mode 160000 external/anchor diff --git a/.gitmodules b/.gitmodules index 3d09b3cb7d..ead9669dee 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,7 @@ [submodule "external/photon"] path = external/photon url = git@github.com:Lightprotocol/photon.git +[submodule "external/anchor"] + path = external/anchor + url = https://github.com/Lightprotocol/anchor.git + branch = swen/ctoken-interface diff --git a/Cargo.lock b/Cargo.lock index 657f5422fa..0b57a094d7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -115,49 +115,70 @@ dependencies = [ [[package]] name = "agave-feature-set" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a2c365c0245cbb8959de725fc2b44c754b673fdf34c9a7f9d4a25c35a7bf1" +checksum = "1e631ba26aeffe98dee3db0b8612fc7c67cda71bc57b0f82f28dc48231df6bc8" dependencies = [ "ahash", "solana-epoch-schedule", - "solana-hash", - "solana-pubkey", - "solana-sha256-hasher", + "solana-hash 3.1.0", + "solana-pubkey 3.0.0", + "solana-sha256-hasher 3.1.0", "solana-svm-feature-set", ] [[package]] -name = "agave-precompiles" -version = "2.3.13" +name = "agave-reserved-account-keys" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d60d73657792af7f2464e9181d13c3979e94bb09841d9ffa014eef4ef0492b77" +checksum = "d062865aedfbdc7511726d47e472687db0db4fb08e3c3ab2ac68570106c2f1b6" dependencies = [ "agave-feature-set", - "bincode", - "digest 0.10.7", - "ed25519-dalek", - "libsecp256k1", - "openssl", - "sha3", - "solana-ed25519-program", - "solana-message", - "solana-precompile-error", - "solana-pubkey", - "solana-sdk-ids", - "solana-secp256k1-program", - "solana-secp256r1-program", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", ] [[package]] -name = "agave-reserved-account-keys" -version = "2.3.13" +name = "agave-syscalls" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8289c8a8a2ef5aa10ce49a070f360f4e035ee3410b8d8f3580fb39d8cf042581" +checksum = "3c89f228e93d1bc769578efd0c5a445715ae04ad96f9b6f8d16d018ad7f9221a" dependencies = [ - "agave-feature-set", - "solana-pubkey", - "solana-sdk-ids", + "bincode", + "libsecp256k1", + "num-traits", + "solana-account", + "solana-account-info 3.1.1", + "solana-big-mod-exp", + "solana-blake3-hasher", + "solana-bn254", + "solana-clock", + "solana-cpi", + "solana-curve25519", + "solana-hash 3.1.0", + "solana-instruction 3.3.0", + "solana-keccak-hasher", + "solana-loader-v3-interface", + "solana-poseidon", + "solana-program-entrypoint", + "solana-program-runtime", + "solana-pubkey 3.0.0", + "solana-sbpf", + "solana-sdk-ids 3.1.0", + "solana-secp256k1-recover", + "solana-sha256-hasher 3.1.0", + "solana-stable-layout", + "solana-stake-interface", + "solana-svm-callback", + "solana-svm-feature-set", + "solana-svm-log-collector", + "solana-svm-measure", + "solana-svm-timings", + "solana-svm-type-overrides", + "solana-sysvar", + "solana-sysvar-id", + "solana-transaction-context", + "thiserror 2.0.18", ] [[package]] @@ -214,11 +235,10 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "anchor-attribute-access-control" -version = "0.31.1" +version = "1.0.0-rc.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f70fd141a4d18adf11253026b32504f885447048c7494faf5fa83b01af9c0cf" +checksum = "f3db7f5f8a6b16fa2b6e1b0222e656249c3abedf052e3943babf248929571204" dependencies = [ - "anchor-syn", "proc-macro2", "quote", "syn 1.0.109", @@ -226,12 +246,11 @@ dependencies = [ [[package]] name = "anchor-attribute-account" -version = "0.31.1" +version = "1.0.0-rc.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715a261c57c7679581e06f07a74fa2af874ac30f86bd8ea07cca4a7e5388a064" +checksum = "0a12661acaba9866a5f2d8d8d46a1eed8b484f41dc9f94f808c3b07d35726816" dependencies = [ "anchor-syn", - "bs58", "proc-macro2", "quote", "syn 1.0.109", @@ -239,9 +258,9 @@ dependencies = [ [[package]] name = "anchor-attribute-constant" -version = "0.31.1" +version = "1.0.0-rc.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "730d6df8ae120321c5c25e0779e61789e4b70dc8297102248902022f286102e4" +checksum = "6dff08bc0187aafc559da8f63b5adeab0bcdf97128765c72dd9a4861f70627fc" dependencies = [ "anchor-syn", "quote", @@ -250,9 +269,9 @@ dependencies = [ [[package]] name = "anchor-attribute-error" -version = "0.31.1" +version = "1.0.0-rc.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27e6e449cc3a37b2880b74dcafb8e5a17b954c0e58e376432d7adc646fb333ef" +checksum = "c2af8ce12fb8cf782a3e127d376698a4548a518e38b4686f9c439adce4730b48" dependencies = [ "anchor-syn", "quote", @@ -261,9 +280,9 @@ dependencies = [ [[package]] name = "anchor-attribute-event" -version = "0.31.1" +version = "1.0.0-rc.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7710e4c54adf485affcd9be9adec5ef8846d9c71d7f31e16ba86ff9fc1dd49f" +checksum = "338be5df076369b99585264aaa46c66229ead67568d61bd38c3ab0fa7a15e554" dependencies = [ "anchor-syn", "proc-macro2", @@ -273,18 +292,16 @@ dependencies = [ [[package]] name = "anchor-attribute-program" -version = "0.31.1" +version = "1.0.0-rc.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ecfd49b2aeadeb32f35262230db402abed76ce87e27562b34f61318b2ec83c" +checksum = "e5c4ec70cef4ef7e2d87b4e9c550f727a43d691d3d7f3e4d6b2e3bd530ae098d" dependencies = [ "anchor-lang-idl", "anchor-syn", "anyhow", - "bs58", "heck 0.3.3", "proc-macro2", "quote", - "serde_json", "syn 1.0.109", ] @@ -306,16 +323,16 @@ dependencies = [ "rand 0.8.5", "solana-sdk", "solana-security-txt", - "spl-token 7.0.0", - "spl-token-2022 7.0.0", + "spl-token", + "spl-token-2022", "zerocopy", ] [[package]] name = "anchor-derive-accounts" -version = "0.31.1" +version = "1.0.0-rc.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be89d160793a88495af462a7010b3978e48e30a630c91de47ce2c1d3cb7a6149" +checksum = "f610cb50e10e4c404cc774f20a4eb602b904f68ea04590f8b1eb22a1e28b33e5" dependencies = [ "anchor-syn", "quote", @@ -324,12 +341,12 @@ dependencies = [ [[package]] name = "anchor-derive-serde" -version = "0.31.1" +version = "1.0.0-rc.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abc6ee78acb7bfe0c2dd2abc677aaa4789c0281a0c0ef01dbf6fe85e0fd9e6e4" +checksum = "be9ead49a9689493f8857a61dd1abf1d70eeeeb0683f8c1e09b015ab5bdd382d" dependencies = [ "anchor-syn", - "borsh-derive-internal", + "proc-macro-crate 3.5.0", "proc-macro2", "quote", "syn 1.0.109", @@ -337,9 +354,9 @@ dependencies = [ [[package]] name = "anchor-derive-space" -version = "0.31.1" +version = "1.0.0-rc.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134a01c0703f6fd355a0e472c033f6f3e41fac1ef6e370b20c50f4c8d022cea7" +checksum = "ea4d1372743444967347b60f9311d2ee54a630152fd1d6d805adebd7fcd72056" dependencies = [ "proc-macro2", "quote", @@ -348,9 +365,9 @@ dependencies = [ [[package]] name = "anchor-lang" -version = "0.31.1" +version = "1.0.0-rc.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6bab117055905e930f762c196e08f861f8dfe7241b92cee46677a3b15561a0a" +checksum = "254d0cb160ea5c4c6a8c2f847bbd0f384fef733ebc36ef8426ae95f1bfda5757" dependencies = [ "anchor-attribute-access-control", "anchor-attribute-account", @@ -364,9 +381,30 @@ dependencies = [ "anchor-lang-idl", "base64 0.21.7", "bincode", - "borsh 0.10.4", + "borsh 1.6.1", "bytemuck", - "solana-program", + "const-crypto", + "solana-account-info 3.1.1", + "solana-clock", + "solana-cpi", + "solana-define-syscall 3.0.0", + "solana-feature-gate-interface", + "solana-instruction 3.3.0", + "solana-instructions-sysvar", + "solana-invoke", + "solana-loader-v3-interface", + "solana-msg 3.1.0", + "solana-program-entrypoint", + "solana-program-error 3.0.1", + "solana-program-memory 3.1.0", + "solana-program-option 3.1.0", + "solana-program-pack", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", + "solana-stake-interface", + "solana-system-interface", + "solana-sysvar", + "solana-sysvar-id", "thiserror 1.0.69", ] @@ -400,7 +438,7 @@ name = "anchor-manual-test" version = "0.1.0" dependencies = [ "anchor-lang", - "borsh 0.10.4", + "borsh 1.6.1", "bytemuck", "light-account", "light-client", @@ -414,15 +452,15 @@ dependencies = [ "light-token-client", "light-token-interface", "light-token-types", - "solana-account-info", - "solana-instruction", + "solana-account-info 3.1.1", + "solana-instruction 3.3.0", "solana-keypair", - "solana-msg", + "solana-msg 3.1.0", "solana-program", - "solana-program-error", - "solana-pubkey", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "solana-sdk", - "solana-signer", + "solana-signer 3.0.0", "tokio", ] @@ -431,7 +469,7 @@ name = "anchor-semi-manual-test" version = "0.1.0" dependencies = [ "anchor-lang", - "borsh 0.10.4", + "borsh 1.6.1", "bytemuck", "light-account", "light-anchor-spl", @@ -449,38 +487,38 @@ dependencies = [ "light-token-types", "rand 0.8.5", "solana-account", - "solana-account-info", - "solana-instruction", + "solana-account-info 3.1.1", + "solana-instruction 3.3.0", "solana-keypair", - "solana-msg", + "solana-msg 3.1.0", "solana-program", - "solana-program-error", - "solana-pubkey", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "solana-sdk", - "solana-signer", + "solana-signer 3.0.0", "tokio", ] [[package]] name = "anchor-spl" -version = "0.31.1" +version = "1.0.0-rc.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c08cb5d762c0694f74bd02c9a5b04ea53cefc496e2c27b3234acffca5cd076b" +checksum = "b3f1da81d6a7486339833833db9285f3771c1c368db418d481b5584a901cd675" dependencies = [ "anchor-lang", - "spl-associated-token-account 6.0.0", - "spl-pod", - "spl-token 7.0.0", - "spl-token-2022 6.0.0", - "spl-token-group-interface 0.5.0", - "spl-token-metadata-interface 0.6.0", + "spl-associated-token-account-interface", + "spl-pod 0.7.2", + "spl-token-2022-interface", + "spl-token-group-interface", + "spl-token-interface", + "spl-token-metadata-interface 0.8.0", ] [[package]] name = "anchor-syn" -version = "0.31.1" +version = "1.0.0-rc.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc7a6d90cc643df0ed2744862cdf180587d1e5d28936538c18fc8908489ed67" +checksum = "c9a855d34b1b0488f37ccc759c8bd4a696cd3a7bba8cb0734c2a965109f707da" dependencies = [ "anyhow", "bs58", @@ -489,7 +527,6 @@ dependencies = [ "proc-macro2", "quote", "serde", - "serde_json", "sha2 0.10.9", "syn 1.0.109", "thiserror 1.0.69", @@ -515,9 +552,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.21" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" dependencies = [ "anstyle", "anstyle-parse", @@ -530,15 +567,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anstyle-parse" -version = "0.2.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" dependencies = [ "utf8parse", ] @@ -569,6 +606,58 @@ version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" +[[package]] +name = "anza-quinn" +version = "0.11.9-rustsec20260037" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91bfa08f6e7e4187354ff4f793b81cc08218a6a95cc48f5de7616d44452bf6e0" +dependencies = [ + "anza-quinn-proto", + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-udp", + "rustc-hash 2.1.1", + "rustls 0.23.37", + "socket2 0.6.3", + "thiserror 2.0.18", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "anza-quinn-proto" +version = "0.11.13-rustsec20260037" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d00a4d8cf8d72ee56e0ee20d3b4eef4785ce1b05299c4982c6de7f251c458efe" +dependencies = [ + "bytes", + "fastbloom", + "getrandom 0.3.4", + "lru-slab", + "rand 0.9.2", + "ring", + "rustc-hash 2.1.1", + "rustls 0.23.37", + "rustls-pki-types", + "rustls-platform-verifier", + "slab", + "thiserror 2.0.18", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "arc-swap" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a07d1f37ff60921c83bdfc7407723bdefe89b44b98a9b772f225c8f9d67141a6" +dependencies = [ + "rustversion", +] + [[package]] name = "ark-bn254" version = "0.4.0" @@ -958,6 +1047,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base64" version = "0.12.3" @@ -982,6 +1077,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + [[package]] name = "batched-merkle-tree-test" version = "0.1.0" @@ -998,7 +1099,7 @@ dependencies = [ "light-zero-copy", "rand 0.8.5", "serial_test", - "solana-pubkey", + "solana-pubkey 3.0.0", "tokio", ] @@ -1067,15 +1168,16 @@ dependencies = [ [[package]] name = "blake3" -version = "1.8.2" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" +checksum = "2468ef7d57b3fb7e16b576e8377cdbde2320c60e1491e961d11da40fc4f02a2d" dependencies = [ "arrayref", "arrayvec", "cc", "cfg-if", "constant_time_eq", + "cpufeatures", "digest 0.10.7", ] @@ -1097,6 +1199,34 @@ dependencies = [ "generic-array", ] +[[package]] +name = "blst" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcdb4c7013139a150f9fc55d123186dbfaba0d912817466282c73ac49e71fb45" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + +[[package]] +name = "blstrs" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a8a8ed6fefbeef4a8c7b460e4110e12c5e22a5b7cf32621aae6ad650c4dcf29" +dependencies = [ + "blst", + "byte-slice-cast", + "ff", + "group", + "pairing", + "rand_core 0.6.4", + "serde", + "subtle", +] + [[package]] name = "borsh" version = "0.10.4" @@ -1109,11 +1239,12 @@ dependencies = [ [[package]] name = "borsh" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1da5ab77c1437701eeff7c88d968729e7766172279eab0676857b3d63af7a6f" +checksum = "cfd1e3f8955a5d7de9fab72fc8373fade9fb8a703968cb200ae3dc6cf08e185a" dependencies = [ - "borsh-derive 1.6.0", + "borsh-derive 1.6.1", + "bytes", "cfg_aliases", ] @@ -1132,9 +1263,9 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0686c856aa6aac0c4498f936d7d6a02df690f614c03e4d906d1018062b5c5e2c" +checksum = "bfcfdc083699101d5a7965e49925975f2f55060f94f9a05e7187be95d530ca59" dependencies = [ "once_cell", "proc-macro-crate 3.5.0", @@ -1211,6 +1342,12 @@ dependencies = [ "serde", ] +[[package]] +name = "byte-slice-cast" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" + [[package]] name = "bytecount" version = "0.6.9" @@ -1273,9 +1410,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.56" +version = "1.2.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" +checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423" dependencies = [ "find-msvc-tools", "jobserver", @@ -1353,9 +1490,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.60" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a" +checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" dependencies = [ "clap_builder", "clap_derive", @@ -1363,9 +1500,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.60" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" dependencies = [ "anstream", "anstyle", @@ -1375,9 +1512,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.55" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" +checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -1387,9 +1524,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "client-test" @@ -1420,29 +1557,29 @@ dependencies = [ "solana-commitment-config", "solana-compute-budget-interface", "solana-epoch-info", - "solana-hash", - "solana-instruction", + "solana-hash 3.1.0", + "solana-instruction 3.3.0", "solana-keypair", - "solana-program-error", - "solana-pubkey", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "solana-rpc-client", "solana-rpc-client-api", "solana-sdk", - "solana-signature", - "solana-signer", + "solana-signature 3.2.0", + "solana-signer 3.0.0", "solana-system-interface", "solana-transaction", - "solana-transaction-error", + "solana-transaction-error 3.1.0", "solana-transaction-status-client-types", - "spl-token 7.0.0", + "spl-token", "tokio", ] [[package]] name = "colorchoice" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" [[package]] name = "combine" @@ -1474,7 +1611,7 @@ dependencies = [ "account-compression", "anchor-lang", "anchor-spl", - "borsh 0.10.4", + "borsh 1.6.1", "forester-utils", "light-batched-merkle-tree", "light-client", @@ -1498,9 +1635,9 @@ dependencies = [ "serial_test", "solana-sdk", "solana-system-interface", - "spl-pod", - "spl-token 7.0.0", - "spl-token-2022 7.0.0", + "spl-pod 0.7.2", + "spl-token", + "spl-token-2022", "tokio", ] @@ -1545,30 +1682,38 @@ dependencies = [ ] [[package]] -name = "console_error_panic_hook" -version = "0.1.7" +name = "console" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +checksum = "d64e8af5551369d19cf50138de61f1c42074ab970f74e99be916646777f8fc87" dependencies = [ - "cfg-if", - "wasm-bindgen", + "encode_unicode", + "libc", + "unicode-width 0.2.2", + "windows-sys 0.61.2", ] [[package]] -name = "console_log" -version = "0.2.2" +name = "const-crypto" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" +checksum = "1c06f1eb05f06cf2e380fdded278fbf056a38974299d77960555a311dcf91a52" dependencies = [ - "log", - "web-sys", + "keccak-const", + "sha2-const-stable", ] +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + [[package]] name = "constant_time_eq" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" +checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" [[package]] name = "core-foundation" @@ -1620,6 +1765,7 @@ version = "1.0.0" dependencies = [ "account-compression", "anchor-lang", + "borsh 1.6.1", "light-compressed-account", "light-hasher", "light-instruction-decoder", @@ -1669,24 +1815,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] -name = "crypto-common" -version = "0.1.7" +name = "crypto-bigint" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", "rand_core 0.6.4", - "typenum", + "subtle", + "zeroize", ] [[package]] -name = "crypto-mac" -version = "0.8.0" +name = "crypto-common" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ "generic-array", - "subtle", + "rand_core 0.6.4", + "typenum", ] [[package]] @@ -1695,7 +1843,7 @@ version = "0.1.0" dependencies = [ "anchor-lang", "bincode", - "borsh 0.10.4", + "borsh 1.6.1", "bytemuck", "csdk-anchor-full-derived-test-sdk", "light-account", @@ -1720,17 +1868,17 @@ dependencies = [ "rand 0.8.5", "sha2 0.10.9", "solana-account", - "solana-account-info", - "solana-instruction", + "solana-account-info 3.1.1", + "solana-instruction 3.3.0", "solana-keypair", "solana-logger", - "solana-msg", + "solana-msg 3.1.0", "solana-program", - "solana-program-error", - "solana-pubkey", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "solana-sdk", - "solana-signature", - "solana-signer", + "solana-signature 3.2.0", + "solana-signer 3.0.0", "tokio", ] @@ -1746,7 +1894,7 @@ dependencies = [ "light-compressed-token-sdk", "light-sdk", "light-token", - "solana-pubkey", + "solana-pubkey 3.0.0", ] [[package]] @@ -1758,19 +1906,6 @@ dependencies = [ "cipher", ] -[[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - [[package]] name = "curve25519-dalek" version = "4.1.3" @@ -1806,8 +1941,18 @@ version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.21.3", + "darling_macro 0.21.3", +] + +[[package]] +name = "darling" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +dependencies = [ + "darling_core 0.23.0", + "darling_macro 0.23.0", ] [[package]] @@ -1824,13 +1969,37 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "darling_core" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim 0.11.1", + "syn 2.0.117", +] + [[package]] name = "darling_macro" version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ - "darling_core", + "darling_core 0.21.3", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core 0.23.0", "quote", "syn 2.0.117", ] @@ -1887,6 +2056,16 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "092966b41edc516079bdf31ec78a2e0588d1d0c08f78b91d8307215928642b2b" +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "zeroize", +] + [[package]] name = "der-parser" version = "8.2.0" @@ -1933,7 +2112,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" dependencies = [ - "console", + "console 0.15.11", "shell-words", "tempfile", "zeroize", @@ -1955,6 +2134,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", + "const-oid", "crypto-common", "subtle", ] @@ -2068,38 +2248,54 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abe71d579d1812060163dff96056261deb5bf6729b100fa2e36a68b9649ba3d3" +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + [[package]] name = "ed25519" -version = "1.5.3" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ + "pkcs8", "signature", ] [[package]] name = "ed25519-dalek" -version = "1.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" dependencies = [ - "curve25519-dalek 3.2.0", + "curve25519-dalek", "ed25519", - "rand 0.7.3", + "rand_core 0.6.4", "serde", - "sha2 0.9.9", + "sha2 0.10.9", + "subtle", "zeroize", ] [[package]] name = "ed25519-dalek-bip32" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908" +checksum = "6b49a684b133c4980d7ee783936af771516011c8cd15f429dbda77245e282f03" dependencies = [ "derivation-path", "ed25519-dalek", - "hmac 0.12.1", + "hmac", "sha2 0.10.9", ] @@ -2133,6 +2329,25 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + [[package]] name = "encode_unicode" version = "1.0.0" @@ -2203,9 +2418,9 @@ dependencies = [ [[package]] name = "env_filter" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a1c3cc8e57274ec99de65301228b537f1e4eedc1b8e0f9411c6caac8ae7308f" +checksum = "32e90c2accc4b07a8456ea0debdc2e7587bdd890680d71173a15d4ae604f6eef" dependencies = [ "log", "regex", @@ -2213,22 +2428,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.9.3" +version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "env_logger" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2daee4ea451f429a58296525ddf28b45a3b64f1acf6587e2067437bb11e218d" +checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a" dependencies = [ "anstream", "anstyle", @@ -2313,6 +2515,17 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "bitvec", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "fiat-crypto" version = "0.2.9" @@ -2334,6 +2547,15 @@ dependencies = [ "five8_core", ] +[[package]] +name = "five8" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23f76610e969fa1784327ded240f1e28a3fd9520c9cec93b636fcf62dd37f772" +dependencies = [ + "five8_core", +] + [[package]] name = "five8_const" version = "0.1.4" @@ -2343,6 +2565,15 @@ dependencies = [ "five8_core", ] +[[package]] +name = "five8_const" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a0f1728185f277989ca573a402716ae0beaaea3f76a8ff87ef9dd8fb19436c5" +dependencies = [ + "five8_core", +] + [[package]] name = "five8_core" version = "0.1.2" @@ -2402,14 +2633,14 @@ dependencies = [ "async-channel 2.5.0", "async-trait", "base64 0.13.1", - "borsh 0.10.4", + "borsh 1.6.1", "bs58", - "clap 4.5.60", + "clap 4.6.0", "create-address-test-program", "csdk-anchor-full-derived-test", "dashmap 6.1.0", "dotenvy", - "env_logger 0.11.9", + "env_logger", "forester-utils", "futures", "hex", @@ -2446,8 +2677,9 @@ dependencies = [ "solana-account-decoder", "solana-client", "solana-commitment-config", + "solana-compute-budget-interface", "solana-program", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-rpc-client-api", "solana-sdk", "solana-transaction-status", @@ -2467,7 +2699,7 @@ dependencies = [ "anchor-lang", "async-trait", "bb8", - "borsh 0.10.4", + "borsh 1.6.1", "governor 0.8.1", "light-account-checks", "light-batched-merkle-tree", @@ -2486,8 +2718,9 @@ dependencies = [ "light-sparse-merkle-tree", "light-token-interface", "num-traits", - "solana-instruction", - "solana-pubkey", + "solana-commitment-config", + "solana-instruction 3.3.0", + "solana-pubkey 3.0.0", "solana-sdk", "thiserror 2.0.18", "tokio", @@ -2626,6 +2859,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -2645,10 +2879,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -2750,10 +2982,23 @@ dependencies = [ "ark-ff 0.5.0", "ark-serialize 0.5.0", "num-bigint 0.4.6", - "solana-bn254 3.2.1", + "solana-bn254", "thiserror 1.0.69", ] +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand 0.8.5", + "rand_core 0.6.4", + "rand_xorshift 0.3.0", + "subtle", +] + [[package]] name = "h2" version = "0.3.27" @@ -2898,35 +3143,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hidapi" -version = "2.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1b71e1f4791fb9e93b9d7ee03d70b501ab48f6151432fbcadeabc30fe15396e" -dependencies = [ - "cc", - "cfg-if", - "libc", - "pkg-config", - "windows-sys 0.61.2", -] - [[package]] name = "histogram" version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12cb882ccb290b8646e554b157ab0b71e64e8d5bef775cd66b6531e52d302669" -[[package]] -name = "hmac" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" -dependencies = [ - "crypto-mac", - "digest 0.9.0", -] - [[package]] name = "hmac" version = "0.12.1" @@ -2936,17 +3158,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "hmac-drbg" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" -dependencies = [ - "digest 0.9.0", - "generic-array", - "hmac 0.8.1", -] - [[package]] name = "http" version = "0.2.12" @@ -3307,14 +3518,14 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.11" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" +checksum = "25470f23803092da7d239834776d653104d551bc4d7eacaf31e6837854b8e9eb" dependencies = [ - "console", - "number_prefix", + "console 0.16.3", "portable-atomic", "unicode-width 0.2.2", + "unit-prefix", "web-time", ] @@ -3350,9 +3561,9 @@ checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" [[package]] name = "iri-string" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" +checksum = "d8e7418f59cc01c88316161279a7f665217ae316b388e58a0d10e29f54f1e5eb" dependencies = [ "memchr", "serde", @@ -3402,9 +3613,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "jiff" @@ -3439,7 +3650,7 @@ dependencies = [ "cesu8", "cfg-if", "combine 4.6.7", - "jni-sys", + "jni-sys 0.3.1", "log", "thiserror 1.0.69", "walkdir", @@ -3448,9 +3659,31 @@ dependencies = [ [[package]] name = "jni-sys" -version = "0.3.0" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.117", +] [[package]] name = "jobserver" @@ -3487,14 +3720,27 @@ dependencies = [ "serde_json", ] +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2 0.10.9", + "signature", +] + [[package]] name = "kaigan" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ba15de5aeb137f0f65aa3bf82187647f1285abfe5b20c80c2c37f7007ad519a" +checksum = "4f25ded719a2354f6b1a51d0c0741c25bc7afe038617664eb37f6418439eb084" dependencies = [ "borsh 0.10.4", - "serde", ] [[package]] @@ -3506,6 +3752,12 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "keccak-const" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d8d8ce877200136358e0bbff3a77965875db3af755a11e1fa6b1b3e2df13ea" + [[package]] name = "lazy_static" version = "1.5.0" @@ -3548,14 +3800,12 @@ dependencies = [ "arrayref", "base64 0.12.3", "digest 0.9.0", - "hmac-drbg", "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", "rand 0.7.3", "serde", "sha2 0.9.9", - "typenum", ] [[package]] @@ -3600,25 +3850,25 @@ dependencies = [ "light-sdk-macros", "light-sdk-types", "light-token-interface", - "solana-account-info", - "solana-instruction", - "solana-pubkey", + "solana-account-info 3.1.1", + "solana-instruction 3.3.0", + "solana-pubkey 3.0.0", ] [[package]] name = "light-account-checks" version = "0.8.0" dependencies = [ - "borsh 0.10.4", + "borsh 1.6.1", "pinocchio", "pinocchio-system", "rand 0.8.5", - "solana-account-info", + "solana-account-info 3.1.1", "solana-cpi", - "solana-instruction", - "solana-msg", - "solana-program-error", - "solana-pubkey", + "solana-instruction 3.3.0", + "solana-msg 3.1.0", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "solana-system-interface", "solana-sysvar", "thiserror 2.0.18", @@ -3637,25 +3887,26 @@ dependencies = [ "light-sdk-types", "light-token-interface", "pinocchio", - "solana-instruction", - "solana-pubkey", + "solana-instruction 3.3.0", + "solana-pubkey 3.0.0", ] [[package]] name = "light-anchor-spl" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1c802e3de6de4bb03bc9e9bacbba8aa94823a083046aaf0ef275b1321984e3" +version = "1.0.0-rc.5" dependencies = [ "anchor-lang", + "borsh 1.6.1", "mpl-token-metadata", - "spl-associated-token-account 6.0.0", - "spl-memo", - "spl-pod", - "spl-token 7.0.0", - "spl-token-2022 6.0.0", - "spl-token-group-interface 0.5.0", - "spl-token-metadata-interface 0.6.0", + "solana-stake-interface", + "solana-sysvar", + "spl-associated-token-account-interface", + "spl-memo-interface", + "spl-pod 0.7.2", + "spl-token-2022-interface", + "spl-token-group-interface", + "spl-token-interface", + "spl-token-metadata-interface 0.8.0", ] [[package]] @@ -3670,7 +3921,7 @@ name = "light-batched-merkle-tree" version = "0.11.0" dependencies = [ "aligned-sized", - "borsh 0.10.4", + "borsh 1.6.1", "light-account-checks", "light-bloom-filter", "light-compressed-account", @@ -3682,10 +3933,10 @@ dependencies = [ "light-zero-copy", "pinocchio", "rand 0.8.5", - "solana-account-info", - "solana-msg", - "solana-program-error", - "solana-pubkey", + "solana-account-info 3.1.1", + "solana-msg 3.1.0", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "solana-sysvar", "thiserror 2.0.18", "zerocopy", @@ -3701,7 +3952,7 @@ dependencies = [ "pinocchio", "rand 0.8.5", "solana-nostd-keccak", - "solana-program-error", + "solana-program-error 3.0.1", "thiserror 2.0.18", ] @@ -3713,7 +3964,7 @@ checksum = "58cfa375d028164719e3ffef93d2e5c27855cc8a5bb5bf257b868d17c12a3e66" dependencies = [ "bytemuck", "memoffset", - "solana-program-error", + "solana-program-error 2.2.2", "thiserror 1.0.69", ] @@ -3724,7 +3975,7 @@ dependencies = [ "anchor-lang", "async-trait", "base64 0.13.1", - "borsh 0.10.4", + "borsh 1.6.1", "bs58", "futures", "lazy_static", @@ -3756,19 +4007,19 @@ dependencies = [ "solana-clock", "solana-commitment-config", "solana-compute-budget-interface", - "solana-hash", - "solana-instruction", + "solana-hash 3.1.0", + "solana-instruction 3.3.0", "solana-keypair", "solana-message", - "solana-program-error", - "solana-pubkey", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "solana-rpc-client", "solana-rpc-client-api", - "solana-signature", + "solana-signature 3.2.0", "solana-transaction", - "solana-transaction-error", + "solana-transaction-error 3.1.0", "solana-transaction-status-client-types", - "spl-pod", + "spl-pod 0.7.2", "spl-token-2022-interface", "thiserror 2.0.18", "tokio", @@ -3782,7 +4033,7 @@ dependencies = [ "anchor-lang", "ark-bn254 0.5.0", "ark-ff 0.5.0", - "borsh 0.10.4", + "borsh 1.6.1", "bytemuck", "light-hasher", "light-heap", @@ -3793,9 +4044,9 @@ dependencies = [ "num-bigint 0.4.6", "pinocchio", "rand 0.8.5", - "solana-msg", - "solana-program-error", - "solana-pubkey", + "solana-msg 3.1.0", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "thiserror 2.0.18", "tinyvec", "zerocopy", @@ -3810,7 +4061,7 @@ dependencies = [ "anchor-lang", "arrayvec", "bitvec", - "borsh 0.10.4", + "borsh 1.6.1", "lazy_static", "light-account-checks", "light-array-map", @@ -3829,11 +4080,12 @@ dependencies = [ "pinocchio-system", "pinocchio-token-program", "rand 0.8.5", - "solana-pubkey", + "solana-msg 3.1.0", + "solana-pubkey 3.0.0", "solana-security-txt", - "spl-pod", - "spl-token 7.0.0", - "spl-token-2022 7.0.0", + "spl-pod 0.7.2", + "spl-token", + "spl-token-2022", "tinyvec", "zerocopy", ] @@ -3844,7 +4096,7 @@ version = "0.23.0" dependencies = [ "anchor-lang", "arrayvec", - "borsh 0.10.4", + "borsh 1.6.1", "light-account", "light-account-checks", "light-compressed-account", @@ -3854,12 +4106,12 @@ dependencies = [ "light-token-interface", "light-token-types", "light-zero-copy", - "solana-account-info", + "solana-account-info 3.1.1", "solana-cpi", - "solana-instruction", - "solana-msg", - "solana-program-error", - "solana-pubkey", + "solana-instruction 3.3.0", + "solana-msg 3.1.0", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "thiserror 2.0.18", ] @@ -3869,7 +4121,7 @@ version = "0.6.0" dependencies = [ "aligned-sized", "anchor-lang", - "borsh 0.10.4", + "borsh 1.6.1", "bytemuck", "light-account-checks", "light-compressed-account", @@ -3881,9 +4133,9 @@ dependencies = [ "pinocchio", "pinocchio-pubkey", "rand 0.8.5", - "solana-msg", - "solana-program-error", - "solana-pubkey", + "solana-msg 3.1.0", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "solana-rent", "solana-sysvar", "thiserror 2.0.18", @@ -3896,7 +4148,7 @@ version = "5.0.0" dependencies = [ "ark-bn254 0.5.0", "ark-ff 0.5.0", - "borsh 0.10.4", + "borsh 1.6.1", "light-bounded-vec", "light-hash-set", "light-hasher", @@ -3906,7 +4158,7 @@ dependencies = [ "num-traits", "pinocchio", "rand 0.8.5", - "solana-program-error", + "solana-program-error 3.0.1", "thiserror 2.0.18", "tokio", ] @@ -3915,7 +4167,7 @@ dependencies = [ name = "light-event" version = "0.23.1" dependencies = [ - "borsh 0.10.4", + "borsh 1.6.1", "bs58", "light-compressed-account", "light-hasher", @@ -3935,7 +4187,7 @@ dependencies = [ "num-bigint 0.4.6", "num-traits", "rand 0.8.5", - "solana-program-error", + "solana-program-error 3.0.1", "thiserror 2.0.18", ] @@ -3945,15 +4197,15 @@ version = "5.0.0" dependencies = [ "ark-bn254 0.5.0", "ark-ff 0.5.0", - "borsh 0.10.4", + "borsh 1.6.1", "light-poseidon 0.4.0", "num-bigint 0.4.6", "pinocchio", "rand 0.8.5", "sha2 0.10.9", "sha3", - "solana-program-error", - "solana-pubkey", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "thiserror 2.0.18", "tinyvec", "zerocopy", @@ -3990,7 +4242,7 @@ dependencies = [ "num-traits", "pinocchio", "rand 0.8.5", - "solana-program-error", + "solana-program-error 3.0.1", "thiserror 2.0.18", ] @@ -3998,16 +4250,16 @@ dependencies = [ name = "light-instruction-decoder" version = "0.23.0" dependencies = [ - "borsh 0.10.4", + "borsh 1.6.1", "bs58", "light-compressed-account", "light-instruction-decoder-derive", "light-sdk-types", "light-token-interface", "serde", - "solana-instruction", - "solana-pubkey", - "solana-signature", + "solana-instruction 3.3.0", + "solana-pubkey 3.0.0", + "solana-signature 3.2.0", "tabled", ] @@ -4016,7 +4268,7 @@ name = "light-instruction-decoder-derive" version = "0.4.0" dependencies = [ "bs58", - "darling", + "darling 0.21.3", "heck 0.5.0", "proc-macro2", "quote", @@ -4031,7 +4283,7 @@ dependencies = [ "bs58", "proc-macro2", "quote", - "solana-pubkey", + "solana-pubkey 3.0.0", "syn 2.0.117", ] @@ -4040,12 +4292,12 @@ name = "light-merkle-tree-metadata" version = "0.11.0" dependencies = [ "anchor-lang", - "borsh 0.10.4", + "borsh 1.6.1", "bytemuck", "light-compressed-account", "pinocchio", - "solana-msg", - "solana-program-error", + "solana-msg 3.1.0", + "solana-program-error 3.0.1", "solana-sysvar", "thiserror 2.0.18", "zerocopy", @@ -4115,7 +4367,7 @@ dependencies = [ "anchor-lang", "async-trait", "base64 0.13.1", - "borsh 0.10.4", + "borsh 1.6.1", "bs58", "bytemuck", "chrono", @@ -4154,14 +4406,18 @@ dependencies = [ "solana-account", "solana-banks-client", "solana-compute-budget", - "solana-instruction", - "solana-pubkey", + "solana-compute-budget-interface", + "solana-instruction 3.3.0", + "solana-message", + "solana-pubkey 3.0.0", "solana-rpc-client-api", "solana-sdk", + "solana-sdk-ids 3.1.0", + "solana-system-interface", "solana-transaction", "solana-transaction-status", "solana-transaction-status-client-types", - "spl-token-2022 7.0.0", + "spl-token-2022", "tabled", "tokio", ] @@ -4186,7 +4442,7 @@ dependencies = [ "serde", "serde_json", "serial_test", - "solana-bn254 3.2.1", + "solana-bn254", "thiserror 2.0.18", "tokio", "tracing", @@ -4199,7 +4455,7 @@ dependencies = [ "account-compression", "aligned-sized", "anchor-lang", - "borsh 0.10.4", + "borsh 1.6.1", "light-account-checks", "light-batched-merkle-tree", "light-compressible", @@ -4209,12 +4465,13 @@ dependencies = [ "light-system-program-anchor", "light-token-interface", "light-zero-copy", - "solana-account-info", - "solana-instruction", - "solana-pubkey", + "solana-account-info 3.1.1", + "solana-instruction 3.3.0", + "solana-program", + "solana-pubkey 3.0.0", "solana-sdk", "solana-security-txt", - "spl-pod", + "spl-pod 0.7.2", ] [[package]] @@ -4223,7 +4480,7 @@ version = "0.23.0" dependencies = [ "anchor-lang", "bincode", - "borsh 0.10.4", + "borsh 1.6.1", "bytemuck", "light-account-checks", "light-compressed-account", @@ -4237,15 +4494,15 @@ dependencies = [ "light-token-interface", "light-zero-copy", "num-bigint 0.4.6", - "solana-account-info", + "solana-account-info 3.1.1", "solana-clock", "solana-cpi", - "solana-instruction", + "solana-instruction 3.3.0", "solana-loader-v3-interface", - "solana-msg", + "solana-msg 3.1.0", "solana-program", - "solana-program-error", - "solana-pubkey", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "solana-system-interface", "solana-sysvar", "thiserror 2.0.18", @@ -4255,8 +4512,8 @@ dependencies = [ name = "light-sdk-macros" version = "0.23.0" dependencies = [ - "borsh 0.10.4", - "darling", + "borsh 1.6.1", + "darling 0.21.3", "light-account-checks", "light-compressed-account", "light-hasher", @@ -4268,7 +4525,7 @@ dependencies = [ "proptest", "quote", "rand 0.8.5", - "solana-pubkey", + "solana-pubkey 3.0.0", "syn 2.0.117", ] @@ -4276,7 +4533,7 @@ dependencies = [ name = "light-sdk-pinocchio" version = "0.23.0" dependencies = [ - "borsh 0.10.4", + "borsh 1.6.1", "light-account-checks", "light-compressed-account", "light-hasher", @@ -4293,7 +4550,7 @@ name = "light-sdk-types" version = "0.23.0" dependencies = [ "anchor-lang", - "borsh 0.10.4", + "borsh 1.6.1", "bytemuck", "light-account-checks", "light-compressed-account", @@ -4302,10 +4559,10 @@ dependencies = [ "light-macros", "light-token-interface", "rand 0.8.5", - "solana-account-info", - "solana-msg", - "solana-program-error", - "solana-pubkey", + "solana-account-info 3.1.1", + "solana-msg 3.1.0", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "thiserror 2.0.18", ] @@ -4339,7 +4596,7 @@ name = "light-system-program-pinocchio" version = "1.2.0" dependencies = [ "aligned-sized", - "borsh 0.10.4", + "borsh 1.6.1", "bytemuck", "light-account-checks", "light-batched-merkle-tree", @@ -4357,8 +4614,8 @@ dependencies = [ "pinocchio-pubkey", "pinocchio-system", "rand 0.8.5", - "solana-msg", - "solana-pubkey", + "solana-msg 3.1.0", + "solana-pubkey 3.0.0", "solana-security-txt", "thiserror 2.0.18", "zerocopy", @@ -4372,7 +4629,7 @@ dependencies = [ "anchor-lang", "anchor-spl", "base64 0.13.1", - "borsh 0.10.4", + "borsh 1.6.1", "bytemuck", "create-address-test-program", "forester-utils", @@ -4407,17 +4664,19 @@ dependencies = [ "rand 0.8.5", "reqwest 0.12.28", "solana-banks-client", - "solana-instruction", + "solana-commitment-config", + "solana-instruction 3.3.0", "solana-keypair", - "solana-msg", - "solana-pubkey", + "solana-msg 3.1.0", + "solana-program-pack", + "solana-pubkey 3.0.0", "solana-sdk", - "solana-signature", - "solana-signer", + "solana-signature 3.2.0", + "solana-signer 3.0.0", "solana-system-interface", - "spl-pod", - "spl-token 7.0.0", - "spl-token-2022 7.0.0", + "spl-pod 0.7.2", + "spl-token", + "spl-token-2022", "thiserror 2.0.18", ] @@ -4427,7 +4686,7 @@ version = "0.23.0" dependencies = [ "anchor-lang", "arrayvec", - "borsh 0.10.4", + "borsh 1.6.1", "light-account", "light-account-checks", "light-batched-merkle-tree", @@ -4444,13 +4703,13 @@ dependencies = [ "light-token-types", "light-zero-copy", "pinocchio", - "solana-account-info", + "solana-account-info 3.1.1", "solana-cpi", - "solana-instruction", - "solana-msg", - "solana-program-error", - "solana-pubkey", - "spl-pod", + "solana-instruction 3.3.0", + "solana-msg 3.1.0", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", + "spl-pod 0.7.2", "thiserror 2.0.18", ] @@ -4458,7 +4717,7 @@ dependencies = [ name = "light-token-client" version = "0.23.0" dependencies = [ - "borsh 0.10.4", + "borsh 1.6.1", "light-client", "light-compressed-account", "light-compressed-token-sdk", @@ -4468,15 +4727,15 @@ dependencies = [ "light-token-interface", "light-token-types", "light-zero-copy", - "solana-instruction", + "solana-instruction 3.3.0", "solana-keypair", - "solana-msg", - "solana-pubkey", - "solana-signature", - "solana-signer", + "solana-msg 3.1.0", + "solana-pubkey 3.0.0", + "solana-signature 3.2.0", + "solana-signer 3.0.0", "solana-system-interface", - "spl-pod", - "spl-token-2022 7.0.0", + "spl-pod 0.7.2", + "spl-token-2022", ] [[package]] @@ -4485,7 +4744,7 @@ version = "0.5.0" dependencies = [ "aligned-sized", "anchor-lang", - "borsh 0.10.4", + "borsh 1.6.1", "bytemuck", "light-account-checks", "light-array-map", @@ -4501,13 +4760,13 @@ dependencies = [ "pinocchio", "pinocchio-pubkey", "rand 0.8.5", - "solana-account-info", - "solana-msg", - "solana-program-error", - "solana-pubkey", + "solana-account-info 3.1.1", + "solana-msg 3.1.0", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "solana-sysvar", - "spl-pod", - "spl-token-2022 7.0.0", + "spl-pod 0.7.2", + "spl-token-2022", "spl-token-metadata-interface 0.6.0", "thiserror 2.0.18", "tinyvec", @@ -4518,7 +4777,7 @@ dependencies = [ name = "light-token-pinocchio" version = "0.23.0" dependencies = [ - "borsh 0.10.4", + "borsh 1.6.1", "light-account-checks", "light-compressed-account", "light-macros", @@ -4533,12 +4792,12 @@ name = "light-token-types" version = "0.23.0" dependencies = [ "anchor-lang", - "borsh 0.10.4", + "borsh 1.6.1", "light-account-checks", "light-compressed-account", "light-macros", "light-sdk-types", - "solana-msg", + "solana-msg 3.1.0", "thiserror 2.0.18", ] @@ -4549,8 +4808,8 @@ dependencies = [ "groth16-solana", "light-compressed-account", "pinocchio", - "solana-msg", - "solana-program-error", + "solana-msg 3.1.0", + "solana-program-error 3.0.1", "thiserror 2.0.18", ] @@ -4558,11 +4817,11 @@ dependencies = [ name = "light-zero-copy" version = "0.6.0" dependencies = [ - "borsh 0.10.4", + "borsh 1.6.1", "light-zero-copy-derive", "pinocchio", "rand 0.8.5", - "solana-program-error", + "solana-program-error 3.0.1", "trybuild", "zerocopy", ] @@ -4592,19 +4851,21 @@ checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" [[package]] name = "litesvm" -version = "0.7.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23bca37ac374948b348e29c74b324dc36f18bbbd1ccf80e2046d967521cbd143" +checksum = "6a6d4edace08253a908d301768f291a7115e8e19e13473dd6e1ace78d6366433" dependencies = [ "agave-feature-set", - "agave-precompiles", "agave-reserved-account-keys", + "agave-syscalls", "ansi_term", "bincode", "indexmap", "itertools 0.14.0", "log", + "serde", "solana-account", + "solana-address 2.4.0", "solana-address-lookup-table-interface", "solana-bpf-loader-program", "solana-builtins", @@ -4615,41 +4876,39 @@ dependencies = [ "solana-epoch-schedule", "solana-fee", "solana-fee-structure", - "solana-hash", - "solana-instruction", + "solana-hash 3.1.0", + "solana-instruction 3.3.0", "solana-instructions-sysvar", "solana-keypair", "solana-last-restart-slot", "solana-loader-v3-interface", "solana-loader-v4-interface", - "solana-log-collector", "solana-message", - "solana-native-token 3.0.0", + "solana-native-token", "solana-nonce", "solana-nonce-account", "solana-precompile-error", - "solana-program-error", + "solana-program-error 3.0.1", "solana-program-runtime", - "solana-pubkey", "solana-rent", - "solana-sdk-ids", - "solana-sha256-hasher", - "solana-signature", - "solana-signer", + "solana-sdk-ids 3.1.0", + "solana-sha256-hasher 3.1.0", + "solana-signature 3.2.0", + "solana-signer 3.0.0", "solana-slot-hashes", "solana-slot-history", "solana-stake-interface", "solana-svm-callback", + "solana-svm-log-collector", + "solana-svm-timings", "solana-svm-transaction", "solana-system-interface", "solana-system-program", "solana-sysvar", "solana-sysvar-id", - "solana-timings", "solana-transaction", "solana-transaction-context", - "solana-transaction-error", - "solana-vote-program", + "solana-transaction-error 3.1.0", "thiserror 2.0.18", ] @@ -4689,15 +4948,6 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" -[[package]] -name = "memmap2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -dependencies = [ - "libc", -] - [[package]] name = "memoffset" version = "0.9.1" @@ -4764,14 +5014,16 @@ dependencies = [ [[package]] name = "mpl-token-metadata" -version = "5.1.1" +version = "5.1.2-alpha.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046f0779684ec348e2759661361c8798d79021707b1392cb49f3b5eb911340ff" +checksum = "9824d84a8e23b634256591ce2f05b3180f7be5fcd193d939c43764c804aac5ef" dependencies = [ - "borsh 0.10.4", + "borsh 1.6.1", + "kaigan", "num-derive 0.3.3", "num-traits", "solana-program", + "solana-program-error 3.0.1", "thiserror 1.0.69", ] @@ -4885,9 +5137,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" [[package]] name = "num-derive" @@ -4964,9 +5216,9 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" dependencies = [ "num_enum_derive", "rustversion", @@ -4974,9 +5226,9 @@ dependencies = [ [[package]] name = "num_enum_derive" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" dependencies = [ "proc-macro-crate 3.5.0", "proc-macro2", @@ -4984,12 +5236,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - [[package]] name = "oid-registry" version = "0.6.1" @@ -5001,9 +5247,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "once_cell_polyfill" @@ -5030,9 +5276,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.75" +version = "0.10.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" +checksum = "951c002c75e16ea2c65b8c7e4d3d51d5530d8dfa7d060b4776828c88cfb18ecf" dependencies = [ "bitflags 2.11.0", "cfg-if", @@ -5060,24 +5306,14 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" -[[package]] -name = "openssl-src" -version = "300.5.5+3.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f1787d533e03597a7934fd0a765f0d28e94ecc5fb7789f8053b1e699a56f709" -dependencies = [ - "cc", -] - [[package]] name = "openssl-sys" -version = "0.9.111" +version = "0.9.112" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" +checksum = "57d55af3b3e226502be1526dfdba67ab0e9c96fc293004e79576b2b9edb0dbdb" dependencies = [ "cc", "libc", - "openssl-src", "pkg-config", "vcpkg", ] @@ -5107,6 +5343,15 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "pairing" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" +dependencies = [ + "group", +] + [[package]] name = "papergrid" version = "0.17.0" @@ -5153,22 +5398,29 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "pastey" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b867cad97c0791bbd3aaa6472142568c6c9e8f71937e98379f584cfb0cf35bec" + [[package]] name = "pbkdf2" -version = "0.4.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "crypto-mac", + "digest 0.10.7", ] [[package]] name = "pbkdf2" -version = "0.11.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest 0.10.7", + "hmac", ] [[package]] @@ -5247,15 +5499,15 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pinocchio" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b971851087bc3699b001954ad02389d50c41405ece3548cbcafc88b3e20017a" +checksum = "b8afe4f39c0e25cc471b35b89963312791a5162d45a86578cbeaad9e5e7d1b3b" [[package]] name = "pinocchio-light-program-test" version = "0.1.0" dependencies = [ - "borsh 0.10.4", + "borsh 1.6.1", "bytemuck", "light-account", "light-account-pinocchio", @@ -5276,11 +5528,11 @@ dependencies = [ "pinocchio-system", "rand 0.8.5", "solana-account", - "solana-instruction", + "solana-instruction 3.3.0", "solana-keypair", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-sdk", - "solana-signer", + "solana-signer 3.0.0", "tokio", ] @@ -5294,7 +5546,7 @@ checksum = "cd11022408f312e6179ece321c1f7dc0d1b2aa7765fddd39b2a7378d65a899e8" name = "pinocchio-manual-test" version = "0.1.0" dependencies = [ - "borsh 0.10.4", + "borsh 1.6.1", "bytemuck", "light-account-pinocchio", "light-client", @@ -5311,13 +5563,13 @@ dependencies = [ "pinocchio", "pinocchio-pubkey", "pinocchio-system", - "solana-instruction", + "solana-instruction 3.3.0", "solana-keypair", - "solana-msg", - "solana-program-error", - "solana-pubkey", + "solana-msg 3.1.0", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "solana-sdk", - "solana-signer", + "solana-signer 3.0.0", "tokio", ] @@ -5325,7 +5577,7 @@ dependencies = [ name = "pinocchio-nostd-test" version = "0.1.0" dependencies = [ - "borsh 0.10.4", + "borsh 1.6.1", "light-compressed-account", "light-hasher", "light-macros", @@ -5344,7 +5596,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0225638cadcbebae8932cb7f49cb5da7c15c21beb19f048f05a5ca7d93f065" dependencies = [ - "five8_const", + "five8_const 0.1.4", "pinocchio", "sha2-const-stable", ] @@ -5378,6 +5630,16 @@ dependencies = [ "pinocchio-token-interface", ] +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" version = "0.3.32" @@ -5404,9 +5666,9 @@ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "portable-atomic-util" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9db96d7fa8782dd8c15ce32ffe8680bbd1e978a43bf51a34d39483540495f5" +checksum = "091397be61a01d4be58e7841595bd4bfedb15f1cd54977d79b8271e94ed799a3" dependencies = [ "portable-atomic", ] @@ -5466,7 +5728,7 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit 0.25.4+spec-1.1.0", + "toml_edit 0.25.8+spec-1.1.0", ] [[package]] @@ -5583,9 +5845,9 @@ dependencies = [ [[package]] name = "proptest" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37566cb3fdacef14c0737f9546df7cfeadbfbc9fef10991038bf5015d0c80532" +checksum = "4b45fcc2344c680f5025fe57779faef368840d0bd1f42f216291f0dc4ace4744" dependencies = [ "bit-set", "bit-vec", @@ -5593,7 +5855,7 @@ dependencies = [ "num-traits", "rand 0.9.2", "rand_chacha 0.9.0", - "rand_xorshift", + "rand_xorshift 0.4.0", "regex-syntax", "rusty-fork", "tempfile", @@ -5688,7 +5950,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" dependencies = [ "bytes", - "fastbloom", "getrandom 0.3.4", "lru-slab", "rand 0.9.2", @@ -5696,7 +5957,6 @@ dependencies = [ "rustc-hash 2.1.1", "rustls 0.23.37", "rustls-pki-types", - "rustls-platform-verifier", "slab", "thiserror 2.0.18", "tinyvec", @@ -5845,6 +6105,15 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "rand_xorshift" version = "0.4.0" @@ -5950,7 +6219,7 @@ dependencies = [ "account-compression", "anchor-lang", "anchor-spl", - "borsh 0.10.4", + "borsh 1.6.1", "forester-utils", "light-account-checks", "light-batched-merkle-tree", @@ -6127,6 +6396,16 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4389f1d5789befaf6029ebd9f7dac4af7f7e3d61b69d4f30e2ac02b57e7712b0" +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + [[package]] name = "ring" version = "0.17.14" @@ -6232,7 +6511,7 @@ dependencies = [ "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.103.9", + "rustls-webpki 0.103.10", "subtle", "zeroize", ] @@ -6282,7 +6561,7 @@ dependencies = [ "rustls 0.23.37", "rustls-native-certs", "rustls-platform-verifier-android", - "rustls-webpki 0.103.9", + "rustls-webpki 0.103.10", "security-framework", "security-framework-sys", "webpki-root-certs", @@ -6307,9 +6586,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.9" +version = "0.103.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" +checksum = "df33b2b81ac578cabaf06b89b0631153a3f416b0a886e8a7a1707fb51abbd1ef" dependencies = [ "ring", "rustls-pki-types", @@ -6426,6 +6705,7 @@ name = "sdk-anchor-test" version = "0.7.0" dependencies = [ "anchor-lang", + "borsh 1.6.1", "light-client", "light-compressed-account", "light-hasher", @@ -6445,7 +6725,7 @@ name = "sdk-light-token-pinocchio-test" version = "0.1.0" dependencies = [ "anchor-spl", - "borsh 0.10.4", + "borsh 1.6.1", "light-client", "light-compressed-account", "light-compressible", @@ -6460,8 +6740,8 @@ dependencies = [ "light-token-types", "pinocchio", "solana-sdk", - "spl-pod", - "spl-token-2022 7.0.0", + "spl-pod 0.7.2", + "spl-token-2022", "tokio", ] @@ -6470,7 +6750,7 @@ name = "sdk-light-token-test" version = "0.1.0" dependencies = [ "anchor-spl", - "borsh 0.10.4", + "borsh 1.6.1", "light-client", "light-compressed-account", "light-compressible", @@ -6483,8 +6763,8 @@ dependencies = [ "light-token-types", "solana-program", "solana-sdk", - "spl-pod", - "spl-token-2022 7.0.0", + "spl-pod 0.7.2", + "spl-token-2022", "tokio", ] @@ -6492,7 +6772,7 @@ dependencies = [ name = "sdk-native-test" version = "1.0.0" dependencies = [ - "borsh 0.10.4", + "borsh 1.6.1", "light-compressed-account", "light-hasher", "light-macros", @@ -6509,7 +6789,7 @@ dependencies = [ name = "sdk-pinocchio-v1-test" version = "1.0.0" dependencies = [ - "borsh 0.10.4", + "borsh 1.6.1", "light-compressed-account", "light-hasher", "light-macros", @@ -6526,7 +6806,7 @@ dependencies = [ name = "sdk-pinocchio-v2-test" version = "1.0.0" dependencies = [ - "borsh 0.10.4", + "borsh 1.6.1", "light-compressed-account", "light-hasher", "light-macros", @@ -6546,7 +6826,7 @@ dependencies = [ "anchor-lang", "anchor-spl", "arrayvec", - "borsh 0.10.4", + "borsh 1.6.1", "light-batched-merkle-tree", "light-client", "light-compressed-account", @@ -6566,9 +6846,9 @@ dependencies = [ "light-token-types", "light-zero-copy", "serial_test", - "solana-account-info", - "solana-instruction", - "solana-pubkey", + "solana-account-info 3.1.1", + "solana-instruction 3.3.0", + "solana-pubkey 3.0.0", "solana-sdk", "tokio", ] @@ -6577,7 +6857,7 @@ dependencies = [ name = "sdk-v1-native-test" version = "1.0.0" dependencies = [ - "borsh 0.10.4", + "borsh 1.6.1", "light-compressed-account", "light-hasher", "light-macros", @@ -6590,6 +6870,20 @@ dependencies = [ "tokio", ] +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + [[package]] name = "security-framework" version = "3.7.0" @@ -6718,9 +7012,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.0.4" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" +checksum = "876ac351060d4f882bb1032b6369eb0aef79ad9df1ea8bc404874d8cc3d0cd98" dependencies = [ "serde_core", ] @@ -6751,9 +7045,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.17.0" +version = "3.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "381b283ce7bc6b476d903296fb59d0d36633652b633b27f64db4fb46dcbfc3b9" +checksum = "dd5414fad8e6907dbdd5bc441a50ae8d6e26151a03b1de04d89a5576de61d01f" dependencies = [ "serde_core", "serde_with_macros", @@ -6761,11 +7055,11 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.17.0" +version = "3.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6d4e30573c8cb306ed6ab1dca8423eec9a463ea0e155f45399455e0368b27e0" +checksum = "d3db8978e608f1fe7357e211969fd9abdcae80bac1ba7a3369bb7eb6b404eb65" dependencies = [ - "darling", + "darling 0.23.0", "proc-macro2", "quote", "syn 2.0.117", @@ -6904,9 +7198,13 @@ dependencies = [ [[package]] name = "signature" -version = "1.6.4" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] [[package]] name = "simd-adler32" @@ -6919,7 +7217,7 @@ name = "single-account-loader-test" version = "0.1.0" dependencies = [ "anchor-lang", - "borsh 0.10.4", + "borsh 1.6.1", "bytemuck", "light-account", "light-client", @@ -6931,15 +7229,15 @@ dependencies = [ "light-sdk", "light-test-utils", "light-token", - "solana-account-info", - "solana-instruction", + "solana-account-info 3.1.1", + "solana-instruction 3.3.0", "solana-keypair", - "solana-msg", + "solana-msg 3.1.0", "solana-program", - "solana-program-error", - "solana-pubkey", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "solana-sdk", - "solana-signer", + "solana-signer 3.0.0", "tokio", ] @@ -6948,7 +7246,7 @@ name = "single-ata-test" version = "0.1.0" dependencies = [ "anchor-lang", - "borsh 0.10.4", + "borsh 1.6.1", "light-account", "light-client", "light-compressed-account", @@ -6960,15 +7258,15 @@ dependencies = [ "light-test-utils", "light-token", "light-token-interface", - "solana-account-info", - "solana-instruction", + "solana-account-info 3.1.1", + "solana-instruction 3.3.0", "solana-keypair", - "solana-msg", + "solana-msg 3.1.0", "solana-program", - "solana-program-error", - "solana-pubkey", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "solana-sdk", - "solana-signer", + "solana-signer 3.0.0", "tokio", ] @@ -6977,7 +7275,7 @@ name = "single-mint-test" version = "0.1.0" dependencies = [ "anchor-lang", - "borsh 0.10.4", + "borsh 1.6.1", "light-account", "light-anchor-spl", "light-client", @@ -6991,15 +7289,15 @@ dependencies = [ "light-token", "light-token-interface", "light-token-types", - "solana-account-info", - "solana-instruction", + "solana-account-info 3.1.1", + "solana-instruction 3.3.0", "solana-keypair", - "solana-msg", + "solana-msg 3.1.0", "solana-program", - "solana-program-error", - "solana-pubkey", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "solana-sdk", - "solana-signer", + "solana-signer 3.0.0", "tokio", ] @@ -7008,7 +7306,7 @@ name = "single-pda-test" version = "0.1.0" dependencies = [ "anchor-lang", - "borsh 0.10.4", + "borsh 1.6.1", "light-account", "light-client", "light-compressed-account", @@ -7018,15 +7316,15 @@ dependencies = [ "light-sdk", "light-test-utils", "light-token", - "solana-account-info", - "solana-instruction", + "solana-account-info 3.1.1", + "solana-instruction 3.3.0", "solana-keypair", - "solana-msg", + "solana-msg 3.1.0", "solana-program", - "solana-program-error", - "solana-pubkey", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "solana-sdk", - "solana-signer", + "solana-signer 3.0.0", "tokio", ] @@ -7035,7 +7333,7 @@ name = "single-token-test" version = "0.1.0" dependencies = [ "anchor-lang", - "borsh 0.10.4", + "borsh 1.6.1", "light-account", "light-client", "light-compressed-account", @@ -7048,15 +7346,15 @@ dependencies = [ "light-token", "light-token-interface", "light-token-types", - "solana-account-info", - "solana-instruction", + "solana-account-info 3.1.1", + "solana-instruction 3.3.0", "solana-keypair", - "solana-msg", + "solana-msg 3.1.0", "solana-program", - "solana-program-error", - "solana-pubkey", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "solana-sdk", - "solana-signer", + "solana-signer 3.0.0", "tokio", ] @@ -7106,27 +7404,27 @@ dependencies = [ [[package]] name = "solana-account" -version = "2.2.1" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f949fe4edaeaea78c844023bfc1c898e0b1f5a100f8a8d2d0f85d0a7b090258" +checksum = "efc0ed36decb689413b9da5d57f2be49eea5bebb3cf7897015167b0c4336e731" dependencies = [ "bincode", "serde", "serde_bytes", "serde_derive", - "solana-account-info", + "solana-account-info 3.1.1", "solana-clock", - "solana-instruction", - "solana-pubkey", - "solana-sdk-ids", + "solana-instruction-error", + "solana-pubkey 4.1.0", + "solana-sdk-ids 3.1.0", "solana-sysvar", ] [[package]] name = "solana-account-decoder" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba71c97fa4d85ce4a1e0e79044ad0406c419382be598c800202903a7688ce71a" +checksum = "310a1c3e5fa2e910e2e2a7141a04da396a8fb309dd80f0df97a68002e9416239" dependencies = [ "Inflector", "base64 0.22.1", @@ -7134,50 +7432,48 @@ dependencies = [ "bs58", "bv", "serde", - "serde_derive", "serde_json", "solana-account", "solana-account-decoder-client-types", "solana-address-lookup-table-interface", "solana-clock", - "solana-config-program-client", + "solana-config-interface", "solana-epoch-schedule", "solana-fee-calculator", - "solana-instruction", + "solana-instruction 3.3.0", "solana-loader-v3-interface", "solana-nonce", - "solana-program-option", + "solana-program-option 3.1.0", "solana-program-pack", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-rent", - "solana-sdk-ids", + "solana-sdk-ids 3.1.0", "solana-slot-hashes", "solana-slot-history", "solana-stake-interface", "solana-sysvar", "solana-vote-interface", "spl-generic-token", - "spl-token 8.0.0", - "spl-token-2022 8.0.1", - "spl-token-group-interface 0.6.0", - "spl-token-metadata-interface 0.7.0", + "spl-token-2022-interface", + "spl-token-group-interface", + "spl-token-interface", + "spl-token-metadata-interface 0.8.0", "thiserror 2.0.18", "zstd", ] [[package]] name = "solana-account-decoder-client-types" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5519e8343325b707f17fbed54fcefb325131b692506d0af9e08a539d15e4f8cf" +checksum = "6c998358e00c1260e9af46e006917094df19aa000321cd8192d8555ad1e1690a" dependencies = [ "base64 0.22.1", "bs58", "serde", - "serde_derive", "serde_json", "solana-account", - "solana-pubkey", + "solana-pubkey 3.0.0", "zstd", ] @@ -7186,28 +7482,73 @@ name = "solana-account-info" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8f5152a288ef1912300fc6efa6c2d1f9bb55d9398eb6c72326360b8063987da" +dependencies = [ + "solana-program-error 2.2.2", + "solana-program-memory 2.3.1", + "solana-pubkey 2.4.0", +] + +[[package]] +name = "solana-account-info" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9cf16495d9eb53e3d04e72366a33bb1c20c24e78c171d8b8f5978357b63ae95" dependencies = [ "bincode", + "serde_core", + "solana-address 2.4.0", + "solana-program-error 3.0.1", + "solana-program-memory 3.1.0", +] + +[[package]] +name = "solana-address" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2ecac8e1b7f74c2baa9e774c42817e3e75b20787134b76cc4d45e8a604488f5" +dependencies = [ + "solana-address 2.4.0", +] + +[[package]] +name = "solana-address" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f67735365edc7fb19ed74ec950597107c8ee9cbfebac57b8868b3e78fb6df16" +dependencies = [ + "borsh 1.6.1", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek", + "five8 1.0.0", + "five8_const 1.0.0", + "rand 0.9.2", "serde", - "solana-program-error", - "solana-program-memory", - "solana-pubkey", + "serde_derive", + "sha2-const-stable", + "solana-atomic-u64 3.0.1", + "solana-define-syscall 5.0.0", + "solana-program-error 3.0.1", + "solana-sanitize 3.0.1", + "solana-sha256-hasher 3.1.0", + "wincode 0.4.8", ] [[package]] name = "solana-address-lookup-table-interface" -version = "2.2.2" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1673f67efe870b64a65cb39e6194be5b26527691ce5922909939961a6e6b395" +checksum = "5e8df0b083c10ce32490410f3795016b1b5d9b4d094658c0a5e496753645b7cd" dependencies = [ "bincode", "bytemuck", "serde", "serde_derive", "solana-clock", - "solana-instruction", - "solana-pubkey", - "solana-sdk-ids", + "solana-instruction 3.3.0", + "solana-instruction-error", + "solana-pubkey 4.1.0", + "solana-sdk-ids 3.1.0", "solana-slot-hashes", ] @@ -7220,28 +7561,37 @@ dependencies = [ "parking_lot", ] +[[package]] +name = "solana-atomic-u64" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "085db4906d89324cef2a30840d59eaecf3d4231c560ec7c9f6614a93c652f501" +dependencies = [ + "parking_lot", +] + [[package]] name = "solana-banks-client" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68548570c38a021c724b5aa0112f45a54bdf7ff1b041a042848e034a95a96994" +checksum = "bf3d649f50844ddf8f572010491af77c2e40a81621779abd58f5198fdf1cf5a4" dependencies = [ - "borsh 1.6.0", + "borsh 1.6.1", "futures", "solana-account", "solana-banks-interface", "solana-clock", "solana-commitment-config", - "solana-hash", + "solana-hash 3.1.0", "solana-message", "solana-program-pack", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-rent", - "solana-signature", + "solana-signature 3.2.0", "solana-sysvar", "solana-transaction", "solana-transaction-context", - "solana-transaction-error", + "solana-transaction-error 3.1.0", "tarpc", "thiserror 2.0.18", "tokio", @@ -7250,71 +7600,74 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6d90edc435bf488ef7abed4dcb1f94fa1970102cbabb25688f58417fd948286" +checksum = "36b83a0a58843696ca1b24cf3790860ad8133d52a3ba8702f4597d567498f05f" dependencies = [ "serde", - "serde_derive", "solana-account", "solana-clock", "solana-commitment-config", - "solana-hash", + "solana-hash 3.1.0", "solana-message", - "solana-pubkey", - "solana-signature", + "solana-pubkey 3.0.0", + "solana-signature 3.2.0", "solana-transaction", "solana-transaction-context", - "solana-transaction-error", + "solana-transaction-error 3.1.0", "tarpc", ] [[package]] name = "solana-big-mod-exp" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75db7f2bbac3e62cfd139065d15bcda9e2428883ba61fc8d27ccb251081e7567" +checksum = "30c80fb6d791b3925d5ec4bf23a7c169ef5090c013059ec3ed7d0b2c04efa085" dependencies = [ "num-bigint 0.4.6", "num-traits", - "solana-define-syscall 2.3.0", + "solana-define-syscall 3.0.0", ] [[package]] name = "solana-bincode" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19a3787b8cf9c9fe3dd360800e8b70982b9e5a8af9e11c354b6665dd4a003adc" +checksum = "278a1a5bad62cd9da89ac8d4b7ec444e83caa8ae96aa656dfc27684b28d49a5d" dependencies = [ "bincode", - "serde", - "solana-instruction", + "serde_core", + "solana-instruction-error", ] [[package]] name = "solana-blake3-hasher" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0801e25a1b31a14494fc80882a036be0ffd290efc4c2d640bfcca120a4672" +checksum = "7116e1d942a2432ca3f514625104757ab8a56233787e95144c93950029e31176" dependencies = [ "blake3", - "solana-define-syscall 2.3.0", - "solana-hash", - "solana-sanitize", + "solana-define-syscall 4.0.1", + "solana-hash 4.2.0", ] [[package]] -name = "solana-bn254" -version = "2.2.2" +name = "solana-bls-signatures" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4420f125118732833f36facf96a27e7b78314b2d642ba07fa9ffdacd8d79e243" +checksum = "61c75573697bbb148afa8209aa3ce228ca0754584c9a8a91e818db0f706ae4fb" dependencies = [ - "ark-bn254 0.4.0", - "ark-ec 0.4.2", - "ark-ff 0.4.2", - "ark-serialize 0.4.2", - "bytemuck", - "solana-define-syscall 2.3.0", + "base64 0.22.1", + "blst", + "blstrs", + "cfg_eval", + "ff", + "group", + "pairing", + "rand 0.8.5", + "serde", + "serde_json", + "serde_with", "thiserror 2.0.18", ] @@ -7340,71 +7693,61 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "718333bcd0a1a7aed6655aa66bef8d7fb047944922b2d3a18f49cbc13e73d004" dependencies = [ "borsh 0.10.4", - "borsh 1.6.0", + "borsh 1.6.1", +] + +[[package]] +name = "solana-borsh" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c04abbae16f57178a163125805637b8a076175bb5c0002fb04f4792bea901cf7" +dependencies = [ + "borsh 1.6.1", ] [[package]] name = "solana-bpf-loader-program" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aec57dcd80d0f6879956cad28854a6eebaed6b346ce56908ea01a9f36ab259" +checksum = "fe15f3c804c37fbff5971d34d81d5d2853ae2d03f11947f44f1d10c5b84c9df0" dependencies = [ + "agave-syscalls", "bincode", - "libsecp256k1", - "num-traits", "qualifier_attr", - "scopeguard", "solana-account", - "solana-account-info", - "solana-big-mod-exp", "solana-bincode", - "solana-blake3-hasher", - "solana-bn254 2.2.2", "solana-clock", - "solana-cpi", - "solana-curve25519", - "solana-hash", - "solana-instruction", - "solana-keccak-hasher", + "solana-instruction 3.3.0", "solana-loader-v3-interface", "solana-loader-v4-interface", - "solana-log-collector", - "solana-measure", "solana-packet", - "solana-poseidon", "solana-program-entrypoint", "solana-program-runtime", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-sbpf", - "solana-sdk-ids", - "solana-secp256k1-recover", - "solana-sha256-hasher", - "solana-stable-layout", + "solana-sdk-ids 3.1.0", "solana-svm-feature-set", + "solana-svm-log-collector", + "solana-svm-measure", + "solana-svm-type-overrides", "solana-system-interface", - "solana-sysvar", - "solana-sysvar-id", - "solana-timings", "solana-transaction-context", - "solana-type-overrides", - "thiserror 2.0.18", ] [[package]] name = "solana-builtins" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d61a31b63b52b0d268cbcd56c76f50314867d7f8e07a0f2c62ee7c9886e07b2" +checksum = "d196c19ba1caf61782eba5de053061f298f36d9f2aec57073e2cf27403a926d3" dependencies = [ "agave-feature-set", "solana-bpf-loader-program", "solana-compute-budget-program", - "solana-hash", + "solana-hash 3.1.0", "solana-loader-v4-program", "solana-program-runtime", - "solana-pubkey", - "solana-sdk-ids", - "solana-stake-program", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", "solana-system-program", "solana-vote-program", "solana-zk-elgamal-proof-program", @@ -7413,9 +7756,9 @@ dependencies = [ [[package]] name = "solana-builtins-default-costs" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ca69a299a6c969b18ea381a02b40c9e4dda04b2af0d15a007c1184c82163bbb" +checksum = "0da4d19885c5ee02d942a9e13354a39ef3ff591ee31d55353070c204ae7b8fed" dependencies = [ "agave-feature-set", "ahash", @@ -7423,36 +7766,36 @@ dependencies = [ "solana-bpf-loader-program", "solana-compute-budget-program", "solana-loader-v4-program", - "solana-pubkey", - "solana-sdk-ids", - "solana-stake-program", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", "solana-system-program", "solana-vote-program", ] [[package]] name = "solana-clap-utils" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82129ae5aaddbc61a36b917d65ffd2c0cac32e0f12bc2ac0ae87634ef5891c05" +checksum = "a8cdd0b6fb1d0bfdd00dc02bfb38e9842f7f669c10d9a6eed78a2d343774b2d2" dependencies = [ "chrono", "clap 2.34.0", "rpassword", + "solana-bls-signatures", "solana-clock", "solana-cluster-type", "solana-commitment-config", - "solana-derivation-path", - "solana-hash", + "solana-derivation-path 3.0.0", + "solana-hash 3.1.0", "solana-keypair", "solana-message", - "solana-native-token 2.3.0", + "solana-native-token", "solana-presigner", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-remote-wallet", - "solana-seed-phrase", - "solana-signature", - "solana-signer", + "solana-seed-phrase 3.0.0", + "solana-signature 3.2.0", + "solana-signer 3.0.0", "thiserror 2.0.18", "tiny-bip39", "uriparse", @@ -7461,13 +7804,12 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239f68bfb6aff6e8b24dc94e871a3cf41daac4ffd82d296e8ed8fb552b89a30e" +checksum = "d3ad9918af4aae4ba97e605ae24365a4401cee57cc26b119df50e7b89aa618ab" dependencies = [ "dirs-next", "serde", - "serde_derive", "serde_yaml", "solana-clap-utils", "solana-commitment-config", @@ -7476,16 +7818,16 @@ dependencies = [ [[package]] name = "solana-cli-output" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deda8ea7ec2a204a8b77e3cf98bed73f2cdef6f92d7450fe5cba1563d11616a7" +checksum = "3ca4ade278b4cbef6b3494ea94af1b34d0a4f68aadbd4377b83134b6b1eba6ef" dependencies = [ "Inflector", "agave-reserved-account-keys", "base64 0.22.1", "chrono", "clap 2.34.0", - "console", + "console 0.16.3", "humantime", "indicatif", "pretty-hex", @@ -7499,30 +7841,30 @@ dependencies = [ "solana-cli-config", "solana-clock", "solana-epoch-info", - "solana-hash", + "solana-hash 3.1.0", "solana-message", - "solana-native-token 2.3.0", "solana-packet", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-rpc-client-api", - "solana-sdk-ids", - "solana-signature", + "solana-sdk-ids 3.1.0", + "solana-signature 3.2.0", "solana-stake-interface", "solana-system-interface", - "solana-sysvar", "solana-transaction", - "solana-transaction-error", + "solana-transaction-error 3.1.0", "solana-transaction-status", + "solana-transaction-status-client-types", "solana-vote-program", - "spl-memo", + "spl-memo-interface", ] [[package]] name = "solana-client" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc55d1f263e0be4127daf33378d313ea0977f9ffd3fba50fa544ca26722fc695" +checksum = "8e5e2cd1754aee1a0d2609a1700351530ea2039abbabafbd006e34bc011e68b6" dependencies = [ + "anza-quinn", "async-trait", "bincode", "dashmap 5.5.3", @@ -7531,88 +7873,87 @@ dependencies = [ "indexmap", "indicatif", "log", - "quinn", "rayon", "solana-account", "solana-client-traits", "solana-commitment-config", "solana-connection-cache", "solana-epoch-info", - "solana-hash", - "solana-instruction", + "solana-hash 3.1.0", + "solana-instruction 3.3.0", "solana-keypair", "solana-measure", "solana-message", - "solana-pubkey", + "solana-net-utils", + "solana-pubkey 3.0.0", "solana-pubsub-client", "solana-quic-client", "solana-quic-definitions", "solana-rpc-client", "solana-rpc-client-api", "solana-rpc-client-nonce-utils", - "solana-signature", - "solana-signer", + "solana-signature 3.2.0", + "solana-signer 3.0.0", "solana-streamer", - "solana-thin-client", "solana-time-utils", "solana-tpu-client", "solana-transaction", - "solana-transaction-error", + "solana-transaction-error 3.1.0", + "solana-transaction-status-client-types", "solana-udp-client", "thiserror 2.0.18", "tokio", + "tokio-util 0.7.18", ] [[package]] name = "solana-client-traits" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83f0071874e629f29e0eb3dab8a863e98502ac7aba55b7e0df1803fc5cac72a7" +checksum = "08618ed587e128105510c54ae3e456b9a06d674d8640db75afe66dad65cb4e02" dependencies = [ "solana-account", "solana-commitment-config", "solana-epoch-info", - "solana-hash", - "solana-instruction", + "solana-hash 3.1.0", + "solana-instruction 3.3.0", "solana-keypair", "solana-message", - "solana-pubkey", - "solana-signature", - "solana-signer", + "solana-pubkey 3.0.0", + "solana-signature 3.2.0", + "solana-signer 3.0.0", "solana-system-interface", "solana-transaction", - "solana-transaction-error", + "solana-transaction-error 3.1.0", ] [[package]] name = "solana-clock" -version = "2.2.3" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8584296123df8fe229b95e2ebfd37ae637fe9db9b7d4dd677ac5a78e80dbfce" +checksum = "95cf11109c3b6115cc510f1e31f06fdd52f504271bc24ef5f1249fbbcae5f9f3" dependencies = [ "serde", "serde_derive", - "solana-sdk-ids", + "solana-sdk-ids 3.1.0", "solana-sdk-macro", "solana-sysvar-id", ] [[package]] name = "solana-cluster-type" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ace9fea2daa28354d107ea879cff107181d85cd4e0f78a2bedb10e1a428c97e" +checksum = "3a494cf8eda7d98d9f0144b288bb409c88308d2e86f15cc1045aa77b83304718" dependencies = [ - "serde", - "serde_derive", - "solana-hash", + "solana-hash 4.2.0", ] [[package]] name = "solana-commitment-config" -version = "2.2.1" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac49c4dde3edfa832de1697e9bcdb7c3b3f7cb7a1981b7c62526c8bb6700fb73" +checksum = "1517aa49dcfa9cb793ef90e7aac81346d62ca4a546bb1a754030a033e3972e1c" dependencies = [ "serde", "serde_derive", @@ -7620,9 +7961,9 @@ dependencies = [ [[package]] name = "solana-compute-budget" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f4fc63bc2276a1618ca0bfc609da7448534ecb43a1cb387cdf9eaa2dc7bc272" +checksum = "98426b2f7788c089f4ab840347bff55901e65ceb5d76b850194f0802a733cd4e" dependencies = [ "solana-fee-structure", "solana-program-runtime", @@ -7630,65 +7971,67 @@ dependencies = [ [[package]] name = "solana-compute-budget-instruction" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "503d94430f6d3c5ac1e1fa6a342c1c714d5b03c800999e7b6cf235298f0b5341" +checksum = "3eb3ea80152fc745fa95d9cd2fc019c3591cdc7598cb4d85a6acdea7a40938f0" dependencies = [ "agave-feature-set", "log", - "solana-borsh", + "solana-borsh 3.0.2", "solana-builtins-default-costs", "solana-compute-budget", "solana-compute-budget-interface", - "solana-instruction", + "solana-instruction 3.3.0", "solana-packet", - "solana-pubkey", - "solana-sdk-ids", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", "solana-svm-transaction", - "solana-transaction-error", + "solana-transaction-error 3.1.0", "thiserror 2.0.18", ] [[package]] name = "solana-compute-budget-interface" -version = "2.2.2" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8432d2c4c22d0499aa06d62e4f7e333f81777b3d7c96050ae9e5cb71a8c3aee4" +checksum = "8292c436b269ad23cecc8b24f7da3ab07ca111661e25e00ce0e1d22771951ab9" dependencies = [ - "borsh 1.6.0", - "serde", - "serde_derive", - "solana-instruction", - "solana-sdk-ids", + "borsh 1.6.1", + "solana-instruction 3.3.0", + "solana-sdk-ids 3.1.0", ] [[package]] name = "solana-compute-budget-program" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "072b02beed1862c6b7b7a8a699379594c4470a9371c711856a0a3c266dcf57e5" +checksum = "688491544a91b94fcb17cffb5cc4dca4be93bc96460fa27325a404c24b584130" dependencies = [ "solana-program-runtime", ] [[package]] -name = "solana-config-program-client" -version = "0.0.2" +name = "solana-config-interface" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53aceac36f105fd4922e29b4f0c1f785b69d7b3e7e387e384b8985c8e0c3595e" +checksum = "63e401ae56aed512821cc7a0adaa412ff97fecd2dff4602be7b1330d2daec0c4" dependencies = [ "bincode", - "borsh 0.10.4", - "kaigan", "serde", - "solana-program", + "serde_derive", + "solana-account", + "solana-instruction 3.3.0", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", + "solana-short-vec", + "solana-system-interface", ] [[package]] name = "solana-connection-cache" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45c1cff5ebb26aefff52f1a8e476de70ec1683f8cc6e4a8c86b615842d91f436" +checksum = "cb447201499ef14583aabe71bffc4887b9408c14210033bc6f0f9a6549318968" dependencies = [ "async-trait", "bincode", @@ -7702,35 +8045,35 @@ dependencies = [ "solana-measure", "solana-metrics", "solana-time-utils", - "solana-transaction-error", + "solana-transaction-error 3.1.0", "thiserror 2.0.18", "tokio", ] [[package]] name = "solana-cpi" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dc71126edddc2ba014622fc32d0f5e2e78ec6c5a1e0eb511b85618c09e9ea11" +checksum = "4dea26709d867aada85d0d3617db0944215c8bb28d3745b912de7db13a23280c" dependencies = [ - "solana-account-info", - "solana-define-syscall 2.3.0", - "solana-instruction", - "solana-program-error", - "solana-pubkey", + "solana-account-info 3.1.1", + "solana-define-syscall 4.0.1", + "solana-instruction 3.3.0", + "solana-program-error 3.0.1", + "solana-pubkey 4.1.0", "solana-stable-layout", ] [[package]] name = "solana-curve25519" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae4261b9a8613d10e77ac831a8fa60b6fa52b9b103df46d641deff9f9812a23" +checksum = "9a9eaec815ed773919bc7269c027933fc2472d7b9876f68ea6f1281c7daa5278" dependencies = [ "bytemuck", "bytemuck_derive", - "curve25519-dalek 4.1.3", - "solana-define-syscall 2.3.0", + "curve25519-dalek", + "solana-define-syscall 3.0.0", "subtle", "thiserror 2.0.18", ] @@ -7750,6 +8093,18 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ae3e2abcf541c8122eafe9a625d4d194b4023c20adde1e251f94e056bb1aee2" +[[package]] +name = "solana-define-syscall" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9697086a4e102d28a156b8d6b521730335d6951bd39a5e766512bbe09007cee" + +[[package]] +name = "solana-define-syscall" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57e5b1c0bc1d4a4d10c88a4100499d954c09d3fecfae4912c1a074dff68b1738" + [[package]] name = "solana-define-syscall" version = "5.0.0" @@ -7768,25 +8123,21 @@ dependencies = [ ] [[package]] -name = "solana-ed25519-program" -version = "2.2.3" +name = "solana-derivation-path" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feafa1691ea3ae588f99056f4bdd1293212c7ece28243d7da257c443e84753" +checksum = "ff71743072690fdbdfcdc37700ae1cb77485aaad49019473a81aee099b1e0b8c" dependencies = [ - "bytemuck", - "bytemuck_derive", - "ed25519-dalek", - "solana-feature-set", - "solana-instruction", - "solana-precompile-error", - "solana-sdk-ids", + "derivation-path", + "qstring", + "uriparse", ] [[package]] name = "solana-epoch-info" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ef6f0b449290b0b9f32973eefd95af35b01c5c0c34c569f936c34c5b20d77b" +checksum = "e093c84f6ece620a6b10cd036574b0cd51944231ab32d81f80f76d54aba833e6" dependencies = [ "serde", "serde_derive", @@ -7794,101 +8145,91 @@ dependencies = [ [[package]] name = "solana-epoch-rewards" -version = "2.2.1" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b575d3dd323b9ea10bb6fe89bf6bf93e249b215ba8ed7f68f1a3633f384db7" +checksum = "f5e7b0ba210593ba8ddd39d6d234d81795d1671cebf3026baa10d5dc23ac42f0" dependencies = [ "serde", "serde_derive", - "solana-hash", - "solana-sdk-ids", + "solana-hash 4.2.0", + "solana-sdk-ids 3.1.0", "solana-sdk-macro", "solana-sysvar-id", ] [[package]] name = "solana-epoch-rewards-hasher" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c5fd2662ae7574810904585fd443545ed2b568dbd304b25a31e79ccc76e81b" +checksum = "1ee8beac9bff4db9225e57d532d169b0be5e447f1e6601a2f50f27a01bf5518f" dependencies = [ "siphasher 0.3.11", - "solana-hash", - "solana-pubkey", + "solana-address 2.4.0", + "solana-hash 4.2.0", ] [[package]] name = "solana-epoch-schedule" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fce071fbddecc55d727b1d7ed16a629afe4f6e4c217bc8d00af3b785f6f67ed" +checksum = "6e5481e72cc4d52c169db73e4c0cd16de8bc943078aac587ec4817a75cc6388f" dependencies = [ "serde", "serde_derive", - "solana-sdk-ids", + "solana-sdk-ids 3.1.0", "solana-sdk-macro", "solana-sysvar-id", ] +[[package]] +name = "solana-epoch-stake" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "027e6d0b9e7daac5b2ac7c3f9ca1b727861121d9ef05084cf435ff736051e7c2" +dependencies = [ + "solana-define-syscall 5.0.0", + "solana-pubkey 4.1.0", +] + [[package]] name = "solana-example-mocks" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84461d56cbb8bb8d539347151e0525b53910102e4bced875d49d5139708e39d3" +checksum = "978855d164845c1b0235d4b4d101cadc55373fffaf0b5b6cfa2194d25b2ed658" dependencies = [ "serde", "serde_derive", "solana-address-lookup-table-interface", "solana-clock", - "solana-hash", - "solana-instruction", + "solana-hash 3.1.0", + "solana-instruction 3.3.0", "solana-keccak-hasher", "solana-message", "solana-nonce", - "solana-pubkey", - "solana-sdk-ids", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", "solana-system-interface", "thiserror 2.0.18", ] [[package]] name = "solana-feature-gate-interface" -version = "2.2.2" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f5c5382b449e8e4e3016fb05e418c53d57782d8b5c30aa372fc265654b956d" +checksum = "75ca9b5cbb6f500f7fd73db5bd95640f71a83f04d6121a0e59a43b202dca2731" dependencies = [ - "bincode", "serde", "serde_derive", - "solana-account", - "solana-account-info", - "solana-instruction", - "solana-program-error", - "solana-pubkey", - "solana-rent", - "solana-sdk-ids", - "solana-system-interface", -] - -[[package]] -name = "solana-feature-set" -version = "2.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93b93971e289d6425f88e6e3cb6668c4b05df78b3c518c249be55ced8efd6b6d" -dependencies = [ - "ahash", - "lazy_static", - "solana-epoch-schedule", - "solana-hash", - "solana-pubkey", - "solana-sha256-hasher", + "solana-program-error 3.0.1", + "solana-pubkey 4.1.0", + "solana-sdk-ids 3.1.0", ] [[package]] name = "solana-fee" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16beda37597046b1edd1cea6fa7caaed033c091f99ec783fe59c82828bc2adb8" +checksum = "487e4ba57d889e2ecf94a0cac3a3f385fe26d17425aaef3514b79975af2b5d7f" dependencies = [ "agave-feature-set", "solana-fee-structure", @@ -7897,9 +8238,9 @@ dependencies = [ [[package]] name = "solana-fee-calculator" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89bc408da0fb3812bc3008189d148b4d3e08252c79ad810b245482a3f70cd8d" +checksum = "4b2a5675b2cf8d407c672dc1776492b1f382337720ddf566645ae43237a3d8c3" dependencies = [ "log", "serde", @@ -7908,79 +8249,64 @@ dependencies = [ [[package]] name = "solana-fee-structure" -version = "2.3.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33adf673581c38e810bf618f745bf31b683a0a4a4377682e6aaac5d9a058dd4e" +checksum = "5e2abdb1223eea8ec64136f39cb1ffcf257e00f915c957c35c0dd9e3f4e700b0" dependencies = [ "serde", "serde_derive", - "solana-message", - "solana-native-token 2.3.0", ] [[package]] -name = "solana-genesis-config" +name = "solana-hard-forks" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50c19418921b9369092a9583120dbbccbcc2d92bd0c6bf5adb5f80ffd4ea4c69" + +[[package]] +name = "solana-hash" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3725085d47b96d37fef07a29d78d2787fc89a0b9004c66eed7753d1e554989f" +checksum = "b5b96e9f0300fa287b545613f007dfe20043d7812bee255f418c1eb649c93b63" dependencies = [ - "bincode", - "chrono", - "memmap2", - "serde", - "serde_derive", - "solana-account", - "solana-clock", - "solana-cluster-type", - "solana-epoch-schedule", - "solana-fee-calculator", - "solana-hash", - "solana-inflation", - "solana-keypair", - "solana-logger", - "solana-poh-config", - "solana-pubkey", - "solana-rent", - "solana-sdk-ids", - "solana-sha256-hasher", - "solana-shred-version", - "solana-signer", - "solana-time-utils", + "five8 0.2.1", + "js-sys", + "solana-atomic-u64 2.2.1", + "solana-sanitize 2.2.1", + "wasm-bindgen", ] [[package]] -name = "solana-hard-forks" -version = "2.2.1" +name = "solana-hash" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c28371f878e2ead55611d8ba1b5fb879847156d04edea13693700ad1a28baf" +checksum = "337c246447142f660f778cf6cb582beba8e28deb05b3b24bfb9ffd7c562e5f41" dependencies = [ - "serde", - "serde_derive", + "solana-hash 4.2.0", ] [[package]] name = "solana-hash" -version = "2.3.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b96e9f0300fa287b545613f007dfe20043d7812bee255f418c1eb649c93b63" +checksum = "8064ea1d591ec791be95245058ca40f4f5345d390c200069d0f79bbf55bfae55" dependencies = [ - "borsh 1.6.0", + "borsh 1.6.1", "bytemuck", "bytemuck_derive", - "five8", - "js-sys", + "five8 1.0.0", "serde", "serde_derive", - "solana-atomic-u64", - "solana-sanitize", - "wasm-bindgen", + "solana-atomic-u64 3.0.1", + "solana-sanitize 3.0.1", + "wincode 0.4.8", ] [[package]] name = "solana-inflation" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23eef6a09eb8e568ce6839573e4966850e85e9ce71e6ae1a6c930c1c43947de3" +checksum = "e92f37a14e7c660628752833250dd3dcd8e95309876aee751d7f8769a27947c6" dependencies = [ "serde", "serde_derive", @@ -7992,165 +8318,189 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bab5682934bd1f65f8d2c16f21cb532526fcc1a09f796e2cacdb091eee5774ad" dependencies = [ - "bincode", - "borsh 1.6.0", "getrandom 0.2.17", "js-sys", "num-traits", - "serde", - "serde_derive", - "serde_json", "solana-define-syscall 2.3.0", - "solana-pubkey", + "solana-pubkey 2.4.0", "wasm-bindgen", ] +[[package]] +name = "solana-instruction" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97881335fc698deb46c6571945969aae6d93a14e2fff792a368b4fac872f116" +dependencies = [ + "bincode", + "borsh 1.6.1", + "serde", + "serde_derive", + "solana-define-syscall 5.0.0", + "solana-instruction-error", + "solana-pubkey 4.1.0", +] + +[[package]] +name = "solana-instruction-error" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d3d048edaaeef5a3dc8c01853e585539a74417e4c2d43a9e2c161270045b838" +dependencies = [ + "num-traits", + "serde", + "serde_derive", + "solana-program-error 3.0.1", +] + [[package]] name = "solana-instructions-sysvar" -version = "2.2.2" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0e85a6fad5c2d0c4f5b91d34b8ca47118fc593af706e523cdbedf846a954f57" +checksum = "7ddf67876c541aa1e21ee1acae35c95c6fbc61119814bfef70579317a5e26955" dependencies = [ "bitflags 2.11.0", - "solana-account-info", - "solana-instruction", - "solana-program-error", - "solana-pubkey", - "solana-sanitize", - "solana-sdk-ids", + "solana-account-info 3.1.1", + "solana-instruction 3.3.0", + "solana-instruction-error", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", + "solana-sanitize 3.0.1", + "solana-sdk-ids 3.1.0", "solana-serialize-utils", "solana-sysvar-id", ] +[[package]] +name = "solana-invoke" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4065031f5c7dd29ef5f5003c1a353011eeabbafa6c5a5033da0cedbfca824b94" +dependencies = [ + "solana-account-info 3.1.1", + "solana-define-syscall 3.0.0", + "solana-instruction 3.3.0", + "solana-program-entrypoint", + "solana-stable-layout", +] + [[package]] name = "solana-keccak-hasher" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7aeb957fbd42a451b99235df4942d96db7ef678e8d5061ef34c9b34cae12f79" +checksum = "ed1c0d16d6fdeba12291a1f068cdf0d479d9bff1141bf44afd7aa9d485f65ef8" dependencies = [ "sha3", - "solana-define-syscall 2.3.0", - "solana-hash", - "solana-sanitize", + "solana-define-syscall 4.0.1", + "solana-hash 4.2.0", ] [[package]] name = "solana-keypair" -version = "2.2.3" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3f04aa1a05c535e93e121a95f66e7dcccf57e007282e8255535d24bf1e98bb" +checksum = "5ac8be597c9e231b0cab2928ce3bc3e4ee77d9c0ad92977b9d901f3879f25a7a" dependencies = [ "ed25519-dalek", "ed25519-dalek-bip32", - "five8", - "rand 0.7.3", - "solana-derivation-path", - "solana-pubkey", - "solana-seed-derivable", - "solana-seed-phrase", - "solana-signature", - "solana-signer", - "wasm-bindgen", + "five8 1.0.0", + "rand 0.8.5", + "solana-address 2.4.0", + "solana-derivation-path 3.0.0", + "solana-seed-derivable 3.0.0", + "solana-seed-phrase 3.0.0", + "solana-signature 3.2.0", + "solana-signer 3.0.0", ] [[package]] name = "solana-last-restart-slot" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a6360ac2fdc72e7463565cd256eedcf10d7ef0c28a1249d261ec168c1b55cdd" +checksum = "dcda154ec827f5fc1e4da0af3417951b7e9b8157540f81f936c4a8b1156134d0" dependencies = [ "serde", "serde_derive", - "solana-sdk-ids", + "solana-sdk-ids 3.1.0", "solana-sdk-macro", "solana-sysvar-id", ] [[package]] name = "solana-loader-v2-interface" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8ab08006dad78ae7cd30df8eea0539e207d08d91eaefb3e1d49a446e1c49654" +checksum = "1e4a6f0ad4fd9c30679bfee2ce3ea6a449cac38049f210480b751f65676dfe82" dependencies = [ "serde", "serde_bytes", "serde_derive", - "solana-instruction", - "solana-pubkey", - "solana-sdk-ids", + "solana-instruction 3.3.0", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", ] [[package]] name = "solana-loader-v3-interface" -version = "5.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f7162a05b8b0773156b443bccd674ea78bb9aa406325b467ea78c06c99a63a2" +checksum = "dee44c9b1328c5c712c68966fb8de07b47f3e7bac006e74ddd1bb053d3e46e5d" dependencies = [ "serde", "serde_bytes", "serde_derive", - "solana-instruction", - "solana-pubkey", - "solana-sdk-ids", + "solana-instruction 3.3.0", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", "solana-system-interface", ] [[package]] name = "solana-loader-v4-interface" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "706a777242f1f39a83e2a96a2a6cb034cb41169c6ecbee2cf09cb873d9659e7e" +checksum = "e4c948b33ff81fa89699911b207059e493defdba9647eaf18f23abdf3674e0fb" dependencies = [ "serde", "serde_bytes", "serde_derive", - "solana-instruction", - "solana-pubkey", - "solana-sdk-ids", + "solana-instruction 3.3.0", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", "solana-system-interface", ] [[package]] name = "solana-loader-v4-program" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6ab01855d851fa2fb6034b0d48de33d77d5c5f5fb4b0353d8e4a934cc03d48a" +checksum = "9b79ecebf56ff8acf46d5c0d77a11e1cb9a0f8eeb6dd1a69d739f3bf8ea8570e" dependencies = [ "log", - "qualifier_attr", "solana-account", "solana-bincode", "solana-bpf-loader-program", - "solana-instruction", + "solana-instruction 3.3.0", "solana-loader-v3-interface", "solana-loader-v4-interface", - "solana-log-collector", - "solana-measure", "solana-packet", "solana-program-runtime", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-sbpf", - "solana-sdk-ids", + "solana-sdk-ids 3.1.0", + "solana-svm-log-collector", + "solana-svm-measure", + "solana-svm-type-overrides", "solana-transaction-context", - "solana-type-overrides", -] - -[[package]] -name = "solana-log-collector" -version = "2.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d945b1cf5bf7cbd6f5b78795beda7376370c827640df43bb2a1c17b492dc106" -dependencies = [ - "log", ] [[package]] name = "solana-logger" -version = "2.3.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8e777ec1afd733939b532a42492d888ec7c88d8b4127a5d867eb45c6eb5cd5" +checksum = "ef7421d1092680d72065edbf5c7605856719b021bf5f173656c71febcdd5d003" dependencies = [ - "env_logger 0.9.3", + "env_logger", "lazy_static", "libc", "log", @@ -8159,45 +8509,42 @@ dependencies = [ [[package]] name = "solana-measure" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11dcd67cd2ae6065e494b64e861e0498d046d95a61cbbf1ae3d58be1ea0f42ed" +checksum = "34663f1da3956e28e62b1ca9d8283ca34e7543f945c9a12c633b9f8b68f5bd8a" [[package]] name = "solana-message" -version = "2.4.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1796aabce376ff74bf89b78d268fa5e683d7d7a96a0a4e4813ec34de49d5314b" +checksum = "0448b1fd891c5f46491e5dc7d9986385ba3c852c340db2911dd29faa01d2b08d" dependencies = [ "bincode", "blake3", "lazy_static", "serde", "serde_derive", - "solana-bincode", - "solana-hash", - "solana-instruction", - "solana-pubkey", - "solana-sanitize", - "solana-sdk-ids", + "solana-address 2.4.0", + "solana-hash 4.2.0", + "solana-instruction 3.3.0", + "solana-sanitize 3.0.1", + "solana-sdk-ids 3.1.0", "solana-short-vec", - "solana-system-interface", - "solana-transaction-error", - "wasm-bindgen", + "solana-transaction-error 3.1.0", ] [[package]] name = "solana-metrics" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0375159d8460f423d39e5103dcff6e07796a5ec1850ee1fcfacfd2482a8f34b5" +checksum = "60a054c78cf593e21e234c5177158a42ef7ad42f9204f3065a872856a3a12765" dependencies = [ "crossbeam-channel", "gethostname", "log", "reqwest 0.12.28", "solana-cluster-type", - "solana-sha256-hasher", + "solana-sha256-hasher 3.1.0", "solana-time-utils", "thiserror 2.0.18", ] @@ -8212,10 +8559,13 @@ dependencies = [ ] [[package]] -name = "solana-native-token" -version = "2.3.0" +name = "solana-msg" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61515b880c36974053dd499c0510066783f0cc6ac17def0c7ef2a244874cf4a9" +checksum = "726b7cbbc6be6f1c6f29146ac824343b9415133eee8cce156452ad1db93f8008" +dependencies = [ + "solana-define-syscall 5.0.0", +] [[package]] name = "solana-native-token" @@ -8225,49 +8575,51 @@ checksum = "ae8dd4c280dca9d046139eb5b7a5ac9ad10403fbd64964c7d7571214950d758f" [[package]] name = "solana-net-utils" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a9e831d0f09bd92135d48c5bc79071bb59c0537b9459f1b4dec17ecc0558fa" +checksum = "587b3cb395c99c9ed82101ba79de4f96bdee41180464d547df0a4a2cceda2edc" dependencies = [ "anyhow", "bincode", "bytes", + "cfg-if", + "dashmap 5.5.3", "itertools 0.12.1", "log", "nix", "rand 0.8.5", "serde", - "serde_derive", - "socket2 0.5.10", + "socket2 0.6.3", "solana-serde", + "solana-svm-type-overrides", "tokio", "url", ] [[package]] name = "solana-nonce" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703e22eb185537e06204a5bd9d509b948f0066f2d1d814a6f475dafb3ddf1325" +checksum = "cbc469152a63284ef959b80c59cda015262a021da55d3b8fe42171d89c4b64f8" dependencies = [ "serde", "serde_derive", "solana-fee-calculator", - "solana-hash", - "solana-pubkey", - "solana-sha256-hasher", + "solana-hash 4.2.0", + "solana-pubkey 4.1.0", + "solana-sha256-hasher 3.1.0", ] [[package]] name = "solana-nonce-account" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde971a20b8dbf60144d6a84439dda86b5466e00e2843091fe731083cda614da" +checksum = "805fd25b29e5a1a0e6c3dd6320c9da80f275fbe4ff6e392617c303a2085c435e" dependencies = [ "solana-account", - "solana-hash", + "solana-hash 3.1.0", "solana-nonce", - "solana-sdk-ids", + "solana-sdk-ids 3.1.0", ] [[package]] @@ -8281,25 +8633,25 @@ dependencies = [ [[package]] name = "solana-offchain-message" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b526398ade5dea37f1f147ce55dae49aa017a5d7326606359b0445ca8d946581" +checksum = "f6e2a1141a673f72a05cf406b99e4b2b8a457792b7c01afa07b3f00d4e2de393" dependencies = [ "num_enum", - "solana-hash", + "solana-hash 3.1.0", "solana-packet", - "solana-pubkey", - "solana-sanitize", - "solana-sha256-hasher", - "solana-signature", - "solana-signer", + "solana-pubkey 3.0.0", + "solana-sanitize 3.0.1", + "solana-sha256-hasher 3.1.0", + "solana-signature 3.2.0", + "solana-signer 3.0.0", ] [[package]] name = "solana-packet" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004f2d2daf407b3ec1a1ca5ec34b3ccdfd6866dd2d3c7d0715004a96e4b6d127" +checksum = "6edf2f25743c95229ac0fdc32f8f5893ef738dbf332c669e9861d33ddb0f469d" dependencies = [ "bincode", "bitflags 2.11.0", @@ -8311,16 +8663,16 @@ dependencies = [ [[package]] name = "solana-perf" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37192c0be5c222ca49dbc5667288c5a8bb14837051dd98e541ee4dad160a5da9" +checksum = "f67e24a6bbf59e1a407e4349c0bf5b301dd77e9bc1ba4b7762f7fd1adb25faa3" dependencies = [ "ahash", "bincode", "bv", "bytes", "caps", - "curve25519-dalek 4.1.3", + "curve25519-dalek", "dlopen2", "fnv", "libc", @@ -8329,168 +8681,110 @@ dependencies = [ "rand 0.8.5", "rayon", "serde", - "solana-hash", + "solana-hash 3.1.0", "solana-message", "solana-metrics", "solana-packet", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-rayon-threadlimit", - "solana-sdk-ids", + "solana-sdk-ids 3.1.0", "solana-short-vec", - "solana-signature", + "solana-signature 3.2.0", "solana-time-utils", -] - -[[package]] -name = "solana-poh-config" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d650c3b4b9060082ac6b0efbbb66865089c58405bfb45de449f3f2b91eccee75" -dependencies = [ - "serde", - "serde_derive", + "solana-transaction-context", ] [[package]] name = "solana-poseidon" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbac4eb90016eeb1d37fa36e592d3a64421510c49666f81020736611c319faff" +checksum = "38d213ef5dc664927b43725e9aae1f0848e06d556e7a5f2857f37af9dbf9856c" dependencies = [ "ark-bn254 0.4.0", + "ark-bn254 0.5.0", "light-poseidon 0.2.0", - "solana-define-syscall 2.3.0", + "light-poseidon 0.4.0", + "solana-define-syscall 3.0.0", "thiserror 2.0.18", ] [[package]] name = "solana-precompile-error" -version = "2.2.2" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d87b2c1f5de77dfe2b175ee8dd318d196aaca4d0f66f02842f80c852811f9f8" +checksum = "cafcd950de74c6c39d55dc8ca108bbb007799842ab370ef26cf45a34453c31e1" dependencies = [ "num-traits", - "solana-decode-error", -] - -[[package]] -name = "solana-precompiles" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36e92768a57c652edb0f5d1b30a7d0bc64192139c517967c18600debe9ae3832" -dependencies = [ - "lazy_static", - "solana-ed25519-program", - "solana-feature-set", - "solana-message", - "solana-precompile-error", - "solana-pubkey", - "solana-sdk-ids", - "solana-secp256k1-program", - "solana-secp256r1-program", ] [[package]] name = "solana-presigner" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a57a24e6a4125fc69510b6774cd93402b943191b6cddad05de7281491c90fe" +checksum = "0f704eaf825be3180832445b9e4983b875340696e8e7239bf2d535b0f86c14a2" dependencies = [ - "solana-pubkey", - "solana-signature", - "solana-signer", + "solana-pubkey 3.0.0", + "solana-signature 3.2.0", + "solana-signer 3.0.0", ] [[package]] name = "solana-program" -version = "2.3.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98eca145bd3545e2fbb07166e895370576e47a00a7d824e325390d33bf467210" +checksum = "91b12305dd81045d705f427acd0435a2e46444b65367d7179d7bdcfc3bc5f5eb" dependencies = [ - "bincode", - "blake3", - "borsh 0.10.4", - "borsh 1.6.0", - "bs58", - "bytemuck", - "console_error_panic_hook", - "console_log", - "getrandom 0.2.17", - "lazy_static", - "log", "memoffset", - "num-bigint 0.4.6", - "num-derive 0.4.2", - "num-traits", - "rand 0.8.5", - "serde", - "serde_bytes", - "serde_derive", - "solana-account-info", - "solana-address-lookup-table-interface", - "solana-atomic-u64", + "solana-account-info 3.1.1", "solana-big-mod-exp", - "solana-bincode", "solana-blake3-hasher", - "solana-borsh", + "solana-borsh 3.0.2", "solana-clock", "solana-cpi", - "solana-decode-error", - "solana-define-syscall 2.3.0", + "solana-define-syscall 3.0.0", "solana-epoch-rewards", "solana-epoch-schedule", + "solana-epoch-stake", "solana-example-mocks", - "solana-feature-gate-interface", "solana-fee-calculator", - "solana-hash", - "solana-instruction", + "solana-hash 3.1.0", + "solana-instruction 3.3.0", + "solana-instruction-error", "solana-instructions-sysvar", "solana-keccak-hasher", "solana-last-restart-slot", - "solana-loader-v2-interface", - "solana-loader-v3-interface", - "solana-loader-v4-interface", - "solana-message", - "solana-msg", - "solana-native-token 2.3.0", - "solana-nonce", + "solana-msg 3.1.0", + "solana-native-token", "solana-program-entrypoint", - "solana-program-error", - "solana-program-memory", - "solana-program-option", + "solana-program-error 3.0.1", + "solana-program-memory 3.1.0", + "solana-program-option 3.1.0", "solana-program-pack", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-rent", - "solana-sanitize", - "solana-sdk-ids", - "solana-sdk-macro", + "solana-sdk-ids 3.1.0", "solana-secp256k1-recover", "solana-serde-varint", "solana-serialize-utils", - "solana-sha256-hasher", + "solana-sha256-hasher 3.1.0", "solana-short-vec", "solana-slot-hashes", "solana-slot-history", "solana-stable-layout", - "solana-stake-interface", - "solana-system-interface", "solana-sysvar", "solana-sysvar-id", - "solana-vote-interface", - "thiserror 2.0.18", - "wasm-bindgen", ] [[package]] name = "solana-program-entrypoint" -version = "2.3.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32ce041b1a0ed275290a5008ee1a4a6c48f5054c8a3d78d313c08958a06aedbd" +checksum = "84c9b0a1ff494e05f503a08b3d51150b73aa639544631e510279d6375f290997" dependencies = [ - "solana-account-info", - "solana-msg", - "solana-program-error", - "solana-pubkey", + "solana-account-info 3.1.1", + "solana-define-syscall 4.0.1", + "solana-program-error 3.0.1", + "solana-pubkey 4.1.0", ] [[package]] @@ -8499,14 +8793,22 @@ version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ee2e0217d642e2ea4bee237f37bd61bb02aec60da3647c48ff88f6556ade775" dependencies = [ - "borsh 1.6.0", "num-traits", + "solana-decode-error", + "solana-instruction 2.3.3", + "solana-msg 2.2.1", + "solana-pubkey 2.4.0", +] + +[[package]] +name = "solana-program-error" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f04fa578707b3612b095f0c8e19b66a1233f7c42ca8082fcb3b745afcc0add6" +dependencies = [ + "borsh 1.6.1", "serde", "serde_derive", - "solana-decode-error", - "solana-instruction", - "solana-msg", - "solana-pubkey", ] [[package]] @@ -8518,61 +8820,78 @@ dependencies = [ "solana-define-syscall 2.3.0", ] +[[package]] +name = "solana-program-memory" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4068648649653c2c50546e9a7fb761791b5ab0cda054c771bb5808d3a4b9eb52" +dependencies = [ + "solana-define-syscall 4.0.1", +] + [[package]] name = "solana-program-option" version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc677a2e9bc616eda6dbdab834d463372b92848b2bfe4a1ed4e4b4adba3397d0" +[[package]] +name = "solana-program-option" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a88006a9b8594088cec9027ab77caaaa258a2aaa2083d3f086c44b42e50aeab" + [[package]] name = "solana-program-pack" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "319f0ef15e6e12dc37c597faccb7d62525a509fec5f6975ecb9419efddeb277b" +checksum = "3d7701cb15b90667ae1c89ef4ac35a59c61e66ce58ddee13d729472af7f41d59" dependencies = [ - "solana-program-error", + "solana-program-error 3.0.1", ] [[package]] name = "solana-program-runtime" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5653001e07b657c9de6f0417cf9add1cf4325903732c480d415655e10cc86704" +checksum = "527e07453b083fa814e35bb56b8aaddb34d20eeeadeb0d13c115780365355c88" dependencies = [ "base64 0.22.1", "bincode", - "enum-iterator", "itertools 0.12.1", "log", "percentage", "rand 0.8.5", "serde", "solana-account", + "solana-account-info 3.1.1", "solana-clock", "solana-epoch-rewards", "solana-epoch-schedule", "solana-fee-structure", - "solana-hash", - "solana-instruction", + "solana-hash 3.1.0", + "solana-instruction 3.3.0", "solana-last-restart-slot", - "solana-log-collector", - "solana-measure", - "solana-metrics", + "solana-loader-v3-interface", "solana-program-entrypoint", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-rent", "solana-sbpf", - "solana-sdk-ids", + "solana-sdk-ids 3.1.0", "solana-slot-hashes", "solana-stable-layout", + "solana-stake-interface", "solana-svm-callback", "solana-svm-feature-set", + "solana-svm-log-collector", + "solana-svm-measure", + "solana-svm-timings", + "solana-svm-transaction", + "solana-svm-type-overrides", "solana-system-interface", "solana-sysvar", "solana-sysvar-id", - "solana-timings", "solana-transaction-context", - "solana-type-overrides", "thiserror 2.0.18", ] @@ -8583,31 +8902,46 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b62adb9c3261a052ca1f999398c388f1daf558a1b492f60a6d9e64857db4ff1" dependencies = [ "borsh 0.10.4", - "borsh 1.6.0", + "borsh 1.6.1", "bytemuck", "bytemuck_derive", - "curve25519-dalek 4.1.3", - "five8", - "five8_const", + "five8 0.2.1", + "five8_const 0.1.4", "getrandom 0.2.17", "js-sys", "num-traits", - "rand 0.8.5", - "serde", - "serde_derive", - "solana-atomic-u64", + "solana-atomic-u64 2.2.1", "solana-decode-error", "solana-define-syscall 2.3.0", - "solana-sanitize", - "solana-sha256-hasher", + "solana-sanitize 2.2.1", + "solana-sha256-hasher 2.3.0", "wasm-bindgen", ] +[[package]] +name = "solana-pubkey" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8909d399deb0851aa524420beeb5646b115fd253ef446e35fe4504c904da3941" +dependencies = [ + "rand 0.8.5", + "solana-address 1.1.0", +] + +[[package]] +name = "solana-pubkey" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b06bd918d60111ee1f97de817113e2040ca0cedb740099ee8d646233f6b906c" +dependencies = [ + "solana-address 2.4.0", +] + [[package]] name = "solana-pubsub-client" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d18a7476e1d2e8df5093816afd8fffee94fbb6e442d9be8e6bd3e85f88ce8d5c" +checksum = "7e0ff7d2ad8aa3e326449bd05a6b68bcd62c64312d32305a05819c8ef7c6011a" dependencies = [ "crossbeam-channel", "futures-util", @@ -8615,13 +8949,12 @@ dependencies = [ "log", "semver", "serde", - "serde_derive", "serde_json", "solana-account-decoder-client-types", "solana-clock", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-rpc-client-types", - "solana-signature", + "solana-signature 3.2.0", "thiserror 2.0.18", "tokio", "tokio-stream", @@ -8632,133 +8965,94 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44feb5f4a97494459c435aa56de810500cc24e22d0afc632990a8e54a07c05a4" +checksum = "cc65e696f143bbb96796942800409d35a4e26c5e039fbd2d35374ebc6ca63318" dependencies = [ + "anza-quinn", + "anza-quinn-proto", "async-lock", "async-trait", "futures", "itertools 0.12.1", "log", - "quinn", - "quinn-proto", "rustls 0.23.37", "solana-connection-cache", "solana-keypair", "solana-measure", "solana-metrics", "solana-net-utils", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-quic-definitions", "solana-rpc-client-api", - "solana-signer", + "solana-signer 3.0.0", "solana-streamer", "solana-tls-utils", - "solana-transaction-error", + "solana-transaction-error 3.1.0", "thiserror 2.0.18", "tokio", ] [[package]] name = "solana-quic-definitions" -version = "2.3.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf0d4d5b049eb1d0c35f7b18f305a27c8986fc5c0c9b383e97adaa35334379e" +checksum = "15319accf7d3afd845817aeffa6edd8cc185f135cefbc6b985df29cfd8c09609" dependencies = [ "solana-keypair", ] [[package]] name = "solana-rayon-threadlimit" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02cc2a4cae3ef7bb6346b35a60756d2622c297d5fa204f96731db9194c0dc75b" +checksum = "335457a763492daf74c844b6f38096058fd2f4d0506be83f7fa1b2e805703f24" dependencies = [ + "log", "num_cpus", ] [[package]] name = "solana-remote-wallet" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f42662ecdff5cc2db0116730c83a6d6218db01f29750467ce2161675415acad6" +checksum = "8e96a38f8eaf753ec63073a4db4a8ed316c2223455c7729d3f14afe2d5957217" dependencies = [ - "console", + "console 0.16.3", "dialoguer", - "hidapi", "log", "num-derive 0.4.2", "num-traits", "parking_lot", "qstring", "semver", - "solana-derivation-path", + "solana-derivation-path 3.0.0", "solana-offchain-message", - "solana-pubkey", - "solana-signature", - "solana-signer", + "solana-pubkey 3.0.0", + "solana-signature 3.2.0", + "solana-signer 3.0.0", "thiserror 2.0.18", "uriparse", ] [[package]] name = "solana-rent" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1aea8fdea9de98ca6e8c2da5827707fb3842833521b528a713810ca685d2480" +checksum = "e860d5499a705369778647e97d760f7670adfb6fc8419dd3d568deccd46d5487" dependencies = [ "serde", "serde_derive", - "solana-sdk-ids", + "solana-sdk-ids 3.1.0", "solana-sdk-macro", "solana-sysvar-id", ] -[[package]] -name = "solana-rent-collector" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "127e6dfa51e8c8ae3aa646d8b2672bc4ac901972a338a9e1cd249e030564fb9d" -dependencies = [ - "serde", - "serde_derive", - "solana-account", - "solana-clock", - "solana-epoch-schedule", - "solana-genesis-config", - "solana-pubkey", - "solana-rent", - "solana-sdk-ids", -] - -[[package]] -name = "solana-rent-debits" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f6f9113c6003492e74438d1288e30cffa8ccfdc2ef7b49b9e816d8034da18cd" -dependencies = [ - "solana-pubkey", - "solana-reward-info", -] - -[[package]] -name = "solana-reserved-account-keys" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4b22ea19ca2a3f28af7cd047c914abf833486bf7a7c4a10fc652fff09b385b1" -dependencies = [ - "lazy_static", - "solana-feature-set", - "solana-pubkey", - "solana-sdk-ids", -] - [[package]] name = "solana-reward-info" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18205b69139b1ae0ab8f6e11cdcb627328c0814422ad2482000fa2ca54ae4a2f" +checksum = "82be7946105c2ee6be9f9ee7bd18a068b558389221d29efa92b906476102bfcc" dependencies = [ "serde", "serde_derive", @@ -8766,9 +9060,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d3161ac0918178e674c1f7f1bfac40de3e7ed0383bd65747d63113c156eaeb" +checksum = "11bff5621e2141a453d5228bae473fd395e2b53e6919c81169421e6ab75fe832" dependencies = [ "async-trait", "base64 0.22.1", @@ -8781,23 +9075,23 @@ dependencies = [ "reqwest-middleware", "semver", "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-hash 3.1.0", + "solana-instruction 3.3.0", "solana-message", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-rpc-client-api", - "solana-signature", + "solana-signature 3.2.0", "solana-transaction", - "solana-transaction-error", + "solana-transaction-error 3.1.0", "solana-transaction-status-client-types", "solana-version", "solana-vote-interface", @@ -8806,63 +9100,63 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dbc138685c79d88a766a8fd825057a74ea7a21e1dd7f8de275ada899540fff7" +checksum = "75bda0d4de2f8f394e56532dd5b3d95dd8afadb74195e5bb366e7c69deb95302" dependencies = [ "anyhow", "jsonrpc-core", "reqwest 0.12.28", "reqwest-middleware", "serde", - "serde_derive", "serde_json", "solana-account-decoder-client-types", "solana-clock", "solana-rpc-client-types", - "solana-signer", - "solana-transaction-error", + "solana-signer 3.0.0", + "solana-transaction-error 3.1.0", "solana-transaction-status-client-types", "thiserror 2.0.18", ] [[package]] name = "solana-rpc-client-nonce-utils" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f0ee41b9894ff36adebe546a110b899b0d0294b07845d8acdc73822e6af4b0" +checksum = "5cd320de4b74e9be2748b2e19efe764b5b2e25311656be3195034c94f3cc7e01" dependencies = [ "solana-account", "solana-commitment-config", - "solana-hash", + "solana-hash 3.1.0", "solana-message", "solana-nonce", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-rpc-client", - "solana-sdk-ids", + "solana-sdk-ids 3.1.0", "thiserror 2.0.18", ] [[package]] name = "solana-rpc-client-types" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea428a81729255d895ea47fba9b30fd4dacbfe571a080448121bd0592751676" +checksum = "aceb2a48783c4297f564b8f8f962181d921ac004e84efbd7313cf44e3ad54a83" dependencies = [ "base64 0.22.1", "bs58", "semver", "serde", - "serde_derive", "serde_json", "solana-account", "solana-account-decoder-client-types", + "solana-address 1.1.0", "solana-clock", "solana-commitment-config", "solana-fee-calculator", "solana-inflation", - "solana-pubkey", - "solana-transaction-error", + "solana-reward-info", + "solana-transaction", + "solana-transaction-error 3.1.0", "solana-transaction-status-client-types", "solana-version", "spl-generic-token", @@ -8875,11 +9169,17 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61f1bc1357b8188d9c4a3af3fc55276e56987265eb7ad073ae6f8180ee54cecf" +[[package]] +name = "solana-sanitize" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf09694a0fc14e5ffb18f9b7b7c0f15ecb6eac5b5610bf76a1853459d19daf9" + [[package]] name = "solana-sbpf" -version = "0.11.1" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "474a2d95dc819898ded08d24f29642d02189d3e1497bbb442a92a3997b7eb55f" +checksum = "b15b079e08471a9dbfe1e48b2c7439c85aa2a055cbd54eddd8bd257b0a7dbb29" dependencies = [ "byteorder", "combine 3.8.1", @@ -8894,73 +9194,40 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "2.3.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cc0e4a7635b902791c44b6581bfb82f3ada32c5bc0929a64f39fe4bb384c86a" +checksum = "3f03df7969f5e723ad31b6c9eadccc209037ac4caa34d8dc259316b05c11e82b" dependencies = [ "bincode", "bs58", - "getrandom 0.1.16", - "js-sys", "serde", - "serde_json", "solana-account", - "solana-bn254 2.2.2", - "solana-client-traits", - "solana-cluster-type", - "solana-commitment-config", - "solana-compute-budget-interface", - "solana-decode-error", - "solana-derivation-path", - "solana-ed25519-program", "solana-epoch-info", "solana-epoch-rewards-hasher", - "solana-feature-set", "solana-fee-structure", - "solana-genesis-config", - "solana-hard-forks", "solana-inflation", - "solana-instruction", "solana-keypair", "solana-message", - "solana-native-token 2.3.0", - "solana-nonce-account", "solana-offchain-message", - "solana-packet", - "solana-poh-config", - "solana-precompile-error", - "solana-precompiles", "solana-presigner", "solana-program", - "solana-program-memory", - "solana-pubkey", - "solana-quic-definitions", - "solana-rent-collector", - "solana-rent-debits", - "solana-reserved-account-keys", - "solana-reward-info", - "solana-sanitize", - "solana-sdk-ids", + "solana-program-memory 3.1.0", + "solana-pubkey 3.0.0", + "solana-sanitize 3.0.1", + "solana-sdk-ids 3.1.0", "solana-sdk-macro", - "solana-secp256k1-program", - "solana-secp256k1-recover", - "solana-secp256r1-program", - "solana-seed-derivable", - "solana-seed-phrase", + "solana-seed-derivable 3.0.0", + "solana-seed-phrase 3.0.0", "solana-serde", "solana-serde-varint", "solana-short-vec", "solana-shred-version", - "solana-signature", - "solana-signer", - "solana-system-transaction", + "solana-signature 3.2.0", + "solana-signer 3.0.0", "solana-time-utils", "solana-transaction", - "solana-transaction-context", - "solana-transaction-error", - "solana-validator-exit", + "solana-transaction-error 3.1.0", "thiserror 2.0.18", - "wasm-bindgen", ] [[package]] @@ -8969,66 +9236,41 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c5d8b9cc68d5c88b062a33e23a6466722467dde0035152d8fb1afbcdf350a5f" dependencies = [ - "solana-pubkey", + "solana-pubkey 2.4.0", ] [[package]] -name = "solana-sdk-macro" -version = "2.2.1" +name = "solana-sdk-ids" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86280da8b99d03560f6ab5aca9de2e38805681df34e0bb8f238e69b29433b9df" +checksum = "def234c1956ff616d46c9dd953f251fa7096ddbaa6d52b165218de97882b7280" dependencies = [ - "bs58", - "proc-macro2", - "quote", - "syn 2.0.117", + "solana-address 2.4.0", ] [[package]] -name = "solana-secp256k1-program" -version = "2.2.3" +name = "solana-sdk-macro" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f19833e4bc21558fe9ec61f239553abe7d05224347b57d65c2218aeeb82d6149" +checksum = "8765316242300c48242d84a41614cb3388229ec353ba464f6fe62a733e41806f" dependencies = [ - "bincode", - "digest 0.10.7", - "libsecp256k1", - "serde", - "serde_derive", - "sha3", - "solana-feature-set", - "solana-instruction", - "solana-precompile-error", - "solana-sdk-ids", - "solana-signature", + "bs58", + "proc-macro2", + "quote", + "syn 2.0.117", ] [[package]] name = "solana-secp256k1-recover" -version = "2.2.1" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baa3120b6cdaa270f39444f5093a90a7b03d296d362878f7a6991d6de3bbe496" +checksum = "e7c5f18893d62e6c73117dcba48f8f5e3266d90e5ec3d0a0a90f9785adac36c1" dependencies = [ - "borsh 1.6.0", - "libsecp256k1", - "solana-define-syscall 2.3.0", + "k256", + "solana-define-syscall 5.0.0", "thiserror 2.0.18", ] -[[package]] -name = "solana-secp256r1-program" -version = "2.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce0ae46da3071a900f02d367d99b2f3058fe2e90c5062ac50c4f20cfedad8f0f" -dependencies = [ - "bytemuck", - "openssl", - "solana-feature-set", - "solana-instruction", - "solana-precompile-error", - "solana-sdk-ids", -] - [[package]] name = "solana-security-txt" version = "1.1.2" @@ -9044,7 +9286,16 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3beb82b5adb266c6ea90e5cf3967235644848eac476c5a1f2f9283a143b7c97f" dependencies = [ - "solana-derivation-path", + "solana-derivation-path 2.2.1", +] + +[[package]] +name = "solana-seed-derivable" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff7bdb72758e3bec33ed0e2658a920f1f35dfb9ed576b951d20d63cb61ecd95c" +dependencies = [ + "solana-derivation-path 3.0.0", ] [[package]] @@ -9053,38 +9304,49 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36187af2324f079f65a675ec22b31c24919cb4ac22c79472e85d819db9bbbc15" dependencies = [ - "hmac 0.12.1", + "hmac", "pbkdf2 0.11.0", "sha2 0.10.9", ] [[package]] -name = "solana-serde" -version = "2.2.1" +name = "solana-seed-phrase" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1931484a408af466e14171556a47adaa215953c7f48b24e5f6b0282763818b04" +checksum = "dc905b200a95f2ea9146e43f2a7181e3aeb55de6bc12afb36462d00a3c7310de" +dependencies = [ + "hmac", + "pbkdf2 0.11.0", + "sha2 0.10.9", +] + +[[package]] +name = "solana-serde" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709a93cab694c70f40b279d497639788fc2ccbcf9b4aa32273d4b361322c02dd" dependencies = [ "serde", ] [[package]] name = "solana-serde-varint" -version = "2.2.2" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a7e155eba458ecfb0107b98236088c3764a09ddf0201ec29e52a0be40857113" +checksum = "950e5b83e839dc0f92c66afc124bb8f40e89bc90f0579e8ec5499296d27f54e3" dependencies = [ "serde", ] [[package]] name = "solana-serialize-utils" -version = "2.2.1" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "817a284b63197d2b27afdba829c5ab34231da4a9b4e763466a003c40ca4f535e" +checksum = "5d7cc401931d178472358e6b78dc72d031dc08f752d7410f0e8bd259dd6f02fa" dependencies = [ - "solana-instruction", - "solana-pubkey", - "solana-sanitize", + "solana-instruction-error", + "solana-pubkey 4.1.0", + "solana-sanitize 3.0.1", ] [[package]] @@ -9095,27 +9357,38 @@ checksum = "5aa3feb32c28765f6aa1ce8f3feac30936f16c5c3f7eb73d63a5b8f6f8ecdc44" dependencies = [ "sha2 0.10.9", "solana-define-syscall 2.3.0", - "solana-hash", + "solana-hash 2.3.0", +] + +[[package]] +name = "solana-sha256-hasher" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db7dc3011ea4c0334aaaa7e7128cb390ecf546b28d412e9bf2064680f57f588f" +dependencies = [ + "sha2 0.10.9", + "solana-define-syscall 4.0.1", + "solana-hash 4.2.0", ] [[package]] name = "solana-short-vec" -version = "2.2.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c54c66f19b9766a56fa0057d060de8378676cb64987533fa088861858fc5a69" +checksum = "de3bd991c2cc415291c86bb0b6b4d53e93d13bb40344e4c5a2884e0e4f5fa93f" dependencies = [ - "serde", + "serde_core", ] [[package]] name = "solana-shred-version" -version = "2.2.1" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afd3db0461089d1ad1a78d9ba3f15b563899ca2386351d38428faa5350c60a98" +checksum = "d6c79722e299d957958bf33695f7cd1ef6724ff55563c60fd9e3e24487cccde2" dependencies = [ "solana-hard-forks", - "solana-hash", - "solana-sha256-hasher", + "solana-hash 4.2.0", + "solana-sha256-hasher 3.1.0", ] [[package]] @@ -9123,14 +9396,25 @@ name = "solana-signature" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64c8ec8e657aecfc187522fc67495142c12f35e55ddeca8698edbb738b8dbd8c" +dependencies = [ + "five8 0.2.1", + "solana-sanitize 2.2.1", +] + +[[package]] +name = "solana-signature" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4028aeedd443d80f1dccbf64872593a80e6a9676ee9007f6eccb63b65983ebd" dependencies = [ "ed25519-dalek", - "five8", - "rand 0.8.5", + "five8 1.0.0", + "rand 0.9.2", "serde", "serde-big-array", "serde_derive", - "solana-sanitize", + "solana-sanitize 3.0.1", + "wincode 0.2.5", ] [[package]] @@ -9139,104 +9423,87 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c41991508a4b02f021c1342ba00bcfa098630b213726ceadc7cb032e051975b" dependencies = [ - "solana-pubkey", - "solana-signature", - "solana-transaction-error", + "solana-pubkey 2.4.0", + "solana-signature 2.3.0", + "solana-transaction-error 2.2.1", +] + +[[package]] +name = "solana-signer" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bfea97951fee8bae0d6038f39a5efcb6230ecdfe33425ac75196d1a1e3e3235" +dependencies = [ + "solana-pubkey 3.0.0", + "solana-signature 3.2.0", + "solana-transaction-error 3.1.0", ] [[package]] name = "solana-slot-hashes" -version = "2.2.1" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c8691982114513763e88d04094c9caa0376b867a29577939011331134c301ce" +checksum = "2585f70191623887329dfb5078da3a00e15e3980ea67f42c2e10b07028419f43" dependencies = [ "serde", "serde_derive", - "solana-hash", - "solana-sdk-ids", + "solana-hash 4.2.0", + "solana-sdk-ids 3.1.0", "solana-sysvar-id", ] [[package]] name = "solana-slot-history" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ccc1b2067ca22754d5283afb2b0126d61eae734fc616d23871b0943b0d935e" +checksum = "f914f6b108f5bba14a280b458d023e3621c9973f27f015a4d755b50e88d89e97" dependencies = [ "bv", "serde", "serde_derive", - "solana-sdk-ids", + "solana-sdk-ids 3.1.0", "solana-sysvar-id", ] [[package]] name = "solana-stable-layout" -version = "2.2.1" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f14f7d02af8f2bc1b5efeeae71bc1c2b7f0f65cd75bcc7d8180f2c762a57f54" +checksum = "c9f6a291ba063a37780af29e7db14bdd3dc447584d8ba5b3fc4b88e2bbc982fa" dependencies = [ - "solana-instruction", - "solana-pubkey", + "solana-instruction 3.3.0", + "solana-pubkey 4.1.0", ] [[package]] name = "solana-stake-interface" -version = "1.2.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5269e89fde216b4d7e1d1739cf5303f8398a1ff372a81232abbee80e554a838c" +checksum = "b9bc26191b533f9a6e5a14cca05174119819ced680a80febff2f5051a713f0db" dependencies = [ - "borsh 0.10.4", - "borsh 1.6.0", + "borsh 1.6.1", "num-traits", "serde", "serde_derive", "solana-clock", "solana-cpi", - "solana-decode-error", - "solana-instruction", - "solana-program-error", - "solana-pubkey", + "solana-instruction 3.3.0", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", "solana-system-interface", - "solana-sysvar-id", -] - -[[package]] -name = "solana-stake-program" -version = "2.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500e9b9d11573f12de91e94f9c4459882cd5ffc692776af49b610d6fcc0b167f" -dependencies = [ - "agave-feature-set", - "bincode", - "log", - "solana-account", - "solana-bincode", - "solana-clock", - "solana-config-program-client", - "solana-genesis-config", - "solana-instruction", - "solana-log-collector", - "solana-native-token 2.3.0", - "solana-packet", - "solana-program-runtime", - "solana-pubkey", - "solana-rent", - "solana-sdk-ids", - "solana-stake-interface", "solana-sysvar", - "solana-transaction-context", - "solana-type-overrides", - "solana-vote-interface", + "solana-sysvar-id", ] [[package]] name = "solana-streamer" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5643516e5206b89dd4bdf67c39815606d835a51a13260e43349abdb92d241b1d" +checksum = "117bb46b273fb7fea3d2faf1446ec809cac09aa576d72a611b1d063c44bef90b" dependencies = [ - "async-channel 1.9.0", + "anza-quinn", + "anza-quinn-proto", + "arc-swap", "bytes", "crossbeam-channel", "dashmap 5.5.3", @@ -9249,27 +9516,26 @@ dependencies = [ "libc", "log", "nix", + "num_cpus", "pem", "percentage", - "quinn", - "quinn-proto", "rand 0.8.5", "rustls 0.23.37", "smallvec", - "socket2 0.5.10", + "socket2 0.6.3", "solana-keypair", "solana-measure", "solana-metrics", "solana-net-utils", "solana-packet", "solana-perf", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-quic-definitions", - "solana-signature", - "solana-signer", + "solana-signature 3.2.0", + "solana-signer 3.0.0", "solana-time-utils", "solana-tls-utils", - "solana-transaction-error", + "solana-transaction-error 3.1.0", "solana-transaction-metrics-tracker", "thiserror 2.0.18", "tokio", @@ -9279,98 +9545,117 @@ dependencies = [ [[package]] name = "solana-svm-callback" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cef9f7d5cfb5d375081a6c8ad712a6f0e055a15890081f845acf55d8254a7a2" +checksum = "c895f1add5c9ceff634f485554ddbcbceb88cba71b2f753c4caaba461690d2c6" dependencies = [ "solana-account", + "solana-clock", "solana-precompile-error", - "solana-pubkey", + "solana-pubkey 3.0.0", ] [[package]] name = "solana-svm-feature-set" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f24b836eb4d74ec255217bdbe0f24f64a07adeac31aca61f334f91cd4a3b1d5" +checksum = "5addc8fc7beb262aed2df0c34322a04a1b07b82d35fac0a34cd01f5263f7e971" + +[[package]] +name = "solana-svm-log-collector" +version = "3.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e985304ae8370c2b14c5c31c3e4dfdd18bc38ba806ee341655119430116c1f0" +dependencies = [ + "log", +] + +[[package]] +name = "solana-svm-measure" +version = "3.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8bc239ef12213c45a4077799a154f340b290938973ad11dc4aaedee8fe39319" + +[[package]] +name = "solana-svm-timings" +version = "3.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df7bc8099ec662531e751607c096a2b336502b592ddd2cf584ec8312fd499fa8" +dependencies = [ + "eager", + "enum-iterator", + "solana-pubkey 3.0.0", +] [[package]] name = "solana-svm-transaction" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab717b9539375ebb088872c6c87d1d8832d19f30f154ecc530154d23f60a6f0c" +checksum = "29a9d25c729620fc70664e17d787a7804e52903da6fc94810e5dac7ca3217064" dependencies = [ - "solana-hash", + "solana-hash 3.1.0", "solana-message", - "solana-pubkey", - "solana-sdk-ids", - "solana-signature", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", + "solana-signature 3.2.0", "solana-transaction", ] +[[package]] +name = "solana-svm-type-overrides" +version = "3.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5093201eaac4a41edcaab9fc0060712d5bce2d2a0ca6134d18e9bcac2b3739bc" +dependencies = [ + "rand 0.8.5", +] + [[package]] name = "solana-system-interface" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7c18cb1a91c6be5f5a8ac9276a1d7c737e39a21beba9ea710ab4b9c63bc90" +checksum = "4e1790547bfc3061f1ee68ea9d8dc6c973c02a163697b24263a8e9f2e6d4afa2" dependencies = [ - "js-sys", "num-traits", "serde", "serde_derive", - "solana-decode-error", - "solana-instruction", - "solana-pubkey", - "wasm-bindgen", + "solana-instruction 3.3.0", + "solana-msg 3.1.0", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", ] [[package]] name = "solana-system-program" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23ca36cef39aea7761be58d4108a56a2e27042fb1e913355fdb142a05fc7eab7" +checksum = "ab198a979e1bfa90e5a481fd3cec77326660e182668a248020cbd427c0ea1b5f" dependencies = [ "bincode", "log", "serde", - "serde_derive", "solana-account", "solana-bincode", "solana-fee-calculator", - "solana-instruction", - "solana-log-collector", + "solana-instruction 3.3.0", "solana-nonce", "solana-nonce-account", "solana-packet", "solana-program-runtime", - "solana-pubkey", - "solana-sdk-ids", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", + "solana-svm-log-collector", + "solana-svm-type-overrides", "solana-system-interface", "solana-sysvar", "solana-transaction-context", - "solana-type-overrides", -] - -[[package]] -name = "solana-system-transaction" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd98a25e5bcba8b6be8bcbb7b84b24c2a6a8178d7fb0e3077a916855ceba91a" -dependencies = [ - "solana-hash", - "solana-keypair", - "solana-message", - "solana-pubkey", - "solana-signer", - "solana-system-interface", - "solana-transaction", ] [[package]] name = "solana-sysvar" -version = "2.3.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8c3595f95069f3d90f275bb9bd235a1973c4d059028b0a7f81baca2703815db" +checksum = "6690d3dd88f15c21edff68eb391ef8800df7a1f5cec84ee3e8d1abf05affdf74" dependencies = [ "base64 0.22.1", "bincode", @@ -9379,104 +9664,61 @@ dependencies = [ "lazy_static", "serde", "serde_derive", - "solana-account-info", + "solana-account-info 3.1.1", "solana-clock", - "solana-define-syscall 2.3.0", + "solana-define-syscall 4.0.1", "solana-epoch-rewards", "solana-epoch-schedule", "solana-fee-calculator", - "solana-hash", - "solana-instruction", - "solana-instructions-sysvar", + "solana-hash 4.2.0", + "solana-instruction 3.3.0", "solana-last-restart-slot", "solana-program-entrypoint", - "solana-program-error", - "solana-program-memory", - "solana-pubkey", + "solana-program-error 3.0.1", + "solana-program-memory 3.1.0", + "solana-pubkey 4.1.0", "solana-rent", - "solana-sanitize", - "solana-sdk-ids", + "solana-sdk-ids 3.1.0", "solana-sdk-macro", "solana-slot-hashes", "solana-slot-history", - "solana-stake-interface", "solana-sysvar-id", ] [[package]] name = "solana-sysvar-id" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5762b273d3325b047cfda250787f8d796d781746860d5d0a746ee29f3e8812c1" -dependencies = [ - "solana-pubkey", - "solana-sdk-ids", -] - -[[package]] -name = "solana-thin-client" -version = "2.3.13" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c1025715a113e0e2e379b30a6bfe4455770dc0759dabf93f7dbd16646d5acbe" +checksum = "17358d1e9a13e5b9c2264d301102126cf11a47fd394cdf3dec174fe7bc96e1de" dependencies = [ - "bincode", - "log", - "rayon", - "solana-account", - "solana-client-traits", - "solana-clock", - "solana-commitment-config", - "solana-connection-cache", - "solana-epoch-info", - "solana-hash", - "solana-instruction", - "solana-keypair", - "solana-message", - "solana-pubkey", - "solana-rpc-client", - "solana-rpc-client-api", - "solana-signature", - "solana-signer", - "solana-system-interface", - "solana-transaction", - "solana-transaction-error", + "solana-address 2.4.0", + "solana-sdk-ids 3.1.0", ] [[package]] name = "solana-time-utils" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6af261afb0e8c39252a04d026e3ea9c405342b08c871a2ad8aa5448e068c784c" - -[[package]] -name = "solana-timings" -version = "2.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c49b842dfc53c1bf9007eaa6730296dea93b4fce73f457ce1080af43375c0d6" -dependencies = [ - "eager", - "enum-iterator", - "solana-pubkey", -] +checksum = "0ced92c60aa76ec4780a9d93f3bd64dfa916e1b998eacc6f1c110f3f444f02c9" [[package]] name = "solana-tls-utils" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14494aa87a75a883d1abcfee00f1278a28ecc594a2f030084879eb40570728f6" +checksum = "2f9e3a99391506f6e61d7ec163e916e280366fa495162fb33568d7e0b12ac001" dependencies = [ "rustls 0.23.37", "solana-keypair", - "solana-pubkey", - "solana-signer", + "solana-pubkey 3.0.0", + "solana-signer 3.0.0", "x509-parser", ] [[package]] name = "solana-tpu-client" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17895ce70fd1dd93add3fbac87d599954ded93c63fa1c66f702d278d96a6da14" +checksum = "77bfb1a8a4d0b25474deb6b830be1a56e38116e7ed59d06078496bdc226e0d6c" dependencies = [ "async-trait", "bincode", @@ -9493,61 +9735,56 @@ dependencies = [ "solana-measure", "solana-message", "solana-net-utils", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-pubsub-client", "solana-quic-definitions", "solana-rpc-client", "solana-rpc-client-api", - "solana-signature", - "solana-signer", + "solana-signature 3.2.0", + "solana-signer 3.0.0", "solana-transaction", - "solana-transaction-error", + "solana-transaction-error 3.1.0", "thiserror 2.0.18", "tokio", ] [[package]] name = "solana-transaction" -version = "2.2.3" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80657d6088f721148f5d889c828ca60c7daeedac9a8679f9ec215e0c42bcbf41" +checksum = "96697cff5075a028265324255efed226099f6d761ca67342b230d09f72cc48d2" dependencies = [ "bincode", "serde", "serde_derive", - "solana-bincode", - "solana-feature-set", - "solana-hash", - "solana-instruction", - "solana-keypair", + "solana-address 2.4.0", + "solana-hash 4.2.0", + "solana-instruction 3.3.0", + "solana-instruction-error", "solana-message", - "solana-precompiles", - "solana-pubkey", - "solana-sanitize", - "solana-sdk-ids", + "solana-sanitize 3.0.1", + "solana-sdk-ids 3.1.0", "solana-short-vec", - "solana-signature", - "solana-signer", - "solana-system-interface", - "solana-transaction-error", - "wasm-bindgen", + "solana-signature 3.2.0", + "solana-signer 3.0.0", + "solana-transaction-error 3.1.0", ] [[package]] name = "solana-transaction-context" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a312304361987a85b2ef2293920558e6612876a639dd1309daf6d0d59ef2fe" +checksum = "15c4936df4b86a943ea6d552ca2c64fcc0d1a06dee2193cbf463eaedc372736d" dependencies = [ "bincode", "serde", - "serde_derive", "solana-account", - "solana-instruction", + "solana-instruction 3.3.0", "solana-instructions-sysvar", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-rent", - "solana-sdk-ids", + "solana-sbpf", + "solana-sdk-ids 3.1.0", ] [[package]] @@ -9555,18 +9792,28 @@ name = "solana-transaction-error" version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "222a9dc8fdb61c6088baab34fc3a8b8473a03a7a5fd404ed8dd502fa79b67cb1" +dependencies = [ + "solana-instruction 2.3.3", + "solana-sanitize 2.2.1", +] + +[[package]] +name = "solana-transaction-error" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8396904805b0b385b9de115a652fe80fd01e5b98ce0513f4fcd8184ada9bb792" dependencies = [ "serde", "serde_derive", - "solana-instruction", - "solana-sanitize", + "solana-instruction-error", + "solana-sanitize 3.0.1", ] [[package]] name = "solana-transaction-metrics-tracker" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03fc4e1b6252dc724f5ee69db6229feb43070b7318651580d2174da8baefb993" +checksum = "08fa21a80de2642f662b076d5294330b640f1311898a30eacac870b809dd1ca4" dependencies = [ "base64 0.22.1", "bincode", @@ -9575,140 +9822,126 @@ dependencies = [ "solana-packet", "solana-perf", "solana-short-vec", - "solana-signature", + "solana-signature 3.2.0", ] [[package]] name = "solana-transaction-status" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135f92f4192cc68900c665becf97fc0a6500ae5a67ff347bf2cbc20ecfefa821" +checksum = "4a12bb65dfccf472f5315225b49f456911656b31f9919841c493e8b8a6b82919" dependencies = [ "Inflector", "agave-reserved-account-keys", "base64 0.22.1", "bincode", - "borsh 1.6.0", + "borsh 1.6.1", "bs58", "log", "serde", - "serde_derive", "serde_json", "solana-account-decoder", "solana-address-lookup-table-interface", "solana-clock", - "solana-hash", - "solana-instruction", + "solana-hash 3.1.0", + "solana-instruction 3.3.0", "solana-loader-v2-interface", "solana-loader-v3-interface", "solana-message", - "solana-program-option", - "solana-pubkey", + "solana-program-option 3.1.0", + "solana-pubkey 3.0.0", "solana-reward-info", - "solana-sdk-ids", - "solana-signature", + "solana-sdk-ids 3.1.0", + "solana-signature 3.2.0", "solana-stake-interface", "solana-system-interface", "solana-transaction", - "solana-transaction-error", + "solana-transaction-error 3.1.0", "solana-transaction-status-client-types", "solana-vote-interface", - "spl-associated-token-account 7.0.0", - "spl-memo", - "spl-token 8.0.0", - "spl-token-2022 8.0.1", - "spl-token-group-interface 0.6.0", - "spl-token-metadata-interface 0.7.0", + "spl-associated-token-account-interface", + "spl-memo-interface", + "spl-token-2022-interface", + "spl-token-group-interface", + "spl-token-interface", + "spl-token-metadata-interface 0.8.0", "thiserror 2.0.18", ] [[package]] name = "solana-transaction-status-client-types" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f1d7c2387c35850848212244d2b225847666cb52d3bd59a5c409d2c300303d" +checksum = "57ab817d4c93e71f5e91d36ee3ff1742cd2b5af4bdb16b5db3047d2f71cb4955" dependencies = [ "base64 0.22.1", "bincode", "bs58", "serde", - "serde_derive", "serde_json", "solana-account-decoder-client-types", "solana-commitment-config", + "solana-instruction 3.3.0", "solana-message", + "solana-pubkey 3.0.0", "solana-reward-info", - "solana-signature", + "solana-signature 3.2.0", "solana-transaction", "solana-transaction-context", - "solana-transaction-error", + "solana-transaction-error 3.1.0", "thiserror 2.0.18", ] -[[package]] -name = "solana-type-overrides" -version = "2.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d80c44761eb398a157d809a04840865c347e1831ae3859b6100c0ee457bc1a" -dependencies = [ - "rand 0.8.5", -] - [[package]] name = "solana-udp-client" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dd36227dd3035ac09a89d4239551d2e3d7d9b177b61ccc7c6d393c3974d0efa" +checksum = "7563b1362473323874cb66bb6af8f6d9ecff51460b683602011cc654a514990d" dependencies = [ "async-trait", "solana-connection-cache", "solana-keypair", "solana-net-utils", "solana-streamer", - "solana-transaction-error", + "solana-transaction-error 3.1.0", "thiserror 2.0.18", "tokio", ] -[[package]] -name = "solana-validator-exit" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bbf6d7a3c0b28dd5335c52c0e9eae49d0ae489a8f324917faf0ded65a812c1d" - [[package]] name = "solana-version" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3324d46c7f7b7f5d34bf7dc71a2883bdc072c7b28ca81d0b2167ecec4cf8da9f" +checksum = "d84bcb8923fe9a7f8acb2cea7bf7aa4e1603d77b207d318b3315e5b1eec65dc2" dependencies = [ "agave-feature-set", "rand 0.8.5", "semver", "serde", - "serde_derive", - "solana-sanitize", + "solana-sanitize 3.0.1", "solana-serde-varint", ] [[package]] name = "solana-vote-interface" -version = "2.2.6" +version = "4.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b80d57478d6599d30acc31cc5ae7f93ec2361a06aefe8ea79bc81739a08af4c3" +checksum = "db6e123e16bfdd7a81d71b4c4699e0b29580b619f4cd2ef5b6aae1eb85e8979f" dependencies = [ "bincode", + "cfg_eval", "num-derive 0.4.2", "num-traits", "serde", "serde_derive", + "serde_with", "solana-clock", - "solana-decode-error", - "solana-hash", - "solana-instruction", - "solana-pubkey", + "solana-hash 3.1.0", + "solana-instruction 3.3.0", + "solana-instruction-error", + "solana-pubkey 3.0.0", "solana-rent", - "solana-sdk-ids", + "solana-sdk-ids 3.1.0", "solana-serde-varint", "solana-serialize-utils", "solana-short-vec", @@ -9717,9 +9950,9 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "908d0e72c8b83e48762eb3e8c9114497cf4b1d66e506e360c46aba9308e71299" +checksum = "55e2eab8557ff61ae2f58ebdb63aabf3579e04eb3dd07e8b4c4102704a137bae" dependencies = [ "agave-feature-set", "bincode", @@ -9727,21 +9960,19 @@ dependencies = [ "num-derive 0.4.2", "num-traits", "serde", - "serde_derive", "solana-account", "solana-bincode", "solana-clock", "solana-epoch-schedule", - "solana-hash", - "solana-instruction", + "solana-hash 3.1.0", + "solana-instruction 3.3.0", "solana-keypair", - "solana-metrics", "solana-packet", "solana-program-runtime", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-rent", - "solana-sdk-ids", - "solana-signer", + "solana-sdk-ids 3.1.0", + "solana-signer 3.0.0", "solana-slot-hashes", "solana-transaction", "solana-transaction-context", @@ -9749,21 +9980,31 @@ dependencies = [ "thiserror 2.0.18", ] +[[package]] +name = "solana-zero-copy" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94f52dd8f733a13f6a18e55de83cf97c4c3f5fdf27ea3830bcff0b35313efcc2" +dependencies = [ + "bytemuck", + "bytemuck_derive", +] + [[package]] name = "solana-zk-elgamal-proof-program" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70cea14481d8efede6b115a2581f27bc7c6fdfba0752c20398456c3ac1245fc4" +checksum = "98ebd77845de672972a32c357d7a68f2cc16c1037cc0ebf550ebba167827c10c" dependencies = [ "agave-feature-set", "bytemuck", "num-derive 0.4.2", "num-traits", - "solana-instruction", - "solana-log-collector", + "solana-instruction 3.3.0", "solana-program-runtime", - "solana-sdk-ids", - "solana-zk-sdk", + "solana-sdk-ids 3.1.0", + "solana-svm-log-collector", + "solana-zk-sdk 4.0.0", ] [[package]] @@ -9777,7 +10018,7 @@ dependencies = [ "bincode", "bytemuck", "bytemuck_derive", - "curve25519-dalek 4.1.3", + "curve25519-dalek", "itertools 0.12.1", "js-sys", "merlin", @@ -9788,14 +10029,51 @@ dependencies = [ "serde_derive", "serde_json", "sha3", - "solana-derivation-path", - "solana-instruction", - "solana-pubkey", - "solana-sdk-ids", - "solana-seed-derivable", - "solana-seed-phrase", - "solana-signature", - "solana-signer", + "solana-derivation-path 2.2.1", + "solana-instruction 2.3.3", + "solana-pubkey 2.4.0", + "solana-sdk-ids 2.2.1", + "solana-seed-derivable 2.2.1", + "solana-seed-phrase 2.2.1", + "solana-signature 2.3.0", + "solana-signer 2.2.1", + "subtle", + "thiserror 2.0.18", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-zk-sdk" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9602bcb1f7af15caef92b91132ec2347e1c51a72ecdbefdaefa3eac4b8711475" +dependencies = [ + "aes-gcm-siv", + "base64 0.22.1", + "bincode", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek", + "getrandom 0.2.17", + "itertools 0.12.1", + "js-sys", + "merlin", + "num-derive 0.4.2", + "num-traits", + "rand 0.8.5", + "serde", + "serde_derive", + "serde_json", + "sha3", + "solana-derivation-path 3.0.0", + "solana-instruction 3.3.0", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", + "solana-seed-derivable 3.0.0", + "solana-seed-phrase 3.0.0", + "solana-signature 3.2.0", + "solana-signer 3.0.0", "subtle", "thiserror 2.0.18", "wasm-bindgen", @@ -9804,51 +10082,50 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579752ad6ea2a671995f13c763bf28288c3c895cb857a518cc4ebab93c9a8dde" +checksum = "2c13a05831857b4e3320d98cdd77a3f7b645566508d8f66a07c9168ac1e8bc68" dependencies = [ "agave-feature-set", "bytemuck", "num-derive 0.4.2", "num-traits", - "solana-instruction", - "solana-log-collector", + "solana-instruction 3.3.0", "solana-program-runtime", - "solana-sdk-ids", + "solana-sdk-ids 3.1.0", + "solana-svm-log-collector", "solana-zk-token-sdk", ] [[package]] name = "solana-zk-token-sdk" -version = "2.3.13" +version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5055e5df94abd5badf4f947681c893375bdb6f8f543c05d2a7ab9647a6a9d205" +checksum = "cd8dab3f2df045b7bec3cb3e1cff0889ec46d776191c3a2af19a77ddd3c4c6fc" dependencies = [ "aes-gcm-siv", "base64 0.22.1", "bincode", "bytemuck", "bytemuck_derive", - "curve25519-dalek 4.1.3", + "curve25519-dalek", "itertools 0.12.1", "merlin", "num-derive 0.4.2", "num-traits", "rand 0.8.5", "serde", - "serde_derive", "serde_json", "sha3", "solana-curve25519", - "solana-derivation-path", - "solana-instruction", - "solana-pubkey", - "solana-sdk-ids", - "solana-seed-derivable", - "solana-seed-phrase", - "solana-signature", - "solana-signer", + "solana-derivation-path 3.0.0", + "solana-instruction 3.3.0", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", + "solana-seed-derivable 3.0.0", + "solana-seed-phrase 3.0.0", + "solana-signature 3.2.0", + "solana-signer 3.0.0", "subtle", "thiserror 2.0.18", "zeroize", @@ -9864,56 +10141,47 @@ dependencies = [ ] [[package]] -name = "spl-associated-token-account" -version = "6.0.0" +name = "spki" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76fee7d65013667032d499adc3c895e286197a35a0d3a4643c80e7fd3e9969e3" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ - "borsh 1.6.0", - "num-derive 0.4.2", - "num-traits", - "solana-program", - "spl-associated-token-account-client", - "spl-token 7.0.0", - "spl-token-2022 6.0.0", - "thiserror 1.0.69", + "base64ct", + "der", ] [[package]] -name = "spl-associated-token-account" -version = "7.0.0" +name = "spl-associated-token-account-interface" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae179d4a26b3c7a20c839898e6aed84cb4477adf108a366c95532f058aea041b" +checksum = "e6433917b60441d68d99a17e121d9db0ea15a9a69c0e5afa34649cf5ba12612f" dependencies = [ - "borsh 1.6.0", - "num-derive 0.4.2", - "num-traits", - "solana-program", - "spl-associated-token-account-client", - "spl-token 8.0.0", - "spl-token-2022 8.0.1", - "thiserror 2.0.18", + "borsh 1.6.1", + "solana-instruction 3.3.0", + "solana-pubkey 3.0.0", ] [[package]] -name = "spl-associated-token-account-client" -version = "2.0.0" +name = "spl-discriminator" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f8349dbcbe575f354f9a533a21f272f3eb3808a49e2fdc1c34393b88ba76cb" +checksum = "a7398da23554a31660f17718164e31d31900956054f54f52d5ec1be51cb4f4b3" dependencies = [ - "solana-instruction", - "solana-pubkey", + "bytemuck", + "solana-program-error 2.2.2", + "solana-sha256-hasher 2.3.0", + "spl-discriminator-derive", ] [[package]] name = "spl-discriminator" -version = "0.4.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7398da23554a31660f17718164e31d31900956054f54f52d5ec1be51cb4f4b3" +checksum = "e597c5ff9ed7c74a54dbc47bae2f06e4db8c98f4356ad280200dc11878266db1" dependencies = [ "bytemuck", - "solana-program-error", - "solana-sha256-hasher", + "solana-program-error 3.0.1", + "solana-sha256-hasher 3.1.0", "spl-discriminator-derive", ] @@ -9942,500 +10210,302 @@ dependencies = [ ] [[package]] -name = "spl-elgamal-registry" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce0f668975d2b0536e8a8fd60e56a05c467f06021dae037f1d0cfed0de2e231d" -dependencies = [ - "bytemuck", - "solana-program", - "solana-zk-sdk", - "spl-pod", - "spl-token-confidential-transfer-proof-extraction 0.2.1", -] - -[[package]] -name = "spl-elgamal-registry" -version = "0.2.0" +name = "spl-elgamal-registry-interface" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65edfeed09cd4231e595616aa96022214f9c9d2be02dea62c2b30d5695a6833a" +checksum = "065f54100d118d24036283e03120b2f60cb5b7d597d3db649e13690e22d41398" dependencies = [ "bytemuck", - "solana-account-info", - "solana-cpi", - "solana-instruction", - "solana-msg", - "solana-program-entrypoint", - "solana-program-error", - "solana-pubkey", - "solana-rent", - "solana-sdk-ids", - "solana-system-interface", - "solana-sysvar", - "solana-zk-sdk", - "spl-pod", - "spl-token-confidential-transfer-proof-extraction 0.3.0", + "solana-instruction 3.3.0", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", + "solana-zk-sdk 4.0.0", + "spl-token-confidential-transfer-proof-extraction", ] [[package]] name = "spl-generic-token" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "741a62a566d97c58d33f9ed32337ceedd4e35109a686e31b1866c5dfa56abddc" -dependencies = [ - "bytemuck", - "solana-pubkey", -] - -[[package]] -name = "spl-memo" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f09647c0974e33366efeb83b8e2daebb329f0420149e74d3a4bd2c08cf9f7cb" -dependencies = [ - "solana-account-info", - "solana-instruction", - "solana-msg", - "solana-program-entrypoint", - "solana-program-error", - "solana-pubkey", -] - -[[package]] -name = "spl-pod" -version = "0.5.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d994afaf86b779104b4a95ba9ca75b8ced3fdb17ee934e38cb69e72afbe17799" +checksum = "233df81b75ab99b42f002b5cdd6e65a7505ffa930624f7096a7580a56765e9cf" dependencies = [ - "borsh 1.6.0", "bytemuck", - "bytemuck_derive", - "num-derive 0.4.2", - "num-traits", - "solana-decode-error", - "solana-msg", - "solana-program-error", - "solana-program-option", - "solana-pubkey", - "solana-zk-sdk", - "thiserror 2.0.18", -] - -[[package]] -name = "spl-program-error" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d39b5186f42b2b50168029d81e58e800b690877ef0b30580d107659250da1d1" -dependencies = [ - "num-derive 0.4.2", - "num-traits", - "solana-program", - "spl-program-error-derive 0.4.1", - "thiserror 1.0.69", + "solana-pubkey 3.0.0", ] [[package]] -name = "spl-program-error" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdebc8b42553070b75aa5106f071fef2eb798c64a7ec63375da4b1f058688c6" -dependencies = [ - "num-derive 0.4.2", - "num-traits", - "solana-decode-error", - "solana-msg", - "solana-program-error", - "spl-program-error-derive 0.5.0", - "thiserror 2.0.18", -] - -[[package]] -name = "spl-program-error-derive" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d375dd76c517836353e093c2dbb490938ff72821ab568b545fd30ab3256b3e" -dependencies = [ - "proc-macro2", - "quote", - "sha2 0.10.9", - "syn 2.0.117", -] - -[[package]] -name = "spl-program-error-derive" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2539e259c66910d78593475540e8072f0b10f0f61d7607bbf7593899ed52d0" -dependencies = [ - "proc-macro2", - "quote", - "sha2 0.10.9", - "syn 2.0.117", -] - -[[package]] -name = "spl-tlv-account-resolution" -version = "0.9.0" +name = "spl-memo-interface" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd99ff1e9ed2ab86e3fd582850d47a739fec1be9f4661cba1782d3a0f26805f3" -dependencies = [ - "bytemuck", - "num-derive 0.4.2", - "num-traits", - "solana-account-info", - "solana-decode-error", - "solana-instruction", - "solana-msg", - "solana-program-error", - "solana-pubkey", - "spl-discriminator", - "spl-pod", - "spl-program-error 0.6.0", - "spl-type-length-value 0.7.0", - "thiserror 1.0.69", +checksum = "3d4e2aedd58f858337fa609af5ad7100d4a243fdaf6a40d6eb4c28c5f19505d3" +dependencies = [ + "solana-instruction 3.3.0", + "solana-pubkey 3.0.0", ] [[package]] -name = "spl-tlv-account-resolution" -version = "0.10.0" +name = "spl-pod" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1408e961215688715d5a1063cbdcf982de225c45f99c82b4f7d7e1dd22b998d7" +checksum = "d994afaf86b779104b4a95ba9ca75b8ced3fdb17ee934e38cb69e72afbe17799" dependencies = [ + "borsh 1.6.1", "bytemuck", + "bytemuck_derive", "num-derive 0.4.2", "num-traits", - "solana-account-info", "solana-decode-error", - "solana-instruction", - "solana-msg", - "solana-program-error", - "solana-pubkey", - "spl-discriminator", - "spl-pod", - "spl-program-error 0.7.0", - "spl-type-length-value 0.8.0", + "solana-msg 2.2.1", + "solana-program-error 2.2.2", + "solana-program-option 2.2.1", + "solana-pubkey 2.4.0", + "solana-zk-sdk 2.3.13", "thiserror 2.0.18", ] [[package]] -name = "spl-token" -version = "7.0.0" +name = "spl-pod" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed320a6c934128d4f7e54fe00e16b8aeaecf215799d060ae14f93378da6dc834" +checksum = "d6f3df240f67bea453d4bc5749761e45436d14b9457ed667e0300555d5c271f3" dependencies = [ - "arrayref", + "borsh 1.6.1", "bytemuck", + "bytemuck_derive", "num-derive 0.4.2", "num-traits", "num_enum", - "solana-program", - "thiserror 1.0.69", + "solana-program-error 3.0.1", + "solana-program-option 3.1.0", + "solana-pubkey 3.0.0", + "solana-zk-sdk 4.0.0", + "thiserror 2.0.18", ] [[package]] -name = "spl-token" -version = "8.0.0" +name = "spl-program-error" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053067c6a82c705004f91dae058b11b4780407e9ccd6799dc9e7d0fab5f242da" +checksum = "9c4f6cf26cb6768110bf024bc7224326c720d711f7ad25d16f40f6cee40edb2d" dependencies = [ - "arrayref", - "bytemuck", "num-derive 0.4.2", "num-traits", "num_enum", - "solana-account-info", - "solana-cpi", - "solana-decode-error", - "solana-instruction", - "solana-msg", - "solana-program-entrypoint", - "solana-program-error", - "solana-program-memory", - "solana-program-option", - "solana-program-pack", - "solana-pubkey", - "solana-rent", - "solana-sdk-ids", - "solana-sysvar", + "solana-msg 3.1.0", + "solana-program-error 3.0.1", + "spl-program-error-derive", "thiserror 2.0.18", ] [[package]] -name = "spl-token-2022" -version = "6.0.0" +name = "spl-program-error-derive" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b27f7405010ef816587c944536b0eafbcc35206ab6ba0f2ca79f1d28e488f4f" +checksum = "9ec8965aa4dc6c74701cbb48b9cad5af35b9a394514934949edbb357b78f840d" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.9", + "syn 2.0.117", +] + +[[package]] +name = "spl-tlv-account-resolution" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6927f613c9d7ce20835d3cefb602137cab2518e383a047c0eaa58054a60644c8" dependencies = [ - "arrayref", "bytemuck", "num-derive 0.4.2", "num-traits", "num_enum", - "solana-program", - "solana-security-txt", - "solana-zk-sdk", - "spl-elgamal-registry 0.1.1", - "spl-memo", - "spl-pod", - "spl-token 7.0.0", - "spl-token-confidential-transfer-ciphertext-arithmetic 0.2.1", - "spl-token-confidential-transfer-proof-extraction 0.2.1", - "spl-token-confidential-transfer-proof-generation 0.2.0", - "spl-token-group-interface 0.5.0", - "spl-token-metadata-interface 0.6.0", - "spl-transfer-hook-interface 0.9.0", - "spl-type-length-value 0.7.0", - "thiserror 1.0.69", + "solana-account-info 3.1.1", + "solana-instruction 3.3.0", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", + "spl-discriminator 0.5.2", + "spl-pod 0.7.2", + "spl-program-error", + "spl-type-length-value 0.9.1", + "thiserror 2.0.18", ] [[package]] -name = "spl-token-2022" -version = "7.0.0" +name = "spl-token" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9048b26b0df0290f929ff91317c83db28b3ef99af2b3493dd35baa146774924c" +checksum = "878b0183d51fcd8a53e1604f4c13321894cf53227e6773c529b0d03d499a8dfd" dependencies = [ "arrayref", "bytemuck", "num-derive 0.4.2", "num-traits", "num_enum", - "solana-program", - "solana-security-txt", - "solana-zk-sdk", - "spl-elgamal-registry 0.1.1", - "spl-memo", - "spl-pod", - "spl-token 7.0.0", - "spl-token-confidential-transfer-ciphertext-arithmetic 0.2.1", - "spl-token-confidential-transfer-proof-extraction 0.2.1", - "spl-token-confidential-transfer-proof-generation 0.3.0", - "spl-token-group-interface 0.5.0", - "spl-token-metadata-interface 0.6.0", - "spl-transfer-hook-interface 0.9.0", - "spl-type-length-value 0.7.0", + "solana-account-info 3.1.1", + "solana-cpi", + "solana-instruction 3.3.0", + "solana-msg 3.1.0", + "solana-program-entrypoint", + "solana-program-error 3.0.1", + "solana-program-memory 3.1.0", + "solana-program-option 3.1.0", + "solana-program-pack", + "solana-pubkey 3.0.0", + "solana-rent", + "solana-sdk-ids 3.1.0", + "solana-sysvar", + "spl-token-interface", "thiserror 2.0.18", ] [[package]] name = "spl-token-2022" -version = "8.0.1" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f0dfbb079eebaee55e793e92ca5f433744f4b71ee04880bfd6beefba5973e5" +checksum = "552427d9117528d037daa0e70416d51322c8a33241317210f230304d852be61e" dependencies = [ "arrayref", "bytemuck", "num-derive 0.4.2", "num-traits", "num_enum", - "solana-account-info", + "solana-account-info 3.1.1", "solana-clock", "solana-cpi", - "solana-decode-error", - "solana-instruction", - "solana-msg", - "solana-native-token 2.3.0", + "solana-instruction 3.3.0", + "solana-msg 3.1.0", "solana-program-entrypoint", - "solana-program-error", - "solana-program-memory", - "solana-program-option", + "solana-program-error 3.0.1", + "solana-program-memory 3.1.0", + "solana-program-option 3.1.0", "solana-program-pack", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-rent", - "solana-sdk-ids", + "solana-sdk-ids 3.1.0", "solana-security-txt", "solana-system-interface", "solana-sysvar", - "solana-zk-sdk", - "spl-elgamal-registry 0.2.0", - "spl-memo", - "spl-pod", - "spl-token 8.0.0", - "spl-token-confidential-transfer-ciphertext-arithmetic 0.3.1", - "spl-token-confidential-transfer-proof-extraction 0.3.0", - "spl-token-confidential-transfer-proof-generation 0.4.1", - "spl-token-group-interface 0.6.0", - "spl-token-metadata-interface 0.7.0", - "spl-transfer-hook-interface 0.10.0", - "spl-type-length-value 0.8.0", + "solana-zk-sdk 4.0.0", + "spl-elgamal-registry-interface", + "spl-memo-interface", + "spl-pod 0.7.2", + "spl-token-2022-interface", + "spl-token-confidential-transfer-ciphertext-arithmetic", + "spl-token-confidential-transfer-proof-extraction", + "spl-token-confidential-transfer-proof-generation", + "spl-token-group-interface", + "spl-token-metadata-interface 0.8.0", + "spl-transfer-hook-interface", "thiserror 2.0.18", ] [[package]] name = "spl-token-2022-interface" -version = "1.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62d7ae2ee6b856f8ddcbdc3b3a9f4d2141582bbe150f93e5298ee97e0251fa04" +checksum = "2fcd81188211f4b3c8a5eba7fd534c7142f9dd026123b3472492782cc72f4dc6" dependencies = [ "arrayref", "bytemuck", "num-derive 0.4.2", "num-traits", "num_enum", - "solana-account-info", - "solana-decode-error", - "solana-instruction", - "solana-msg", - "solana-program-error", - "solana-program-option", + "solana-account-info 3.1.1", + "solana-instruction 3.3.0", + "solana-program-error 3.0.1", + "solana-program-option 3.1.0", "solana-program-pack", - "solana-pubkey", - "solana-sdk-ids", - "solana-zk-sdk", - "spl-pod", - "spl-token-confidential-transfer-proof-extraction 0.4.1", - "spl-token-confidential-transfer-proof-generation 0.4.1", - "spl-token-group-interface 0.6.0", - "spl-token-metadata-interface 0.7.0", - "spl-type-length-value 0.8.0", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", + "solana-zk-sdk 4.0.0", + "spl-pod 0.7.2", + "spl-token-confidential-transfer-proof-extraction", + "spl-token-confidential-transfer-proof-generation", + "spl-token-group-interface", + "spl-token-metadata-interface 0.8.0", + "spl-type-length-value 0.9.1", "thiserror 2.0.18", ] [[package]] name = "spl-token-confidential-transfer-ciphertext-arithmetic" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "170378693c5516090f6d37ae9bad2b9b6125069be68d9acd4865bbe9fc8499fd" -dependencies = [ - "base64 0.22.1", - "bytemuck", - "solana-curve25519", - "solana-zk-sdk", -] - -[[package]] -name = "spl-token-confidential-transfer-ciphertext-arithmetic" -version = "0.3.1" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cddd52bfc0f1c677b41493dafa3f2dbbb4b47cf0990f08905429e19dc8289b35" +checksum = "afbeb07f737d868f145512a4bcf9f59da275b7a3483df0add3f71eb812b689fb" dependencies = [ "base64 0.22.1", "bytemuck", "solana-curve25519", - "solana-zk-sdk", -] - -[[package]] -name = "spl-token-confidential-transfer-proof-extraction" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff2d6a445a147c9d6dd77b8301b1e116c8299601794b558eafa409b342faf96" -dependencies = [ - "bytemuck", - "solana-curve25519", - "solana-program", - "solana-zk-sdk", - "spl-pod", - "thiserror 2.0.18", -] - -[[package]] -name = "spl-token-confidential-transfer-proof-extraction" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe2629860ff04c17bafa9ba4bed8850a404ecac81074113e1f840dbd0ebb7bd6" -dependencies = [ - "bytemuck", - "solana-account-info", - "solana-curve25519", - "solana-instruction", - "solana-instructions-sysvar", - "solana-msg", - "solana-program-error", - "solana-pubkey", - "solana-sdk-ids", - "solana-zk-sdk", - "spl-pod", - "thiserror 2.0.18", + "solana-zk-sdk 4.0.0", ] [[package]] name = "spl-token-confidential-transfer-proof-extraction" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512c85bdbbb4cbcc2038849a9e164c958b16541f252b53ea1a3933191c0a4a1a" +checksum = "879a9ebad0d77383d3ea71e7de50503554961ff0f4ef6cbca39ad126e6f6da3a" dependencies = [ "bytemuck", - "solana-account-info", + "solana-account-info 3.1.1", "solana-curve25519", - "solana-instruction", + "solana-instruction 3.3.0", "solana-instructions-sysvar", - "solana-msg", - "solana-program-error", - "solana-pubkey", - "solana-sdk-ids", - "solana-zk-sdk", - "spl-pod", - "thiserror 2.0.18", -] - -[[package]] -name = "spl-token-confidential-transfer-proof-generation" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8627184782eec1894de8ea26129c61303f1f0adeed65c20e0b10bc584f09356d" -dependencies = [ - "curve25519-dalek 4.1.3", - "solana-zk-sdk", - "thiserror 1.0.69", -] - -[[package]] -name = "spl-token-confidential-transfer-proof-generation" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e3597628b0d2fe94e7900fd17cdb4cfbb31ee35c66f82809d27d86e44b2848b" -dependencies = [ - "curve25519-dalek 4.1.3", - "solana-zk-sdk", + "solana-msg 3.1.0", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", + "solana-zk-sdk 4.0.0", + "spl-pod 0.7.2", "thiserror 2.0.18", ] [[package]] name = "spl-token-confidential-transfer-proof-generation" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa27b9174bea869a7ebf31e0be6890bce90b1a4288bc2bbf24bd413f80ae3fde" +checksum = "a0cd59fce3dc00f563c6fa364d67c3f200d278eae681f4dc250240afcfe044b1" dependencies = [ - "curve25519-dalek 4.1.3", - "solana-zk-sdk", + "curve25519-dalek", + "solana-zk-sdk 4.0.0", "thiserror 2.0.18", ] [[package]] name = "spl-token-group-interface" -version = "0.5.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d595667ed72dbfed8c251708f406d7c2814a3fa6879893b323d56a10bedfc799" +checksum = "452d0f758af20caaa10d9a6f7608232e000d4c74462f248540b3d2ddfa419776" dependencies = [ "bytemuck", "num-derive 0.4.2", "num-traits", - "solana-decode-error", - "solana-instruction", - "solana-msg", - "solana-program-error", - "solana-pubkey", - "spl-discriminator", - "spl-pod", - "thiserror 1.0.69", + "num_enum", + "solana-instruction 3.3.0", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", + "spl-discriminator 0.5.2", + "spl-pod 0.7.2", + "thiserror 2.0.18", ] [[package]] -name = "spl-token-group-interface" -version = "0.6.0" +name = "spl-token-interface" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5597b4cd76f85ce7cd206045b7dc22da8c25516573d42d267c8d1fd128db5129" +checksum = "8c564ac05a7c8d8b12e988a37d82695b5ba4db376d07ea98bc4882c81f96c7f3" dependencies = [ + "arrayref", "bytemuck", "num-derive 0.4.2", "num-traits", - "solana-decode-error", - "solana-instruction", - "solana-msg", - "solana-program-error", - "solana-pubkey", - "spl-discriminator", - "spl-pod", + "num_enum", + "solana-instruction 3.3.0", + "solana-program-error 3.0.1", + "solana-program-option 3.1.0", + "solana-program-pack", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", "thiserror 2.0.18", ] @@ -10445,89 +10515,63 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfb9c89dbc877abd735f05547dcf9e6e12c00c11d6d74d8817506cab4c99fdbb" dependencies = [ - "borsh 1.6.0", + "borsh 1.6.1", "num-derive 0.4.2", "num-traits", - "solana-borsh", + "solana-borsh 2.2.1", "solana-decode-error", - "solana-instruction", - "solana-msg", - "solana-program-error", - "solana-pubkey", - "spl-discriminator", - "spl-pod", + "solana-instruction 2.3.3", + "solana-msg 2.2.1", + "solana-program-error 2.2.2", + "solana-pubkey 2.4.0", + "spl-discriminator 0.4.1", + "spl-pod 0.5.1", "spl-type-length-value 0.7.0", "thiserror 1.0.69", ] [[package]] name = "spl-token-metadata-interface" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "304d6e06f0de0c13a621464b1fd5d4b1bebf60d15ca71a44d3839958e0da16ee" +checksum = "9c467c7c3bd056f8fe60119e7ec34ddd6f23052c2fa8f1f51999098063b72676" dependencies = [ - "borsh 1.6.0", + "borsh 1.6.1", "num-derive 0.4.2", "num-traits", - "solana-borsh", - "solana-decode-error", - "solana-instruction", - "solana-msg", - "solana-program-error", - "solana-pubkey", - "spl-discriminator", - "spl-pod", - "spl-type-length-value 0.8.0", + "solana-borsh 3.0.2", + "solana-instruction 3.3.0", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", + "spl-discriminator 0.5.2", + "spl-pod 0.7.2", + "spl-type-length-value 0.9.1", "thiserror 2.0.18", ] [[package]] name = "spl-transfer-hook-interface" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4aa7503d52107c33c88e845e1351565050362c2314036ddf19a36cd25137c043" -dependencies = [ - "arrayref", - "bytemuck", - "num-derive 0.4.2", - "num-traits", - "solana-account-info", - "solana-cpi", - "solana-decode-error", - "solana-instruction", - "solana-msg", - "solana-program-error", - "solana-pubkey", - "spl-discriminator", - "spl-pod", - "spl-program-error 0.6.0", - "spl-tlv-account-resolution 0.9.0", - "spl-type-length-value 0.7.0", - "thiserror 1.0.69", -] - -[[package]] -name = "spl-transfer-hook-interface" -version = "0.10.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7e905b849b6aba63bde8c4badac944ebb6c8e6e14817029cbe1bc16829133bd" +checksum = "c34b46b8f39bc64a9ab177a0ea8e9a58826db76f8d9d154a2400ee60baef7b1e" dependencies = [ "arrayref", "bytemuck", "num-derive 0.4.2", "num-traits", - "solana-account-info", + "solana-account-info 3.1.1", "solana-cpi", - "solana-decode-error", - "solana-instruction", - "solana-msg", - "solana-program-error", - "solana-pubkey", - "spl-discriminator", - "spl-pod", - "spl-program-error 0.7.0", - "spl-tlv-account-resolution 0.10.0", - "spl-type-length-value 0.8.0", + "solana-instruction 3.3.0", + "solana-msg 3.1.0", + "solana-program-error 3.0.1", + "solana-pubkey 3.0.0", + "solana-sdk-ids 3.1.0", + "solana-system-interface", + "spl-discriminator 0.5.2", + "spl-pod 0.7.2", + "spl-program-error", + "spl-tlv-account-resolution", + "spl-type-length-value 0.9.1", "thiserror 2.0.18", ] @@ -10540,30 +10584,29 @@ dependencies = [ "bytemuck", "num-derive 0.4.2", "num-traits", - "solana-account-info", + "solana-account-info 2.3.0", "solana-decode-error", - "solana-msg", - "solana-program-error", - "spl-discriminator", - "spl-pod", + "solana-msg 2.2.1", + "solana-program-error 2.2.2", + "spl-discriminator 0.4.1", + "spl-pod 0.5.1", "thiserror 1.0.69", ] [[package]] name = "spl-type-length-value" -version = "0.8.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d417eb548214fa822d93f84444024b4e57c13ed6719d4dcc68eec24fb481e9f5" +checksum = "2504631748c48d2a937414d64a12dcac4588d34bd07d355d648619c189d29435" dependencies = [ "bytemuck", "num-derive 0.4.2", "num-traits", - "solana-account-info", - "solana-decode-error", - "solana-msg", - "solana-program-error", - "spl-discriminator", - "spl-pod", + "num_enum", + "solana-account-info 3.1.1", + "solana-program-error 3.0.1", + "solana-zero-copy", + "spl-discriminator 0.5.2", "thiserror 2.0.18", ] @@ -10685,6 +10728,7 @@ dependencies = [ "account-compression", "anchor-lang", "anchor-spl", + "borsh 1.6.1", "create-address-test-program", "light-account-checks", "light-batched-merkle-tree", @@ -10844,9 +10888,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.26.0" +version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand 2.3.0", "getrandom 0.4.2", @@ -10931,32 +10975,41 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + [[package]] name = "time" -version = "0.3.44" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", "itoa", "num-conv", "powerfmt", - "serde", + "serde_core", "time-core", "time-macros", ] [[package]] name = "time-core" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.24" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" dependencies = [ "num-conv", "time-core", @@ -10964,17 +11017,15 @@ dependencies = [ [[package]] name = "tiny-bip39" -version = "0.8.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +checksum = "a30fd743a02bf35236f6faf99adb03089bb77e91c998dac2c2ad76bb424f668c" dependencies = [ - "anyhow", - "hmac 0.8.1", "once_cell", - "pbkdf2 0.4.0", - "rand 0.7.3", + "pbkdf2 0.12.2", + "rand 0.8.5", "rustc-hash 1.1.0", - "sha2 0.9.9", + "sha2 0.10.9", "thiserror 1.0.69", "unicode-normalization", "wasm-bindgen", @@ -10993,9 +11044,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" dependencies = [ "tinyvec_macros", ] @@ -11010,7 +11061,7 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" name = "token-client-test" version = "0.1.0" dependencies = [ - "borsh 0.10.4", + "borsh 1.6.1", "light-client", "light-program-test", "light-test-utils", @@ -11018,7 +11069,7 @@ dependencies = [ "light-token-client", "light-token-interface", "solana-sdk", - "spl-token 7.0.0", + "spl-token", "tokio", ] @@ -11109,17 +11160,18 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.20.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +checksum = "d25a406cddcc431a75d3d9afc6a7c0f7428d4891dd973e4d54c56b46127bf857" dependencies = [ "futures-util", "log", - "rustls 0.21.12", + "rustls 0.23.37", + "rustls-pki-types", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls 0.26.4", "tungstenite", - "webpki-roots 0.25.4", + "webpki-roots 0.26.11", ] [[package]] @@ -11146,6 +11198,7 @@ dependencies = [ "bytes", "futures-core", "futures-sink", + "futures-util", "pin-project-lite", "tokio", ] @@ -11173,17 +11226,17 @@ dependencies = [ [[package]] name = "toml" -version = "1.0.6+spec-1.1.0" +version = "1.1.0+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "399b1124a3c9e16766831c6bba21e50192572cdd98706ea114f9502509686ffc" +checksum = "f8195ca05e4eb728f4ba94f3e3291661320af739c4e43779cbdfae82ab239fcc" dependencies = [ "indexmap", "serde_core", - "serde_spanned 1.0.4", - "toml_datetime 1.0.0+spec-1.1.0", + "serde_spanned 1.1.0", + "toml_datetime 1.1.0+spec-1.1.0", "toml_parser", "toml_writer", - "winnow", + "winnow 1.0.0", ] [[package]] @@ -11197,9 +11250,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "1.0.0+spec-1.1.0" +version = "1.1.0+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32c2555c699578a4f59f0cc68e5116c8d7cabbd45e1409b989d4be085b53f13e" +checksum = "97251a7c317e03ad83774a8752a7e81fb6067740609f75ea2b585b569a59198f" dependencies = [ "serde_core", ] @@ -11215,28 +11268,28 @@ dependencies = [ "serde_spanned 0.6.9", "toml_datetime 0.6.11", "toml_write", - "winnow", + "winnow 0.7.15", ] [[package]] name = "toml_edit" -version = "0.25.4+spec-1.1.0" +version = "0.25.8+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7193cbd0ce53dc966037f54351dbbcf0d5a642c7f0038c382ef9e677ce8c13f2" +checksum = "16bff38f1d86c47f9ff0647e6838d7bb362522bdf44006c7068c2b1e606f1f3c" dependencies = [ "indexmap", - "toml_datetime 1.0.0+spec-1.1.0", + "toml_datetime 1.1.0+spec-1.1.0", "toml_parser", - "winnow", + "winnow 1.0.0", ] [[package]] name = "toml_parser" -version = "1.0.9+spec-1.1.0" +version = "1.1.0+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" +checksum = "2334f11ee363607eb04df9b8fc8a13ca1715a72ba8662a26ac285c98aabb4011" dependencies = [ - "winnow", + "winnow 1.0.0", ] [[package]] @@ -11247,9 +11300,9 @@ checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] name = "toml_writer" -version = "1.0.6+spec-1.1.0" +version = "1.1.0+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" +checksum = "d282ade6016312faf3e41e57ebbba0c073e4056dab1232ab1cb624199648f8ed" [[package]] name = "tower" @@ -11382,9 +11435,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.22" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" dependencies = [ "matchers", "nu-ansi-term", @@ -11419,28 +11472,27 @@ dependencies = [ "serde_json", "target-triple", "termcolor", - "toml 1.0.6+spec-1.1.0", + "toml 1.1.0+spec-1.1.0", ] [[package]] name = "tungstenite" -version = "0.20.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442" dependencies = [ - "byteorder", "bytes", "data-encoding", - "http 0.2.12", + "http 1.4.0", "httparse", "log", - "rand 0.8.5", - "rustls 0.21.12", + "rand 0.9.2", + "rustls 0.23.37", + "rustls-pki-types", "sha1", - "thiserror 1.0.69", - "url", + "thiserror 2.0.18", "utf-8", - "webpki-roots 0.24.0", + "webpki-roots 0.26.11", ] [[package]] @@ -11547,6 +11599,12 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +[[package]] +name = "unit-prefix" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3" + [[package]] name = "universal-hash" version = "0.5.1" @@ -11885,18 +11943,18 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.24.0" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888" -dependencies = [ - "rustls-webpki 0.101.7", -] +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.25.4" +version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" +dependencies = [ + "webpki-roots 1.0.6", +] [[package]] name = "webpki-roots" @@ -11938,6 +11996,55 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "wincode" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5cec722a3274e47d1524cbe2cea762f2c19d615bd9d73ada21db9066349d57e" +dependencies = [ + "proc-macro2", + "quote", + "thiserror 2.0.18", + "wincode-derive 0.2.3", +] + +[[package]] +name = "wincode" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc91ddd8c932a38bbec58ed536d9e93ce9cd01b6af9b6de3c501132cf98ddec6" +dependencies = [ + "pastey", + "proc-macro2", + "quote", + "thiserror 2.0.18", + "wincode-derive 0.4.3", +] + +[[package]] +name = "wincode-derive" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8961eb04054a1b2e026b5628e24da7e001350249a787e1a85aa961f33dc5f286" +dependencies = [ + "darling 0.21.3", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "wincode-derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fca057fc9a13dd19cdb64ef558635d43c42667c0afa1ae7915ea1fa66993fd1a" +dependencies = [ + "darling 0.21.3", + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "windows-core" version = "0.62.2" @@ -12303,6 +12410,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a90e88e4667264a994d34e6d1ab2d26d398dcdca8b7f52bec8668957517fc7d8" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" @@ -12468,7 +12584,7 @@ dependencies = [ "base64 0.13.1", "bs58", "chrono", - "clap 4.5.60", + "clap 4.6.0", "dirs", "groth16-solana", "light-batched-merkle-tree", @@ -12491,9 +12607,11 @@ dependencies = [ "serde_json", "sha2 0.10.9", "solana-client", + "solana-commitment-config", "solana-loader-v3-interface", "solana-program", "solana-sdk", + "solana-system-interface", "solana-transaction-status", "tabled", "tokio", @@ -12526,7 +12644,7 @@ dependencies = [ name = "zero-copy-derive-test" version = "0.1.0" dependencies = [ - "borsh 0.10.4", + "borsh 1.6.1", "light-zero-copy", "light-zero-copy-derive", "rand 0.8.5", @@ -12536,18 +12654,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.42" +version = "0.8.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2578b716f8a7a858b7f02d5bd870c14bf4ddbbcf3a4c05414ba6503640505e3" +checksum = "efbb2a062be311f2ba113ce66f697a4dc589f85e78a4aea276200804cea0ed87" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.42" +version = "0.8.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6cc098ea4d3bd6246687de65af3f920c430e236bee1e3bf2e441463f08a02f" +checksum = "0e8bc7269b54418e7aeeef514aa68f8690b8c0489a06b0136e5f57c4c5ccab89" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 54f0c4e1ef..706e25df17 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -120,68 +120,68 @@ version = "0.1.0" edition = "2021" [workspace.dependencies] -solana-banks-client = { version = "2.3" } -solana-banks-interface = { version = "2.3" } -solana-program = "2.3" -solana-pubkey = "2.4.0" -solana-sdk = "2.3" -solana-cpi = "2.2" -solana-client = "2.3" -solana-cli-output = "2.3" -solana-transaction-status = "2.3" -solana-account-decoder = "2.3" -solana-account-decoder-client-types = "2.3" -solana-transaction-status-client-types = "2.3" -solana-rpc = "2.3" -solana-rpc-client-api = "2.3" -solana-transaction-context = "2.3" -solana-frozen-abi = "2.3" -solana-frozen-abi-macro = "2.3" -solana-msg = { version = "2.2" } -solana-message = "2.2" -solana-zk-token-sdk = "2.3" -solana-logger = "2.3" +solana-banks-client = { version = "3.1" } +solana-banks-interface = { version = "3.1" } +solana-program = "3.0" +solana-pubkey = "3.0" +solana-sdk = "3.0" +solana-cpi = "3.0" +solana-client = "3.1" +solana-cli-output = "3.1" +solana-transaction-status = "3.1" +solana-account-decoder = "3.1" +solana-account-decoder-client-types = "3.1" +solana-transaction-status-client-types = "3.1" +solana-rpc = "3.1" +solana-rpc-client-api = "3.1" +solana-transaction-context = "3.1" +solana-frozen-abi = "3.2" +solana-frozen-abi-macro = "3.2" +solana-msg = { version = "3.1" } +solana-message = "3.0" +solana-zk-token-sdk = "3.1" +solana-logger = "3.0" solana-bn254 = "3.2.1" -solana-sysvar = { version = "2.2" } -solana-rent = { version = "2.2" } -solana-program-error = { version = "2.2" } -solana-account-info = { version = "2.2" } -solana-transaction = { version = "2.2" } -solana-transaction-error = { version = "2.2" } -solana-hash = { version = "2.3" } -solana-clock = { version = "2.2" } -solana-signature = { version = "2.3" } -solana-loader-v3-interface = { version = "5.0" } -solana-commitment-config = { version = "2.2" } -solana-account = { version = "2.2" } -solana-epoch-info = { version = "2.2" } -solana-keypair = { version = "2.2" } -solana-compute-budget-interface = { version = "2.2" } -solana-signer = { version = "2.2" } -solana-instruction = "2.3" -solana-rpc-client = "2.3" -solana-compute-budget = { version = "2.3" } +solana-sysvar = { version = "3.1" } +solana-rent = { version = "3.0" } +solana-program-error = { version = "3.0" } +solana-account-info = { version = "3.1" } +solana-transaction = { version = "3.0" } +solana-transaction-error = { version = "3.0" } +solana-hash = { version = "3.0" } +solana-clock = { version = "3.0" } +solana-signature = { version = "3.1" } +solana-loader-v3-interface = { version = "6.0" } +solana-commitment-config = { version = "3.1" } +solana-account = { version = "3.2" } +solana-epoch-info = { version = "3.1" } +solana-keypair = { version = "3.1" } +solana-compute-budget-interface = { version = "3.0" } +solana-signer = { version = "3.0" } +solana-instruction = "3.0" +solana-rpc-client = "3.1" +solana-compute-budget = { version = "3.1" } -solana-system-interface = { version = "1" } -solana-security-txt = "1.1.1" -spl-token = "7.0.0" -spl-token-2022 = { version = "7.0.0", features = ["no-entrypoint"] } -spl-token-2022-interface = "1.0.0" -spl-pod = "0.5.1" +solana-system-interface = { version = "2.0" } +solana-security-txt = "1.1.2" +spl-token = "9.0" +spl-token-2022 = { version = "10.0", features = ["no-entrypoint"] } +spl-token-2022-interface = "2.0" +spl-pod = "0.7" pinocchio = { version = "0.9" } pinocchio-pubkey = { version = "0.3.0" } pinocchio-system = { version = "0.3.0" } bs58 = "^0.5.1" sha2 = "0.10" hex = "0.4" -litesvm = "0.7" +litesvm = "0.10" # Anchor -anchor-lang = { version = "0.31.1" } -anchor-spl = { version = "0.31.1" } -light-anchor-spl = { version = "0.31.1", features = ["memo"] } +anchor-lang = { version = "1.0.0-rc.5" } +anchor-spl = { version = "1.0.0-rc.5" } +light-anchor-spl = { path = "external/anchor/spl", features = ["memo"] } -# Anchor compatibility -borsh = { version = "0.10.4", default-features = false } +# Borsh (anchor 1.0 uses borsh 1.x) +borsh = { version = "1.5", default-features = false, features = ["derive"] } # Serialization serde = { version = "1.0", features = ["derive"] } diff --git a/anchor-programs/system/src/lib.rs b/anchor-programs/system/src/lib.rs index 0d196ffc8a..c2d025523e 100644 --- a/anchor-programs/system/src/lib.rs +++ b/anchor-programs/system/src/lib.rs @@ -55,7 +55,7 @@ pub mod light_system_program { // /// practice. // #[cfg(feature = "idl-build")] // pub fn stub_idl_build<'info>( - // _ctx: Context<'_, '_, '_, 'info, InvokeInstruction<'info>>, + // _ctx: Context<'info, InvokeInstruction<'info>>, // _inputs1: InstructionDataInvoke, // _inputs2: InstructionDataInvokeCpi, // _inputs3: PublicTransactionEvent, @@ -82,7 +82,7 @@ fn test_borsh_equivalence() { inputs: struct_a.clone(), }; - let struct_a_bytes: Vec = struct_a.try_to_vec().unwrap(); - let struct_b_bytes: Vec = struct_b.try_to_vec().unwrap(); + let struct_a_bytes: Vec = borsh::to_vec(&struct_a).unwrap(); + let struct_b_bytes: Vec = borsh::to_vec(&struct_b).unwrap(); assert_eq!(struct_a_bytes, struct_b_bytes); } diff --git a/external/anchor b/external/anchor new file mode 160000 index 0000000000..eb2e1dad59 --- /dev/null +++ b/external/anchor @@ -0,0 +1 @@ +Subproject commit eb2e1dad59060e7a3624079698fcb216faabc616 diff --git a/forester-utils/Cargo.toml b/forester-utils/Cargo.toml index b03aa100c3..5c3f53f564 100644 --- a/forester-utils/Cargo.toml +++ b/forester-utils/Cargo.toml @@ -35,6 +35,7 @@ borsh = { workspace = true } solana-instruction = { workspace = true } solana-pubkey = { workspace = true } solana-sdk = { workspace = true } +solana-commitment-config = { workspace = true } anchor-lang = { workspace = true } tokio = { workspace = true } diff --git a/forester-utils/src/rpc_pool.rs b/forester-utils/src/rpc_pool.rs index 4cd4702ac0..a2ee7ac54d 100644 --- a/forester-utils/src/rpc_pool.rs +++ b/forester-utils/src/rpc_pool.rs @@ -10,7 +10,7 @@ use std::{ use async_trait::async_trait; use bb8::{Pool, PooledConnection}; use light_client::rpc::{LightClientConfig, Rpc, RpcError}; -use solana_sdk::commitment_config::CommitmentConfig; +use solana_commitment_config::CommitmentConfig; use thiserror::Error; use tokio::time::sleep; use tracing::{error, info, trace, warn}; diff --git a/forester/Cargo.toml b/forester/Cargo.toml index 32d1df4e0d..5911998aef 100644 --- a/forester/Cargo.toml +++ b/forester/Cargo.toml @@ -9,6 +9,7 @@ anchor-lang = { workspace = true } clap = { version = "4.5.53", features = ["derive", "env"] } solana-sdk = { workspace = true } solana-commitment-config = { workspace = true } +solana-compute-budget-interface = { workspace = true } solana-client = { workspace = true } solana-account-decoder = { workspace = true } solana-program = { workspace = true } diff --git a/forester/src/compressible/subscriber.rs b/forester/src/compressible/subscriber.rs index cf10ccead4..3da7b8a12e 100644 --- a/forester/src/compressible/subscriber.rs +++ b/forester/src/compressible/subscriber.rs @@ -8,8 +8,9 @@ use solana_client::{ rpc_config::{RpcAccountInfoConfig, RpcProgramAccountsConfig}, rpc_response::{Response as RpcResponse, RpcKeyedAccount}, }; +use solana_commitment_config::CommitmentConfig; use solana_rpc_client_api::filter::{Memcmp, MemcmpEncodedBytes, RpcFilterType}; -use solana_sdk::{commitment_config::CommitmentConfig, pubkey::Pubkey}; +use solana_sdk::pubkey::Pubkey; use tokio::sync::broadcast; use tracing::{debug, error, info, warn}; diff --git a/forester/src/epoch_manager.rs b/forester/src/epoch_manager.rs index f52efa1b13..2dbd3c848b 100644 --- a/forester/src/epoch_manager.rs +++ b/forester/src/epoch_manager.rs @@ -34,7 +34,7 @@ use solana_program::{ instruction::InstructionError, native_token::LAMPORTS_PER_SOL, pubkey::Pubkey, }; use solana_sdk::{ - address_lookup_table::AddressLookupTableAccount, + message::AddressLookupTableAccount, signature::{Keypair, Signer}, transaction::TransactionError, }; @@ -1181,7 +1181,7 @@ impl EpochManager { let rpc = LightClient::new(LightClientConfig { url: self.config.external_services.rpc_url.to_string(), photon_url: self.config.external_services.indexer_url.clone(), - commitment_config: Some(solana_sdk::commitment_config::CommitmentConfig::confirmed()), + commitment_config: Some(solana_commitment_config::CommitmentConfig::confirmed()), fetch_active_tree: false, }) .await @@ -1272,7 +1272,7 @@ impl EpochManager { let mut rpc = LightClient::new(LightClientConfig { url: self.config.external_services.rpc_url.to_string(), photon_url: self.config.external_services.indexer_url.clone(), - commitment_config: Some(solana_sdk::commitment_config::CommitmentConfig::processed()), + commitment_config: Some(solana_commitment_config::CommitmentConfig::processed()), fetch_active_tree: false, }) .await?; @@ -3789,8 +3789,7 @@ impl EpochManager { match &proof.instruction { BatchInstruction::Append(data) => { for d in data { - let serialized = d - .try_to_vec() + let serialized = borsh::to_vec(&d) .with_context(|| "Failed to serialize batch append payload")?; instructions.push(create_batch_append_instruction( authority, @@ -3804,8 +3803,7 @@ impl EpochManager { } BatchInstruction::Nullify(data) => { for d in data { - let serialized = d - .try_to_vec() + let serialized = borsh::to_vec(&d) .with_context(|| "Failed to serialize batch nullify payload")?; instructions.push(create_batch_nullify_instruction( authority, @@ -3818,7 +3816,7 @@ impl EpochManager { } BatchInstruction::AddressAppend(data) => { for d in data { - let serialized = d.try_to_vec().with_context(|| { + let serialized = borsh::to_vec(&d).with_context(|| { "Failed to serialize batch address append payload" })?; instructions.push(create_batch_update_address_tree_instruction( @@ -3982,7 +3980,7 @@ impl EpochManager { let mut rpc = LightClient::new(LightClientConfig { url: self.config.external_services.rpc_url.to_string(), photon_url: self.config.external_services.indexer_url.clone(), - commitment_config: Some(solana_sdk::commitment_config::CommitmentConfig::processed()), + commitment_config: Some(solana_commitment_config::CommitmentConfig::processed()), fetch_active_tree: false, }) .await?; diff --git a/forester/src/forester_status.rs b/forester/src/forester_status.rs index 80c4539075..9c68439d41 100644 --- a/forester/src/forester_status.rs +++ b/forester/src/forester_status.rs @@ -21,11 +21,9 @@ use light_compressed_account::TreeType; use light_hasher::Poseidon; use light_registry::{protocol_config::state::ProtocolConfigPda, EpochPda, ForesterEpochPda}; use serde::{Deserialize, Serialize}; +use solana_commitment_config::CommitmentConfig; use solana_program::{clock::Slot, pubkey::Pubkey}; -use solana_sdk::{ - account::{Account, ReadableAccount}, - commitment_config::CommitmentConfig, -}; +use solana_sdk::account::{Account, ReadableAccount}; use tracing::{debug, warn}; use crate::{ diff --git a/forester/src/health_check.rs b/forester/src/health_check.rs index 8338861e0d..5e08fcdeaf 100644 --- a/forester/src/health_check.rs +++ b/forester/src/health_check.rs @@ -43,7 +43,7 @@ pub async fn run_health_check(args: &HealthArgs) -> Result Some( SolanaRpcPoolBuilder::::default() .url(rpc_url.clone()) - .commitment(solana_sdk::commitment_config::CommitmentConfig::confirmed()) + .commitment(solana_commitment_config::CommitmentConfig::confirmed()) .max_size(1) .connection_timeout_secs(10) .idle_timeout_secs(60) diff --git a/forester/src/lib.rs b/forester/src/lib.rs index aebb2d4e9f..6ca1db8661 100644 --- a/forester/src/lib.rs +++ b/forester/src/lib.rs @@ -36,7 +36,7 @@ use light_client::{ rpc::{LightClient, LightClientConfig, Rpc}, }; use light_compressed_account::TreeType; -use solana_sdk::commitment_config::CommitmentConfig; +use solana_commitment_config::CommitmentConfig; use tokio::sync::{mpsc, oneshot, Mutex}; use tracing::debug; diff --git a/forester/src/processor/v2/common.rs b/forester/src/processor/v2/common.rs index 191160bea4..6542e9350a 100644 --- a/forester/src/processor/v2/common.rs +++ b/forester/src/processor/v2/common.rs @@ -13,7 +13,7 @@ use light_registry::{ protocol_config::state::EpochState, utils::get_forester_epoch_pda_from_authority, }; use solana_sdk::{ - address_lookup_table::AddressLookupTableAccount, instruction::Instruction, pubkey::Pubkey, + instruction::Instruction, message::AddressLookupTableAccount, pubkey::Pubkey, signature::Keypair, signer::Signer, }; use tokio::sync::Mutex; diff --git a/forester/src/processor/v2/tx_sender.rs b/forester/src/processor/v2/tx_sender.rs index 5b61559b17..9d0ad4a5bb 100644 --- a/forester/src/processor/v2/tx_sender.rs +++ b/forester/src/processor/v2/tx_sender.rs @@ -266,7 +266,7 @@ impl TxSender { sender_context.merkle_tree, sender_context.output_queue, sender_context.epoch, - data.try_to_vec()?, + borsh::to_vec(&data)?, )) }) .collect::>>()?; @@ -282,7 +282,7 @@ impl TxSender { sender_context.derivation, sender_context.merkle_tree, sender_context.epoch, - data.try_to_vec()?, + borsh::to_vec(&data)?, )) }) .collect::>>()?; @@ -297,7 +297,7 @@ impl TxSender { sender_context.derivation, sender_context.merkle_tree, sender_context.epoch, - data.try_to_vec()?, + borsh::to_vec(&data)?, )) }) .collect::>>()?; diff --git a/forester/src/pubsub_client.rs b/forester/src/pubsub_client.rs index 2c6605a37c..60a3fb0d2a 100644 --- a/forester/src/pubsub_client.rs +++ b/forester/src/pubsub_client.rs @@ -6,7 +6,8 @@ use solana_client::{ nonblocking::pubsub_client::PubsubClient, rpc_config::{RpcAccountInfoConfig, RpcProgramAccountsConfig}, }; -use solana_sdk::{commitment_config::CommitmentConfig, pubkey::Pubkey}; +use solana_commitment_config::CommitmentConfig; +use solana_sdk::pubkey::Pubkey; use tokio::{runtime::Builder, sync::mpsc}; use tracing::{debug, error}; diff --git a/forester/src/rollover/operations.rs b/forester/src/rollover/operations.rs index 1c5f456874..88b8188f96 100644 --- a/forester/src/rollover/operations.rs +++ b/forester/src/rollover/operations.rs @@ -24,9 +24,10 @@ use light_registry::{ }, protocol_config::state::ProtocolConfig, }; +use solana_compute_budget_interface::ComputeBudgetInstruction; use solana_sdk::{ - compute_budget::ComputeBudgetInstruction, instruction::Instruction, pubkey::Pubkey, - signature::Keypair, signer::Signer, transaction::Transaction, + instruction::Instruction, pubkey::Pubkey, signature::Keypair, signer::Signer, + transaction::Transaction, }; use tracing::{trace, warn}; diff --git a/forester/src/smart_transaction.rs b/forester/src/smart_transaction.rs index 38df9f70be..4830cba430 100644 --- a/forester/src/smart_transaction.rs +++ b/forester/src/smart_transaction.rs @@ -4,12 +4,11 @@ use std::{collections::HashSet, time::Duration}; use light_client::rpc::{Rpc, RpcError}; use solana_client::rpc_config::RpcSendTransactionConfig; +use solana_compute_budget_interface::ComputeBudgetInstruction; use solana_sdk::{ - address_lookup_table::AddressLookupTableAccount, - compute_budget::ComputeBudgetInstruction, hash::Hash, instruction::Instruction, - message::{v0, VersionedMessage}, + message::{v0, AddressLookupTableAccount, VersionedMessage}, pubkey::Pubkey, signature::{Signature, Signer}, signer::keypair::Keypair, diff --git a/forester/tests/e2e_test.rs b/forester/tests/e2e_test.rs index 1727ed108b..035602d2a4 100644 --- a/forester/tests/e2e_test.rs +++ b/forester/tests/e2e_test.rs @@ -1013,7 +1013,7 @@ async fn mint_to( 0, ); let instructions = vec![ - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit( + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( COMPUTE_BUDGET_LIMIT, ), mint_to_ix, @@ -1123,7 +1123,7 @@ async fn compressed_token_transfer( .unwrap(); let instructions = vec![ - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit( + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( COMPUTE_BUDGET_LIMIT, ), instruction, @@ -1248,7 +1248,7 @@ async fn transfer( ); let instructions = vec![ - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit( + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( COMPUTE_BUDGET_LIMIT, ), instruction, @@ -1319,7 +1319,7 @@ async fn compress( true, ); let instructions = vec![ - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit( + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( COMPUTE_BUDGET_LIMIT, ), instruction, @@ -1399,7 +1399,7 @@ async fn create_v1_address( ); let instructions = vec![ - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit( + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( COMPUTE_BUDGET_LIMIT, ), instruction, @@ -1490,7 +1490,7 @@ async fn create_v2_addresses( payer.pubkey(), [ light_system_program::instruction::InvokeCpiWithReadOnly::DISCRIMINATOR.to_vec(), - ix_data.try_to_vec()?, + borsh::to_vec(&ix_data)?, ] .concat(), remaining_accounts_metas, @@ -1498,7 +1498,7 @@ async fn create_v2_addresses( ); let instructions = vec![ - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit( + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( COMPUTE_BUDGET_LIMIT, ), instruction, diff --git a/forester/tests/legacy/address_v2_test.rs b/forester/tests/legacy/address_v2_test.rs index c7ec9db781..1e48dfd1b1 100644 --- a/forester/tests/legacy/address_v2_test.rs +++ b/forester/tests/legacy/address_v2_test.rs @@ -85,12 +85,12 @@ async fn test_create_v2_address() { let (_, _, pre_root) = get_initial_merkle_tree_state(&mut rpc, &env.v2_address_trees[0]).await; - let batch_payer = Keypair::from_bytes(&[ + let batch_payer = Keypair::try_from(&[ 88, 117, 248, 40, 40, 5, 251, 124, 235, 221, 10, 212, 169, 203, 91, 203, 255, 67, 210, 150, 87, 182, 238, 155, 87, 24, 176, 252, 157, 119, 68, 81, 148, 156, 30, 0, 60, 63, 34, 247, 192, 120, 4, 170, 32, 149, 221, 144, 74, 244, 181, 142, 37, 197, 196, 136, 159, 196, 101, 21, 194, 56, 163, 1, - ]) + ].as_slice()) .unwrap(); ensure_sufficient_balance(&mut rpc, &batch_payer.pubkey(), LAMPORTS_PER_SOL * 100).await; @@ -305,7 +305,7 @@ async fn create_v2_addresses( let instruction = create_pda_instruction(create_ix_inputs); let instructions = vec![ - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit( + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( COMPUTE_BUDGET_LIMIT, ), instruction, @@ -390,7 +390,7 @@ async fn create_v2_addresses( payer.pubkey(), [ light_system_program::instruction::InvokeCpiWithReadOnly::DISCRIMINATOR.to_vec(), - ix_data.try_to_vec()?, + borsh::to_vec(&ix_data)?, ] .concat(), remaining_accounts, @@ -398,7 +398,7 @@ async fn create_v2_addresses( ); let instructions = vec![ - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit( + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( COMPUTE_BUDGET_LIMIT, ), instruction, diff --git a/forester/tests/legacy/batched_state_async_indexer_test.rs b/forester/tests/legacy/batched_state_async_indexer_test.rs index fe599a39a8..267183d719 100644 --- a/forester/tests/legacy/batched_state_async_indexer_test.rs +++ b/forester/tests/legacy/batched_state_async_indexer_test.rs @@ -129,19 +129,19 @@ async fn test_state_indexer_async_batched() { get_batch_size(&mut rpc, &env.v2_state_trees[0].merkle_tree).await ); - let batch_payer = Keypair::from_bytes(&[ + let batch_payer = Keypair::try_from(&[ 88, 117, 248, 40, 40, 5, 251, 124, 235, 221, 10, 212, 169, 203, 91, 203, 255, 67, 210, 150, 87, 182, 238, 155, 87, 24, 176, 252, 157, 119, 68, 81, 148, 156, 30, 0, 60, 63, 34, 247, 192, 120, 4, 170, 32, 149, 221, 144, 74, 244, 181, 142, 37, 197, 196, 136, 159, 196, 101, 21, 194, 56, 163, 1, - ]) + ].as_slice()) .unwrap(); - let legacy_payer = Keypair::from_bytes(&[ + let legacy_payer = Keypair::try_from(&[ 58, 94, 30, 2, 133, 249, 254, 202, 188, 51, 184, 201, 173, 158, 211, 81, 202, 46, 41, 227, 38, 227, 101, 115, 246, 157, 174, 33, 64, 96, 207, 87, 161, 151, 87, 233, 147, 93, 116, 35, 227, 168, 135, 146, 45, 183, 134, 2, 97, 130, 200, 207, 211, 117, 232, 198, 233, 80, 205, 75, 41, 148, 68, 97, - ]) + ].as_slice()) .unwrap(); println!("batch payer pubkey: {:?}", batch_payer.pubkey()); @@ -150,12 +150,12 @@ async fn test_state_indexer_async_batched() { ensure_sufficient_balance(&mut rpc, &legacy_payer.pubkey(), LAMPORTS_PER_SOL * 100).await; ensure_sufficient_balance(&mut rpc, &batch_payer.pubkey(), LAMPORTS_PER_SOL * 100).await; - let mint_keypair = Keypair::from_bytes(&[ + let mint_keypair = Keypair::try_from(&[ 87, 206, 67, 171, 178, 112, 231, 204, 169, 148, 206, 45, 217, 171, 233, 199, 226, 229, 142, 204, 52, 3, 40, 197, 103, 125, 199, 80, 17, 18, 42, 42, 72, 237, 17, 77, 168, 248, 87, 226, 202, 233, 163, 7, 148, 155, 201, 160, 255, 17, 124, 254, 98, 74, 111, 251, 24, 230, 93, 130, 105, 104, 119, 110, - ]) + ].as_slice()) .unwrap(); let mint_pubkey = create_mint_helper_with_keypair(&mut rpc, &batch_payer, &mint_keypair).await; @@ -653,7 +653,7 @@ async fn mint_to( 0, ); let instructions = vec![ - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit( + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( COMPUTE_BUDGET_LIMIT, ), mint_to_ix, @@ -782,7 +782,7 @@ async fn compressed_token_transfer( ); println!("transfer root_indices: {:?}", root_indices); let mut instructions = vec![ - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit( + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( COMPUTE_BUDGET_LIMIT, ), ]; @@ -926,7 +926,7 @@ async fn transfer( ); println!("transfer root_indices: {:?}", root_indices); let mut instructions = vec![ - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit( + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( COMPUTE_BUDGET_LIMIT, ), ]; @@ -969,7 +969,7 @@ async fn compress( true, ); let mut instructions = vec![ - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit( + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( COMPUTE_BUDGET_LIMIT, ), ]; @@ -1057,7 +1057,7 @@ async fn create_v1_address( ); println!("create address instruction: {:?}", instruction); let mut instructions = vec![ - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit( + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( COMPUTE_BUDGET_LIMIT, ), ]; diff --git a/forester/tests/test_batch_append_spent.rs b/forester/tests/test_batch_append_spent.rs index e53c2b64eb..8f377f71da 100644 --- a/forester/tests/test_batch_append_spent.rs +++ b/forester/tests/test_batch_append_spent.rs @@ -162,7 +162,7 @@ async fn test_batch_sequence() { .rpc .create_and_send_transaction( &[ - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit( + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( 1_000_000, ), instruction, @@ -253,7 +253,7 @@ async fn test_batch_sequence() { e2e_env.rpc .create_and_send_transaction( &[ - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit(1_000_000), + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit(1_000_000), instruction, ], &test_user.pubkey(), @@ -297,7 +297,7 @@ async fn test_batch_sequence() { .rpc .create_and_send_transaction( &[ - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit( + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( 1_000_000, ), instruction, diff --git a/forester/tests/test_compressible_ctoken.rs b/forester/tests/test_compressible_ctoken.rs index 569278286f..31118ea437 100644 --- a/forester/tests/test_compressible_ctoken.rs +++ b/forester/tests/test_compressible_ctoken.rs @@ -272,7 +272,7 @@ async fn register_forester( let rpc_pool = Arc::new( SolanaRpcPoolBuilder::::new() .url("http://localhost:8899".to_string()) - .commitment(solana_sdk::commitment_config::CommitmentConfig::confirmed()) + .commitment(solana_commitment_config::CommitmentConfig::confirmed()) .build() .await .expect("Failed to create RPC pool"), diff --git a/forester/tests/test_compressible_mint.rs b/forester/tests/test_compressible_mint.rs index 248db07251..6507959533 100644 --- a/forester/tests/test_compressible_mint.rs +++ b/forester/tests/test_compressible_mint.rs @@ -377,7 +377,7 @@ async fn test_compressible_mint_compression() { SolanaRpcPoolBuilder::::new() .url("http://localhost:8899".to_string()) .photon_url(Some("http://127.0.0.1:8784".to_string())) - .commitment(solana_sdk::commitment_config::CommitmentConfig::confirmed()) + .commitment(solana_commitment_config::CommitmentConfig::confirmed()) .build() .await .expect("Failed to create RPC pool"), @@ -580,7 +580,7 @@ async fn test_compressible_mint_subscription() { SolanaRpcPoolBuilder::::new() .url("http://localhost:8899".to_string()) .photon_url(Some("http://127.0.0.1:8784".to_string())) - .commitment(solana_sdk::commitment_config::CommitmentConfig::confirmed()) + .commitment(solana_commitment_config::CommitmentConfig::confirmed()) .build() .await .expect("Failed to create RPC pool"), diff --git a/forester/tests/test_compressible_pda.rs b/forester/tests/test_compressible_pda.rs index 97783d537c..ceb1ba8057 100644 --- a/forester/tests/test_compressible_pda.rs +++ b/forester/tests/test_compressible_pda.rs @@ -220,7 +220,7 @@ async fn register_forester( SolanaRpcPoolBuilder::::new() .url("http://localhost:8899".to_string()) .photon_url(Some("http://127.0.0.1:8784".to_string())) - .commitment(solana_sdk::commitment_config::CommitmentConfig::confirmed()) + .commitment(solana_commitment_config::CommitmentConfig::confirmed()) .build() .await .expect("Failed to create RPC pool"), @@ -341,7 +341,7 @@ async fn test_compressible_pda_bootstrap() { compression_config: config_pda, pda_rent_sponsor: csdk_anchor_full_derived_test::program_rent_sponsor(), d8_pda_only_record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D8PdaOnly { @@ -533,7 +533,7 @@ async fn test_compressible_pda_compression() { compression_config: config_pda, pda_rent_sponsor: csdk_anchor_full_derived_test::program_rent_sponsor(), d8_pda_only_record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D8PdaOnly { @@ -798,7 +798,7 @@ async fn test_compressible_pda_subscription() { compression_config: config_pda, pda_rent_sponsor: csdk_anchor_full_derived_test::program_rent_sponsor(), d8_pda_only_record: record_pda_1, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D8PdaOnly { @@ -861,7 +861,7 @@ async fn test_compressible_pda_subscription() { compression_config: config_pda, pda_rent_sponsor: csdk_anchor_full_derived_test::program_rent_sponsor(), d8_pda_only_record: record_pda_2, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data_2 = csdk_anchor_full_derived_test::instruction::D8PdaOnly { diff --git a/forester/tests/test_indexer_interface.rs b/forester/tests/test_indexer_interface.rs index 6916cf0a3b..7c6ab8d010 100644 --- a/forester/tests/test_indexer_interface.rs +++ b/forester/tests/test_indexer_interface.rs @@ -212,7 +212,7 @@ async fn test_indexer_interface_scenarios() { payer.pubkey(), [ light_system_program::instruction::InvokeCpiWithReadOnly::DISCRIMINATOR.to_vec(), - ix_data.try_to_vec().unwrap(), + borsh::to_vec(&ix_data).unwrap(), ] .concat(), remaining_accounts_metas, @@ -220,7 +220,9 @@ async fn test_indexer_interface_scenarios() { ); let instructions = vec![ - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit(1_000_000), + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( + 1_000_000, + ), instruction, ]; let address_sig = rpc diff --git a/js/compressed-token/CHANGELOG.md b/js/compressed-token/CHANGELOG.md index e6ea6125b9..9038c981af 100644 --- a/js/compressed-token/CHANGELOG.md +++ b/js/compressed-token/CHANGELOG.md @@ -5,7 +5,7 @@ - **Delegate approval and revocation** for SPL Token, Token-2022, and light-token, aligned with existing interface helpers: - **Actions:** `approveInterface`, `revokeInterface`. - **Instruction builders:** `createApproveInterfaceInstructions`, `createRevokeInterfaceInstructions` — each inner array is one transaction’s instructions (same batching style as other interface instruction builders). - - **Program-level helpers:** `createLightTokenApproveInstruction`, `createLightTokenRevokeInstruction` + - **Program-level helpers:** `createLightTokenApproveInstruction`, `createLightTokenRevokeInstruction` - **Shared options:** approve/revoke accept optional `InterfaceOptions` (same type as `transferInterface`), including `splInterfaceInfos` when you need to supply SPL interface pool accounts explicitly. ### Changed diff --git a/js/stateless.js/src/utils/instruction.ts b/js/stateless.js/src/utils/instruction.ts index 02b1249e81..9293945e34 100644 --- a/js/stateless.js/src/utils/instruction.ts +++ b/js/stateless.js/src/utils/instruction.ts @@ -2,8 +2,7 @@ import { AccountMeta, PublicKey, SystemProgram } from '@solana/web3.js'; import { defaultStaticAccountsStruct, featureFlags } from '../constants'; import { LightSystemProgram } from '../programs'; -const toStrictBool = (value: unknown): boolean => - value === true || value === 1; +const toStrictBool = (value: unknown): boolean => value === true || value === 1; export class PackedAccounts { private preAccounts: AccountMeta[] = []; diff --git a/program-libs/compressed-account/src/compressed_account.rs b/program-libs/compressed-account/src/compressed_account.rs index 01a81292e8..fbd23b5afa 100644 --- a/program-libs/compressed-account/src/compressed_account.rs +++ b/program-libs/compressed-account/src/compressed_account.rs @@ -579,7 +579,7 @@ mod tests { address: Some(address), data: Some(data.clone()), }; - let bytes: Vec = compressed_account.try_to_vec().unwrap(); + let bytes: Vec = borsh::to_vec(&compressed_account).unwrap(); let merkle_tree_pubkey = Pubkey::new_from_array([ 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -773,7 +773,7 @@ mod tests { let hash = account .hash(&merkle_tree_pubkey, &leaf_index, false) .unwrap(); - let bytes: Vec = account.try_to_vec().unwrap(); + let bytes: Vec = borsh::to_vec(&account).unwrap(); let (z_account, _) = ZCompressedAccount::zero_copy_at(bytes.as_slice()).unwrap(); let z_hash = z_account .hash(&merkle_tree_pubkey.to_bytes(), &leaf_index, false) diff --git a/program-libs/compressed-account/src/instruction_data/invoke_cpi.rs b/program-libs/compressed-account/src/instruction_data/invoke_cpi.rs index f0b9c4fa6a..a94d5c7968 100644 --- a/program-libs/compressed-account/src/instruction_data/invoke_cpi.rs +++ b/program-libs/compressed-account/src/instruction_data/invoke_cpi.rs @@ -41,9 +41,8 @@ impl LightInstructionData for InstructionDataInvokeCpi { #[cfg(not(feature = "anchor"))] use borsh::BorshSerialize; - let inputs = self - .try_to_vec() - .map_err(|_| crate::CompressedAccountError::InvalidArgument)?; + let inputs = + borsh::to_vec(&self).map_err(|_| crate::CompressedAccountError::InvalidArgument)?; let mut data = Vec::with_capacity(12 + inputs.len()); data.extend_from_slice(self.discriminator()); data.extend_from_slice(&(inputs.len() as u32).to_le_bytes()); diff --git a/program-libs/compressed-account/src/instruction_data/traits.rs b/program-libs/compressed-account/src/instruction_data/traits.rs index ab6e718554..4866375633 100644 --- a/program-libs/compressed-account/src/instruction_data/traits.rs +++ b/program-libs/compressed-account/src/instruction_data/traits.rs @@ -25,8 +25,7 @@ pub trait LightInstructionData: InstructionDiscriminator + AnchorSerialize { #[profile] #[inline(never)] fn data(&self) -> Result, CompressedAccountError> { - let inputs = AnchorSerialize::try_to_vec(self) - .map_err(|_| CompressedAccountError::InvalidArgument)?; + let inputs = borsh::to_vec(self).map_err(|_| CompressedAccountError::InvalidArgument)?; let mut data = crate::Vec::with_capacity(8 + inputs.len()); data.extend_from_slice(self.discriminator()); diff --git a/program-libs/compressed-account/src/instruction_data/with_readonly.rs b/program-libs/compressed-account/src/instruction_data/with_readonly.rs index d93524b19e..291794e5b0 100644 --- a/program-libs/compressed-account/src/instruction_data/with_readonly.rs +++ b/program-libs/compressed-account/src/instruction_data/with_readonly.rs @@ -688,7 +688,7 @@ mod test { root_index: 8, }], }; - let bytes = borsh_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&borsh_struct).unwrap(); let (zero_copy, _) = InstructionDataInvokeCpiWithReadOnly::zero_copy_at(&bytes).unwrap(); diff --git a/program-libs/compressed-account/src/lib.rs b/program-libs/compressed-account/src/lib.rs index 5c0768f2db..c66ef7cd49 100644 --- a/program-libs/compressed-account/src/lib.rs +++ b/program-libs/compressed-account/src/lib.rs @@ -151,15 +151,15 @@ pub const ADDRESS_QUEUE_TYPE_V2: u64 = 4; pub const OUTPUT_STATE_QUEUE_TYPE_V2: u64 = 5; #[cfg_attr( - all(feature = "std", feature = "anchor"), - derive(anchor_lang::AnchorDeserialize, anchor_lang::AnchorSerialize) -)] -#[cfg_attr( - not(feature = "anchor"), + any(feature = "std", not(feature = "anchor")), derive(borsh::BorshDeserialize, borsh::BorshSerialize) )] #[derive(Debug, PartialEq, Clone, Copy)] #[repr(u64)] +#[cfg_attr( + any(feature = "std", not(feature = "anchor")), + borsh(use_discriminant = false) +)] pub enum QueueType { NullifierV1 = NULLIFIER_QUEUE_TYPE_V1, AddressV1 = ADDRESS_QUEUE_TYPE_V1, @@ -187,15 +187,15 @@ pub const STATE_MERKLE_TREE_TYPE_V2: u64 = 3; pub const ADDRESS_MERKLE_TREE_TYPE_V2: u64 = 4; #[cfg_attr( - all(feature = "std", feature = "anchor"), - derive(anchor_lang::AnchorDeserialize, anchor_lang::AnchorSerialize) -)] -#[cfg_attr( - not(feature = "anchor"), + any(feature = "std", not(feature = "anchor")), derive(borsh::BorshDeserialize, borsh::BorshSerialize) )] #[derive(Debug, Ord, PartialEq, PartialOrd, Eq, Clone, Copy)] #[repr(u64)] +#[cfg_attr( + any(feature = "std", not(feature = "anchor")), + borsh(use_discriminant = false) +)] pub enum TreeType { StateV1 = STATE_MERKLE_TREE_TYPE_V1, AddressV1 = ADDRESS_MERKLE_TREE_TYPE_V1, diff --git a/program-libs/compressed-account/tests/zero_copy_set.rs b/program-libs/compressed-account/tests/zero_copy_set.rs index b852a7ede1..d3a5380d70 100644 --- a/program-libs/compressed-account/tests/zero_copy_set.rs +++ b/program-libs/compressed-account/tests/zero_copy_set.rs @@ -73,7 +73,7 @@ fn test_output_account_set_success_with_address() { merkle_tree_index: 0, }; - let mut data = output_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&output_account).unwrap(); let (mut z_output, _) = OutputCompressedAccountWithPackedContext::zero_copy_at_mut(&mut data).unwrap(); @@ -104,7 +104,7 @@ fn test_output_account_set_success_without_address() { merkle_tree_index: 0, }; - let mut data = output_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&output_account).unwrap(); let (mut z_output, _) = OutputCompressedAccountWithPackedContext::zero_copy_at_mut(&mut data).unwrap(); @@ -128,7 +128,7 @@ fn test_output_account_set_error_missing_address() { merkle_tree_index: 0, }; - let mut data = output_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&output_account).unwrap(); let (mut z_output, _) = OutputCompressedAccountWithPackedContext::zero_copy_at_mut(&mut data).unwrap(); @@ -158,7 +158,7 @@ fn test_output_account_set_error_unexpected_address() { merkle_tree_index: 0, }; - let mut data = output_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&output_account).unwrap(); let (mut z_output, _) = OutputCompressedAccountWithPackedContext::zero_copy_at_mut(&mut data).unwrap(); @@ -188,7 +188,7 @@ fn test_output_account_set_error_data_not_initialized() { merkle_tree_index: 0, }; - let mut data = output_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&output_account).unwrap(); let (mut z_output, _) = OutputCompressedAccountWithPackedContext::zero_copy_at_mut(&mut data).unwrap(); @@ -218,7 +218,7 @@ fn test_output_account_set_edge_case_zero_lamports() { merkle_tree_index: 0, }; - let mut data = output_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&output_account).unwrap(); let (mut z_output, _) = OutputCompressedAccountWithPackedContext::zero_copy_at_mut(&mut data).unwrap(); @@ -245,7 +245,7 @@ fn test_output_account_set_edge_case_max_lamports() { merkle_tree_index: 0, }; - let mut data = output_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&output_account).unwrap(); let (mut z_output, _) = OutputCompressedAccountWithPackedContext::zero_copy_at_mut(&mut data).unwrap(); @@ -272,7 +272,7 @@ fn test_output_account_set_edge_case_zero_values() { merkle_tree_index: 0, }; - let mut data = output_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&output_account).unwrap(); let (mut z_output, _) = OutputCompressedAccountWithPackedContext::zero_copy_at_mut(&mut data).unwrap(); @@ -307,7 +307,7 @@ fn test_output_account_set_edge_case_max_values() { merkle_tree_index: 0, }; - let mut data = output_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&output_account).unwrap(); let (mut z_output, _) = OutputCompressedAccountWithPackedContext::zero_copy_at_mut(&mut data).unwrap(); @@ -350,7 +350,7 @@ fn test_in_account_set_success_with_address() { address: Some([0u8; 32]), }; - let mut data = in_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&in_account).unwrap(); let (mut z_in, _) = InAccount::zero_copy_at_mut(&mut data).unwrap(); // Execute @@ -407,7 +407,7 @@ fn test_in_account_set_success_without_address() { address: None, }; - let mut data = in_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&in_account).unwrap(); let (mut z_in, _) = InAccount::zero_copy_at_mut(&mut data).unwrap(); // Execute @@ -443,7 +443,7 @@ fn test_in_account_set_error_missing_address() { address: Some([0u8; 32]), }; - let mut data = in_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&in_account).unwrap(); let (mut z_in, _) = InAccount::zero_copy_at_mut(&mut data).unwrap(); // Execute with None address when address is expected @@ -482,7 +482,7 @@ fn test_in_account_set_error_unexpected_address() { address: None, }; - let mut data = in_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&in_account).unwrap(); let (mut z_in, _) = InAccount::zero_copy_at_mut(&mut data).unwrap(); // Execute with address when not expected @@ -526,7 +526,7 @@ fn test_new_address_set_success_with_assigned_account() { assigned_account_index: 0, }; - let mut data = new_address.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&new_address).unwrap(); let (mut z_new_address, _) = NewAddressParamsAssignedPacked::zero_copy_at_mut(&mut data).unwrap(); @@ -554,7 +554,7 @@ fn test_new_address_set_success_without_assigned_account() { assigned_account_index: 0, }; - let mut data = new_address.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&new_address).unwrap(); let (mut z_new_address, _) = NewAddressParamsAssignedPacked::zero_copy_at_mut(&mut data).unwrap(); @@ -575,7 +575,7 @@ fn test_new_address_set_invariant_address_queue_account_index() { // Setup let new_address = NewAddressParamsAssignedPacked::default(); - let mut data = new_address.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&new_address).unwrap(); let (mut z_new_address, _) = NewAddressParamsAssignedPacked::zero_copy_at_mut(&mut data).unwrap(); @@ -608,7 +608,7 @@ fn test_in_account_set_z_success_with_address() { address: Some([0u8; 32]), }; - let mut data = in_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&in_account).unwrap(); let (mut z_in, _) = InAccount::zero_copy_at_mut(&mut data).unwrap(); // Execute - Create the zero-copy merkle context @@ -618,7 +618,7 @@ fn test_in_account_set_z_success_with_address() { leaf_index: 100, prove_by_index: true, }; - let merkle_context_bytes = merkle_context.try_to_vec().unwrap(); + let merkle_context_bytes = borsh::to_vec(&merkle_context).unwrap(); let (z_merkle_context, _) = PackedMerkleContext::zero_copy_at(&merkle_context_bytes).unwrap(); let address = [7u8; 32]; @@ -665,7 +665,7 @@ fn test_in_account_set_z_success_without_address() { address: None, }; - let mut data = in_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&in_account).unwrap(); let (mut z_in, _) = InAccount::zero_copy_at_mut(&mut data).unwrap(); // Execute - Create the zero-copy merkle context @@ -675,7 +675,7 @@ fn test_in_account_set_z_success_without_address() { leaf_index: 100, prove_by_index: true, }; - let merkle_context_bytes = merkle_context.try_to_vec().unwrap(); + let merkle_context_bytes = borsh::to_vec(&merkle_context).unwrap(); let (z_merkle_context, _) = PackedMerkleContext::zero_copy_at(&merkle_context_bytes).unwrap(); let result = z_in.set_z( @@ -709,7 +709,7 @@ fn test_in_account_set_z_error_missing_address() { address: Some([0u8; 32]), }; - let mut data = in_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&in_account).unwrap(); let (mut z_in, _) = InAccount::zero_copy_at_mut(&mut data).unwrap(); // Create zero-copy merkle context @@ -719,7 +719,7 @@ fn test_in_account_set_z_error_missing_address() { leaf_index: 999, prove_by_index: false, }; - let ctx_data = merkle_ctx.try_to_vec().unwrap(); + let ctx_data = borsh::to_vec(&merkle_ctx).unwrap(); let (z_context, _) = PackedMerkleContext::zero_copy_at(&ctx_data).unwrap(); // Execute: call set_z() with None address (but InAccount has address slot) @@ -756,7 +756,7 @@ fn test_in_account_set_z_error_unexpected_address() { address: None, // No address slot }; - let mut data = in_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&in_account).unwrap(); let (mut z_in, _) = InAccount::zero_copy_at_mut(&mut data).unwrap(); // Create zero-copy merkle context @@ -766,7 +766,7 @@ fn test_in_account_set_z_error_unexpected_address() { leaf_index: 999, prove_by_index: false, }; - let ctx_data = merkle_ctx.try_to_vec().unwrap(); + let ctx_data = borsh::to_vec(&merkle_ctx).unwrap(); let (z_context, _) = PackedMerkleContext::zero_copy_at(&ctx_data).unwrap(); // Execute: call set_z() with Some(&[7u8; 32]) address (but InAccount has no address slot) @@ -804,7 +804,7 @@ fn test_in_account_set_z_edge_case_zero_lamports() { address: None, }; - let mut data = in_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&in_account).unwrap(); let (mut z_in, _) = InAccount::zero_copy_at_mut(&mut data).unwrap(); // Create zero-copy merkle context @@ -814,7 +814,7 @@ fn test_in_account_set_z_edge_case_zero_lamports() { leaf_index: 999, prove_by_index: false, }; - let ctx_data = merkle_ctx.try_to_vec().unwrap(); + let ctx_data = borsh::to_vec(&merkle_ctx).unwrap(); let (z_context, _) = PackedMerkleContext::zero_copy_at(&ctx_data).unwrap(); // Execute: call set_z() with lamports = 0 @@ -849,7 +849,7 @@ fn test_in_account_set_z_edge_case_max_lamports() { address: None, }; - let mut data = in_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&in_account).unwrap(); let (mut z_in, _) = InAccount::zero_copy_at_mut(&mut data).unwrap(); // Create zero-copy merkle context @@ -859,7 +859,7 @@ fn test_in_account_set_z_edge_case_max_lamports() { leaf_index: 999, prove_by_index: false, }; - let ctx_data = merkle_ctx.try_to_vec().unwrap(); + let ctx_data = borsh::to_vec(&merkle_ctx).unwrap(); let (z_context, _) = PackedMerkleContext::zero_copy_at(&ctx_data).unwrap(); // Execute: call set_z() with lamports = u64::MAX @@ -889,7 +889,7 @@ fn test_in_account_set_z_edge_case_merkle_context_bounds() { address: None, }; - let mut data = in_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&in_account).unwrap(); let (mut z_in, _) = InAccount::zero_copy_at_mut(&mut data).unwrap(); // Test with prove_by_index: false @@ -899,7 +899,7 @@ fn test_in_account_set_z_edge_case_merkle_context_bounds() { leaf_index: u32::MAX, prove_by_index: false, }; - let ctx_data = merkle_ctx_false.try_to_vec().unwrap(); + let ctx_data = borsh::to_vec(&merkle_ctx_false).unwrap(); let (z_context, _) = PackedMerkleContext::zero_copy_at(&ctx_data).unwrap(); let result = z_in.set_z([3u8; 8], [4u8; 32], &z_context, U16::new(2), 2000, None); @@ -918,7 +918,7 @@ fn test_in_account_set_z_edge_case_merkle_context_bounds() { leaf_index: u32::MAX, prove_by_index: true, }; - let ctx_data_true = merkle_ctx_true.try_to_vec().unwrap(); + let ctx_data_true = borsh::to_vec(&merkle_ctx_true).unwrap(); let (z_context_true, _) = PackedMerkleContext::zero_copy_at(&ctx_data_true).unwrap(); let result2 = z_in.set_z( @@ -950,7 +950,7 @@ fn test_in_account_set_z_merkle_context_copying() { address: None, }; - let mut data = in_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&in_account).unwrap(); let (mut z_in, _) = InAccount::zero_copy_at_mut(&mut data).unwrap(); // Create PackedMerkleContext with specific values @@ -960,7 +960,7 @@ fn test_in_account_set_z_merkle_context_copying() { leaf_index: 999999, prove_by_index: false, }; - let ctx_data = merkle_ctx.try_to_vec().unwrap(); + let ctx_data = borsh::to_vec(&merkle_ctx).unwrap(); let (z_context, _) = PackedMerkleContext::zero_copy_at(&ctx_data).unwrap(); // Execute: call set_z() with zero-copy context @@ -987,7 +987,7 @@ fn test_in_account_set_error_invalid_address_length() { address: Some([0u8; 32]), }; - let mut data = in_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&in_account).unwrap(); let (mut z_in, _) = InAccount::zero_copy_at_mut(&mut data).unwrap(); // Execute: call set() with Some(&[7u8; 16]) (wrong length) @@ -1020,7 +1020,7 @@ fn test_in_account_set_edge_case_zero_lamports() { address: None, }; - let mut data = in_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&in_account).unwrap(); let (mut z_in, _) = InAccount::zero_copy_at_mut(&mut data).unwrap(); // Execute: call set() with lamports = 0 @@ -1056,7 +1056,7 @@ fn test_in_account_set_edge_case_max_lamports() { address: None, }; - let mut data = in_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&in_account).unwrap(); let (mut z_in, _) = InAccount::zero_copy_at_mut(&mut data).unwrap(); // Execute: call set() with lamports = u64::MAX @@ -1092,7 +1092,7 @@ fn test_in_account_set_merkle_context_copying() { address: None, }; - let mut data = in_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&in_account).unwrap(); let (mut z_in, _) = InAccount::zero_copy_at_mut(&mut data).unwrap(); // Create PackedMerkleContext with specific values @@ -1149,7 +1149,7 @@ fn test_instruction_initialize_success_with_proof() { read_only_accounts: Vec::new(), }; - let mut data = instruction.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&instruction).unwrap(); let (mut z_instruction, _) = InstructionDataInvokeCpiWithReadOnly::zero_copy_at_mut(&mut data).unwrap(); @@ -1159,7 +1159,7 @@ fn test_instruction_initialize_success_with_proof() { b: [6u8; 64], c: [7u8; 32], }; - let proof_data = compressed_proof.try_to_vec().unwrap(); + let proof_data = borsh::to_vec(&compressed_proof).unwrap(); let (z_proof, _) = CompressedProof::zero_copy_at(&proof_data).unwrap(); let invoking_program_id = Pubkey::new_unique(); @@ -1203,7 +1203,7 @@ fn test_instruction_initialize_success_without_proof() { read_only_accounts: Vec::new(), }; - let mut data = instruction.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&instruction).unwrap(); let (mut z_instruction, _) = InstructionDataInvokeCpiWithReadOnly::zero_copy_at_mut(&mut data).unwrap(); @@ -1234,7 +1234,7 @@ fn test_new_address_set_edge_case_zero_seed() { // Setup: NewAddressParamsAssignedPacked let new_address = NewAddressParamsAssignedPacked::default(); - let mut data = new_address.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&new_address).unwrap(); let (mut z_new_address, _) = NewAddressParamsAssignedPacked::zero_copy_at_mut(&mut data).unwrap(); @@ -1259,7 +1259,7 @@ fn test_new_address_set_edge_case_max_seed() { // Setup: NewAddressParamsAssignedPacked let new_address = NewAddressParamsAssignedPacked::default(); - let mut data = new_address.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&new_address).unwrap(); let (mut z_new_address, _) = NewAddressParamsAssignedPacked::zero_copy_at_mut(&mut data).unwrap(); @@ -1284,7 +1284,7 @@ fn test_new_address_set_edge_case_zero_root_index() { // Setup: NewAddressParamsAssignedPacked let new_address = NewAddressParamsAssignedPacked::default(); - let mut data = new_address.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&new_address).unwrap(); let (mut z_new_address, _) = NewAddressParamsAssignedPacked::zero_copy_at_mut(&mut data).unwrap(); @@ -1305,7 +1305,7 @@ fn test_new_address_set_edge_case_max_root_index() { // Setup: NewAddressParamsAssignedPacked let new_address = NewAddressParamsAssignedPacked::default(); - let mut data = new_address.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&new_address).unwrap(); let (mut z_new_address, _) = NewAddressParamsAssignedPacked::zero_copy_at_mut(&mut data).unwrap(); @@ -1326,7 +1326,7 @@ fn test_new_address_set_edge_case_zero_merkle_tree_account_index() { // Setup: NewAddressParamsAssignedPacked let new_address = NewAddressParamsAssignedPacked::default(); - let mut data = new_address.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&new_address).unwrap(); let (mut z_new_address, _) = NewAddressParamsAssignedPacked::zero_copy_at_mut(&mut data).unwrap(); @@ -1347,7 +1347,7 @@ fn test_new_address_set_edge_case_max_merkle_tree_account_index() { // Setup: NewAddressParamsAssignedPacked let new_address = NewAddressParamsAssignedPacked::default(); - let mut data = new_address.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&new_address).unwrap(); let (mut z_new_address, _) = NewAddressParamsAssignedPacked::zero_copy_at_mut(&mut data).unwrap(); @@ -1387,7 +1387,7 @@ fn test_instruction_initialize_error_missing_proof() { read_only_accounts: Vec::new(), }; - let mut data = instruction.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&instruction).unwrap(); let (mut z_instruction, _) = InstructionDataInvokeCpiWithReadOnly::zero_copy_at_mut(&mut data).unwrap(); @@ -1429,7 +1429,7 @@ fn test_instruction_initialize_mode_invariant() { read_only_accounts: Vec::new(), }; - let mut data = instruction.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&instruction).unwrap(); let (mut z_instruction, _) = InstructionDataInvokeCpiWithReadOnly::zero_copy_at_mut(&mut data).unwrap(); @@ -1463,7 +1463,7 @@ fn test_instruction_initialize_edge_case_zero_bump() { read_only_accounts: Vec::new(), }; - let mut data = instruction.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&instruction).unwrap(); let (mut z_instruction, _) = InstructionDataInvokeCpiWithReadOnly::zero_copy_at_mut(&mut data).unwrap(); @@ -1497,7 +1497,7 @@ fn test_instruction_initialize_edge_case_max_bump() { read_only_accounts: Vec::new(), }; - let mut data = instruction.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&instruction).unwrap(); let (mut z_instruction, _) = InstructionDataInvokeCpiWithReadOnly::zero_copy_at_mut(&mut data).unwrap(); @@ -1531,7 +1531,7 @@ fn test_instruction_initialize_success_without_cpi_context() { read_only_accounts: Vec::new(), }; - let mut data = instruction.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&instruction).unwrap(); let (mut z_instruction, _) = InstructionDataInvokeCpiWithReadOnly::zero_copy_at_mut(&mut data).unwrap(); @@ -1566,7 +1566,7 @@ fn test_instruction_initialize_error_unexpected_proof() { read_only_accounts: Vec::new(), }; - let mut data = instruction.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&instruction).unwrap(); let (mut z_instruction, _) = InstructionDataInvokeCpiWithReadOnly::zero_copy_at_mut(&mut data).unwrap(); @@ -1576,7 +1576,7 @@ fn test_instruction_initialize_error_unexpected_proof() { b: [6u8; 64], c: [7u8; 32], }; - let proof_data = compressed_proof.try_to_vec().unwrap(); + let proof_data = borsh::to_vec(&compressed_proof).unwrap(); let (z_proof, _) = CompressedProof::zero_copy_at(&proof_data).unwrap(); // Execute: call initialize() with Some(zero_copy_proof) (but InstructionData has no proof slot) @@ -1613,7 +1613,7 @@ fn test_instruction_initialize_success_with_cpi_context() { read_only_accounts: Vec::new(), }; - let mut data = instruction.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&instruction).unwrap(); let (mut z_instruction, _) = InstructionDataInvokeCpiWithReadOnly::zero_copy_at_mut(&mut data).unwrap(); @@ -1657,7 +1657,7 @@ fn test_instruction_initialize_proof_copying() { read_only_accounts: Vec::new(), }; - let mut data = instruction.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&instruction).unwrap(); let (mut z_instruction, _) = InstructionDataInvokeCpiWithReadOnly::zero_copy_at_mut(&mut data).unwrap(); @@ -1667,7 +1667,7 @@ fn test_instruction_initialize_proof_copying() { b: [6u8; 64], c: [7u8; 32], }; - let proof_data = compressed_proof.try_to_vec().unwrap(); + let proof_data = borsh::to_vec(&compressed_proof).unwrap(); let (z_proof, _) = CompressedProof::zero_copy_at(&proof_data).unwrap(); let result = z_instruction.initialize( @@ -1699,7 +1699,7 @@ fn test_randomized_all_functions() { compressed_account: create_compressed_account(Some([1u8; 32]), None), merkle_tree_index: rng.gen::(), }; - let mut data = output_account.try_to_vec().unwrap(); + let mut data = borsh::to_vec(&output_account).unwrap(); let (mut z_output, _) = OutputCompressedAccountWithPackedContext::zero_copy_at_mut(&mut data).unwrap(); let _ = z_output.set( @@ -1725,7 +1725,7 @@ fn test_randomized_all_functions() { lamports: rng.gen::(), address: None, }; - let mut in_data = in_account.try_to_vec().unwrap(); + let mut in_data = borsh::to_vec(&in_account).unwrap(); let (mut z_in, _) = InAccount::zero_copy_at_mut(&mut in_data).unwrap(); let merkle_ctx = PackedMerkleContext { @@ -1734,7 +1734,7 @@ fn test_randomized_all_functions() { leaf_index: rng.gen::(), prove_by_index: rng.gen::(), }; - let ctx_data = merkle_ctx.try_to_vec().unwrap(); + let ctx_data = borsh::to_vec(&merkle_ctx).unwrap(); let (z_context, _) = PackedMerkleContext::zero_copy_at(&ctx_data).unwrap(); let _ = z_in.set_z( @@ -1773,7 +1773,7 @@ fn test_randomized_all_functions() { read_only_addresses: Vec::new(), read_only_accounts: Vec::new(), }; - let mut inst_data = instruction.try_to_vec().unwrap(); + let mut inst_data = borsh::to_vec(&instruction).unwrap(); let (mut z_instruction, _) = InstructionDataInvokeCpiWithReadOnly::zero_copy_at_mut(&mut inst_data).unwrap(); @@ -1786,7 +1786,7 @@ fn test_randomized_all_functions() { // Test ZNewAddressParamsAssignedPackedMut::set() let new_address = NewAddressParamsAssignedPacked::default(); - let mut addr_data = new_address.try_to_vec().unwrap(); + let mut addr_data = borsh::to_vec(&new_address).unwrap(); let (mut z_new_address, _) = NewAddressParamsAssignedPacked::zero_copy_at_mut(&mut addr_data).unwrap(); diff --git a/program-libs/compressible/src/registry_instructions.rs b/program-libs/compressible/src/registry_instructions.rs index 582574010e..57473eb343 100644 --- a/program-libs/compressible/src/registry_instructions.rs +++ b/program-libs/compressible/src/registry_instructions.rs @@ -57,7 +57,7 @@ impl CreateCompressibleConfig { /// Serialize instruction data including discriminator pub fn data(&self) -> Vec { let mut data = Self::discriminator().to_vec(); - data.extend_from_slice(&AnchorSerialize::try_to_vec(self).unwrap()); + data.extend_from_slice(&borsh::to_vec(self).unwrap()); data } } diff --git a/program-libs/compressible/tests/compression_info.rs b/program-libs/compressible/tests/compression_info.rs index f729b099d8..b306f0dfbb 100644 --- a/program-libs/compressible/tests/compression_info.rs +++ b/program-libs/compressible/tests/compression_info.rs @@ -35,7 +35,7 @@ fn test_claim_method() { rent_config: test_rent_config(), }; - let mut extension_bytes = extension_data.try_to_vec().unwrap(); + let mut extension_bytes = borsh::to_vec(&extension_data).unwrap(); let (mut z_extension, _) = CompressionInfo::zero_copy_at_mut(&mut extension_bytes) .expect("Failed to create zero-copy extension"); @@ -313,7 +313,7 @@ fn test_get_last_paid_epoch() { rent_config: test_rent_config(), }; - let extension_bytes = extension_data.try_to_vec().unwrap(); + let extension_bytes = borsh::to_vec(&extension_data).unwrap(); let (z_extension, _) = CompressionInfo::zero_copy_at(&extension_bytes) .expect("Failed to create zero-copy extension"); diff --git a/program-libs/hasher/src/hash_to_field_size.rs b/program-libs/hasher/src/hash_to_field_size.rs index 9099a97ea2..a6b23f7e8e 100644 --- a/program-libs/hasher/src/hash_to_field_size.rs +++ b/program-libs/hasher/src/hash_to_field_size.rs @@ -18,7 +18,7 @@ where T: BorshSerialize, { fn hash_to_field_size(&self) -> Result<[u8; 32], HasherError> { - let borsh_vec = self.try_to_vec().map_err(|_| HasherError::BorshError)?; + let borsh_vec = borsh::to_vec(&self).map_err(|_| HasherError::BorshError)?; #[cfg(all(debug_assertions, feature = "std"))] { if std::env::var("RUST_BACKTRACE").is_ok() { diff --git a/program-libs/hasher/tests/hash_to_field_size.rs b/program-libs/hasher/tests/hash_to_field_size.rs index 60362d9dca..24c30dbfd1 100644 --- a/program-libs/hasher/tests/hash_to_field_size.rs +++ b/program-libs/hasher/tests/hash_to_field_size.rs @@ -35,7 +35,7 @@ fn hash_to_field_size_borsh() { c: u64, } let test_struct = TestStruct { a: 1, b: 2, c: 3 }; - let serialized = test_struct.try_to_vec().unwrap(); + let serialized = borsh::to_vec(&test_struct).unwrap(); let hash = test_struct.hash_to_field_size().unwrap(); let manual_hash = hash_to_bn254_field_size_be(&serialized); assert_eq!(hash, manual_hash); diff --git a/program-libs/token-interface/Cargo.toml b/program-libs/token-interface/Cargo.toml index c89b853998..3beec315af 100644 --- a/program-libs/token-interface/Cargo.toml +++ b/program-libs/token-interface/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT" [features] anchor = ["light-compressed-account/anchor", "dep:anchor-lang", "light-compressible/anchor"] idl-build = ["anchor-lang/idl-build", "anchor", "light-compressed-account/idl-build", "light-compressible/idl-build"] -solana = ["dep:solana-program-error", "dep:solana-sysvar", "solana-msg"] +solana = ["dep:solana-program-error", "dep:solana-sysvar"] default = [] test-only = [] profile-program = [] @@ -35,7 +35,7 @@ light-macros = { workspace = true } solana-sysvar = { workspace = true, optional = true } spl-pod = { workspace = true } spl-token-2022 = { workspace = true } -solana-msg = { workspace = true, optional = true } +solana-msg = { workspace = true } light-program-profiler = { workspace = true } light-heap = { workspace = true, optional = true } light-compressible = {workspace = true } diff --git a/program-libs/token-interface/src/state/compressed_token/hash.rs b/program-libs/token-interface/src/state/compressed_token/hash.rs index 13d8979873..a2ca68a2ae 100644 --- a/program-libs/token-interface/src/state/compressed_token/hash.rs +++ b/program-libs/token-interface/src/state/compressed_token/hash.rs @@ -84,7 +84,7 @@ impl TokenData { #[profile] #[inline(always)] pub fn hash_sha_flat(&self) -> Result<[u8; 32], HasherError> { - let bytes = self.try_to_vec().map_err(|_| HasherError::BorshError)?; + let bytes = borsh::to_vec(&self).map_err(|_| HasherError::BorshError)?; Sha256BE::hash(bytes.as_slice()) } diff --git a/program-libs/token-interface/src/state/compressed_token/token_data.rs b/program-libs/token-interface/src/state/compressed_token/token_data.rs index 962721e326..61836995a0 100644 --- a/program-libs/token-interface/src/state/compressed_token/token_data.rs +++ b/program-libs/token-interface/src/state/compressed_token/token_data.rs @@ -12,8 +12,8 @@ use crate::{ #[repr(u8)] pub enum CompressedTokenAccountState { //Uninitialized, is always initialized. - Initialized = 0, - Frozen = 1, + Initialized, + Frozen, } impl TryFrom for CompressedTokenAccountState { diff --git a/program-libs/token-interface/src/state/extensions/extension_struct.rs b/program-libs/token-interface/src/state/extensions/extension_struct.rs index 6ecc5e2fb8..e5f2508276 100644 --- a/program-libs/token-interface/src/state/extensions/extension_struct.rs +++ b/program-libs/token-interface/src/state/extensions/extension_struct.rs @@ -1,5 +1,5 @@ use light_zero_copy::ZeroCopy; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use crate::{ state::extensions::{ diff --git a/program-libs/token-interface/src/state/extensions/extension_type.rs b/program-libs/token-interface/src/state/extensions/extension_type.rs index a1e3a01ede..91452062fc 100644 --- a/program-libs/token-interface/src/state/extensions/extension_type.rs +++ b/program-libs/token-interface/src/state/extensions/extension_type.rs @@ -1,7 +1,8 @@ -use crate::{AnchorDeserialize, AnchorSerialize}; +use borsh::BorshDeserialize; -#[derive(Debug, Clone, Copy, PartialEq, Eq, AnchorDeserialize, AnchorSerialize)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, BorshDeserialize, borsh::BorshSerialize)] #[repr(u8)] // Note: token22 uses u16 +#[borsh(use_discriminant = false)] pub enum ExtensionType { Placeholder0, Placeholder1, diff --git a/program-libs/token-interface/src/state/mint/compressed_mint.rs b/program-libs/token-interface/src/state/mint/compressed_mint.rs index f1668c810f..5875306de3 100644 --- a/program-libs/token-interface/src/state/mint/compressed_mint.rs +++ b/program-libs/token-interface/src/state/mint/compressed_mint.rs @@ -115,7 +115,7 @@ impl Mint { pub fn hash(&self) -> Result<[u8; 32], TokenError> { match self.metadata.version { 3 => Ok(Sha256BE::hash( - self.try_to_vec() + borsh::to_vec(&self) .map_err(|_| TokenError::BorshFailed)? .as_slice(), )?), diff --git a/program-libs/token-interface/src/state/mint/zero_copy.rs b/program-libs/token-interface/src/state/mint/zero_copy.rs index f62ae35d1e..0d81b85cbb 100644 --- a/program-libs/token-interface/src/state/mint/zero_copy.rs +++ b/program-libs/token-interface/src/state/mint/zero_copy.rs @@ -8,7 +8,7 @@ use light_zero_copy::{ traits::{ZeroCopyAt, ZeroCopyAtMut}, ZeroCopy, ZeroCopyMut, ZeroCopyNew, }; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use super::compressed_mint::{MintMetadata, ACCOUNT_TYPE_MINT}; use crate::{ diff --git a/program-libs/token-interface/src/state/token/token_struct.rs b/program-libs/token-interface/src/state/token/token_struct.rs index ae0a161375..291db86ec0 100644 --- a/program-libs/token-interface/src/state/token/token_struct.rs +++ b/program-libs/token-interface/src/state/token/token_struct.rs @@ -9,9 +9,9 @@ pub const ACCOUNT_TYPE_TOKEN_ACCOUNT: u8 = 2; #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, AnchorSerialize, AnchorDeserialize)] #[repr(u8)] pub enum AccountState { - Uninitialized = 0, - Initialized = 1, - Frozen = 2, + Uninitialized, + Initialized, + Frozen, } impl TryFrom for AccountState { diff --git a/program-libs/token-interface/tests/compressed_mint.rs b/program-libs/token-interface/tests/compressed_mint.rs index 9cea668487..23cf472497 100644 --- a/program-libs/token-interface/tests/compressed_mint.rs +++ b/program-libs/token-interface/tests/compressed_mint.rs @@ -96,7 +96,7 @@ pub struct VecTestStruct { #[test] fn test_compressed_mint_borsh_zerocopy_compatibility() { let test = VecTestStruct { opt_vec: None }; - let test_bytes = test.try_to_vec().unwrap(); + let test_bytes = borsh::to_vec(&test).unwrap(); println!("test bytes {:?}", test_bytes); let deserialize = VecTestStruct::deserialize(&mut test_bytes.as_slice()).unwrap(); assert_eq!(test, deserialize); @@ -105,7 +105,7 @@ fn test_compressed_mint_borsh_zerocopy_compatibility() { for i in 0..100 { let original_mint = generate_random_compressed_mint(&mut rng, false); - let borsh_bytes = original_mint.try_to_vec().unwrap(); + let borsh_bytes = borsh::to_vec(&original_mint).unwrap(); println!("Iteration {}: Borsh size = {} bytes", i, borsh_bytes.len()); let borsh_deserialized = Mint::deserialize_reader(&mut borsh_bytes.as_slice()) .unwrap_or_else(|_| panic!("Failed to deserialize Mint at iteration {}", i)); @@ -264,7 +264,7 @@ fn test_compressed_mint_edge_cases() { }; // Borsh roundtrip - let bytes = mint_no_auth.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&mint_no_auth).unwrap(); println!("Borsh serialized size: {} bytes", bytes.len()); println!("All bytes: {:?}", &bytes); let deserialized = Mint::deserialize(&mut bytes.as_slice()).unwrap(); @@ -344,7 +344,7 @@ fn test_compressed_mint_edge_cases() { extensions: None, }; - let bytes = mint_max.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&mint_max).unwrap(); let deserialized = Mint::deserialize(&mut bytes.as_slice()).unwrap(); assert_eq!(mint_max, deserialized); } @@ -374,7 +374,7 @@ fn test_base_mint_in_compressed_mint_spl_format() { }; // Serialize the whole Mint - let full_bytes = mint.try_to_vec().unwrap(); + let full_bytes = borsh::to_vec(&mint).unwrap(); // The BaseMint portion should be at the beginning // and should be 82 bytes (SPL Mint size) diff --git a/program-libs/token-interface/tests/cross_deserialization.rs b/program-libs/token-interface/tests/cross_deserialization.rs index 3c35e17f34..24b7943a3e 100644 --- a/program-libs/token-interface/tests/cross_deserialization.rs +++ b/program-libs/token-interface/tests/cross_deserialization.rs @@ -114,7 +114,7 @@ fn create_test_ctoken_simple() -> Token { #[test] fn test_account_type_byte_position() { let mint = create_test_mint(); - let mint_bytes = mint.try_to_vec().unwrap(); + let mint_bytes = borsh::to_vec(&mint).unwrap(); assert_eq!( mint_bytes[ACCOUNT_TYPE_OFFSET], 1, "Mint account_type should be 1" @@ -122,7 +122,7 @@ fn test_account_type_byte_position() { // Token with extensions has account_type byte at position 165 let token = create_test_ctoken_with_extension(); - let ctoken_bytes = token.try_to_vec().unwrap(); + let ctoken_bytes = borsh::to_vec(&token).unwrap(); assert_eq!( ctoken_bytes[ACCOUNT_TYPE_OFFSET], 2, "Token with extensions account_type should be 2" @@ -133,7 +133,7 @@ fn test_account_type_byte_position() { fn test_ctoken_without_extensions_size() { // Token without extensions should be exactly 165 bytes (SPL Token Account size) let token = create_test_ctoken_simple(); - let ctoken_bytes = token.try_to_vec().unwrap(); + let ctoken_bytes = borsh::to_vec(&token).unwrap(); assert_eq!( ctoken_bytes.len(), 165, @@ -144,7 +144,7 @@ fn test_ctoken_without_extensions_size() { #[test] fn test_mint_bytes_fail_zero_copy_checked_as_ctoken() { let mint = create_test_mint(); - let mint_bytes = mint.try_to_vec().unwrap(); + let mint_bytes = borsh::to_vec(&mint).unwrap(); // Token zero_copy_at_checked verifies account_type == 2, should fail for Mint bytes let result = Token::zero_copy_at_checked(&mint_bytes); @@ -157,7 +157,7 @@ fn test_mint_bytes_fail_zero_copy_checked_as_ctoken() { #[test] fn test_ctoken_bytes_fail_zero_copy_checked_as_mint() { let token = create_test_ctoken_with_extension(); - let ctoken_bytes = token.try_to_vec().unwrap(); + let ctoken_bytes = borsh::to_vec(&token).unwrap(); // Mint zero_copy_at_checked verifies account_type == 1, should fail for Token bytes let result = Mint::zero_copy_at_checked(&ctoken_bytes); @@ -170,7 +170,7 @@ fn test_ctoken_bytes_fail_zero_copy_checked_as_mint() { #[test] fn test_ctoken_bytes_wrong_account_type_as_mint() { let token = create_test_ctoken_with_extension(); - let ctoken_bytes = token.try_to_vec().unwrap(); + let ctoken_bytes = borsh::to_vec(&token).unwrap(); // Deserialize as Mint - should succeed but have wrong account_type let mint = Mint::try_from_slice(&ctoken_bytes); @@ -190,7 +190,7 @@ fn test_ctoken_bytes_wrong_account_type_as_mint() { #[test] fn test_mint_bytes_borsh_as_ctoken() { let mint = create_test_mint(); - let mint_bytes = mint.try_to_vec().unwrap(); + let mint_bytes = borsh::to_vec(&mint).unwrap(); // Mint has account_type = ACCOUNT_TYPE_MINT (1) at byte 165. // Borsh deserialization of Token now rejects non-Token account_type bytes. diff --git a/program-libs/token-interface/tests/mint_borsh_zero_copy.rs b/program-libs/token-interface/tests/mint_borsh_zero_copy.rs index 965c0ef9f9..f4dceb4ad5 100644 --- a/program-libs/token-interface/tests/mint_borsh_zero_copy.rs +++ b/program-libs/token-interface/tests/mint_borsh_zero_copy.rs @@ -236,7 +236,7 @@ fn compare_mint_borsh_vs_zero_copy(original: &Mint, borsh_bytes: &[u8]) { fn test_mint_borsh_zero_copy_compatibility() { for _ in 0..1000 { let mint = generate_random_mint(); - let borsh_bytes = mint.try_to_vec().unwrap(); + let borsh_bytes = borsh::to_vec(&mint).unwrap(); compare_mint_borsh_vs_zero_copy(&mint, &borsh_bytes); } } @@ -273,7 +273,7 @@ fn generate_mint_with_extensions() -> Mint { fn test_mint_with_extensions_borsh_zero_copy_compatibility() { for _ in 0..500 { let mint = generate_mint_with_extensions(); - let borsh_bytes = mint.try_to_vec().unwrap(); + let borsh_bytes = borsh::to_vec(&mint).unwrap(); compare_mint_borsh_vs_zero_copy(&mint, &borsh_bytes); } } @@ -309,7 +309,7 @@ fn test_mint_extension_edge_cases() { additional_metadata: vec![], // No additional metadata })]), }; - let borsh_bytes = mint_empty_strings.try_to_vec().unwrap(); + let borsh_bytes = borsh::to_vec(&mint_empty_strings).unwrap(); compare_mint_borsh_vs_zero_copy(&mint_empty_strings, &borsh_bytes); // Test 2: Maximum reasonable lengths @@ -353,7 +353,7 @@ fn test_mint_extension_edge_cases() { ], })]), }; - let borsh_bytes = mint_max_lengths.try_to_vec().unwrap(); + let borsh_bytes = borsh::to_vec(&mint_max_lengths).unwrap(); compare_mint_borsh_vs_zero_copy(&mint_max_lengths, &borsh_bytes); // Test 3: Zero update authority (represents None) @@ -384,7 +384,7 @@ fn test_mint_extension_edge_cases() { additional_metadata: vec![], })]), }; - let borsh_bytes = mint_zero_authority.try_to_vec().unwrap(); + let borsh_bytes = borsh::to_vec(&mint_zero_authority).unwrap(); compare_mint_borsh_vs_zero_copy(&mint_zero_authority, &borsh_bytes); // Test 4: No extensions (explicit None) @@ -408,6 +408,6 @@ fn test_mint_extension_edge_cases() { compression: CompressionInfo::default(), extensions: None, }; - let borsh_bytes = mint_no_extensions.try_to_vec().unwrap(); + let borsh_bytes = borsh::to_vec(&mint_no_extensions).unwrap(); compare_mint_borsh_vs_zero_copy(&mint_no_extensions, &borsh_bytes); } diff --git a/program-libs/token-interface/tests/mint_compat.rs b/program-libs/token-interface/tests/mint_compat.rs index 7ef15e520c..a773717aac 100644 --- a/program-libs/token-interface/tests/mint_compat.rs +++ b/program-libs/token-interface/tests/mint_compat.rs @@ -86,7 +86,7 @@ fn compare_mints(light: &BaseMint, spl: &SplMint, iteration: usize) { ); // Test Light serialization roundtrip - let light_bytes = light.try_to_vec().unwrap(); + let light_bytes = borsh::to_vec(&light).unwrap(); let light_deserialized = BaseMint::try_from_slice(&light_bytes).unwrap(); assert_eq!( light, &light_deserialized, diff --git a/program-libs/token-interface/tests/token/borsh_deser.rs b/program-libs/token-interface/tests/token/borsh_deser.rs index 13dc3d65c9..2404c78399 100644 --- a/program-libs/token-interface/tests/token/borsh_deser.rs +++ b/program-libs/token-interface/tests/token/borsh_deser.rs @@ -50,7 +50,7 @@ fn serialize_token_with_account_type(account_type_byte: u8) -> Vec { })]), }; - let mut bytes = token.try_to_vec().unwrap(); + let mut bytes = borsh::to_vec(&token).unwrap(); // Tamper byte 165 (account_type) to the requested value bytes[165] = account_type_byte; bytes @@ -116,7 +116,7 @@ fn test_borsh_deser_accepts_base_token_without_extensions() { extensions: None, }; - let bytes = token.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&token).unwrap(); assert_eq!(bytes.len(), 165, "Base token should be 165 bytes"); let deserialized = Token::try_from_slice(&bytes).expect("Should deserialize base token"); diff --git a/program-libs/token-interface/tests/token_metadata.rs b/program-libs/token-interface/tests/token_metadata.rs index f275842fe0..b54578fc2c 100644 --- a/program-libs/token-interface/tests/token_metadata.rs +++ b/program-libs/token-interface/tests/token_metadata.rs @@ -168,7 +168,7 @@ fn compare_metadata(light: &LightTokenMetadata, spl: &SplTokenMetadata, iteratio } // Test Light serialization round-trip - let light_bytes = light.try_to_vec().unwrap(); + let light_bytes = borsh::to_vec(&light).unwrap(); let light_restored = LightTokenMetadata::try_from_slice(&light_bytes).unwrap(); // Single assertion for complete Light struct diff --git a/program-libs/zero-copy/src/traits/zero_copy_at_mut.rs b/program-libs/zero-copy/src/traits/zero_copy_at_mut.rs index a7bb50d6d1..cfc83195c3 100644 --- a/program-libs/zero-copy/src/traits/zero_copy_at_mut.rs +++ b/program-libs/zero-copy/src/traits/zero_copy_at_mut.rs @@ -343,7 +343,7 @@ pub mod test { #[test] fn test_struct_1() { let ref_struct = Struct1 { a: 1, b: 2 }; - let mut bytes = ref_struct.try_to_vec().unwrap(); + let mut bytes = borsh::to_vec(&ref_struct).unwrap(); let (mut struct1, remaining) = Struct1::zero_copy_at_mut(&mut bytes).unwrap(); assert_eq!(struct1.a, 1u8); @@ -417,7 +417,7 @@ pub mod test { b: 2, vec: vec![1u8; 32], }; - let mut bytes = ref_struct.try_to_vec().unwrap(); + let mut bytes = borsh::to_vec(&ref_struct).unwrap(); let (struct2, remaining) = Struct2::zero_copy_at_mut(&mut bytes).unwrap(); assert_eq!(struct2.a, 1u8); @@ -478,7 +478,7 @@ pub mod test { vec: vec![1u8; 32], c: 3, }; - let mut bytes = ref_struct.try_to_vec().unwrap(); + let mut bytes = borsh::to_vec(&ref_struct).unwrap(); let (zero_copy, remaining) = Struct3::zero_copy_at_mut(&mut bytes).unwrap(); assert_eq!(zero_copy.a, 1u8); @@ -600,7 +600,7 @@ pub mod test { c: 3, vec_2: vec![Struct4Nested { a: 1, b: 2 }; 32], }; - let mut bytes = ref_struct.try_to_vec().unwrap(); + let mut bytes = borsh::to_vec(&ref_struct).unwrap(); let (zero_copy, remaining) = Struct4::zero_copy_at_mut(&mut bytes).unwrap(); assert_eq!(zero_copy.a, 1u8); @@ -644,7 +644,7 @@ pub mod test { let ref_struct = Struct5 { a: vec![vec![1u8; 32]; 32], }; - let mut bytes = ref_struct.try_to_vec().unwrap(); + let mut bytes = borsh::to_vec(&ref_struct).unwrap(); let (zero_copy, remaining) = Struct5::zero_copy_at_mut(&mut bytes).unwrap(); assert_eq!( @@ -690,7 +690,7 @@ pub mod test { 32 ], }; - let mut bytes = ref_struct.try_to_vec().unwrap(); + let mut bytes = borsh::to_vec(&ref_struct).unwrap(); let (zero_copy, remaining) = Struct6::zero_copy_at_mut(&mut bytes).unwrap(); assert_eq!( @@ -766,7 +766,7 @@ pub mod test { b: 2, option: Some(3), }; - let mut bytes = ref_struct.try_to_vec().unwrap(); + let mut bytes = borsh::to_vec(&ref_struct).unwrap(); let (zero_copy, remaining) = Struct7::zero_copy_at_mut(&mut bytes).unwrap(); assert_eq!(zero_copy.a, 1u8); @@ -779,7 +779,7 @@ pub mod test { b: 2, option: None, }; - let mut bytes = ref_struct.try_to_vec().unwrap(); + let mut bytes = borsh::to_vec(&ref_struct).unwrap(); let (zero_copy, remaining) = Struct7::zero_copy_at_mut(&mut bytes).unwrap(); assert_eq!(zero_copy.a, 1u8); @@ -859,7 +859,7 @@ pub mod test { 32 ], }; - let mut bytes = ref_struct.try_to_vec().unwrap(); + let mut bytes = borsh::to_vec(&ref_struct).unwrap(); let (zero_copy, remaining) = Struct8::zero_copy_at_mut(&mut bytes).unwrap(); assert_eq!( diff --git a/program-libs/zero-copy/tests/borsh.rs b/program-libs/zero-copy/tests/borsh.rs index f5c9bceedb..edf7dba489 100644 --- a/program-libs/zero-copy/tests/borsh.rs +++ b/program-libs/zero-copy/tests/borsh.rs @@ -15,7 +15,7 @@ pub struct Struct1Derived { #[test] fn test_struct_1_derived() { let ref_struct = Struct1Derived { a: 1, b: 2 }; - let mut bytes = ref_struct.try_to_vec().unwrap(); + let mut bytes = borsh::to_vec(&ref_struct).unwrap(); { let (struct1, remaining) = Struct1Derived::zero_copy_at(&bytes).unwrap(); @@ -54,7 +54,7 @@ fn test_struct_2_derived() { b: 2, vec: vec![1u8; 32], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (struct2, remaining) = Struct2Derived::zero_copy_at(&bytes).unwrap(); assert_eq!(struct2.a, 1u8); @@ -82,7 +82,7 @@ fn test_struct_3_derived() { vec: vec![1u8; 32], c: 3, }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (zero_copy, remaining) = Struct3Derived::zero_copy_at(&bytes).unwrap(); assert_eq!(zero_copy.a, 1u8); @@ -124,7 +124,7 @@ fn test_struct_4_derived() { c: 3, vec_2: vec![Struct4NestedDerived { a: 1, b: 2 }; 32], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (zero_copy, remaining) = Struct4Derived::zero_copy_at(&bytes).unwrap(); assert_eq!(zero_copy.a, 1u8); @@ -150,7 +150,7 @@ fn test_struct_5_derived() { let ref_struct = Struct5Derived { a: vec![vec![1u8; 32]; 32], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (zero_copy, remaining) = Struct5Derived::zero_copy_at(&bytes).unwrap(); assert_eq!( @@ -180,7 +180,7 @@ fn test_struct_6_derived() { 32 ], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (zero_copy, remaining) = Struct6Derived::zero_copy_at(&bytes).unwrap(); assert_eq!( @@ -213,7 +213,7 @@ fn test_struct_7_derived() { b: 2, option: Some(3), }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (zero_copy, remaining) = Struct7Derived::zero_copy_at(&bytes).unwrap(); assert_eq!(zero_copy.a, 1u8); @@ -266,7 +266,7 @@ fn test_struct_8_derived() { 32 ], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (zero_copy, remaining) = Struct8Derived::zero_copy_at(&bytes).unwrap(); // Check length of vec matches @@ -291,7 +291,7 @@ fn test_array_struct() { b: [2u8; 64], c: [3u8; 32], }; - let bytes = array_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&array_struct).unwrap(); let (zero_copy, remaining) = ArrayStruct::zero_copy_at(&bytes).unwrap(); assert_eq!(zero_copy.a, [1u8; 32]); @@ -326,7 +326,7 @@ fn test_compressed_account_data() { data: vec![2u8; 32], data_hash: [3u8; 32], }; - let bytes = compressed_account_data.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&compressed_account_data).unwrap(); let (zero_copy, remaining) = CompressedAccountData::zero_copy_at(&bytes).unwrap(); assert_eq!(zero_copy.discriminator, [1u8; 8]); diff --git a/program-tests/account-compression-test/tests/batched_merkle_tree_test.rs b/program-tests/account-compression-test/tests/batched_merkle_tree_test.rs index ba9446c594..ea61bd32e5 100644 --- a/program-tests/account-compression-test/tests/batched_merkle_tree_test.rs +++ b/program-tests/account-compression-test/tests/batched_merkle_tree_test.rs @@ -121,7 +121,7 @@ async fn test_batch_state_merkle_tree_failing() { ); let instruction = account_compression::instruction::InitializeBatchedStateMerkleTree { - bytes: params.try_to_vec().unwrap(), + bytes: borsh::to_vec(¶ms).unwrap(), }; let accounts = account_compression::accounts::InitializeBatchedStateMerkleTreeAndQueue { authority: context.get_payer().pubkey(), @@ -260,7 +260,7 @@ async fn test_batch_state_merkle_tree() { ); let instruction = account_compression::instruction::InitializeBatchedStateMerkleTree { - bytes: params.try_to_vec().unwrap(), + bytes: borsh::to_vec(¶ms).unwrap(), }; let accounts = account_compression::accounts::InitializeBatchedStateMerkleTreeAndQueue { authority: context.get_payer().pubkey(), @@ -502,7 +502,7 @@ async fn test_batch_state_merkle_tree() { ); let instruction = account_compression::instruction::InitializeBatchedStateMerkleTree { - bytes: params.try_to_vec().unwrap(), + bytes: borsh::to_vec(¶ms).unwrap(), }; let accounts = account_compression::accounts::InitializeBatchedStateMerkleTreeAndQueue { authority: context.get_payer().pubkey(), @@ -1122,7 +1122,7 @@ pub async fn perform_init_batch_state_merkle_tree( ); let instruction = account_compression::instruction::InitializeBatchedStateMerkleTree { - bytes: params.try_to_vec().unwrap(), + bytes: borsh::to_vec(¶ms).unwrap(), }; let accounts = account_compression::accounts::InitializeBatchedStateMerkleTreeAndQueue { authority: context.get_payer().pubkey(), @@ -1558,7 +1558,7 @@ pub async fn perform_init_batch_state_merkle_tree_and_queue( ); let instruction = account_compression::instruction::InitializeBatchedStateMerkleTree { - bytes: params.try_to_vec().unwrap(), + bytes: borsh::to_vec(¶ms).unwrap(), }; let accounts = account_compression::accounts::InitializeBatchedStateMerkleTreeAndQueue { authority: context.get_payer().pubkey(), @@ -1656,7 +1656,7 @@ pub async fn perform_init_batch_address_merkle_tree( ); let instruction = account_compression::instruction::InitializeBatchedAddressMerkleTree { - bytes: params.try_to_vec().unwrap(), + bytes: borsh::to_vec(¶ms).unwrap(), }; let accounts = account_compression::accounts::InitializeBatchedAddressMerkleTree { authority: context.get_payer().pubkey(), @@ -2174,7 +2174,7 @@ pub async fn update_batch_address_tree( }, }; let instruction_data = account_compression::instruction::BatchUpdateAddressTree { - data: instruction_data.try_to_vec().unwrap(), + data: borsh::to_vec(&instruction_data).unwrap(), }; let merkle_tree = if let Some(invalid_tree) = invalid_tree { diff --git a/program-tests/compressed-token-test/src/lib.rs b/program-tests/compressed-token-test/src/lib.rs index 19cd646546..6c23002a8e 100644 --- a/program-tests/compressed-token-test/src/lib.rs +++ b/program-tests/compressed-token-test/src/lib.rs @@ -15,7 +15,7 @@ pub mod compressed_token_test { /// Wrapper for write_to_cpi_context mode mint_action CPI /// All accounts are in remaining_accounts (unchecked) pub fn write_to_cpi_context_mint_action<'info>( - ctx: Context<'_, '_, '_, 'info, MintActionCpiWrapper<'info>>, + ctx: Context<'info, MintActionCpiWrapper<'info>>, inputs: Vec, ) -> Result<()> { execute_mint_action_cpi(ctx, inputs) @@ -24,7 +24,7 @@ pub mod compressed_token_test { /// Wrapper for execute_cpi_context mode mint_action CPI /// All accounts are in remaining_accounts (unchecked) pub fn execute_cpi_context_mint_action<'info>( - ctx: Context<'_, '_, '_, 'info, MintActionCpiWrapper<'info>>, + ctx: Context<'info, MintActionCpiWrapper<'info>>, inputs: Vec, ) -> Result<()> { execute_mint_action_cpi(ctx, inputs) @@ -42,7 +42,7 @@ pub struct MintActionCpiWrapper<'info> { /// Shared implementation for both wrapper instructions /// Passes through raw instruction bytes and accounts without any validation fn execute_mint_action_cpi<'info>( - ctx: Context<'_, '_, '_, 'info, MintActionCpiWrapper<'info>>, + ctx: Context<'info, MintActionCpiWrapper<'info>>, inputs: Vec, ) -> Result<()> { // Build account_metas from remaining_accounts - pass through as-is diff --git a/program-tests/compressed-token-test/tests/compress_only/ata_decompress.rs b/program-tests/compressed-token-test/tests/compress_only/ata_decompress.rs index b48517e4de..f062e0e6d6 100644 --- a/program-tests/compressed-token-test/tests/compress_only/ata_decompress.rs +++ b/program-tests/compressed-token-test/tests/compress_only/ata_decompress.rs @@ -954,7 +954,7 @@ async fn test_ata_decompress_with_mismatched_amount_fails() { }; // Serialize instruction data - let serialized = instruction_data.try_to_vec().unwrap(); + let serialized = borsh::to_vec(&instruction_data).unwrap(); let mut data = Vec::with_capacity(1 + serialized.len()); data.push(TRANSFER2); data.extend(serialized); diff --git a/program-tests/compressed-token-test/tests/compress_only/mod.rs b/program-tests/compressed-token-test/tests/compress_only/mod.rs index f0fc95c6cf..26d2601924 100644 --- a/program-tests/compressed-token-test/tests/compress_only/mod.rs +++ b/program-tests/compressed-token-test/tests/compress_only/mod.rs @@ -139,8 +139,7 @@ pub async fn set_ctoken_withheld_fee( // Serialize the modified Token back use borsh::BorshSerialize; - let serialized = ctoken - .try_to_vec() + let serialized = borsh::to_vec(&ctoken) .map_err(|e| RpcError::CustomError(format!("Failed to serialize Token: {:?}", e)))?; // Update account data diff --git a/program-tests/compressed-token-test/tests/light_token/create_ata.rs b/program-tests/compressed-token-test/tests/light_token/create_ata.rs index da73589b2a..b5283e6c1c 100644 --- a/program-tests/compressed-token-test/tests/light_token/create_ata.rs +++ b/program-tests/compressed-token-test/tests/light_token/create_ata.rs @@ -634,7 +634,7 @@ async fn test_create_ata_failing() { context.mint_pubkey = create_additional_mint(&mut context.rpc, &context.payer).await; // Use system program pubkey as fake config (wrong owner) - let fake_config = solana_sdk::system_program::ID; + let fake_config = anchor_lang::solana_program::system_program::ID; let compressible_params = CompressibleParams { compressible_config: fake_config, // Wrong owner! diff --git a/program-tests/compressed-token-test/tests/light_token/delegate_compress.rs b/program-tests/compressed-token-test/tests/light_token/delegate_compress.rs index 537bce3a83..d945b62bdd 100644 --- a/program-tests/compressed-token-test/tests/light_token/delegate_compress.rs +++ b/program-tests/compressed-token-test/tests/light_token/delegate_compress.rs @@ -104,7 +104,7 @@ async fn test_delegate_compress() -> Result<(), RpcError> { ); assert_eq!( spl_account.delegate, - spl_token_2022::solana_program::program_option::COption::Some(delegate.pubkey()), + anchor_lang::solana_program::program_option::COption::Some(delegate.pubkey()), "Delegate should still be set" ); } @@ -157,7 +157,7 @@ async fn test_delegate_compress() -> Result<(), RpcError> { ); assert_eq!( spl_account.delegate, - spl_token_2022::solana_program::program_option::COption::None, + anchor_lang::solana_program::program_option::COption::None, "Delegate should be cleared when delegated_amount reaches 0" ); } diff --git a/program-tests/compressed-token-test/tests/light_token/extensions.rs b/program-tests/compressed-token-test/tests/light_token/extensions.rs index 1061b5bd5e..37a995974b 100644 --- a/program-tests/compressed-token-test/tests/light_token/extensions.rs +++ b/program-tests/compressed-token-test/tests/light_token/extensions.rs @@ -426,7 +426,7 @@ async fn test_transfer_with_permanent_delegate() { AccountMeta::new_readonly(mint_pubkey, false), // mint (required for extension check) AccountMeta::new(account_b_pubkey, false), // destination AccountMeta::new(permanent_delegate, true), // authority (permanent delegate must sign) - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), // System program for compressible top-up + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), // System program for compressible top-up ], data, }; @@ -652,7 +652,7 @@ async fn test_transfer_with_owner_authority() { AccountMeta::new_readonly(mint_pubkey, false), // mint (required for extension check) AccountMeta::new(account_b_pubkey, false), // destination AccountMeta::new(owner.pubkey(), true), // authority (owner must sign) - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), // System program for compressible top-up + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), // System program for compressible top-up ], data, }; diff --git a/program-tests/compressed-token-test/tests/mint/functional.rs b/program-tests/compressed-token-test/tests/mint/functional.rs index dc9e7a5913..64cb2c42cb 100644 --- a/program-tests/compressed-token-test/tests/mint/functional.rs +++ b/program-tests/compressed-token-test/tests/mint/functional.rs @@ -1640,7 +1640,7 @@ async fn test_compress_and_close_mint_idempotent() { // Use a very low compute budget (10k) to verify the CPI is being skipped. // If CPI was executed, this would fail due to insufficient compute units. use light_client::rpc::Rpc; - use solana_sdk::compute_budget::ComputeBudgetInstruction; + use solana_compute_budget_interface::ComputeBudgetInstruction; let mint_action_ix = light_test_utils::actions::legacy::instructions::mint_action::create_mint_action_instruction( diff --git a/program-tests/compressed-token-test/tests/transfer2/no_system_program_cpi_failing.rs b/program-tests/compressed-token-test/tests/transfer2/no_system_program_cpi_failing.rs index beafaba7fa..a640f4b93b 100644 --- a/program-tests/compressed-token-test/tests/transfer2/no_system_program_cpi_failing.rs +++ b/program-tests/compressed-token-test/tests/transfer2/no_system_program_cpi_failing.rs @@ -281,8 +281,7 @@ fn build_compressions_only_instruction( }; // Serialize instruction data - let serialized = instruction_data - .try_to_vec() + let serialized = borsh::to_vec(&instruction_data) .map_err(|e| RpcError::AssertRpcError(format!("Failed to serialize: {:?}", e)))?; // Build instruction data with discriminator diff --git a/program-tests/create-address-test-program/Cargo.toml b/program-tests/create-address-test-program/Cargo.toml index fa98d87c87..da82fd9424 100644 --- a/program-tests/create-address-test-program/Cargo.toml +++ b/program-tests/create-address-test-program/Cargo.toml @@ -22,6 +22,7 @@ default = [] [dependencies] light-hasher = { workspace = true, features = ["poseidon"] } anchor-lang = { workspace = true } +borsh = { workspace = true } light-system-program-anchor = { workspace = true, features = ["cpi"] } account-compression = { workspace = true, features = ["cpi"] } light-compressed-account = { workspace = true, features = ["anchor"] } diff --git a/program-tests/create-address-test-program/src/create_pda.rs b/program-tests/create-address-test-program/src/create_pda.rs index 10660a0d4c..c14f117362 100644 --- a/program-tests/create-address-test-program/src/create_pda.rs +++ b/program-tests/create-address-test-program/src/create_pda.rs @@ -15,7 +15,7 @@ use light_hasher::{errors::HasherError, DataHasher, Poseidon}; use light_system_program::program::LightSystemProgram; pub fn process_create_pda<'info>( - ctx: Context<'_, '_, '_, 'info, CreateCompressedPda<'info>>, + ctx: Context<'info, CreateCompressedPda<'info>>, data: [u8; 31], proof: Option, new_address_params: NewAddressParamsPacked, @@ -33,7 +33,7 @@ pub fn process_create_pda<'info>( } fn cpi_compressed_pda_transfer_as_program<'info>( - ctx: &Context<'_, '_, '_, 'info, CreateCompressedPda<'info>>, + ctx: &Context<'info, CreateCompressedPda<'info>>, proof: Option, new_address_params: NewAddressParamsPacked, compressed_pda: OutputCompressedAccountWithPackedContext, @@ -74,7 +74,7 @@ fn cpi_compressed_pda_transfer_as_program<'info>( let signer_seeds: [&[&[u8]]; 1] = [&seeds[..]]; let mut cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.light_system_program.to_account_info(), + ctx.accounts.light_system_program.key(), cpi_accounts, &signer_seeds, ); @@ -87,7 +87,7 @@ fn cpi_compressed_pda_transfer_as_program<'info>( fn create_compressed_pda_data( data: [u8; 31], - ctx: &Context<'_, '_, '_, '_, CreateCompressedPda<'_>>, + ctx: &Context<'_, CreateCompressedPda<'_>>, new_address_params: &NewAddressParamsPacked, ) -> Result { let timelock_compressed_pda = RegisteredUser { @@ -96,7 +96,7 @@ fn create_compressed_pda_data( }; let compressed_account_data = CompressedAccountData { discriminator: 1u64.to_le_bytes(), - data: timelock_compressed_pda.try_to_vec().unwrap(), + data: borsh::to_vec(&timelock_compressed_pda).unwrap(), data_hash: timelock_compressed_pda.hash::().unwrap(), }; let mut discriminator_bytes = [0u8; 8]; diff --git a/program-tests/create-address-test-program/src/lib.rs b/program-tests/create-address-test-program/src/lib.rs index 8c24f68a18..4c80679c41 100644 --- a/program-tests/create-address-test-program/src/lib.rs +++ b/program-tests/create-address-test-program/src/lib.rs @@ -67,7 +67,7 @@ pub mod system_cpi_test { use super::*; pub fn create_compressed_pda<'info>( - ctx: Context<'_, '_, '_, 'info, CreateCompressedPda<'info>>, + ctx: Context<'info, CreateCompressedPda<'info>>, data: [u8; 31], proof: Option, new_address_parameters: NewAddressParamsPacked, @@ -80,7 +80,7 @@ pub mod system_cpi_test { /// This instruction is for tests only. It is insecure, do not use as /// inspiration to build a program with compressed accounts. pub fn invoke_cpi<'info>( - ctx: Context<'_, '_, '_, 'info, CreateCompressedPda<'info>>, + ctx: Context<'info, CreateCompressedPda<'info>>, inputs: Vec, bump: u8, ) -> Result<()> { @@ -89,7 +89,7 @@ pub mod system_cpi_test { /// Test wrapper, for with read-only and with account info instructions. pub fn invoke_with_read_only<'info>( - ctx: Context<'_, '_, '_, 'info, InvokeCpiReadOnly<'info>>, + ctx: Context<'info, InvokeCpiReadOnly<'info>>, config: CpiAccountsConfigLocal, v2_ix: bool, inputs: Vec, @@ -152,7 +152,7 @@ pub mod system_cpi_test { } pub fn invoke_cpi_multiple<'info>( - ctx: Context<'_, '_, '_, 'info, CreateCompressedPda<'info>>, + ctx: Context<'info, CreateCompressedPda<'info>>, inputs: Vec, bump: u8, num_invocations: u8, @@ -166,11 +166,11 @@ pub mod system_cpi_test { } pub fn process_invoke_cpi<'info>( - ctx: &Context<'_, '_, '_, 'info, CreateCompressedPda<'info>>, + ctx: &Context<'info, CreateCompressedPda<'info>>, inputs: Vec, bump: u8, ) -> Result<()> { - anchor_lang::solana_program::log::sol_log_compute_units(); + anchor_lang::solana_program::msg!("CU"); let cpi_accounts = light_system_program::cpi::accounts::InvokeCpiInstruction { fee_payer: ctx.accounts.signer.to_account_info(), authority: ctx.accounts.cpi_signer.to_account_info(), @@ -206,7 +206,7 @@ pub fn process_invoke_cpi<'info>( data: inputs, }; - anchor_lang::solana_program::log::sol_log_compute_units(); + anchor_lang::solana_program::msg!("CU"); // Invoke the instruction with signer seeds anchor_lang::solana_program::program::invoke_signed( diff --git a/program-tests/registry-test/tests/compressible.rs b/program-tests/registry-test/tests/compressible.rs index 9195fe76f0..449222b8c9 100644 --- a/program-tests/registry-test/tests/compressible.rs +++ b/program-tests/registry-test/tests/compressible.rs @@ -77,7 +77,7 @@ async fn withdraw_funding_pool_via_registry( rent_sponsor, compression_authority, destination, - system_program: solana_sdk::system_program::id(), + system_program: anchor_lang::solana_program::system_program::id(), compressed_token_program: compressed_token_program_id, }; diff --git a/program-tests/registry-test/tests/tests.rs b/program-tests/registry-test/tests/tests.rs index d93776fd97..21870febc4 100644 --- a/program-tests/registry-test/tests/tests.rs +++ b/program-tests/registry-test/tests/tests.rs @@ -210,7 +210,7 @@ async fn test_initialize_protocol_config() { // protocol_config_pda, // authority: payer.pubkey(), // fee_payer: payer.pubkey(), - // system_program: solana_sdk::system_program::id(), + // system_program: anchor_lang::solana_program::system_program::id(), // self_program: light_registry::ID, // }; // let ix = Instruction { @@ -234,7 +234,7 @@ async fn test_initialize_protocol_config() { protocol_config_pda, authority: program_account_keypair.pubkey(), fee_payer: payer.pubkey(), - system_program: solana_sdk::system_program::id(), + system_program: anchor_lang::solana_program::system_program::id(), self_program: light_registry::ID, }; let ix = Instruction { @@ -2089,7 +2089,7 @@ pub async fn perform_batch_address_merkle_tree_update< *derivation_pubkey, *merkle_tree_pubkey, epoch, - instruction_data.try_to_vec().unwrap(), + borsh::to_vec(&instruction_data).unwrap(), ); rpc.create_and_send_transaction(&[instruction], &forester.pubkey(), &[forester]) .await diff --git a/program-tests/system-cpi-test/Cargo.toml b/program-tests/system-cpi-test/Cargo.toml index d4302e5d3e..7463d1fe4f 100644 --- a/program-tests/system-cpi-test/Cargo.toml +++ b/program-tests/system-cpi-test/Cargo.toml @@ -22,6 +22,7 @@ default = ["custom-heap"] [dependencies] anchor-lang = { workspace = true } +borsh = { workspace = true } anchor-spl = { workspace = true } light-compressed-token = { workspace = true, features = ["cpi"] } light-token = { workspace = true } diff --git a/program-tests/system-cpi-test/src/cpi_context_event.rs b/program-tests/system-cpi-test/src/cpi_context_event.rs index dea10badb1..7380a70620 100644 --- a/program-tests/system-cpi-test/src/cpi_context_event.rs +++ b/program-tests/system-cpi-test/src/cpi_context_event.rs @@ -21,7 +21,7 @@ use light_sdk_types::{cpi_context_write::CpiContextWriteAccounts, LIGHT_SYSTEM_P use crate::LIGHT_CPI_SIGNER; pub fn process_cpi_context_indexing<'a, 'b, 'c, 'info>( - ctx: Context<'a, 'b, 'c, 'info, GenericAnchorAccounts<'info>>, + ctx: Context<'info, GenericAnchorAccounts<'info>>, mode: u8, ) -> Result<()> { let fee_payer = ctx.accounts.signer.to_account_info(); diff --git a/program-tests/system-cpi-test/src/cpi_context_event_inputs.rs b/program-tests/system-cpi-test/src/cpi_context_event_inputs.rs index b6a0062e3a..e5deaeae92 100644 --- a/program-tests/system-cpi-test/src/cpi_context_event_inputs.rs +++ b/program-tests/system-cpi-test/src/cpi_context_event_inputs.rs @@ -25,7 +25,7 @@ use light_sdk_types::{cpi_context_write::CpiContextWriteAccounts, LIGHT_SYSTEM_P use crate::{GenericAnchorAccounts, LIGHT_CPI_SIGNER}; pub fn process_cpi_context_indexing_inputs<'a, 'b, 'c, 'info>( - ctx: Context<'a, 'b, 'c, 'info, GenericAnchorAccounts<'info>>, + ctx: Context<'info, GenericAnchorAccounts<'info>>, mode: u8, leaf_indices: [u8; 3], ) -> Result<()> { diff --git a/program-tests/system-cpi-test/src/create_pda.rs b/program-tests/system-cpi-test/src/create_pda.rs index ad0a68f638..cc7476b865 100644 --- a/program-tests/system-cpi-test/src/create_pda.rs +++ b/program-tests/system-cpi-test/src/create_pda.rs @@ -57,7 +57,7 @@ pub enum CreatePdaMode { } pub fn process_create_pda<'info>( - ctx: Context<'_, '_, '_, 'info, CreateCompressedPda<'info>>, + ctx: Context<'info, CreateCompressedPda<'info>>, data: [u8; 31], proof: Option, new_address_params: NewAddressParamsPacked, @@ -186,7 +186,7 @@ pub fn process_create_pda<'info>( /// Functional: /// 1. ProgramIsSigner fn cpi_compressed_pda_transfer_as_non_program<'info>( - ctx: &Context<'_, '_, '_, 'info, CreateCompressedPda<'info>>, + ctx: &Context<'info, CreateCompressedPda<'info>>, proof: Option, new_address_params: NewAddressParamsPacked, compressed_pda: OutputCompressedAccountWithPackedContext, @@ -219,10 +219,7 @@ fn cpi_compressed_pda_transfer_as_non_program<'info>( system_program: ctx.accounts.system_program.to_account_info(), cpi_context_account: None, }; - let mut cpi_ctx = CpiContext::new( - ctx.accounts.light_system_program.to_account_info(), - cpi_accounts, - ); + let mut cpi_ctx = CpiContext::new(ctx.accounts.light_system_program.key(), cpi_accounts); cpi_ctx.remaining_accounts = ctx.remaining_accounts.to_vec(); @@ -231,7 +228,7 @@ fn cpi_compressed_pda_transfer_as_non_program<'info>( } fn cpi_compressed_pda_transfer_as_program<'info>( - ctx: &Context<'_, '_, '_, 'info, CreateCompressedPda<'info>>, + ctx: &Context<'info, CreateCompressedPda<'info>>, proof: Option, new_address_params: NewAddressParamsPacked, compressed_pda: OutputCompressedAccountWithPackedContext, @@ -429,7 +426,7 @@ fn cpi_compressed_pda_transfer_as_program<'info>( let signer_seeds: [&[&[u8]]; 1] = [&seeds[..]]; let mut cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.light_system_program.to_account_info(), + ctx.accounts.light_system_program.key(), cpi_accounts, &signer_seeds, ); @@ -458,21 +455,21 @@ fn cpi_compressed_pda_transfer_as_program<'info>( let signer_seeds: [&[&[u8]]; 1] = [&seeds[..]]; let mut cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.light_system_program.to_account_info(), + ctx.accounts.light_system_program.key(), cpi_accounts, &signer_seeds, ); cpi_ctx.remaining_accounts = ctx.remaining_accounts.to_vec(); - light_system_program::cpi::invoke_cpi(cpi_ctx, inputs_struct.try_to_vec().unwrap())?; + light_system_program::cpi::invoke_cpi(cpi_ctx, borsh::to_vec(&inputs_struct).unwrap())?; } Ok(()) } fn create_compressed_pda_data( data: [u8; 31], - ctx: &Context<'_, '_, '_, '_, CreateCompressedPda<'_>>, + ctx: &Context<'_, CreateCompressedPda<'_>>, new_address_params: &NewAddressParamsPacked, owner_program: &Pubkey, mode: CreatePdaMode, @@ -483,7 +480,7 @@ fn create_compressed_pda_data( }; let compressed_account_data = CompressedAccountData { discriminator: 1u64.to_le_bytes(), - data: timelock_compressed_pda.try_to_vec().unwrap(), + data: borsh::to_vec(&timelock_compressed_pda).unwrap(), data_hash: timelock_compressed_pda.hash::().unwrap(), }; let discriminator_bytes = &ctx.remaining_accounts diff --git a/program-tests/system-cpi-test/src/invalidate_not_owned_account.rs b/program-tests/system-cpi-test/src/invalidate_not_owned_account.rs index e44f2a98b7..125f1954b1 100644 --- a/program-tests/system-cpi-test/src/invalidate_not_owned_account.rs +++ b/program-tests/system-cpi-test/src/invalidate_not_owned_account.rs @@ -40,7 +40,7 @@ pub enum WithInputAccountsMode { // TODO: Functional tests with cpi context: // - ability to store multiple accounts in cpi context account and combine them successfully (can check with multiple token program invocations) pub fn process_with_input_accounts<'info>( - ctx: Context<'_, '_, '_, 'info, InvalidateNotOwnedCompressedAccount<'info>>, + ctx: Context<'info, InvalidateNotOwnedCompressedAccount<'info>>, compressed_account: PackedCompressedAccountWithMerkleContext, proof: Option, bump: u8, @@ -95,7 +95,7 @@ pub fn process_with_input_accounts<'info>( /// transfer tokens /// execute complete transaction pub fn process_invalidate_not_owned_compressed_account<'info>( - ctx: &Context<'_, '_, '_, 'info, InvalidateNotOwnedCompressedAccount<'info>>, + ctx: &Context<'info, InvalidateNotOwnedCompressedAccount<'info>>, compressed_account: PackedCompressedAccountWithMerkleContext, proof: Option, bump: u8, @@ -174,7 +174,7 @@ pub fn process_invalidate_not_owned_compressed_account<'info>( let signer_seeds: [&[&[u8]]; 1] = [&seeds[..]]; let mut cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.light_system_program.to_account_info(), + ctx.accounts.light_system_program.key(), cpi_accounts, &signer_seeds, ); @@ -225,7 +225,7 @@ pub struct TokenTransferData { #[inline(never)] pub fn cpi_context_tx<'info>( - ctx: &Context<'_, '_, '_, 'info, InvalidateNotOwnedCompressedAccount<'info>>, + ctx: &Context<'info, InvalidateNotOwnedCompressedAccount<'info>>, compressed_account: PackedCompressedAccountWithMerkleContext, proof: CompressedProof, bump: u8, @@ -292,7 +292,7 @@ pub fn cpi_context_tx<'info>( #[inline(never)] pub fn cpi_compressed_token_transfer<'info>( - ctx: &Context<'_, '_, '_, 'info, InvalidateNotOwnedCompressedAccount<'info>>, + ctx: &Context<'info, InvalidateNotOwnedCompressedAccount<'info>>, proof: CompressedProof, token_transfer_data: TokenTransferData, mode: WithInputAccountsMode, @@ -360,10 +360,7 @@ pub fn cpi_compressed_token_transfer<'info>( system_program: ctx.accounts.system_program.to_account_info(), }; - let mut cpi_ctx = CpiContext::new( - ctx.accounts.compressed_token_program.to_account_info(), - cpi_accounts, - ); + let mut cpi_ctx = CpiContext::new(ctx.accounts.compressed_token_program.key(), cpi_accounts); cpi_ctx.remaining_accounts = ctx.remaining_accounts.to_vec(); light_compressed_token::cpi::transfer(cpi_ctx, inputs)?; @@ -372,7 +369,7 @@ pub fn cpi_compressed_token_transfer<'info>( #[inline(never)] pub fn cpi_compressed_token_approve_revoke<'info>( - ctx: &Context<'_, '_, '_, 'info, InvalidateNotOwnedCompressedAccount<'info>>, + ctx: &Context<'info, InvalidateNotOwnedCompressedAccount<'info>>, proof: CompressedProof, token_transfer_data: TokenTransferData, mode: WithInputAccountsMode, @@ -441,10 +438,7 @@ pub fn cpi_compressed_token_approve_revoke<'info>( system_program: ctx.accounts.system_program.to_account_info(), }; - let mut cpi_ctx = CpiContext::new( - ctx.accounts.compressed_token_program.to_account_info(), - cpi_accounts, - ); + let mut cpi_ctx = CpiContext::new(ctx.accounts.compressed_token_program.key(), cpi_accounts); cpi_ctx.remaining_accounts = ctx.remaining_accounts.to_vec(); match mode { @@ -461,7 +455,7 @@ pub fn cpi_compressed_token_approve_revoke<'info>( #[inline(never)] pub fn cpi_compressed_token_burn<'info>( - ctx: &Context<'_, '_, '_, 'info, InvalidateNotOwnedCompressedAccount<'info>>, + ctx: &Context<'info, InvalidateNotOwnedCompressedAccount<'info>>, proof: CompressedProof, token_transfer_data: TokenTransferData, cpi_context: Option, @@ -508,10 +502,7 @@ pub fn cpi_compressed_token_burn<'info>( mint: ctx.accounts.mint.to_account_info(), }; - let mut cpi_ctx = CpiContext::new( - ctx.accounts.compressed_token_program.to_account_info(), - cpi_accounts, - ); + let mut cpi_ctx = CpiContext::new(ctx.accounts.compressed_token_program.key(), cpi_accounts); cpi_ctx.remaining_accounts = ctx.remaining_accounts.to_vec(); light_compressed_token::cpi::burn(cpi_ctx, inputs)?; @@ -521,7 +512,7 @@ pub fn cpi_compressed_token_burn<'info>( #[inline(never)] pub fn cpi_compressed_token_freeze_or_thaw<'info>( - ctx: &Context<'_, '_, '_, 'info, InvalidateNotOwnedCompressedAccount<'info>>, + ctx: &Context<'info, InvalidateNotOwnedCompressedAccount<'info>>, proof: CompressedProof, token_transfer_data: TokenTransferData, mode: WithInputAccountsMode, @@ -582,10 +573,7 @@ pub fn cpi_compressed_token_freeze_or_thaw<'info>( mint: ctx.accounts.mint.to_account_info(), }; - let mut cpi_ctx = CpiContext::new( - ctx.accounts.compressed_token_program.to_account_info(), - cpi_accounts, - ); + let mut cpi_ctx = CpiContext::new(ctx.accounts.compressed_token_program.key(), cpi_accounts); cpi_ctx.remaining_accounts = ctx.remaining_accounts.to_vec(); match mode { @@ -601,7 +589,7 @@ pub fn cpi_compressed_token_freeze_or_thaw<'info>( } fn write_into_cpi_account<'info>( - ctx: &Context<'_, '_, '_, 'info, InvalidateNotOwnedCompressedAccount<'info>>, + ctx: &Context<'info, InvalidateNotOwnedCompressedAccount<'info>>, compressed_account: PackedCompressedAccountWithMerkleContext, proof: Option, bump: u8, @@ -654,7 +642,7 @@ fn write_into_cpi_account<'info>( let signer_seeds: [&[&[u8]]; 1] = [&seeds[..]]; let mut cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.light_system_program.to_account_info(), + ctx.accounts.light_system_program.key(), cpi_accounts, &signer_seeds, ); diff --git a/program-tests/system-cpi-test/src/lib.rs b/program-tests/system-cpi-test/src/lib.rs index 6f74aef26b..30ae0af3f5 100644 --- a/program-tests/system-cpi-test/src/lib.rs +++ b/program-tests/system-cpi-test/src/lib.rs @@ -42,7 +42,7 @@ pub mod system_cpi_test { use super::*; pub fn create_compressed_pda<'info>( - ctx: Context<'_, '_, '_, 'info, CreateCompressedPda<'info>>, + ctx: Context<'info, CreateCompressedPda<'info>>, data: [u8; 31], proof: Option, new_address_parameters: NewAddressParamsPacked, @@ -70,7 +70,7 @@ pub mod system_cpi_test { } pub fn with_input_accounts<'info>( - ctx: Context<'_, '_, '_, 'info, InvalidateNotOwnedCompressedAccount<'info>>, + ctx: Context<'info, InvalidateNotOwnedCompressedAccount<'info>>, compressed_account: PackedCompressedAccountWithMerkleContext, proof: Option, bump: u8, @@ -90,7 +90,7 @@ pub mod system_cpi_test { } pub fn insert_into_queues<'info>( - ctx: Context<'_, '_, '_, 'info, InsertIntoQueues<'info>>, + ctx: Context<'info, InsertIntoQueues<'info>>, is_batched: bool, cpi_bump: u8, ) -> Result<()> { @@ -101,7 +101,7 @@ pub mod system_cpi_test { let bump = &[bump]; let seeds = [&[CPI_AUTHORITY_PDA_SEED, bump][..]]; let mut cpi_context = CpiContext::new_with_signer( - ctx.accounts.account_compression_program.to_account_info(), + ctx.accounts.account_compression_program.key(), accounts, &seeds, ); @@ -160,7 +160,7 @@ pub mod system_cpi_test { registered_program_pda: Some(ctx.accounts.registered_program_pda.clone()), }; let cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.account_compression_program.to_account_info(), + ctx.accounts.account_compression_program.key(), accounts, signer_seeds, ); @@ -196,7 +196,7 @@ pub mod system_cpi_test { registered_program_pda: Some(ctx.accounts.registered_program_pda.clone()), }; let cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.account_compression_program.to_account_info(), + ctx.accounts.account_compression_program.key(), accounts, signer_seeds, ); @@ -213,14 +213,14 @@ pub mod system_cpi_test { } pub fn cpi_context_indexing<'a, 'b, 'c, 'info>( - ctx: Context<'a, 'b, 'c, 'info, GenericAnchorAccounts<'info>>, + ctx: Context<'info, GenericAnchorAccounts<'info>>, mode: u8, ) -> Result<()> { process_cpi_context_indexing(ctx, mode) } pub fn cpi_context_indexing_inputs<'a, 'b, 'c, 'info>( - ctx: Context<'a, 'b, 'c, 'info, GenericAnchorAccounts<'info>>, + ctx: Context<'info, GenericAnchorAccounts<'info>>, mode: u8, leaf_indices: [u8; 3], ) -> Result<()> { diff --git a/program-tests/system-cpi-test/src/sdk.rs b/program-tests/system-cpi-test/src/sdk.rs index 8914ff7b74..6e4157e68b 100644 --- a/program-tests/system-cpi-test/src/sdk.rs +++ b/program-tests/system-cpi-test/src/sdk.rs @@ -117,7 +117,7 @@ pub fn create_pda_instruction(input_params: CreateCompressedPdaInstructionInputs account_compression_authority, self_program: crate::ID, cpi_signer, - system_program: solana_sdk::system_program::id(), + system_program: anchor_lang::solana_program::system_program::id(), }; let remaining_accounts = to_account_metas_light(remaining_accounts); @@ -188,7 +188,7 @@ pub fn create_invalidate_not_owned_account_instruction( account_compression_authority, self_program: crate::ID, cpi_signer, - system_program: solana_sdk::system_program::id(), + system_program: anchor_lang::solana_program::system_program::id(), compressed_token_program: light_compressed_token::ID, invalid_fee_payer: *input_params.invalid_fee_payer, token_pool_account, diff --git a/program-tests/system-cpi-test/tests/test.rs b/program-tests/system-cpi-test/tests/test.rs index 885eadbd9d..d93f9994c2 100644 --- a/program-tests/system-cpi-test/tests/test.rs +++ b/program-tests/system-cpi-test/tests/test.rs @@ -165,7 +165,7 @@ async fn test_read_only_accounts() { env.protocol.forester.pubkey(), env.v2_address_trees[0], 0, - instruction_data.try_to_vec().unwrap(), + borsh::to_vec(&instruction_data).unwrap(), ); e2e_env .rpc diff --git a/program-tests/system-cpi-v2-test/tests/event.rs b/program-tests/system-cpi-v2-test/tests/event.rs index 9425d72144..8ae092cc0f 100644 --- a/program-tests/system-cpi-v2-test/tests/event.rs +++ b/program-tests/system-cpi-v2-test/tests/event.rs @@ -732,7 +732,7 @@ pub async fn perform_test_transaction( payer.pubkey(), [ light_system_program::instruction::InvokeCpiWithReadOnly::DISCRIMINATOR.to_vec(), - ix_data.try_to_vec().unwrap(), + borsh::to_vec(&ix_data).unwrap(), ] .concat(), remaining_accounts, diff --git a/program-tests/system-test/tests/test.rs b/program-tests/system-test/tests/test.rs index 4262a24232..d253bc39b2 100644 --- a/program-tests/system-test/tests/test.rs +++ b/program-tests/system-test/tests/test.rs @@ -853,7 +853,7 @@ pub async fn create_instruction_and_failing_transaction( account_compression_authority: get_cpi_authority_pda(&light_system_program::ID), sol_pool_pda, decompression_recipient: None, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction = Instruction { program_id: light_system_program::ID, diff --git a/program-tests/system-test/tests/v2_failing_tests.rs b/program-tests/system-test/tests/v2_failing_tests.rs index 3f59ca0051..1a49d4caf8 100644 --- a/program-tests/system-test/tests/v2_failing_tests.rs +++ b/program-tests/system-test/tests/v2_failing_tests.rs @@ -141,7 +141,7 @@ fn test_cpi_context_new_address_uses_invoking_program_owner_without_inputs() { let instruction_data = create_instruction_data_with_new_address_no_inputs(output_account_owner); // Serialize and deserialize to zero-copy format - let input_bytes = instruction_data.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&instruction_data).unwrap(); let (z_inputs, _) = ZInstructionDataInvokeCpi::zero_copy_at(&input_bytes).unwrap(); let w_instruction_data = WrappedInstructionData::new(z_inputs).unwrap(); @@ -253,7 +253,7 @@ fn test_cpi_context_new_address_uses_invoking_program_owner_with_inputs() { }; // Serialize and deserialize to zero-copy format - let input_bytes = instruction_data.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&instruction_data).unwrap(); let (z_inputs, _) = ZInstructionDataInvokeCpi::zero_copy_at(&input_bytes).unwrap(); let w_instruction_data = WrappedInstructionData::new(z_inputs).unwrap(); @@ -388,7 +388,7 @@ async fn test_duplicate_address_in_v2_batched_tree() { payer.pubkey(), [ light_system_program::instruction::InvokeCpiWithReadOnly::DISCRIMINATOR.to_vec(), - ix_data.try_to_vec().unwrap(), + borsh::to_vec(&ix_data).unwrap(), ] .concat(), remaining_accounts, @@ -466,7 +466,7 @@ async fn test_address_position_with_none_in_context_addresses() { payer.pubkey(), [ light_system_program::instruction::InvokeCpiWithReadOnly::DISCRIMINATOR.to_vec(), - ix_data.try_to_vec().unwrap(), + borsh::to_vec(&ix_data).unwrap(), ] .concat(), remaining_accounts_vec, @@ -583,7 +583,7 @@ async fn test_address_position_with_none_in_context_addresses() { payer.pubkey(), [ light_system_program::instruction::InvokeCpiWithReadOnly::DISCRIMINATOR.to_vec(), - ix_data.try_to_vec().unwrap(), + borsh::to_vec(&ix_data).unwrap(), ] .concat(), remaining_accounts_vec, diff --git a/program-tests/utils/Cargo.toml b/program-tests/utils/Cargo.toml index 91a81b79fc..0d472eacad 100644 --- a/program-tests/utils/Cargo.toml +++ b/program-tests/utils/Cargo.toml @@ -18,6 +18,8 @@ anchor-spl = { workspace = true } num-bigint = { workspace = true, features = ["rand"] } num-traits = { workspace = true } solana-sdk = { workspace = true } +solana-commitment-config = { workspace = true } +solana-program-pack = { version = "3.0" } solana-system-interface = { workspace = true } thiserror = { workspace = true } account-compression = { workspace = true, features = ["cpi"] } diff --git a/program-tests/utils/src/address_tree_rollover.rs b/program-tests/utils/src/address_tree_rollover.rs index efc52387d5..8fb680f9bb 100644 --- a/program-tests/utils/src/address_tree_rollover.rs +++ b/program-tests/utils/src/address_tree_rollover.rs @@ -149,7 +149,6 @@ pub async fn assert_rolled_over_address_merkle_tree_and_queue( &mut new_mt_account.data, &account_compression::ID, false, - 0u64, ); let new_mt_account = AccountLoader::::try_from(&account_info).unwrap(); @@ -170,7 +169,6 @@ pub async fn assert_rolled_over_address_merkle_tree_and_queue( &mut old_mt_account.data, &account_compression::ID, false, - 0u64, ); let old_mt_account = AccountLoader::::try_from(&account_info).unwrap(); @@ -220,7 +218,6 @@ pub async fn assert_rolled_over_address_merkle_tree_and_queue( &mut new_queue_account.data, &account_compression::ID, false, - 0u64, ); let new_queue_account = AccountLoader::::try_from(&account_info).unwrap(); let new_loaded_queue_account = new_queue_account.load().unwrap(); @@ -235,7 +232,6 @@ pub async fn assert_rolled_over_address_merkle_tree_and_queue( &mut old_queue_account.data, &account_compression::ID, false, - 0u64, ); let old_queue_account = AccountLoader::::try_from(&account_info).unwrap(); let old_loaded_queue_account = old_queue_account.load().unwrap(); diff --git a/program-tests/utils/src/assert_ctoken_transfer.rs b/program-tests/utils/src/assert_ctoken_transfer.rs index ddb7e81ce0..22fa6cb467 100644 --- a/program-tests/utils/src/assert_ctoken_transfer.rs +++ b/program-tests/utils/src/assert_ctoken_transfer.rs @@ -1,8 +1,9 @@ -use anchor_spl::token_2022::spl_token_2022::{self, solana_program::program_pack::Pack}; +use anchor_spl::token_2022::spl_token_2022; use light_client::rpc::Rpc; use light_program_test::LightProgramTest; use light_token_interface::state::Token; use light_zero_copy::traits::ZeroCopyAt; +use solana_program_pack::Pack; use solana_sdk::pubkey::Pubkey; /// Assert compressible extension properties for an account, using cached pre-transaction state diff --git a/program-tests/utils/src/assert_transfer2.rs b/program-tests/utils/src/assert_transfer2.rs index cc3aa57676..7df664e810 100644 --- a/program-tests/utils/src/assert_transfer2.rs +++ b/program-tests/utils/src/assert_transfer2.rs @@ -49,7 +49,7 @@ pub async fn assert_transfer2_with_delegate( // Handle delegate amount decrement when delegate is compressing let expected = expected_spl_accounts.get_mut(&pubkey).unwrap(); if expected.delegate - == spl_token_2022::solana_program::program_option::COption::Some( + == anchor_lang::solana_program::program_option::COption::Some( compress_input.authority, ) { @@ -59,7 +59,7 @@ pub async fn assert_transfer2_with_delegate( .expect("Delegate compress amount exceeds delegated_amount"); if expected.delegated_amount == 0 { expected.delegate = - spl_token_2022::solana_program::program_option::COption::None; + anchor_lang::solana_program::program_option::COption::None; } } } @@ -474,7 +474,7 @@ pub async fn assert_transfer2_with_delegate( }; // Delegate is preserved from the original account - use spl_token_2022::solana_program::program_option::COption; + use anchor_lang::solana_program::program_option::COption; let expected_delegate: Option = match pre_token_account.delegate { COption::Some(d) => Some(d), COption::None => None, @@ -547,7 +547,7 @@ pub async fn assert_transfer2_with_delegate( "CompressAndClose source account data should be cleared" ); assert_eq!( - acc.owner, solana_sdk::system_program::ID, + acc.owner, anchor_lang::solana_program::system_program::ID, "CompressAndClose source account owner should be System Program after closing" ); } diff --git a/program-tests/utils/src/create_address_test_program_sdk.rs b/program-tests/utils/src/create_address_test_program_sdk.rs index 60b7f978c0..07b899f6ca 100644 --- a/program-tests/utils/src/create_address_test_program_sdk.rs +++ b/program-tests/utils/src/create_address_test_program_sdk.rs @@ -59,7 +59,7 @@ pub fn create_pda_instruction(input_params: CreateCompressedPdaInstructionInputs account_compression_authority, self_program: create_address_test_program::ID, cpi_signer, - system_program: solana_sdk::system_program::id(), + system_program: anchor_lang::solana_program::system_program::id(), }; let remaining_accounts = to_account_metas_light(remaining_accounts); diff --git a/program-tests/utils/src/e2e_test_env.rs b/program-tests/utils/src/e2e_test_env.rs index 097ae1f9a9..41d6d1dcb0 100644 --- a/program-tests/utils/src/e2e_test_env.rs +++ b/program-tests/utils/src/e2e_test_env.rs @@ -165,11 +165,11 @@ use rand::{ }; use reqwest::Client; use solana_sdk::{ + native_token::LAMPORTS_PER_SOL, pubkey::Pubkey, signature::{Keypair, Signature}, signer::{SeedDerivable, Signer}, }; -use spl_token::solana_program::native_token::LAMPORTS_PER_SOL; use crate::{ address_tree_rollover::{ @@ -860,7 +860,7 @@ where payer.pubkey(), merkle_tree_pubkey, self.epoch, - instruction_data.try_to_vec().unwrap(), + borsh::to_vec(&instruction_data).unwrap(), ); self.rpc .create_and_send_transaction( @@ -2867,7 +2867,7 @@ where user.pubkey(), [ light_system_program::instruction::InvokeCpiWithReadOnly::DISCRIMINATOR.to_vec(), - ix_data.try_to_vec().unwrap(), + borsh::to_vec(&ix_data).unwrap(), ] .concat(), remaining_accounts, diff --git a/program-tests/utils/src/setup_accounts.rs b/program-tests/utils/src/setup_accounts.rs index c52fd86002..8b0bba42ec 100644 --- a/program-tests/utils/src/setup_accounts.rs +++ b/program-tests/utils/src/setup_accounts.rs @@ -8,7 +8,7 @@ use light_program_test::{ pub async fn setup_accounts(keypairs: TestKeypairs, url: RpcUrl) -> Result { use light_client::rpc::LightClientConfig; - use solana_sdk::commitment_config::CommitmentConfig; + use solana_commitment_config::CommitmentConfig; let mut rpc = light_client::rpc::LightClient::new(LightClientConfig { commitment_config: Some(CommitmentConfig::confirmed()), diff --git a/program-tests/utils/src/state_tree_rollover.rs b/program-tests/utils/src/state_tree_rollover.rs index 1402c2f749..077b615a1d 100644 --- a/program-tests/utils/src/state_tree_rollover.rs +++ b/program-tests/utils/src/state_tree_rollover.rs @@ -182,7 +182,6 @@ pub async fn assert_rolled_over_pair( &mut new_mt_account.data, &ID, false, - 0u64, ); let new_mt_account = AccountLoader::::try_from(&old_account_info).unwrap(); @@ -203,7 +202,6 @@ pub async fn assert_rolled_over_pair( &mut old_mt_account.data, &account_compression::ID, false, - 0u64, ); let old_mt_account = AccountLoader::::try_from(&new_account_info).unwrap(); @@ -243,7 +241,6 @@ pub async fn assert_rolled_over_pair( &mut new_queue_account.data, &account_compression::ID, false, - 0u64, ); let new_queue_account = AccountLoader::::try_from(&account_info).unwrap(); let new_loaded_queue_account = new_queue_account.load().unwrap(); @@ -261,7 +258,6 @@ pub async fn assert_rolled_over_pair( &mut old_queue_account.data, &account_compression::ID, false, - 0u64, ); let old_queue_account = AccountLoader::::try_from(&account_info).unwrap(); let old_loaded_queue_account = old_queue_account.load().unwrap(); diff --git a/program-tests/utils/src/system_program.rs b/program-tests/utils/src/system_program.rs index 54a12e7511..532a873877 100644 --- a/program-tests/utils/src/system_program.rs +++ b/program-tests/utils/src/system_program.rs @@ -531,7 +531,7 @@ pub fn create_invoke_instruction( account_compression_authority: get_cpi_authority_pda(&light_system_program::ID), sol_pool_pda, decompression_recipient, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; Instruction { program_id: light_system_program::ID, diff --git a/program-tests/utils/src/test_batch_forester.rs b/program-tests/utils/src/test_batch_forester.rs index a28efa9ca3..f69bf9c703 100644 --- a/program-tests/utils/src/test_batch_forester.rs +++ b/program-tests/utils/src/test_batch_forester.rs @@ -67,7 +67,7 @@ pub async fn perform_batch_append( bundle.accounts.merkle_tree, bundle.accounts.nullifier_queue, epoch, - data.try_to_vec().unwrap(), + borsh::to_vec(&data).unwrap(), ); let res = rpc .create_and_send_transaction(&[instruction], &forester.pubkey(), &[forester]) @@ -209,7 +209,7 @@ pub async fn perform_batch_nullify( forester.pubkey(), merkle_tree_pubkey, epoch, - data.try_to_vec().unwrap(), + borsh::to_vec(&data).unwrap(), ); rpc.create_and_send_transaction(&[instruction], &forester.pubkey(), &[forester]) .await diff --git a/program-tests/zero-copy-derive-test/tests/instruction_data.rs b/program-tests/zero-copy-derive-test/tests/instruction_data.rs index 5f0fbfbdac..24ba0cd0a0 100644 --- a/program-tests/zero-copy-derive-test/tests/instruction_data.rs +++ b/program-tests/zero-copy-derive-test/tests/instruction_data.rs @@ -1144,7 +1144,7 @@ fn readme() { c: 3, }; // Use the struct with zero-copy deserialization - let bytes = my_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&my_struct).unwrap(); // byte_len not available for non-mut derivations // assert_eq!(bytes.len(), my_struct.byte_len()); let (zero_copy, _remaining) = MyStruct::zero_copy_at(&bytes).unwrap(); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/02_single_u8_field.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/02_single_u8_field.rs index 5a7fd99d7c..d71df3eccd 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/02_single_u8_field.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/02_single_u8_field.rs @@ -13,7 +13,7 @@ pub struct SingleU8 { fn main() { // Test Borsh compatibility let ref_struct = SingleU8 { value: 42 }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (struct_copy, remaining) = SingleU8::zero_copy_at(&bytes).unwrap(); assert_eq!(struct_copy, ref_struct); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/03_all_primitives.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/03_all_primitives.rs index ee57ac73d9..625c3e4f24 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/03_all_primitives.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/03_all_primitives.rs @@ -31,7 +31,7 @@ fn main() { h: -4, i: true, }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (struct_copy, _remaining) = AllPrimitives::zero_copy_at(&bytes).unwrap(); assert_eq!(ref_struct, struct_copy); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/04_nested_vecs.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/04_nested_vecs.rs index faffed3c6b..09bf5e1559 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/04_nested_vecs.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/04_nested_vecs.rs @@ -20,7 +20,7 @@ fn main() { nums: vec![10, 20], more: vec![100, 200, 300, 400], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = NestedVecs::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/05_nested_options.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/05_nested_options.rs index 5ac25f672a..7c9aa8e955 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/05_nested_options.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/05_nested_options.rs @@ -18,7 +18,7 @@ fn main() { opt_u32: Some(200), opt_u64: None, }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = NestedOptions::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Option fields diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/06_array_fields.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/06_array_fields.rs index 5c2b527e8c..d96cc4fb58 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/06_array_fields.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/06_array_fields.rs @@ -19,7 +19,7 @@ fn main() { medium: [10; 16], large: [100; 256], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = ArrayFields::zero_copy_at(&bytes).unwrap(); assert!(remaining.is_empty()); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/09_enum_unit_variants.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/09_enum_unit_variants.rs index 5645d1fe7f..ac96e54f63 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/09_enum_unit_variants.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/09_enum_unit_variants.rs @@ -16,7 +16,7 @@ pub enum UnitEnum { fn main() { // Test Borsh compatibility let ref_enum = UnitEnum::Third; - let bytes = ref_enum.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_enum).unwrap(); let (_enum_copy, remaining) = UnitEnum::zero_copy_at(&bytes).unwrap(); // Note: ZeroCopyEq not supported for enums diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/10_enum_mixed_variants.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/10_enum_mixed_variants.rs index 2fd5b64b8f..94ab399e84 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/10_enum_mixed_variants.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/10_enum_mixed_variants.rs @@ -14,7 +14,7 @@ pub enum MixedEnum { fn main() { // Test Borsh compatibility let ref_enum = MixedEnum::WithData(42); - let bytes = ref_enum.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_enum).unwrap(); let (_enum_copy, remaining) = MixedEnum::zero_copy_at(&bytes).unwrap(); // Note: ZeroCopyEq not supported for enums diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/11_pubkey_fields.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/11_pubkey_fields.rs index 9743355760..8ace27dd8d 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/11_pubkey_fields.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/11_pubkey_fields.rs @@ -24,7 +24,7 @@ fn main() { authority: Pubkey([2; 32]), mint: Pubkey([3; 32]), }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (struct_copy, remaining) = PubkeyFields::zero_copy_at(&bytes).unwrap(); assert_eq!(struct_copy, ref_struct); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/12_mixed_visibility.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/12_mixed_visibility.rs index 32ef9f4f10..95e6cd8ef2 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/12_mixed_visibility.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/12_mixed_visibility.rs @@ -20,7 +20,7 @@ fn main() { crate_field: 200, private_field: vec![1, 2, 3], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = MixedVisibility::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec fields diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/13_large_struct.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/13_large_struct.rs index 1a19f67cf2..0decf47161 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/13_large_struct.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/13_large_struct.rs @@ -63,7 +63,7 @@ fn main() { field_024: 24, field_025: 25, }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = LargeStruct::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec fields diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/14_vec_of_arrays.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/14_vec_of_arrays.rs index 7638b320a9..b54db10a7d 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/14_vec_of_arrays.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/14_vec_of_arrays.rs @@ -16,7 +16,7 @@ fn main() { let ref_struct = VecOfArrays { data: vec![[1; 32], [2; 32]], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = VecOfArrays::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec fields diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/15_option_vec.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/15_option_vec.rs index b0e945eac2..4a326d0cd9 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/15_option_vec.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/15_option_vec.rs @@ -16,7 +16,7 @@ fn main() { let ref_struct = OptionVec { maybe_data: Some(vec![1, 2, 3, 4, 5]), }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = OptionVec::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Option diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/16_bool_fields.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/16_bool_fields.rs index a4b78f5845..d2c91f1239 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/16_bool_fields.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/16_bool_fields.rs @@ -21,7 +21,7 @@ fn main() { flag3: true, flag4: false, }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (struct_copy, _remaining) = BoolFields::zero_copy_at(&bytes).unwrap(); assert_eq!(struct_copy, ref_struct); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/17_signed_integers.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/17_signed_integers.rs index e454b7e222..9ededc9d40 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/17_signed_integers.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/17_signed_integers.rs @@ -21,7 +21,7 @@ fn main() { medium: -1000, large: -10000, }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (struct_copy, _remaining) = SignedIntegers::zero_copy_at(&bytes).unwrap(); assert_eq!(struct_copy, ref_struct); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/18_zero_sized_arrays.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/18_zero_sized_arrays.rs index 60d475fc89..dee216acab 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/18_zero_sized_arrays.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/18_zero_sized_arrays.rs @@ -17,7 +17,7 @@ fn main() { empty: [], value: 42, }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (struct_copy, _remaining) = ZeroSizedArray::zero_copy_at(&bytes).unwrap(); assert_eq!(struct_copy, ref_struct); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/19_max_sized_array.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/19_max_sized_array.rs index 791fdf2a78..58f1933e67 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/19_max_sized_array.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/19_max_sized_array.rs @@ -13,7 +13,7 @@ pub struct MaxArray { fn main() { // Test Borsh compatibility let ref_struct = MaxArray { huge: [42; 65536] }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (struct_copy, remaining) = MaxArray::zero_copy_at(&bytes).unwrap(); assert_eq!(struct_copy, ref_struct); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/20_nested_struct_fields.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/20_nested_struct_fields.rs index aa99406f3a..e666cea2d2 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/20_nested_struct_fields.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/20_nested_struct_fields.rs @@ -24,7 +24,7 @@ fn main() { inner: Inner { value: 42 }, data: vec![1, 2, 3, 4], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = Outer::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/21_enum_single_variant.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/21_enum_single_variant.rs index d5b4eb4d90..47e920f20e 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/21_enum_single_variant.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/21_enum_single_variant.rs @@ -14,7 +14,7 @@ pub enum SingleVariant { fn main() { // Test Borsh compatibility let ref_enum = SingleVariant::Only; - let bytes = ref_enum.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_enum).unwrap(); let (_enum_copy, remaining) = SingleVariant::zero_copy_at(&bytes).unwrap(); assert!(remaining.is_empty()); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/22_primitive_after_vec.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/22_primitive_after_vec.rs index e42b36f0bc..9881939049 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/22_primitive_after_vec.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/22_primitive_after_vec.rs @@ -20,7 +20,7 @@ fn main() { count: 100, flag: true, }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = PrimitiveAfterVec::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/23_multiple_options_after_vec.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/23_multiple_options_after_vec.rs index b7ad7f7df5..d2cbb3cba7 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/23_multiple_options_after_vec.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/23_multiple_options_after_vec.rs @@ -22,7 +22,7 @@ fn main() { opt2: None, opt3: Some(100), }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = OptionsAfterVec::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/24_vec_option_vec.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/24_vec_option_vec.rs index 11ac8e0b64..86fe9c4aad 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/24_vec_option_vec.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/24_vec_option_vec.rs @@ -20,7 +20,7 @@ fn main() { middle: Some(42), last: vec![10, 20, 30], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = VecOptionVec::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/25_all_optional.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/25_all_optional.rs index f8e2b08a4e..05f625f9d8 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/25_all_optional.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/25_all_optional.rs @@ -20,7 +20,7 @@ fn main() { maybe_b: None, maybe_c: Some(vec![1, 2, 3]), }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = AllOptional::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/26_deep_nesting.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/26_deep_nesting.rs index 0881e7391f..8a3eae8e81 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/26_deep_nesting.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/26_deep_nesting.rs @@ -15,7 +15,7 @@ fn main() { let ref_struct = DeepNesting { nested: Some(Some(42)), }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = DeepNesting::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Option fields diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/27_mixed_arrays.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/27_mixed_arrays.rs index 13ef474f1c..96565a0c33 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/27_mixed_arrays.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/27_mixed_arrays.rs @@ -22,7 +22,7 @@ fn main() { medium: [3; 32], large: [4; 128], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = MixedArrays::zero_copy_at(&bytes).unwrap(); assert!(remaining.is_empty()); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/28_field_named_data.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/28_field_named_data.rs index e716720279..ced8f0f276 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/28_field_named_data.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/28_field_named_data.rs @@ -18,7 +18,7 @@ fn main() { data: 42, bytes: vec![1, 2, 3], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = FieldNamedData::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/29_field_named_bytes.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/29_field_named_bytes.rs index 67af6a54b7..64c9aaa56f 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/29_field_named_bytes.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/29_field_named_bytes.rs @@ -18,7 +18,7 @@ fn main() { bytes: 42, data: vec![1, 2, 3], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = FieldNamedBytes::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/30_underscore_fields.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/30_underscore_fields.rs index 09574f6b3f..bf40047264 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/30_underscore_fields.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/30_underscore_fields.rs @@ -20,7 +20,7 @@ fn main() { __internal: 200, normal_field: vec![1, 2, 3], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = UnderscoreFields::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/31_numeric_suffix_fields.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/31_numeric_suffix_fields.rs index 4afc5ac81d..645677eca7 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/31_numeric_suffix_fields.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/31_numeric_suffix_fields.rs @@ -24,7 +24,7 @@ fn main() { data1: vec![1, 2, 3], data2: vec![100, 200], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = NumericSuffixFields::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/32_camel_case_fields.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/32_camel_case_fields.rs index 0af63cab96..0f05422af8 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/32_camel_case_fields.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/32_camel_case_fields.rs @@ -21,7 +21,7 @@ fn main() { AnotherField: vec![1, 2, 3], YetAnotherField: Some(100), }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = CamelCaseFields::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/33_single_letter_fields.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/33_single_letter_fields.rs index 7b708ec24a..f067f0a8e9 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/33_single_letter_fields.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/33_single_letter_fields.rs @@ -26,7 +26,7 @@ fn main() { e: vec![5, 6, 7], f: Some(8), }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = SingleLetterFields::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/34_vec_of_bools.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/34_vec_of_bools.rs index 03f6c12969..cf97e01454 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/34_vec_of_bools.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/34_vec_of_bools.rs @@ -16,7 +16,7 @@ fn main() { let ref_struct = VecOfBools { flags: vec![true, false, true], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = VecOfBools::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/35_option_bool.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/35_option_bool.rs index a80299cba1..35181570c6 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/35_option_bool.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/35_option_bool.rs @@ -16,7 +16,7 @@ fn main() { let ref_struct = OptionBool { maybe_flag: Some(true), }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = OptionBool::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Option diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/36_array_of_bools.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/36_array_of_bools.rs index 06d1477b81..2d3f420ff1 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/36_array_of_bools.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/36_array_of_bools.rs @@ -14,7 +14,7 @@ pub struct ArrayOfBools { fn main() { // Test Borsh compatibility let ref_struct = ArrayOfBools { flags: [true; 32] }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = ArrayOfBools::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with array fields diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/37_meta_boundary_primitive.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/37_meta_boundary_primitive.rs index 4792d177f4..51a935957d 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/37_meta_boundary_primitive.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/37_meta_boundary_primitive.rs @@ -26,7 +26,7 @@ fn main() { d: 30, e: 40, }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = MetaBoundaryPrimitive::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/38_meta_boundary_option.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/38_meta_boundary_option.rs index 13e3346110..3d50b99683 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/38_meta_boundary_option.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/38_meta_boundary_option.rs @@ -21,7 +21,7 @@ fn main() { opt: Some(42), c: 30, }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (struct_copy, remaining) = MetaBoundaryOption::zero_copy_at(&bytes).unwrap(); assert_eq!(struct_copy, ref_struct); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/39_enum_with_array.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/39_enum_with_array.rs index 2b4290e122..c112a78ebf 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/39_enum_with_array.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/39_enum_with_array.rs @@ -15,7 +15,7 @@ pub enum EnumWithArray { fn main() { // Test Borsh compatibility let ref_enum = EnumWithArray::WithArray([42; 32]); - let bytes = ref_enum.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_enum).unwrap(); let (_enum_copy, remaining) = EnumWithArray::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation for enums diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/40_enum_discriminant_order.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/40_enum_discriminant_order.rs index 1c9ed3d9fd..907fe0c172 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/40_enum_discriminant_order.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/40_enum_discriminant_order.rs @@ -23,7 +23,7 @@ pub enum ManyVariants { fn main() { // Test Borsh compatibility let ref_enum = ManyVariants::V5; - let bytes = ref_enum.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_enum).unwrap(); let (_enum_copy, remaining) = ManyVariants::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation for enums diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/41_struct_with_lifetime_name.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/41_struct_with_lifetime_name.rs index 1dba124f51..111d91d845 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/41_struct_with_lifetime_name.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/41_struct_with_lifetime_name.rs @@ -20,7 +20,7 @@ fn main() { lifetime: 42, static_field: vec![1, 2, 3], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = LifetimeName::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/42_reserved_keywords.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/42_reserved_keywords.rs index f79ac20b43..8b763f4b9a 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/42_reserved_keywords.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/42_reserved_keywords.rs @@ -22,7 +22,7 @@ fn main() { mut_: true, fn_: vec![1, 2, 3], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = ReservedKeywords::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/43_alternating_types.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/43_alternating_types.rs index 737a4c8633..23bc114444 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/43_alternating_types.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/43_alternating_types.rs @@ -26,7 +26,7 @@ fn main() { }; // Test Borsh compatibility - let bytes = instance.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&instance).unwrap(); let (_struct_copy, remaining) = AlternatingTypes::zero_copy_at(&bytes).unwrap(); // Note: Can't compare entire structs due to Vec fields, but can check primitive diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/44_all_vecs.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/44_all_vecs.rs index 6143b13317..da4d3d5897 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/44_all_vecs.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/44_all_vecs.rs @@ -24,7 +24,7 @@ fn main() { }; // Test Borsh serialization - let bytes = instance.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&instance).unwrap(); let deserialized = AllVecs::try_from_slice(&bytes).unwrap(); // Test zero_copy_at diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/45_single_vec.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/45_single_vec.rs index fdd5ed7cc2..2738c567b0 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/45_single_vec.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/45_single_vec.rs @@ -16,7 +16,7 @@ fn main() { }; // Test Borsh serialization - let bytes = instance.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&instance).unwrap(); let deserialized = SingleVec::try_from_slice(&bytes).unwrap(); // Test zero_copy_at diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/46_single_option.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/46_single_option.rs index 2dfbda12eb..f11c909c16 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/46_single_option.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/46_single_option.rs @@ -13,7 +13,7 @@ pub struct SingleOption { fn main() { // Test Borsh compatibility let ref_struct = SingleOption { maybe: Some(12345) }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = SingleOption::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Option fields diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/49_max_meta_fields.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/49_max_meta_fields.rs index a231a8a8cb..958bc52f2e 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/49_max_meta_fields.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/49_max_meta_fields.rs @@ -42,7 +42,7 @@ fn main() { }; // Test Borsh serialization - let bytes = instance.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&instance).unwrap(); let deserialized = MaxMetaFields::try_from_slice(&bytes).unwrap(); // Test zero_copy_at diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/50_combination_all_features.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/50_combination_all_features.rs index 94316fdd16..5334cdbfac 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/50_combination_all_features.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/50_combination_all_features.rs @@ -56,7 +56,7 @@ fn main() { }; // Test Borsh serialization - let bytes = instance.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&instance).unwrap(); // Test zero_copy_at let (_zero_copy_instance, remaining) = CombinationAllFeatures::zero_copy_at(&bytes).unwrap(); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/51_deep_nested_structs.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/51_deep_nested_structs.rs index 7b33ea8b9f..731847da9d 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/51_deep_nested_structs.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/51_deep_nested_structs.rs @@ -34,7 +34,7 @@ fn main() { }; // Test Borsh serialization - let bytes = instance.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&instance).unwrap(); // Test zero_copy_at let (_zero_copy_instance, remaining) = Level1::zero_copy_at(&bytes).unwrap(); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/52_enum_containing_struct.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/52_enum_containing_struct.rs index 207da22aeb..edb6d00c8a 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/52_enum_containing_struct.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/52_enum_containing_struct.rs @@ -26,7 +26,7 @@ fn main() { }); // Test Borsh serialization - let bytes = instance.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&instance).unwrap(); let _deserialized = EnumWithStruct::try_from_slice(&bytes).unwrap(); // Test zero_copy_at diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/53_enum_containing_vec.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/53_enum_containing_vec.rs index 6d6a7e921f..ad6601aec9 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/53_enum_containing_vec.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/53_enum_containing_vec.rs @@ -16,7 +16,7 @@ fn main() { let instance = EnumWithVec::Data(vec![1, 2, 3, 4, 5]); // Test Borsh serialization - let bytes = instance.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&instance).unwrap(); // Test zero_copy_at let (_zero_copy_instance, _remaining) = EnumWithVec::zero_copy_at(&bytes).unwrap(); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/56_all_derives.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/56_all_derives.rs index 239b755b60..c54f6112da 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/56_all_derives.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/56_all_derives.rs @@ -20,7 +20,7 @@ fn main() { }; // Test Borsh serialization - let bytes = instance.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&instance).unwrap(); let deserialized = AllDerives::try_from_slice(&bytes).unwrap(); // Test zero_copy_at diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/57_option_of_array.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/57_option_of_array.rs index abdd93c1e1..c2ffd9fd99 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/57_option_of_array.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/57_option_of_array.rs @@ -20,7 +20,7 @@ fn main() { }; // Test Borsh serialization - let bytes = instance.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&instance).unwrap(); let deserialized = OptionOfArray::try_from_slice(&bytes).unwrap(); // Test zero_copy_at diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/59_vec_of_options.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/59_vec_of_options.rs index a57ed287b8..a53725684c 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/59_vec_of_options.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/59_vec_of_options.rs @@ -20,7 +20,7 @@ fn main() { }; // Test Borsh serialization - let bytes = instance.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&instance).unwrap(); // Test zero_copy_at let (_zero_copy_instance, remaining) = VecOfOptions::zero_copy_at(&bytes).unwrap(); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/60_option_pubkey.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/60_option_pubkey.rs index 4f63893ce0..8a305e327d 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/60_option_pubkey.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/60_option_pubkey.rs @@ -23,7 +23,7 @@ fn main() { }; // Test Borsh serialization - let bytes = instance.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&instance).unwrap(); // Test zero_copy_at let (_zero_copy_instance, remaining) = OptionPubkey::zero_copy_at(&bytes).unwrap(); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/61_vec_pubkey.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/61_vec_pubkey.rs index 005e0fc0fe..ca3cb12690 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/61_vec_pubkey.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/61_vec_pubkey.rs @@ -23,7 +23,7 @@ fn main() { }; // Test Borsh serialization - let serialized = original.try_to_vec().unwrap(); + let serialized = borsh::to_vec(&original).unwrap(); let _deserialized: VecPubkey = VecPubkey::try_from_slice(&serialized).unwrap(); // Test zero_copy_at (read-only) diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/62_array_pubkey.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/62_array_pubkey.rs index c640162584..b49b3bb8af 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/62_array_pubkey.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/62_array_pubkey.rs @@ -34,7 +34,7 @@ fn main() { }; // Test Borsh serialization - let serialized = original.try_to_vec().unwrap(); + let serialized = borsh::to_vec(&original).unwrap(); // Test zero_copy_at (read-only) let _zero_copy_read = ArrayPubkey::zero_copy_at(&serialized).unwrap(); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/63_arrays_only.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/63_arrays_only.rs index 692ce2775b..4f02e1b545 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/63_arrays_only.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/63_arrays_only.rs @@ -24,7 +24,7 @@ fn main() { }; // Test Borsh serialization - let serialized = original.try_to_vec().unwrap(); + let serialized = borsh::to_vec(&original).unwrap(); // Test zero_copy_at (read-only) let _zero_copy_read = ArraysOnly::zero_copy_at(&serialized).unwrap(); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/64_option_first_field.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/64_option_first_field.rs index 51a14987c7..fceed0272d 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/64_option_first_field.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/64_option_first_field.rs @@ -22,7 +22,7 @@ fn main() { }; // Test Borsh serialization - let serialized = original.try_to_vec().unwrap(); + let serialized = borsh::to_vec(&original).unwrap(); let _deserialized: OptionFirstField = OptionFirstField::try_from_slice(&serialized).unwrap(); // Test zero_copy_at (read-only) diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/65_vec_of_vec.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/65_vec_of_vec.rs index 55d01b1650..21179b2ebc 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/65_vec_of_vec.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/65_vec_of_vec.rs @@ -18,7 +18,7 @@ fn main() { }; // Test Borsh serialization - let serialized = original.try_to_vec().unwrap(); + let serialized = borsh::to_vec(&original).unwrap(); // Test zero_copy_at (read-only) let _zero_copy_read = VecOfVec::zero_copy_at(&serialized).unwrap(); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/66_triple_nested_option.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/66_triple_nested_option.rs index 7ff0116b40..f0200cc5b5 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/66_triple_nested_option.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/66_triple_nested_option.rs @@ -18,7 +18,7 @@ fn main() { }; // Test Borsh serialization - let serialized = original.try_to_vec().unwrap(); + let serialized = borsh::to_vec(&original).unwrap(); // Test zero_copy_at (read-only) let _zero_copy_read = TripleNestedOption::zero_copy_at(&serialized).unwrap(); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/68_enum_containing_option.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/68_enum_containing_option.rs index 84a9dca4db..3fb767d580 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/68_enum_containing_option.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/68_enum_containing_option.rs @@ -16,7 +16,7 @@ fn main() { let original = EnumWithOption::MaybeData(Some(42)); // Test Borsh serialization - let serialized = original.try_to_vec().unwrap(); + let serialized = borsh::to_vec(&original).unwrap(); // Test zero_copy_at (read-only) let (_zero_copy_read, _remaining) = EnumWithOption::zero_copy_at(&serialized).unwrap(); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/69_very_long_field_names.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/69_very_long_field_names.rs index 82c58d911e..529205f3bb 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/69_very_long_field_names.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/69_very_long_field_names.rs @@ -25,7 +25,7 @@ fn main() { }; // Test Borsh serialization - let serialized = original.try_to_vec().unwrap(); + let serialized = borsh::to_vec(&original).unwrap(); // Test zero_copy_at (read-only) let _zero_copy_read = VeryLongFieldNames::zero_copy_at(&serialized).unwrap(); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/70_rust_type_field_names.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/70_rust_type_field_names.rs index 921b09cca8..e5e437a421 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/70_rust_type_field_names.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/70_rust_type_field_names.rs @@ -24,7 +24,7 @@ fn main() { }; // Test Borsh serialization - let serialized = original.try_to_vec().unwrap(); + let serialized = borsh::to_vec(&original).unwrap(); // Test zero_copy_at (read-only) let _zero_copy_read = RustTypeFieldNames::zero_copy_at(&serialized).unwrap(); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/basic_enum.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/basic_enum.rs index 0031792b4e..74aa86ae54 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/basic_enum.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/basic_enum.rs @@ -14,7 +14,7 @@ pub enum BasicEnum { fn main() { // Test Borsh compatibility let ref_enum = BasicEnum::SingleField(42); - let bytes = ref_enum.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_enum).unwrap(); let (_enum_copy, remaining) = BasicEnum::zero_copy_at(&bytes).unwrap(); assert!(remaining.is_empty()); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/basic_struct.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/basic_struct.rs index 5ef8c0e027..d3ace967ea 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/basic_struct.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/basic_struct.rs @@ -17,7 +17,7 @@ fn main() { field2: 1337, field3: true, }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (struct_copy, remaining) = BasicStruct::zero_copy_at(&bytes).unwrap(); assert_eq!(struct_copy, ref_struct); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/complex_enum.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/complex_enum.rs index 642cca6684..b216049c36 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/complex_enum.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/complex_enum.rs @@ -15,7 +15,7 @@ pub enum ComplexEnum { fn main() { // Test Borsh compatibility let ref_enum = ComplexEnum::U64Field(12345); - let bytes = ref_enum.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_enum).unwrap(); let (_enum_copy, remaining) = ComplexEnum::zero_copy_at(&bytes).unwrap(); assert!(remaining.is_empty()); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/repr_c_packed_test.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/repr_c_packed_test.rs index 02395663d1..844dc8c0fa 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/repr_c_packed_test.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/repr_c_packed_test.rs @@ -26,13 +26,13 @@ fn main() { b: 1000, c: 500, }; - let bytes = packed.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&packed).unwrap(); let (_packed_copy, remaining) = PackedStruct::zero_copy_at(&bytes).unwrap(); assert!(remaining.is_empty()); // Test aligned struct let aligned = AlignedStruct { x: 999999, y: 42 }; - let mut bytes = aligned.try_to_vec().unwrap(); + let mut bytes = borsh::to_vec(&aligned).unwrap(); let (_aligned_copy, remaining) = AlignedStruct::zero_copy_at(&bytes).unwrap(); assert!(remaining.is_empty()); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/with_arrays.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/with_arrays.rs index bfbced1c48..bd56c7f432 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/with_arrays.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/with_arrays.rs @@ -17,7 +17,7 @@ fn main() { data: [2; 16], small_array: [3, 4, 5, 6], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (struct_copy, remaining) = WithArrays::zero_copy_at(&bytes).unwrap(); assert_eq!(struct_copy, ref_struct); diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/with_options.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/with_options.rs index 27568eff93..7b40799bc5 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/with_options.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/with_options.rs @@ -17,7 +17,7 @@ fn main() { maybe_flag: Some(true), maybe_small: None, }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = WithOptions::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Option fields diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/with_pubkey.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/with_pubkey.rs index 75bffc008b..9840f8a342 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/with_pubkey.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/with_pubkey.rs @@ -37,7 +37,7 @@ fn main() { amount: 1000, flags: vec![true, false, true], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = WithPubkey::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/program-tests/zero-copy-derive-test/tests/ui/pass/with_vectors.rs b/program-tests/zero-copy-derive-test/tests/ui/pass/with_vectors.rs index 6395992433..12dc088a6f 100644 --- a/program-tests/zero-copy-derive-test/tests/ui/pass/with_vectors.rs +++ b/program-tests/zero-copy-derive-test/tests/ui/pass/with_vectors.rs @@ -18,7 +18,7 @@ fn main() { numbers: vec![10, 20, 30], flags: vec![true, false, true], }; - let bytes = ref_struct.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&ref_struct).unwrap(); let (_struct_copy, remaining) = WithVectors::zero_copy_at(&bytes).unwrap(); // Note: Can't use assert_eq! due to ZeroCopyEq limitation with Vec diff --git a/programs/account-compression/src/instructions/batch_append.rs b/programs/account-compression/src/instructions/batch_append.rs index 841d5f0994..9c2ff50d42 100644 --- a/programs/account-compression/src/instructions/batch_append.rs +++ b/programs/account-compression/src/instructions/batch_append.rs @@ -51,7 +51,7 @@ impl<'info> GroupAccounts<'info> for BatchAppend<'info> { /// 3.3 Verifies batch zkp and updates root. /// 4. Emit indexer event. pub fn process_batch_append_leaves<'a, 'b, 'c: 'info, 'info>( - ctx: &'a Context<'a, 'b, 'c, 'info, BatchAppend<'info>>, + ctx: &'a Context<'info, BatchAppend<'info>>, instruction_data: InstructionDataBatchAppendInputs, ) -> Result<()> { // 1. Check Merkle tree account discriminator, tree type, and program ownership. @@ -82,5 +82,5 @@ pub fn process_batch_append_leaves<'a, 'b, 'c: 'info, 'info>( )?; } // 5. Emit indexer event. - emit_indexer_event(event.try_to_vec()?, &ctx.accounts.log_wrapper) + emit_indexer_event(borsh::to_vec(&event)?, &ctx.accounts.log_wrapper) } diff --git a/programs/account-compression/src/instructions/batch_nullify.rs b/programs/account-compression/src/instructions/batch_nullify.rs index f341f8a496..5247690590 100644 --- a/programs/account-compression/src/instructions/batch_nullify.rs +++ b/programs/account-compression/src/instructions/batch_nullify.rs @@ -42,7 +42,7 @@ impl<'info> GroupAccounts<'info> for BatchNullify<'info> { /// 3.1 Verifies batch zkp and updates root. /// 4. Emit indexer event. pub fn process_batch_nullify<'a, 'b, 'c: 'info, 'info>( - ctx: &'a Context<'a, 'b, 'c, 'info, BatchNullify<'info>>, + ctx: &'a Context<'info, BatchNullify<'info>>, instruction_data: InstructionDataBatchNullifyInputs, ) -> Result<()> { // 1. Check Merkle tree account discriminator, tree type, and program ownership. @@ -59,5 +59,5 @@ pub fn process_batch_nullify<'a, 'b, 'c: 'info, 'info>( .update_tree_from_input_queue(instruction_data) .map_err(ProgramError::from)?; // 4. Emit indexer event. - emit_indexer_event(event.try_to_vec()?, &ctx.accounts.log_wrapper) + emit_indexer_event(borsh::to_vec(&event)?, &ctx.accounts.log_wrapper) } diff --git a/programs/account-compression/src/instructions/batch_update_address_tree.rs b/programs/account-compression/src/instructions/batch_update_address_tree.rs index 8f6e8e0104..4213399212 100644 --- a/programs/account-compression/src/instructions/batch_update_address_tree.rs +++ b/programs/account-compression/src/instructions/batch_update_address_tree.rs @@ -45,7 +45,7 @@ impl<'info> GroupAccounts<'info> for BatchUpdateAddressTree<'info> { /// 3.1 Verifies batch update zkp and updates root. /// 4. Emit indexer event. pub fn process_batch_update_address_tree<'a, 'b, 'c: 'info, 'info>( - ctx: &'a Context<'a, 'b, 'c, 'info, BatchUpdateAddressTree<'info>>, + ctx: &'a Context<'info, BatchUpdateAddressTree<'info>>, instruction_data: InstructionDataBatchNullifyInputs, ) -> Result<()> { // 1. Check tree account discriminator, tree type, and program ownership. @@ -75,5 +75,5 @@ pub fn process_batch_update_address_tree<'a, 'b, 'c: 'info, 'info>( )?; } // 5. Emit indexer event. - emit_indexer_event(event.try_to_vec()?, &ctx.accounts.log_wrapper) + emit_indexer_event(borsh::to_vec(&event)?, &ctx.accounts.log_wrapper) } diff --git a/programs/account-compression/src/instructions/initialize_address_merkle_tree_and_queue.rs b/programs/account-compression/src/instructions/initialize_address_merkle_tree_and_queue.rs index 69d08a27a9..c708aa8a2b 100644 --- a/programs/account-compression/src/instructions/initialize_address_merkle_tree_and_queue.rs +++ b/programs/account-compression/src/instructions/initialize_address_merkle_tree_and_queue.rs @@ -80,7 +80,7 @@ impl GroupAccess for RegisteredProgram { } pub fn process_initialize_address_merkle_tree_and_queue<'info>( - ctx: Context<'_, '_, '_, 'info, InitializeAddressMerkleTreeAndQueue<'info>>, + ctx: Context<'info, InitializeAddressMerkleTreeAndQueue<'info>>, index: u64, program_owner: Option, forester: Option, diff --git a/programs/account-compression/src/instructions/initialize_batched_address_merkle_tree.rs b/programs/account-compression/src/instructions/initialize_batched_address_merkle_tree.rs index 4ad9e445ee..4f25aaffc5 100644 --- a/programs/account-compression/src/instructions/initialize_batched_address_merkle_tree.rs +++ b/programs/account-compression/src/instructions/initialize_batched_address_merkle_tree.rs @@ -35,7 +35,7 @@ impl<'info> GroupAccounts<'info> for InitializeBatchedAddressMerkleTree<'info> { /// 1. checks signer /// 2. initializes merkle tree pub fn process_initialize_batched_address_merkle_tree<'info>( - ctx: Context<'_, '_, '_, 'info, InitializeBatchedAddressMerkleTree<'info>>, + ctx: Context<'info, InitializeBatchedAddressMerkleTree<'info>>, params: InitAddressTreeAccountsInstructionData, ) -> Result<()> { #[cfg(feature = "test")] diff --git a/programs/account-compression/src/instructions/initialize_batched_state_merkle_tree.rs b/programs/account-compression/src/instructions/initialize_batched_state_merkle_tree.rs index 072ebac408..c5cd001911 100644 --- a/programs/account-compression/src/instructions/initialize_batched_state_merkle_tree.rs +++ b/programs/account-compression/src/instructions/initialize_batched_state_merkle_tree.rs @@ -31,7 +31,7 @@ impl<'info> GroupAccounts<'info> for InitializeBatchedStateMerkleTreeAndQueue<'i } pub fn process_initialize_batched_state_merkle_tree<'info>( - ctx: Context<'_, '_, '_, 'info, InitializeBatchedStateMerkleTreeAndQueue<'info>>, + ctx: Context<'info, InitializeBatchedStateMerkleTreeAndQueue<'info>>, params: InitStateTreeAccountsInstructionData, ) -> Result<()> { #[cfg(feature = "test")] diff --git a/programs/account-compression/src/instructions/initialize_state_merkle_tree_and_nullifier_queue.rs b/programs/account-compression/src/instructions/initialize_state_merkle_tree_and_nullifier_queue.rs index c3a6462a3d..70d3bec972 100644 --- a/programs/account-compression/src/instructions/initialize_state_merkle_tree_and_nullifier_queue.rs +++ b/programs/account-compression/src/instructions/initialize_state_merkle_tree_and_nullifier_queue.rs @@ -86,7 +86,7 @@ impl default::Default for NullifierQueueConfig { } pub fn process_initialize_state_merkle_tree_and_nullifier_queue<'info>( - ctx: Context<'_, '_, '_, 'info, InitializeStateMerkleTreeAndNullifierQueue<'info>>, + ctx: Context<'info, InitializeStateMerkleTreeAndNullifierQueue<'info>>, index: u64, program_owner: Option, forester: Option, diff --git a/programs/account-compression/src/instructions/migrate_state.rs b/programs/account-compression/src/instructions/migrate_state.rs index 3f62280f25..0dc0989da3 100644 --- a/programs/account-compression/src/instructions/migrate_state.rs +++ b/programs/account-compression/src/instructions/migrate_state.rs @@ -57,7 +57,7 @@ pub struct MigrateLeafParams { /// 2.3 Inserts the leaf in the output queue. /// 3. Emit nullifier event pub fn process_migrate_state<'a, 'b, 'c: 'info, 'info>( - ctx: &'a Context<'a, 'b, 'c, 'info, MigrateState<'info>>, + ctx: &'a Context<'info, MigrateState<'info>>, migrate_leaf_params: MigrateLeafParams, ) -> Result<()> { // 1. Check that signer is a registered program. @@ -91,7 +91,7 @@ pub fn process_migrate_state<'a, 'b, 'c: 'info, 'info>( output_queue, )?; // 3. Emit nullifier event - emit_indexer_event(nullify_event.try_to_vec()?, &ctx.accounts.log_wrapper)?; + emit_indexer_event(borsh::to_vec(&nullify_event)?, &ctx.accounts.log_wrapper)?; Ok(()) } diff --git a/programs/account-compression/src/instructions/nullify_leaves.rs b/programs/account-compression/src/instructions/nullify_leaves.rs index 1d8c77eed5..29fa6bf3d9 100644 --- a/programs/account-compression/src/instructions/nullify_leaves.rs +++ b/programs/account-compression/src/instructions/nullify_leaves.rs @@ -60,7 +60,7 @@ impl<'info> GroupAccounts<'info> for NullifyLeaves<'info> { } pub fn process_nullify_leaves<'a, 'b, 'c: 'info, 'info>( - ctx: &'a Context<'a, 'b, 'c, 'info, NullifyLeaves<'info>>, + ctx: &'a Context<'info, NullifyLeaves<'info>>, change_log_indices: &'a [u64], leaves_queue_indices: &'a [u16], leaf_indices: &'a [u64], @@ -122,7 +122,7 @@ fn insert_nullifier<'a, 'c: 'info, 'info>( change_log_indices: &[u64], leaves_queue_indices: &[u16], leaf_indices: &[u64], - ctx: &Context<'a, '_, 'c, 'info, NullifyLeaves<'info>>, + ctx: &Context<'info, NullifyLeaves<'info>>, ) -> Result<()> { { let merkle_tree = ctx.accounts.merkle_tree.load()?; @@ -189,7 +189,7 @@ fn insert_nullifier<'a, 'c: 'info, 'info>( seq, }; let nullify_event = MerkleTreeEvent::V2(nullify_event); - emit_indexer_event(nullify_event.try_to_vec()?, &ctx.accounts.log_wrapper)?; + emit_indexer_event(borsh::to_vec(&nullify_event)?, &ctx.accounts.log_wrapper)?; Ok(()) } @@ -197,7 +197,9 @@ fn insert_nullifier<'a, 'c: 'info, 'info>( pub fn from_vec(vec: &[[u8; 32]], height: usize) -> Result> { let proof: [[u8; 32]; 16] = vec.try_into().unwrap(); let mut bounded_vec = BoundedVec::with_capacity(height); - bounded_vec.extend(proof).map_err(ProgramError::from)?; + bounded_vec + .extend(proof) + .map_err(|_| ProgramError::InvalidArgument)?; Ok(bounded_vec) } diff --git a/programs/account-compression/src/instructions/resize_registered_program_account.rs b/programs/account-compression/src/instructions/resize_registered_program_account.rs index 759a6288f1..1ee0fe9196 100644 --- a/programs/account-compression/src/instructions/resize_registered_program_account.rs +++ b/programs/account-compression/src/instructions/resize_registered_program_account.rs @@ -5,6 +5,7 @@ use anchor_lang::{ Discriminator, }; use bytemuck::from_bytes_mut; +use light_account_checks::AccountInfoTrait; use crate::{utils::constants::CPI_AUTHORITY_PDA_SEED, RegisteredProgram}; @@ -29,7 +30,7 @@ pub struct ResizeRegisteredProgramPda<'info> { } pub fn process_resize_registered_program_pda<'info>( - ctx: Context<'_, '_, '_, 'info, ResizeRegisteredProgramPda<'info>>, + ctx: Context<'info, ResizeRegisteredProgramPda<'info>>, ) -> Result<()> { // account checks // 1. Discriminator check @@ -67,7 +68,9 @@ pub fn process_resize_registered_program_pda<'info>( ], )?; - account_info.realloc(RegisteredProgram::LEN, true)?; + account_info + .realloc(RegisteredProgram::LEN, true) + .map_err(|_| ProgramError::InvalidArgument)?; } // Initialize registered_program_signer_pda with derived signer pda. diff --git a/programs/account-compression/src/instructions/rollover_address_merkle_tree_and_queue.rs b/programs/account-compression/src/instructions/rollover_address_merkle_tree_and_queue.rs index 42e6842152..9ad1cf3190 100644 --- a/programs/account-compression/src/instructions/rollover_address_merkle_tree_and_queue.rs +++ b/programs/account-compression/src/instructions/rollover_address_merkle_tree_and_queue.rs @@ -53,7 +53,7 @@ impl<'info> GroupAccounts<'info> for RolloverAddressMerkleTreeAndQueue<'info> { /// 1. mark Merkle tree as rolled over in this slot /// 2. initialize new Merkle tree and queue with the same parameters pub fn process_rollover_address_merkle_tree_and_queue<'a, 'b, 'c: 'info, 'info>( - ctx: Context<'a, 'b, 'c, 'info, RolloverAddressMerkleTreeAndQueue<'info>>, + ctx: Context<'info, RolloverAddressMerkleTreeAndQueue<'info>>, ) -> Result<()> { let new_merkle_tree_account_info = ctx.accounts.new_address_merkle_tree.to_account_info(); let merkle_tree_rent = check_account_balance_is_rent_exempt( diff --git a/programs/account-compression/src/instructions/rollover_batched_address_merkle_tree.rs b/programs/account-compression/src/instructions/rollover_batched_address_merkle_tree.rs index 9e37bc3f10..5af6afe48d 100644 --- a/programs/account-compression/src/instructions/rollover_batched_address_merkle_tree.rs +++ b/programs/account-compression/src/instructions/rollover_batched_address_merkle_tree.rs @@ -46,7 +46,7 @@ impl<'info> GroupAccounts<'info> for RolloverBatchedAddressMerkleTree<'info> { /// 4. Transfer rent exemption for new Merkle tree /// from old address Merkle tree to fee payer. pub fn process_rollover_batched_address_merkle_tree<'a, 'b, 'c: 'info, 'info>( - ctx: Context<'a, 'b, 'c, 'info, RolloverBatchedAddressMerkleTree<'info>>, + ctx: Context<'info, RolloverBatchedAddressMerkleTree<'info>>, network_fee: Option, ) -> Result<()> { msg!( diff --git a/programs/account-compression/src/instructions/rollover_batched_state_merkle_tree.rs b/programs/account-compression/src/instructions/rollover_batched_state_merkle_tree.rs index 275d5db3dd..1a7fc98a09 100644 --- a/programs/account-compression/src/instructions/rollover_batched_state_merkle_tree.rs +++ b/programs/account-compression/src/instructions/rollover_batched_state_merkle_tree.rs @@ -53,7 +53,7 @@ impl<'info> GroupAccounts<'info> for RolloverBatchedStateMerkleTree<'info> { /// 4. Transfer rent exemption for new accounts /// from old output queue to fee payer. pub fn process_rollover_batched_state_merkle_tree<'a, 'b, 'c: 'info, 'info>( - ctx: Context<'a, 'b, 'c, 'info, RolloverBatchedStateMerkleTree<'info>>, + ctx: Context<'info, RolloverBatchedStateMerkleTree<'info>>, additional_bytes: u64, network_fee: Option, ) -> Result<()> { diff --git a/programs/account-compression/src/instructions/rollover_state_merkle_tree_and_queue.rs b/programs/account-compression/src/instructions/rollover_state_merkle_tree_and_queue.rs index 7c8c5bb306..26c0fd0d40 100644 --- a/programs/account-compression/src/instructions/rollover_state_merkle_tree_and_queue.rs +++ b/programs/account-compression/src/instructions/rollover_state_merkle_tree_and_queue.rs @@ -55,7 +55,7 @@ impl<'info> GroupAccounts<'info> for RolloverStateMerkleTreeAndNullifierQueue<'i /// 1. mark Merkle tree as rolled over in this slot /// 2. initialize new Merkle tree and nullifier queue with the same parameters pub fn process_rollover_state_merkle_tree_nullifier_queue_pair<'a, 'b, 'c: 'info, 'info>( - ctx: Context<'a, 'b, 'c, 'info, RolloverStateMerkleTreeAndNullifierQueue<'info>>, + ctx: Context<'info, RolloverStateMerkleTreeAndNullifierQueue<'info>>, ) -> Result<()> { // TODO: rollover additional rent as well. (need to add a field to the metadata for this) let new_merkle_tree_account_info = ctx.accounts.new_state_merkle_tree.to_account_info(); diff --git a/programs/account-compression/src/instructions/update_address_merkle_tree.rs b/programs/account-compression/src/instructions/update_address_merkle_tree.rs index 092305a1fc..8a2286bbbe 100644 --- a/programs/account-compression/src/instructions/update_address_merkle_tree.rs +++ b/programs/account-compression/src/instructions/update_address_merkle_tree.rs @@ -43,7 +43,7 @@ impl<'info> GroupAccounts<'info> for UpdateAddressMerkleTree<'info> { #[allow(clippy::too_many_arguments)] pub fn process_update_address_merkle_tree<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateAddressMerkleTree<'info>>, + ctx: Context<'info, UpdateAddressMerkleTree<'info>>, // Index of the Merkle tree changelog. changelog_index: u16, indexed_changelog_index: u16, @@ -146,7 +146,7 @@ pub fn process_update_address_merkle_tree<'info>( seq: merkle_tree.sequence_number() as u64 - 1, }); emit_indexer_event( - address_event.try_to_vec()?, + borsh::to_vec(&address_event)?, &ctx.accounts.log_wrapper.to_account_info(), ) } diff --git a/programs/account-compression/src/lib.rs b/programs/account-compression/src/lib.rs index 1a50e7a2a9..fd3ec068ec 100644 --- a/programs/account-compression/src/lib.rs +++ b/programs/account-compression/src/lib.rs @@ -35,7 +35,7 @@ pub mod account_compression { use crate::processor::insert_into_queues::process_insert_into_queues; pub fn initialize_address_merkle_tree_and_queue<'info>( - ctx: Context<'_, '_, '_, 'info, InitializeAddressMerkleTreeAndQueue<'info>>, + ctx: Context<'info, InitializeAddressMerkleTreeAndQueue<'info>>, index: u64, program_owner: Option, forester: Option, @@ -54,7 +54,7 @@ pub mod account_compression { /// Updates the address Merkle tree with a new address. pub fn update_address_merkle_tree<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateAddressMerkleTree<'info>>, + ctx: Context<'info, UpdateAddressMerkleTree<'info>>, // Index of the Merkle tree changelog. changelog_index: u16, indexed_changelog_index: u16, @@ -83,7 +83,7 @@ pub mod account_compression { } pub fn rollover_address_merkle_tree_and_queue<'a, 'b, 'c: 'info, 'info>( - ctx: Context<'a, 'b, 'c, 'info, RolloverAddressMerkleTreeAndQueue<'info>>, + ctx: Context<'info, RolloverAddressMerkleTreeAndQueue<'info>>, ) -> Result<()> { process_rollover_address_merkle_tree_and_queue(ctx) } @@ -91,7 +91,7 @@ pub mod account_compression { /// initialize group (a group can be used to give multiple programs access /// to the same Merkle trees by registering the programs to the group) pub fn initialize_group_authority<'info>( - ctx: Context<'_, '_, '_, 'info, InitializeGroupAuthority<'info>>, + ctx: Context<'info, InitializeGroupAuthority<'info>>, authority: Pubkey, ) -> Result<()> { let seed_pubkey = ctx.accounts.seed.key(); @@ -104,14 +104,14 @@ pub mod account_compression { } pub fn update_group_authority<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateGroupAuthority<'info>>, + ctx: Context<'info, UpdateGroupAuthority<'info>>, authority: Pubkey, ) -> Result<()> { set_group_authority(&mut ctx.accounts.group_authority, authority, None) } pub fn register_program_to_group<'info>( - ctx: Context<'_, '_, '_, 'info, RegisterProgramToGroup<'info>>, + ctx: Context<'info, RegisterProgramToGroup<'info>>, ) -> Result<()> { process_register_program(ctx) } @@ -121,7 +121,7 @@ pub mod account_compression { } pub fn resize_registered_program_pda<'info>( - ctx: Context<'_, '_, '_, 'info, ResizeRegisteredProgramPda<'info>>, + ctx: Context<'info, ResizeRegisteredProgramPda<'info>>, ) -> Result<()> { process_resize_registered_program_pda(ctx) } @@ -129,7 +129,7 @@ pub mod account_compression { /// Initializes a new Merkle tree from config bytes. /// Index is an optional identifier and not checked by the program. pub fn initialize_state_merkle_tree_and_nullifier_queue<'info>( - ctx: Context<'_, '_, '_, 'info, InitializeStateMerkleTreeAndNullifierQueue<'info>>, + ctx: Context<'info, InitializeStateMerkleTreeAndNullifierQueue<'info>>, index: u64, program_owner: Option, forester: Option, @@ -157,14 +157,14 @@ pub mod account_compression { /// Inserts nullifiers, leaves, and addresses /// into v1 and batched Merkle trees. pub fn insert_into_queues<'a, 'b, 'c: 'info, 'info>( - ctx: Context<'a, 'b, 'c, 'info, GenericInstruction<'info>>, + ctx: Context<'info, GenericInstruction<'info>>, bytes: Vec, ) -> Result<()> { process_insert_into_queues(&ctx, bytes) } pub fn nullify_leaves<'a, 'b, 'c: 'info, 'info>( - ctx: Context<'a, 'b, 'c, 'info, NullifyLeaves<'info>>, + ctx: Context<'info, NullifyLeaves<'info>>, change_log_indices: Vec, leaves_queue_indices: Vec, leaf_indices: Vec, @@ -180,7 +180,7 @@ pub mod account_compression { } pub fn rollover_state_merkle_tree_and_nullifier_queue<'a, 'b, 'c: 'info, 'info>( - ctx: Context<'a, 'b, 'c, 'info, RolloverStateMerkleTreeAndNullifierQueue<'info>>, + ctx: Context<'info, RolloverStateMerkleTreeAndNullifierQueue<'info>>, ) -> Result<()> { process_rollover_state_merkle_tree_nullifier_queue_pair(ctx) } @@ -202,7 +202,7 @@ pub mod account_compression { /// Nullifiers are inserted from the input queue into the /// state Merkle tree with the instruction batch_nullify. pub fn initialize_batched_state_merkle_tree<'info>( - ctx: Context<'_, '_, '_, 'info, InitializeBatchedStateMerkleTreeAndQueue<'info>>, + ctx: Context<'info, InitializeBatchedStateMerkleTreeAndQueue<'info>>, bytes: Vec, ) -> Result<()> { let params = InitStateTreeAccountsInstructionData::try_from_slice(&bytes) @@ -222,7 +222,7 @@ pub mod account_compression { /// The address tree is updated with the instruction /// batch_update_address_tree. pub fn initialize_batched_address_merkle_tree<'info>( - ctx: Context<'_, '_, '_, 'info, InitializeBatchedAddressMerkleTree<'info>>, + ctx: Context<'info, InitializeBatchedAddressMerkleTree<'info>>, bytes: Vec, ) -> Result<()> { let params = InitAddressTreeAccountsInstructionData::try_from_slice(&bytes) @@ -233,7 +233,7 @@ pub mod account_compression { /// Nullify a batch of leaves from the input queue /// to a batched Merkle tree with a zkp. pub fn batch_nullify<'a, 'b, 'c: 'info, 'info>( - ctx: Context<'a, 'b, 'c, 'info, BatchNullify<'info>>, + ctx: Context<'info, BatchNullify<'info>>, data: Vec, ) -> Result<()> { let instruction_data = InstructionDataBatchNullifyInputs::try_from_slice(&data) @@ -244,7 +244,7 @@ pub mod account_compression { /// Append a batch of leaves from an output queue /// to a batched Merkle tree with a zkp. pub fn batch_append<'a, 'b, 'c: 'info, 'info>( - ctx: Context<'a, 'b, 'c, 'info, BatchAppend<'info>>, + ctx: Context<'info, BatchAppend<'info>>, data: Vec, ) -> Result<()> { let instruction_data = InstructionDataBatchAppendInputs::try_from_slice(&data) @@ -255,7 +255,7 @@ pub mod account_compression { /// Insert a batch of addresses into a /// batched address Merkle tree with a zkp. pub fn batch_update_address_tree<'a, 'b, 'c: 'info, 'info>( - ctx: Context<'a, 'b, 'c, 'info, BatchUpdateAddressTree<'info>>, + ctx: Context<'info, BatchUpdateAddressTree<'info>>, data: Vec, ) -> Result<()> { let instruction_data = InstructionDataBatchNullifyInputs::try_from_slice(&data) @@ -268,7 +268,7 @@ pub mod account_compression { /// with the parameters of the old account. /// Rent is reimbursed from the old account to the payer. pub fn rollover_batched_address_merkle_tree<'a, 'b, 'c: 'info, 'info>( - ctx: Context<'a, 'b, 'c, 'info, RolloverBatchedAddressMerkleTree<'info>>, + ctx: Context<'info, RolloverBatchedAddressMerkleTree<'info>>, network_fee: Option, ) -> Result<()> { process_rollover_batched_address_merkle_tree(ctx, network_fee) @@ -279,7 +279,7 @@ pub mod account_compression { /// with the parameters of the old accounts. /// Rent is reimbursed from the old output queue account to the payer. pub fn rollover_batched_state_merkle_tree<'a, 'b, 'c: 'info, 'info>( - ctx: Context<'a, 'b, 'c, 'info, RolloverBatchedStateMerkleTree<'info>>, + ctx: Context<'info, RolloverBatchedStateMerkleTree<'info>>, additional_bytes: u64, network_fee: Option, ) -> Result<()> { @@ -289,7 +289,7 @@ pub mod account_compression { /// Migrate state from a v1 state Merkle tree /// to a v2 state Merkle tree. pub fn migrate_state<'a, 'b, 'c: 'info, 'info>( - _ctx: Context<'a, 'b, 'c, 'info, MigrateState<'info>>, + _ctx: Context<'info, MigrateState<'info>>, _input: MigrateLeafParams, ) -> Result<()> { #[cfg(feature = "migrate-state")] diff --git a/programs/account-compression/src/processor/insert_into_queues.rs b/programs/account-compression/src/processor/insert_into_queues.rs index 663d2bd2b0..6e7ed953fb 100644 --- a/programs/account-compression/src/processor/insert_into_queues.rs +++ b/programs/account-compression/src/processor/insert_into_queues.rs @@ -9,7 +9,7 @@ use super::{ use crate::{context::AcpAccount, errors::AccountCompressionErrorCode, GenericInstruction}; pub fn process_insert_into_queues<'a, 'b, 'c: 'info, 'info>( - ctx: &Context<'a, 'b, 'c, 'info, GenericInstruction<'info>>, + ctx: &Context<'info, GenericInstruction<'info>>, bytes: Vec, ) -> Result<()> { let (inputs, _) = InsertIntoQueuesInstructionData::zero_copy_at(bytes.as_slice()) diff --git a/programs/account-compression/src/utils/check_signer_is_registered_or_authority.rs b/programs/account-compression/src/utils/check_signer_is_registered_or_authority.rs index 2cea4e1317..9ba3ebccdc 100644 --- a/programs/account-compression/src/utils/check_signer_is_registered_or_authority.rs +++ b/programs/account-compression/src/utils/check_signer_is_registered_or_authority.rs @@ -22,7 +22,7 @@ pub fn check_signer_is_registered_or_authority< C: GroupAccounts<'info> + anchor_lang::Bumps, A: GroupAccess, >( - ctx: &'a Context<'a, 'b, 'c, 'info, C>, + ctx: &'a Context<'info, C>, checked_account: &'a A, ) -> Result<()> { match ctx.accounts.get_registered_program_pda() { diff --git a/programs/compressed-token/anchor/Cargo.toml b/programs/compressed-token/anchor/Cargo.toml index c474fa839c..a7e16da47e 100644 --- a/programs/compressed-token/anchor/Cargo.toml +++ b/programs/compressed-token/anchor/Cargo.toml @@ -25,11 +25,11 @@ cpi-without-program-ids = [] [dependencies] anchor-lang = { workspace = true } -anchor-spl = { version = "0.31.1" } +anchor-spl = { workspace = true } spl-token = { workspace = true, features = ["no-entrypoint"] } account-compression = { workspace = true, features = ["cpi", "no-idl"] } light-system-program-anchor = { workspace = true, features = ["cpi"] } -solana-security-txt = "1.1.0" +solana-security-txt = { workspace = true } light-hasher = { workspace = true } light-heap = { workspace = true, optional = true } light-compressed-account = { workspace = true, features = ["anchor"] } diff --git a/programs/compressed-token/anchor/src/burn.rs b/programs/compressed-token/anchor/src/burn.rs index e65f2ccfd4..64b95ae9cf 100644 --- a/programs/compressed-token/anchor/src/burn.rs +++ b/programs/compressed-token/anchor/src/burn.rs @@ -31,7 +31,7 @@ pub struct CompressedTokenInstructionDataBurn { } pub fn process_burn<'a, 'b, 'c, 'info: 'b + 'c>( - ctx: Context<'a, 'b, 'c, 'info, BurnInstruction<'info>>, + ctx: Context<'info, BurnInstruction<'info>>, inputs: Vec, ) -> Result<()> { let inputs: CompressedTokenInstructionDataBurn = @@ -68,7 +68,7 @@ pub fn process_burn<'a, 'b, 'c, 'info: 'b + 'c>( #[inline(never)] pub fn burn_spl_from_pool_pda<'info>( - ctx: &Context<'_, '_, '_, 'info, BurnInstruction<'info>>, + ctx: &Context<'info, BurnInstruction<'info>>, inputs: &CompressedTokenInstructionDataBurn, ) -> Result<()> { let amount = inputs.burn_amount; @@ -101,7 +101,7 @@ pub fn spl_burn_cpi<'info>( }; let signer_seeds = get_cpi_signer_seeds(); let signer_seeds_ref = &[&signer_seeds[..]]; - let cpi_ctx = CpiContext::new_with_signer(token_program, cpi_accounts, signer_seeds_ref); + let cpi_ctx = CpiContext::new_with_signer(*token_program.key, cpi_accounts, signer_seeds_ref); anchor_spl::token_interface::burn(cpi_ctx, burn_amount)?; let post_token_balance = TokenAccount::try_deserialize(&mut &token_pool_pda.data.borrow()[..])?.amount; @@ -298,7 +298,7 @@ pub mod sdk { ), account_compression_program: account_compression::ID, self_program: crate::ID, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; Ok(Instruction { diff --git a/programs/compressed-token/anchor/src/delegation.rs b/programs/compressed-token/anchor/src/delegation.rs index 7a9d34366a..8e24a5027a 100644 --- a/programs/compressed-token/anchor/src/delegation.rs +++ b/programs/compressed-token/anchor/src/delegation.rs @@ -44,7 +44,7 @@ pub struct CompressedTokenInstructionDataApprove { /// 4. pack token data into input compressed accounts /// 5. execute compressed transaction pub fn process_approve<'a, 'b, 'c, 'info: 'b + 'c>( - ctx: Context<'a, 'b, 'c, 'info, GenericInstruction<'info>>, + ctx: Context<'info, GenericInstruction<'info>>, inputs: Vec, ) -> Result<()> { let inputs: CompressedTokenInstructionDataApprove = @@ -177,7 +177,7 @@ pub struct CompressedTokenInstructionDataRevoke { } pub fn process_revoke<'a, 'b, 'c, 'info: 'b + 'c>( - ctx: Context<'a, 'b, 'c, 'info, GenericInstruction<'info>>, + ctx: Context<'info, GenericInstruction<'info>>, inputs: Vec, ) -> Result<()> { let inputs: CompressedTokenInstructionDataRevoke = @@ -355,7 +355,7 @@ pub mod sdk { ), account_compression_program: account_compression::ID, self_program: crate::ID, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; Ok(Instruction { @@ -429,7 +429,7 @@ pub mod sdk { ), account_compression_program: account_compression::ID, self_program: crate::ID, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; Ok(Instruction { diff --git a/programs/compressed-token/anchor/src/freeze.rs b/programs/compressed-token/anchor/src/freeze.rs index e813cf3fe8..89596b6d6f 100644 --- a/programs/compressed-token/anchor/src/freeze.rs +++ b/programs/compressed-token/anchor/src/freeze.rs @@ -60,7 +60,7 @@ pub fn process_freeze_or_thaw< const FROZEN_INPUTS: bool, const FROZEN_OUTPUTS: bool, >( - ctx: Context<'a, 'b, 'c, 'info, FreezeInstruction<'info>>, + ctx: Context<'info, FreezeInstruction<'info>>, inputs: Vec, ) -> Result<()> { // Use backward-compatible parsing that checks for optional trailing version byte @@ -336,7 +336,7 @@ pub mod sdk { ), account_compression_program: account_compression::ID, self_program: crate::ID, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, mint: inputs.input_token_data[0].mint.into(), }; @@ -562,7 +562,7 @@ pub mod test_freeze { for (token_data, merkle_tree_index) in expected_token_data.iter().zip(merkle_tree_indices.iter()) { - let serialized_expected_token_data = token_data.try_to_vec().unwrap(); + let serialized_expected_token_data = borsh::to_vec(&token_data).unwrap(); let change_data_struct = CompressedAccountData { discriminator: TOKEN_COMPRESSED_ACCOUNT_DISCRIMINATOR, data: serialized_expected_token_data.clone(), diff --git a/programs/compressed-token/anchor/src/instructions/create_token_pool.rs b/programs/compressed-token/anchor/src/instructions/create_token_pool.rs index c8abc10624..3669f93867 100644 --- a/programs/compressed-token/anchor/src/instructions/create_token_pool.rs +++ b/programs/compressed-token/anchor/src/instructions/create_token_pool.rs @@ -157,7 +157,7 @@ pub fn assert_mint_extensions(account_data: &[u8]) -> Result<()> { // TransferHook: program_id must be nil if let Ok(transfer_hook) = mint.get_extension::() { - if Option::::from(transfer_hook.program_id) + if Option::::from(transfer_hook.program_id) .is_some() { return err!(crate::ErrorCode::TransferHookNotSupported); diff --git a/programs/compressed-token/anchor/src/lib.rs b/programs/compressed-token/anchor/src/lib.rs index 68ad80c5c4..40ef77a2d1 100644 --- a/programs/compressed-token/anchor/src/lib.rs +++ b/programs/compressed-token/anchor/src/lib.rs @@ -48,7 +48,7 @@ pub mod light_compressed_token { /// transferrred to the token pool, and their compressed equivalent is /// minted into a Merkle tree. pub fn create_token_pool<'info>( - ctx: Context<'_, '_, '_, 'info, CreateTokenPoolInstruction<'info>>, + ctx: Context<'info, CreateTokenPoolInstruction<'info>>, ) -> Result<()> { instructions::create_token_pool::assert_mint_extensions( &ctx.accounts.mint.to_account_info().try_borrow_data()?, @@ -66,7 +66,7 @@ pub mod light_compressed_token { /// The maximum number of token pools per mint is 5. /// For mints with restricted extensions, uses restricted PDA derivation. pub fn add_token_pool<'info>( - ctx: Context<'_, '_, '_, 'info, AddTokenPoolInstruction<'info>>, + ctx: Context<'info, AddTokenPoolInstruction<'info>>, token_pool_index: u8, ) -> Result<()> { if token_pool_index == 0 || token_pool_index >= NUM_MAX_POOL_ACCOUNTS { @@ -102,7 +102,7 @@ pub mod light_compressed_token { /// to a compressed token account is to prevent spam. This is the only way /// to add lamports to a compressed token account. pub fn mint_to<'info>( - ctx: Context<'_, '_, '_, 'info, MintToInstruction<'info>>, + ctx: Context<'info, MintToInstruction<'info>>, public_keys: Vec, amounts: Vec, lamports: Option, @@ -119,7 +119,7 @@ pub mod light_compressed_token { /// Batch compress tokens to an of recipients. pub fn batch_compress<'info>( - ctx: Context<'_, '_, '_, 'info, MintToInstruction<'info>>, + ctx: Context<'info, MintToInstruction<'info>>, inputs: Vec, ) -> Result<()> { let (inputs, _) = batch_compress::BatchCompressInstructionData::zero_copy_at(&inputs) @@ -149,7 +149,7 @@ pub mod light_compressed_token { /// amount. This instruction does not close the spl token account. To close /// the account bundle a close spl account instruction in your transaction. pub fn compress_spl_token_account<'info>( - ctx: Context<'_, '_, '_, 'info, TransferInstruction<'info>>, + ctx: Context<'info, TransferInstruction<'info>>, owner: Pubkey, remaining_amount: Option, cpi_context: Option, @@ -166,7 +166,7 @@ pub mod light_compressed_token { /// delegate. If a delegated token account is transferred the delegate is /// not preserved. pub fn transfer<'info>( - ctx: Context<'_, '_, '_, 'info, TransferInstruction<'info>>, + ctx: Context<'info, TransferInstruction<'info>>, inputs: Vec, ) -> Result<()> { let mut inputs = inputs; @@ -188,7 +188,7 @@ pub mod light_compressed_token { /// 1. one account with delegated amount /// 2. one account with remaining(change) amount pub fn approve<'info>( - ctx: Context<'_, '_, '_, 'info, GenericInstruction<'info>>, + ctx: Context<'info, GenericInstruction<'info>>, inputs: Vec, ) -> Result<()> { delegation::process_approve(ctx, inputs) @@ -197,7 +197,7 @@ pub mod light_compressed_token { /// Revokes a delegation. The instruction merges all inputs into one output /// account. Cannot be called by a delegate. Delegates are not preserved. pub fn revoke<'info>( - ctx: Context<'_, '_, '_, 'info, GenericInstruction<'info>>, + ctx: Context<'info, GenericInstruction<'info>>, inputs: Vec, ) -> Result<()> { delegation::process_revoke(ctx, inputs) @@ -206,7 +206,7 @@ pub mod light_compressed_token { /// Freezes compressed token accounts. Inputs must not be frozen. Creates as /// many outputs as inputs. Balances and delegates are preserved. pub fn freeze<'info>( - ctx: Context<'_, '_, '_, 'info, FreezeInstruction<'info>>, + ctx: Context<'info, FreezeInstruction<'info>>, inputs: Vec, ) -> Result<()> { // Inputs are not frozen, outputs are frozen. @@ -216,7 +216,7 @@ pub mod light_compressed_token { /// Thaws frozen compressed token accounts. Inputs must be frozen. Creates /// as many outputs as inputs. Balances and delegates are preserved. pub fn thaw<'info>( - ctx: Context<'_, '_, '_, 'info, FreezeInstruction<'info>>, + ctx: Context<'info, FreezeInstruction<'info>>, inputs: Vec, ) -> Result<()> { // Inputs are frozen, outputs are not frozen. @@ -226,10 +226,7 @@ pub mod light_compressed_token { /// Burns compressed tokens and spl tokens from the pool account. Delegates /// can burn tokens. The output compressed token account remains delegated. /// Creates one output compressed token account. - pub fn burn<'info>( - ctx: Context<'_, '_, '_, 'info, BurnInstruction<'info>>, - inputs: Vec, - ) -> Result<()> { + pub fn burn<'info>(ctx: Context<'info, BurnInstruction<'info>>, inputs: Vec) -> Result<()> { burn::process_burn(ctx, inputs) } } diff --git a/programs/compressed-token/anchor/src/process_compress_spl_token_account.rs b/programs/compressed-token/anchor/src/process_compress_spl_token_account.rs index 0ba23a002c..2007e377af 100644 --- a/programs/compressed-token/anchor/src/process_compress_spl_token_account.rs +++ b/programs/compressed-token/anchor/src/process_compress_spl_token_account.rs @@ -10,7 +10,7 @@ use crate::{ }; pub fn process_compress_spl_token_account<'info>( - ctx: Context<'_, '_, '_, 'info, TransferInstruction<'info>>, + ctx: Context<'info, TransferInstruction<'info>>, owner: Pubkey, remaining_amount: Option, cpi_context: Option, @@ -103,7 +103,7 @@ pub mod sdk { token_pool_pda: Some(token_pool_pda), compress_or_decompress_token_account: Some(*token_account), token_program, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let remaining_accounts = vec![AccountMeta::new(*output_merkle_tree, false)]; diff --git a/programs/compressed-token/anchor/src/process_mint.rs b/programs/compressed-token/anchor/src/process_mint.rs index 84ee0e87ff..107720706b 100644 --- a/programs/compressed-token/anchor/src/process_mint.rs +++ b/programs/compressed-token/anchor/src/process_mint.rs @@ -36,7 +36,7 @@ pub const MINT_TO: bool = true; /// 5. Invoke system program to execute the compressed transaction. #[allow(unused_variables)] pub fn process_mint_to_or_compress<'info, const IS_MINT_TO: bool>( - ctx: Context<'_, '_, '_, 'info, MintToInstruction<'info>>, + ctx: Context<'info, MintToInstruction<'info>>, recipient_pubkeys: &[impl AsPubkey], amounts: &[impl ZeroCopyNumTrait], lamports: Option, @@ -149,7 +149,7 @@ pub fn process_mint_to_or_compress<'info, const IS_MINT_TO: bool>( #[cfg(target_os = "solana")] #[inline(never)] pub fn cpi_execute_compressed_transaction_mint_to<'info>( - ctx: &Context<'_, '_, '_, 'info, MintToInstruction>, + ctx: &Context<'info, MintToInstruction>, output_compressed_accounts: Vec, inputs: &mut Vec, pre_compressed_acounts_pos: usize, @@ -334,7 +334,7 @@ pub fn mint_spl_to_pool_pda( authority: ctx.accounts.authority.to_account_info(), }; - let cpi_ctx = CpiContext::new(ctx.accounts.token_program.to_account_info(), cpi_accounts); + let cpi_ctx = CpiContext::new(ctx.accounts.token_program.key(), cpi_accounts); anchor_spl::token_interface::mint_to(cpi_ctx, mint_amount)?; let post_token_balance = TokenAccount::try_deserialize( diff --git a/programs/compressed-token/anchor/src/process_transfer.rs b/programs/compressed-token/anchor/src/process_transfer.rs index c35bc6dac3..ac9c5eb8a7 100644 --- a/programs/compressed-token/anchor/src/process_transfer.rs +++ b/programs/compressed-token/anchor/src/process_transfer.rs @@ -37,7 +37,7 @@ use crate::{ /// 6. Invoke light_system_program::execute_compressed_transaction. #[inline(always)] pub fn process_transfer<'a, 'b, 'c, 'info: 'b + 'c>( - ctx: Context<'a, 'b, 'c, 'info, TransferInstruction<'info>>, + ctx: Context<'info, TransferInstruction<'info>>, inputs: CompressedTokenInstructionDataTransfer, ) -> Result<()> { bench_sbf_start!("t_context_and_check_sig"); @@ -429,7 +429,7 @@ pub fn cpi_execute_compressed_transaction_transfer< cpi_context_account, }; let mut cpi_ctx = CpiContext::new_with_signer( - _system_program_account_info, + *_system_program_account_info.key, cpi_accounts, signer_seeds_ref, ); @@ -858,7 +858,7 @@ pub mod transfer_sdk { token_pool_pda, compress_or_decompress_token_account, token_program, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; Ok(Instruction { diff --git a/programs/compressed-token/anchor/src/spl_compression.rs b/programs/compressed-token/anchor/src/spl_compression.rs index 9cfa82e0df..e4dbcf03dc 100644 --- a/programs/compressed-token/anchor/src/spl_compression.rs +++ b/programs/compressed-token/anchor/src/spl_compression.rs @@ -11,7 +11,7 @@ use crate::{ pub fn process_compression_or_decompression<'info>( inputs: &CompressedTokenInstructionDataTransfer, - ctx: &Context<'_, '_, '_, 'info, TransferInstruction<'info>>, + ctx: &Context<'info, TransferInstruction<'info>>, ) -> Result<()> { if inputs.is_compress { compress_spl_tokens(inputs, ctx) @@ -60,7 +60,7 @@ pub fn is_valid_token_pool_pda( pub fn decompress_spl_tokens<'info>( inputs: &CompressedTokenInstructionDataTransfer, - ctx: &Context<'_, '_, '_, 'info, TransferInstruction<'info>>, + ctx: &Context<'info, TransferInstruction<'info>>, ) -> Result<()> { let recipient = match ctx.accounts.compress_or_decompress_token_account.as_ref() { Some(compression_recipient) => compression_recipient.to_account_info(), @@ -188,7 +188,7 @@ pub fn invoke_token_program_with_multiple_token_pool_accounts<'info, const IS_BU pub fn compress_spl_tokens<'info>( inputs: &CompressedTokenInstructionDataTransfer, - ctx: &Context<'_, '_, '_, 'info, TransferInstruction<'info>>, + ctx: &Context<'info, TransferInstruction<'info>>, ) -> Result<()> { let recipient_token_pool = match ctx.accounts.token_pool_pda.as_ref() { Some(token_pool_pda) => token_pool_pda.to_account_info(), @@ -234,7 +234,7 @@ pub fn spl_token_transfer_cpi_with_signer<'info>( to, authority, }; - let cpi_ctx = CpiContext::new_with_signer(token_program, accounts, signer_seeds_ref); + let cpi_ctx = CpiContext::new_with_signer(*token_program.key, accounts, signer_seeds_ref); anchor_spl::token_interface::transfer(cpi_ctx, amount) } diff --git a/programs/compressed-token/program/Cargo.toml b/programs/compressed-token/program/Cargo.toml index 6c24b776cd..dcfa8726f3 100644 --- a/programs/compressed-token/program/Cargo.toml +++ b/programs/compressed-token/program/Cargo.toml @@ -41,7 +41,8 @@ anchor-lang = { workspace = true } spl-token = { workspace = true, features = ["no-entrypoint"] } account-compression = { workspace = true, features = ["cpi", "no-idl"] } light-system-program-anchor = { workspace = true, features = ["cpi"] } -solana-security-txt = "1.1.0" +solana-security-txt = { workspace = true } +solana-msg = { workspace = true } light-hasher = { workspace = true } light-heap = { workspace = true, optional = true } light-compressed-account = { workspace = true, features = ["anchor"] } diff --git a/programs/compressed-token/program/src/compressed_token/mint_action/accounts.rs b/programs/compressed-token/program/src/compressed_token/mint_action/accounts.rs index 8c793397f4..2166371acb 100644 --- a/programs/compressed-token/program/src/compressed_token/mint_action/accounts.rs +++ b/programs/compressed-token/program/src/compressed_token/mint_action/accounts.rs @@ -9,7 +9,7 @@ use light_token_interface::{ }; use light_zero_copy::U16; use pinocchio::{account_info::AccountInfo, pubkey::Pubkey}; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use crate::shared::{ accounts::{CpiContextLightSystemAccounts, LightSystemAccounts}, diff --git a/programs/compressed-token/program/src/compressed_token/mint_action/actions/authority.rs b/programs/compressed-token/program/src/compressed_token/mint_action/actions/authority.rs index 1b6cb399aa..b68b31d735 100644 --- a/programs/compressed-token/program/src/compressed_token/mint_action/actions/authority.rs +++ b/programs/compressed-token/program/src/compressed_token/mint_action/actions/authority.rs @@ -3,7 +3,7 @@ use std::panic::Location; use anchor_compressed_token::ErrorCode; use anchor_lang::prelude::ProgramError; use light_compressed_account::Pubkey; -use spl_pod::solana_msg::msg; +use solana_msg::msg; /// Universal authority validation function for all authority types /// Uses #[track_caller] to provide better error messages with source location diff --git a/programs/compressed-token/program/src/compressed_token/mint_action/actions/compress_and_close_cmint.rs b/programs/compressed-token/program/src/compressed_token/mint_action/actions/compress_and_close_cmint.rs index 618050a52b..f73c5f0d05 100644 --- a/programs/compressed-token/program/src/compressed_token/mint_action/actions/compress_and_close_cmint.rs +++ b/programs/compressed-token/program/src/compressed_token/mint_action/actions/compress_and_close_cmint.rs @@ -6,7 +6,7 @@ use pinocchio::{ pubkey::pubkey_eq, sysvars::{clock::Clock, Sysvar}, }; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use crate::{ compressed_token::mint_action::accounts::MintActionAccounts, diff --git a/programs/compressed-token/program/src/compressed_token/mint_action/actions/create_mint.rs b/programs/compressed-token/program/src/compressed_token/mint_action/actions/create_mint.rs index 2170892e01..f33008e6c7 100644 --- a/programs/compressed-token/program/src/compressed_token/mint_action/actions/create_mint.rs +++ b/programs/compressed-token/program/src/compressed_token/mint_action/actions/create_mint.rs @@ -7,7 +7,7 @@ use light_token_interface::{ MINT_ADDRESS_TREE, }; use pinocchio::pubkey::pubkey_eq; -use spl_pod::solana_msg::msg; +use solana_msg::msg; /// Processes the create mint action by validating parameters and setting up the new address. /// Note, the compressed output account creation is unified with other actions in a different function. diff --git a/programs/compressed-token/program/src/compressed_token/mint_action/actions/decompress_mint.rs b/programs/compressed-token/program/src/compressed_token/mint_action/actions/decompress_mint.rs index ab84e5867d..839c1c5b8f 100644 --- a/programs/compressed-token/program/src/compressed_token/mint_action/actions/decompress_mint.rs +++ b/programs/compressed-token/program/src/compressed_token/mint_action/actions/decompress_mint.rs @@ -12,7 +12,7 @@ use pinocchio::{ sysvars::{clock::Clock, rent::Rent, Sysvar}, }; use pinocchio_system::instructions::Transfer; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use crate::{ compressed_token::mint_action::accounts::MintActionAccounts, diff --git a/programs/compressed-token/program/src/compressed_token/mint_action/actions/process_actions.rs b/programs/compressed-token/program/src/compressed_token/mint_action/actions/process_actions.rs index a174da195f..50f930b5dd 100644 --- a/programs/compressed-token/program/src/compressed_token/mint_action/actions/process_actions.rs +++ b/programs/compressed-token/program/src/compressed_token/mint_action/actions/process_actions.rs @@ -11,7 +11,7 @@ use light_token_interface::{ TokenError, }; use pinocchio::account_info::AccountInfo; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use crate::{ compressed_token::mint_action::{ diff --git a/programs/compressed-token/program/src/compressed_token/mint_action/actions/update_metadata.rs b/programs/compressed-token/program/src/compressed_token/mint_action/actions/update_metadata.rs index e37a1d9c00..17032d581b 100644 --- a/programs/compressed-token/program/src/compressed_token/mint_action/actions/update_metadata.rs +++ b/programs/compressed-token/program/src/compressed_token/mint_action/actions/update_metadata.rs @@ -8,7 +8,7 @@ use light_token_interface::{ }, state::{ExtensionStruct, Mint, TokenMetadata}, }; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use crate::compressed_token::mint_action::check_authority; diff --git a/programs/compressed-token/program/src/compressed_token/mint_action/mint_input.rs b/programs/compressed-token/program/src/compressed_token/mint_action/mint_input.rs index d56bf62a55..aa3a475cee 100644 --- a/programs/compressed-token/program/src/compressed_token/mint_action/mint_input.rs +++ b/programs/compressed-token/program/src/compressed_token/mint_action/mint_input.rs @@ -38,9 +38,7 @@ pub fn create_input_compressed_mint_account( ) } else { // Data from instruction - compute hash - let bytes = compressed_mint - .try_to_vec() - .map_err(|e| ProgramError::BorshIoError(e.to_string()))?; + let bytes = borsh::to_vec(&compressed_mint).map_err(|_| ProgramError::BorshIoError)?; ( COMPRESSED_MINT_DISCRIMINATOR, Sha256BE::hash(bytes.as_slice())?, diff --git a/programs/compressed-token/program/src/compressed_token/mint_action/mint_output.rs b/programs/compressed-token/program/src/compressed_token/mint_action/mint_output.rs index 29a9e9cb2d..ff65ff84f5 100644 --- a/programs/compressed-token/program/src/compressed_token/mint_action/mint_output.rs +++ b/programs/compressed-token/program/src/compressed_token/mint_action/mint_output.rs @@ -10,7 +10,7 @@ use light_token_interface::{ state::Mint, }; use pinocchio::sysvars::{clock::Clock, Sysvar}; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use crate::{ compressed_token::mint_action::{ @@ -106,9 +106,7 @@ fn serialize_compressed_mint<'a>( Sha256BE::hash(compressed_account_data.data)?, ) } else { - let data = compressed_mint - .try_to_vec() - .map_err(|e| ProgramError::BorshIoError(e.to_string()))?; + let data = borsh::to_vec(&compressed_mint).map_err(|_| ProgramError::BorshIoError)?; if data.len() != compressed_account_data.data.len() { msg!( "Data allocation for output mint account is wrong: {} (expected) != {}", @@ -149,8 +147,7 @@ fn serialize_decompressed_mint( .ok_or(ErrorCode::CMintNotFound)?; // STEP 1: Serialize FIRST to know final size - let serialized = compressed_mint - .try_to_vec() + let serialized = borsh::to_vec(&*compressed_mint) .map_err(|_| ErrorCode::MintActionOutputSerializationFailed)?; let required_size = serialized.len(); diff --git a/programs/compressed-token/program/src/compressed_token/mint_action/zero_copy_config.rs b/programs/compressed-token/program/src/compressed_token/mint_action/zero_copy_config.rs index 26d19466a3..03dd63a7bd 100644 --- a/programs/compressed-token/program/src/compressed_token/mint_action/zero_copy_config.rs +++ b/programs/compressed-token/program/src/compressed_token/mint_action/zero_copy_config.rs @@ -6,7 +6,7 @@ use light_token_interface::{ instructions::mint_action::{ZAction, ZMintActionCompressedInstructionData}, state::{Mint, MintConfig}, }; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use tinyvec::ArrayVec; use crate::{ diff --git a/programs/compressed-token/program/src/compressed_token/transfer2/accounts.rs b/programs/compressed-token/program/src/compressed_token/transfer2/accounts.rs index 1eb0ecd67c..bc68757708 100644 --- a/programs/compressed-token/program/src/compressed_token/transfer2/accounts.rs +++ b/programs/compressed-token/program/src/compressed_token/transfer2/accounts.rs @@ -3,7 +3,7 @@ use anchor_lang::solana_program::program_error::ProgramError; use light_account_checks::packed_accounts::ProgramPackedAccounts; use light_program_profiler::profile; use pinocchio::{account_info::AccountInfo, pubkey::Pubkey}; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use crate::{ compressed_token::transfer2::config::Transfer2Config, diff --git a/programs/compressed-token/program/src/compressed_token/transfer2/check_extensions.rs b/programs/compressed-token/program/src/compressed_token/transfer2/check_extensions.rs index 39dde37cc0..f158103086 100644 --- a/programs/compressed-token/program/src/compressed_token/transfer2/check_extensions.rs +++ b/programs/compressed-token/program/src/compressed_token/transfer2/check_extensions.rs @@ -10,7 +10,7 @@ use light_token_interface::{ state::TokenDataVersion, }; use pinocchio::account_info::AccountInfo; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use crate::extensions::{check_mint_extensions, parse_mint_extensions, MintExtensionChecks}; diff --git a/programs/compressed-token/program/src/compressed_token/transfer2/compression/ctoken/compress_and_close.rs b/programs/compressed-token/program/src/compressed_token/transfer2/compression/ctoken/compress_and_close.rs index cd5e6a9371..33bb8b41ab 100644 --- a/programs/compressed-token/program/src/compressed_token/transfer2/compression/ctoken/compress_and_close.rs +++ b/programs/compressed-token/program/src/compressed_token/transfer2/compression/ctoken/compress_and_close.rs @@ -20,7 +20,7 @@ use pinocchio::{ pubkey::{pubkey_eq, Pubkey}, sysvars::Sysvar, }; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use super::inputs::CompressAndCloseInputs; #[cfg(target_os = "solana")] diff --git a/programs/compressed-token/program/src/compressed_token/transfer2/compression/ctoken/compress_or_decompress_ctokens.rs b/programs/compressed-token/program/src/compressed_token/transfer2/compression/ctoken/compress_or_decompress_ctokens.rs index 91cdba9b59..0ae85f87c3 100644 --- a/programs/compressed-token/program/src/compressed_token/transfer2/compression/ctoken/compress_or_decompress_ctokens.rs +++ b/programs/compressed-token/program/src/compressed_token/transfer2/compression/ctoken/compress_or_decompress_ctokens.rs @@ -9,7 +9,7 @@ use light_token_interface::{ }; use light_zero_copy::traits::ZeroCopyAtMut; use pinocchio::pubkey::pubkey_eq; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use super::{ compress_and_close::process_compress_and_close, decompress::validate_and_apply_compressed_only, diff --git a/programs/compressed-token/program/src/compressed_token/transfer2/compression/ctoken/decompress.rs b/programs/compressed-token/program/src/compressed_token/transfer2/compression/ctoken/decompress.rs index 6e109d8262..af51eef71b 100644 --- a/programs/compressed-token/program/src/compressed_token/transfer2/compression/ctoken/decompress.rs +++ b/programs/compressed-token/program/src/compressed_token/transfer2/compression/ctoken/decompress.rs @@ -7,7 +7,7 @@ use light_token_interface::{ TokenError, }; use pinocchio::{account_info::AccountInfo, pubkey::pubkey_eq}; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use super::inputs::DecompressCompressOnlyInputs; diff --git a/programs/compressed-token/program/src/compressed_token/transfer2/compression/ctoken/inputs.rs b/programs/compressed-token/program/src/compressed_token/transfer2/compression/ctoken/inputs.rs index ae8078cda5..fccf0f2612 100644 --- a/programs/compressed-token/program/src/compressed_token/transfer2/compression/ctoken/inputs.rs +++ b/programs/compressed-token/program/src/compressed_token/transfer2/compression/ctoken/inputs.rs @@ -8,7 +8,7 @@ use light_token_interface::instructions::{ }, }; use pinocchio::{account_info::AccountInfo, pubkey::Pubkey}; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use crate::{extensions::MintExtensionChecks, MAX_COMPRESSIONS}; diff --git a/programs/compressed-token/program/src/compressed_token/transfer2/compression/mod.rs b/programs/compressed-token/program/src/compressed_token/transfer2/compression/mod.rs index f7303303d5..5d13a95e1d 100644 --- a/programs/compressed-token/program/src/compressed_token/transfer2/compression/mod.rs +++ b/programs/compressed-token/program/src/compressed_token/transfer2/compression/mod.rs @@ -11,7 +11,7 @@ use light_token_interface::{ TokenError, }; use pinocchio::account_info::AccountInfo; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use super::check_extensions::MintExtensionCache; use crate::{ diff --git a/programs/compressed-token/program/src/compressed_token/transfer2/processor.rs b/programs/compressed-token/program/src/compressed_token/transfer2/processor.rs index c049ff7b21..b9b3eed402 100644 --- a/programs/compressed-token/program/src/compressed_token/transfer2/processor.rs +++ b/programs/compressed-token/program/src/compressed_token/transfer2/processor.rs @@ -16,7 +16,7 @@ use light_token_interface::{ }; use light_zero_copy::{traits::ZeroCopyAt, ZeroCopyNew}; use pinocchio::account_info::AccountInfo; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use super::check_extensions::{build_mint_extension_cache, MintExtensionCache}; use crate::{ diff --git a/programs/compressed-token/program/src/compressed_token/transfer2/sum_check.rs b/programs/compressed-token/program/src/compressed_token/transfer2/sum_check.rs index 90085d7982..b05f320f4f 100644 --- a/programs/compressed-token/program/src/compressed_token/transfer2/sum_check.rs +++ b/programs/compressed-token/program/src/compressed_token/transfer2/sum_check.rs @@ -6,7 +6,7 @@ use light_token_interface::instructions::transfer2::{ ZCompression, ZCompressionMode, ZMultiInputTokenDataWithContext, ZMultiTokenTransferOutputData, }; use pinocchio::account_info::AccountInfo; -use spl_pod::solana_msg::msg; +use solana_msg::msg; /// Process inputs and add amounts to mint sums #[inline(always)] diff --git a/programs/compressed-token/program/src/compressible/claim.rs b/programs/compressed-token/program/src/compressible/claim.rs index d3588dfee2..03def44f03 100644 --- a/programs/compressed-token/program/src/compressible/claim.rs +++ b/programs/compressed-token/program/src/compressible/claim.rs @@ -8,7 +8,7 @@ use light_token_interface::{ TokenError, }; use pinocchio::{account_info::AccountInfo, sysvars::Sysvar}; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use crate::shared::{convert_program_error, parse_config_account, transfer_lamports}; diff --git a/programs/compressed-token/program/src/compressible/withdraw_funding_pool.rs b/programs/compressed-token/program/src/compressible/withdraw_funding_pool.rs index c4be07dd83..e9b5f93982 100644 --- a/programs/compressed-token/program/src/compressible/withdraw_funding_pool.rs +++ b/programs/compressed-token/program/src/compressible/withdraw_funding_pool.rs @@ -6,7 +6,7 @@ use pinocchio::{ instruction::{Seed, Signer}, }; use pinocchio_system::instructions::Transfer; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use crate::shared::{convert_program_error, parse_config_account}; diff --git a/programs/compressed-token/program/src/convert_account_infos.rs b/programs/compressed-token/program/src/convert_account_infos.rs index f33ba8f2c6..47de908985 100644 --- a/programs/compressed-token/program/src/convert_account_infos.rs +++ b/programs/compressed-token/program/src/convert_account_infos.rs @@ -54,10 +54,10 @@ pub unsafe fn convert_account_infos<'a, const N: usize>( lamports: Rc::clone(&existing.lamports), data: Rc::clone(&existing.data), owner: existing.owner, - rent_epoch: existing.rent_epoch, is_signer: pinocchio_account.is_signer(), is_writable: pinocchio_account.is_writable(), executable: pinocchio_account.executable(), + _unused: 0, }); continue; } @@ -76,10 +76,10 @@ pub unsafe fn convert_account_infos<'a, const N: usize>( lamports, data, owner, - rent_epoch: 0, // Pinocchio doesn't track rent epoch is_signer: pinocchio_account.is_signer(), is_writable: pinocchio_account.is_writable(), executable: pinocchio_account.executable(), + _unused: 0, }; solana_accounts.push(account_info); diff --git a/programs/compressed-token/program/src/ctoken/close/processor.rs b/programs/compressed-token/program/src/ctoken/close/processor.rs index 58325a752a..ef45c8b873 100644 --- a/programs/compressed-token/program/src/ctoken/close/processor.rs +++ b/programs/compressed-token/program/src/ctoken/close/processor.rs @@ -8,7 +8,7 @@ use light_zero_copy::traits::ZeroCopyAtMut; #[cfg(target_os = "solana")] use pinocchio::sysvars::Sysvar; use pinocchio::{account_info::AccountInfo, pubkey::pubkey_eq}; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use super::accounts::CloseTokenAccountAccounts; use crate::shared::{convert_program_error, transfer_lamports}; diff --git a/programs/compressed-token/program/src/ctoken/create.rs b/programs/compressed-token/program/src/ctoken/create.rs index 04b895f211..29ef3d6b31 100644 --- a/programs/compressed-token/program/src/ctoken/create.rs +++ b/programs/compressed-token/program/src/ctoken/create.rs @@ -5,7 +5,7 @@ use light_compressed_account::Pubkey; use light_program_profiler::profile; use light_token_interface::instructions::create_token_account::CreateTokenAccountInstructionData; use pinocchio::account_info::AccountInfo; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use crate::{ extensions::has_mint_extensions, diff --git a/programs/compressed-token/program/src/ctoken/create_ata.rs b/programs/compressed-token/program/src/ctoken/create_ata.rs index d936c5b8cd..49cd1a9f12 100644 --- a/programs/compressed-token/program/src/ctoken/create_ata.rs +++ b/programs/compressed-token/program/src/ctoken/create_ata.rs @@ -4,7 +4,7 @@ use light_account_checks::AccountIterator; use light_program_profiler::profile; use light_token_interface::instructions::create_associated_token_account::CreateAssociatedTokenAccountInstructionData; use pinocchio::{account_info::AccountInfo, instruction::Seed, pubkey::pubkey_eq}; -use spl_pod::solana_msg::msg; +use solana_msg::msg; use crate::{ extensions::has_mint_extensions, diff --git a/programs/compressed-token/program/src/extensions/mod.rs b/programs/compressed-token/program/src/extensions/mod.rs index 7d7f5ef7ae..f286229b1e 100644 --- a/programs/compressed-token/program/src/extensions/mod.rs +++ b/programs/compressed-token/program/src/extensions/mod.rs @@ -22,7 +22,7 @@ pub use light_token_interface::{ RESTRICTED_EXTENSION_TYPES, }; use light_zero_copy::ZeroCopyNew; -use spl_pod::solana_msg::msg; +use solana_msg::msg; /// Returns true if extension should be included in compressed account output. #[inline(always)] diff --git a/programs/compressed-token/program/src/shared/config_account.rs b/programs/compressed-token/program/src/shared/config_account.rs index d29154d982..36a7b8c572 100644 --- a/programs/compressed-token/program/src/shared/config_account.rs +++ b/programs/compressed-token/program/src/shared/config_account.rs @@ -6,7 +6,8 @@ use light_account_checks::{ use light_compressible::config::CompressibleConfig; use light_program_profiler::profile; use pinocchio::account_info::AccountInfo; -use spl_pod::{bytemuck, solana_msg::msg}; +use solana_msg::msg; +use spl_pod::bytemuck; #[profile] #[inline(always)] diff --git a/programs/compressed-token/program/src/shared/transfer_lamports.rs b/programs/compressed-token/program/src/shared/transfer_lamports.rs index f660754da2..1e72400aa3 100644 --- a/programs/compressed-token/program/src/shared/transfer_lamports.rs +++ b/programs/compressed-token/program/src/shared/transfer_lamports.rs @@ -1,7 +1,7 @@ use light_program_profiler::profile; use pinocchio::{account_info::AccountInfo, program_error::ProgramError}; use pinocchio_system::instructions::Transfer as SystemTransfer; -use spl_pod::solana_msg::msg; +use solana_msg::msg; /// A transfer instruction containing the recipient account and amount #[derive(Debug)] diff --git a/programs/compressed-token/program/tests/compress_and_close.rs b/programs/compressed-token/program/tests/compress_and_close.rs index ae3fa7ea89..8485180fff 100644 --- a/programs/compressed-token/program/tests/compress_and_close.rs +++ b/programs/compressed-token/program/tests/compress_and_close.rs @@ -91,7 +91,7 @@ fn test_close_for_compress_and_close_duplicate_detection() { ]; // Serialize to bytes - let compression_bytes = compressions.try_to_vec().unwrap(); + let compression_bytes = borsh::to_vec(&compressions).unwrap(); // Convert to zero-copy slice let (compressions_zc, _) = Vec::::zero_copy_at(&compression_bytes).unwrap(); diff --git a/programs/compressed-token/program/tests/extensions_metadata.rs b/programs/compressed-token/program/tests/extensions_metadata.rs index 83d7ffbca6..75153e0047 100644 --- a/programs/compressed-token/program/tests/extensions_metadata.rs +++ b/programs/compressed-token/program/tests/extensions_metadata.rs @@ -194,7 +194,7 @@ fn serialize_actions(actions: &[Action]) -> Vec { extensions: None, }), }; - instruction_data.try_to_vec().expect("Failed to serialize") + borsh::to_vec(&instruction_data).expect("Failed to serialize") } #[test] diff --git a/programs/compressed-token/program/tests/mint.rs b/programs/compressed-token/program/tests/mint.rs index c082f4d7a9..e33ae975d7 100644 --- a/programs/compressed-token/program/tests/mint.rs +++ b/programs/compressed-token/program/tests/mint.rs @@ -334,7 +334,7 @@ fn test_rnd_create_compressed_mint_account() { // COMPLETE STRUCT ASSERTION: This verifies the entire CPI instruction structure is valid // by ensuring it can round-trip through borsh serialization/deserialization - let reserialize_test = cpi_borsh.try_to_vec().unwrap(); + let reserialize_test = borsh::to_vec(&cpi_borsh).unwrap(); let redeserialized = InstructionDataInvokeCpiWithReadOnly::deserialize(&mut reserialize_test.as_slice()) .unwrap(); diff --git a/programs/compressed-token/program/tests/mint_action.rs b/programs/compressed-token/program/tests/mint_action.rs index cfe0a2b6de..bd33e0e787 100644 --- a/programs/compressed-token/program/tests/mint_action.rs +++ b/programs/compressed-token/program/tests/mint_action.rs @@ -276,7 +276,7 @@ fn test_accounts_config_randomized() { 0..6, // 1-5 actions ); // Serialize to bytes then deserialize as zero-copy - let serialized = instruction_data.try_to_vec().expect("Failed to serialize"); + let serialized = borsh::to_vec(&instruction_data).expect("Failed to serialize"); let (zero_copy_data, _) = MintActionCompressedInstructionData::zero_copy_at(&serialized) .expect("Failed to deserialize as zero-copy"); diff --git a/programs/compressed-token/program/tests/multi_sum_check.rs b/programs/compressed-token/program/tests/multi_sum_check.rs index 8809e4ebf7..b40b6e61df 100644 --- a/programs/compressed-token/program/tests/multi_sum_check.rs +++ b/programs/compressed-token/program/tests/multi_sum_check.rs @@ -94,9 +94,9 @@ fn multi_sum_check_test( }); // Serialize to bytes using borsh - let input_bytes = inputs.try_to_vec().unwrap(); - let output_bytes = outputs.try_to_vec().unwrap(); - let compression_bytes = compressions.as_ref().map(|c| c.try_to_vec().unwrap()); + let input_bytes = borsh::to_vec(&inputs).unwrap(); + let output_bytes = borsh::to_vec(&outputs).unwrap(); + let compression_bytes = compressions.as_ref().map(|c| borsh::to_vec(&c).unwrap()); // Deserialize as zero-copy let (inputs_zc, _) = Vec::::zero_copy_at(&input_bytes).unwrap(); @@ -359,12 +359,12 @@ fn test_multi_mint_scenario( .collect(); // Serialize to bytes - let input_bytes = input_structs.try_to_vec().unwrap(); - let output_bytes = output_structs.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&input_structs).unwrap(); + let output_bytes = borsh::to_vec(&output_structs).unwrap(); let compression_bytes = if compression_structs.is_empty() { None } else { - Some(compression_structs.try_to_vec().unwrap()) + Some(borsh::to_vec(&compression_structs).unwrap()) }; // Deserialize as zero-copy @@ -451,8 +451,8 @@ fn test_duplicate_mint_pubkey_detection() { }) .collect(); - let input_bytes = input_structs.try_to_vec().unwrap(); - let output_bytes = output_structs.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&input_structs).unwrap(); + let output_bytes = borsh::to_vec(&output_structs).unwrap(); let (inputs_zc, _) = Vec::::zero_copy_at(&input_bytes).unwrap(); let (outputs_zc, _) = Vec::::zero_copy_at(&output_bytes).unwrap(); diff --git a/programs/compressed-token/program/tests/queue_indices.rs b/programs/compressed-token/program/tests/queue_indices.rs index 6f6dbf32f4..97702a19c9 100644 --- a/programs/compressed-token/program/tests/queue_indices.rs +++ b/programs/compressed-token/program/tests/queue_indices.rs @@ -20,7 +20,7 @@ struct QueueIndicesTestInput { } fn create_zero_copy_cpi_context(cpi_context: &CpiContext) -> Vec { - cpi_context.try_to_vec().unwrap() + borsh::to_vec(&cpi_context).unwrap() } #[test] diff --git a/programs/compressed-token/program/tests/token_input.rs b/programs/compressed-token/program/tests/token_input.rs index 706bf51fc9..0be0f60b12 100644 --- a/programs/compressed-token/program/tests/token_input.rs +++ b/programs/compressed-token/program/tests/token_input.rs @@ -72,7 +72,7 @@ fn test_rnd_create_input_compressed_account() { }; // Serialize and get zero-copy reference - let input_data = input_token_data.try_to_vec().unwrap(); + let input_data = borsh::to_vec(&input_token_data).unwrap(); let (z_input_data, _) = MultiInputTokenDataWithContext::zero_copy_at(&input_data).unwrap(); // Create mock remaining accounts diff --git a/programs/compressed-token/program/tests/token_output.rs b/programs/compressed-token/program/tests/token_output.rs index 1c54b14255..4dc0b13aa6 100644 --- a/programs/compressed-token/program/tests/token_output.rs +++ b/programs/compressed-token/program/tests/token_output.rs @@ -134,7 +134,7 @@ fn test_rnd_create_output_compressed_accounts() { tlv_instruction_data_vecs.push(vec![]); // Empty vec needs explicit type annotation and borsh serialization let empty_vec: Vec = vec![]; - tlv_bytes_vecs.push(empty_vec.try_to_vec().unwrap()); + tlv_bytes_vecs.push(borsh::to_vec(&empty_vec).unwrap()); } } @@ -220,7 +220,7 @@ fn test_rnd_create_output_compressed_accounts() { // Use V3 hash (SHA256 of serialized data) when TLV present, V2 hash otherwise let (data_hash, discriminator) = if tlv_flags[i] { - let serialized = token_data.try_to_vec().unwrap(); + let serialized = borsh::to_vec(&token_data).unwrap(); let hash = light_hasher::sha256::Sha256BE::hash(&serialized).unwrap(); (hash, TOKEN_COMPRESSED_ACCOUNT_V3_DISCRIMINATOR) } else { @@ -236,7 +236,7 @@ fn test_rnd_create_output_compressed_accounts() { owner: light_compressed_token::ID.into(), lamports: account_lamports, data: Some(CompressedAccountData { - data: token_data.try_to_vec().unwrap(), + data: borsh::to_vec(&token_data).unwrap(), discriminator, data_hash, }), diff --git a/programs/registry/Cargo.toml b/programs/registry/Cargo.toml index 0423906a08..1af87efcc4 100644 --- a/programs/registry/Cargo.toml +++ b/programs/registry/Cargo.toml @@ -39,6 +39,7 @@ spl-pod = { workspace = true } solana-security-txt = "1.1.0" light-merkle-tree-metadata = { workspace = true, features = ["anchor"] } light-batched-merkle-tree = { workspace = true } +solana-program = { workspace = true } [target.'cfg(not(target_os = "solana"))'.dependencies] solana-sdk = { workspace = true } diff --git a/programs/registry/src/account_compression_cpi/batch_append.rs b/programs/registry/src/account_compression_cpi/batch_append.rs index 112400def4..4222174780 100644 --- a/programs/registry/src/account_compression_cpi/batch_append.rs +++ b/programs/registry/src/account_compression_cpi/batch_append.rs @@ -42,7 +42,7 @@ pub fn process_batch_append(ctx: &Context, bump: u8, data: Vec) }; let cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.account_compression_program.to_account_info(), + ctx.accounts.account_compression_program.key(), accounts, signer_seeds, ); diff --git a/programs/registry/src/account_compression_cpi/batch_nullify.rs b/programs/registry/src/account_compression_cpi/batch_nullify.rs index f6756f4757..66aaaacccf 100644 --- a/programs/registry/src/account_compression_cpi/batch_nullify.rs +++ b/programs/registry/src/account_compression_cpi/batch_nullify.rs @@ -34,7 +34,7 @@ pub fn process_batch_nullify(ctx: &Context, bump: u8, data: Vec( cpi_context_account, associated_merkle_tree, }; - let cpi_ctx = CpiContext::new_with_signer(light_system_program, accounts, signer_seeds); + let cpi_ctx = CpiContext::new_with_signer(*light_system_program.key, accounts, signer_seeds); light_system_program::cpi::init_cpi_context_account(cpi_ctx) } diff --git a/programs/registry/src/account_compression_cpi/migrate_state.rs b/programs/registry/src/account_compression_cpi/migrate_state.rs index 69e5a26930..c72be2554b 100644 --- a/programs/registry/src/account_compression_cpi/migrate_state.rs +++ b/programs/registry/src/account_compression_cpi/migrate_state.rs @@ -43,7 +43,7 @@ pub fn process_migrate_state( output_queue: ctx.accounts.output_queue.to_account_info(), }; let cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.account_compression_program.to_account_info(), + ctx.accounts.account_compression_program.key(), accounts, signer_seeds, ); diff --git a/programs/registry/src/account_compression_cpi/nullify.rs b/programs/registry/src/account_compression_cpi/nullify.rs index 818e2b43a8..0c5a08ae8f 100644 --- a/programs/registry/src/account_compression_cpi/nullify.rs +++ b/programs/registry/src/account_compression_cpi/nullify.rs @@ -48,7 +48,7 @@ pub fn process_nullify( fee_payer: Some(ctx.accounts.authority.to_account_info()), }; let cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.account_compression_program.to_account_info(), + ctx.accounts.account_compression_program.key(), accounts, signer_seeds, ); diff --git a/programs/registry/src/account_compression_cpi/rollover_batched_address_tree.rs b/programs/registry/src/account_compression_cpi/rollover_batched_address_tree.rs index f30f5dec6b..0a285d35bb 100644 --- a/programs/registry/src/account_compression_cpi/rollover_batched_address_tree.rs +++ b/programs/registry/src/account_compression_cpi/rollover_batched_address_tree.rs @@ -42,7 +42,7 @@ pub fn process_rollover_batched_address_merkle_tree( }; let cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.account_compression_program.to_account_info(), + ctx.accounts.account_compression_program.key(), accounts, signer_seeds, ); diff --git a/programs/registry/src/account_compression_cpi/rollover_batched_state_tree.rs b/programs/registry/src/account_compression_cpi/rollover_batched_state_tree.rs index fccd776b67..ff932b1eec 100644 --- a/programs/registry/src/account_compression_cpi/rollover_batched_state_tree.rs +++ b/programs/registry/src/account_compression_cpi/rollover_batched_state_tree.rs @@ -54,7 +54,7 @@ pub fn process_rollover_batched_state_merkle_tree( }; let cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.account_compression_program.to_account_info(), + ctx.accounts.account_compression_program.key(), accounts, signer_seeds, ); diff --git a/programs/registry/src/account_compression_cpi/rollover_state_tree.rs b/programs/registry/src/account_compression_cpi/rollover_state_tree.rs index e34e11527b..959a2cb5ea 100644 --- a/programs/registry/src/account_compression_cpi/rollover_state_tree.rs +++ b/programs/registry/src/account_compression_cpi/rollover_state_tree.rs @@ -84,7 +84,7 @@ pub fn process_rollover_address_merkle_tree_and_queue( old_queue: ctx.accounts.old_queue.to_account_info(), }; let cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.account_compression_program.to_account_info(), + ctx.accounts.account_compression_program.key(), accounts, signer_seeds, ); @@ -110,7 +110,7 @@ pub fn process_rollover_state_merkle_tree_and_queue( old_nullifier_queue: ctx.accounts.old_queue.to_account_info(), }; let cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.account_compression_program.to_account_info(), + ctx.accounts.account_compression_program.key(), accounts, signer_seeds, ); diff --git a/programs/registry/src/account_compression_cpi/sdk.rs b/programs/registry/src/account_compression_cpi/sdk.rs index f002c35499..a5e97948ce 100644 --- a/programs/registry/src/account_compression_cpi/sdk.rs +++ b/programs/registry/src/account_compression_cpi/sdk.rs @@ -338,7 +338,7 @@ pub fn create_initialize_batched_merkle_tree_instruction( let protocol_config_pda = get_protocol_config_pda_address().0; let instruction_data = crate::instruction::InitializeBatchedStateMerkleTree { bump, - params: params.try_to_vec().unwrap(), + params: borsh::to_vec(¶ms).unwrap(), }; let accounts = crate::accounts::InitializeBatchedStateMerkleTreeAndQueue { authority, @@ -470,7 +470,7 @@ pub fn create_initialize_batched_address_merkle_tree_instruction( let instruction_data = crate::instruction::InitializeBatchedAddressMerkleTree { bump, - params: params.try_to_vec().unwrap(), + params: borsh::to_vec(¶ms).unwrap(), }; let protocol_config_pda = get_protocol_config_pda_address().0; let accounts = crate::accounts::InitializeBatchedAddressTree { diff --git a/programs/registry/src/account_compression_cpi/update_address_tree.rs b/programs/registry/src/account_compression_cpi/update_address_tree.rs index 1d68641773..1067d0dbd9 100644 --- a/programs/registry/src/account_compression_cpi/update_address_tree.rs +++ b/programs/registry/src/account_compression_cpi/update_address_tree.rs @@ -54,7 +54,7 @@ pub fn process_update_address_merkle_tree( fee_payer: Some(ctx.accounts.authority.to_account_info()), }; let cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.account_compression_program.to_account_info(), + ctx.accounts.account_compression_program.key(), accounts, signer_seeds, ); diff --git a/programs/registry/src/compressible/claim.rs b/programs/registry/src/compressible/claim.rs index 7cf1c9b19b..b01298eb89 100644 --- a/programs/registry/src/compressible/claim.rs +++ b/programs/registry/src/compressible/claim.rs @@ -33,7 +33,7 @@ pub struct ClaimContext<'info> { pub compressed_token_program: AccountInfo<'info>, } -pub fn process_claim<'info>(ctx: &Context<'_, '_, '_, 'info, ClaimContext<'info>>) -> Result<()> { +pub fn process_claim<'info>(ctx: &Context<'info, ClaimContext<'info>>) -> Result<()> { // Build instruction data: discriminator (104u8) + pool_pda_bump let instruction_data = vec![104u8]; // Claim instruction discriminator diff --git a/programs/registry/src/compressible/compress_and_close.rs b/programs/registry/src/compressible/compress_and_close.rs index 8a51a1c30d..1c903fb3c4 100644 --- a/programs/registry/src/compressible/compress_and_close.rs +++ b/programs/registry/src/compressible/compress_and_close.rs @@ -32,7 +32,7 @@ pub struct CompressAndCloseContext<'info> { } pub fn process_compress_and_close<'c: 'info, 'info>( - ctx: &Context<'_, '_, 'c, 'info, CompressAndCloseContext<'info>>, + ctx: &Context<'info, CompressAndCloseContext<'info>>, authority_index: u8, destination_index: u8, indices: Vec, diff --git a/programs/registry/src/compressible/compressed_token/compress_and_close.rs b/programs/registry/src/compressible/compressed_token/compress_and_close.rs index 3886d4711a..b6b37f86d7 100644 --- a/programs/registry/src/compressible/compressed_token/compress_and_close.rs +++ b/programs/registry/src/compressible/compressed_token/compress_and_close.rs @@ -1,4 +1,6 @@ -use anchor_lang::{prelude::ProgramError, pubkey, AnchorDeserialize, AnchorSerialize, Result}; +use anchor_lang::{ + prelude::ProgramError, pubkey, solana_program::msg, AnchorDeserialize, AnchorSerialize, Result, +}; use light_account_checks::packed_accounts::ProgramPackedAccounts; use light_program_profiler::profile; use light_token_interface::{ @@ -15,7 +17,6 @@ use light_zero_copy::traits::ZeroCopyAt; use solana_account_info::AccountInfo; use solana_instruction::{AccountMeta, Instruction}; use solana_pubkey::Pubkey; -use spl_pod::solana_msg::msg; use crate::errors::RegistryError; @@ -230,9 +231,8 @@ pub fn compress_and_close_ctoken_accounts_with_indices<'info>( max_top_up: u16::MAX, // No limit }; // Serialize instruction data - let serialized = instruction_data - .try_to_vec() - .map_err(|_| RegistryError::SerializationFailed)?; + let serialized = + borsh::to_vec(&instruction_data).map_err(|_| RegistryError::SerializationFailed)?; // Build instruction data with discriminator let mut data = Vec::with_capacity(1 + serialized.len()); diff --git a/programs/registry/src/epoch/register_epoch.rs b/programs/registry/src/epoch/register_epoch.rs index 4845025b60..603e924d13 100644 --- a/programs/registry/src/epoch/register_epoch.rs +++ b/programs/registry/src/epoch/register_epoch.rs @@ -67,13 +67,12 @@ impl ForesterEpochPda { epoch: u64, ) -> Result { // Domain separation using the pubkey and current_light_slot. - let mut hasher = anchor_lang::solana_program::hash::Hasher::default(); - hasher.hashv(&[ + let hash = solana_program::hash::hashv(&[ pubkey.to_bytes().as_slice(), &epoch.to_be_bytes(), ¤t_light_slot.to_be_bytes(), ]); - let hash_value = u64::from_be_bytes(hasher.result().to_bytes()[0..8].try_into().unwrap()); + let hash_value = u64::from_be_bytes(hash.to_bytes()[0..8].try_into().unwrap()); let forester_index = hash_value % total_epoch_weight; Ok(forester_index) } @@ -136,7 +135,7 @@ impl ForesterEpochPda { queue_pubkey: &Pubkey, num_work_items: u64, ) -> Result<()> { - let current_solana_slot = anchor_lang::solana_program::sysvar::clock::Clock::get()?.slot; + let current_solana_slot = anchor_lang::prelude::Clock::get()?.slot; Self::check_forester( forester_epoch_pda, authority, diff --git a/programs/registry/src/lib.rs b/programs/registry/src/lib.rs index a21b58cd4b..792f23e3a3 100644 --- a/programs/registry/src/lib.rs +++ b/programs/registry/src/lib.rs @@ -123,7 +123,7 @@ pub mod light_registry { }; let cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.account_compression_program.to_account_info(), + ctx.accounts.account_compression_program.key(), accounts, signer_seeds, ); @@ -144,7 +144,7 @@ pub mod light_registry { }; let cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.account_compression_program.to_account_info(), + ctx.accounts.account_compression_program.key(), accounts, signer_seeds, ); @@ -194,7 +194,7 @@ pub mod light_registry { /// 2. Protocol config is copied. /// 3. Epoch account is created if needed. pub fn register_forester_epoch<'info>( - ctx: Context<'_, '_, '_, 'info, RegisterForesterEpoch<'info>>, + ctx: Context<'info, RegisterForesterEpoch<'info>>, epoch: u64, ) -> Result<()> { // Only init if not initialized @@ -232,7 +232,7 @@ pub mod light_registry { /// work instructions during the active phase. /// Registration Period must be over. pub fn finalize_registration<'info>( - ctx: Context<'_, '_, '_, 'info, FinalizeRegistration<'info>>, + ctx: Context<'info, FinalizeRegistration<'info>>, ) -> Result<()> { let current_solana_slot = anchor_lang::solana_program::clock::Clock::get()?.slot; let current_active_epoch = ctx @@ -264,7 +264,7 @@ pub mod light_registry { Ok(()) } - pub fn report_work<'info>(ctx: Context<'_, '_, '_, 'info, ReportWork<'info>>) -> Result<()> { + pub fn report_work<'info>(ctx: Context<'info, ReportWork<'info>>) -> Result<()> { let current_solana_slot = anchor_lang::solana_program::clock::Clock::get()?.slot; ctx.accounts .epoch_pda @@ -394,7 +394,7 @@ pub mod light_registry { } pub fn nullify<'info>( - ctx: Context<'_, '_, '_, 'info, NullifyLeaves<'info>>, + ctx: Context<'info, NullifyLeaves<'info>>, bump: u8, change_log_indices: Vec, leaves_queue_indices: Vec, @@ -457,7 +457,7 @@ pub mod light_registry { } pub fn rollover_address_merkle_tree_and_queue<'info>( - ctx: Context<'_, '_, '_, 'info, RolloverAddressMerkleTreeAndQueue<'info>>, + ctx: Context<'info, RolloverAddressMerkleTreeAndQueue<'info>>, bump: u8, ) -> Result<()> { let metadata = ctx.accounts.old_merkle_tree.load()?.metadata; @@ -473,7 +473,7 @@ pub mod light_registry { } pub fn rollover_state_merkle_tree_and_queue<'info>( - ctx: Context<'_, '_, '_, 'info, RolloverStateMerkleTreeAndQueue<'info>>, + ctx: Context<'info, RolloverStateMerkleTreeAndQueue<'info>>, bump: u8, ) -> Result<()> { let metadata = ctx.accounts.old_merkle_tree.load()?.metadata; @@ -500,7 +500,7 @@ pub mod light_registry { } pub fn initialize_batched_state_merkle_tree<'info>( - ctx: Context<'_, '_, '_, 'info, InitializeBatchedStateMerkleTreeAndQueue<'info>>, + ctx: Context<'info, InitializeBatchedStateMerkleTreeAndQueue<'info>>, bump: u8, params: Vec, ) -> Result<()> { @@ -529,7 +529,7 @@ pub mod light_registry { &ctx.accounts.protocol_config_pda.config, )?; - process_initialize_batched_state_merkle_tree(&ctx, bump, params.try_to_vec().unwrap())?; + process_initialize_batched_state_merkle_tree(&ctx, bump, borsh::to_vec(¶ms).unwrap())?; process_initialize_cpi_context( bump, @@ -541,7 +541,7 @@ pub mod light_registry { } pub fn batch_nullify<'info>( - ctx: Context<'_, '_, '_, 'info, BatchNullify<'info>>, + ctx: Context<'info, BatchNullify<'info>>, bump: u8, data: Vec, ) -> Result<()> { @@ -561,7 +561,7 @@ pub mod light_registry { } pub fn batch_append<'info>( - ctx: Context<'_, '_, '_, 'info, BatchAppend<'info>>, + ctx: Context<'info, BatchAppend<'info>>, bump: u8, data: Vec, ) -> Result<()> { @@ -615,11 +615,11 @@ pub mod light_registry { if ctx.accounts.authority.key() != ctx.accounts.protocol_config_pda.authority { return err!(RegistryError::InvalidSigner); } - process_initialize_batched_address_merkle_tree(&ctx, bump, params.try_to_vec()?) + process_initialize_batched_address_merkle_tree(&ctx, bump, borsh::to_vec(¶ms)?) } pub fn batch_update_address_tree<'info>( - ctx: Context<'_, '_, '_, 'info, BatchUpdateAddressTree<'info>>, + ctx: Context<'info, BatchUpdateAddressTree<'info>>, bump: u8, data: Vec, ) -> Result<()> { @@ -638,7 +638,7 @@ pub mod light_registry { } pub fn rollover_batched_address_merkle_tree<'info>( - ctx: Context<'_, '_, '_, 'info, RolloverBatchedAddressMerkleTree<'info>>, + ctx: Context<'info, RolloverBatchedAddressMerkleTree<'info>>, bump: u8, ) -> Result<()> { let account = BatchedMerkleTreeAccount::address_from_account_info( @@ -656,7 +656,7 @@ pub mod light_registry { } pub fn rollover_batched_state_merkle_tree<'info>( - ctx: Context<'_, '_, '_, 'info, RolloverBatchedStateMerkleTree<'info>>, + ctx: Context<'info, RolloverBatchedStateMerkleTree<'info>>, bump: u8, ) -> Result<()> { let account = @@ -686,7 +686,7 @@ pub mod light_registry { } pub fn migrate_state<'info>( - ctx: Context<'_, '_, '_, 'info, MigrateState<'info>>, + ctx: Context<'info, MigrateState<'info>>, bump: u8, inputs: MigrateLeafParams, ) -> Result<()> { @@ -783,7 +783,7 @@ pub mod light_registry { } /// Claims rent from compressible token accounts - pub fn claim<'info>(ctx: Context<'_, '_, '_, 'info, ClaimContext<'info>>) -> Result<()> { + pub fn claim<'info>(ctx: Context<'info, ClaimContext<'info>>) -> Result<()> { // Check forester and track work // Using [0u8; 32] as the queue pubkey since claim doesn't have a specific queue ForesterEpochPda::check_forester_in_program( @@ -799,7 +799,7 @@ pub mod light_registry { /// Compress and close token accounts via transfer2 pub fn compress_and_close<'c: 'info, 'info>( - ctx: Context<'_, '_, 'c, 'info, CompressAndCloseContext<'info>>, + ctx: Context<'info, CompressAndCloseContext<'info>>, authority_index: u8, destination_index: u8, indices: Vec, diff --git a/programs/registry/src/sdk.rs b/programs/registry/src/sdk.rs index 0ce7868842..e34628c861 100644 --- a/programs/registry/src/sdk.rs +++ b/programs/registry/src/sdk.rs @@ -162,7 +162,7 @@ pub fn create_register_forester_instruction( fee_payer: *fee_payer, authority: *governance_authority, protocol_config_pda, - system_program: solana_sdk::system_program::id(), + system_program: anchor_lang::solana_program::system_program::id(), }; Instruction { program_id: crate::ID, @@ -228,7 +228,7 @@ pub fn create_register_forester_epoch_pda_instruction( authority: *authority, epoch_pda, protocol_config: protocol_config_pda, - system_program: solana_sdk::system_program::id(), + system_program: anchor_lang::solana_program::system_program::id(), }; Instruction { program_id: crate::ID, diff --git a/programs/system/src/invoke/verify_signer.rs b/programs/system/src/invoke/verify_signer.rs index 47d761867c..82fd5ecce6 100644 --- a/programs/system/src/invoke/verify_signer.rs +++ b/programs/system/src/invoke/verify_signer.rs @@ -52,7 +52,7 @@ mod test { }, ..PackedCompressedAccountWithMerkleContext::default() }; - let bytes = compressed_account_with_context.try_to_vec().unwrap(); + let bytes = borsh::to_vec(&compressed_account_with_context).unwrap(); let compressed_account_with_context = ZPackedCompressedAccountWithMerkleContext::zero_copy_at(&bytes) .unwrap() @@ -76,9 +76,7 @@ mod test { ..PackedCompressedAccountWithMerkleContext::default() }; - let bytes = invalid_compressed_account_with_context - .try_to_vec() - .unwrap(); + let bytes = borsh::to_vec(&invalid_compressed_account_with_context).unwrap(); let invalid_compressed_account_with_context = ZPackedCompressedAccountWithMerkleContext::zero_copy_at(&bytes) .unwrap() diff --git a/programs/system/tests/cpi_context.rs b/programs/system/tests/cpi_context.rs index 1699a6794f..9ce4e46ef1 100644 --- a/programs/system/tests/cpi_context.rs +++ b/programs/system/tests/cpi_context.rs @@ -425,7 +425,7 @@ fn test_set_cpi_context_first_invocation() { let cpi_context_account = create_test_cpi_context_account(None); let instruction_data = create_test_instruction_data(true, true, 1); - let input_bytes = instruction_data.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&instruction_data).unwrap(); let (z_inputs, _) = ZInstructionDataInvokeCpi::zero_copy_at(&input_bytes).unwrap(); let w_instruction_data = WrappedInstructionData::new(z_inputs).unwrap(); let result = set_cpi_context( @@ -437,7 +437,7 @@ fn test_set_cpi_context_first_invocation() { // assert { assert!(result.is_ok()); - let input_bytes = instruction_data.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&instruction_data).unwrap(); let (z_inputs, _) = ZInstructionDataInvokeCpi::zero_copy_at(&input_bytes).unwrap(); let cpi_context = deserialize_cpi_context_account(&cpi_context_account).unwrap(); assert_eq!(cpi_context.fee_payer.to_bytes(), fee_payer); @@ -470,7 +470,7 @@ fn test_set_cpi_context_new_address_owner() { }, ]; - let input_bytes = instruction_data.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&instruction_data).unwrap(); let (z_inputs, _) = ZInstructionDataInvokeCpi::zero_copy_at(&input_bytes).unwrap(); let w_instruction_data = WrappedInstructionData::new(z_inputs).unwrap(); set_cpi_context( @@ -531,7 +531,7 @@ fn test_set_cpi_context_new_address_owner_subsequent() { address_merkle_tree_root_index: 10, }]; - let input_bytes = first_data.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&first_data).unwrap(); let (z_inputs, _) = ZInstructionDataInvokeCpi::zero_copy_at(&input_bytes).unwrap(); let w_instruction_data = WrappedInstructionData::new(z_inputs).unwrap(); set_cpi_context( @@ -551,7 +551,7 @@ fn test_set_cpi_context_new_address_owner_subsequent() { address_merkle_tree_root_index: 20, }]; - let input_bytes = second_data.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&second_data).unwrap(); let (z_inputs, _) = ZInstructionDataInvokeCpi::zero_copy_at(&input_bytes).unwrap(); let w_instruction_data = WrappedInstructionData::new(z_inputs).unwrap(); set_cpi_context( @@ -594,7 +594,7 @@ fn test_set_cpi_context_subsequent_invocation() { let mut first_instruction_data = create_test_instruction_data(true, true, 1); // First invocation { - let input_bytes = first_instruction_data.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&first_instruction_data).unwrap(); let (z_inputs, _) = ZInstructionDataInvokeCpi::zero_copy_at(&input_bytes).unwrap(); let w_instruction_data = WrappedInstructionData::new(z_inputs).unwrap(); set_cpi_context( @@ -619,7 +619,7 @@ fn test_set_cpi_context_subsequent_invocation() { // assert { assert!(result.is_ok()); - let input_bytes = inputs_subsequent.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&inputs_subsequent).unwrap(); let (_z_inputs, _) = ZInstructionDataInvokeCpi::zero_copy_at(&input_bytes).unwrap(); let cpi_context = deserialize_cpi_context_account(&cpi_context_account).unwrap(); assert_eq!(cpi_context.fee_payer.to_bytes(), fee_payer); @@ -633,7 +633,7 @@ fn test_set_cpi_context_subsequent_invocation() { .input_compressed_accounts_with_merkle_context .extend(inputs_subsequent.input_compressed_accounts_with_merkle_context); - let input_bytes = first_instruction_data.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&first_instruction_data).unwrap(); let (z_expected_inputs, _) = ZInstructionDataInvokeCpi::zero_copy_at(&input_bytes).unwrap(); // Assert that the CPI context contains the combined instruction data assert!( @@ -651,7 +651,7 @@ fn test_set_cpi_context_fee_payer_mismatch() { let first_instruction_data = create_test_instruction_data(true, true, 1); // First invocation { - let input_bytes = first_instruction_data.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&first_instruction_data).unwrap(); let (z_inputs, _) = ZInstructionDataInvokeCpi::zero_copy_at(&input_bytes).unwrap(); let w_instruction_data = WrappedInstructionData::new(z_inputs).unwrap(); set_cpi_context( @@ -964,7 +964,7 @@ fn test_process_cpi_context_set_context() { // Create expected instruction data. clean_input_data(&mut instruction_data); - let input_bytes = instruction_data.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&instruction_data).unwrap(); let (z_expected_inputs, _) = ZInstructionDataInvokeCpi::zero_copy_at(&input_bytes).unwrap(); // Assert that the CPI context contains the instruction data assert!( @@ -987,7 +987,7 @@ fn test_process_cpi_context_scenario() { // Inject malicious data into cpi context account by setting context with malicious inputs. { // Set the malicious data as if it was the first invocation - let input_bytes = malicious_inputs.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&malicious_inputs).unwrap(); let (z_malicious_inputs, _) = ZInstructionDataInvokeCpi::zero_copy_at(&input_bytes).unwrap(); let w_malicious_instruction_data = WrappedInstructionData::new(z_malicious_inputs).unwrap(); @@ -1017,7 +1017,7 @@ fn test_process_cpi_context_scenario() { let cpi_context = deserialize_cpi_context_account(&cpi_context_account).unwrap(); // Create expected instruction data. clean_input_data(&mut instruction_data); - let input_bytes = instruction_data.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&instruction_data).unwrap(); let (z_inputs, _) = ZInstructionDataInvokeCpi::zero_copy_at(&input_bytes).unwrap(); assert!(instruction_data_eq(&cpi_context, &z_inputs)); assert_eq!( @@ -1043,7 +1043,7 @@ fn test_process_cpi_context_scenario() { // assert { assert!(result.is_ok()); - let input_bytes = inputs_subsequent.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&inputs_subsequent).unwrap(); let (z_inputs_subsequent, _) = ZInstructionDataInvokeCpi::zero_copy_at(&input_bytes).unwrap(); let cpi_context = deserialize_cpi_context_account(&cpi_context_account).unwrap(); @@ -1059,7 +1059,7 @@ fn test_process_cpi_context_scenario() { .input_compressed_accounts_with_merkle_context .extend(inputs_subsequent.input_compressed_accounts_with_merkle_context); - let input_bytes = instruction_data.try_to_vec().unwrap(); + let input_bytes = borsh::to_vec(&instruction_data).unwrap(); let (z_combined_inputs, _) = ZInstructionDataInvokeCpi::zero_copy_at(&input_bytes).unwrap(); assert!(instruction_data_eq(&cpi_context, &z_combined_inputs)); diff --git a/scripts/devenv/versions.sh b/scripts/devenv/versions.sh index 4021b32fba..b7de5e477b 100755 --- a/scripts/devenv/versions.sh +++ b/scripts/devenv/versions.sh @@ -11,8 +11,8 @@ export PHOTON_VERSION=$(grep '^version' "${REPO_ROOT}/external/photon/Cargo.toml # Versions to bump manually (edit below) export NODE_VERSION="22.16.0" -export SOLANA_VERSION="2.3.13" -export ANCHOR_VERSION="0.31.1" +export SOLANA_VERSION="3.1.11" +export ANCHOR_VERSION="1.0.0-rc.5" export JQ_VERSION="1.8.0" export REDIS_VERSION="8.0.1" diff --git a/sdk-libs/client/Cargo.toml b/sdk-libs/client/Cargo.toml index ab55df17f1..835a467e27 100644 --- a/sdk-libs/client/Cargo.toml +++ b/sdk-libs/client/Cargo.toml @@ -32,7 +32,7 @@ solana-account = { workspace = true } solana-keypair = { workspace = true } solana-compute-budget-interface = { workspace = true } solana-banks-client = { workspace = true, optional = true } -solana-address-lookup-table-interface = { version = "2.2.1", features = [ +solana-address-lookup-table-interface = { version = "3.0", features = [ "bytemuck", "bincode", ] } diff --git a/sdk-libs/client/src/interface/initialize_config.rs b/sdk-libs/client/src/interface/initialize_config.rs index 7b5919cdb1..11aedaaec7 100644 --- a/sdk-libs/client/src/interface/initialize_config.rs +++ b/sdk-libs/client/src/interface/initialize_config.rs @@ -119,9 +119,8 @@ impl InitializeRentFreeConfig { // SHA256("global:initialize_compression_config")[..8] const DISCRIMINATOR: [u8; 8] = [133, 228, 12, 169, 56, 76, 222, 61]; - let serialized_data = instruction_data - .try_to_vec() - .expect("Failed to serialize instruction data"); + let serialized_data = + borsh::to_vec(&instruction_data).expect("Failed to serialize instruction data"); let mut data = Vec::with_capacity(DISCRIMINATOR.len() + serialized_data.len()); data.extend_from_slice(&DISCRIMINATOR); diff --git a/sdk-libs/client/src/interface/instructions.rs b/sdk-libs/client/src/interface/instructions.rs index f6d754b9b1..40c2d5da7e 100644 --- a/sdk-libs/client/src/interface/instructions.rs +++ b/sdk-libs/client/src/interface/instructions.rs @@ -129,7 +129,7 @@ pub fn initialize_config( address_space: address_space.iter().map(|p| p.to_bytes()).collect(), config_bump, }; - let serialized = params.try_to_vec().expect("serialize params"); + let serialized = borsh::to_vec(¶ms).expect("serialize params"); let mut data = Vec::with_capacity(discriminator.len() + serialized.len()); data.extend_from_slice(discriminator); data.extend_from_slice(&serialized); @@ -167,7 +167,7 @@ pub fn update_config( new_write_top_up: None, new_address_space: new_address_space.map(|v| v.iter().map(|p| p.to_bytes()).collect()), }; - let serialized = params.try_to_vec().expect("serialize params"); + let serialized = borsh::to_vec(¶ms).expect("serialize params"); let mut data = Vec::with_capacity(discriminator.len() + serialized.len()); data.extend_from_slice(discriminator); data.extend_from_slice(&serialized); @@ -279,7 +279,7 @@ where output_queue_index: output_state_tree_index, }; - let serialized = ix_data.try_to_vec()?; + let serialized = borsh::to_vec(&ix_data)?; let mut data = Vec::with_capacity(discriminator.len() + serialized.len()); data.extend_from_slice(discriminator); data.extend_from_slice(&serialized); @@ -340,7 +340,7 @@ pub fn build_compress_accounts_idempotent( system_accounts_offset: full_offset as u8, }; - let serialized = ix_data.try_to_vec()?; + let serialized = borsh::to_vec(&ix_data)?; let mut data = Vec::with_capacity(discriminator.len() + serialized.len()); data.extend_from_slice(discriminator); data.extend_from_slice(&serialized); diff --git a/sdk-libs/client/src/rpc/errors.rs b/sdk-libs/client/src/rpc/errors.rs index 3ce63b8cb7..6b64b440ed 100644 --- a/sdk-libs/client/src/rpc/errors.rs +++ b/sdk-libs/client/src/rpc/errors.rs @@ -89,7 +89,7 @@ impl From for RpcError { } // Check for HTTP 429 status directly from reqwest error - if let ErrorKind::Reqwest(ref reqwest_err) = e.kind { + if let ErrorKind::Reqwest(ref reqwest_err) = *e.kind { if let Some(status) = reqwest_err.status() { if status.as_u16() == 429 { return RpcError::RateLimited; diff --git a/sdk-libs/compressed-token-sdk/src/compat.rs b/sdk-libs/compressed-token-sdk/src/compat.rs index 3caf5db2ed..d0f82d4d56 100644 --- a/sdk-libs/compressed-token-sdk/src/compat.rs +++ b/sdk-libs/compressed-token-sdk/src/compat.rs @@ -14,8 +14,8 @@ use crate::{AnchorDeserialize, AnchorSerialize}; #[repr(u8)] pub enum AccountState { #[default] - Initialized = 0, - Frozen = 1, + Initialized, + Frozen, } impl From for light_token_interface::state::CompressedTokenAccountState { @@ -68,7 +68,7 @@ impl TokenData { #[inline(always)] pub fn hash_sha_flat(&self) -> Result<[u8; 32], HasherError> { use light_sdk::light_hasher::Hasher; - let bytes = self.try_to_vec().map_err(|_| HasherError::BorshError)?; + let bytes = borsh::to_vec(&self).map_err(|_| HasherError::BorshError)?; Sha256BE::hash(bytes.as_slice()) } } diff --git a/sdk-libs/compressed-token-sdk/src/compressed_token/v1/approve/instruction.rs b/sdk-libs/compressed-token-sdk/src/compressed_token/v1/approve/instruction.rs index 424c4d81fd..0ac403c5bd 100644 --- a/sdk-libs/compressed-token-sdk/src/compressed_token/v1/approve/instruction.rs +++ b/sdk-libs/compressed-token-sdk/src/compressed_token/v1/approve/instruction.rs @@ -61,9 +61,8 @@ pub fn create_approve_instruction(inputs: ApproveInputs) -> Result }; // Serialize instruction data - let serialized_data = instruction_data - .try_to_vec() - .map_err(|_| TokenSdkError::SerializationError)?; + let serialized_data = + borsh::to_vec(&instruction_data).map_err(|_| TokenSdkError::SerializationError)?; // Create account meta config let meta_config = ApproveMetaConfig::new( diff --git a/sdk-libs/compressed-token-sdk/src/compressed_token/v1/batch_compress/instruction.rs b/sdk-libs/compressed-token-sdk/src/compressed_token/v1/batch_compress/instruction.rs index 50b4033156..cd0213c058 100644 --- a/sdk-libs/compressed-token-sdk/src/compressed_token/v1/batch_compress/instruction.rs +++ b/sdk-libs/compressed-token-sdk/src/compressed_token/v1/batch_compress/instruction.rs @@ -52,9 +52,8 @@ pub fn create_batch_compress_instruction(inputs: BatchCompressInputs) -> Result< }; // Serialize instruction data - let data_vec = instruction_data - .try_to_vec() - .map_err(|_| TokenSdkError::SerializationError)?; + let data_vec = + borsh::to_vec(&instruction_data).map_err(|_| TokenSdkError::SerializationError)?; let mut data = Vec::with_capacity(data_vec.len() + 8 + 4); data.extend_from_slice(BATCH_COMPRESS.as_slice()); data.extend_from_slice( diff --git a/sdk-libs/compressed-token-sdk/src/compressed_token/v1/transfer/instruction.rs b/sdk-libs/compressed-token-sdk/src/compressed_token/v1/transfer/instruction.rs index f1f5dfc648..415b684e50 100644 --- a/sdk-libs/compressed-token-sdk/src/compressed_token/v1/transfer/instruction.rs +++ b/sdk-libs/compressed-token-sdk/src/compressed_token/v1/transfer/instruction.rs @@ -108,9 +108,8 @@ pub fn create_transfer_instruction_raw( }; // TODO: calculate exact len. - let serialized = instruction_data - .try_to_vec() - .map_err(|_| TokenSdkError::SerializationError)?; + let serialized = + borsh::to_vec(&instruction_data).map_err(|_| TokenSdkError::SerializationError)?; // Serialize instruction data let mut data = Vec::with_capacity(8 + 4 + serialized.len()); // rough estimate diff --git a/sdk-libs/compressed-token-sdk/src/compressed_token/v2/transfer2/instruction.rs b/sdk-libs/compressed-token-sdk/src/compressed_token/v2/transfer2/instruction.rs index bfb71b43c8..e41b74b653 100644 --- a/sdk-libs/compressed-token-sdk/src/compressed_token/v2/transfer2/instruction.rs +++ b/sdk-libs/compressed-token-sdk/src/compressed_token/v2/transfer2/instruction.rs @@ -148,9 +148,8 @@ pub fn create_transfer2_instruction(inputs: Transfer2Inputs) -> Result Vec { )]]), }; let mut data = vec![TRANSFER2]; // discriminator - data.extend(transfer_data.try_to_vec().unwrap()); + data.extend(borsh::to_vec(&transfer_data).unwrap()); data } @@ -135,7 +135,7 @@ fn create_transfer2_with_multiple_outputs( out_tlv: Some(out_tlv), }; let mut data = vec![TRANSFER2]; - data.extend(transfer_data.try_to_vec().unwrap()); + data.extend(borsh::to_vec(&transfer_data).unwrap()); data } @@ -1381,7 +1381,7 @@ fn test_mixed_batch_legacy_nullifier_queue_indices_no_oob() { let mut system_ix_data = Vec::new(); system_ix_data.extend_from_slice(&DISCRIMINATOR_INVOKE); system_ix_data.extend_from_slice(&[0u8; 4]); - system_ix_data.extend(system_invoke_data.try_to_vec().unwrap()); + system_ix_data.extend(borsh::to_vec(&system_invoke_data).unwrap()); // First 9 are system accounts; accounts[9..] are the tree accounts referenced // by merkle_tree_pubkey_index in each input compressed account. diff --git a/sdk-libs/instruction-decoder-derive/src/attribute_impl.rs b/sdk-libs/instruction-decoder-derive/src/attribute_impl.rs index e249a27e45..28c0ee80be 100644 --- a/sdk-libs/instruction-decoder-derive/src/attribute_impl.rs +++ b/sdk-libs/instruction-decoder-derive/src/attribute_impl.rs @@ -236,7 +236,7 @@ fn extract_instruction_info(module: &ItemMod) -> syn::Result in a function signature. /// /// Handles various patterns: -/// - `Context<'_, '_, '_, 'info, T<'info>>` -> "T" +/// - `Context<'info, T<'info>>` -> "T" /// - `Context` -> "T" fn extract_context_type(sig: &syn::Signature) -> Option { for input in &sig.inputs { diff --git a/sdk-libs/instruction-decoder/Cargo.toml b/sdk-libs/instruction-decoder/Cargo.toml index b88538acc8..97d1472f1d 100644 --- a/sdk-libs/instruction-decoder/Cargo.toml +++ b/sdk-libs/instruction-decoder/Cargo.toml @@ -18,9 +18,9 @@ light-protocol = [ ] [dependencies] -solana-pubkey = { version = "2", features = ["curve25519"] } -solana-instruction = { version = "2" } -solana-signature = { version = "2" } +solana-pubkey = { workspace = true, features = ["curve25519"] } +solana-instruction = { workspace = true } +solana-signature = { workspace = true } borsh = { workspace = true, features = ["std"] } bs58 = { workspace = true } serde = { workspace = true, features = ["derive"] } diff --git a/sdk-libs/macros/src/hasher/data_hasher.rs b/sdk-libs/macros/src/hasher/data_hasher.rs index 421438a11f..38130dc2f8 100644 --- a/sdk-libs/macros/src/hasher/data_hasher.rs +++ b/sdk-libs/macros/src/hasher/data_hasher.rs @@ -105,7 +105,7 @@ pub(crate) fn generate_data_hasher_impl_sha( let _ = ::ASSERT; // For SHA256, we serialize the whole struct and hash it in one go - let serialized = self.try_to_vec().map_err(|_| ::light_hasher::HasherError::BorshError)?; + let serialized = borsh::to_vec(&self).map_err(|_| ::light_hasher::HasherError::BorshError)?; let mut result = H::hash(&serialized)?; // Truncate sha256 to 31 be bytes less than 254 bits bn254 field size. result[0] = 0; diff --git a/sdk-libs/macros/src/hasher/to_byte_array.rs b/sdk-libs/macros/src/hasher/to_byte_array.rs index 600583d8ff..237d99aa01 100644 --- a/sdk-libs/macros/src/hasher/to_byte_array.rs +++ b/sdk-libs/macros/src/hasher/to_byte_array.rs @@ -77,7 +77,7 @@ pub(crate) fn generate_to_byte_array_impl_sha( use ::light_hasher::Hasher; // For SHA256, we can serialize the whole struct and hash it in one go - let serialized = self.try_to_vec().map_err(|_| ::light_hasher::HasherError::BorshError)?; + let serialized = borsh::to_vec(&self).map_err(|_| ::light_hasher::HasherError::BorshError)?; let mut result = ::light_hasher::Sha256::hash(&serialized)?; // Truncate field size for SHA256 diff --git a/sdk-libs/macros/src/light_pdas/accounts/pda.rs b/sdk-libs/macros/src/light_pdas/accounts/pda.rs index 6523bafd5a..7e4589f4de 100644 --- a/sdk-libs/macros/src/light_pdas/accounts/pda.rs +++ b/sdk-libs/macros/src/light_pdas/accounts/pda.rs @@ -89,7 +89,7 @@ impl<'a> PdaBlockBuilder<'a> { let account_guard = format_ident!("{}_guard", ident); quote! { { - let current_slot = anchor_lang::solana_program::sysvar::clock::Clock::get() + let current_slot = anchor_lang::prelude::Clock::get() .map_err(|_| light_account::LightSdkTypesError::ConstraintViolation)?.slot; let mut #account_guard = self.#ident.load_init() .map_err(|_| light_account::LightSdkTypesError::InvalidInstructionData)?; @@ -107,7 +107,7 @@ impl<'a> PdaBlockBuilder<'a> { { use light_account::LightAccount; use anchor_lang::AnchorSerialize; - let current_slot = anchor_lang::solana_program::sysvar::clock::Clock::get() + let current_slot = anchor_lang::prelude::Clock::get() .map_err(|_| light_account::LightSdkTypesError::ConstraintViolation)?.slot; // Get account info BEFORE mutable borrow let account_info = self.#ident.to_account_info(); @@ -130,7 +130,7 @@ impl<'a> PdaBlockBuilder<'a> { { use light_account::LightAccount; use anchor_lang::AnchorSerialize; - let current_slot = anchor_lang::solana_program::sysvar::clock::Clock::get() + let current_slot = anchor_lang::prelude::Clock::get() .map_err(|_| light_account::LightSdkTypesError::ConstraintViolation)?.slot; // Get account info BEFORE mutable borrow let account_info = self.#ident.to_account_info(); diff --git a/sdk-libs/macros/src/light_pdas/program/compress.rs b/sdk-libs/macros/src/light_pdas/program/compress.rs index 915228a1c4..97da15a304 100644 --- a/sdk-libs/macros/src/light_pdas/program/compress.rs +++ b/sdk-libs/macros/src/light_pdas/program/compress.rs @@ -232,7 +232,7 @@ impl CompressBuilder { Ok(syn::parse_quote! { #[inline(never)] pub fn compress_accounts_idempotent<'info>( - ctx: Context<'_, '_, '_, 'info, CompressAccountsIdempotent<'info>>, + ctx: Context<'info, CompressAccountsIdempotent<'info>>, params: light_account::CompressAndCloseParams, ) -> Result<()> { __processor_functions::process_compress_accounts_idempotent( @@ -259,6 +259,17 @@ impl CompressBuilder { /// Generate manual Anchor trait implementations for the empty accounts struct. pub fn generate_accounts_trait_impls(&self) -> Result { Ok(quote! { + impl<'info> CompressAccountsIdempotent<'info> { + #[doc(hidden)] + pub const __ANCHOR_IX_PARAM_COUNT: usize = 0; + + // Stub validation methods for anchor 1.0 compatibility + #[doc(hidden)] #[inline(always)] #[allow(unused)] pub fn __anchor_validate_ix_arg_type_0<__T>(_arg: &__T) {} + #[doc(hidden)] #[inline(always)] #[allow(unused)] pub fn __anchor_validate_ix_arg_type_1<__T>(_arg: &__T) {} + #[doc(hidden)] #[inline(always)] #[allow(unused)] pub fn __anchor_validate_ix_arg_type_2<__T>(_arg: &__T) {} + #[doc(hidden)] #[inline(always)] #[allow(unused)] pub fn __anchor_validate_ix_arg_type_3<__T>(_arg: &__T) {} + } + impl<'info> anchor_lang::Accounts<'info, CompressAccountsIdempotentBumps> for CompressAccountsIdempotent<'info> { @@ -328,10 +339,10 @@ impl CompressBuilder { std::marker::PhantomData<&'info ()>, ); impl<'info> borsh::ser::BorshSerialize for CompressAccountsIdempotent<'info> { - fn serialize( + fn serialize( &self, _writer: &mut W, - ) -> ::core::result::Result<(), borsh::maybestd::io::Error> { + ) -> ::core::result::Result<(), std::io::Error> { Ok(()) } } diff --git a/sdk-libs/macros/src/light_pdas/program/decompress.rs b/sdk-libs/macros/src/light_pdas/program/decompress.rs index dae10bb627..e2f74e900e 100644 --- a/sdk-libs/macros/src/light_pdas/program/decompress.rs +++ b/sdk-libs/macros/src/light_pdas/program/decompress.rs @@ -117,7 +117,7 @@ impl DecompressBuilder { Ok(syn::parse_quote! { #[inline(never)] pub fn decompress_accounts_idempotent<'info>( - ctx: Context<'_, '_, '_, 'info, DecompressAccountsIdempotent<'info>>, + ctx: Context<'info, DecompressAccountsIdempotent<'info>>, params: light_account::DecompressIdempotentParams, ) -> Result<()> { __processor_functions::process_decompress_accounts_idempotent( @@ -144,6 +144,16 @@ impl DecompressBuilder { /// Generate manual Anchor trait implementations for the empty accounts struct. pub fn generate_accounts_trait_impls(&self) -> Result { Ok(quote! { + impl<'info> DecompressAccountsIdempotent<'info> { + #[doc(hidden)] + pub const __ANCHOR_IX_PARAM_COUNT: usize = 0; + + #[doc(hidden)] #[inline(always)] #[allow(unused)] pub fn __anchor_validate_ix_arg_type_0<__T>(_arg: &__T) {} + #[doc(hidden)] #[inline(always)] #[allow(unused)] pub fn __anchor_validate_ix_arg_type_1<__T>(_arg: &__T) {} + #[doc(hidden)] #[inline(always)] #[allow(unused)] pub fn __anchor_validate_ix_arg_type_2<__T>(_arg: &__T) {} + #[doc(hidden)] #[inline(always)] #[allow(unused)] pub fn __anchor_validate_ix_arg_type_3<__T>(_arg: &__T) {} + } + impl<'info> anchor_lang::Accounts<'info, DecompressAccountsIdempotentBumps> for DecompressAccountsIdempotent<'info> { @@ -213,10 +223,10 @@ impl DecompressBuilder { std::marker::PhantomData<&'info ()>, ); impl<'info> borsh::ser::BorshSerialize for DecompressAccountsIdempotent<'info> { - fn serialize( + fn serialize( &self, _writer: &mut W, - ) -> ::core::result::Result<(), borsh::maybestd::io::Error> { + ) -> ::core::result::Result<(), std::io::Error> { Ok(()) } } diff --git a/sdk-libs/macros/src/light_pdas/program/instructions.rs b/sdk-libs/macros/src/light_pdas/program/instructions.rs index 556d876eb9..e69bb50e9e 100644 --- a/sdk-libs/macros/src/light_pdas/program/instructions.rs +++ b/sdk-libs/macros/src/light_pdas/program/instructions.rs @@ -617,7 +617,7 @@ pub(crate) fn generate_light_program_items_with_backend( let init_config_instruction: syn::ItemFn = syn::parse_quote! { #[inline(never)] pub fn initialize_compression_config<'info>( - ctx: Context<'_, '_, '_, 'info, InitializeCompressionConfig<'info>>, + ctx: Context<'info, InitializeCompressionConfig<'info>>, params: InitConfigParams, ) -> Result<()> { #account_crate::process_initialize_light_config( @@ -640,7 +640,7 @@ pub(crate) fn generate_light_program_items_with_backend( let update_config_instruction: syn::ItemFn = syn::parse_quote! { #[inline(never)] pub fn update_compression_config<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateCompressionConfig<'info>>, + ctx: Context<'info, UpdateCompressionConfig<'info>>, instruction_data: Vec, ) -> Result<()> { let remaining = [ diff --git a/sdk-libs/macros/src/light_pdas/program/parsing.rs b/sdk-libs/macros/src/light_pdas/program/parsing.rs index c740be621e..c1dfcbcc03 100644 --- a/sdk-libs/macros/src/light_pdas/program/parsing.rs +++ b/sdk-libs/macros/src/light_pdas/program/parsing.rs @@ -554,7 +554,7 @@ pub fn extract_context_and_params(fn_item: &ItemFn) -> ExtractResult { // Capture the context parameter name (e.g., ctx, context, anchor_ctx) ctx_ident = Some(pat_ident.ident.clone()); - // Extract T from Context<'_, '_, '_, 'info, T<'info>> or Context + // Extract T from Context<'info, T<'info>> or Context if let syn::PathArguments::AngleBracketed(args) = &segment.arguments { // Find the last type argument (T or T<'info>) for arg in args.args.iter().rev() { diff --git a/sdk-libs/program-test/Cargo.toml b/sdk-libs/program-test/Cargo.toml index 6f1eaf9b52..f6f1269298 100644 --- a/sdk-libs/program-test/Cargo.toml +++ b/sdk-libs/program-test/Cargo.toml @@ -59,6 +59,10 @@ solana-instruction = { workspace = true } light-instruction-decoder = { workspace = true } solana-account = { workspace = true } solana-compute-budget = { workspace = true } +solana-compute-budget-interface = { workspace = true } +solana-message = { workspace = true } +solana-system-interface = { workspace = true } +solana-sdk-ids = { version = "3.1" } rand = { workspace = true } bytemuck = { workspace = true } serde = { workspace = true } diff --git a/sdk-libs/program-test/src/accounts/address_tree.rs b/sdk-libs/program-test/src/accounts/address_tree.rs index 0807e352af..81fb268c70 100644 --- a/sdk-libs/program-test/src/accounts/address_tree.rs +++ b/sdk-libs/program-test/src/accounts/address_tree.rs @@ -3,8 +3,8 @@ use account_compression::{ }; use anchor_lang::InstructionData; use light_client::rpc::{errors::RpcError, Rpc}; +use solana_compute_budget_interface::ComputeBudgetInstruction; use solana_sdk::{ - compute_budget::ComputeBudgetInstruction, instruction::{AccountMeta, Instruction}, pubkey::Pubkey, signature::{Keypair, Signature, Signer}, diff --git a/sdk-libs/program-test/src/accounts/compressible_config.rs b/sdk-libs/program-test/src/accounts/compressible_config.rs index 513e108524..72cdffc14d 100644 --- a/sdk-libs/program-test/src/accounts/compressible_config.rs +++ b/sdk-libs/program-test/src/accounts/compressible_config.rs @@ -44,7 +44,7 @@ pub async fn create_compressible_config( solana_sdk::instruction::AccountMeta::new_readonly(protocol_config_pda, false), solana_sdk::instruction::AccountMeta::new(config_counter_pda, false), solana_sdk::instruction::AccountMeta::new_readonly( - solana_sdk::system_program::id(), + anchor_lang::solana_program::system_program::id(), false, ), ], diff --git a/sdk-libs/program-test/src/accounts/register_program.rs b/sdk-libs/program-test/src/accounts/register_program.rs index 50f6c1fd7e..c3375bf12f 100644 --- a/sdk-libs/program-test/src/accounts/register_program.rs +++ b/sdk-libs/program-test/src/accounts/register_program.rs @@ -7,8 +7,8 @@ use light_registry::{ use solana_sdk::{ pubkey::Pubkey, signature::{Keypair, Signer}, - system_instruction, }; +use solana_system_interface::instruction as system_instruction; pub async fn register_program_with_registry_program( rpc: &mut R, diff --git a/sdk-libs/program-test/src/accounts/state_tree_v2.rs b/sdk-libs/program-test/src/accounts/state_tree_v2.rs index 7095263d02..e368091996 100644 --- a/sdk-libs/program-test/src/accounts/state_tree_v2.rs +++ b/sdk-libs/program-test/src/accounts/state_tree_v2.rs @@ -76,7 +76,7 @@ pub async fn create_batched_state_merkle_tree( ) } else { let instruction = account_compression::instruction::InitializeBatchedStateMerkleTree { - bytes: params.try_to_vec().unwrap(), + bytes: borsh::to_vec(¶ms).unwrap(), }; let accounts = account_compression::accounts::InitializeBatchedStateMerkleTreeAndQueue { authority: payer.pubkey(), diff --git a/sdk-libs/program-test/src/accounts/test_accounts.rs b/sdk-libs/program-test/src/accounts/test_accounts.rs index 9f14dbb8fc..e68e560830 100644 --- a/sdk-libs/program-test/src/accounts/test_accounts.rs +++ b/sdk-libs/program-test/src/accounts/test_accounts.rs @@ -63,10 +63,10 @@ impl TestAccounts { pub fn get_local_test_validator_accounts() -> TestAccounts { TestAccounts { protocol: ProtocolAccounts { - governance_authority: Keypair::from_bytes(&PAYER_KEYPAIR).unwrap(), + governance_authority: Keypair::try_from(PAYER_KEYPAIR.as_slice()).unwrap(), governance_authority_pda: Pubkey::default(), group_pda: Pubkey::default(), - forester: Keypair::from_bytes(&FORESTER_TEST_KEYPAIR).unwrap(), + forester: Keypair::try_from(FORESTER_TEST_KEYPAIR.as_slice()).unwrap(), registered_program_pda: pubkey!("35hkDgaAKwMCaxRz2ocSZ6NaUrtKkyNqU6c4RV3tYJRh"), registered_registry_program_pda: pubkey!( "DumMsyvkaGJG4QnQ1BhTgvoRMXsgGxfpKDUCr22Xqu4w" @@ -135,9 +135,10 @@ impl TestAccounts { registered_registry_program_pda, registered_forester_pda, ) = { - let group_seed_keypair = Keypair::from_bytes(&GROUP_PDA_SEED_TEST_KEYPAIR).unwrap(); + let group_seed_keypair = + Keypair::try_from(GROUP_PDA_SEED_TEST_KEYPAIR.as_slice()).unwrap(); let group_pda = get_group_pda(group_seed_keypair.pubkey()); - let payer = Keypair::from_bytes(&PAYER_KEYPAIR).unwrap(); + let payer = Keypair::try_from(PAYER_KEYPAIR.as_slice()).unwrap(); let protocol_config_pda = get_protocol_config_pda_address(); let (_, registered_program_pda) = create_register_program_instruction( payer.pubkey(), @@ -147,7 +148,7 @@ impl TestAccounts { ); let registered_registry_program_pda = get_registered_program_pda(&pubkey!("Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX")); - let forester = Keypair::from_bytes(&FORESTER_TEST_KEYPAIR).unwrap(); + let forester = Keypair::try_from(FORESTER_TEST_KEYPAIR.as_slice()).unwrap(); let registered_forester_pda = get_forester_pda(&forester.pubkey()).0; ( group_pda, @@ -182,8 +183,8 @@ impl TestAccounts { ) }; - let payer = Keypair::from_bytes(&PAYER_KEYPAIR).unwrap(); - let forester = Keypair::from_bytes(&FORESTER_TEST_KEYPAIR).unwrap(); + let payer = Keypair::try_from(PAYER_KEYPAIR.as_slice()).unwrap(); + let forester = Keypair::try_from(FORESTER_TEST_KEYPAIR.as_slice()).unwrap(); TestAccounts { protocol: ProtocolAccounts { @@ -251,13 +252,13 @@ impl Clone for TestAccounts { fn clone(&self) -> Self { TestAccounts { protocol: ProtocolAccounts { - governance_authority: Keypair::from_bytes( - &self.protocol.governance_authority.to_bytes(), + governance_authority: Keypair::try_from( + self.protocol.governance_authority.to_bytes().as_slice(), ) .unwrap(), governance_authority_pda: self.protocol.governance_authority_pda, group_pda: self.protocol.group_pda, - forester: Keypair::from_bytes(&self.protocol.forester.to_bytes()).unwrap(), + forester: Keypair::try_from(self.protocol.forester.to_bytes().as_slice()).unwrap(), registered_program_pda: self.protocol.registered_program_pda, registered_registry_program_pda: self.protocol.registered_registry_program_pda, registered_forester_pda: self.protocol.registered_forester_pda, diff --git a/sdk-libs/program-test/src/accounts/test_keypairs.rs b/sdk-libs/program-test/src/accounts/test_keypairs.rs index 0d96718183..61f064eea4 100644 --- a/sdk-libs/program-test/src/accounts/test_keypairs.rs +++ b/sdk-libs/program-test/src/accounts/test_keypairs.rs @@ -24,28 +24,36 @@ pub struct TestKeypairs { impl TestKeypairs { pub fn program_test_default() -> TestKeypairs { TestKeypairs { - state_merkle_tree: Keypair::from_bytes(&MERKLE_TREE_TEST_KEYPAIR).unwrap(), - nullifier_queue: Keypair::from_bytes(&NULLIFIER_QUEUE_TEST_KEYPAIR).unwrap(), - governance_authority: Keypair::from_bytes(&PAYER_KEYPAIR).unwrap(), - forester: Keypair::from_bytes(&FORESTER_TEST_KEYPAIR).unwrap(), - address_merkle_tree: Keypair::from_bytes(&ADDRESS_MERKLE_TREE_TEST_KEYPAIR).unwrap(), - address_merkle_tree_queue: Keypair::from_bytes(&ADDRESS_MERKLE_TREE_QUEUE_TEST_KEYPAIR) + state_merkle_tree: Keypair::try_from(MERKLE_TREE_TEST_KEYPAIR.as_slice()).unwrap(), + nullifier_queue: Keypair::try_from(NULLIFIER_QUEUE_TEST_KEYPAIR.as_slice()).unwrap(), + governance_authority: Keypair::try_from(PAYER_KEYPAIR.as_slice()).unwrap(), + forester: Keypair::try_from(FORESTER_TEST_KEYPAIR.as_slice()).unwrap(), + address_merkle_tree: Keypair::try_from(ADDRESS_MERKLE_TREE_TEST_KEYPAIR.as_slice()) .unwrap(), - cpi_context_account: Keypair::from_bytes(&SIGNATURE_CPI_TEST_KEYPAIR).unwrap(), - system_program: Keypair::from_bytes(&OLD_SYSTEM_PROGRAM_ID_TEST_KEYPAIR).unwrap(), - registry_program: Keypair::from_bytes(&OLD_REGISTRY_ID_TEST_KEYPAIR).unwrap(), - batched_state_merkle_tree: Keypair::from_bytes(&BATCHED_STATE_MERKLE_TREE_TEST_KEYPAIR) + address_merkle_tree_queue: Keypair::try_from( + ADDRESS_MERKLE_TREE_QUEUE_TEST_KEYPAIR.as_slice(), + ) + .unwrap(), + cpi_context_account: Keypair::try_from(SIGNATURE_CPI_TEST_KEYPAIR.as_slice()).unwrap(), + system_program: Keypair::try_from(OLD_SYSTEM_PROGRAM_ID_TEST_KEYPAIR.as_slice()) + .unwrap(), + registry_program: Keypair::try_from(OLD_REGISTRY_ID_TEST_KEYPAIR.as_slice()).unwrap(), + batched_state_merkle_tree: Keypair::try_from( + BATCHED_STATE_MERKLE_TREE_TEST_KEYPAIR.as_slice(), + ) + .unwrap(), + batched_output_queue: Keypair::try_from(BATCHED_OUTPUT_QUEUE_TEST_KEYPAIR.as_slice()) + .unwrap(), + batched_cpi_context: Keypair::try_from(BATCHED_CPI_CONTEXT_TEST_KEYPAIR.as_slice()) .unwrap(), - batched_output_queue: Keypair::from_bytes(&BATCHED_OUTPUT_QUEUE_TEST_KEYPAIR).unwrap(), - batched_cpi_context: Keypair::from_bytes(&BATCHED_CPI_CONTEXT_TEST_KEYPAIR).unwrap(), - batch_address_merkle_tree: Keypair::from_bytes( - &BATCHED_ADDRESS_MERKLE_TREE_TEST_KEYPAIR, + batch_address_merkle_tree: Keypair::try_from( + BATCHED_ADDRESS_MERKLE_TREE_TEST_KEYPAIR.as_slice(), ) .unwrap(), state_merkle_tree_2: Keypair::new(), nullifier_queue_2: Keypair::new(), cpi_context_2: Keypair::new(), - group_pda_seed: Keypair::from_bytes(&GROUP_PDA_SEED_TEST_KEYPAIR).unwrap(), + group_pda_seed: Keypair::try_from(GROUP_PDA_SEED_TEST_KEYPAIR.as_slice()).unwrap(), } } } diff --git a/sdk-libs/program-test/src/program_test/compressible_setup.rs b/sdk-libs/program-test/src/program_test/compressible_setup.rs index 3aede79a4c..45d0d71307 100644 --- a/sdk-libs/program-test/src/program_test/compressible_setup.rs +++ b/sdk-libs/program-test/src/program_test/compressible_setup.rs @@ -5,11 +5,15 @@ use light_client::{ rpc::{Rpc, RpcError}, }; use solana_sdk::{ - bpf_loader_upgradeable, pubkey::Pubkey, signature::{Keypair, Signer}, }; +mod bpf_loader_upgradeable { + use solana_sdk::pubkey::Pubkey; + pub const ID: Pubkey = solana_sdk::pubkey!("BPFLoaderUpgradeab1e11111111111111111111111"); +} + use crate::program_test::TestRpc; /// Create mock program data account for testing. diff --git a/sdk-libs/program-test/src/program_test/rpc.rs b/sdk-libs/program-test/src/program_test/rpc.rs index 76a948b9c4..f684258220 100644 --- a/sdk-libs/program-test/src/program_test/rpc.rs +++ b/sdk-libs/program-test/src/program_test/rpc.rs @@ -17,11 +17,10 @@ use light_event::{ use solana_rpc_client_api::config::RpcSendTransactionConfig; use solana_sdk::{ account::Account, - address_lookup_table::AddressLookupTableAccount, clock::{Clock, Slot}, hash::Hash, instruction::Instruction, - message::VersionedMessage, + message::{AddressLookupTableAccount, VersionedMessage}, pubkey::Pubkey, rent::Rent, signature::{Keypair, Signature}, diff --git a/sdk-libs/program-test/src/registry_sdk.rs b/sdk-libs/program-test/src/registry_sdk.rs index 4ca748774b..8d8edb92be 100644 --- a/sdk-libs/program-test/src/registry_sdk.rs +++ b/sdk-libs/program-test/src/registry_sdk.rs @@ -302,7 +302,7 @@ pub fn create_register_forester_instruction( AccountMeta::new_readonly(*governance_authority, true), AccountMeta::new_readonly(protocol_config_pda, false), AccountMeta::new(forester_pda, false), - AccountMeta::new_readonly(solana_sdk::system_program::id(), false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::id(), false), ]; // Instruction data: discriminator + bump + authority (pubkey) + config + weight (Option) @@ -348,7 +348,7 @@ pub fn create_register_forester_epoch_pda_instruction( AccountMeta::new_readonly(*authority, true), // authority AccountMeta::new(epoch_pda, false), // epoch_pda AccountMeta::new_readonly(protocol_config_pda, false), // protocol_config - AccountMeta::new_readonly(solana_sdk::system_program::id(), false), // system_program + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::id(), false), // system_program ]; // Instruction data: discriminator + epoch (u64) diff --git a/sdk-libs/program-test/src/utils/assert.rs b/sdk-libs/program-test/src/utils/assert.rs index 94ef51e1c5..6cb7f70707 100644 --- a/sdk-libs/program-test/src/utils/assert.rs +++ b/sdk-libs/program-test/src/utils/assert.rs @@ -60,7 +60,7 @@ pub fn assert_rpc_error( (InstructionError::AccountBorrowFailed, 12) => Ok(()), (InstructionError::ExternalAccountDataModified, 13) => Ok(()), (InstructionError::InvalidSeeds, 14) => Ok(()), - (InstructionError::BorshIoError(_), 15) => Ok(()), + (InstructionError::BorshIoError, 15) => Ok(()), (InstructionError::AccountNotRentExempt, 16) => Ok(()), (InstructionError::InvalidRealloc, 17) => Ok(()), (InstructionError::ComputationalBudgetExceeded, 18) => Ok(()), @@ -104,7 +104,7 @@ pub fn assert_rpc_error( (InstructionError::AccountBorrowFailed, 12) => Ok(()), (InstructionError::ExternalAccountDataModified, 13) => Ok(()), (InstructionError::InvalidSeeds, 14) => Ok(()), - (InstructionError::BorshIoError(_), 15) => Ok(()), + (InstructionError::BorshIoError, 15) => Ok(()), (InstructionError::AccountNotRentExempt, 16) => Ok(()), (InstructionError::InvalidRealloc, 17) => Ok(()), (InstructionError::ComputationalBudgetExceeded, 18) => Ok(()), diff --git a/sdk-libs/program-test/src/utils/setup_light_programs.rs b/sdk-libs/program-test/src/utils/setup_light_programs.rs index cf30594cc5..d13a60ad7e 100644 --- a/sdk-libs/program-test/src/utils/setup_light_programs.rs +++ b/sdk-libs/program-test/src/utils/setup_light_programs.rs @@ -34,10 +34,9 @@ pub fn setup_light_programs( additional_programs: Option>, ) -> Result { let program_test = LiteSVM::new().with_log_bytes_limit(Some(100_000)); - let program_test = program_test.with_compute_budget(ComputeBudget { - compute_unit_limit: 1_400_000, - ..Default::default() - }); + let mut compute_budget = ComputeBudget::new_with_defaults(false, false); + compute_budget.compute_unit_limit = 1_400_000; + let program_test = program_test.with_compute_budget(compute_budget); let mut program_test = program_test.with_transaction_history(0); // find path to bin where light cli stores program binaries. let light_bin_path = find_light_bin().ok_or(RpcError::CustomError( diff --git a/sdk-libs/sdk-pinocchio/src/cpi/v1/invoke.rs b/sdk-libs/sdk-pinocchio/src/cpi/v1/invoke.rs index 94f6f383d0..ae58bc39b7 100644 --- a/sdk-libs/sdk-pinocchio/src/cpi/v1/invoke.rs +++ b/sdk-libs/sdk-pinocchio/src/cpi/v1/invoke.rs @@ -128,10 +128,7 @@ impl LightCpiInstruction for LightSystemProgramCpi { // Manual BorshSerialize implementation that only serializes instruction_data impl BorshSerialize for LightSystemProgramCpi { - fn serialize( - &self, - writer: &mut W, - ) -> borsh::maybestd::io::Result<()> { + fn serialize(&self, writer: &mut W) -> std::io::Result<()> { self.instruction_data.serialize(writer) } } diff --git a/sdk-libs/sdk-types/src/error.rs b/sdk-libs/sdk-types/src/error.rs index 23ded4116d..84f91f44ce 100644 --- a/sdk-libs/sdk-types/src/error.rs +++ b/sdk-libs/sdk-types/src/error.rs @@ -95,7 +95,7 @@ impl From for LightSdkTypesError { solana_program_error::ProgramError::InvalidAccountData => { LightSdkTypesError::InvalidInstructionData } - solana_program_error::ProgramError::BorshIoError(_) => LightSdkTypesError::Borsh, + solana_program_error::ProgramError::BorshIoError => LightSdkTypesError::Borsh, solana_program_error::ProgramError::AccountBorrowFailed => { LightSdkTypesError::ConstraintViolation } diff --git a/sdk-libs/sdk-types/src/interface/account/compression_info.rs b/sdk-libs/sdk-types/src/interface/account/compression_info.rs index caf30bc6a9..0c39a946c5 100644 --- a/sdk-libs/sdk-types/src/interface/account/compression_info.rs +++ b/sdk-libs/sdk-types/src/interface/account/compression_info.rs @@ -159,9 +159,9 @@ pub struct CompressionInfo { #[repr(u8)] pub enum CompressionState { #[default] - Uninitialized = 0, - Decompressed = 1, - Compressed = 2, + Uninitialized, + Decompressed, + Compressed, } // Safety: CompressionState is #[repr(u8)] with explicit discriminants diff --git a/sdk-libs/sdk-types/src/interface/program/decompression/pda.rs b/sdk-libs/sdk-types/src/interface/program/decompression/pda.rs index 3e32ec6ef3..c9b6613337 100644 --- a/sdk-libs/sdk-types/src/interface/program/decompression/pda.rs +++ b/sdk-libs/sdk-types/src/interface/program/decompression/pda.rs @@ -93,9 +93,7 @@ where } // 5. Hash with canonical CompressionInfo::compressed() for input verification - let data_bytes = account_data - .try_to_vec() - .map_err(|_| LightSdkTypesError::Borsh)?; + let data_bytes = borsh::to_vec(&account_data).map_err(|_| LightSdkTypesError::Borsh)?; let data_len = data_bytes.len(); let mut input_data_hash = Sha256BE::hash(&data_bytes)?; input_data_hash[0] = 0; // Zero first byte per protocol convention diff --git a/sdk-libs/sdk/src/account.rs b/sdk-libs/sdk/src/account.rs index 46b2e039ac..65153b63c8 100644 --- a/sdk-libs/sdk/src/account.rs +++ b/sdk-libs/sdk/src/account.rs @@ -575,10 +575,7 @@ pub mod __internal { output.data_hash = DEFAULT_DATA_HASH; output.discriminator = [0u8; 8]; } else { - output.data = self - .account - .try_to_vec() - .map_err(|_| LightSdkError::Borsh)?; + output.data = borsh::to_vec(&self.account).map_err(|_| LightSdkError::Borsh)?; // For HASH_FLAT = false, always use DataHasher output.data_hash = self .account @@ -639,20 +636,16 @@ pub mod __internal { output.data_hash = DEFAULT_DATA_HASH; output.discriminator = [0u8; 8]; } else { - output.data = self - .account - .try_to_vec() - .map_err(|e| ProgramError::BorshIoError(e.to_string()))?; + output.data = + borsh::to_vec(&self.account).map_err(|_| ProgramError::BorshIoError)?; // For HASH_FLAT = false, always use DataHasher output.data_hash = self .account .hash::() .map_err(LightSdkError::from) .map_err(ProgramError::from)?; - output.data = self - .account - .try_to_vec() - .map_err(|e| ProgramError::BorshIoError(e.to_string()))?; + output.data = + borsh::to_vec(&self.account).map_err(|_| ProgramError::BorshIoError)?; } let result = OutputCompressedAccountWithPackedContext::from_with_owner( &output, @@ -789,9 +782,7 @@ pub mod __internal { ) -> Result { let input_account_info = { // For HASH_FLAT = true, use direct serialization - let data = input_account - .try_to_vec() - .map_err(|e| ProgramError::BorshIoError(e.to_string()))?; + let data = borsh::to_vec(&input_account).map_err(|_| ProgramError::BorshIoError)?; let mut input_data_hash = H::hash(data.as_slice()) .map_err(LightSdkError::from) .map_err(ProgramError::from)?; @@ -845,8 +836,7 @@ pub mod __internal { packed_account_pubkeys: &[Pubkey], ) -> Result { // Hash account data once and reuse (SHA256 flat: borsh serialize then hash) - let data = input_account - .try_to_vec() + let data = borsh::to_vec(&input_account) .map_err(|_| LightSdkError::Borsh) .map_err(ProgramError::from)?; let mut input_data_hash = H::hash(data.as_slice()) @@ -928,10 +918,8 @@ pub mod __internal { output.data_hash = DEFAULT_DATA_HASH; output.discriminator = [0u8; 8]; } else { - output.data = self - .account - .try_to_vec() - .map_err(|e| ProgramError::BorshIoError(e.to_string()))?; + output.data = + borsh::to_vec(&self.account).map_err(|_| ProgramError::BorshIoError)?; // For HASH_FLAT = true, use direct serialization output.data_hash = H::hash(output.data.as_slice()) .map_err(LightSdkError::from) @@ -992,19 +980,15 @@ pub mod __internal { output.data_hash = DEFAULT_DATA_HASH; output.discriminator = [0u8; 8]; } else { - output.data = self - .account - .try_to_vec() - .map_err(|e| ProgramError::BorshIoError(e.to_string()))?; + output.data = + borsh::to_vec(&self.account).map_err(|_| ProgramError::BorshIoError)?; // For HASH_FLAT = true, use direct serialization output.data_hash = H::hash(output.data.as_slice()) .map_err(LightSdkError::from) .map_err(ProgramError::from)?; output.data_hash[0] = 0; - output.data = self - .account - .try_to_vec() - .map_err(|e| ProgramError::BorshIoError(e.to_string()))?; + output.data = + borsh::to_vec(&self.account).map_err(|_| ProgramError::BorshIoError)?; } let result = OutputCompressedAccountWithPackedContext::from_with_owner( @@ -1025,9 +1009,7 @@ pub mod __internal { ) -> Result<(LightAccountInner, Vec), ProgramError> { let (input_account_info, data) = { // For HASH_FLAT = true, use direct serialization - let data = input_account - .try_to_vec() - .map_err(|e| ProgramError::BorshIoError(e.to_string()))?; + let data = borsh::to_vec(&input_account).map_err(|_| ProgramError::BorshIoError)?; let mut input_data_hash = H::hash(data.as_slice()) .map_err(LightSdkError::from) .map_err(ProgramError::from)?; diff --git a/sdk-libs/sdk/src/lib.rs b/sdk-libs/sdk/src/lib.rs index 346b6b3023..5f0f316b35 100644 --- a/sdk-libs/sdk/src/lib.rs +++ b/sdk-libs/sdk/src/lib.rs @@ -99,7 +99,7 @@ //! use super::*; //! //! pub fn create_compressed_account<'info>( -//! ctx: Context<'_, '_, '_, 'info, CreateCompressedAccount<'info>>, +//! ctx: Context<'info, CreateCompressedAccount<'info>>, //! proof: ValidityProof, //! address_tree_info: PackedAddressTreeInfo, //! output_tree_index: u8, diff --git a/sdk-libs/sdk/tests/light_account_poseidon.rs b/sdk-libs/sdk/tests/light_account_poseidon.rs index 3bc8e812c6..28025f7bc2 100644 --- a/sdk-libs/sdk/tests/light_account_poseidon.rs +++ b/sdk-libs/sdk/tests/light_account_poseidon.rs @@ -413,7 +413,7 @@ fn test_to_account_info_mut() { .expect("Should convert to account info"); // Expected serialized data - let expected_data = account_data.try_to_vec().expect("Should serialize"); + let expected_data = borsh::to_vec(&account_data).expect("Should serialize"); // Expected CompressedAccountInfo let expected = CompressedAccountInfo { diff --git a/sdk-libs/sdk/tests/light_account_sha.rs b/sdk-libs/sdk/tests/light_account_sha.rs index 8029580fd0..7d53dd8352 100644 --- a/sdk-libs/sdk/tests/light_account_sha.rs +++ b/sdk-libs/sdk/tests/light_account_sha.rs @@ -390,7 +390,7 @@ fn test_to_account_info_mut() { .expect("Should convert to account info"); // Expected serialized data - let expected_data = account_data.try_to_vec().expect("Should serialize"); + let expected_data = borsh::to_vec(&account_data).expect("Should serialize"); // Expected CompressedAccountInfo let expected = CompressedAccountInfo { diff --git a/sdk-libs/token-sdk/src/instruction/create.rs b/sdk-libs/token-sdk/src/instruction/create.rs index 91e240e9b3..ef4185f344 100644 --- a/sdk-libs/token-sdk/src/instruction/create.rs +++ b/sdk-libs/token-sdk/src/instruction/create.rs @@ -65,7 +65,7 @@ impl CreateTokenAccount { data.push(18u8); // InitializeAccount3 opcode instruction_data .serialize(&mut data) - .map_err(|e| ProgramError::BorshIoError(e.to_string()))?; + .map_err(|_| ProgramError::BorshIoError)?; let accounts = vec![ AccountMeta::new(self.account, true), diff --git a/sdk-libs/token-sdk/src/instruction/create_ata.rs b/sdk-libs/token-sdk/src/instruction/create_ata.rs index a76b21a150..3293010ef6 100644 --- a/sdk-libs/token-sdk/src/instruction/create_ata.rs +++ b/sdk-libs/token-sdk/src/instruction/create_ata.rs @@ -92,7 +92,7 @@ impl CreateAssociatedTokenAccount { data.push(discriminator); instruction_data .serialize(&mut data) - .map_err(|e| ProgramError::BorshIoError(e.to_string()))?; + .map_err(|_| ProgramError::BorshIoError)?; let accounts = vec![ AccountMeta::new_readonly(self.owner, false), diff --git a/sdk-libs/token-sdk/src/instruction/create_mint.rs b/sdk-libs/token-sdk/src/instruction/create_mint.rs index 7d9f32ef12..ece19b456d 100644 --- a/sdk-libs/token-sdk/src/instruction/create_mint.rs +++ b/sdk-libs/token-sdk/src/instruction/create_mint.rs @@ -179,7 +179,7 @@ impl CreateMint { let data = instruction_data .data() - .map_err(|e| ProgramError::BorshIoError(e.to_string()))?; + .map_err(|_| ProgramError::BorshIoError)?; Ok(Instruction { program_id: Pubkey::new_from_array(light_token_interface::LIGHT_TOKEN_PROGRAM_ID), diff --git a/sdk-libs/token-sdk/src/instruction/create_mints.rs b/sdk-libs/token-sdk/src/instruction/create_mints.rs index adbf99cfa2..532b6a96c1 100644 --- a/sdk-libs/token-sdk/src/instruction/create_mints.rs +++ b/sdk-libs/token-sdk/src/instruction/create_mints.rs @@ -355,7 +355,7 @@ impl<'a, 'info> CreateMintsCpi<'a, 'info> { let account_metas = get_mint_action_instruction_account_metas_cpi_write(cpi_write_config); let ix_data = instruction_data .data() - .map_err(|e| ProgramError::BorshIoError(e.to_string()))?; + .map_err(|_| ProgramError::BorshIoError)?; // Account order matches get_mint_action_instruction_account_metas_cpi_write: // [0]: light_system_program @@ -518,7 +518,7 @@ impl<'a, 'info> CreateMintsCpi<'a, 'info> { let account_metas = meta_config.to_account_metas(); let ix_data = instruction_data .data() - .map_err(|e| ProgramError::BorshIoError(e.to_string()))?; + .map_err(|_| ProgramError::BorshIoError)?; // Collect all account infos needed for the CPI let mut account_infos = vec![self.payer.clone()]; diff --git a/sdk-libs/token-sdk/src/instruction/decompress_mint.rs b/sdk-libs/token-sdk/src/instruction/decompress_mint.rs index da399c800c..4401e4b533 100644 --- a/sdk-libs/token-sdk/src/instruction/decompress_mint.rs +++ b/sdk-libs/token-sdk/src/instruction/decompress_mint.rs @@ -94,7 +94,7 @@ impl DecompressMint { let data = instruction_data .data() - .map_err(|e| ProgramError::BorshIoError(e.to_string()))?; + .map_err(|_| ProgramError::BorshIoError)?; Ok(Instruction { program_id: Pubkey::new_from_array(light_token_interface::LIGHT_TOKEN_PROGRAM_ID), @@ -305,7 +305,7 @@ impl DecompressCMintWithCpiContext { let data = instruction_data .data() - .map_err(|e| ProgramError::BorshIoError(e.to_string()))?; + .map_err(|_| ProgramError::BorshIoError)?; Ok(Instruction { program_id: Pubkey::new_from_array(light_token_interface::LIGHT_TOKEN_PROGRAM_ID), diff --git a/sdk-libs/token-sdk/tests/pack_test.rs b/sdk-libs/token-sdk/tests/pack_test.rs index 2f58f39063..347d030dda 100644 --- a/sdk-libs/token-sdk/tests/pack_test.rs +++ b/sdk-libs/token-sdk/tests/pack_test.rs @@ -48,8 +48,8 @@ fn test_token_data_with_variant_packing() { #[derive(Debug, Clone, Copy, AnchorSerialize, AnchorDeserialize)] enum MyVariant { - TypeA = 0, - TypeB = 1, + TypeA, + TypeB, } impl Pack for MyVariant { diff --git a/sdk-libs/token-types/src/instruction/update_compressed_mint.rs b/sdk-libs/token-types/src/instruction/update_compressed_mint.rs index 626fb7c896..43227535bc 100644 --- a/sdk-libs/token-types/src/instruction/update_compressed_mint.rs +++ b/sdk-libs/token-types/src/instruction/update_compressed_mint.rs @@ -5,9 +5,9 @@ use crate::{AnchorDeserialize, AnchorSerialize}; #[derive(Debug, Clone, Copy, PartialEq, Eq, AnchorSerialize, AnchorDeserialize)] pub enum MintAuthorityType { /// Authority to mint new tokens - MintTokens = 0, + MintTokens, /// Authority to freeze token accounts - FreezeAccount = 1, + FreezeAccount, } impl TryFrom for MintAuthorityType { diff --git a/sdk-tests/anchor-manual-test/src/derived_compress.rs b/sdk-tests/anchor-manual-test/src/derived_compress.rs index 1fb092790f..de115cea66 100644 --- a/sdk-tests/anchor-manual-test/src/derived_compress.rs +++ b/sdk-tests/anchor-manual-test/src/derived_compress.rs @@ -19,6 +19,28 @@ use crate::{account_loader::ZeroCopyRecord, pda::MinimalRecord}; /// All accounts are passed via remaining_accounts. pub struct CompressAndClose<'info>(PhantomData<&'info ()>); +impl<'info> CompressAndClose<'info> { + #[doc(hidden)] + pub const __ANCHOR_IX_PARAM_COUNT: usize = 0; + + #[doc(hidden)] + #[inline(always)] + #[allow(unused)] + pub fn __anchor_validate_ix_arg_type_0<__T>(_arg: &__T) {} + #[doc(hidden)] + #[inline(always)] + #[allow(unused)] + pub fn __anchor_validate_ix_arg_type_1<__T>(_arg: &__T) {} + #[doc(hidden)] + #[inline(always)] + #[allow(unused)] + pub fn __anchor_validate_ix_arg_type_2<__T>(_arg: &__T) {} + #[doc(hidden)] + #[inline(always)] + #[allow(unused)] + pub fn __anchor_validate_ix_arg_type_3<__T>(_arg: &__T) {} +} + impl<'info> anchor_lang::Accounts<'info, CompressAndCloseBumps> for CompressAndClose<'info> { fn try_accounts( _program_id: &anchor_lang::solana_program::pubkey::Pubkey, @@ -78,10 +100,10 @@ pub(crate) mod __client_accounts_compress_and_close { use super::*; pub struct CompressAndClose<'info>(PhantomData<&'info ()>); impl<'info> borsh::ser::BorshSerialize for CompressAndClose<'info> { - fn serialize( + fn serialize( &self, _writer: &mut W, - ) -> ::core::result::Result<(), borsh::maybestd::io::Error> { + ) -> ::core::result::Result<(), std::io::Error> { Ok(()) } } diff --git a/sdk-tests/anchor-manual-test/src/derived_decompress.rs b/sdk-tests/anchor-manual-test/src/derived_decompress.rs index 2e4c2f4069..05835dd73b 100644 --- a/sdk-tests/anchor-manual-test/src/derived_decompress.rs +++ b/sdk-tests/anchor-manual-test/src/derived_decompress.rs @@ -15,6 +15,28 @@ use crate::derived_variants::PackedLightAccountVariant; /// All accounts are passed via remaining_accounts. pub struct DecompressIdempotent<'info>(PhantomData<&'info ()>); +impl<'info> DecompressIdempotent<'info> { + #[doc(hidden)] + pub const __ANCHOR_IX_PARAM_COUNT: usize = 0; + + #[doc(hidden)] + #[inline(always)] + #[allow(unused)] + pub fn __anchor_validate_ix_arg_type_0<__T>(_arg: &__T) {} + #[doc(hidden)] + #[inline(always)] + #[allow(unused)] + pub fn __anchor_validate_ix_arg_type_1<__T>(_arg: &__T) {} + #[doc(hidden)] + #[inline(always)] + #[allow(unused)] + pub fn __anchor_validate_ix_arg_type_2<__T>(_arg: &__T) {} + #[doc(hidden)] + #[inline(always)] + #[allow(unused)] + pub fn __anchor_validate_ix_arg_type_3<__T>(_arg: &__T) {} +} + impl<'info> anchor_lang::Accounts<'info, DecompressIdempotentBumps> for DecompressIdempotent<'info> { @@ -76,10 +98,10 @@ pub(crate) mod __client_accounts_decompress_idempotent { use super::*; pub struct DecompressIdempotent<'info>(PhantomData<&'info ()>); impl<'info> borsh::ser::BorshSerialize for DecompressIdempotent<'info> { - fn serialize( + fn serialize( &self, _writer: &mut W, - ) -> ::core::result::Result<(), borsh::maybestd::io::Error> { + ) -> ::core::result::Result<(), std::io::Error> { Ok(()) } } diff --git a/sdk-tests/anchor-manual-test/src/derived_light_config.rs b/sdk-tests/anchor-manual-test/src/derived_light_config.rs index 49157a5037..29bb7dbcf7 100644 --- a/sdk-tests/anchor-manual-test/src/derived_light_config.rs +++ b/sdk-tests/anchor-manual-test/src/derived_light_config.rs @@ -36,7 +36,7 @@ pub struct InitializeConfig<'info> { } pub fn process_initialize_config<'info>( - ctx: Context<'_, '_, '_, 'info, InitializeConfig<'info>>, + ctx: Context<'info, InitializeConfig<'info>>, params: InitConfigParams, ) -> Result<()> { process_initialize_light_config( @@ -66,7 +66,7 @@ pub struct UpdateConfig<'info> { } pub fn process_update_config<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateConfig<'info>>, + ctx: Context<'info, UpdateConfig<'info>>, instruction_data: Vec, ) -> Result<()> { let remaining = [ diff --git a/sdk-tests/anchor-manual-test/src/lib.rs b/sdk-tests/anchor-manual-test/src/lib.rs index 24c97afd18..17dd03455d 100644 --- a/sdk-tests/anchor-manual-test/src/lib.rs +++ b/sdk-tests/anchor-manual-test/src/lib.rs @@ -62,7 +62,7 @@ pub mod manual_test { /// The account is created by Anchor and made compressible by the /// manual LightPreInit/LightFinalize trait implementations. pub fn create_pda<'info>( - ctx: Context<'_, '_, '_, 'info, CreatePda<'info>>, + ctx: Context<'info, CreatePda<'info>>, params: CreatePdaParams, ) -> Result<()> { // 1. Pre-init: creates compressed address via Light System Program CPI @@ -86,7 +86,7 @@ pub mod manual_test { /// Initialize the compression config for this program. /// Named to match SDK's InitializeRentFreeConfig discriminator. pub fn initialize_compression_config<'info>( - ctx: Context<'_, '_, '_, 'info, InitializeConfig<'info>>, + ctx: Context<'info, InitializeConfig<'info>>, params: InitConfigParams, ) -> Result<()> { derived_light_config::process_initialize_config(ctx, params) @@ -95,7 +95,7 @@ pub mod manual_test { /// Update the compression config for this program. /// Named to match SDK's expected discriminator. pub fn update_compression_config<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateConfig<'info>>, + ctx: Context<'info, UpdateConfig<'info>>, instruction_data: Vec, ) -> Result<()> { derived_light_config::process_update_config(ctx, instruction_data) @@ -107,7 +107,7 @@ pub mod manual_test { /// NOTE: Empty Accounts struct - everything in remaining_accounts. /// Anchor deserializes typed params directly. pub fn compress_accounts_idempotent<'info>( - ctx: Context<'_, '_, '_, 'info, CompressAndClose<'info>>, + ctx: Context<'info, CompressAndClose<'info>>, params: CompressAndCloseParams, ) -> Result<()> { derived_compress::process_compress_and_close(ctx.remaining_accounts, ¶ms) @@ -119,7 +119,7 @@ pub mod manual_test { /// NOTE: PhantomData struct - all accounts in remaining_accounts. /// Anchor deserializes typed params directly. pub fn decompress_accounts_idempotent<'info>( - ctx: Context<'_, '_, '_, 'info, DecompressIdempotent<'info>>, + ctx: Context<'info, DecompressIdempotent<'info>>, params: DecompressIdempotentParams, ) -> Result<()> { derived_decompress::process_decompress_idempotent(ctx.remaining_accounts, ¶ms) @@ -128,7 +128,7 @@ pub mod manual_test { /// Create a single zero-copy compressible PDA using AccountLoader. /// Demonstrates zero-copy access pattern with `load_init()`. pub fn create_zero_copy<'info>( - ctx: Context<'_, '_, '_, 'info, CreateZeroCopy<'info>>, + ctx: Context<'info, CreateZeroCopy<'info>>, params: CreateZeroCopyParams, ) -> Result<()> { // 1. Pre-init: creates compressed address via Light System Program CPI @@ -157,7 +157,7 @@ pub mod manual_test { /// Manual implementation of what #[light_account(init, mint::...)] generates. /// Demonstrates minimal params pattern where program derives everything from accounts. pub fn create_derived_mints<'a, 'info>( - ctx: Context<'a, '_, 'info, 'info, CreateDerivedMintsAccounts<'info>>, + ctx: Context<'info, CreateDerivedMintsAccounts<'info>>, params: CreateDerivedMintsParams, ) -> Result<()> { // 1. Pre-init: creates mints via Light Token Program CPI @@ -180,7 +180,7 @@ pub mod manual_test { /// Manual implementation of what #[light_account(init, token::...)] generates. /// Demonstrates rent-free token account creation for program-owned vaults. pub fn create_token_vault<'a, 'info>( - ctx: Context<'a, '_, 'info, 'info, CreateTokenVaultAccounts<'info>>, + ctx: Context<'info, CreateTokenVaultAccounts<'info>>, params: CreateTokenVaultParams, ) -> Result<()> { // 1. Pre-init: creates token vault via Light Token Program CPI @@ -203,7 +203,7 @@ pub mod manual_test { /// Manual implementation of what #[light_account(init, associated_token::...)] generates. /// Demonstrates rent-free ATA creation for user wallets. pub fn create_ata<'a, 'info>( - ctx: Context<'a, '_, 'info, 'info, CreateAtaAccounts<'info>>, + ctx: Context<'info, CreateAtaAccounts<'info>>, params: CreateAtaParams, ) -> Result<()> { // 1. Pre-init: creates ATA via Light Token Program CPI @@ -232,7 +232,7 @@ pub mod manual_test { /// - Token Vault /// - Associated Token Account (ATA) pub fn create_all<'a, 'info>( - ctx: Context<'a, '_, 'info, 'info, CreateAllAccounts<'info>>, + ctx: Context<'info, CreateAllAccounts<'info>>, params: CreateAllParams, ) -> Result<()> { // 1. Pre-init: creates all accounts via CPIs diff --git a/sdk-tests/anchor-manual-test/tests/account_loader.rs b/sdk-tests/anchor-manual-test/tests/account_loader.rs index 5250ebf249..1eb3b93ae1 100644 --- a/sdk-tests/anchor-manual-test/tests/account_loader.rs +++ b/sdk-tests/anchor-manual-test/tests/account_loader.rs @@ -50,7 +50,7 @@ async fn test_zero_copy_create_compress_decompress() { fee_payer: payer.pubkey(), compression_config: config_pda, record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = anchor_manual_test::instruction::CreateZeroCopy { diff --git a/sdk-tests/anchor-manual-test/tests/all.rs b/sdk-tests/anchor-manual-test/tests/all.rs index 511c18e11a..69ca349beb 100644 --- a/sdk-tests/anchor-manual-test/tests/all.rs +++ b/sdk-tests/anchor-manual-test/tests/all.rs @@ -102,7 +102,7 @@ async fn test_create_all() { rent_sponsor: rent_sponsor_pda(), light_token_program: LIGHT_TOKEN_PROGRAM_ID, cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let ix = Instruction { diff --git a/sdk-tests/anchor-manual-test/tests/ata.rs b/sdk-tests/anchor-manual-test/tests/ata.rs index 454e920b89..b20c79e8e4 100644 --- a/sdk-tests/anchor-manual-test/tests/ata.rs +++ b/sdk-tests/anchor-manual-test/tests/ata.rs @@ -39,7 +39,7 @@ async fn test_create_ata() { compressible_config: config_pda(), rent_sponsor: rent_sponsor_pda(), light_token_program: LIGHT_TOKEN_PROGRAM_ID, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let ix = Instruction { @@ -87,7 +87,7 @@ async fn test_create_ata_idempotent() { compressible_config: config_pda(), rent_sponsor: rent_sponsor_pda(), light_token_program: LIGHT_TOKEN_PROGRAM_ID, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let ix = Instruction { diff --git a/sdk-tests/anchor-manual-test/tests/shared.rs b/sdk-tests/anchor-manual-test/tests/shared.rs index fc947c7ee5..b66d7c6739 100644 --- a/sdk-tests/anchor-manual-test/tests/shared.rs +++ b/sdk-tests/anchor-manual-test/tests/shared.rs @@ -96,7 +96,7 @@ pub async fn create_test_mint(rpc: &mut LightProgramTest, payer: &Keypair) -> Pu rent_sponsor: light_token::instruction::rent_sponsor_pda(), light_token_program: light_token::instruction::LIGHT_TOKEN_PROGRAM_ID, cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let ix = solana_sdk::instruction::Instruction { diff --git a/sdk-tests/anchor-manual-test/tests/test.rs b/sdk-tests/anchor-manual-test/tests/test.rs index 4ce96b4662..3430c1011d 100644 --- a/sdk-tests/anchor-manual-test/tests/test.rs +++ b/sdk-tests/anchor-manual-test/tests/test.rs @@ -49,7 +49,7 @@ async fn test_create_compress_decompress() { fee_payer: payer.pubkey(), compression_config: config_pda, record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = anchor_manual_test::instruction::CreatePda { diff --git a/sdk-tests/anchor-manual-test/tests/token_account.rs b/sdk-tests/anchor-manual-test/tests/token_account.rs index a957536d54..2cb3c24176 100644 --- a/sdk-tests/anchor-manual-test/tests/token_account.rs +++ b/sdk-tests/anchor-manual-test/tests/token_account.rs @@ -39,7 +39,7 @@ async fn test_create_token_vault() { compressible_config: config_pda(), rent_sponsor: rent_sponsor_pda(), light_token_program: LIGHT_TOKEN_PROGRAM_ID, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let ix = Instruction { diff --git a/sdk-tests/anchor-manual-test/tests/two_mints.rs b/sdk-tests/anchor-manual-test/tests/two_mints.rs index 5e64a04c1e..ab755f34ae 100644 --- a/sdk-tests/anchor-manual-test/tests/two_mints.rs +++ b/sdk-tests/anchor-manual-test/tests/two_mints.rs @@ -69,7 +69,7 @@ async fn test_create_derived_mints() { rent_sponsor: rent_sponsor_pda(), light_token_program: LIGHT_TOKEN_PROGRAM_ID, cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let ix = Instruction { diff --git a/sdk-tests/anchor-semi-manual-test/src/lib.rs b/sdk-tests/anchor-semi-manual-test/src/lib.rs index 154c7974fe..231808d87d 100644 --- a/sdk-tests/anchor-semi-manual-test/src/lib.rs +++ b/sdk-tests/anchor-semi-manual-test/src/lib.rs @@ -53,7 +53,7 @@ pub mod anchor_semi_manual_test { // ========================================================================= pub fn compress_accounts_idempotent<'info>( - ctx: Context<'_, '_, '_, 'info, EmptyAccounts<'info>>, + ctx: Context<'info, EmptyAccounts<'info>>, params: light_account::CompressAndCloseParams, ) -> Result<()> { light_account::process_compress_pda_accounts_idempotent( @@ -67,7 +67,7 @@ pub mod anchor_semi_manual_test { } pub fn decompress_accounts_idempotent<'info>( - ctx: Context<'_, '_, '_, 'info, EmptyAccounts<'info>>, + ctx: Context<'info, EmptyAccounts<'info>>, params: light_account::DecompressIdempotentParams, ) -> Result<()> { use solana_program::{clock::Clock, sysvar::Sysvar}; @@ -83,7 +83,7 @@ pub mod anchor_semi_manual_test { } pub fn initialize_compression_config<'info>( - ctx: Context<'_, '_, '_, 'info, EmptyAccounts<'info>>, + ctx: Context<'info, EmptyAccounts<'info>>, params: InitConfigParams, ) -> Result<()> { light_account::process_initialize_light_config( @@ -103,7 +103,7 @@ pub mod anchor_semi_manual_test { } pub fn update_compression_config<'info>( - ctx: Context<'_, '_, '_, 'info, EmptyAccounts<'info>>, + ctx: Context<'info, EmptyAccounts<'info>>, instruction_data: Vec, ) -> Result<()> { light_account::process_update_light_config( @@ -119,7 +119,7 @@ pub mod anchor_semi_manual_test { // ========================================================================= pub fn create_pda<'info>( - ctx: Context<'_, '_, '_, 'info, CreatePda<'info>>, + ctx: Context<'info, CreatePda<'info>>, params: CreatePdaParams, ) -> Result<()> { let has_pre_init = ctx @@ -134,7 +134,7 @@ pub mod anchor_semi_manual_test { } pub fn create_ata<'info>( - ctx: Context<'_, '_, '_, 'info, CreateAta<'info>>, + ctx: Context<'info, CreateAta<'info>>, params: CreateAtaParams, ) -> Result<()> { let has_pre_init = ctx @@ -148,7 +148,7 @@ pub mod anchor_semi_manual_test { } pub fn create_token_vault<'info>( - ctx: Context<'_, '_, '_, 'info, CreateTokenVault<'info>>, + ctx: Context<'info, CreateTokenVault<'info>>, params: CreateTokenVaultParams, ) -> Result<()> { let has_pre_init = ctx @@ -162,7 +162,7 @@ pub mod anchor_semi_manual_test { } pub fn create_zero_copy_record<'info>( - ctx: Context<'_, '_, '_, 'info, CreateZeroCopyRecord<'info>>, + ctx: Context<'info, CreateZeroCopyRecord<'info>>, params: CreateZeroCopyRecordParams, ) -> Result<()> { let has_pre_init = ctx @@ -180,7 +180,7 @@ pub mod anchor_semi_manual_test { } pub fn create_mint<'info>( - ctx: Context<'_, '_, '_, 'info, CreateMint<'info>>, + ctx: Context<'info, CreateMint<'info>>, params: CreateMintParams, ) -> Result<()> { let has_pre_init = ctx @@ -194,7 +194,7 @@ pub mod anchor_semi_manual_test { } pub fn create_two_mints<'info>( - ctx: Context<'_, '_, '_, 'info, CreateTwoMints<'info>>, + ctx: Context<'info, CreateTwoMints<'info>>, params: CreateTwoMintsParams, ) -> Result<()> { let has_pre_init = ctx @@ -208,7 +208,7 @@ pub mod anchor_semi_manual_test { } pub fn create_all<'info>( - ctx: Context<'_, '_, '_, 'info, CreateAll<'info>>, + ctx: Context<'info, CreateAll<'info>>, params: CreateAllParams, ) -> Result<()> { let has_pre_init = ctx @@ -232,6 +232,28 @@ pub mod anchor_semi_manual_test { /// All accounts are passed via remaining_accounts. pub struct EmptyAccounts<'info>(PhantomData<&'info ()>); +impl<'info> EmptyAccounts<'info> { + #[doc(hidden)] + pub const __ANCHOR_IX_PARAM_COUNT: usize = 0; + + #[doc(hidden)] + #[inline(always)] + #[allow(unused)] + pub fn __anchor_validate_ix_arg_type_0<__T>(_arg: &__T) {} + #[doc(hidden)] + #[inline(always)] + #[allow(unused)] + pub fn __anchor_validate_ix_arg_type_1<__T>(_arg: &__T) {} + #[doc(hidden)] + #[inline(always)] + #[allow(unused)] + pub fn __anchor_validate_ix_arg_type_2<__T>(_arg: &__T) {} + #[doc(hidden)] + #[inline(always)] + #[allow(unused)] + pub fn __anchor_validate_ix_arg_type_3<__T>(_arg: &__T) {} +} + impl<'info> anchor_lang::Accounts<'info, EmptyAccountsBumps> for EmptyAccounts<'info> { fn try_accounts( _program_id: &anchor_lang::solana_program::pubkey::Pubkey, @@ -291,10 +313,10 @@ pub(crate) mod __client_accounts_empty_accounts { use super::*; pub struct EmptyAccounts<'info>(PhantomData<&'info ()>); impl<'info> borsh::ser::BorshSerialize for EmptyAccounts<'info> { - fn serialize( + fn serialize( &self, _writer: &mut W, - ) -> ::core::result::Result<(), borsh::maybestd::io::Error> { + ) -> ::core::result::Result<(), std::io::Error> { Ok(()) } } diff --git a/sdk-tests/anchor-semi-manual-test/tests/stress_test.rs b/sdk-tests/anchor-semi-manual-test/tests/stress_test.rs index 8804f890be..099440bf89 100644 --- a/sdk-tests/anchor-semi-manual-test/tests/stress_test.rs +++ b/sdk-tests/anchor-semi-manual-test/tests/stress_test.rs @@ -162,7 +162,7 @@ async fn setup() -> (StressTestContext, TestPdas) { light_token_rent_sponsor: light_token::instruction::LIGHT_TOKEN_RENT_SPONSOR, light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), light_token_program: light_sdk_types::LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = anchor_semi_manual_test::instruction::CreateAll { diff --git a/sdk-tests/anchor-semi-manual-test/tests/test_create_all.rs b/sdk-tests/anchor-semi-manual-test/tests/test_create_all.rs index 3f5028ec3f..7cd7c3363c 100644 --- a/sdk-tests/anchor-semi-manual-test/tests/test_create_all.rs +++ b/sdk-tests/anchor-semi-manual-test/tests/test_create_all.rs @@ -99,7 +99,7 @@ async fn test_create_all_derive() { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = anchor_semi_manual_test::instruction::CreateAll { diff --git a/sdk-tests/anchor-semi-manual-test/tests/test_create_ata.rs b/sdk-tests/anchor-semi-manual-test/tests/test_create_ata.rs index c58819dff9..f1255af067 100644 --- a/sdk-tests/anchor-semi-manual-test/tests/test_create_ata.rs +++ b/sdk-tests/anchor-semi-manual-test/tests/test_create_ata.rs @@ -34,7 +34,7 @@ async fn test_create_ata_derive() { light_token_config: LIGHT_TOKEN_CONFIG, light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = anchor_semi_manual_test::instruction::CreateAta { diff --git a/sdk-tests/anchor-semi-manual-test/tests/test_create_mint.rs b/sdk-tests/anchor-semi-manual-test/tests/test_create_mint.rs index 41291a984e..68162b3aac 100644 --- a/sdk-tests/anchor-semi-manual-test/tests/test_create_mint.rs +++ b/sdk-tests/anchor-semi-manual-test/tests/test_create_mint.rs @@ -49,7 +49,7 @@ async fn test_create_mint_derive() { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = anchor_semi_manual_test::instruction::CreateMint { diff --git a/sdk-tests/anchor-semi-manual-test/tests/test_create_pda.rs b/sdk-tests/anchor-semi-manual-test/tests/test_create_pda.rs index 9b48fbec4a..e392bf4c7c 100644 --- a/sdk-tests/anchor-semi-manual-test/tests/test_create_pda.rs +++ b/sdk-tests/anchor-semi-manual-test/tests/test_create_pda.rs @@ -38,7 +38,7 @@ async fn test_create_single_pda_derive() { compression_config: env.config_pda, pda_rent_sponsor: env.rent_sponsor, record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = anchor_semi_manual_test::instruction::CreatePda { diff --git a/sdk-tests/anchor-semi-manual-test/tests/test_create_token_vault.rs b/sdk-tests/anchor-semi-manual-test/tests/test_create_token_vault.rs index 7f0d7ecd04..ebbdbe9fd0 100644 --- a/sdk-tests/anchor-semi-manual-test/tests/test_create_token_vault.rs +++ b/sdk-tests/anchor-semi-manual-test/tests/test_create_token_vault.rs @@ -44,7 +44,7 @@ async fn test_create_token_vault_derive() { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = anchor_semi_manual_test::instruction::CreateTokenVault { diff --git a/sdk-tests/anchor-semi-manual-test/tests/test_create_two_mints.rs b/sdk-tests/anchor-semi-manual-test/tests/test_create_two_mints.rs index e9489b081a..c93ef3d91e 100644 --- a/sdk-tests/anchor-semi-manual-test/tests/test_create_two_mints.rs +++ b/sdk-tests/anchor-semi-manual-test/tests/test_create_two_mints.rs @@ -59,7 +59,7 @@ async fn test_create_two_mints_derive() { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = anchor_semi_manual_test::instruction::CreateTwoMints { diff --git a/sdk-tests/anchor-semi-manual-test/tests/test_create_zero_copy_record.rs b/sdk-tests/anchor-semi-manual-test/tests/test_create_zero_copy_record.rs index 9c3a15fb18..989bb26d0f 100644 --- a/sdk-tests/anchor-semi-manual-test/tests/test_create_zero_copy_record.rs +++ b/sdk-tests/anchor-semi-manual-test/tests/test_create_zero_copy_record.rs @@ -37,7 +37,7 @@ async fn test_create_zero_copy_record_derive() { compression_config: env.config_pda, pda_rent_sponsor: env.rent_sponsor, record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = anchor_semi_manual_test::instruction::CreateZeroCopyRecord { diff --git a/sdk-tests/client-test/Cargo.toml b/sdk-tests/client-test/Cargo.toml index 9f80dcc190..5a2e313434 100644 --- a/sdk-tests/client-test/Cargo.toml +++ b/sdk-tests/client-test/Cargo.toml @@ -56,7 +56,7 @@ solana-signer = { workspace = true } solana-epoch-info = { workspace = true } solana-keypair = { workspace = true } solana-compute-budget-interface = { workspace = true } -solana-address-lookup-table-interface = { version = "2.2.1", features = [ +solana-address-lookup-table-interface = { version = "3.0", features = [ "bytemuck", "bincode", ] } diff --git a/sdk-tests/csdk-anchor-full-derived-test/src/amm_test/initialize.rs b/sdk-tests/csdk-anchor-full-derived-test/src/amm_test/initialize.rs index 3dea016afd..b2c5503539 100644 --- a/sdk-tests/csdk-anchor-full-derived-test/src/amm_test/initialize.rs +++ b/sdk-tests/csdk-anchor-full-derived-test/src/amm_test/initialize.rs @@ -167,7 +167,7 @@ pub struct InitializePool<'info> { /// Initialize instruction handler. /// Token vaults (token_0_vault, token_1_vault) are manually created via CreateTokenAccountCpi. pub fn process_initialize_pool<'info>( - ctx: Context<'_, '_, '_, 'info, InitializePool<'info>>, + ctx: Context<'info, InitializePool<'info>>, params: InitializeParams, ) -> Result<()> { // Create token_0_vault using CreateTokenAccountCpi (mark-only field) diff --git a/sdk-tests/csdk-anchor-full-derived-test/src/lib.rs b/sdk-tests/csdk-anchor-full-derived-test/src/lib.rs index ed4f05aee7..9e04d21e13 100644 --- a/sdk-tests/csdk-anchor-full-derived-test/src/lib.rs +++ b/sdk-tests/csdk-anchor-full-derived-test/src/lib.rs @@ -312,7 +312,7 @@ pub mod csdk_anchor_full_derived_test { }; pub fn create_pdas_and_mint_auto<'info>( - ctx: Context<'_, '_, '_, 'info, CreatePdasAndMintAuto<'info>>, + ctx: Context<'info, CreatePdasAndMintAuto<'info>>, params: FullAutoWithMintParams, ) -> Result<()> { use light_account::{CreateTokenAccountCpi, CreateTokenAtaCpi}; @@ -408,7 +408,7 @@ pub mod csdk_anchor_full_derived_test { /// Second instruction to test #[light_program] with multiple instructions. /// Delegates to nested processor in separate module. pub fn create_single_record<'info>( - ctx: Context<'_, '_, '_, 'info, D5RentfreeBare<'info>>, + ctx: Context<'info, D5RentfreeBare<'info>>, params: D5RentfreeBareParams, ) -> Result<()> { crate::processors::process_create_single_record(ctx, params) @@ -419,7 +419,7 @@ pub mod csdk_anchor_full_derived_test { /// Also tests dynamic context name detection using "context" instead of "ctx". #[allow(unused_variables)] pub fn create_two_mints<'info>( - context: Context<'_, '_, '_, 'info, CreateTwoMints<'info>>, + context: Context<'info, CreateTwoMints<'info>>, params: CreateTwoMintsParams, ) -> Result<()> { // Both mints are created by the RentFree macro in pre_init @@ -432,7 +432,7 @@ pub mod csdk_anchor_full_derived_test { /// Also tests dynamic context name detection using "anchor_ctx" instead of "ctx". #[allow(unused_variables)] pub fn create_three_mints<'info>( - anchor_ctx: Context<'_, '_, '_, 'info, CreateThreeMints<'info>>, + anchor_ctx: Context<'info, CreateThreeMints<'info>>, params: CreateThreeMintsParams, ) -> Result<()> { // All 3 mints are created by the RentFree macro in pre_init @@ -445,7 +445,7 @@ pub mod csdk_anchor_full_derived_test { /// Also tests dynamic context name detection using "c" (single letter) instead of "ctx". #[allow(unused_variables)] pub fn create_mint_with_metadata<'info>( - c: Context<'_, '_, '_, 'info, CreateMintWithMetadata<'info>>, + c: Context<'info, CreateMintWithMetadata<'info>>, params: CreateMintWithMetadataParams, ) -> Result<()> { // Mint with metadata is created by the RentFree macro in pre_init @@ -457,7 +457,7 @@ pub mod csdk_anchor_full_derived_test { /// Tests: 2x #[light_account(init)], 2x #[light_account(token)], 1x #[light_account(init)], /// CreateTokenAccountCpi.rent_free(), CreateTokenAtaCpi.rent_free(), MintToCpi pub fn initialize_pool<'info>( - ctx: Context<'_, '_, '_, 'info, InitializePool<'info>>, + ctx: Context<'info, InitializePool<'info>>, params: InitializeParams, ) -> Result<()> { crate::amm_test::process_initialize_pool(ctx, params) @@ -490,7 +490,7 @@ pub mod csdk_anchor_full_derived_test { /// D6: Direct Account<'info, T> type pub fn d6_account<'info>( - ctx: Context<'_, '_, '_, 'info, D6Account<'info>>, + ctx: Context<'info, D6Account<'info>>, params: D6AccountParams, ) -> Result<()> { ctx.accounts.d6_account_record.owner = params.owner; @@ -499,7 +499,7 @@ pub mod csdk_anchor_full_derived_test { /// D6: Box> type pub fn d6_boxed<'info>( - ctx: Context<'_, '_, '_, 'info, D6Boxed<'info>>, + ctx: Context<'info, D6Boxed<'info>>, params: D6BoxedParams, ) -> Result<()> { ctx.accounts.d6_boxed_record.owner = params.owner; @@ -512,7 +512,7 @@ pub mod csdk_anchor_full_derived_test { /// D8: Only #[light_account(init)] fields (no token accounts) pub fn d8_pda_only<'info>( - ctx: Context<'_, '_, '_, 'info, D8PdaOnly<'info>>, + ctx: Context<'info, D8PdaOnly<'info>>, params: D8PdaOnlyParams, ) -> Result<()> { ctx.accounts.d8_pda_only_record.owner = params.owner; @@ -521,7 +521,7 @@ pub mod csdk_anchor_full_derived_test { /// D8: Multiple #[light_account(init)] fields of same type pub fn d8_multi_rentfree<'info>( - ctx: Context<'_, '_, '_, 'info, D8MultiRentfree<'info>>, + ctx: Context<'info, D8MultiRentfree<'info>>, params: D8MultiRentfreeParams, ) -> Result<()> { ctx.accounts.d8_multi_record1.owner = params.owner; @@ -530,10 +530,7 @@ pub mod csdk_anchor_full_derived_test { } /// D8: Multiple #[light_account(init)] fields of different types - pub fn d8_all<'info>( - ctx: Context<'_, '_, '_, 'info, D8All<'info>>, - params: D8AllParams, - ) -> Result<()> { + pub fn d8_all<'info>(ctx: Context<'info, D8All<'info>>, params: D8AllParams) -> Result<()> { ctx.accounts.d8_all_single.owner = params.owner; ctx.accounts.d8_all_multi.owner = params.owner; Ok(()) @@ -545,7 +542,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Literal seed expression pub fn d9_literal<'info>( - ctx: Context<'_, '_, '_, 'info, D9Literal<'info>>, + ctx: Context<'info, D9Literal<'info>>, _params: D9LiteralParams, ) -> Result<()> { ctx.accounts.d9_literal_record.owner = ctx.accounts.fee_payer.key(); @@ -554,7 +551,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Constant seed expression pub fn d9_constant<'info>( - ctx: Context<'_, '_, '_, 'info, D9Constant<'info>>, + ctx: Context<'info, D9Constant<'info>>, _params: D9ConstantParams, ) -> Result<()> { ctx.accounts.d9_constant_record.owner = ctx.accounts.fee_payer.key(); @@ -563,7 +560,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Context account seed expression pub fn d9_ctx_account<'info>( - ctx: Context<'_, '_, '_, 'info, D9CtxAccount<'info>>, + ctx: Context<'info, D9CtxAccount<'info>>, _params: D9CtxAccountParams, ) -> Result<()> { ctx.accounts.d9_ctx_record.owner = ctx.accounts.authority.key(); @@ -572,7 +569,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Param seed expression (Pubkey) pub fn d9_param<'info>( - ctx: Context<'_, '_, '_, 'info, D9Param<'info>>, + ctx: Context<'info, D9Param<'info>>, params: D9ParamParams, ) -> Result<()> { ctx.accounts.d9_param_record.owner = params.owner; @@ -581,7 +578,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Param bytes seed expression (u64) pub fn d9_param_bytes<'info>( - ctx: Context<'_, '_, '_, 'info, D9ParamBytes<'info>>, + ctx: Context<'info, D9ParamBytes<'info>>, _params: D9ParamBytesParams, ) -> Result<()> { ctx.accounts.d9_param_bytes_record.owner = ctx.accounts.fee_payer.key(); @@ -590,7 +587,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Mixed seed expression types pub fn d9_mixed<'info>( - ctx: Context<'_, '_, '_, 'info, D9Mixed<'info>>, + ctx: Context<'info, D9Mixed<'info>>, params: D9MixedParams, ) -> Result<()> { ctx.accounts.d9_mixed_record.owner = params.owner; @@ -603,7 +600,7 @@ pub mod csdk_anchor_full_derived_test { /// D7: "payer" field name variant (instead of fee_payer) pub fn d7_payer<'info>( - ctx: Context<'_, '_, '_, 'info, D7Payer<'info>>, + ctx: Context<'info, D7Payer<'info>>, params: D7PayerParams, ) -> Result<()> { ctx.accounts.d7_payer_record.owner = params.owner; @@ -612,7 +609,7 @@ pub mod csdk_anchor_full_derived_test { /// D7: "creator" field name variant (instead of fee_payer) pub fn d7_creator<'info>( - ctx: Context<'_, '_, '_, 'info, D7Creator<'info>>, + ctx: Context<'info, D7Creator<'info>>, params: D7CreatorParams, ) -> Result<()> { ctx.accounts.d7_creator_record.owner = params.owner; @@ -621,7 +618,7 @@ pub mod csdk_anchor_full_derived_test { /// D7: "light_token_config" naming variant for token accounts pub fn d7_light_token_config<'info>( - ctx: Context<'_, '_, '_, 'info, D7LightTokenConfig<'info>>, + ctx: Context<'info, D7LightTokenConfig<'info>>, params: D7LightTokenConfigParams, ) -> Result<()> { use light_account::CreateTokenAccountCpi; @@ -651,7 +648,7 @@ pub mod csdk_anchor_full_derived_test { /// D7: All naming variants combined (payer + light_token config/sponsor) pub fn d7_all_names<'info>( - ctx: Context<'_, '_, '_, 'info, D7AllNames<'info>>, + ctx: Context<'info, D7AllNames<'info>>, params: D7AllNamesParams, ) -> Result<()> { use light_account::CreateTokenAccountCpi; @@ -688,7 +685,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Function call seed expression pub fn d9_function_call<'info>( - ctx: Context<'_, '_, '_, 'info, D9FunctionCall<'info>>, + ctx: Context<'info, D9FunctionCall<'info>>, params: D9FunctionCallParams, ) -> Result<()> { ctx.accounts.d9_func_record.owner = params.key_a; @@ -696,10 +693,7 @@ pub mod csdk_anchor_full_derived_test { } /// D9: All seed expression types (6 PDAs) - pub fn d9_all<'info>( - ctx: Context<'_, '_, '_, 'info, D9All<'info>>, - params: D9AllParams, - ) -> Result<()> { + pub fn d9_all<'info>(ctx: Context<'info, D9All<'info>>, params: D9AllParams) -> Result<()> { ctx.accounts.d9_all_lit.owner = params.owner; ctx.accounts.d9_all_const.owner = params.owner; ctx.accounts.d9_all_ctx.owner = params.owner; @@ -715,7 +709,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Bare constant (no path prefix) pub fn d9_qualified_bare<'info>( - ctx: Context<'_, '_, '_, 'info, D9QualifiedBare<'info>>, + ctx: Context<'info, D9QualifiedBare<'info>>, _params: D9QualifiedBareParams, ) -> Result<()> { ctx.accounts.d9_qualified_bare_record.owner = ctx.accounts.fee_payer.key(); @@ -724,7 +718,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: self:: prefix path pub fn d9_qualified_self<'info>( - ctx: Context<'_, '_, '_, 'info, D9QualifiedSelf<'info>>, + ctx: Context<'info, D9QualifiedSelf<'info>>, _params: D9QualifiedSelfParams, ) -> Result<()> { ctx.accounts.d9_qualified_self_record.owner = ctx.accounts.fee_payer.key(); @@ -733,7 +727,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: crate:: prefix path pub fn d9_qualified_crate<'info>( - ctx: Context<'_, '_, '_, 'info, D9QualifiedCrate<'info>>, + ctx: Context<'info, D9QualifiedCrate<'info>>, _params: D9QualifiedCrateParams, ) -> Result<()> { ctx.accounts.d9_qualified_crate_record.owner = ctx.accounts.fee_payer.key(); @@ -742,7 +736,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Deep nested crate path pub fn d9_qualified_deep<'info>( - ctx: Context<'_, '_, '_, 'info, D9QualifiedDeep<'info>>, + ctx: Context<'info, D9QualifiedDeep<'info>>, _params: D9QualifiedDeepParams, ) -> Result<()> { ctx.accounts.d9_qualified_deep_record.owner = ctx.accounts.fee_payer.key(); @@ -751,7 +745,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Mixed qualified and bare paths pub fn d9_qualified_mixed<'info>( - ctx: Context<'_, '_, '_, 'info, D9QualifiedMixed<'info>>, + ctx: Context<'info, D9QualifiedMixed<'info>>, params: D9QualifiedMixedParams, ) -> Result<()> { ctx.accounts.d9_qualified_mixed_record.owner = params.owner; @@ -764,7 +758,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: constant.as_ref() pub fn d9_method_as_ref<'info>( - ctx: Context<'_, '_, '_, 'info, D9MethodAsRef<'info>>, + ctx: Context<'info, D9MethodAsRef<'info>>, _params: D9MethodAsRefParams, ) -> Result<()> { ctx.accounts.d9_method_as_ref_record.owner = ctx.accounts.fee_payer.key(); @@ -773,7 +767,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: string_constant.as_bytes() pub fn d9_method_as_bytes<'info>( - ctx: Context<'_, '_, '_, 'info, D9MethodAsBytes<'info>>, + ctx: Context<'info, D9MethodAsBytes<'info>>, _params: D9MethodAsBytesParams, ) -> Result<()> { ctx.accounts.d9_method_as_bytes_record.owner = ctx.accounts.fee_payer.key(); @@ -782,7 +776,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: crate::path::CONST.as_bytes() pub fn d9_method_qualified_as_bytes<'info>( - ctx: Context<'_, '_, '_, 'info, D9MethodQualifiedAsBytes<'info>>, + ctx: Context<'info, D9MethodQualifiedAsBytes<'info>>, _params: D9MethodQualifiedAsBytesParams, ) -> Result<()> { ctx.accounts.d9_method_qualified_as_bytes_record.owner = ctx.accounts.fee_payer.key(); @@ -791,7 +785,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: params.field.to_le_bytes().as_ref() pub fn d9_method_to_le_bytes<'info>( - ctx: Context<'_, '_, '_, 'info, D9MethodToLeBytes<'info>>, + ctx: Context<'info, D9MethodToLeBytes<'info>>, _params: D9MethodToLeBytesParams, ) -> Result<()> { ctx.accounts.d9_method_to_le_bytes_record.owner = ctx.accounts.fee_payer.key(); @@ -800,7 +794,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: params.field.to_be_bytes().as_ref() pub fn d9_method_to_be_bytes<'info>( - ctx: Context<'_, '_, '_, 'info, D9MethodToBeBytes<'info>>, + ctx: Context<'info, D9MethodToBeBytes<'info>>, _params: D9MethodToBeBytesParams, ) -> Result<()> { ctx.accounts.d9_method_to_be_bytes_record.owner = ctx.accounts.fee_payer.key(); @@ -809,7 +803,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Mixed methods in seeds pub fn d9_method_mixed<'info>( - ctx: Context<'_, '_, '_, 'info, D9MethodMixed<'info>>, + ctx: Context<'info, D9MethodMixed<'info>>, params: D9MethodMixedParams, ) -> Result<()> { ctx.accounts.d9_method_mixed_record.owner = params.owner; @@ -822,7 +816,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Literal seed with bump pub fn d9_bump_literal<'info>( - ctx: Context<'_, '_, '_, 'info, D9BumpLiteral<'info>>, + ctx: Context<'info, D9BumpLiteral<'info>>, _params: D9BumpLiteralParams, ) -> Result<()> { ctx.accounts.d9_bump_lit_record.owner = ctx.accounts.fee_payer.key(); @@ -831,7 +825,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Constant seed with bump pub fn d9_bump_constant<'info>( - ctx: Context<'_, '_, '_, 'info, D9BumpConstant<'info>>, + ctx: Context<'info, D9BumpConstant<'info>>, _params: D9BumpConstantParams, ) -> Result<()> { ctx.accounts.d9_bump_const_record.owner = ctx.accounts.fee_payer.key(); @@ -840,7 +834,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Qualified path with bump pub fn d9_bump_qualified<'info>( - ctx: Context<'_, '_, '_, 'info, D9BumpQualified<'info>>, + ctx: Context<'info, D9BumpQualified<'info>>, _params: D9BumpQualifiedParams, ) -> Result<()> { ctx.accounts.d9_bump_qual_record.owner = ctx.accounts.fee_payer.key(); @@ -849,7 +843,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Param seed with bump pub fn d9_bump_param<'info>( - ctx: Context<'_, '_, '_, 'info, D9BumpParam<'info>>, + ctx: Context<'info, D9BumpParam<'info>>, params: D9BumpParamParams, ) -> Result<()> { ctx.accounts.d9_bump_param_record.owner = params.owner; @@ -858,7 +852,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Ctx account seed with bump pub fn d9_bump_ctx<'info>( - ctx: Context<'_, '_, '_, 'info, D9BumpCtx<'info>>, + ctx: Context<'info, D9BumpCtx<'info>>, _params: D9BumpCtxParams, ) -> Result<()> { ctx.accounts.d9_bump_ctx_record.owner = ctx.accounts.authority.key(); @@ -867,7 +861,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Multiple seeds with bump pub fn d9_bump_mixed<'info>( - ctx: Context<'_, '_, '_, 'info, D9BumpMixed<'info>>, + ctx: Context<'info, D9BumpMixed<'info>>, params: D9BumpMixedParams, ) -> Result<()> { ctx.accounts.d9_bump_mixed_record.owner = params.owner; @@ -880,7 +874,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Three seeds pub fn d9_complex_three<'info>( - ctx: Context<'_, '_, '_, 'info, D9ComplexThree<'info>>, + ctx: Context<'info, D9ComplexThree<'info>>, params: D9ComplexThreeParams, ) -> Result<()> { ctx.accounts.d9_complex_three_record.owner = params.owner; @@ -889,7 +883,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Four seeds pub fn d9_complex_four<'info>( - ctx: Context<'_, '_, '_, 'info, D9ComplexFour<'info>>, + ctx: Context<'info, D9ComplexFour<'info>>, params: D9ComplexFourParams, ) -> Result<()> { ctx.accounts.d9_complex_four_record.owner = params.owner; @@ -898,7 +892,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Five seeds with ctx account pub fn d9_complex_five<'info>( - ctx: Context<'_, '_, '_, 'info, D9ComplexFive<'info>>, + ctx: Context<'info, D9ComplexFive<'info>>, params: D9ComplexFiveParams, ) -> Result<()> { ctx.accounts.d9_complex_five_record.owner = params.owner; @@ -907,7 +901,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Qualified paths mixed with local pub fn d9_complex_qualified_mix<'info>( - ctx: Context<'_, '_, '_, 'info, D9ComplexQualifiedMix<'info>>, + ctx: Context<'info, D9ComplexQualifiedMix<'info>>, params: D9ComplexQualifiedMixParams, ) -> Result<()> { ctx.accounts.d9_complex_qualified_mix_record.owner = params.owner; @@ -916,7 +910,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Function call combined with other seeds pub fn d9_complex_func<'info>( - ctx: Context<'_, '_, '_, 'info, D9ComplexFunc<'info>>, + ctx: Context<'info, D9ComplexFunc<'info>>, params: D9ComplexFuncParams, ) -> Result<()> { ctx.accounts.d9_complex_func_record.owner = params.key_a; @@ -925,7 +919,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: All qualified paths pub fn d9_complex_all_qualified<'info>( - ctx: Context<'_, '_, '_, 'info, D9ComplexAllQualified<'info>>, + ctx: Context<'info, D9ComplexAllQualified<'info>>, params: D9ComplexAllQualifiedParams, ) -> Result<()> { ctx.accounts.d9_complex_all_qualified_record.owner = params.owner; @@ -934,7 +928,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Program ID as seed pub fn d9_complex_program_id<'info>( - ctx: Context<'_, '_, '_, 'info, D9ComplexProgramId<'info>>, + ctx: Context<'info, D9ComplexProgramId<'info>>, params: D9ComplexProgramIdParams, ) -> Result<()> { ctx.accounts.d9_complex_program_id_record.owner = params.owner; @@ -943,7 +937,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: id() function call as seed pub fn d9_complex_id_func<'info>( - ctx: Context<'_, '_, '_, 'info, D9ComplexIdFunc<'info>>, + ctx: Context<'info, D9ComplexIdFunc<'info>>, params: D9ComplexIdFuncParams, ) -> Result<()> { ctx.accounts.d9_complex_id_func_record.owner = params.owner; @@ -956,7 +950,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Empty literal pub fn d9_edge_empty<'info>( - ctx: Context<'_, '_, '_, 'info, D9EdgeEmpty<'info>>, + ctx: Context<'info, D9EdgeEmpty<'info>>, params: D9EdgeEmptyParams, ) -> Result<()> { ctx.accounts.d9_edge_empty_record.owner = params.owner; @@ -965,7 +959,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Single byte constant pub fn d9_edge_single_byte<'info>( - ctx: Context<'_, '_, '_, 'info, D9EdgeSingleByte<'info>>, + ctx: Context<'info, D9EdgeSingleByte<'info>>, _params: D9EdgeSingleByteParams, ) -> Result<()> { ctx.accounts.d9_edge_single_byte_record.owner = ctx.accounts.fee_payer.key(); @@ -974,7 +968,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Single letter constant name pub fn d9_edge_single_letter<'info>( - ctx: Context<'_, '_, '_, 'info, D9EdgeSingleLetter<'info>>, + ctx: Context<'info, D9EdgeSingleLetter<'info>>, _params: D9EdgeSingleLetterParams, ) -> Result<()> { ctx.accounts.d9_edge_single_letter_record.owner = ctx.accounts.fee_payer.key(); @@ -983,7 +977,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Constant name with digits pub fn d9_edge_digits<'info>( - ctx: Context<'_, '_, '_, 'info, D9EdgeDigits<'info>>, + ctx: Context<'info, D9EdgeDigits<'info>>, _params: D9EdgeDigitsParams, ) -> Result<()> { ctx.accounts.d9_edge_digits_record.owner = ctx.accounts.fee_payer.key(); @@ -992,7 +986,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Leading underscore constant pub fn d9_edge_underscore<'info>( - ctx: Context<'_, '_, '_, 'info, D9EdgeUnderscore<'info>>, + ctx: Context<'info, D9EdgeUnderscore<'info>>, _params: D9EdgeUnderscoreParams, ) -> Result<()> { ctx.accounts.d9_edge_underscore_record.owner = ctx.accounts.fee_payer.key(); @@ -1001,7 +995,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Many literals in seeds pub fn d9_edge_many_literals<'info>( - ctx: Context<'_, '_, '_, 'info, D9EdgeManyLiterals<'info>>, + ctx: Context<'info, D9EdgeManyLiterals<'info>>, _params: D9EdgeManyLiteralsParams, ) -> Result<()> { ctx.accounts.d9_edge_many_literals_record.owner = ctx.accounts.fee_payer.key(); @@ -1010,7 +1004,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Mixed edge cases pub fn d9_edge_mixed<'info>( - ctx: Context<'_, '_, '_, 'info, D9EdgeMixed<'info>>, + ctx: Context<'info, D9EdgeMixed<'info>>, params: D9EdgeMixedParams, ) -> Result<()> { ctx.accounts.d9_edge_mixed_record.owner = params.owner; @@ -1023,7 +1017,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: External crate (light_sdk_types) pub fn d9_external_sdk_types<'info>( - ctx: Context<'_, '_, '_, 'info, D9ExternalSdkTypes<'info>>, + ctx: Context<'info, D9ExternalSdkTypes<'info>>, params: D9ExternalSdkTypesParams, ) -> Result<()> { ctx.accounts.d9_external_sdk_types_record.owner = params.owner; @@ -1032,7 +1026,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: External crate (light_ctoken_types) pub fn d9_external_ctoken<'info>( - ctx: Context<'_, '_, '_, 'info, D9ExternalCtoken<'info>>, + ctx: Context<'info, D9ExternalCtoken<'info>>, params: D9ExternalCtokenParams, ) -> Result<()> { ctx.accounts.d9_external_ctoken_record.owner = params.owner; @@ -1041,7 +1035,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Multiple external crates mixed pub fn d9_external_mixed<'info>( - ctx: Context<'_, '_, '_, 'info, D9ExternalMixed<'info>>, + ctx: Context<'info, D9ExternalMixed<'info>>, params: D9ExternalMixedParams, ) -> Result<()> { ctx.accounts.d9_external_mixed_record.owner = params.owner; @@ -1050,7 +1044,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: External with local constant pub fn d9_external_with_local<'info>( - ctx: Context<'_, '_, '_, 'info, D9ExternalWithLocal<'info>>, + ctx: Context<'info, D9ExternalWithLocal<'info>>, params: D9ExternalWithLocalParams, ) -> Result<()> { ctx.accounts.d9_external_with_local_record.owner = params.owner; @@ -1059,7 +1053,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: External constant with bump pub fn d9_external_bump<'info>( - ctx: Context<'_, '_, '_, 'info, D9ExternalBump<'info>>, + ctx: Context<'info, D9ExternalBump<'info>>, params: D9ExternalBumpParams, ) -> Result<()> { ctx.accounts.d9_external_bump_record.owner = params.owner; @@ -1068,7 +1062,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Re-exported external constant pub fn d9_external_reexport<'info>( - ctx: Context<'_, '_, '_, 'info, D9ExternalReexport<'info>>, + ctx: Context<'info, D9ExternalReexport<'info>>, _params: D9ExternalReexportParams, ) -> Result<()> { ctx.accounts.d9_external_reexport_record.owner = ctx.accounts.fee_payer.key(); @@ -1081,7 +1075,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Simple nested struct access pub fn d9_nested_simple<'info>( - ctx: Context<'_, '_, '_, 'info, D9NestedSimple<'info>>, + ctx: Context<'info, D9NestedSimple<'info>>, params: D9NestedSimpleParams, ) -> Result<()> { ctx.accounts.d9_nested_simple_record.owner = params.nested.owner; @@ -1090,7 +1084,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Double nested struct access pub fn d9_nested_double<'info>( - ctx: Context<'_, '_, '_, 'info, D9NestedDouble<'info>>, + ctx: Context<'info, D9NestedDouble<'info>>, params: D9NestedDoubleParams, ) -> Result<()> { ctx.accounts.d9_nested_double_record.owner = params.outer.nested.owner; @@ -1099,7 +1093,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Nested array field access pub fn d9_nested_array_field<'info>( - ctx: Context<'_, '_, '_, 'info, D9NestedArrayField<'info>>, + ctx: Context<'info, D9NestedArrayField<'info>>, params: D9NestedArrayFieldParams, ) -> Result<()> { ctx.accounts.d9_nested_array_field_record.owner = params.outer.nested.owner; @@ -1108,7 +1102,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Array indexing params.arrays[2].as_slice() pub fn d9_array_index<'info>( - ctx: Context<'_, '_, '_, 'info, D9ArrayIndex<'info>>, + ctx: Context<'info, D9ArrayIndex<'info>>, _params: D9ArrayIndexParams, ) -> Result<()> { ctx.accounts.d9_array_index_record.owner = ctx.accounts.fee_payer.key(); @@ -1117,7 +1111,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Nested struct with bytes conversion pub fn d9_nested_bytes<'info>( - ctx: Context<'_, '_, '_, 'info, D9NestedBytes<'info>>, + ctx: Context<'info, D9NestedBytes<'info>>, params: D9NestedBytesParams, ) -> Result<()> { ctx.accounts.d9_nested_bytes_record.owner = params.nested.owner; @@ -1126,7 +1120,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Multiple nested seeds combined pub fn d9_nested_combined<'info>( - ctx: Context<'_, '_, '_, 'info, D9NestedCombined<'info>>, + ctx: Context<'info, D9NestedCombined<'info>>, params: D9NestedCombinedParams, ) -> Result<()> { ctx.accounts.d9_nested_combined_record.owner = params.outer.nested.owner; @@ -1139,7 +1133,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Associated constant pub fn d9_assoc_const<'info>( - ctx: Context<'_, '_, '_, 'info, D9AssocConst<'info>>, + ctx: Context<'info, D9AssocConst<'info>>, _params: D9AssocConstParams, ) -> Result<()> { ctx.accounts.d9_assoc_const_record.owner = ctx.accounts.fee_payer.key(); @@ -1148,7 +1142,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Associated constant with method pub fn d9_assoc_const_method<'info>( - ctx: Context<'_, '_, '_, 'info, D9AssocConstMethod<'info>>, + ctx: Context<'info, D9AssocConstMethod<'info>>, _params: D9AssocConstMethodParams, ) -> Result<()> { ctx.accounts.d9_assoc_const_method_record.owner = ctx.accounts.fee_payer.key(); @@ -1157,7 +1151,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Multiple associated constants pub fn d9_multi_assoc_const<'info>( - ctx: Context<'_, '_, '_, 'info, D9MultiAssocConst<'info>>, + ctx: Context<'info, D9MultiAssocConst<'info>>, params: D9MultiAssocConstParams, ) -> Result<()> { ctx.accounts.d9_multi_assoc_const_record.owner = params.owner; @@ -1166,7 +1160,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Const fn call pub fn d9_const_fn<'info>( - ctx: Context<'_, '_, '_, 'info, D9ConstFn<'info>>, + ctx: Context<'info, D9ConstFn<'info>>, _params: D9ConstFnParams, ) -> Result<()> { ctx.accounts.d9_const_fn_record.owner = ctx.accounts.fee_payer.key(); @@ -1175,7 +1169,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Const fn with generic pub fn d9_const_fn_generic<'info>( - ctx: Context<'_, '_, '_, 'info, D9ConstFnGeneric<'info>>, + ctx: Context<'info, D9ConstFnGeneric<'info>>, _params: D9ConstFnGenericParams, ) -> Result<()> { ctx.accounts.d9_const_fn_generic_record.owner = ctx.accounts.fee_payer.key(); @@ -1184,7 +1178,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Trait associated constant pub fn d9_trait_assoc_const<'info>( - ctx: Context<'_, '_, '_, 'info, D9TraitAssocConst<'info>>, + ctx: Context<'info, D9TraitAssocConst<'info>>, _params: D9TraitAssocConstParams, ) -> Result<()> { ctx.accounts.d9_trait_assoc_const_record.owner = ctx.accounts.fee_payer.key(); @@ -1193,7 +1187,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Static variable pub fn d9_static<'info>( - ctx: Context<'_, '_, '_, 'info, D9Static<'info>>, + ctx: Context<'info, D9Static<'info>>, _params: D9StaticParams, ) -> Result<()> { ctx.accounts.d9_static_record.owner = ctx.accounts.fee_payer.key(); @@ -1202,7 +1196,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Qualified const fn pub fn d9_qualified_const_fn<'info>( - ctx: Context<'_, '_, '_, 'info, D9QualifiedConstFn<'info>>, + ctx: Context<'info, D9QualifiedConstFn<'info>>, _params: D9QualifiedConstFnParams, ) -> Result<()> { ctx.accounts.d9_qualified_const_fn_record.owner = ctx.accounts.fee_payer.key(); @@ -1211,7 +1205,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Fully qualified associated constant pub fn d9_fully_qualified_assoc<'info>( - ctx: Context<'_, '_, '_, 'info, D9FullyQualifiedAssoc<'info>>, + ctx: Context<'info, D9FullyQualifiedAssoc<'info>>, _params: D9FullyQualifiedAssocParams, ) -> Result<()> { ctx.accounts.d9_fully_qualified_assoc_record.owner = ctx.accounts.fee_payer.key(); @@ -1220,7 +1214,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Fully qualified trait associated constant pub fn d9_fully_qualified_trait<'info>( - ctx: Context<'_, '_, '_, 'info, D9FullyQualifiedTrait<'info>>, + ctx: Context<'info, D9FullyQualifiedTrait<'info>>, _params: D9FullyQualifiedTraitParams, ) -> Result<()> { ctx.accounts.d9_fully_qualified_trait_record.owner = ctx.accounts.fee_payer.key(); @@ -1229,7 +1223,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Fully qualified const fn with generic pub fn d9_fully_qualified_generic<'info>( - ctx: Context<'_, '_, '_, 'info, D9FullyQualifiedGeneric<'info>>, + ctx: Context<'info, D9FullyQualifiedGeneric<'info>>, _params: D9FullyQualifiedGenericParams, ) -> Result<()> { ctx.accounts.d9_fully_qualified_generic_record.owner = ctx.accounts.fee_payer.key(); @@ -1238,7 +1232,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Combined const patterns pub fn d9_const_combined<'info>( - ctx: Context<'_, '_, '_, 'info, D9ConstCombined<'info>>, + ctx: Context<'info, D9ConstCombined<'info>>, params: D9ConstCombinedParams, ) -> Result<()> { ctx.accounts.d9_const_combined_record.owner = params.owner; @@ -1251,7 +1245,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Standard params with single Pubkey field pub fn d9_instr_single_pubkey<'info>( - ctx: Context<'_, '_, '_, 'info, D9InstrSinglePubkey<'info>>, + ctx: Context<'info, D9InstrSinglePubkey<'info>>, params: D9SinglePubkeyParams, ) -> Result<()> { ctx.accounts.d9_instr_single_pubkey_record.owner = params.owner; @@ -1260,7 +1254,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Params with u64 field requiring to_le_bytes pub fn d9_instr_u64<'info>( - ctx: Context<'_, '_, '_, 'info, D9InstrU64<'info>>, + ctx: Context<'info, D9InstrU64<'info>>, _params: D9U64Params, ) -> Result<()> { ctx.accounts.d9_instr_u64_record.owner = ctx.accounts.fee_payer.key(); @@ -1269,7 +1263,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Multiple data fields in seeds (owner + amount) pub fn d9_instr_multi_field<'info>( - ctx: Context<'_, '_, '_, 'info, D9InstrMultiField<'info>>, + ctx: Context<'info, D9InstrMultiField<'info>>, params: D9MultiFieldParams, ) -> Result<()> { ctx.accounts.d9_instr_multi_field_record.owner = params.owner; @@ -1278,7 +1272,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Mixed params and ctx account in seeds pub fn d9_instr_mixed_ctx<'info>( - ctx: Context<'_, '_, '_, 'info, D9InstrMixedCtx<'info>>, + ctx: Context<'info, D9InstrMixedCtx<'info>>, params: D9MixedCtxParams, ) -> Result<()> { ctx.accounts.d9_instr_mixed_ctx_record.owner = params.data_key; @@ -1287,7 +1281,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Three data fields with different types pub fn d9_instr_triple<'info>( - ctx: Context<'_, '_, '_, 'info, D9InstrTriple<'info>>, + ctx: Context<'info, D9InstrTriple<'info>>, params: D9TripleParams, ) -> Result<()> { ctx.accounts.d9_instr_triple_record.owner = params.key_a; @@ -1296,7 +1290,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: to_be_bytes conversion (big endian) pub fn d9_instr_big_endian<'info>( - ctx: Context<'_, '_, '_, 'info, D9InstrBigEndian<'info>>, + ctx: Context<'info, D9InstrBigEndian<'info>>, _params: D9BigEndianParams, ) -> Result<()> { ctx.accounts.d9_instr_big_endian_record.owner = ctx.accounts.fee_payer.key(); @@ -1305,7 +1299,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Multiple u64 fields with to_le_bytes pub fn d9_instr_multi_u64<'info>( - ctx: Context<'_, '_, '_, 'info, D9InstrMultiU64<'info>>, + ctx: Context<'info, D9InstrMultiU64<'info>>, _params: D9MultiU64Params, ) -> Result<()> { ctx.accounts.d9_instr_multi_u64_record.owner = ctx.accounts.fee_payer.key(); @@ -1314,7 +1308,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Pubkey with as_ref chained pub fn d9_instr_chained_as_ref<'info>( - ctx: Context<'_, '_, '_, 'info, D9InstrChainedAsRef<'info>>, + ctx: Context<'info, D9InstrChainedAsRef<'info>>, params: D9ChainedAsRefParams, ) -> Result<()> { ctx.accounts.d9_instr_chained_as_ref_record.owner = params.key; @@ -1323,7 +1317,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Constant mixed with params pub fn d9_instr_const_mixed<'info>( - ctx: Context<'_, '_, '_, 'info, D9InstrConstMixed<'info>>, + ctx: Context<'info, D9InstrConstMixed<'info>>, params: D9ConstMixedParams, ) -> Result<()> { ctx.accounts.d9_instr_const_mixed_record.owner = params.owner; @@ -1332,7 +1326,7 @@ pub mod csdk_anchor_full_derived_test { /// D9: Complex mixed - literal + constant + ctx + params pub fn d9_instr_complex_mixed<'info>( - ctx: Context<'_, '_, '_, 'info, D9InstrComplexMixed<'info>>, + ctx: Context<'info, D9InstrComplexMixed<'info>>, params: D9ComplexMixedParams, ) -> Result<()> { ctx.accounts.d9_instr_complex_mixed_record.owner = params.data_owner; @@ -1345,7 +1339,7 @@ pub mod csdk_anchor_full_derived_test { /// D5: #[light_account(token)] attribute test pub fn d5_light_token<'info>( - ctx: Context<'_, '_, '_, 'info, D5LightToken<'info>>, + ctx: Context<'info, D5LightToken<'info>>, params: D5LightTokenParams, ) -> Result<()> { use light_account::CreateTokenAccountCpi; @@ -1375,7 +1369,7 @@ pub mod csdk_anchor_full_derived_test { /// D5: All markers combined (#[light_account(init)] + #[light_account(token)]) pub fn d5_all_markers<'info>( - ctx: Context<'_, '_, '_, 'info, D5AllMarkers<'info>>, + ctx: Context<'info, D5AllMarkers<'info>>, params: D5AllMarkersParams, ) -> Result<()> { use light_account::CreateTokenAccountCpi; @@ -1416,7 +1410,7 @@ pub mod csdk_anchor_full_derived_test { /// Also tests dynamic context name detection using "my_ctx" instead of "ctx". #[allow(unused_variables)] pub fn d10_single_vault<'info>( - my_ctx: Context<'_, '_, '_, 'info, D10SingleVault<'info>>, + my_ctx: Context<'info, D10SingleVault<'info>>, params: D10SingleVaultParams, ) -> Result<()> { // Token account creation is handled by the LightFinalize trait implementation @@ -1431,7 +1425,7 @@ pub mod csdk_anchor_full_derived_test { /// Also tests dynamic context name detection using "cx" instead of "ctx". #[allow(unused_variables)] pub fn d10_single_ata<'info>( - cx: Context<'_, '_, '_, 'info, D10SingleAta<'info>>, + cx: Context<'info, D10SingleAta<'info>>, params: D10SingleAtaParams, ) -> Result<()> { // ATA creation is handled by the LightFinalize trait implementation @@ -1444,7 +1438,7 @@ pub mod csdk_anchor_full_derived_test { /// Tests that the macro generates seed structs for decompression support while /// skipping the CPI call. User manually calls CreateTokenAtaCpi in handler. pub fn d10_single_ata_markonly<'info>( - ctx: Context<'_, '_, '_, 'info, D10SingleAtaMarkonly<'info>>, + ctx: Context<'info, D10SingleAtaMarkonly<'info>>, _params: D10SingleAtaMarkonlyParams, ) -> Result<()> { use light_account::CreateTokenAtaCpi; @@ -1473,7 +1467,7 @@ pub mod csdk_anchor_full_derived_test { /// D10: Non-idempotent ATA — strict creation, fails if ATA already exists. #[allow(unused_variables)] pub fn d10_single_ata_non_idempotent<'info>( - ctx: Context<'_, '_, '_, 'info, D10SingleAtaNonIdempotent<'info>>, + ctx: Context<'info, D10SingleAtaNonIdempotent<'info>>, params: D10SingleAtaNonIdempotentParams, ) -> Result<()> { Ok(()) @@ -1487,7 +1481,7 @@ pub mod csdk_anchor_full_derived_test { /// Tests `#[light_account(init, zero_copy)]` combined with token vault creation. /// Token vault creation is handled automatically by the `#[light_account(init, token, ...)]` macro. pub fn d11_zc_with_vault<'info>( - ctx: Context<'_, '_, '_, 'info, D11ZcWithVault<'info>>, + ctx: Context<'info, D11ZcWithVault<'info>>, params: D11ZcWithVaultParams, ) -> Result<()> { // Initialize zero-copy record @@ -1503,7 +1497,7 @@ pub mod csdk_anchor_full_derived_test { /// Tests `#[light_account(init, zero_copy)]` combined with ATA creation. /// ATA creation is handled automatically by the `#[light_account(init, associated_token, ...)]` macro. pub fn d11_zc_with_ata<'info>( - ctx: Context<'_, '_, '_, 'info, D11ZcWithAta<'info>>, + ctx: Context<'info, D11ZcWithAta<'info>>, params: D11ZcWithAtaParams, ) -> Result<()> { // Initialize zero-copy record @@ -1518,7 +1512,7 @@ pub mod csdk_anchor_full_derived_test { /// D11: Multiple zero-copy PDAs /// Tests `#[light_account(init, zero_copy)]` with multiple AccountLoader fields. pub fn d11_multiple_zc<'info>( - ctx: Context<'_, '_, '_, 'info, D11MultipleZc<'info>>, + ctx: Context<'info, D11MultipleZc<'info>>, params: D11MultipleZcParams, ) -> Result<()> { let mut record1 = ctx.accounts.zc_record_1.load_init()?; @@ -1535,7 +1529,7 @@ pub mod csdk_anchor_full_derived_test { /// D11: Mixed zero-copy and Borsh accounts /// Tests `#[light_account(init, zero_copy)]` alongside regular `#[light_account(init)]`. pub fn d11_mixed_zc_borsh<'info>( - ctx: Context<'_, '_, '_, 'info, D11MixedZcBorsh<'info>>, + ctx: Context<'info, D11MixedZcBorsh<'info>>, params: D11MixedZcBorshParams, ) -> Result<()> { // Initialize zero-copy account @@ -1553,7 +1547,7 @@ pub mod csdk_anchor_full_derived_test { /// D11: Zero-copy with ctx.accounts.* seeds /// Tests `#[light_account(init, zero_copy)]` with context account seeds. pub fn d11_zc_with_ctx_seeds<'info>( - ctx: Context<'_, '_, '_, 'info, D11ZcWithCtxSeeds<'info>>, + ctx: Context<'info, D11ZcWithCtxSeeds<'info>>, params: D11ZcWithCtxSeedsParams, ) -> Result<()> { let mut record = ctx.accounts.zc_ctx_record.load_init()?; @@ -1567,7 +1561,7 @@ pub mod csdk_anchor_full_derived_test { /// D11: Zero-copy with params-only seeds /// Tests `#[light_account(init, zero_copy)]` with params seeds not on struct. pub fn d11_zc_with_params_seeds<'info>( - ctx: Context<'_, '_, '_, 'info, D11ZcWithParamsSeeds<'info>>, + ctx: Context<'info, D11ZcWithParamsSeeds<'info>>, params: D11ZcWithParamsSeedsParams, ) -> Result<()> { let mut record = ctx.accounts.zc_params_record.load_init()?; @@ -1581,7 +1575,7 @@ pub mod csdk_anchor_full_derived_test { /// Tests `#[light_account(init, zero_copy)]` combined with vault and token minting. /// Token vault creation is handled automatically by the `#[light_account(init, token, ...)]` macro. pub fn d11_zc_with_mint_to<'info>( - ctx: Context<'_, '_, '_, 'info, D11ZcWithMintTo<'info>>, + ctx: Context<'info, D11ZcWithMintTo<'info>>, params: D11ZcWithMintToParams, ) -> Result<()> { use light_token::instruction::MintToCpi; diff --git a/sdk-tests/csdk-anchor-full-derived-test/src/processors/create_single_record.rs b/sdk-tests/csdk-anchor-full-derived-test/src/processors/create_single_record.rs index b727ccef0d..3a211502d6 100644 --- a/sdk-tests/csdk-anchor-full-derived-test/src/processors/create_single_record.rs +++ b/sdk-tests/csdk-anchor-full-derived-test/src/processors/create_single_record.rs @@ -7,7 +7,7 @@ use crate::d5_markers::{D5RentfreeBare, D5RentfreeBareParams}; /// Process the create_single_record instruction. /// Called by the instruction handler in the program module. pub fn process_create_single_record( - ctx: Context<'_, '_, '_, '_, D5RentfreeBare<'_>>, + ctx: Context<'_, D5RentfreeBare<'_>>, params: D5RentfreeBareParams, ) -> Result<()> { let record = &mut ctx.accounts.d5_bare_record; diff --git a/sdk-tests/csdk-anchor-full-derived-test/tests/amm_stress_test.rs b/sdk-tests/csdk-anchor-full-derived-test/tests/amm_stress_test.rs index 1bd04c0cbc..fa0472245c 100644 --- a/sdk-tests/csdk-anchor-full-derived-test/tests/amm_stress_test.rs +++ b/sdk-tests/csdk-anchor-full-derived-test/tests/amm_stress_test.rs @@ -257,7 +257,7 @@ fn build_deposit_ix(ctx: &AmmTestContext, pdas: &AmmPdas, amount: u64) -> Instru lp_mint: pdas.lp_mint, token_program: LIGHT_TOKEN_PROGRAM_ID, token_program_2022: LIGHT_TOKEN_PROGRAM_ID, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; Instruction { program_id: ctx.program_id, @@ -284,7 +284,7 @@ fn build_withdraw_ix(ctx: &AmmTestContext, pdas: &AmmPdas, amount: u64) -> Instr lp_mint: pdas.lp_mint, token_program: LIGHT_TOKEN_PROGRAM_ID, token_program_2022: LIGHT_TOKEN_PROGRAM_ID, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; Instruction { program_id: ctx.program_id, @@ -392,7 +392,7 @@ async fn initialize_pool(ctx: &mut AmmTestContext, pdas: &AmmPdas) { token_0_program: LIGHT_TOKEN_PROGRAM_ID, token_1_program: LIGHT_TOKEN_PROGRAM_ID, associated_token_program: LIGHT_TOKEN_PROGRAM_ID, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, rent: solana_sdk::sysvar::rent::ID, compression_config: ctx.config_pda, pda_rent_sponsor: csdk_anchor_full_derived_test::program_rent_sponsor(), diff --git a/sdk-tests/csdk-anchor-full-derived-test/tests/amm_test.rs b/sdk-tests/csdk-anchor-full-derived-test/tests/amm_test.rs index 050531f970..dd2e914f61 100644 --- a/sdk-tests/csdk-anchor-full-derived-test/tests/amm_test.rs +++ b/sdk-tests/csdk-anchor-full-derived-test/tests/amm_test.rs @@ -292,7 +292,7 @@ async fn test_amm_full_lifecycle() { token_0_program: LIGHT_TOKEN_PROGRAM_ID, token_1_program: LIGHT_TOKEN_PROGRAM_ID, associated_token_program: LIGHT_TOKEN_PROGRAM_ID, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, rent: solana_sdk::sysvar::rent::ID, compression_config: ctx.config_pda, pda_rent_sponsor: csdk_anchor_full_derived_test::program_rent_sponsor(), @@ -478,7 +478,7 @@ async fn test_amm_full_lifecycle() { lp_mint: pdas.lp_mint, token_program: LIGHT_TOKEN_PROGRAM_ID, token_program_2022: LIGHT_TOKEN_PROGRAM_ID, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let deposit_instruction_data = csdk_anchor_full_derived_test::instruction::Deposit { @@ -532,7 +532,7 @@ async fn test_amm_full_lifecycle() { lp_mint: pdas.lp_mint, token_program: LIGHT_TOKEN_PROGRAM_ID, token_program_2022: LIGHT_TOKEN_PROGRAM_ID, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let withdraw_instruction_data = csdk_anchor_full_derived_test::instruction::Withdraw { diff --git a/sdk-tests/csdk-anchor-full-derived-test/tests/basic_test.rs b/sdk-tests/csdk-anchor-full-derived-test/tests/basic_test.rs index 747c75ce32..530c119049 100644 --- a/sdk-tests/csdk-anchor-full-derived-test/tests/basic_test.rs +++ b/sdk-tests/csdk-anchor-full-derived-test/tests/basic_test.rs @@ -163,7 +163,7 @@ async fn test_create_pdas_and_mint_auto() { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; // Simplified instruction data - just pass create_accounts_proof directly @@ -706,7 +706,7 @@ async fn test_create_two_mints() { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::CreateTwoMints { @@ -925,7 +925,7 @@ async fn test_create_multi_mints() { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::CreateThreeMints { @@ -1099,7 +1099,7 @@ async fn test_d9_instr_single_pubkey() { compression_config: config_pda, pda_rent_sponsor: rent_sponsor, d9_instr_single_pubkey_record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9InstrSinglePubkey { @@ -1153,7 +1153,7 @@ async fn test_d9_instr_u64() { compression_config: config_pda, pda_rent_sponsor: rent_sponsor, d9_instr_u64_record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9InstrU64 { @@ -1210,7 +1210,7 @@ async fn test_d9_instr_multi_field() { compression_config: config_pda, pda_rent_sponsor: rent_sponsor, d9_instr_multi_field_record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9InstrMultiField { @@ -1273,7 +1273,7 @@ async fn test_d9_instr_mixed_ctx() { compression_config: config_pda, pda_rent_sponsor: rent_sponsor, d9_instr_mixed_ctx_record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9InstrMixedCtx { @@ -1335,7 +1335,7 @@ async fn test_d9_instr_triple() { compression_config: config_pda, pda_rent_sponsor: rent_sponsor, d9_instr_triple_record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9InstrTriple { @@ -1391,7 +1391,7 @@ async fn test_d9_instr_big_endian() { compression_config: config_pda, pda_rent_sponsor: rent_sponsor, d9_instr_big_endian_record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9InstrBigEndian { @@ -1452,7 +1452,7 @@ async fn test_d9_instr_multi_u64() { compression_config: config_pda, pda_rent_sponsor: rent_sponsor, d9_instr_multi_u64_record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9InstrMultiU64 { @@ -1507,7 +1507,7 @@ async fn test_d9_instr_chained_as_ref() { compression_config: config_pda, pda_rent_sponsor: rent_sponsor, d9_instr_chained_as_ref_record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9InstrChainedAsRef { @@ -1563,7 +1563,7 @@ async fn test_d9_instr_const_mixed() { compression_config: config_pda, pda_rent_sponsor: rent_sponsor, d9_instr_const_mixed_record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9InstrConstMixed { @@ -1627,7 +1627,7 @@ async fn test_d9_instr_complex_mixed() { compression_config: config_pda, pda_rent_sponsor: rent_sponsor, d9_instr_complex_mixed_record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9InstrComplexMixed { diff --git a/sdk-tests/csdk-anchor-full-derived-test/tests/compressibility_check_test.rs b/sdk-tests/csdk-anchor-full-derived-test/tests/compressibility_check_test.rs index 9cfc2f336a..8b26eb7955 100644 --- a/sdk-tests/csdk-anchor-full-derived-test/tests/compressibility_check_test.rs +++ b/sdk-tests/csdk-anchor-full-derived-test/tests/compressibility_check_test.rs @@ -49,7 +49,7 @@ async fn create_funded_d9_pda( compression_config: *config_pda, pda_rent_sponsor: *rent_sponsor, d9_instr_single_pubkey_record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9InstrSinglePubkey { diff --git a/sdk-tests/csdk-anchor-full-derived-test/tests/d10_ata_idempotent_test.rs b/sdk-tests/csdk-anchor-full-derived-test/tests/d10_ata_idempotent_test.rs index 26fcf0d6d2..5ad41ea1cd 100644 --- a/sdk-tests/csdk-anchor-full-derived-test/tests/d10_ata_idempotent_test.rs +++ b/sdk-tests/csdk-anchor-full-derived-test/tests/d10_ata_idempotent_test.rs @@ -89,7 +89,7 @@ async fn test_d10_ata_non_idempotent_first_creation_succeeds() { light_token_config: LIGHT_TOKEN_CONFIG, light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D10SingleAtaNonIdempotent { @@ -134,7 +134,7 @@ async fn test_d10_ata_non_idempotent_second_creation_fails() { light_token_config: LIGHT_TOKEN_CONFIG, light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D10SingleAtaNonIdempotent { diff --git a/sdk-tests/csdk-anchor-full-derived-test/tests/d10_token_accounts_test.rs b/sdk-tests/csdk-anchor-full-derived-test/tests/d10_token_accounts_test.rs index 32b1e218e5..1f6d50ca7a 100644 --- a/sdk-tests/csdk-anchor-full-derived-test/tests/d10_token_accounts_test.rs +++ b/sdk-tests/csdk-anchor-full-derived-test/tests/d10_token_accounts_test.rs @@ -112,7 +112,7 @@ async fn test_d10_single_vault() { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D10SingleVault { @@ -201,7 +201,7 @@ async fn test_d10_single_ata() { light_token_config: LIGHT_TOKEN_CONFIG, light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D10SingleAta { @@ -284,7 +284,7 @@ async fn test_d10_single_ata_idempotent_creation() { light_token_config: LIGHT_TOKEN_CONFIG, light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D10SingleAta { @@ -329,7 +329,7 @@ async fn test_d10_single_ata_idempotent_creation() { light_token_config: LIGHT_TOKEN_CONFIG, light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data_2 = csdk_anchor_full_derived_test::instruction::D10SingleAta { @@ -399,7 +399,7 @@ async fn test_d10_single_ata_markonly() { light_token_config: LIGHT_TOKEN_CONFIG, light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D10SingleAtaMarkonly { @@ -463,7 +463,7 @@ async fn test_d10_single_ata_markonly_lifecycle() { light_token_config: LIGHT_TOKEN_CONFIG, light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D10SingleAtaMarkonly { diff --git a/sdk-tests/csdk-anchor-full-derived-test/tests/d11_zero_copy_test.rs b/sdk-tests/csdk-anchor-full-derived-test/tests/d11_zero_copy_test.rs index 7950bbee7a..a96b6d9c3e 100644 --- a/sdk-tests/csdk-anchor-full-derived-test/tests/d11_zero_copy_test.rs +++ b/sdk-tests/csdk-anchor-full-derived-test/tests/d11_zero_copy_test.rs @@ -173,7 +173,7 @@ async fn test_d11_zc_with_vault() { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D11ZcWithVault { @@ -346,7 +346,7 @@ async fn test_d11_zc_with_ata() { light_token_config: LIGHT_TOKEN_CONFIG, light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D11ZcWithAta { @@ -505,7 +505,7 @@ async fn test_d11_multiple_zc() { pda_rent_sponsor: csdk_anchor_full_derived_test::program_rent_sponsor(), zc_record_1: zc_pda_1, zc_record_2: zc_pda_2, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D11MultipleZc { @@ -713,7 +713,7 @@ async fn test_d11_mixed_zc_borsh() { pda_rent_sponsor: csdk_anchor_full_derived_test::program_rent_sponsor(), zc_mixed_record: zc_pda, borsh_record: borsh_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D11MixedZcBorsh { @@ -921,7 +921,7 @@ async fn test_d11_zc_with_ctx_seeds() { pda_rent_sponsor: csdk_anchor_full_derived_test::program_rent_sponsor(), authority: authority.pubkey(), zc_ctx_record: zc_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D11ZcWithCtxSeeds { @@ -1070,7 +1070,7 @@ async fn test_d11_zc_with_params_seeds() { compression_config: ctx.config_pda, pda_rent_sponsor: csdk_anchor_full_derived_test::program_rent_sponsor(), zc_params_record: zc_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D11ZcWithParamsSeeds { @@ -1223,7 +1223,7 @@ async fn test_d11_zc_with_mint_to() { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D11ZcWithMintTo { diff --git a/sdk-tests/csdk-anchor-full-derived-test/tests/failing_tests.rs b/sdk-tests/csdk-anchor-full-derived-test/tests/failing_tests.rs index d89a87e25c..fc7e1b77c5 100644 --- a/sdk-tests/csdk-anchor-full-derived-test/tests/failing_tests.rs +++ b/sdk-tests/csdk-anchor-full-derived-test/tests/failing_tests.rs @@ -127,7 +127,7 @@ impl FailingTestContext { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D11ZcWithVault { diff --git a/sdk-tests/csdk-anchor-full-derived-test/tests/integration_tests.rs b/sdk-tests/csdk-anchor-full-derived-test/tests/integration_tests.rs index 9b40b900e5..2ea066e506 100644 --- a/sdk-tests/csdk-anchor-full-derived-test/tests/integration_tests.rs +++ b/sdk-tests/csdk-anchor-full-derived-test/tests/integration_tests.rs @@ -362,7 +362,7 @@ async fn test_d6_account() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d6_account_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D6Account { @@ -424,7 +424,7 @@ async fn test_d6_boxed() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d6_boxed_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D6Boxed { @@ -490,7 +490,7 @@ async fn test_d8_pda_only() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d8_pda_only_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D8PdaOnly { @@ -565,7 +565,7 @@ async fn test_d8_multi_rentfree() { pda_rent_sponsor: program_rent_sponsor(), d8_multi_record1: pda1, d8_multi_record2: pda2, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D8MultiRentfree { @@ -697,7 +697,7 @@ async fn test_d8_all() { pda_rent_sponsor: program_rent_sponsor(), d8_all_single: pda_single, d8_all_multi: pda_multi, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D8All { @@ -852,7 +852,7 @@ async fn test_d9_literal() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_literal_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9Literal { @@ -910,7 +910,7 @@ async fn test_d9_constant() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_constant_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9Constant { @@ -971,7 +971,7 @@ async fn test_d9_ctx_account() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_ctx_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9CtxAccount { @@ -1036,7 +1036,7 @@ async fn test_d9_param() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_param_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9Param { @@ -1099,7 +1099,7 @@ async fn test_d9_param_bytes() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_param_bytes_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ParamBytes { @@ -1164,7 +1164,7 @@ async fn test_d9_mixed() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_mixed_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9Mixed { @@ -1235,7 +1235,7 @@ async fn test_d7_payer() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d7_payer_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D7Payer { @@ -1294,7 +1294,7 @@ async fn test_d7_creator() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d7_creator_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D7Creator { @@ -1359,7 +1359,7 @@ async fn test_d9_function_call() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_func_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9FunctionCall { @@ -1450,7 +1450,7 @@ async fn test_d9_all() { d9_all_param: pda_param, d9_all_bytes: pda_bytes, d9_all_func: pda_func, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9All { @@ -1584,7 +1584,7 @@ async fn test_d8_pda_only_full_lifecycle() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d8_pda_only_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D8PdaOnly { @@ -1701,7 +1701,7 @@ async fn test_d5_light_token() { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D5LightToken { @@ -1793,7 +1793,7 @@ async fn test_d5_all_markers() { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D5AllMarkers { @@ -1901,7 +1901,7 @@ async fn test_d7_light_token_config() { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D7LightTokenConfig { @@ -1995,7 +1995,7 @@ async fn test_d7_all_names() { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D7AllNames { @@ -2099,7 +2099,7 @@ async fn test_d9_qualified_bare() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_qualified_bare_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9QualifiedBare { @@ -2154,7 +2154,7 @@ async fn test_d9_qualified_self() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_qualified_self_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9QualifiedSelf { @@ -2209,7 +2209,7 @@ async fn test_d9_qualified_crate() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_qualified_crate_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9QualifiedCrate { @@ -2261,7 +2261,7 @@ async fn test_d9_qualified_deep() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_qualified_deep_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9QualifiedDeep { @@ -2320,7 +2320,7 @@ async fn test_d9_qualified_mixed() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_qualified_mixed_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9QualifiedMixed { @@ -2379,7 +2379,7 @@ async fn test_d9_method_as_ref() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_method_as_ref_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9MethodAsRef { @@ -2433,7 +2433,7 @@ async fn test_d9_method_as_bytes() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_method_as_bytes_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9MethodAsBytes { @@ -2488,7 +2488,7 @@ async fn test_d9_method_qualified_as_bytes() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_method_qualified_as_bytes_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9MethodQualifiedAsBytes { @@ -2542,7 +2542,7 @@ async fn test_d9_method_to_le_bytes() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_method_to_le_bytes_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9MethodToLeBytes { @@ -2597,7 +2597,7 @@ async fn test_d9_method_to_be_bytes() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_method_to_be_bytes_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9MethodToBeBytes { @@ -2661,7 +2661,7 @@ async fn test_d9_method_mixed() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_method_mixed_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9MethodMixed { @@ -2719,7 +2719,7 @@ async fn test_d9_bump_literal() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_bump_lit_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9BumpLiteral { @@ -2773,7 +2773,7 @@ async fn test_d9_bump_constant() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_bump_const_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9BumpConstant { @@ -2827,7 +2827,7 @@ async fn test_d9_bump_qualified() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_bump_qual_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9BumpQualified { @@ -2881,7 +2881,7 @@ async fn test_d9_bump_param() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_bump_param_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9BumpParam { @@ -2939,7 +2939,7 @@ async fn test_d9_bump_ctx() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_bump_ctx_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9BumpCtx { @@ -3003,7 +3003,7 @@ async fn test_d9_bump_mixed() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_bump_mixed_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9BumpMixed { @@ -3067,7 +3067,7 @@ async fn test_d9_complex_three() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_complex_three_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ComplexThree { @@ -3133,7 +3133,7 @@ async fn test_d9_complex_four() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_complex_four_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ComplexFour { @@ -3203,7 +3203,7 @@ async fn test_d9_complex_five() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_complex_five_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ComplexFive { @@ -3264,7 +3264,7 @@ async fn test_d9_complex_qualified_mix() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_complex_qualified_mix_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ComplexQualifiedMix { @@ -3326,7 +3326,7 @@ async fn test_d9_complex_func() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_complex_func_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ComplexFunc { @@ -3392,7 +3392,7 @@ async fn test_d9_complex_all_qualified() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_complex_all_qualified_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ComplexAllQualified { @@ -3449,7 +3449,7 @@ async fn test_d9_complex_program_id() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_complex_program_id_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ComplexProgramId { @@ -3506,7 +3506,7 @@ async fn test_d9_complex_id_func() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_complex_id_func_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ComplexIdFunc { @@ -3567,7 +3567,7 @@ async fn test_d9_edge_empty() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_edge_empty_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9EdgeEmpty { @@ -3622,7 +3622,7 @@ async fn test_d9_edge_single_byte() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_edge_single_byte_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9EdgeSingleByte { @@ -3674,7 +3674,7 @@ async fn test_d9_edge_single_letter() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_edge_single_letter_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9EdgeSingleLetter { @@ -3726,7 +3726,7 @@ async fn test_d9_edge_digits() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_edge_digits_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9EdgeDigits { @@ -3780,7 +3780,7 @@ async fn test_d9_edge_underscore() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_edge_underscore_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9EdgeUnderscore { @@ -3832,7 +3832,7 @@ async fn test_d9_edge_many_literals() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_edge_many_literals_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9EdgeManyLiterals { @@ -3891,7 +3891,7 @@ async fn test_d9_edge_mixed() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_edge_mixed_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9EdgeMixed { @@ -3956,7 +3956,7 @@ async fn test_d9_external_sdk_types() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_external_sdk_types_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ExternalSdkTypes { @@ -4017,7 +4017,7 @@ async fn test_d9_external_ctoken() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_external_ctoken_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ExternalCtoken { @@ -4078,7 +4078,7 @@ async fn test_d9_external_mixed() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_external_mixed_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ExternalMixed { @@ -4141,7 +4141,7 @@ async fn test_d9_external_with_local() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_external_with_local_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ExternalWithLocal { @@ -4198,7 +4198,7 @@ async fn test_d9_external_bump() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_external_bump_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ExternalBump { @@ -4253,7 +4253,7 @@ async fn test_d9_external_reexport() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_external_reexport_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ExternalReexport { @@ -4313,7 +4313,7 @@ async fn test_d9_nested_simple() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_nested_simple_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9NestedSimple { @@ -4371,7 +4371,7 @@ async fn test_d9_nested_double() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_nested_double_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9NestedDouble { @@ -4433,7 +4433,7 @@ async fn test_d9_nested_array_field() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_nested_array_field_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9NestedArrayField { @@ -4494,7 +4494,7 @@ async fn test_d9_array_index() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_array_index_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ArrayIndex { @@ -4552,7 +4552,7 @@ async fn test_d9_nested_bytes() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_nested_bytes_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9NestedBytes { @@ -4613,7 +4613,7 @@ async fn test_d9_nested_combined() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_nested_combined_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9NestedCombined { @@ -4673,7 +4673,7 @@ async fn test_d9_assoc_const() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_assoc_const_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9AssocConst { @@ -4728,7 +4728,7 @@ async fn test_d9_assoc_const_method() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_assoc_const_method_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9AssocConstMethod { @@ -4787,7 +4787,7 @@ async fn test_d9_multi_assoc_const() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_multi_assoc_const_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9MultiAssocConst { @@ -4840,7 +4840,7 @@ async fn test_d9_const_fn() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_const_fn_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ConstFn { @@ -4895,7 +4895,7 @@ async fn test_d9_const_fn_generic() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_const_fn_generic_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ConstFnGeneric { @@ -4951,7 +4951,7 @@ async fn test_d9_trait_assoc_const() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_trait_assoc_const_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9TraitAssocConst { @@ -5003,7 +5003,7 @@ async fn test_d9_static() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_static_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9Static { @@ -5057,7 +5057,7 @@ async fn test_d9_qualified_const_fn() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_qualified_const_fn_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9QualifiedConstFn { @@ -5111,7 +5111,7 @@ async fn test_d9_fully_qualified_assoc() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_fully_qualified_assoc_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9FullyQualifiedAssoc { @@ -5167,7 +5167,7 @@ async fn test_d9_fully_qualified_trait() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_fully_qualified_trait_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9FullyQualifiedTrait { @@ -5222,7 +5222,7 @@ async fn test_d9_fully_qualified_generic() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_fully_qualified_generic_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9FullyQualifiedGeneric { @@ -5281,7 +5281,7 @@ async fn test_d9_const_combined() { compression_config: ctx.config_pda, pda_rent_sponsor: program_rent_sponsor(), d9_const_combined_record: pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::D9ConstCombined { diff --git a/sdk-tests/csdk-anchor-full-derived-test/tests/mint/metadata_test.rs b/sdk-tests/csdk-anchor-full-derived-test/tests/mint/metadata_test.rs index bbedbd1998..495177a55f 100644 --- a/sdk-tests/csdk-anchor-full-derived-test/tests/mint/metadata_test.rs +++ b/sdk-tests/csdk-anchor-full-derived-test/tests/mint/metadata_test.rs @@ -82,7 +82,7 @@ async fn test_create_mint_with_metadata() { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = csdk_anchor_full_derived_test::instruction::CreateMintWithMetadata { diff --git a/sdk-tests/pinocchio-light-program-test/tests/stress_test.rs b/sdk-tests/pinocchio-light-program-test/tests/stress_test.rs index 42e41ece33..bbe582c16e 100644 --- a/sdk-tests/pinocchio-light-program-test/tests/stress_test.rs +++ b/sdk-tests/pinocchio-light-program-test/tests/stress_test.rs @@ -196,7 +196,7 @@ async fn setup() -> (StressTestContext, TestPdas) { AccountMeta::new(LIGHT_TOKEN_RENT_SPONSOR, false), AccountMeta::new_readonly(LIGHT_TOKEN_PROGRAM_ID.into(), false), AccountMeta::new_readonly(light_token_types::CPI_AUTHORITY_PDA.into(), false), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let instruction = Instruction { diff --git a/sdk-tests/pinocchio-light-program-test/tests/test_create_all.rs b/sdk-tests/pinocchio-light-program-test/tests/test_create_all.rs index adda67154c..683dd12461 100644 --- a/sdk-tests/pinocchio-light-program-test/tests/test_create_all.rs +++ b/sdk-tests/pinocchio-light-program-test/tests/test_create_all.rs @@ -115,7 +115,7 @@ async fn test_create_all_derive() { AccountMeta::new(LIGHT_TOKEN_RENT_SPONSOR, false), AccountMeta::new_readonly(LIGHT_TOKEN_PROGRAM_ID.into(), false), AccountMeta::new_readonly(light_token_types::CPI_AUTHORITY_PDA.into(), false), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let instruction = Instruction { diff --git a/sdk-tests/pinocchio-light-program-test/tests/test_create_ata.rs b/sdk-tests/pinocchio-light-program-test/tests/test_create_ata.rs index a646c05549..b6a287f842 100644 --- a/sdk-tests/pinocchio-light-program-test/tests/test_create_ata.rs +++ b/sdk-tests/pinocchio-light-program-test/tests/test_create_ata.rs @@ -37,7 +37,7 @@ async fn test_create_ata_derive() { AccountMeta::new_readonly(LIGHT_TOKEN_CONFIG, false), AccountMeta::new(LIGHT_TOKEN_RENT_SPONSOR, false), AccountMeta::new_readonly(LIGHT_TOKEN_PROGRAM_ID.into(), false), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let instruction = Instruction { diff --git a/sdk-tests/pinocchio-light-program-test/tests/test_create_mint.rs b/sdk-tests/pinocchio-light-program-test/tests/test_create_mint.rs index 20233200c4..d8992a844e 100644 --- a/sdk-tests/pinocchio-light-program-test/tests/test_create_mint.rs +++ b/sdk-tests/pinocchio-light-program-test/tests/test_create_mint.rs @@ -64,7 +64,7 @@ async fn test_create_mint_derive() { AccountMeta::new(LIGHT_TOKEN_RENT_SPONSOR, false), AccountMeta::new_readonly(LIGHT_TOKEN_PROGRAM_ID.into(), false), AccountMeta::new_readonly(light_token_types::CPI_AUTHORITY_PDA.into(), false), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let instruction = Instruction { diff --git a/sdk-tests/pinocchio-light-program-test/tests/test_create_multi_byte_records.rs b/sdk-tests/pinocchio-light-program-test/tests/test_create_multi_byte_records.rs index 890ff516e8..787bae7604 100644 --- a/sdk-tests/pinocchio-light-program-test/tests/test_create_multi_byte_records.rs +++ b/sdk-tests/pinocchio-light-program-test/tests/test_create_multi_byte_records.rs @@ -71,7 +71,7 @@ async fn test_create_compress_decompress_multi_byte_records() { AccountMeta::new(five_byte_pda, false), AccountMeta::new(six_byte_pda, false), AccountMeta::new(seven_byte_pda, false), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let instruction = Instruction { diff --git a/sdk-tests/pinocchio-light-program-test/tests/test_create_one_byte_record.rs b/sdk-tests/pinocchio-light-program-test/tests/test_create_one_byte_record.rs index 3f193f5a49..c423d04e0c 100644 --- a/sdk-tests/pinocchio-light-program-test/tests/test_create_one_byte_record.rs +++ b/sdk-tests/pinocchio-light-program-test/tests/test_create_one_byte_record.rs @@ -47,7 +47,7 @@ async fn test_create_compress_decompress_one_byte_record() { AccountMeta::new_readonly(env.config_pda, false), AccountMeta::new(env.rent_sponsor, false), AccountMeta::new(record_pda, false), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let instruction = Instruction { diff --git a/sdk-tests/pinocchio-light-program-test/tests/test_create_pda.rs b/sdk-tests/pinocchio-light-program-test/tests/test_create_pda.rs index a7982671b8..0db076070f 100644 --- a/sdk-tests/pinocchio-light-program-test/tests/test_create_pda.rs +++ b/sdk-tests/pinocchio-light-program-test/tests/test_create_pda.rs @@ -45,7 +45,7 @@ async fn test_create_single_pda_derive() { AccountMeta::new_readonly(env.config_pda, false), AccountMeta::new(env.rent_sponsor, false), AccountMeta::new(record_pda, false), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let instruction = Instruction { diff --git a/sdk-tests/pinocchio-light-program-test/tests/test_create_token_vault.rs b/sdk-tests/pinocchio-light-program-test/tests/test_create_token_vault.rs index c10a0c69d1..ff51311309 100644 --- a/sdk-tests/pinocchio-light-program-test/tests/test_create_token_vault.rs +++ b/sdk-tests/pinocchio-light-program-test/tests/test_create_token_vault.rs @@ -44,7 +44,7 @@ async fn test_create_token_vault_derive() { AccountMeta::new_readonly(LIGHT_TOKEN_CONFIG, false), AccountMeta::new(LIGHT_TOKEN_RENT_SPONSOR, false), AccountMeta::new_readonly(LIGHT_TOKEN_PROGRAM_ID.into(), false), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let instruction = Instruction { diff --git a/sdk-tests/pinocchio-light-program-test/tests/test_create_two_mints.rs b/sdk-tests/pinocchio-light-program-test/tests/test_create_two_mints.rs index ebb294fbd9..20f79cba90 100644 --- a/sdk-tests/pinocchio-light-program-test/tests/test_create_two_mints.rs +++ b/sdk-tests/pinocchio-light-program-test/tests/test_create_two_mints.rs @@ -78,7 +78,7 @@ async fn test_create_two_mints_derive() { AccountMeta::new(LIGHT_TOKEN_RENT_SPONSOR, false), AccountMeta::new_readonly(LIGHT_TOKEN_PROGRAM_ID.into(), false), AccountMeta::new_readonly(light_token_types::CPI_AUTHORITY_PDA.into(), false), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let instruction = Instruction { diff --git a/sdk-tests/pinocchio-light-program-test/tests/test_create_zero_copy_record.rs b/sdk-tests/pinocchio-light-program-test/tests/test_create_zero_copy_record.rs index 209c8ba025..b566b1a357 100644 --- a/sdk-tests/pinocchio-light-program-test/tests/test_create_zero_copy_record.rs +++ b/sdk-tests/pinocchio-light-program-test/tests/test_create_zero_copy_record.rs @@ -44,7 +44,7 @@ async fn test_create_zero_copy_record_derive() { AccountMeta::new_readonly(env.config_pda, false), AccountMeta::new(env.rent_sponsor, false), AccountMeta::new(record_pda, false), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let instruction = Instruction { diff --git a/sdk-tests/pinocchio-manual-test/tests/account_loader.rs b/sdk-tests/pinocchio-manual-test/tests/account_loader.rs index e9418a57df..3a477096ba 100644 --- a/sdk-tests/pinocchio-manual-test/tests/account_loader.rs +++ b/sdk-tests/pinocchio-manual-test/tests/account_loader.rs @@ -57,7 +57,7 @@ async fn test_zero_copy_create_compress_decompress() { AccountMeta::new(payer.pubkey(), true), AccountMeta::new_readonly(config_pda, false), AccountMeta::new(record_pda, false), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let ix = Instruction { diff --git a/sdk-tests/pinocchio-manual-test/tests/all.rs b/sdk-tests/pinocchio-manual-test/tests/all.rs index f49f1be613..a9970f3d69 100644 --- a/sdk-tests/pinocchio-manual-test/tests/all.rs +++ b/sdk-tests/pinocchio-manual-test/tests/all.rs @@ -107,7 +107,7 @@ async fn test_create_all() { Pubkey::new_from_array(light_token_types::CPI_AUTHORITY_PDA), false, ), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let ix = Instruction { diff --git a/sdk-tests/pinocchio-manual-test/tests/ata.rs b/sdk-tests/pinocchio-manual-test/tests/ata.rs index 4b2eb4b49c..223b3ade43 100644 --- a/sdk-tests/pinocchio-manual-test/tests/ata.rs +++ b/sdk-tests/pinocchio-manual-test/tests/ata.rs @@ -41,7 +41,7 @@ async fn test_create_ata() { AccountMeta::new_readonly(config_pda(), false), AccountMeta::new(rent_sponsor_pda(), false), AccountMeta::new_readonly(LIGHT_TOKEN_PROGRAM_ID, false), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let data = [ @@ -97,7 +97,7 @@ async fn test_create_ata_idempotent() { AccountMeta::new_readonly(config_pda(), false), AccountMeta::new(rent_sponsor_pda(), false), AccountMeta::new_readonly(LIGHT_TOKEN_PROGRAM_ID, false), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let data = [ diff --git a/sdk-tests/pinocchio-manual-test/tests/shared.rs b/sdk-tests/pinocchio-manual-test/tests/shared.rs index 6289b74524..f3052f0761 100644 --- a/sdk-tests/pinocchio-manual-test/tests/shared.rs +++ b/sdk-tests/pinocchio-manual-test/tests/shared.rs @@ -102,7 +102,7 @@ pub async fn create_test_mint(rpc: &mut LightProgramTest, payer: &Keypair) -> Pu Pubkey::new_from_array(light_token_types::CPI_AUTHORITY_PDA), false, ), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let ix = Instruction { diff --git a/sdk-tests/pinocchio-manual-test/tests/test.rs b/sdk-tests/pinocchio-manual-test/tests/test.rs index 8a977caaeb..5f46a3c771 100644 --- a/sdk-tests/pinocchio-manual-test/tests/test.rs +++ b/sdk-tests/pinocchio-manual-test/tests/test.rs @@ -53,7 +53,7 @@ async fn test_create_compress_decompress() { AccountMeta::new(payer.pubkey(), true), AccountMeta::new_readonly(config_pda, false), AccountMeta::new(record_pda, false), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let ix = Instruction { diff --git a/sdk-tests/pinocchio-manual-test/tests/token_account.rs b/sdk-tests/pinocchio-manual-test/tests/token_account.rs index cef70efd6b..837f23a7b6 100644 --- a/sdk-tests/pinocchio-manual-test/tests/token_account.rs +++ b/sdk-tests/pinocchio-manual-test/tests/token_account.rs @@ -40,7 +40,7 @@ async fn test_create_token_vault() { AccountMeta::new_readonly(config_pda(), false), AccountMeta::new(rent_sponsor_pda(), false), AccountMeta::new_readonly(LIGHT_TOKEN_PROGRAM_ID, false), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let ix = Instruction { diff --git a/sdk-tests/pinocchio-manual-test/tests/two_mints.rs b/sdk-tests/pinocchio-manual-test/tests/two_mints.rs index ffb9831932..73b3f80b72 100644 --- a/sdk-tests/pinocchio-manual-test/tests/two_mints.rs +++ b/sdk-tests/pinocchio-manual-test/tests/two_mints.rs @@ -73,7 +73,7 @@ async fn test_create_derived_mints() { Pubkey::new_from_array(light_token_types::CPI_AUTHORITY_PDA), false, ), - AccountMeta::new_readonly(solana_sdk::system_program::ID, false), + AccountMeta::new_readonly(anchor_lang::solana_program::system_program::ID, false), ]; let ix = Instruction { diff --git a/sdk-tests/sdk-anchor-test/programs/sdk-anchor-test/Cargo.toml b/sdk-tests/sdk-anchor-test/programs/sdk-anchor-test/Cargo.toml index cffe36d40a..2ff5d09f3c 100644 --- a/sdk-tests/sdk-anchor-test/programs/sdk-anchor-test/Cargo.toml +++ b/sdk-tests/sdk-anchor-test/programs/sdk-anchor-test/Cargo.toml @@ -24,6 +24,7 @@ idl-build = ["anchor-lang/idl-build", "light-sdk/idl-build"] # Needs to be imported for LightHasher light-hasher = { workspace = true, features = ["solana", "poseidon", "sha256", "std"] } anchor-lang = { workspace = true } +borsh = { workspace = true } light-sdk = { workspace = true, features = ["anchor", "v2", "poseidon"] } light-sdk-types = { workspace = true } light-instruction-decoder = { workspace = true } diff --git a/sdk-tests/sdk-anchor-test/programs/sdk-anchor-test/src/lib.rs b/sdk-tests/sdk-anchor-test/programs/sdk-anchor-test/src/lib.rs index 52ffc64eba..200ead2300 100644 --- a/sdk-tests/sdk-anchor-test/programs/sdk-anchor-test/src/lib.rs +++ b/sdk-tests/sdk-anchor-test/programs/sdk-anchor-test/src/lib.rs @@ -34,7 +34,7 @@ pub mod sdk_anchor_test { use super::*; pub fn create_compressed_account<'info>( - ctx: Context<'_, '_, '_, 'info, WithNestedData<'info>>, + ctx: Context<'info, WithNestedData<'info>>, proof: ValidityProof, address_tree_info: PackedAddressTreeInfo, output_tree_index: u8, @@ -75,7 +75,7 @@ pub mod sdk_anchor_test { } pub fn update_compressed_account<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateNestedData<'info>>, + ctx: Context<'info, UpdateNestedData<'info>>, proof: ValidityProof, my_compressed_account: MyCompressedAccount, account_meta: CompressedAccountMeta, @@ -103,7 +103,7 @@ pub mod sdk_anchor_test { } pub fn close_compressed_account<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateNestedData<'info>>, + ctx: Context<'info, UpdateNestedData<'info>>, proof: ValidityProof, my_compressed_account: MyCompressedAccount, account_meta: CompressedAccountMeta, @@ -129,7 +129,7 @@ pub mod sdk_anchor_test { } pub fn reinit_closed_account<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateNestedData<'info>>, + ctx: Context<'info, UpdateNestedData<'info>>, proof: ValidityProof, account_meta: CompressedAccountMeta, ) -> Result<()> { @@ -151,7 +151,7 @@ pub mod sdk_anchor_test { } pub fn close_compressed_account_permanent<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateNestedData<'info>>, + ctx: Context<'info, UpdateNestedData<'info>>, proof: ValidityProof, account_meta: CompressedAccountMetaBurn, ) -> Result<()> { @@ -175,7 +175,7 @@ pub mod sdk_anchor_test { } pub fn without_compressed_account<'info>( - ctx: Context<'_, '_, '_, 'info, WithoutCompressedAccount<'info>>, + ctx: Context<'info, WithoutCompressedAccount<'info>>, name: String, ) -> Result<()> { ctx.accounts.my_regular_account.name = name; @@ -184,7 +184,7 @@ pub mod sdk_anchor_test { /// Create compressed account with Poseidon hashing pub fn create_compressed_account_poseidon<'info>( - ctx: Context<'_, '_, '_, 'info, WithNestedData<'info>>, + ctx: Context<'info, WithNestedData<'info>>, proof: ValidityProof, address_tree_info: PackedAddressTreeInfo, output_tree_index: u8, @@ -226,7 +226,7 @@ pub mod sdk_anchor_test { // V2 Instructions pub fn create_compressed_account_v2<'info>( - ctx: Context<'_, '_, '_, 'info, WithNestedData<'info>>, + ctx: Context<'info, WithNestedData<'info>>, proof: ValidityProof, address_tree_info: PackedAddressTreeInfo, output_tree_index: u8, @@ -272,7 +272,7 @@ pub mod sdk_anchor_test { } pub fn update_compressed_account_v2<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateNestedData<'info>>, + ctx: Context<'info, UpdateNestedData<'info>>, proof: ValidityProof, my_compressed_account: MyCompressedAccount, account_meta: CompressedAccountMeta, @@ -299,7 +299,7 @@ pub mod sdk_anchor_test { } pub fn close_compressed_account_v2<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateNestedData<'info>>, + ctx: Context<'info, UpdateNestedData<'info>>, proof: ValidityProof, my_compressed_account: MyCompressedAccount, account_meta: CompressedAccountMeta, @@ -325,7 +325,7 @@ pub mod sdk_anchor_test { /// Test read-only account with SHA256 hasher using LightSystemProgramCpi pub fn read_sha256_light_system_cpi<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateNestedData<'info>>, + ctx: Context<'info, UpdateNestedData<'info>>, proof: ValidityProof, my_compressed_account: MyCompressedAccount, account_meta: CompressedAccountMetaBurn, @@ -340,7 +340,7 @@ pub mod sdk_anchor_test { /// Test read-only account with Poseidon hasher using LightSystemProgramCpi pub fn read_poseidon_light_system_cpi<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateNestedData<'info>>, + ctx: Context<'info, UpdateNestedData<'info>>, proof: ValidityProof, my_compressed_account: MyCompressedAccount, account_meta: CompressedAccountMetaBurn, @@ -355,7 +355,7 @@ pub mod sdk_anchor_test { /// Test read-only account with SHA256 hasher using InstructionDataInvokeCpiWithReadOnly pub fn read_sha256_lowlevel<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateNestedData<'info>>, + ctx: Context<'info, UpdateNestedData<'info>>, proof: ValidityProof, my_compressed_account: MyCompressedAccount, account_meta: CompressedAccountMetaBurn, @@ -365,7 +365,7 @@ pub mod sdk_anchor_test { /// Test read-only account with Poseidon hasher using InstructionDataInvokeCpiWithReadOnly pub fn read_poseidon_lowlevel<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateNestedData<'info>>, + ctx: Context<'info, UpdateNestedData<'info>>, proof: ValidityProof, my_compressed_account: MyCompressedAccount, account_meta: CompressedAccountMetaBurn, diff --git a/sdk-tests/sdk-anchor-test/programs/sdk-anchor-test/src/read_only.rs b/sdk-tests/sdk-anchor-test/programs/sdk-anchor-test/src/read_only.rs index 6c6416550d..e48a5b5109 100644 --- a/sdk-tests/sdk-anchor-test/programs/sdk-anchor-test/src/read_only.rs +++ b/sdk-tests/sdk-anchor-test/programs/sdk-anchor-test/src/read_only.rs @@ -19,7 +19,7 @@ pub enum ReadOnlyError { /// Test read-only account validation with SHA256 hasher using LightSystemProgramCpi (v2) pub fn process_read_sha256_light_system_cpi<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateNestedData<'info>>, + ctx: Context<'info, UpdateNestedData<'info>>, proof: ValidityProof, my_compressed_account: MyCompressedAccount, account_meta: CompressedAccountMetaBurn, @@ -52,7 +52,7 @@ pub fn process_read_sha256_light_system_cpi<'info>( /// Test read-only account validation with Poseidon hasher using LightSystemProgramCpi (v2) pub fn process_read_poseidon_light_system_cpi<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateNestedData<'info>>, + ctx: Context<'info, UpdateNestedData<'info>>, proof: ValidityProof, my_compressed_account: MyCompressedAccount, account_meta: CompressedAccountMetaBurn, @@ -86,7 +86,7 @@ pub fn process_read_poseidon_light_system_cpi<'info>( /// Test read-only account with SHA256 hasher using InstructionDataInvokeCpiWithReadOnly (v2) pub fn process_read_sha256_lowlevel<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateNestedData<'info>>, + ctx: Context<'info, UpdateNestedData<'info>>, proof: ValidityProof, my_compressed_account: MyCompressedAccount, account_meta: CompressedAccountMetaBurn, @@ -119,7 +119,7 @@ pub fn process_read_sha256_lowlevel<'info>( /// Test read-only account with Poseidon hasher using InstructionDataInvokeCpiWithReadOnly (v2) pub fn process_read_poseidon_lowlevel<'info>( - ctx: Context<'_, '_, '_, 'info, UpdateNestedData<'info>>, + ctx: Context<'info, UpdateNestedData<'info>>, proof: ValidityProof, my_compressed_account: MyCompressedAccount, account_meta: CompressedAccountMetaBurn, diff --git a/sdk-tests/sdk-light-token-pinocchio/Cargo.toml b/sdk-tests/sdk-light-token-pinocchio/Cargo.toml index 1da8cbaef5..0683613159 100644 --- a/sdk-tests/sdk-light-token-pinocchio/Cargo.toml +++ b/sdk-tests/sdk-light-token-pinocchio/Cargo.toml @@ -24,11 +24,11 @@ light-macros = { workspace = true } pinocchio = { workspace = true } # Serialization -borsh = "0.10.4" +borsh = { workspace = true } # Optional test dependencies light-program-test = { workspace = true, optional = true } -solana-sdk = { version = "2.2", optional = true } +solana-sdk = { workspace = true, optional = true } [dev-dependencies] light-program-test = { workspace = true, features = ["devenv"] } @@ -42,10 +42,10 @@ light-token-types = { workspace = true } light-sdk = { workspace = true, features = ["v2"] } light-test-utils = { workspace = true, features = ["devenv"] } tokio = { version = "1.36.0", features = ["full"] } -solana-sdk = "2.2" +solana-sdk = { workspace = true } spl-token-2022 = { workspace = true } spl-pod = { workspace = true } -anchor-spl = "0.31.1" +anchor-spl = { workspace = true } [lints.rust.unexpected_cfgs] level = "allow" diff --git a/sdk-tests/sdk-light-token-pinocchio/tests/test_create_ata.rs b/sdk-tests/sdk-light-token-pinocchio/tests/test_create_ata.rs index 291d180ba6..95b21e9db6 100644 --- a/sdk-tests/sdk-light-token-pinocchio/tests/test_create_ata.rs +++ b/sdk-tests/sdk-light-token-pinocchio/tests/test_create_ata.rs @@ -70,7 +70,7 @@ async fn test_create_ata_invoke() { lamports_per_write: 1, }; // Discriminator 4 = CreateAtaInvoke - let instruction_data = [vec![4u8], create_ata_data.try_to_vec().unwrap()].concat(); + let instruction_data = [vec![4u8], borsh::to_vec(&create_ata_data).unwrap()].concat(); use light_token::instruction::{config_pda, rent_sponsor_pda}; let config = config_pda(); @@ -137,7 +137,7 @@ async fn test_create_ata_invoke_signed() { lamports_per_write: 1, }; // Discriminator 5 = CreateAtaInvokeSigned - let instruction_data = [vec![5u8], create_ata_data.try_to_vec().unwrap()].concat(); + let instruction_data = [vec![5u8], borsh::to_vec(&create_ata_data).unwrap()].concat(); use light_token::instruction::{config_pda, rent_sponsor_pda}; let config = config_pda(); @@ -193,7 +193,7 @@ async fn test_create_ata_invoke_with() { lamports_per_write: 1, }; // Discriminator 43 = CreateAtaInvokeWith - let instruction_data = [vec![43u8], create_ata_data.try_to_vec().unwrap()].concat(); + let instruction_data = [vec![43u8], borsh::to_vec(&create_ata_data).unwrap()].concat(); use light_token::instruction::{config_pda, rent_sponsor_pda}; let config = config_pda(); @@ -249,7 +249,7 @@ async fn test_create_ata_idempotent_invoke_with() { lamports_per_write: 1, }; // Discriminator 44 = CreateAtaIdempotentInvokeWith - let instruction_data = [vec![44u8], create_ata_data.try_to_vec().unwrap()].concat(); + let instruction_data = [vec![44u8], borsh::to_vec(&create_ata_data).unwrap()].concat(); use light_token::instruction::{config_pda, rent_sponsor_pda}; let config = config_pda(); diff --git a/sdk-tests/sdk-light-token-pinocchio/tests/test_create_mint.rs b/sdk-tests/sdk-light-token-pinocchio/tests/test_create_mint.rs index df4203d5dd..2ac10b1286 100644 --- a/sdk-tests/sdk-light-token-pinocchio/tests/test_create_mint.rs +++ b/sdk-tests/sdk-light-token-pinocchio/tests/test_create_mint.rs @@ -115,7 +115,7 @@ async fn test_create_compressed_mint() { rent_payment: 16, write_top_up: 766, }; - let instruction_data = [vec![0u8], create_mint_data.try_to_vec().unwrap()].concat(); + let instruction_data = [vec![0u8], borsh::to_vec(&create_mint_data).unwrap()].concat(); // Use CreateMint builder to get the correct account metas let create_mint_ix = CreateMint::new( @@ -209,7 +209,7 @@ async fn test_create_compressed_mint_invoke_signed() { write_top_up: 766, }; // Discriminator 12 = CreateCmintInvokeSigned - let instruction_data = [vec![12u8], create_mint_data.try_to_vec().unwrap()].concat(); + let instruction_data = [vec![12u8], borsh::to_vec(&create_mint_data).unwrap()].concat(); // Build accounts manually since SDK marks mint_signer as signer, but we need it as non-signer // for invoke_signed (the wrapper program signs via CPI) diff --git a/sdk-tests/sdk-light-token-pinocchio/tests/test_create_token_account.rs b/sdk-tests/sdk-light-token-pinocchio/tests/test_create_token_account.rs index 4f86edba8d..62ce40307c 100644 --- a/sdk-tests/sdk-light-token-pinocchio/tests/test_create_token_account.rs +++ b/sdk-tests/sdk-light-token-pinocchio/tests/test_create_token_account.rs @@ -71,7 +71,11 @@ async fn test_create_token_account_invoke() { lamports_per_write: 1, }; // Discriminator 2 = CreateTokenAccountInvoke - let instruction_data = [vec![2u8], create_token_account_data.try_to_vec().unwrap()].concat(); + let instruction_data = [ + vec![2u8], + borsh::to_vec(&create_token_account_data).unwrap(), + ] + .concat(); use light_token::instruction::{config_pda, rent_sponsor_pda}; let config = config_pda(); @@ -133,7 +137,11 @@ async fn test_create_token_account_invoke_signed() { lamports_per_write: 1, }; // Discriminator 3 = CreateTokenAccountInvokeSigned - let instruction_data = [vec![3u8], create_token_account_data.try_to_vec().unwrap()].concat(); + let instruction_data = [ + vec![3u8], + borsh::to_vec(&create_token_account_data).unwrap(), + ] + .concat(); use light_token::instruction::{config_pda, rent_sponsor_pda}; let config = config_pda(); @@ -189,7 +197,11 @@ async fn test_create_token_account_invoke_with() { lamports_per_write: 1, }; // Discriminator 41 = CreateTokenAccountInvokeWith - let instruction_data = [vec![41u8], create_token_account_data.try_to_vec().unwrap()].concat(); + let instruction_data = [ + vec![41u8], + borsh::to_vec(&create_token_account_data).unwrap(), + ] + .concat(); use light_token::instruction::{config_pda, rent_sponsor_pda}; let config = config_pda(); @@ -250,7 +262,11 @@ async fn test_create_token_account_invoke_signed_with() { lamports_per_write: 1, }; // Discriminator 42 = CreateTokenAccountInvokeSignedWith - let instruction_data = [vec![42u8], create_token_account_data.try_to_vec().unwrap()].concat(); + let instruction_data = [ + vec![42u8], + borsh::to_vec(&create_token_account_data).unwrap(), + ] + .concat(); use light_token::instruction::{config_pda, rent_sponsor_pda}; let config = config_pda(); diff --git a/sdk-tests/sdk-light-token-pinocchio/tests/test_ctoken_mint_to.rs b/sdk-tests/sdk-light-token-pinocchio/tests/test_ctoken_mint_to.rs index 89cee4790c..5fc38e11be 100644 --- a/sdk-tests/sdk-light-token-pinocchio/tests/test_ctoken_mint_to.rs +++ b/sdk-tests/sdk-light-token-pinocchio/tests/test_ctoken_mint_to.rs @@ -233,7 +233,7 @@ async fn test_ctoken_mint_to_invoke_signed() { }; // Discriminator 14 = CreateCmintWithPdaAuthority let wrapper_instruction_data = - [vec![14u8], create_mint_data.try_to_vec().unwrap()].concat(); + [vec![14u8], borsh::to_vec(&create_mint_data).unwrap()].concat(); // Account order matches process_create_mint_with_pda_authority (MintActionMetaConfig): // [0]: compressed_token_program diff --git a/sdk-tests/sdk-light-token-pinocchio/tests/test_transfer.rs b/sdk-tests/sdk-light-token-pinocchio/tests/test_transfer.rs index e2e1852721..6168ac04b3 100644 --- a/sdk-tests/sdk-light-token-pinocchio/tests/test_transfer.rs +++ b/sdk-tests/sdk-light-token-pinocchio/tests/test_transfer.rs @@ -43,7 +43,7 @@ async fn test_ctoken_transfer_invoke() { let transfer_data = TransferData { amount: 500 }; let instruction_data = [ vec![InstructionType::CTokenTransferInvoke as u8], - transfer_data.try_to_vec().unwrap(), + borsh::to_vec(&transfer_data).unwrap(), ] .concat(); @@ -104,7 +104,7 @@ async fn test_ctoken_transfer_invoke_signed() { let transfer_data = TransferData { amount: 300 }; let instruction_data = [ vec![InstructionType::CTokenTransferInvokeSigned as u8], - transfer_data.try_to_vec().unwrap(), + borsh::to_vec(&transfer_data).unwrap(), ] .concat(); @@ -168,7 +168,7 @@ async fn test_ctoken_transfer_invoke_with_separate_fee_payer() { let transfer_data = TransferData { amount: 400 }; let instruction_data = [ vec![InstructionType::CTokenTransferInvokeWithFeePayer as u8], - transfer_data.try_to_vec().unwrap(), + borsh::to_vec(&transfer_data).unwrap(), ] .concat(); diff --git a/sdk-tests/sdk-light-token-pinocchio/tests/test_transfer_interface.rs b/sdk-tests/sdk-light-token-pinocchio/tests/test_transfer_interface.rs index 4b28893457..f0697f299f 100644 --- a/sdk-tests/sdk-light-token-pinocchio/tests/test_transfer_interface.rs +++ b/sdk-tests/sdk-light-token-pinocchio/tests/test_transfer_interface.rs @@ -91,7 +91,7 @@ async fn test_transfer_interface_spl_to_ctoken_invoke() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 19 = TransferInterfaceInvoke - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), @@ -200,7 +200,7 @@ async fn test_transfer_interface_ctoken_to_spl_invoke() { spl_interface_pda_bump: Some(spl_interface_pda_bump), decimals: CREATE_MINT_HELPER_DECIMALS, }; - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), AccountMeta::new(temp_spl_keypair.pubkey(), false), @@ -229,7 +229,7 @@ async fn test_transfer_interface_ctoken_to_spl_invoke() { spl_interface_pda_bump: Some(spl_interface_pda_bump), decimals: CREATE_MINT_HELPER_DECIMALS, }; - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), @@ -345,7 +345,7 @@ async fn test_transfer_interface_ctoken_to_ctoken_invoke() { spl_interface_pda_bump: Some(spl_interface_pda_bump), decimals: CREATE_MINT_HELPER_DECIMALS, }; - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), AccountMeta::new(temp_spl_keypair.pubkey(), false), @@ -374,7 +374,7 @@ async fn test_transfer_interface_ctoken_to_ctoken_invoke() { spl_interface_pda_bump: None, // Not needed for Light Token->Light Token decimals: CREATE_MINT_HELPER_DECIMALS, }; - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); // For Light Token->Light Token, we need 8 accounts (mint required for TransferChecked) let wrapper_accounts = vec![ @@ -493,7 +493,7 @@ async fn test_transfer_interface_spl_to_ctoken_invoke_signed() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 20 = TransferInterfaceInvokeSigned - let wrapper_instruction_data = [vec![20u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![20u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), @@ -619,7 +619,7 @@ async fn test_transfer_interface_ctoken_to_spl_invoke_signed() { spl_interface_pda_bump: Some(spl_interface_pda_bump), decimals: CREATE_MINT_HELPER_DECIMALS, }; - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), AccountMeta::new(temp_spl_keypair.pubkey(), false), @@ -649,7 +649,7 @@ async fn test_transfer_interface_ctoken_to_spl_invoke_signed() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 20 = TransferInterfaceInvokeSigned - let wrapper_instruction_data = [vec![20u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![20u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), @@ -776,7 +776,7 @@ async fn test_transfer_interface_ctoken_to_ctoken_invoke_signed() { spl_interface_pda_bump: Some(spl_interface_pda_bump), decimals: CREATE_MINT_HELPER_DECIMALS, }; - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), AccountMeta::new(temp_spl_keypair.pubkey(), false), @@ -806,7 +806,7 @@ async fn test_transfer_interface_ctoken_to_ctoken_invoke_signed() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 20 = TransferInterfaceInvokeSigned - let wrapper_instruction_data = [vec![20u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![20u8], borsh::to_vec(&data).unwrap()].concat(); // For Light Token->Light Token, we need 8 accounts (mint required for TransferChecked) let wrapper_accounts = vec![ @@ -911,7 +911,7 @@ async fn test_transfer_interface_spl_to_spl_invoke() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 19 = TransferInterfaceInvoke - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), @@ -1030,7 +1030,7 @@ async fn test_transfer_interface_spl_to_spl_invoke_signed() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 20 = TransferInterfaceInvokeSigned - let wrapper_instruction_data = [vec![20u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![20u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), @@ -1142,7 +1142,7 @@ async fn test_transfer_interface_t22_to_t22_invoke() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 19 = TransferInterfaceInvoke - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), @@ -1266,7 +1266,7 @@ async fn test_transfer_interface_t22_to_t22_invoke_signed() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 20 = TransferInterfaceInvokeSigned - let wrapper_instruction_data = [vec![20u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![20u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), diff --git a/sdk-tests/sdk-light-token-pinocchio/tests/test_transfer_spl_ctoken.rs b/sdk-tests/sdk-light-token-pinocchio/tests/test_transfer_spl_ctoken.rs index 2197b6428c..876a40a06a 100644 --- a/sdk-tests/sdk-light-token-pinocchio/tests/test_transfer_spl_ctoken.rs +++ b/sdk-tests/sdk-light-token-pinocchio/tests/test_transfer_spl_ctoken.rs @@ -102,7 +102,7 @@ async fn test_spl_to_ctoken_invoke() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 15 = SplToCtokenInvoke - let wrapper_instruction_data = [vec![15u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![15u8], borsh::to_vec(&data).unwrap()].concat(); // Account order from handler: // - accounts[0]: compressed_token_program (for CPI) @@ -228,7 +228,7 @@ async fn test_ctoken_to_spl_invoke() { spl_interface_pda_bump, decimals: CREATE_MINT_HELPER_DECIMALS, }; - let wrapper_instruction_data = [vec![15u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![15u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), AccountMeta::new(temp_spl_account_keypair.pubkey(), false), @@ -267,7 +267,7 @@ async fn test_ctoken_to_spl_invoke() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 17 = CtokenToSplInvoke - let wrapper_instruction_data = [vec![17u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![17u8], borsh::to_vec(&data).unwrap()].concat(); // Account order from handler: // - accounts[0]: compressed_token_program (for CPI) @@ -402,7 +402,7 @@ async fn test_spl_to_ctoken_invoke_signed() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 16 = SplToCtokenInvokeSigned - let wrapper_instruction_data = [vec![16u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![16u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), @@ -540,7 +540,7 @@ async fn test_ctoken_to_spl_invoke_signed() { spl_interface_pda_bump, decimals: CREATE_MINT_HELPER_DECIMALS, }; - let wrapper_instruction_data = [vec![15u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![15u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), AccountMeta::new(temp_spl_account_keypair.pubkey(), false), @@ -579,7 +579,7 @@ async fn test_ctoken_to_spl_invoke_signed() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 18 = CtokenToSplInvokeSigned - let wrapper_instruction_data = [vec![18u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![18u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), diff --git a/sdk-tests/sdk-light-token-test/Cargo.toml b/sdk-tests/sdk-light-token-test/Cargo.toml index b7b77d08ed..9411a4f356 100644 --- a/sdk-tests/sdk-light-token-test/Cargo.toml +++ b/sdk-tests/sdk-light-token-test/Cargo.toml @@ -24,14 +24,14 @@ light-sdk = { workspace = true, features = ["v2"] } light-client = { workspace = true, optional = true } # Solana dependencies -solana-program = "2.2" +solana-program = { workspace = true } # Serialization -borsh = "0.10.4" +borsh = { workspace = true } # Optional test dependencies light-program-test = { workspace = true, optional = true } -solana-sdk = { version = "2.2", optional = true } +solana-sdk = { workspace = true, optional = true } [dev-dependencies] light-program-test = { workspace = true, features = ["devenv"] } @@ -41,10 +41,10 @@ light-compressed-account = { workspace = true } light-token-client = { workspace = true } light-test-utils = { workspace = true, features = ["devenv"] } tokio = { version = "1.36.0", features = ["full"] } -solana-sdk = "2.2" +solana-sdk = { workspace = true } spl-token-2022 = { workspace = true } spl-pod = { workspace = true } -anchor-spl = "0.31.1" +anchor-spl = { workspace = true } [lints.rust.unexpected_cfgs] level = "allow" diff --git a/sdk-tests/sdk-light-token-test/tests/test_create_ata.rs b/sdk-tests/sdk-light-token-test/tests/test_create_ata.rs index fa283be243..9aa1769775 100644 --- a/sdk-tests/sdk-light-token-test/tests/test_create_ata.rs +++ b/sdk-tests/sdk-light-token-test/tests/test_create_ata.rs @@ -42,7 +42,7 @@ async fn test_create_ata_invoke() { lamports_per_write: 1, }; // Discriminator 4 = CreateAtaInvoke - let instruction_data = [vec![4u8], create_ata_data.try_to_vec().unwrap()].concat(); + let instruction_data = [vec![4u8], borsh::to_vec(&create_ata_data).unwrap()].concat(); use light_token::instruction::{config_pda, rent_sponsor_pda}; let config = config_pda(); @@ -127,7 +127,7 @@ async fn test_create_ata_invoke_signed() { lamports_per_write: 1, }; // Discriminator 5 = CreateAtaInvokeSigned - let instruction_data = [vec![5u8], create_ata_data.try_to_vec().unwrap()].concat(); + let instruction_data = [vec![5u8], borsh::to_vec(&create_ata_data).unwrap()].concat(); use light_token::instruction::{config_pda, rent_sponsor_pda}; let config = config_pda(); diff --git a/sdk-tests/sdk-light-token-test/tests/test_create_mint.rs b/sdk-tests/sdk-light-token-test/tests/test_create_mint.rs index ea63f9b1d9..83b03f24b3 100644 --- a/sdk-tests/sdk-light-token-test/tests/test_create_mint.rs +++ b/sdk-tests/sdk-light-token-test/tests/test_create_mint.rs @@ -114,7 +114,7 @@ async fn test_create_compressed_mint() { rent_payment: 16, write_top_up: 766, }; - let instruction_data = [vec![0u8], create_mint_data.try_to_vec().unwrap()].concat(); + let instruction_data = [vec![0u8], borsh::to_vec(&create_mint_data).unwrap()].concat(); // Use CreateMint builder to get the correct account metas let create_mint_ix = CreateMint::new( @@ -208,7 +208,7 @@ async fn test_create_compressed_mint_invoke_signed() { write_top_up: 766, }; // Discriminator 12 = CreateCmintInvokeSigned - let instruction_data = [vec![12u8], create_mint_data.try_to_vec().unwrap()].concat(); + let instruction_data = [vec![12u8], borsh::to_vec(&create_mint_data).unwrap()].concat(); // Build accounts manually since SDK marks mint_signer as signer, but we need it as non-signer // for invoke_signed (the wrapper program signs via CPI) diff --git a/sdk-tests/sdk-light-token-test/tests/test_create_token_account.rs b/sdk-tests/sdk-light-token-test/tests/test_create_token_account.rs index c7d4e8344c..003a3b7662 100644 --- a/sdk-tests/sdk-light-token-test/tests/test_create_token_account.rs +++ b/sdk-tests/sdk-light-token-test/tests/test_create_token_account.rs @@ -41,7 +41,11 @@ async fn test_create_token_account_invoke() { pre_pay_num_epochs: 2, lamports_per_write: 1, }; - let instruction_data = [vec![2u8], create_token_account_data.try_to_vec().unwrap()].concat(); + let instruction_data = [ + vec![2u8], + borsh::to_vec(&create_token_account_data).unwrap(), + ] + .concat(); use light_token::instruction::{config_pda, rent_sponsor_pda}; let config = config_pda(); @@ -117,7 +121,11 @@ async fn test_create_token_account_invoke_signed() { lamports_per_write: 1, }; // Discriminator 3 = CreateTokenAccountInvokeSigned - let instruction_data = [vec![3u8], create_token_account_data.try_to_vec().unwrap()].concat(); + let instruction_data = [ + vec![3u8], + borsh::to_vec(&create_token_account_data).unwrap(), + ] + .concat(); use light_token::instruction::{config_pda, rent_sponsor_pda}; let config = config_pda(); diff --git a/sdk-tests/sdk-light-token-test/tests/test_ctoken_mint_to.rs b/sdk-tests/sdk-light-token-test/tests/test_ctoken_mint_to.rs index e17a131ff1..b3c329926b 100644 --- a/sdk-tests/sdk-light-token-test/tests/test_ctoken_mint_to.rs +++ b/sdk-tests/sdk-light-token-test/tests/test_ctoken_mint_to.rs @@ -147,7 +147,7 @@ async fn test_ctoken_mint_to_invoke_signed() { }; // Discriminator 14 = CreateCmintWithPdaAuthority let wrapper_instruction_data = - [vec![14u8], create_mint_data.try_to_vec().unwrap()].concat(); + [vec![14u8], borsh::to_vec(&create_mint_data).unwrap()].concat(); // Account order matches process_create_mint_with_pda_authority (MintActionMetaConfig): // [0]: compressed_token_program diff --git a/sdk-tests/sdk-light-token-test/tests/test_transfer.rs b/sdk-tests/sdk-light-token-test/tests/test_transfer.rs index f064166576..630bce7601 100644 --- a/sdk-tests/sdk-light-token-test/tests/test_transfer.rs +++ b/sdk-tests/sdk-light-token-test/tests/test_transfer.rs @@ -41,7 +41,7 @@ async fn test_ctoken_transfer_invoke() { let transfer_data = TransferData { amount: 500 }; let instruction_data = [ vec![InstructionType::CTokenTransferInvoke as u8], - transfer_data.try_to_vec().unwrap(), + borsh::to_vec(&transfer_data).unwrap(), ] .concat(); @@ -99,7 +99,7 @@ async fn test_ctoken_transfer_invoke_signed() { let transfer_data = TransferData { amount: 300 }; let instruction_data = [ vec![InstructionType::CTokenTransferInvokeSigned as u8], - transfer_data.try_to_vec().unwrap(), + borsh::to_vec(&transfer_data).unwrap(), ] .concat(); @@ -161,7 +161,7 @@ async fn test_ctoken_transfer_invoke_with_separate_fee_payer() { let transfer_data = TransferData { amount: 400 }; let instruction_data = [ vec![InstructionType::CTokenTransferInvokeWithFeePayer as u8], - transfer_data.try_to_vec().unwrap(), + borsh::to_vec(&transfer_data).unwrap(), ] .concat(); diff --git a/sdk-tests/sdk-light-token-test/tests/test_transfer_interface.rs b/sdk-tests/sdk-light-token-test/tests/test_transfer_interface.rs index 7eea5bcf02..b990178cb0 100644 --- a/sdk-tests/sdk-light-token-test/tests/test_transfer_interface.rs +++ b/sdk-tests/sdk-light-token-test/tests/test_transfer_interface.rs @@ -90,7 +90,7 @@ async fn test_transfer_interface_spl_to_ctoken_invoke() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 19 = TransferInterfaceInvoke - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), @@ -199,7 +199,7 @@ async fn test_transfer_interface_ctoken_to_spl_invoke() { spl_interface_pda_bump: Some(spl_interface_pda_bump), decimals: CREATE_MINT_HELPER_DECIMALS, }; - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), AccountMeta::new(temp_spl_keypair.pubkey(), false), @@ -228,7 +228,7 @@ async fn test_transfer_interface_ctoken_to_spl_invoke() { spl_interface_pda_bump: Some(spl_interface_pda_bump), decimals: CREATE_MINT_HELPER_DECIMALS, }; - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), @@ -344,7 +344,7 @@ async fn test_transfer_interface_ctoken_to_ctoken_invoke() { spl_interface_pda_bump: Some(spl_interface_pda_bump), decimals: CREATE_MINT_HELPER_DECIMALS, }; - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), AccountMeta::new(temp_spl_keypair.pubkey(), false), @@ -373,7 +373,7 @@ async fn test_transfer_interface_ctoken_to_ctoken_invoke() { spl_interface_pda_bump: None, // Not needed for Light Token->Light Token decimals: CREATE_MINT_HELPER_DECIMALS, }; - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); // For Light Token->Light Token, we need 8 accounts (mint required for TransferChecked) let wrapper_accounts = vec![ @@ -492,7 +492,7 @@ async fn test_transfer_interface_spl_to_ctoken_invoke_signed() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 20 = TransferInterfaceInvokeSigned - let wrapper_instruction_data = [vec![20u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![20u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), @@ -618,7 +618,7 @@ async fn test_transfer_interface_ctoken_to_spl_invoke_signed() { spl_interface_pda_bump: Some(spl_interface_pda_bump), decimals: CREATE_MINT_HELPER_DECIMALS, }; - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), AccountMeta::new(temp_spl_keypair.pubkey(), false), @@ -648,7 +648,7 @@ async fn test_transfer_interface_ctoken_to_spl_invoke_signed() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 20 = TransferInterfaceInvokeSigned - let wrapper_instruction_data = [vec![20u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![20u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), @@ -775,7 +775,7 @@ async fn test_transfer_interface_ctoken_to_ctoken_invoke_signed() { spl_interface_pda_bump: Some(spl_interface_pda_bump), decimals: CREATE_MINT_HELPER_DECIMALS, }; - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), AccountMeta::new(temp_spl_keypair.pubkey(), false), @@ -805,7 +805,7 @@ async fn test_transfer_interface_ctoken_to_ctoken_invoke_signed() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 20 = TransferInterfaceInvokeSigned - let wrapper_instruction_data = [vec![20u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![20u8], borsh::to_vec(&data).unwrap()].concat(); // For Light Token->Light Token, we need 8 accounts (mint required for TransferChecked) let wrapper_accounts = vec![ @@ -910,7 +910,7 @@ async fn test_transfer_interface_spl_to_spl_invoke() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 19 = TransferInterfaceInvoke - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), @@ -1029,7 +1029,7 @@ async fn test_transfer_interface_spl_to_spl_invoke_signed() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 20 = TransferInterfaceInvokeSigned - let wrapper_instruction_data = [vec![20u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![20u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), @@ -1141,7 +1141,7 @@ async fn test_transfer_interface_t22_to_t22_invoke() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 19 = TransferInterfaceInvoke - let wrapper_instruction_data = [vec![19u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![19u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), @@ -1265,7 +1265,7 @@ async fn test_transfer_interface_t22_to_t22_invoke_signed() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 20 = TransferInterfaceInvokeSigned - let wrapper_instruction_data = [vec![20u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![20u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), diff --git a/sdk-tests/sdk-light-token-test/tests/test_transfer_spl_ctoken.rs b/sdk-tests/sdk-light-token-test/tests/test_transfer_spl_ctoken.rs index e07f125e58..c682e681cc 100644 --- a/sdk-tests/sdk-light-token-test/tests/test_transfer_spl_ctoken.rs +++ b/sdk-tests/sdk-light-token-test/tests/test_transfer_spl_ctoken.rs @@ -101,7 +101,7 @@ async fn test_spl_to_ctoken_invoke() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 15 = SplToCtokenInvoke - let wrapper_instruction_data = [vec![15u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![15u8], borsh::to_vec(&data).unwrap()].concat(); // Account order from handler: // - accounts[0]: compressed_token_program (for CPI) @@ -227,7 +227,7 @@ async fn test_ctoken_to_spl_invoke() { spl_interface_pda_bump, decimals: CREATE_MINT_HELPER_DECIMALS, }; - let wrapper_instruction_data = [vec![15u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![15u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), AccountMeta::new(temp_spl_account_keypair.pubkey(), false), @@ -266,7 +266,7 @@ async fn test_ctoken_to_spl_invoke() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 17 = CtokenToSplInvoke - let wrapper_instruction_data = [vec![17u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![17u8], borsh::to_vec(&data).unwrap()].concat(); // Account order from handler: // - accounts[0]: compressed_token_program (for CPI) @@ -401,7 +401,7 @@ async fn test_spl_to_ctoken_invoke_signed() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 16 = SplToCtokenInvokeSigned - let wrapper_instruction_data = [vec![16u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![16u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), @@ -539,7 +539,7 @@ async fn test_ctoken_to_spl_invoke_signed() { spl_interface_pda_bump, decimals: CREATE_MINT_HELPER_DECIMALS, }; - let wrapper_instruction_data = [vec![15u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![15u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), AccountMeta::new(temp_spl_account_keypair.pubkey(), false), @@ -578,7 +578,7 @@ async fn test_ctoken_to_spl_invoke_signed() { decimals: CREATE_MINT_HELPER_DECIMALS, }; // Discriminator 18 = CtokenToSplInvokeSigned - let wrapper_instruction_data = [vec![18u8], data.try_to_vec().unwrap()].concat(); + let wrapper_instruction_data = [vec![18u8], borsh::to_vec(&data).unwrap()].concat(); let wrapper_accounts = vec![ AccountMeta::new_readonly(compressed_token_program_id, false), diff --git a/sdk-tests/sdk-native-test/tests/test.rs b/sdk-tests/sdk-native-test/tests/test.rs index 30d792487f..678c3ae114 100644 --- a/sdk-tests/sdk-native-test/tests/test.rs +++ b/sdk-tests/sdk-native-test/tests/test.rs @@ -114,7 +114,7 @@ pub async fn create_pda( system_accounts_offset: system_accounts_offset as u8, tree_accounts_offset: tree_accounts_offset as u8, }; - let inputs = instruction_data.try_to_vec().unwrap(); + let inputs = borsh::to_vec(&instruction_data).unwrap(); let instruction = Instruction { program_id: sdk_v1_native_test::ID, @@ -172,7 +172,7 @@ pub async fn update_pda( new_data: new_account_data, system_accounts_offset: system_accounts_offset as u8, }; - let inputs = instruction_data.try_to_vec().unwrap(); + let inputs = borsh::to_vec(&instruction_data).unwrap(); let instruction = Instruction { program_id: sdk_v1_native_test::ID, diff --git a/sdk-tests/sdk-pinocchio-v1-test/tests/test.rs b/sdk-tests/sdk-pinocchio-v1-test/tests/test.rs index 0ae7f5c029..76a6dcab2f 100644 --- a/sdk-tests/sdk-pinocchio-v1-test/tests/test.rs +++ b/sdk-tests/sdk-pinocchio-v1-test/tests/test.rs @@ -111,7 +111,7 @@ pub async fn create_pda( system_accounts_offset: system_accounts_offset as u8, tree_accounts_offset: tree_accounts_offset as u8, }; - let inputs = instruction_data.try_to_vec().unwrap(); + let inputs = borsh::to_vec(&instruction_data).unwrap(); let instruction = Instruction { program_id: Pubkey::new_from_array(sdk_pinocchio_v1_test::ID), @@ -183,7 +183,7 @@ pub async fn update_pda( new_data: new_account_data, system_accounts_offset: system_accounts_offset as u8, }; - let inputs = instruction_data.try_to_vec().unwrap(); + let inputs = borsh::to_vec(&instruction_data).unwrap(); let instruction = Instruction { program_id: Pubkey::new_from_array(sdk_pinocchio_v1_test::ID), diff --git a/sdk-tests/sdk-pinocchio-v2-test/tests/test.rs b/sdk-tests/sdk-pinocchio-v2-test/tests/test.rs index 59a0562c63..17024048f1 100644 --- a/sdk-tests/sdk-pinocchio-v2-test/tests/test.rs +++ b/sdk-tests/sdk-pinocchio-v2-test/tests/test.rs @@ -121,7 +121,7 @@ pub async fn create_pda( system_accounts_offset: system_accounts_offset as u8, tree_accounts_offset: tree_accounts_offset as u8, }; - let inputs = instruction_data.try_to_vec().unwrap(); + let inputs = borsh::to_vec(&instruction_data).unwrap(); let instruction = Instruction { program_id: Pubkey::new_from_array(sdk_pinocchio_v2_test::ID), @@ -193,7 +193,7 @@ pub async fn update_pda( new_data: new_account_data, system_accounts_offset: system_accounts_offset as u8, }; - let inputs = instruction_data.try_to_vec().unwrap(); + let inputs = borsh::to_vec(&instruction_data).unwrap(); let instruction = Instruction { program_id: Pubkey::new_from_array(sdk_pinocchio_v2_test::ID), diff --git a/sdk-tests/sdk-token-test/Cargo.toml b/sdk-tests/sdk-token-test/Cargo.toml index 8e1b63b6a1..9576f31235 100644 --- a/sdk-tests/sdk-token-test/Cargo.toml +++ b/sdk-tests/sdk-token-test/Cargo.toml @@ -56,7 +56,7 @@ light-test-utils = { workspace = true } tokio = { workspace = true } serial_test = { workspace = true } solana-sdk = { workspace = true } -anchor-spl = "0.31.1" +anchor-spl = { workspace = true } light-sdk = { workspace = true } light-compressed-account = { workspace = true, features = ["anchor"] } light-client = { workspace = true, features = ["devenv"] } diff --git a/sdk-tests/sdk-token-test/src/ctoken_pda/mint.rs b/sdk-tests/sdk-token-test/src/ctoken_pda/mint.rs index eeebefeba8..77331cd819 100644 --- a/sdk-tests/sdk-token-test/src/ctoken_pda/mint.rs +++ b/sdk-tests/sdk-token-test/src/ctoken_pda/mint.rs @@ -11,7 +11,7 @@ use super::CTokenPda; use crate::ChainedCtokenInstructionData; pub fn process_mint_action<'a, 'info>( - ctx: &Context<'_, '_, '_, 'info, CTokenPda<'info>>, + ctx: &Context<'info, CTokenPda<'info>>, input: &ChainedCtokenInstructionData, cpi_accounts: &CpiAccounts<'a, 'info>, ) -> Result<()> { diff --git a/sdk-tests/sdk-token-test/src/ctoken_pda/processor.rs b/sdk-tests/sdk-token-test/src/ctoken_pda/processor.rs index 9609f01858..5a40af810d 100644 --- a/sdk-tests/sdk-token-test/src/ctoken_pda/processor.rs +++ b/sdk-tests/sdk-token-test/src/ctoken_pda/processor.rs @@ -16,7 +16,7 @@ pub struct PdaCreationData { use light_sdk::cpi::v2::CpiAccounts; use light_sdk_types::cpi_accounts::CpiAccountsConfig; pub fn process_ctoken_pda<'info>( - ctx: Context<'_, '_, '_, 'info, CTokenPda<'info>>, + ctx: Context<'info, CTokenPda<'info>>, input: ChainedCtokenInstructionData, ) -> Result<()> { let config = CpiAccountsConfig { diff --git a/sdk-tests/sdk-token-test/src/lib.rs b/sdk-tests/sdk-token-test/src/lib.rs index e8203454cb..ad4c64dc21 100644 --- a/sdk-tests/sdk-token-test/src/lib.rs +++ b/sdk-tests/sdk-token-test/src/lib.rs @@ -82,7 +82,7 @@ pub mod sdk_token_test { use super::*; pub fn compress_tokens<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, output_tree_index: u8, recipient: Pubkey, mint: Pubkey, @@ -92,7 +92,7 @@ pub mod sdk_token_test { } pub fn create_ctoken_with_compress_to_pubkey<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, mint: Pubkey, token_account_pubkey: Pubkey, compressible_config: Pubkey, @@ -108,7 +108,7 @@ pub mod sdk_token_test { } pub fn compress_full_and_close<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, recipient_index: u8, mint_index: u8, source_index: u8, @@ -132,7 +132,7 @@ pub mod sdk_token_test { /// Decompress full balance from compressed accounts with CPI context /// This decompresses the entire balance to destination ctoken accounts pub fn decompress_full_cpi<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, indices: Vec< light_compressed_token_sdk::compressed_token::decompress_full::DecompressFullIndices, >, @@ -144,7 +144,7 @@ pub mod sdk_token_test { /// Decompress full balance from compressed accounts with CPI context /// This decompresses the entire balance to destination ctoken accounts pub fn decompress_full_cpi_with_cpi_context<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, indices: Vec< light_compressed_token_sdk::compressed_token::decompress_full::DecompressFullIndices, >, @@ -155,7 +155,7 @@ pub mod sdk_token_test { } pub fn transfer_tokens<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, validity_proof: ValidityProof, token_metas: Vec, output_tree_index: u8, @@ -173,7 +173,7 @@ pub mod sdk_token_test { } pub fn decompress_tokens<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, validity_proof: ValidityProof, token_data: Vec, output_tree_index: u8, @@ -183,7 +183,7 @@ pub mod sdk_token_test { } pub fn batch_compress_tokens<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, recipients: Vec, token_pool_index: u8, token_pool_bump: u8, @@ -192,7 +192,7 @@ pub mod sdk_token_test { } pub fn deposit<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, proof: LightValidityProof, address_tree_info: PackedAddressTreeInfo, output_tree_index: u8, @@ -261,7 +261,7 @@ pub mod sdk_token_test { } pub fn update_deposit<'info>( - ctx: Context<'_, '_, '_, 'info, GenericWithAuthority<'info>>, + ctx: Context<'info, GenericWithAuthority<'info>>, proof: LightValidityProof, output_tree_index: u8, output_tree_queue_index: u8, @@ -281,7 +281,7 @@ pub mod sdk_token_test { } pub fn four_invokes<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, output_tree_index: u8, proof: LightValidityProof, system_accounts_start_offset: u8, @@ -299,7 +299,7 @@ pub mod sdk_token_test { } pub fn four_transfer2<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, output_tree_index: u8, proof: LightValidityProof, system_accounts_start_offset: u8, @@ -319,7 +319,7 @@ pub mod sdk_token_test { } pub fn create_escrow_pda<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, proof: LightValidityProof, output_tree_index: u8, amount: u64, @@ -337,14 +337,14 @@ pub mod sdk_token_test { } pub fn pda_ctoken<'info>( - ctx: Context<'_, '_, '_, 'info, PdaCToken<'info>>, + ctx: Context<'info, PdaCToken<'info>>, input: ChainedCtokenInstructionData, ) -> Result<()> { process_pda_ctoken(ctx, input) } pub fn ctoken_pda<'info>( - ctx: Context<'_, '_, '_, 'info, CTokenPda<'info>>, + ctx: Context<'info, CTokenPda<'info>>, input: ChainedCtokenInstructionData, ) -> Result<()> { process_ctoken_pda(ctx, input) @@ -356,7 +356,7 @@ pub mod sdk_token_test { /// - N=1: Single CPI (create + decompress) /// - N>1: 2N-1 CPIs (N-1 writes + 1 execute with decompress + N-1 decompress) pub fn create_mints<'a, 'info>( - ctx: Context<'a, '_, 'info, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, params: CreateMintsParams, ) -> Result<()> { process_create_mints(ctx, params) diff --git a/sdk-tests/sdk-token-test/src/mint_compressed_tokens_cpi_write.rs b/sdk-tests/sdk-token-test/src/mint_compressed_tokens_cpi_write.rs index a560b11fa7..011f6732d5 100644 --- a/sdk-tests/sdk-token-test/src/mint_compressed_tokens_cpi_write.rs +++ b/sdk-tests/sdk-token-test/src/mint_compressed_tokens_cpi_write.rs @@ -20,7 +20,7 @@ pub struct MintCompressedTokensCpiWriteParams { /// Process minting compressed tokens to an existing mint using CPI write /// This sets up the CPI context for subsequent operations pub fn process_mint_compressed_tokens_cpi_write<'info>( - ctx: &Context<'_, '_, '_, '_, Generic<'info>>, + ctx: &Context<'_, Generic<'info>>, params: MintCompressedTokensCpiWriteParams, cpi_accounts: &Transfer2CpiAccounts<'_, AccountInfo<'info>>, ) -> Result<()> { diff --git a/sdk-tests/sdk-token-test/src/pda_ctoken/mint.rs b/sdk-tests/sdk-token-test/src/pda_ctoken/mint.rs index a5b7fa3ab9..5f74524b90 100644 --- a/sdk-tests/sdk-token-test/src/pda_ctoken/mint.rs +++ b/sdk-tests/sdk-token-test/src/pda_ctoken/mint.rs @@ -10,7 +10,7 @@ use light_token_interface::instructions::mint_action::{ use super::{processor::ChainedCtokenInstructionData, PdaCToken}; pub fn process_mint_action<'a, 'info>( - ctx: &Context<'_, '_, '_, 'info, PdaCToken<'info>>, + ctx: &Context<'info, PdaCToken<'info>>, input: &ChainedCtokenInstructionData, cpi_accounts: &CpiAccounts<'a, AccountInfo<'info>>, ) -> Result<()> { diff --git a/sdk-tests/sdk-token-test/src/pda_ctoken/processor.rs b/sdk-tests/sdk-token-test/src/pda_ctoken/processor.rs index 67d04f5b04..24e390e415 100644 --- a/sdk-tests/sdk-token-test/src/pda_ctoken/processor.rs +++ b/sdk-tests/sdk-token-test/src/pda_ctoken/processor.rs @@ -25,7 +25,7 @@ pub struct PdaCreationData { // TODO: create a second ix which switches the cpis. use light_sdk_types::cpi_accounts::{v2::CpiAccounts as CpiAccountsSmall, CpiAccountsConfig}; pub fn process_pda_ctoken<'info>( - ctx: Context<'_, '_, '_, 'info, PdaCToken<'info>>, + ctx: Context<'info, PdaCToken<'info>>, input: ChainedCtokenInstructionData, ) -> Result<()> { let config = CpiAccountsConfig { diff --git a/sdk-tests/sdk-token-test/src/process_batch_compress_tokens.rs b/sdk-tests/sdk-token-test/src/process_batch_compress_tokens.rs index 33a27d0c38..faf6b7f306 100644 --- a/sdk-tests/sdk-token-test/src/process_batch_compress_tokens.rs +++ b/sdk-tests/sdk-token-test/src/process_batch_compress_tokens.rs @@ -7,7 +7,7 @@ use light_token_types::account_infos::BatchCompressAccountInfos; use crate::Generic; pub fn process_batch_compress_tokens<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, recipients: Vec, token_pool_index: u8, token_pool_bump: u8, diff --git a/sdk-tests/sdk-token-test/src/process_compress_full_and_close.rs b/sdk-tests/sdk-token-test/src/process_compress_full_and_close.rs index 262a3782dd..e887d0e455 100644 --- a/sdk-tests/sdk-token-test/src/process_compress_full_and_close.rs +++ b/sdk-tests/sdk-token-test/src/process_compress_full_and_close.rs @@ -11,7 +11,7 @@ use light_token::instruction::CloseAccount; use crate::Generic; pub fn process_compress_full_and_close<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, // All offsets are static and could be hardcoded recipient_index: u8, mint_index: u8, diff --git a/sdk-tests/sdk-token-test/src/process_compress_tokens.rs b/sdk-tests/sdk-token-test/src/process_compress_tokens.rs index 996d4a2fca..730a92b253 100644 --- a/sdk-tests/sdk-token-test/src/process_compress_tokens.rs +++ b/sdk-tests/sdk-token-test/src/process_compress_tokens.rs @@ -7,7 +7,7 @@ use light_compressed_token_sdk::compressed_token::transfer::{ use crate::Generic; pub fn process_compress_tokens<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, output_tree_index: u8, recipient: Pubkey, mint: Pubkey, diff --git a/sdk-tests/sdk-token-test/src/process_create_compressed_account.rs b/sdk-tests/sdk-token-test/src/process_create_compressed_account.rs index 71d1ddd8ff..f1569ca155 100644 --- a/sdk-tests/sdk-token-test/src/process_create_compressed_account.rs +++ b/sdk-tests/sdk-token-test/src/process_create_compressed_account.rs @@ -1,4 +1,4 @@ -use anchor_lang::{prelude::*, solana_program::log::sol_log_compute_units}; +use anchor_lang::prelude::{msg, *}; use light_compressed_account::instruction_data::cpi_context::CompressedCpiContext; use light_compressed_token_sdk::compressed_token::{ transfer::instruction::{TransferConfig, TransferInputs}, @@ -38,12 +38,12 @@ pub fn process_create_compressed_account<'a, 'info>( my_compressed_account.owner = *cpi_accounts.fee_payer().key; msg!("invoke"); - sol_log_compute_units(); + msg!("CU"); LightSystemProgramCpi::new_cpi(crate::LIGHT_CPI_SIGNER, proof) .with_light_account(my_compressed_account)? .with_new_addresses(&[new_address_params]) .invoke(cpi_accounts)?; - sol_log_compute_units(); + msg!("CU"); Ok(()) } @@ -103,10 +103,10 @@ pub fn deposit_tokens<'a, 'info>( // msg!("instruction {:?}", instruction); // We can use the property that account infos don't have to be in order if you use // solana program invoke. - sol_log_compute_units(); + msg!("CU"); msg!("create_account_infos"); - sol_log_compute_units(); + msg!("CU"); // TODO: initialize from CpiAccounts, use with_compressed_pda() offchain. // let account_infos: TransferAccountInfos<'_, 'info, MAX_ACCOUNT_INFOS> = TransferAccountInfos { // fee_payer: cpi_accounts.fee_payer(), @@ -124,13 +124,13 @@ pub fn deposit_tokens<'a, 'info>( &remaining_accounts[..len], ] .concat(); - sol_log_compute_units(); + msg!("CU"); - sol_log_compute_units(); + msg!("CU"); msg!("invoke"); - sol_log_compute_units(); + msg!("CU"); anchor_lang::solana_program::program::invoke(&instruction, account_infos.as_slice())?; - sol_log_compute_units(); + msg!("CU"); Ok(()) } diff --git a/sdk-tests/sdk-token-test/src/process_create_ctoken_with_compress_to_pubkey.rs b/sdk-tests/sdk-token-test/src/process_create_ctoken_with_compress_to_pubkey.rs index 865e9f0516..c775aaa1ba 100644 --- a/sdk-tests/sdk-token-test/src/process_create_ctoken_with_compress_to_pubkey.rs +++ b/sdk-tests/sdk-token-test/src/process_create_ctoken_with_compress_to_pubkey.rs @@ -5,7 +5,7 @@ use light_token_interface::instructions::extensions::CompressToPubkey; use crate::Generic; pub fn process_create_ctoken_with_compress_to_pubkey<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, mint: Pubkey, token_account_pubkey: Pubkey, compressible_config: Pubkey, diff --git a/sdk-tests/sdk-token-test/src/process_create_escrow_pda.rs b/sdk-tests/sdk-token-test/src/process_create_escrow_pda.rs index cc506c746d..c6ea6e5870 100644 --- a/sdk-tests/sdk-token-test/src/process_create_escrow_pda.rs +++ b/sdk-tests/sdk-token-test/src/process_create_escrow_pda.rs @@ -9,7 +9,7 @@ use light_sdk_types::cpi_accounts::v2::CpiAccounts; use crate::process_update_deposit::CompressedEscrowPda; pub fn process_create_escrow_pda<'info>( - ctx: Context<'_, '_, '_, 'info, crate::Generic<'info>>, + ctx: Context<'info, crate::Generic<'info>>, proof: LightValidityProof, output_tree_index: u8, amount: u64, diff --git a/sdk-tests/sdk-token-test/src/process_create_two_mints.rs b/sdk-tests/sdk-token-test/src/process_create_two_mints.rs index a29c7e0d8c..21f72a2e49 100644 --- a/sdk-tests/sdk-token-test/src/process_create_two_mints.rs +++ b/sdk-tests/sdk-token-test/src/process_create_two_mints.rs @@ -47,7 +47,7 @@ impl CreateMintsParams { /// Anchor instruction wrapper for create_mints. pub fn process_create_mints<'a, 'info>( - ctx: Context<'a, '_, 'info, 'info, crate::Generic<'info>>, + ctx: Context<'info, crate::Generic<'info>>, params: CreateMintsParams, ) -> Result<()> { // Convert anchor types to SDK types diff --git a/sdk-tests/sdk-token-test/src/process_decompress_full_cpi_context.rs b/sdk-tests/sdk-token-test/src/process_decompress_full_cpi_context.rs index abb8aec1cd..66662f90bb 100644 --- a/sdk-tests/sdk-token-test/src/process_decompress_full_cpi_context.rs +++ b/sdk-tests/sdk-token-test/src/process_decompress_full_cpi_context.rs @@ -14,7 +14,7 @@ use crate::{ /// Process decompress_full operation using the new DecompressFull mode with manual indices /// This decompresses the full balance of compressed tokens to decompressed ctoken accounts pub fn process_decompress_full_cpi_context<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, indices: Vec, validity_proof: light_token::ValidityProof, params: Option, diff --git a/sdk-tests/sdk-token-test/src/process_decompress_tokens.rs b/sdk-tests/sdk-token-test/src/process_decompress_tokens.rs index 713020604a..f751dbae75 100644 --- a/sdk-tests/sdk-token-test/src/process_decompress_tokens.rs +++ b/sdk-tests/sdk-token-test/src/process_decompress_tokens.rs @@ -11,7 +11,7 @@ use light_token::ValidityProof; use crate::Generic; pub fn process_decompress_tokens<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, validity_proof: ValidityProof, token_data: Vec, output_tree_index: u8, diff --git a/sdk-tests/sdk-token-test/src/process_four_invokes.rs b/sdk-tests/sdk-token-test/src/process_four_invokes.rs index bea2152dd4..d86e5f8cc4 100644 --- a/sdk-tests/sdk-token-test/src/process_four_invokes.rs +++ b/sdk-tests/sdk-token-test/src/process_four_invokes.rs @@ -38,7 +38,7 @@ pub struct FourInvokesParams { } pub fn process_four_invokes<'info>( - ctx: Context<'_, '_, '_, 'info, crate::Generic<'info>>, + ctx: Context<'info, crate::Generic<'info>>, output_tree_index: u8, proof: LightValidityProof, system_accounts_start_offset: u8, diff --git a/sdk-tests/sdk-token-test/src/process_four_transfer2.rs b/sdk-tests/sdk-token-test/src/process_four_transfer2.rs index ac799e4f85..69b37c173d 100644 --- a/sdk-tests/sdk-token-test/src/process_four_transfer2.rs +++ b/sdk-tests/sdk-token-test/src/process_four_transfer2.rs @@ -43,7 +43,7 @@ pub struct FourTransfer2Params { } pub fn process_four_transfer2<'info>( - ctx: Context<'_, '_, '_, 'info, crate::Generic<'info>>, + ctx: Context<'info, crate::Generic<'info>>, output_tree_index: u8, proof: ValidityProof, system_accounts_start_offset: u8, diff --git a/sdk-tests/sdk-token-test/src/process_transfer_tokens.rs b/sdk-tests/sdk-token-test/src/process_transfer_tokens.rs index b1da90182f..d3017d713f 100644 --- a/sdk-tests/sdk-token-test/src/process_transfer_tokens.rs +++ b/sdk-tests/sdk-token-test/src/process_transfer_tokens.rs @@ -11,7 +11,7 @@ use light_token::ValidityProof; use crate::Generic; pub fn process_transfer_tokens<'info>( - ctx: Context<'_, '_, '_, 'info, Generic<'info>>, + ctx: Context<'info, Generic<'info>>, validity_proof: ValidityProof, token_metas: Vec, output_tree_index: u8, diff --git a/sdk-tests/sdk-token-test/src/process_update_deposit.rs b/sdk-tests/sdk-token-test/src/process_update_deposit.rs index 72ccdc1dea..78c5a504a5 100644 --- a/sdk-tests/sdk-token-test/src/process_update_deposit.rs +++ b/sdk-tests/sdk-token-test/src/process_update_deposit.rs @@ -215,7 +215,7 @@ pub fn transfer_tokens_to_escrow_pda<'a, 'info>( } pub fn process_update_deposit<'info>( - ctx: Context<'_, '_, '_, 'info, crate::GenericWithAuthority<'info>>, + ctx: Context<'info, crate::GenericWithAuthority<'info>>, output_tree_index: u8, output_tree_queue_index: u8, proof: ValidityProof, diff --git a/sdk-tests/sdk-token-test/tests/ctoken_pda.rs b/sdk-tests/sdk-token-test/tests/ctoken_pda.rs index 8e2b595285..1559017c3c 100644 --- a/sdk-tests/sdk-token-test/tests/ctoken_pda.rs +++ b/sdk-tests/sdk-token-test/tests/ctoken_pda.rs @@ -201,7 +201,7 @@ pub async fn create_mint( light_token_program: Pubkey::new_from_array(LIGHT_TOKEN_PROGRAM_ID), light_token_cpi_authority: Pubkey::new_from_array(CPI_AUTHORITY_PDA), rent_sponsor: rent_sponsor_pda(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let pda_new_address_params = light_sdk::address::NewAddressParamsAssignedPacked { diff --git a/sdk-tests/sdk-token-test/tests/test_compress_to_pubkey.rs b/sdk-tests/sdk-token-test/tests/test_compress_to_pubkey.rs index 4a3b8ccb4a..5786a70b03 100644 --- a/sdk-tests/sdk-token-test/tests/test_compress_to_pubkey.rs +++ b/sdk-tests/sdk-token-test/tests/test_compress_to_pubkey.rs @@ -48,7 +48,7 @@ async fn test_compress_to_pubkey() { remaining_accounts.add_pre_accounts_meta(AccountMeta::new_readonly(mint_pubkey, false)); // Mint remaining_accounts.add_pre_accounts_meta(AccountMeta::new_readonly(compressible_config, false)); // Compressible config remaining_accounts.add_pre_accounts_meta(AccountMeta::new_readonly( - solana_sdk::system_program::id(), + anchor_lang::solana_program::system_program::id(), false, )); // System program remaining_accounts.add_pre_accounts_meta(AccountMeta::new(rent_sponsor, false)); // Rent recipient diff --git a/sdk-tests/sdk-v1-native-test/tests/test.rs b/sdk-tests/sdk-v1-native-test/tests/test.rs index a93beab599..967c12779a 100644 --- a/sdk-tests/sdk-v1-native-test/tests/test.rs +++ b/sdk-tests/sdk-v1-native-test/tests/test.rs @@ -105,7 +105,7 @@ pub async fn create_pda( system_accounts_offset: system_accounts_offset as u8, tree_accounts_offset: tree_accounts_offset as u8, }; - let inputs = instruction_data.try_to_vec().unwrap(); + let inputs = borsh::to_vec(&instruction_data).unwrap(); let instruction = Instruction { program_id: sdk_v1_native_test::ID, @@ -163,7 +163,7 @@ pub async fn update_pda( new_data: new_account_data, system_accounts_offset: system_accounts_offset as u8, }; - let inputs = instruction_data.try_to_vec().unwrap(); + let inputs = borsh::to_vec(&instruction_data).unwrap(); let instruction = Instruction { program_id: sdk_v1_native_test::ID, diff --git a/sdk-tests/single-account-loader-test/src/lib.rs b/sdk-tests/single-account-loader-test/src/lib.rs index bb97974885..bff9d28b24 100644 --- a/sdk-tests/single-account-loader-test/src/lib.rs +++ b/sdk-tests/single-account-loader-test/src/lib.rs @@ -66,7 +66,7 @@ pub mod single_account_loader_test { /// The account is created by Anchor and made compressible by the /// LightFinalize trait implementation generated by `#[light_account(init, zero_copy)]`. pub fn create_record<'info>( - ctx: Context<'_, '_, '_, 'info, CreateRecord<'info>>, + ctx: Context<'info, CreateRecord<'info>>, params: CreateRecordParams, ) -> Result<()> { // Initialize the record data using load_init for zero-copy access diff --git a/sdk-tests/single-account-loader-test/tests/test.rs b/sdk-tests/single-account-loader-test/tests/test.rs index 49e51e544c..8b4f0cdcec 100644 --- a/sdk-tests/single-account-loader-test/tests/test.rs +++ b/sdk-tests/single-account-loader-test/tests/test.rs @@ -69,7 +69,7 @@ async fn test_create_zero_copy_record() { compression_config: config_pda, pda_rent_sponsor: rent_sponsor, record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = single_account_loader_test::instruction::CreateRecord { @@ -174,7 +174,7 @@ async fn test_zero_copy_record_full_lifecycle() { compression_config: config_pda, pda_rent_sponsor: rent_sponsor, record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = single_account_loader_test::instruction::CreateRecord { diff --git a/sdk-tests/single-ata-test/src/lib.rs b/sdk-tests/single-ata-test/src/lib.rs index eec5bb77fb..0d8e3950c4 100644 --- a/sdk-tests/single-ata-test/src/lib.rs +++ b/sdk-tests/single-ata-test/src/lib.rs @@ -62,7 +62,7 @@ pub mod single_ata_test { /// generated by the #[light_account(init, associated_token, ...)] macro. #[allow(unused_variables)] pub fn create_ata<'info>( - ctx: Context<'_, '_, '_, 'info, CreateAta<'info>>, + ctx: Context<'info, CreateAta<'info>>, params: CreateAtaParams, ) -> Result<()> { // ATA creation is handled by the macro-generated LightFinalize implementation. diff --git a/sdk-tests/single-ata-test/tests/test.rs b/sdk-tests/single-ata-test/tests/test.rs index 0196b17a23..a568e977d6 100644 --- a/sdk-tests/single-ata-test/tests/test.rs +++ b/sdk-tests/single-ata-test/tests/test.rs @@ -138,7 +138,7 @@ async fn test_create_single_ata() { light_token_config: LIGHT_TOKEN_CONFIG, light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = single_ata_test::instruction::CreateAta { diff --git a/sdk-tests/single-mint-test/src/lib.rs b/sdk-tests/single-mint-test/src/lib.rs index 674560eea1..0563e39e67 100644 --- a/sdk-tests/single-mint-test/src/lib.rs +++ b/sdk-tests/single-mint-test/src/lib.rs @@ -79,7 +79,7 @@ pub mod single_mint_test { /// generated by the #[light_account(init, mint, ...)] macro. #[allow(unused_variables)] pub fn create_mint<'info>( - ctx: Context<'_, '_, '_, 'info, CreateMint<'info>>, + ctx: Context<'info, CreateMint<'info>>, params: CreateMintParams, ) -> Result<()> { // Mint creation is handled by the macro-generated LightFinalize implementation. diff --git a/sdk-tests/single-mint-test/tests/test.rs b/sdk-tests/single-mint-test/tests/test.rs index ede75d0504..ab57cafb3d 100644 --- a/sdk-tests/single-mint-test/tests/test.rs +++ b/sdk-tests/single-mint-test/tests/test.rs @@ -77,7 +77,7 @@ async fn test_create_single_mint() { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = single_mint_test::instruction::CreateMint { diff --git a/sdk-tests/single-pda-test/src/lib.rs b/sdk-tests/single-pda-test/src/lib.rs index f3bebcfdbf..74a7a2d34e 100644 --- a/sdk-tests/single-pda-test/src/lib.rs +++ b/sdk-tests/single-pda-test/src/lib.rs @@ -28,7 +28,7 @@ pub mod single_pda_test { /// The account is created by Anchor and made compressible by the /// LightFinalize trait implementation generated by #[light_account(init)]. pub fn create_pda<'info>( - ctx: Context<'_, '_, '_, 'info, CreatePda<'info>>, + ctx: Context<'info, CreatePda<'info>>, params: CreatePdaParams, ) -> Result<()> { ctx.accounts.record.owner = params.owner; diff --git a/sdk-tests/single-pda-test/tests/test.rs b/sdk-tests/single-pda-test/tests/test.rs index 79dc17d0e5..52195c90c4 100644 --- a/sdk-tests/single-pda-test/tests/test.rs +++ b/sdk-tests/single-pda-test/tests/test.rs @@ -65,7 +65,7 @@ async fn test_create_single_pda() { compression_config: config_pda, pda_rent_sponsor: rent_sponsor, record: record_pda, - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = single_pda_test::instruction::CreatePda { diff --git a/sdk-tests/single-token-test/src/lib.rs b/sdk-tests/single-token-test/src/lib.rs index 5a79f14be1..5aa2850d5f 100644 --- a/sdk-tests/single-token-test/src/lib.rs +++ b/sdk-tests/single-token-test/src/lib.rs @@ -79,7 +79,7 @@ pub mod single_token_test { /// generated by the #[light_account(init, token, ...)] macro. #[allow(unused_variables)] pub fn create_token_vault<'info>( - ctx: Context<'_, '_, '_, 'info, CreateTokenVault<'info>>, + ctx: Context<'info, CreateTokenVault<'info>>, params: CreateTokenVaultParams, ) -> Result<()> { // Token vault creation is handled by the macro-generated LightFinalize implementation. diff --git a/sdk-tests/single-token-test/tests/test.rs b/sdk-tests/single-token-test/tests/test.rs index 485b4bba7f..a3c56205ed 100644 --- a/sdk-tests/single-token-test/tests/test.rs +++ b/sdk-tests/single-token-test/tests/test.rs @@ -139,7 +139,7 @@ async fn test_create_single_token_vault() { light_token_rent_sponsor: LIGHT_TOKEN_RENT_SPONSOR, light_token_cpi_authority: light_token_types::CPI_AUTHORITY_PDA.into(), light_token_program: LIGHT_TOKEN_PROGRAM_ID.into(), - system_program: solana_sdk::system_program::ID, + system_program: anchor_lang::solana_program::system_program::ID, }; let instruction_data = single_token_test::instruction::CreateTokenVault { diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index a5a195fc51..619dee75cd 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -29,6 +29,8 @@ tabled = "0.20" light-test-utils = { workspace = true } tokio = { workspace = true } solana-sdk = { workspace = true } +solana-commitment-config = { workspace = true } +solana-system-interface = { workspace = true } light-program-test = { workspace = true } light-client = { workspace = true } dirs = "6.0" diff --git a/xtask/src/fetch_block_events.rs b/xtask/src/fetch_block_events.rs index 43c8532f20..fcc46b9476 100644 --- a/xtask/src/fetch_block_events.rs +++ b/xtask/src/fetch_block_events.rs @@ -3,7 +3,7 @@ use clap::Parser; use light_compressed_account::Pubkey as LightPubkey; use light_event::parse::event_from_light_transaction; use solana_client::{rpc_client::RpcClient, rpc_config::RpcBlockConfig}; -use solana_sdk::commitment_config::CommitmentConfig; +use solana_commitment_config::CommitmentConfig; use solana_transaction_status::{ option_serializer::OptionSerializer, EncodedTransactionWithStatusMeta, TransactionDetails, UiInstruction, UiTransactionEncoding, diff --git a/xtask/src/fetch_failed_txs.rs b/xtask/src/fetch_failed_txs.rs index b4a4322d40..6da5006b87 100644 --- a/xtask/src/fetch_failed_txs.rs +++ b/xtask/src/fetch_failed_txs.rs @@ -4,7 +4,8 @@ use anyhow::Result; use chrono::{TimeZone, Utc}; use clap::Parser; use solana_client::{rpc_client::RpcClient, rpc_config::RpcTransactionConfig}; -use solana_sdk::{commitment_config::CommitmentConfig, pubkey::Pubkey, signature::Signature}; +use solana_commitment_config::CommitmentConfig; +use solana_sdk::{pubkey::Pubkey, signature::Signature}; use solana_transaction_status::{ option_serializer::OptionSerializer, EncodedTransaction, UiMessage, UiTransactionEncoding, }; diff --git a/xtask/src/fetch_keypair_txs.rs b/xtask/src/fetch_keypair_txs.rs index c8e332890a..9ce4c9fcfe 100644 --- a/xtask/src/fetch_keypair_txs.rs +++ b/xtask/src/fetch_keypair_txs.rs @@ -4,10 +4,8 @@ use anyhow::Result; use chrono::Utc; use clap::Parser; use solana_client::rpc_client::{GetConfirmedSignaturesForAddress2Config, RpcClient}; -use solana_sdk::{ - commitment_config::CommitmentConfig, pubkey::Pubkey, signature::Signature, - transaction::TransactionError, -}; +use solana_commitment_config::CommitmentConfig; +use solana_sdk::{pubkey::Pubkey, signature::Signature, transaction::TransactionError}; use tabled::{builder::Builder, settings::Style}; const SYSTEM_PROGRAM_ID: &str = "SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7"; @@ -101,11 +99,8 @@ fn shorten_address(addr: &str) -> String { /// Canonical key for an error: strips the instruction index so the same error /// code from different instruction positions groups together. -fn error_key(err: &TransactionError) -> String { - match err { - TransactionError::InstructionError(_, inner) => format!("{:?}", inner), - other => format!("{:?}", other), - } +fn error_key(err: &impl std::fmt::Debug) -> String { + format!("{:?}", err) } /// Parse the N out of a `Custom(N)` string. diff --git a/xtask/src/new_deployment.rs b/xtask/src/new_deployment.rs index b5af0d100b..6e17f29419 100644 --- a/xtask/src/new_deployment.rs +++ b/xtask/src/new_deployment.rs @@ -18,9 +18,9 @@ use light_program_test::{ use solana_sdk::{ native_token::LAMPORTS_PER_SOL, signature::{read_keypair_file, write_keypair_file, Keypair, Signer}, - system_instruction, transaction::Transaction, }; +use solana_system_interface::instruction as system_instruction; /// cargo xtask #[derive(Debug, Parser)] pub struct Options { From f2896b5484a1f2626156670ed8730c5e52fa49cb Mon Sep 17 00:00:00 2001 From: Sergey Timoshin Date: Fri, 27 Mar 2026 12:02:51 +0000 Subject: [PATCH 8/8] chore: update subproject commit for anchor --- external/anchor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/anchor b/external/anchor index eb2e1dad59..fb213db86c 160000 --- a/external/anchor +++ b/external/anchor @@ -1 +1 @@ -Subproject commit eb2e1dad59060e7a3624079698fcb216faabc616 +Subproject commit fb213db86cb1badb81cf23eaedc51e09d268d25d