diff --git a/Cargo.lock b/Cargo.lock index 8c9eb5f14d..49ec2824b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3343,7 +3343,6 @@ dependencies = [ "light-prover-client", "light-sdk", "light-test-utils", - "log", "num-bigint 0.4.6", "num-traits", "photon-api", diff --git a/forester/src/cli.rs b/forester/src/cli.rs index 811ca76f1e..580e7a4e3b 100644 --- a/forester/src/cli.rs +++ b/forester/src/cli.rs @@ -72,8 +72,39 @@ pub struct StartArgs { #[arg(long, env = "FORESTER_ENABLE_PRIORITY_FEES", default_value = "false")] pub enable_priority_fees: bool, - #[arg(long, env = "FORESTER_RPC_POOL_SIZE", default_value = "98")] - pub rpc_pool_size: usize, + #[arg(long, env = "FORESTER_RPC_POOL_SIZE", default_value = "50")] + pub rpc_pool_size: u32, + + #[arg( + long, + env = "FORESTER_RPC_POOL_CONNECTION_TIMEOUT_SECS", + default_value = "15" + )] + pub rpc_pool_connection_timeout_secs: u64, + + #[arg( + long, + env = "FORESTER_RPC_POOL_IDLE_TIMEOUT_SECS", + default_value = "300" + )] + pub rpc_pool_idle_timeout_secs: u64, + + #[arg(long, env = "FORESTER_RPC_POOL_MAX_RETRIES", default_value = "100")] + pub rpc_pool_max_retries: u32, + + #[arg( + long, + env = "FORESTER_RPC_POOL_INITIAL_RETRY_DELAY_MS", + default_value = "1000" + )] + pub rpc_pool_initial_retry_delay_ms: u64, + + #[arg( + long, + env = "FORESTER_RPC_POOL_MAX_RETRY_DELAY_MS", + default_value = "16000" + )] + pub rpc_pool_max_retry_delay_ms: u64, #[arg( long, diff --git a/forester/src/config.rs b/forester/src/config.rs index 3a0386a3a8..d3247aafff 100644 --- a/forester/src/config.rs +++ b/forester/src/config.rs @@ -21,6 +21,7 @@ pub struct ForesterConfig { pub indexer_config: IndexerConfig, pub transaction_config: TransactionConfig, pub general_config: GeneralConfig, + pub rpc_pool_config: RpcPoolConfig, pub registry_pubkey: Pubkey, pub payer_keypair: Keypair, pub derivation_pubkey: Pubkey, @@ -67,12 +68,21 @@ pub struct TransactionConfig { #[derive(Debug, Clone)] pub struct GeneralConfig { - pub rpc_pool_size: usize, pub slot_update_interval_seconds: u64, pub tree_discovery_interval_seconds: u64, pub enable_metrics: bool, } +#[derive(Debug, Clone, Copy)] +pub struct RpcPoolConfig { + pub max_size: u32, + pub connection_timeout_secs: u64, + pub idle_timeout_secs: u64, + pub max_retries: u32, + pub initial_retry_delay_ms: u64, + pub max_retry_delay_ms: u64, +} + impl Default for QueueConfig { fn default() -> Self { QueueConfig { @@ -182,11 +192,18 @@ impl ForesterConfig { enable_priority_fees: args.enable_priority_fees, }, general_config: GeneralConfig { - rpc_pool_size: args.rpc_pool_size, slot_update_interval_seconds: args.slot_update_interval_seconds, tree_discovery_interval_seconds: args.tree_discovery_interval_seconds, enable_metrics: args.enable_metrics(), }, + rpc_pool_config: RpcPoolConfig { + max_size: args.rpc_pool_size, + connection_timeout_secs: args.rpc_pool_connection_timeout_secs, + idle_timeout_secs: args.rpc_pool_idle_timeout_secs, + max_retries: args.rpc_pool_max_retries, + initial_retry_delay_ms: args.rpc_pool_initial_retry_delay_ms, + max_retry_delay_ms: args.rpc_pool_max_retry_delay_ms, + }, registry_pubkey: Pubkey::from_str(®istry_pubkey).map_err(|e| { ConfigError::InvalidPubkey { field: "registry_pubkey", @@ -221,11 +238,18 @@ impl ForesterConfig { indexer_config: IndexerConfig::default(), transaction_config: TransactionConfig::default(), general_config: GeneralConfig { - rpc_pool_size: 10, slot_update_interval_seconds: 10, tree_discovery_interval_seconds: 60, enable_metrics: args.enable_metrics(), }, + rpc_pool_config: RpcPoolConfig { + max_size: 10, + connection_timeout_secs: 15, + idle_timeout_secs: 300, + max_retries: 10, + initial_retry_delay_ms: 1000, + max_retry_delay_ms: 16000, + }, registry_pubkey: Pubkey::default(), payer_keypair: Keypair::new(), derivation_pubkey: Pubkey::default(), @@ -243,6 +267,7 @@ impl Clone for ForesterConfig { indexer_config: self.indexer_config.clone(), transaction_config: self.transaction_config.clone(), general_config: self.general_config.clone(), + rpc_pool_config: self.rpc_pool_config, registry_pubkey: self.registry_pubkey, payer_keypair: self.payer_keypair.insecure_clone(), derivation_pubkey: self.derivation_pubkey, diff --git a/forester/src/epoch_manager.rs b/forester/src/epoch_manager.rs index 51c5e205d4..136b22f0b8 100644 --- a/forester/src/epoch_manager.rs +++ b/forester/src/epoch_manager.rs @@ -145,7 +145,7 @@ impl + IndexerType> EpochManager { slot_tracker, processing_epochs: Arc::new(DashMap::new()), new_tree_sender, - tx_cache, + tx_cache }) } @@ -842,7 +842,7 @@ impl + IndexerType> EpochManager { .await { Ok(_) => { - trace!( + trace!( "Successfully processed light slot {:?}", light_slot_details.slot ); @@ -859,7 +859,7 @@ impl + IndexerType> EpochManager { info!( "No further eligible slots in schedule for tree {}", tree_schedule.tree_accounts.merkle_tree - ); + ); break 'outer_slot_loop; } @@ -867,7 +867,7 @@ impl + IndexerType> EpochManager { current_slot = self.slot_tracker.estimated_current_slot(); } - info!( + info!( "Exiting process_queue for tree {}", tree_schedule.tree_accounts.merkle_tree ); @@ -888,11 +888,11 @@ impl + IndexerType> EpochManager { forester_slot_details: &ForesterSlot, ) -> Result<()> { trace!( - "Found eligible slot: {:?}. Target start: {}, Target end: {}", + "Found eligible slot: {:?}. Target start: {}, Target end: {}", forester_slot_details.slot, forester_slot_details.start_solana_slot, forester_slot_details.end_solana_slot - ); + ); let mut rpc = self.rpc_pool.get_connection().await?; wait_until_slot_reached( &mut *rpc, @@ -917,7 +917,7 @@ impl + IndexerType> EpochManager { if current_light_slot != forester_slot_details.slot { warn!("Light slot mismatch. Exiting processing for this slot."); break 'inner_processing_loop; - } + } if !self .check_forester_eligibility( @@ -929,7 +929,7 @@ impl + IndexerType> EpochManager { .await? { break 'inner_processing_loop; - } + } let processing_start_time = Instant::now(); let items_processed_this_iteration = match self @@ -941,7 +941,7 @@ impl + IndexerType> EpochManager { estimated_slot, ) .await - { + { Ok(count) => count, Err(e) => { error!( @@ -956,14 +956,14 @@ impl + IndexerType> EpochManager { epoch_info.epoch, items_processed_this_iteration, processing_start_time.elapsed(), - ) + ) .await; push_metrics(&self.config.external_services.pushgateway_url).await?; - estimated_slot = self.slot_tracker.estimated_current_slot(); - } + estimated_slot = self.slot_tracker.estimated_current_slot(); + } Ok(()) - } + } async fn check_forester_eligibility( &self, @@ -980,27 +980,27 @@ impl + IndexerType> EpochManager { })?; let eligible_forester_slot_index = ForesterEpochPda::get_eligible_forester_index( - current_light_slot, + current_light_slot, queue_pubkey, total_epoch_weight, current_epoch_num, ) .map_err(|e| { - error!("Failed to calculate eligible forester index: {:?}", e); + error!("Failed to calculate eligible forester index: {:?}", e); anyhow::anyhow!("Eligibility calculation failed: {}", e) })?; - if !epoch_pda.is_eligible(eligible_forester_slot_index) { - warn!( + if !epoch_pda.is_eligible(eligible_forester_slot_index) { + warn!( "Forester {} is no longer eligible to process tree {} in light slot {}.", - self.config.payer_keypair.pubkey(), + self.config.payer_keypair.pubkey(), queue_pubkey, - current_light_slot - ); + current_light_slot + ); return Ok(false); } Ok(true) - } + } async fn dispatch_tree_processing( &self, @@ -1036,71 +1036,71 @@ impl + IndexerType> EpochManager { current_solana_slot: u64, ) -> Result { let transaction_timeout_buffer = Duration::from_secs(2); - let remaining_time_timeout = calculate_remaining_time_or_default( + let remaining_time_timeout = calculate_remaining_time_or_default( current_solana_slot, forester_slot_details.end_solana_slot, - transaction_timeout_buffer, - ); + transaction_timeout_buffer, + ); - let batched_tx_config = SendBatchedTransactionsConfig { - num_batches: 1, - build_transaction_batch_config: BuildTransactionBatchConfig { + let batched_tx_config = SendBatchedTransactionsConfig { + num_batches: 1, + build_transaction_batch_config: BuildTransactionBatchConfig { batch_size: self.config.transaction_config.legacy_ixs_per_tx as u64, compute_unit_price: Some(10_000), // is dynamic, sets max compute_unit_limit: Some(self.config.transaction_config.cu_limit), enable_priority_fees: self.config.transaction_config.enable_priority_fees, max_concurrent_sends: Some(50), - }, - queue_config: self.config.queue_config, - retry_config: RetryConfig { - timeout: remaining_time_timeout, - ..self.config.retry_config - }, - light_slot_length: epoch_pda.protocol_config.slot_length, - }; + }, + queue_config: self.config.queue_config, + retry_config: RetryConfig { + timeout: remaining_time_timeout, + ..self.config.retry_config + }, + light_slot_length: epoch_pda.protocol_config.slot_length, + }; - let transaction_builder = EpochManagerTransactions::new( - self.indexer.clone(), - self.rpc_pool.clone(), - epoch_info.epoch, - self.tx_cache.clone(), - ); + let transaction_builder = EpochManagerTransactions { + pool: self.rpc_pool.clone(), + indexer: self.indexer.clone(), + epoch: epoch_info.epoch, + phantom: std::marker::PhantomData::, + }; let num_sent = send_batched_transactions( - &self.config.payer_keypair, - &self.config.derivation_pubkey, - self.rpc_pool.clone(), - &batched_tx_config, + &self.config.payer_keypair, + &self.config.derivation_pubkey, + self.rpc_pool.clone(), + &batched_tx_config, *tree_accounts, - &transaction_builder, - ) + &transaction_builder, + ) .await?; match self.rollover_if_needed(tree_accounts).await { Ok(_) => Ok(num_sent), - Err(e) => { + Err(e) => { error!("Failed to rollover tree: {:?}", e); Err(e) - } - } - } + } + } + } async fn process_v2(&self, epoch_info: &Epoch, tree_accounts: &TreeAccounts) -> Result { - let batch_context = BatchContext { - rpc_pool: self.rpc_pool.clone(), - indexer: self.indexer.clone(), - authority: self.config.payer_keypair.insecure_clone(), - derivation: self.config.derivation_pubkey, - epoch: epoch_info.epoch, + let batch_context = BatchContext { + rpc_pool: self.rpc_pool.clone(), + indexer: self.indexer.clone(), + authority: self.config.payer_keypair.insecure_clone(), + derivation: self.config.derivation_pubkey, + epoch: epoch_info.epoch, merkle_tree: tree_accounts.merkle_tree, output_queue: tree_accounts.queue, - ixs_per_tx: self.config.transaction_config.batch_ixs_per_tx, - }; + ixs_per_tx: self.config.transaction_config.batch_ixs_per_tx, + }; process_batched_operations(batch_context, tree_accounts.tree_type) - .await + .await .map_err(|e| anyhow!("Failed to process V2 operations: {}", e)) - } + } async fn update_metrics_and_counts( &self, @@ -1113,11 +1113,11 @@ impl + IndexerType> EpochManager { "{} items processed in this iteration, duration: {:?}", items_processed, duration - ); + ); queue_metric_update(epoch_num, items_processed, duration).await; self.increment_processed_items_count(epoch_num, items_processed) .await; - } + } } async fn rollover_if_needed(&self, tree_account: &TreeAccounts) -> Result<()> { @@ -1287,12 +1287,8 @@ fn calculate_remaining_time_or_default( return Duration::ZERO; } let slots_remaining = end_slot - current_slot; - let base_remaining_duration = slot_duration() - .checked_mul(slots_remaining as u32) - .unwrap_or_default(); - base_remaining_duration - .checked_sub(buffer_duration) - .unwrap_or(Duration::ZERO) + let base_remaining_duration = slot_duration().checked_mul(slots_remaining as u32).unwrap_or_default(); + base_remaining_duration.checked_sub(buffer_duration).unwrap_or_else(|| Duration::ZERO) } #[instrument( diff --git a/forester/src/forester_status.rs b/forester/src/forester_status.rs index a48c3f0383..1bbc22b9be 100644 --- a/forester/src/forester_status.rs +++ b/forester/src/forester_status.rs @@ -570,9 +570,9 @@ fn print_tree_schedule_by_forester( } } } else if current_epoch_pda_entry.is_none() { - println!( - "ERROR: Could not find EpochPda for active epoch {}. Cannot check forester assignments.", - current_active_epoch - ); - } -} + println!( + "ERROR: Could not find EpochPda for active epoch {}. Cannot check forester assignments.", + current_active_epoch + ); + } +} \ No newline at end of file diff --git a/forester/src/lib.rs b/forester/src/lib.rs index 45aebdc22f..ea3e983a8f 100644 --- a/forester/src/lib.rs +++ b/forester/src/lib.rs @@ -29,7 +29,7 @@ use light_client::{ indexer::Indexer, rate_limiter::RateLimiter, rpc::{RpcConnection, SolanaRpcConnection}, - rpc_pool::SolanaRpcPool, + rpc_pool::SolanaRpcPoolBuilder, }; use light_compressed_account::TreeType; use solana_sdk::commitment_config::CommitmentConfig; @@ -91,15 +91,25 @@ pub async fn run_pipeline + IndexerType>( shutdown: oneshot::Receiver<()>, work_report_sender: mpsc::Sender, ) -> Result<()> { - debug!("run_pipeline"); - let rpc_pool = SolanaRpcPool::::new( - config.external_services.rpc_url.to_string(), - CommitmentConfig::confirmed(), - config.general_config.rpc_pool_size as u32, - rpc_rate_limiter.clone(), - send_tx_rate_limiter.clone(), - ) - .await?; + let mut builder = SolanaRpcPoolBuilder::::default() + .url(config.external_services.rpc_url.to_string()) + .commitment(CommitmentConfig::confirmed()) // Or your actual commitment + .max_size(config.rpc_pool_config.max_size) + .connection_timeout_secs(config.rpc_pool_config.connection_timeout_secs) + .idle_timeout_secs(config.rpc_pool_config.idle_timeout_secs) + .max_retries(config.rpc_pool_config.max_retries) + .initial_retry_delay_ms(config.rpc_pool_config.initial_retry_delay_ms) + .max_retry_delay_ms(config.rpc_pool_config.max_retry_delay_ms); + + if let Some(limiter) = rpc_rate_limiter { + builder = builder.rpc_rate_limiter(limiter); + } + + if let Some(limiter) = send_tx_rate_limiter { + builder = builder.send_tx_rate_limiter(limiter); + } + + let rpc_pool = builder.build().await?; let protocol_config = { let mut rpc = rpc_pool.get_connection().await?; diff --git a/forester/src/processor/v2/common.rs b/forester/src/processor/v2/common.rs index 68a058d997..45526c95ea 100644 --- a/forester/src/processor/v2/common.rs +++ b/forester/src/processor/v2/common.rs @@ -89,7 +89,7 @@ impl + IndexerType> BatchProcessor { result } BatchReadyState::NotReady => { - trace!( + debug!( "Batch not ready for processing, tree: {}", self.context.merkle_tree ); diff --git a/forester/tests/batched_address_test.rs b/forester/tests/batched_address_test.rs index 78ed256d52..9fdea95047 100644 --- a/forester/tests/batched_address_test.rs +++ b/forester/tests/batched_address_test.rs @@ -9,7 +9,7 @@ use light_batched_merkle_tree::{ use light_client::{ indexer::{photon_indexer::PhotonIndexer, AddressMerkleTreeAccounts, Indexer}, rpc::{solana_rpc::SolanaRpcUrl, RpcConnection, SolanaRpcConnection}, - rpc_pool::SolanaRpcPool, + rpc_pool::SolanaRpcPoolBuilder, }; use light_program_test::{indexer::TestIndexer, test_env::EnvAccounts}; use light_prover_client::gnark::helpers::{LightValidatorConfig, ProverConfig, ProverMode}; @@ -57,15 +57,12 @@ async fn test_address_batched() { config.transaction_config.batch_ixs_per_tx = 1; config.payer_keypair = forester_keypair.insecure_clone(); - let pool = SolanaRpcPool::::new( - config.external_services.rpc_url.to_string(), - CommitmentConfig::processed(), - config.general_config.rpc_pool_size as u32, - None, - None, - ) - .await - .unwrap(); + let pool = SolanaRpcPoolBuilder::::default() + .url(config.external_services.rpc_url.to_string()) + .commitment(CommitmentConfig::processed()) + .build() + .await + .unwrap(); let commitment_config = CommitmentConfig::confirmed(); let mut rpc = SolanaRpcConnection::new(SolanaRpcUrl::Localnet, Some(commitment_config)); diff --git a/forester/tests/batched_state_indexer_test.rs b/forester/tests/batched_state_indexer_test.rs index b9ee62c532..00540b56bb 100644 --- a/forester/tests/batched_state_indexer_test.rs +++ b/forester/tests/batched_state_indexer_test.rs @@ -9,7 +9,7 @@ use light_batched_merkle_tree::{ use light_client::{ indexer::{photon_indexer::PhotonIndexer, Indexer}, rpc::{solana_rpc::SolanaRpcUrl, RpcConnection, SolanaRpcConnection}, - rpc_pool::SolanaRpcPool, + rpc_pool::SolanaRpcPoolBuilder, }; use light_program_test::{indexer::TestIndexer, test_env::EnvAccounts}; use light_prover_client::gnark::helpers::LightValidatorConfig; @@ -51,15 +51,12 @@ async fn test_state_indexer_batched() { config.transaction_config.batch_ixs_per_tx = 1; config.payer_keypair = forester_keypair.insecure_clone(); - let pool = SolanaRpcPool::::new( - config.external_services.rpc_url.to_string(), - CommitmentConfig::processed(), - config.general_config.rpc_pool_size as u32, - None, - None, - ) - .await - .unwrap(); + let pool = SolanaRpcPoolBuilder::::default() + .url(config.external_services.rpc_url.to_string()) + .commitment(CommitmentConfig::processed()) + .build() + .await + .unwrap(); let commitment_config = CommitmentConfig::confirmed(); let mut rpc = SolanaRpcConnection::new(SolanaRpcUrl::Localnet, Some(commitment_config)); diff --git a/forester/tests/batched_state_test.rs b/forester/tests/batched_state_test.rs index 628fa47503..31d76b8f7e 100644 --- a/forester/tests/batched_state_test.rs +++ b/forester/tests/batched_state_test.rs @@ -8,7 +8,7 @@ use light_batched_merkle_tree::{ }; use light_client::{ rpc::{solana_rpc::SolanaRpcUrl, RpcConnection, SolanaRpcConnection}, - rpc_pool::SolanaRpcPool, + rpc_pool::SolanaRpcPoolBuilder, }; use light_program_test::{indexer::TestIndexer, test_env::EnvAccounts}; use light_prover_client::gnark::helpers::LightValidatorConfig; @@ -55,15 +55,12 @@ async fn test_state_batched() { config.transaction_config.batch_ixs_per_tx = 1; config.payer_keypair = forester_keypair.insecure_clone(); - let pool = SolanaRpcPool::::new( - config.external_services.rpc_url.to_string(), - CommitmentConfig::processed(), - config.general_config.rpc_pool_size as u32, - None, - None, - ) - .await - .unwrap(); + let pool = SolanaRpcPoolBuilder::::default() + .url(config.external_services.rpc_url.to_string()) + .commitment(CommitmentConfig::processed()) + .build() + .await + .unwrap(); let commitment_config = CommitmentConfig::confirmed(); let mut rpc = SolanaRpcConnection::new(SolanaRpcUrl::Localnet, Some(commitment_config)); diff --git a/forester/tests/e2e_test.rs b/forester/tests/e2e_test.rs index af597585ef..d599125688 100644 --- a/forester/tests/e2e_test.rs +++ b/forester/tests/e2e_test.rs @@ -9,7 +9,7 @@ use forester_utils::registry::register_test_forester; use light_client::{ indexer::{AddressMerkleTreeAccounts, StateMerkleTreeAccounts}, rpc::{solana_rpc::SolanaRpcUrl, RpcConnection, RpcError, SolanaRpcConnection}, - rpc_pool::SolanaRpcPool, + rpc_pool::{SolanaRpcPool, SolanaRpcPoolBuilder}, }; use light_program_test::{indexer::TestIndexer, test_env::EnvAccounts}; use light_prover_client::gnark::helpers::{ @@ -62,15 +62,12 @@ async fn test_epoch_monitor_with_2_foresters() { let mut config2 = forester_config(); config2.payer_keypair = forester_keypair2.insecure_clone(); - let pool = SolanaRpcPool::::new( - config1.external_services.rpc_url.to_string(), - CommitmentConfig::confirmed(), - config1.general_config.rpc_pool_size as u32, - None, - None, - ) - .await - .unwrap(); + let pool = SolanaRpcPoolBuilder::::default() + .url(config1.external_services.rpc_url.to_string()) + .commitment(CommitmentConfig::confirmed()) + .build() + .await + .unwrap(); let mut rpc = SolanaRpcConnection::new(SolanaRpcUrl::Localnet, None); rpc.payer = forester_keypair1.insecure_clone(); @@ -246,38 +243,38 @@ async fn test_epoch_monitor_with_2_foresters() { const EXPECTED_EPOCHS: u64 = 3; // We expect to process 2 epochs (0 and 1) - let mut processed_epochs = HashSet::new(); - let mut total_processed = 0; - while processed_epochs.len() < EXPECTED_EPOCHS as usize { - tokio::select! { - Some(report) = work_report_receiver1.recv() => { - println!("Received work report from forester 1: {:?}", report); - total_processed += report.processed_items; - processed_epochs.insert(report.epoch); - } - Some(report) = work_report_receiver2.recv() => { - println!("Received work report from forester 2: {:?}", report); - total_processed += report.processed_items; - processed_epochs.insert(report.epoch); + let mut processed_epochs = HashSet::new(); + let mut total_processed = 0; + while processed_epochs.len() < EXPECTED_EPOCHS as usize { + tokio::select! { + Some(report) = work_report_receiver1.recv() => { + println!("Received work report from forester 1: {:?}", report); + total_processed += report.processed_items; + processed_epochs.insert(report.epoch); + } + Some(report) = work_report_receiver2.recv() => { + println!("Received work report from forester 2: {:?}", report); + total_processed += report.processed_items; + processed_epochs.insert(report.epoch); + } + else => break, } - else => break, } - } - println!("Processed {} items", total_processed); + println!("Processed {} items", total_processed); - // Verify that we've processed the expected number of epochs - assert_eq!( - processed_epochs.len(), - EXPECTED_EPOCHS as usize, - "Processed {} epochs, expected {}", - processed_epochs.len(), - EXPECTED_EPOCHS - ); + // Verify that we've processed the expected number of epochs + assert_eq!( + processed_epochs.len(), + EXPECTED_EPOCHS as usize, + "Processed {} epochs, expected {}", + processed_epochs.len(), + EXPECTED_EPOCHS + ); - // Verify that we've processed epochs 0 and 1 - // assert!(processed_epochs.contains(&0), "Epoch 0 was not processed"); - assert!(processed_epochs.contains(&1), "Epoch 1 was not processed"); + // Verify that we've processed epochs 0 and 1 + // assert!(processed_epochs.contains(&0), "Epoch 0 was not processed"); + assert!(processed_epochs.contains(&1), "Epoch 1 was not processed"); assert_trees_are_rolledover( &pool, @@ -414,15 +411,13 @@ async fn test_epoch_double_registration() { let mut config = forester_config(); config.payer_keypair = forester_keypair.insecure_clone(); - let pool = SolanaRpcPool::::new( - config.external_services.rpc_url.to_string(), - CommitmentConfig::confirmed(), - config.general_config.rpc_pool_size as u32, - None, - None, - ) - .await - .unwrap(); + + let pool = SolanaRpcPoolBuilder::::default() + .url(config.external_services.rpc_url.to_string()) + .commitment(CommitmentConfig::confirmed()) + .build() + .await + .unwrap(); let mut rpc = SolanaRpcConnection::new(SolanaRpcUrl::Localnet, None); rpc.payer = forester_keypair.insecure_clone(); diff --git a/forester/tests/priority_fee_test.rs b/forester/tests/priority_fee_test.rs index 6eaf3924c2..3e96815ce1 100644 --- a/forester/tests/priority_fee_test.rs +++ b/forester/tests/priority_fee_test.rs @@ -56,6 +56,11 @@ async fn test_priority_fee_request() { cu_limit: 1_000_000, enable_priority_fees: true, rpc_pool_size: 20, + rpc_pool_connection_timeout_secs: 1, + rpc_pool_idle_timeout_secs: 1, + rpc_pool_max_retries: 10, + rpc_pool_initial_retry_delay_ms: 1000, + rpc_pool_max_retry_delay_ms: 16000, slot_update_interval_seconds: 10, tree_discovery_interval_seconds: 5, max_retries: 3, diff --git a/forester/tests/test_utils.rs b/forester/tests/test_utils.rs index 5178292cfd..cddeb59c91 100644 --- a/forester/tests/test_utils.rs +++ b/forester/tests/test_utils.rs @@ -1,5 +1,5 @@ use forester::{ - config::{ExternalServicesConfig, GeneralConfig}, + config::{ExternalServicesConfig, GeneralConfig, RpcPoolConfig}, metrics::register_metrics, telemetry::setup_telemetry, ForesterConfig, @@ -92,11 +92,18 @@ pub fn forester_config() -> ForesterConfig { indexer_config: Default::default(), transaction_config: Default::default(), general_config: GeneralConfig { - rpc_pool_size: 20, slot_update_interval_seconds: 10, tree_discovery_interval_seconds: 5, enable_metrics: false, }, + rpc_pool_config: RpcPoolConfig { + max_size: 50, + connection_timeout_secs: 15, + idle_timeout_secs: 300, + max_retries: 10, + initial_retry_delay_ms: 1000, + max_retry_delay_ms: 16000, + }, registry_pubkey: light_registry::ID, payer_keypair: env_accounts.forester.insecure_clone(), derivation_pubkey: env_accounts.forester.pubkey(), diff --git a/sdk-libs/client/Cargo.toml b/sdk-libs/client/Cargo.toml index fd5d6abc85..11ee04ddfd 100644 --- a/sdk-libs/client/Cargo.toml +++ b/sdk-libs/client/Cargo.toml @@ -38,7 +38,6 @@ base64 = { workspace = true } governor = { workspace = true } tracing = { workspace = true } -log = "0.4.27" [dev-dependencies] light-program-test = { workspace = true } diff --git a/sdk-libs/client/src/indexer/photon_indexer.rs b/sdk-libs/client/src/indexer/photon_indexer.rs index a81b4566ea..f0b11ede27 100644 --- a/sdk-libs/client/src/indexer/photon_indexer.rs +++ b/sdk-libs/client/src/indexer/photon_indexer.rs @@ -865,32 +865,32 @@ impl Indexer for PhotonIndexer { new_addresses_with_trees: Vec, ) -> Result { self.rate_limited_request_with_retry(|| async { - let request = photon_api::models::GetValidityProofV2PostRequest { - params: Box::new(photon_api::models::GetValidityProofPostRequestParams { - hashes: Some(hashes.iter().map(|x| x.to_base58()).collect()), - new_addresses_with_trees: Some( - new_addresses_with_trees - .iter() - .map(|x| photon_api::models::AddressWithTree { - address: x.address.to_base58(), - tree: x.tree.to_string(), - }) - .collect(), - ), - }), - ..Default::default() - }; + let request = photon_api::models::GetValidityProofV2PostRequest { + params: Box::new(photon_api::models::GetValidityProofPostRequestParams { + hashes: Some(hashes.iter().map(|x| x.to_base58()).collect()), + new_addresses_with_trees: Some( + new_addresses_with_trees + .iter() + .map(|x| photon_api::models::AddressWithTree { + address: x.address.to_base58(), + tree: x.tree.to_string(), + }) + .collect(), + ), + }), + ..Default::default() + }; - let result = photon_api::apis::default_api::get_validity_proof_v2_post( - &self.configuration, - request, - ) - .await?; + let result = photon_api::apis::default_api::get_validity_proof_v2_post( + &self.configuration, + request, + ) + .await?; - let result = Self::extract_result("get_validity_proof_v2", result.result)?; - Ok(*result.value) - }) - .await + let result = Self::extract_result("get_validity_proof_v2", result.result)?; + Ok(*result.value) + }) + .await } async fn get_indexer_slot(&self, _r: &mut R) -> Result { diff --git a/sdk-libs/client/src/rpc_pool.rs b/sdk-libs/client/src/rpc_pool.rs index 07f7c505a7..8bade44f9a 100644 --- a/sdk-libs/client/src/rpc_pool.rs +++ b/sdk-libs/client/src/rpc_pool.rs @@ -1,11 +1,11 @@ -use std::time::Duration; +use std::{cmp::min, time::Duration}; use async_trait::async_trait; use bb8::{Pool, PooledConnection}; use solana_sdk::commitment_config::CommitmentConfig; use thiserror::Error; use tokio::time::sleep; -use tracing::{debug, error}; +use tracing::{debug, error, warn}; use crate::{ rate_limiter::RateLimiter, @@ -20,6 +20,10 @@ pub enum PoolError { RpcRequest(#[from] RpcError), #[error("Pool error: {0}")] Pool(String), + #[error("Failed to get connection after {0} retries: {1}")] + MaxRetriesExceeded(u32, String), + #[error("Missing required field for RpcPoolBuilder: {0}")] + BuilderMissingField(String), } pub struct SolanaConnectionManager { @@ -75,67 +79,181 @@ impl bb8::ManageConnection for SolanaConnectionManager { #[derive(Debug)] pub struct SolanaRpcPool { pool: Pool>, + max_retries: u32, + initial_retry_delay: Duration, + max_retry_delay: Duration, } -impl SolanaRpcPool { - pub async fn new( - url: String, - commitment: CommitmentConfig, - max_size: u32, - rpc_rate_limiter: Option, - send_tx_rate_limiter: Option, - ) -> Result { - let manager = - SolanaConnectionManager::new(url, commitment, rpc_rate_limiter, send_tx_rate_limiter); +pub struct SolanaRpcPoolBuilder { + url: Option, + commitment: Option, + + max_size: u32, + connection_timeout_secs: u64, + idle_timeout_secs: u64, + max_retries: u32, + initial_retry_delay_ms: u64, + max_retry_delay_ms: u64, + + rpc_rate_limiter: Option, + send_tx_rate_limiter: Option, + _phantom: std::marker::PhantomData, +} + +impl Default for SolanaRpcPoolBuilder { + fn default() -> Self { + Self::new() + } +} + +impl SolanaRpcPoolBuilder { + pub fn new() -> Self { + Self { + url: None, + commitment: None, + max_size: 50, + connection_timeout_secs: 15, + idle_timeout_secs: 300, + max_retries: 3, + initial_retry_delay_ms: 1000, + max_retry_delay_ms: 16000, + rpc_rate_limiter: None, + send_tx_rate_limiter: None, + _phantom: std::marker::PhantomData, + } + } + + pub fn url(mut self, url: String) -> Self { + self.url = Some(url); + self + } + + pub fn commitment(mut self, commitment: CommitmentConfig) -> Self { + self.commitment = Some(commitment); + self + } + + pub fn max_size(mut self, max_size: u32) -> Self { + self.max_size = max_size; + self + } + + pub fn connection_timeout_secs(mut self, secs: u64) -> Self { + self.connection_timeout_secs = secs; + self + } + + pub fn idle_timeout_secs(mut self, secs: u64) -> Self { + self.idle_timeout_secs = secs; + self + } + + pub fn max_retries(mut self, retries: u32) -> Self { + self.max_retries = retries; + self + } + + pub fn initial_retry_delay_ms(mut self, ms: u64) -> Self { + self.initial_retry_delay_ms = ms; + self + } + + pub fn max_retry_delay_ms(mut self, ms: u64) -> Self { + self.max_retry_delay_ms = ms; + self + } + + pub fn rpc_rate_limiter(mut self, limiter: RateLimiter) -> Self { + self.rpc_rate_limiter = Some(limiter); + self + } + + pub fn send_tx_rate_limiter(mut self, limiter: RateLimiter) -> Self { + self.send_tx_rate_limiter = Some(limiter); + self + } + + pub async fn build(self) -> Result, PoolError> { + let url = self + .url + .ok_or_else(|| PoolError::BuilderMissingField("url".to_string()))?; + let commitment = self + .commitment + .ok_or_else(|| PoolError::BuilderMissingField("commitment".to_string()))?; + + let manager = SolanaConnectionManager::new( + url, + commitment, + self.rpc_rate_limiter, + self.send_tx_rate_limiter, + ); + let pool = Pool::builder() - .max_size(max_size) - .connection_timeout(Duration::from_secs(15)) - .idle_timeout(Some(Duration::from_secs(60 * 5))) + .max_size(self.max_size) + .connection_timeout(Duration::from_secs(self.connection_timeout_secs)) + .idle_timeout(Some(Duration::from_secs(self.idle_timeout_secs))) .build(manager) .await .map_err(|e| PoolError::Pool(e.to_string()))?; - Ok(Self { pool }) + Ok(SolanaRpcPool { + pool, + max_retries: self.max_retries, + initial_retry_delay: Duration::from_millis(self.initial_retry_delay_ms), + max_retry_delay: Duration::from_millis(self.max_retry_delay_ms), + }) } +} +impl SolanaRpcPool { pub async fn get_connection( &self, ) -> Result>, PoolError> { - debug!("Attempting to get RPC connection..."); - let result = self - .pool - .get() - .await - .map_err(|e| PoolError::Pool(e.to_string())); - - match result { - Ok(_) => { - debug!("Successfully got RPC connection"); - } - Err(ref e) => { - error!("Failed to get RPC connection: {:?}", e); - } - } - - result - } + let mut current_retries = 0; + let mut current_delay = self.initial_retry_delay; - pub async fn get_connection_with_retry( - &self, - max_retries: u32, - delay: Duration, - ) -> Result>, PoolError> { - let mut retries = 0; loop { + debug!( + "Attempting to get RPC connection... (Attempt {})", + current_retries + 1 + ); match self.pool.get().await { - Ok(conn) => return Ok(conn), - Err(e) if retries < max_retries => { - retries += 1; - eprintln!("Failed to get connection (attempt {}): {:?}", retries, e); - tokio::task::yield_now().await; - sleep(delay).await; + Ok(conn) => { + debug!( + "Successfully got RPC connection (Attempt {})", + current_retries + 1 + ); + return Ok(conn); + } + Err(e) => { + error!( + "Failed to get RPC connection (Attempt {}): {:?}", + current_retries + 1, + e + ); + if current_retries < self.max_retries { + current_retries += 1; + warn!( + "Retrying to get RPC connection in {:?} (Attempt {}/{})", + current_delay, + current_retries + 1, + self.max_retries + 1 + ); + tokio::task::yield_now().await; + sleep(current_delay).await; + current_delay = min(current_delay * 2, self.max_retry_delay); + } else { + error!( + "Failed to get RPC connection after {} attempts. Last error: {:?}", + self.max_retries + 1, + e + ); + return Err(PoolError::MaxRetriesExceeded( + self.max_retries + 1, + e.to_string(), + )); + } } - Err(e) => return Err(PoolError::Pool(e.to_string())), } } } diff --git a/sdk-libs/macros/fuzz/Cargo.lock b/sdk-libs/macros/fuzz/Cargo.lock index 85be1436bb..599d829a75 100644 --- a/sdk-libs/macros/fuzz/Cargo.lock +++ b/sdk-libs/macros/fuzz/Cargo.lock @@ -2,17 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom 0.2.15", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.11" @@ -31,55 +20,21 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" -[[package]] -name = "anyhow" -version = "1.0.97" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" - [[package]] name = "arbitrary" version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" -[[package]] -name = "ark-bn254" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" -dependencies = [ - "ark-ec 0.4.2", - "ark-ff 0.4.2", - "ark-std 0.4.0", -] - [[package]] name = "ark-bn254" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d69eab57e8d2663efa5c63135b2af4f396d66424f88954c21104125ab6b3e6bc" dependencies = [ - "ark-ec 0.5.0", - "ark-ff 0.5.0", - "ark-std 0.5.0", -] - -[[package]] -name = "ark-ec" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" -dependencies = [ - "ark-ff 0.4.2", - "ark-poly 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "hashbrown 0.13.2", - "itertools 0.10.5", - "num-traits", - "zeroize", + "ark-ec", + "ark-ff", + "ark-std", ] [[package]] @@ -88,71 +43,41 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" dependencies = [ - "ahash 0.8.11", - "ark-ff 0.5.0", - "ark-poly 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", + "ahash", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", "educe", "fnv", "hashbrown 0.15.2", - "itertools 0.13.0", + "itertools", "num-bigint", "num-integer", "num-traits", "zeroize", ] -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm 0.4.2", - "ark-ff-macros 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "digest 0.10.7", - "itertools 0.10.5", - "num-bigint", - "num-traits", - "paste", - "rustc_version", - "zeroize", -] - [[package]] name = "ark-ff" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70" dependencies = [ - "ark-ff-asm 0.5.0", - "ark-ff-macros 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", "arrayvec", "digest 0.10.7", "educe", - "itertools 0.13.0", + "itertools", "num-bigint", "num-traits", "paste", "zeroize", ] -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "ark-ff-asm" version = "0.5.0" @@ -163,19 +88,6 @@ dependencies = [ "syn 2.0.100", ] -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "ark-ff-macros" version = "0.5.0" @@ -189,70 +101,34 @@ dependencies = [ "syn 2.0.100", ] -[[package]] -name = "ark-poly" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" -dependencies = [ - "ark-ff 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "hashbrown 0.13.2", -] - [[package]] name = "ark-poly" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27" dependencies = [ - "ahash 0.8.11", - "ark-ff 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", + "ahash", + "ark-ff", + "ark-serialize", + "ark-std", "educe", "fnv", "hashbrown 0.15.2", ] -[[package]] -name = "ark-serialize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" -dependencies = [ - "ark-serialize-derive 0.4.2", - "ark-std 0.4.0", - "digest 0.10.7", - "num-bigint", -] - [[package]] name = "ark-serialize" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" dependencies = [ - "ark-serialize-derive 0.5.0", - "ark-std 0.5.0", + "ark-serialize-derive", + "ark-std", "arrayvec", "digest 0.10.7", "num-bigint", ] -[[package]] -name = "ark-serialize-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "ark-serialize-derive" version = "0.5.0" @@ -264,16 +140,6 @@ dependencies = [ "syn 2.0.100", ] -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - [[package]] name = "ark-std" version = "0.5.0" @@ -310,9 +176,9 @@ checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" [[package]] name = "base64" -version = "0.21.7" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bincode" @@ -328,18 +194,6 @@ name = "bitflags" version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" -dependencies = [ - "serde", -] - -[[package]] -name = "bitmaps" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" -dependencies = [ - "typenum", -] [[package]] name = "blake3" @@ -373,16 +227,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "borsh" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" -dependencies = [ - "borsh-derive 0.9.3", - "hashbrown 0.11.2", -] - [[package]] name = "borsh" version = "0.10.4" @@ -403,27 +247,14 @@ dependencies = [ "cfg_aliases", ] -[[package]] -name = "borsh-derive" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" -dependencies = [ - "borsh-derive-internal 0.9.3", - "borsh-schema-derive-internal 0.9.3", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn 1.0.109", -] - [[package]] name = "borsh-derive" version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "831213f80d9423998dd696e2c5345aba6be7a0bd8cd19e31c5243e13df1cef89" dependencies = [ - "borsh-derive-internal 0.10.4", - "borsh-schema-derive-internal 0.10.4", + "borsh-derive-internal", + "borsh-schema-derive-internal", "proc-macro-crate 0.1.5", "proc-macro2", "syn 1.0.109", @@ -442,17 +273,6 @@ dependencies = [ "syn 2.0.100", ] -[[package]] -name = "borsh-derive-internal" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "borsh-derive-internal" version = "0.10.4" @@ -464,17 +284,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "borsh-schema-derive-internal" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "borsh-schema-derive-internal" version = "0.10.4" @@ -488,9 +297,12 @@ dependencies = [ [[package]] name = "bs58" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] [[package]] name = "bumpalo" @@ -513,9 +325,6 @@ name = "bytemuck" version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540" -dependencies = [ - "bytemuck_derive", -] [[package]] name = "bytemuck_derive" @@ -528,12 +337,6 @@ dependencies = [ "syn 2.0.100", ] -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - [[package]] name = "cc" version = "1.2.19" @@ -592,31 +395,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crossbeam-deque" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - [[package]] name = "crunchy" version = "0.2.3" @@ -633,39 +411,32 @@ dependencies = [ "typenum", ] -[[package]] -name = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "curve25519-dalek" -version = "3.2.1" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "serde", + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rand_core 0.6.4", + "rustc_version", "subtle", "zeroize", ] [[package]] -name = "derivative" -version = "2.2.0" +name = "curve25519-dalek-derive" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.100", ] [[package]] @@ -738,6 +509,27 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "five8_const" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26dec3da8bc3ef08f2c04f61eab298c3ab334523e55f076354d6d6f613799a7b" +dependencies = [ + "five8_core", +] + +[[package]] +name = "five8_core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2551bf44bc5f776c15044b9b94153a00198be06743e262afaaa61f11ac7523a5" + [[package]] name = "fnv" version = "1.0.7" @@ -750,7 +542,6 @@ version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ - "serde", "typenum", "version_check", ] @@ -762,10 +553,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]] @@ -793,22 +582,13 @@ dependencies = [ "wasi 0.14.2+wasi-0.2.4", ] -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash 0.7.8", -] - [[package]] name = "hashbrown" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.11", + "ahash", ] [[package]] @@ -820,43 +600,6 @@ dependencies = [ "allocator-api2", ] -[[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-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", -] - -[[package]] -name = "im" -version = "15.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" -dependencies = [ - "bitmaps", - "rand_core 0.6.4", - "rand_xoshiro", - "rayon", - "serde", - "sized-chunks", - "typenum", - "version_check", -] - [[package]] name = "indexmap" version = "2.9.0" @@ -867,15 +610,6 @@ dependencies = [ "hashbrown 0.15.2", ] -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -885,12 +619,6 @@ dependencies = [ "either", ] -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - [[package]] name = "jobserver" version = "0.1.33" @@ -951,14 +679,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]] @@ -994,10 +720,11 @@ dependencies = [ name = "light-hasher" version = "1.1.0" dependencies = [ - "ark-bn254 0.5.0", - "ark-ff 0.5.0", + "ark-bn254", + "ark-ff", "arrayvec", - "light-poseidon 0.3.0", + "borsh 0.10.4", + "light-poseidon", "num-bigint", "sha2 0.10.8", "sha3", @@ -1005,26 +732,14 @@ dependencies = [ "thiserror 2.0.12", ] -[[package]] -name = "light-poseidon" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" -dependencies = [ - "ark-bn254 0.4.0", - "ark-ff 0.4.2", - "num-bigint", - "thiserror 1.0.69", -] - [[package]] name = "light-poseidon" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39e3d87542063daaccbfecd78b60f988079b6ec4e089249658b9455075c78d42" dependencies = [ - "ark-bn254 0.5.0", - "ark-ff 0.5.0", + "ark-bn254", + "ark-ff", "num-bigint", "thiserror 1.0.69", ] @@ -1033,9 +748,9 @@ dependencies = [ name = "light-sdk-macros" version = "0.4.0" dependencies = [ - "ark-bn254 0.5.0", + "ark-bn254", "light-hasher", - "light-poseidon 0.3.0", + "light-poseidon", "proc-macro2", "quote", "syn 2.0.100", @@ -1076,15 +791,6 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[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" @@ -1174,15 +880,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pbkdf2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" -dependencies = [ - "crypto-mac", -] - [[package]] name = "ppv-lite86" version = "0.2.21" @@ -1305,35 +1002,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_xoshiro" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" -dependencies = [ - "rand_core 0.6.4", -] - -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - [[package]] name = "redox_syscall" version = "0.5.11" @@ -1343,12 +1011,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustc_version" version = "0.4.1" @@ -1364,12 +1026,6 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - [[package]] name = "scopeguard" version = "1.2.0" @@ -1411,18 +1067,6 @@ dependencies = [ "syn 2.0.100", ] -[[package]] -name = "serde_json" -version = "1.0.140" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - [[package]] name = "sha2" version = "0.9.9" @@ -1464,126 +1108,805 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] -name = "sized-chunks" -version = "0.6.5" +name = "smallvec" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" + +[[package]] +name = "solana-account" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +checksum = "0f949fe4edaeaea78c844023bfc1c898e0b1f5a100f8a8d2d0f85d0a7b090258" dependencies = [ - "bitmaps", - "typenum", + "solana-account-info", + "solana-clock", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", ] [[package]] -name = "smallvec" -version = "1.15.0" +name = "solana-account-info" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" +checksum = "e0c17d606a298a205fae325489fbed88ee6dc4463c111672172327e741c8905d" +dependencies = [ + "bincode", + "serde", + "solana-program-error", + "solana-program-memory", + "solana-pubkey", +] [[package]] -name = "solana-frozen-abi" -version = "1.18.22" +name = "solana-address-lookup-table-interface" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20a6ef2db80dceb124b7bf81cca3300804bf427d2711973fc3df450ed7dfb26d" +checksum = "d1673f67efe870b64a65cb39e6194be5b26527691ce5922909939961a6e6b395" +dependencies = [ + "bincode", + "bytemuck", + "serde", + "serde_derive", + "solana-clock", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", + "solana-slot-hashes", +] + +[[package]] +name = "solana-atomic-u64" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52e52720efe60465b052b9e7445a01c17550666beec855cce66f44766697bc2" +dependencies = [ + "parking_lot", +] + +[[package]] +name = "solana-big-mod-exp" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75db7f2bbac3e62cfd139065d15bcda9e2428883ba61fc8d27ccb251081e7567" +dependencies = [ + "num-bigint", + "num-traits", + "solana-define-syscall", +] + +[[package]] +name = "solana-bincode" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19a3787b8cf9c9fe3dd360800e8b70982b9e5a8af9e11c354b6665dd4a003adc" +dependencies = [ + "bincode", + "serde", + "solana-instruction", +] + +[[package]] +name = "solana-blake3-hasher" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a0801e25a1b31a14494fc80882a036be0ffd290efc4c2d640bfcca120a4672" +dependencies = [ + "blake3", + "solana-define-syscall", + "solana-hash", + "solana-sanitize", +] + +[[package]] +name = "solana-borsh" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "718333bcd0a1a7aed6655aa66bef8d7fb047944922b2d3a18f49cbc13e73d004" +dependencies = [ + "borsh 0.10.4", + "borsh 1.5.7", +] + +[[package]] +name = "solana-clock" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c2177a1b9fe8326004f1151a5acd124420b737811080b1035df31349e4d892" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-cpi" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dc71126edddc2ba014622fc32d0f5e2e78ec6c5a1e0eb511b85618c09e9ea11" +dependencies = [ + "solana-account-info", + "solana-define-syscall", + "solana-instruction", + "solana-program-error", + "solana-pubkey", + "solana-stable-layout", +] + +[[package]] +name = "solana-decode-error" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a6a6383af236708048f8bd8d03db8ca4ff7baf4a48e5d580f4cce545925470" +dependencies = [ + "num-traits", +] + +[[package]] +name = "solana-define-syscall" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf784bb2cb3e02cac9801813c30187344228d2ae952534902108f6150573a33d" + +[[package]] +name = "solana-epoch-rewards" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b575d3dd323b9ea10bb6fe89bf6bf93e249b215ba8ed7f68f1a3633f384db7" +dependencies = [ + "serde", + "serde_derive", + "solana-hash", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-epoch-schedule" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fce071fbddecc55d727b1d7ed16a629afe4f6e4c217bc8d00af3b785f6f67ed" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-example-mocks" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84461d56cbb8bb8d539347151e0525b53910102e4bced875d49d5139708e39d3" +dependencies = [ + "serde", + "serde_derive", + "solana-address-lookup-table-interface", + "solana-clock", + "solana-hash", + "solana-instruction", + "solana-keccak-hasher", + "solana-message", + "solana-nonce", + "solana-pubkey", + "solana-sdk-ids", + "solana-system-interface", + "thiserror 2.0.12", +] + +[[package]] +name = "solana-feature-gate-interface" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9c7fbf3e58b64a667c5f35e90af580538a95daea7001ff7806c0662d301bdf" +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-fee-calculator" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89bc408da0fb3812bc3008189d148b4d3e08252c79ad810b245482a3f70cd8d" dependencies = [ - "block-buffer 0.10.4", - "bs58", - "bv", - "either", - "generic-array", - "im", - "lazy_static", "log", - "memmap2", - "rustc_version", + "serde", + "serde_derive", +] + +[[package]] +name = "solana-hash" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf7bcb14392900fe02e4e34e90234fbf0c673d4e327888410ba99fa2ba0f4e99" +dependencies = [ + "borsh 1.5.7", + "bs58", + "bytemuck", + "bytemuck_derive", + "js-sys", + "serde", + "serde_derive", + "solana-atomic-u64", + "solana-sanitize", + "wasm-bindgen", +] + +[[package]] +name = "solana-instruction" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce496a475e5062ba5de97215ab39d9c358f9c9df4bb7f3a45a1f1a8bd9065ed" +dependencies = [ + "bincode", + "borsh 1.5.7", + "getrandom 0.2.15", + "js-sys", + "num-traits", + "serde", + "serde_derive", + "solana-define-syscall", + "solana-pubkey", + "wasm-bindgen", +] + +[[package]] +name = "solana-instructions-sysvar" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "427f2d0d6dc0bb49f16cef5e7f975180d2e80aab9bdd3b2af68e2d029ec63f43" +dependencies = [ + "bitflags", + "solana-account-info", + "solana-instruction", + "solana-program-error", + "solana-pubkey", + "solana-sanitize", + "solana-sdk-ids", + "solana-serialize-utils", + "solana-sysvar-id", +] + +[[package]] +name = "solana-keccak-hasher" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7aeb957fbd42a451b99235df4942d96db7ef678e8d5061ef34c9b34cae12f79" +dependencies = [ + "sha3", + "solana-define-syscall", + "solana-hash", + "solana-sanitize", +] + +[[package]] +name = "solana-last-restart-slot" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a6360ac2fdc72e7463565cd256eedcf10d7ef0c28a1249d261ec168c1b55cdd" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-loader-v2-interface" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8ab08006dad78ae7cd30df8eea0539e207d08d91eaefb3e1d49a446e1c49654" +dependencies = [ "serde", "serde_bytes", "serde_derive", - "sha2 0.10.8", - "solana-frozen-abi-macro", - "subtle", - "thiserror 1.0.69", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", ] [[package]] -name = "solana-frozen-abi-macro" -version = "1.18.22" +name = "solana-loader-v3-interface" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70088de7d4067d19a7455609e2b393e6086bd847bb39c4d2bf234fc14827ef9e" +checksum = "fa4be76cfa9afd84ca2f35ebc09f0da0f0092935ccdac0595d98447f259538c2" dependencies = [ - "proc-macro2", - "quote", - "rustc_version", - "syn 2.0.100", + "serde", + "serde_bytes", + "serde_derive", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", + "solana-system-interface", +] + +[[package]] +name = "solana-loader-v4-interface" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "706a777242f1f39a83e2a96a2a6cb034cb41169c6ecbee2cf09cb873d9659e7e" +dependencies = [ + "serde", + "serde_bytes", + "serde_derive", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", + "solana-system-interface", +] + +[[package]] +name = "solana-message" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c6bf99c4570173710107a1f233f3bee226feea5fc817308707d4f7cb100a72d" +dependencies = [ + "bincode", + "blake3", + "lazy_static", + "serde", + "serde_derive", + "solana-bincode", + "solana-hash", + "solana-instruction", + "solana-pubkey", + "solana-sanitize", + "solana-sdk-ids", + "solana-short-vec", + "solana-system-interface", + "solana-transaction-error", + "wasm-bindgen", +] + +[[package]] +name = "solana-msg" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36a1a14399afaabc2781a1db09cb14ee4cc4ee5c7a5a3cfcc601811379a8092" +dependencies = [ + "solana-define-syscall", +] + +[[package]] +name = "solana-native-token" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307fb2f78060995979e9b4f68f833623565ed4e55d3725f100454ce78a99a1a3" + +[[package]] +name = "solana-nonce" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703e22eb185537e06204a5bd9d509b948f0066f2d1d814a6f475dafb3ddf1325" +dependencies = [ + "serde", + "serde_derive", + "solana-fee-calculator", + "solana-hash", + "solana-pubkey", + "solana-sha256-hasher", ] [[package]] name = "solana-program" -version = "1.18.22" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb2b2c8babfae4cace1a25b6efa00418f3acd852cf55d7cecc0360d3c5050479" +checksum = "586469467e93ceb79048f8d8e3a619bf61d05396ee7de95cb40280301a589d05" dependencies = [ - "ark-bn254 0.4.0", - "ark-ec 0.4.2", - "ark-ff 0.4.2", - "ark-serialize 0.4.2", - "base64 0.21.7", "bincode", - "bitflags", "blake3", "borsh 0.10.4", - "borsh 0.9.3", "borsh 1.5.7", "bs58", - "bv", "bytemuck", - "cc", "console_error_panic_hook", "console_log", - "curve25519-dalek", "getrandom 0.2.15", - "itertools 0.10.5", - "js-sys", "lazy_static", - "libc", - "libsecp256k1", - "light-poseidon 0.2.0", "log", "memoffset", "num-bigint", "num-derive", "num-traits", - "parking_lot", "rand 0.8.5", - "rustc_version", - "rustversion", "serde", "serde_bytes", "serde_derive", - "serde_json", - "sha2 0.10.8", - "sha3", - "solana-frozen-abi", - "solana-frozen-abi-macro", + "solana-account-info", + "solana-address-lookup-table-interface", + "solana-atomic-u64", + "solana-big-mod-exp", + "solana-bincode", + "solana-blake3-hasher", + "solana-borsh", + "solana-clock", + "solana-cpi", + "solana-decode-error", + "solana-define-syscall", + "solana-epoch-rewards", + "solana-epoch-schedule", + "solana-example-mocks", + "solana-feature-gate-interface", + "solana-fee-calculator", + "solana-hash", + "solana-instruction", + "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", + "solana-nonce", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-memory", + "solana-program-option", + "solana-program-pack", + "solana-pubkey", + "solana-rent", + "solana-sanitize", + "solana-sdk-ids", "solana-sdk-macro", - "thiserror 1.0.69", - "tiny-bip39", + "solana-secp256k1-recover", + "solana-serde-varint", + "solana-serialize-utils", + "solana-sha256-hasher", + "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.12", "wasm-bindgen", - "zeroize", +] + +[[package]] +name = "solana-program-entrypoint" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "473ffe73c68d93e9f2aa726ad2985fe52760052709aaab188100a42c618060ec" +dependencies = [ + "solana-account-info", + "solana-msg", + "solana-program-error", + "solana-pubkey", +] + +[[package]] +name = "solana-program-error" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8ae2c1a8d0d4ae865882d5770a7ebca92bab9c685e43f0461682c6c05a35bfa" +dependencies = [ + "borsh 1.5.7", + "num-traits", + "serde", + "serde_derive", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-pubkey", +] + +[[package]] +name = "solana-program-memory" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b0268f6c89825fb634a34bd0c3b8fdaeaecfc3728be1d622a8ee6dd577b60d4" +dependencies = [ + "num-traits", + "solana-define-syscall", +] + +[[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-pack" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "319f0ef15e6e12dc37c597faccb7d62525a509fec5f6975ecb9419efddeb277b" +dependencies = [ + "solana-program-error", +] + +[[package]] +name = "solana-pubkey" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cad77cf9f30b971a1eec48dde6a863dcac60ba005a34dfde23736afa5c7ac667" +dependencies = [ + "borsh 0.10.4", + "borsh 1.5.7", + "bs58", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek", + "five8_const", + "getrandom 0.2.15", + "js-sys", + "num-traits", + "serde", + "serde_derive", + "solana-atomic-u64", + "solana-decode-error", + "solana-define-syscall", + "solana-sanitize", + "solana-sha256-hasher", + "wasm-bindgen", +] + +[[package]] +name = "solana-rent" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1aea8fdea9de98ca6e8c2da5827707fb3842833521b528a713810ca685d2480" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-sanitize" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61f1bc1357b8188d9c4a3af3fc55276e56987265eb7ad073ae6f8180ee54cecf" + +[[package]] +name = "solana-sdk-ids" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5d8b9cc68d5c88b062a33e23a6466722467dde0035152d8fb1afbcdf350a5f" +dependencies = [ + "solana-pubkey", ] [[package]] name = "solana-sdk-macro" -version = "1.18.22" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55c196c8050834c391a34b58e3c9fd86b15452ef1feeeafa1dbeb9d2291dfec" +checksum = "86280da8b99d03560f6ab5aca9de2e38805681df34e0bb8f238e69b29433b9df" dependencies = [ "bs58", "proc-macro2", "quote", - "rustversion", "syn 2.0.100", ] +[[package]] +name = "solana-secp256k1-recover" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baa3120b6cdaa270f39444f5093a90a7b03d296d362878f7a6991d6de3bbe496" +dependencies = [ + "libsecp256k1", + "solana-define-syscall", + "thiserror 2.0.12", +] + +[[package]] +name = "solana-serde-varint" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc07d00200d82e6def2f7f7a45738e3406b17fe54a18adcf0defa16a97ccadb" +dependencies = [ + "serde", +] + +[[package]] +name = "solana-serialize-utils" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "817a284b63197d2b27afdba829c5ab34231da4a9b4e763466a003c40ca4f535e" +dependencies = [ + "solana-instruction", + "solana-pubkey", + "solana-sanitize", +] + +[[package]] +name = "solana-sha256-hasher" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0037386961c0d633421f53560ad7c80675c0447cba4d1bb66d60974dd486c7ea" +dependencies = [ + "sha2 0.10.8", + "solana-define-syscall", + "solana-hash", +] + +[[package]] +name = "solana-short-vec" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c54c66f19b9766a56fa0057d060de8378676cb64987533fa088861858fc5a69" +dependencies = [ + "serde", +] + +[[package]] +name = "solana-slot-hashes" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c8691982114513763e88d04094c9caa0376b867a29577939011331134c301ce" +dependencies = [ + "serde", + "serde_derive", + "solana-hash", + "solana-sdk-ids", + "solana-sysvar-id", +] + +[[package]] +name = "solana-slot-history" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97ccc1b2067ca22754d5283afb2b0126d61eae734fc616d23871b0943b0d935e" +dependencies = [ + "bv", + "serde", + "serde_derive", + "solana-sdk-ids", + "solana-sysvar-id", +] + +[[package]] +name = "solana-stable-layout" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f14f7d02af8f2bc1b5efeeae71bc1c2b7f0f65cd75bcc7d8180f2c762a57f54" +dependencies = [ + "solana-instruction", + "solana-pubkey", +] + +[[package]] +name = "solana-stake-interface" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5269e89fde216b4d7e1d1739cf5303f8398a1ff372a81232abbee80e554a838c" +dependencies = [ + "borsh 0.10.4", + "borsh 1.5.7", + "num-traits", + "serde", + "serde_derive", + "solana-clock", + "solana-cpi", + "solana-decode-error", + "solana-instruction", + "solana-program-error", + "solana-pubkey", + "solana-system-interface", + "solana-sysvar-id", +] + +[[package]] +name = "solana-system-interface" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94d7c18cb1a91c6be5f5a8ac9276a1d7c737e39a21beba9ea710ab4b9c63bc90" +dependencies = [ + "js-sys", + "num-traits", + "serde", + "serde_derive", + "solana-decode-error", + "solana-instruction", + "solana-pubkey", + "wasm-bindgen", +] + +[[package]] +name = "solana-sysvar" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf6b44740d7f0c9f375d045c165bc0aab4a90658f92d6835aeb0649afaeaff9a" +dependencies = [ + "base64 0.22.1", + "bincode", + "bytemuck", + "bytemuck_derive", + "lazy_static", + "serde", + "serde_derive", + "solana-account-info", + "solana-clock", + "solana-define-syscall", + "solana-epoch-rewards", + "solana-epoch-schedule", + "solana-fee-calculator", + "solana-hash", + "solana-instruction", + "solana-instructions-sysvar", + "solana-last-restart-slot", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-memory", + "solana-pubkey", + "solana-rent", + "solana-sanitize", + "solana-sdk-ids", + "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-transaction-error" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "222a9dc8fdb61c6088baab34fc3a8b8473a03a7a5fd404ed8dd502fa79b67cb1" +dependencies = [ + "solana-instruction", + "solana-sanitize", +] + +[[package]] +name = "solana-vote-interface" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78f039b0788337bedc6c5450d2f237718f938defb5ce0e0ad8ef507e78dcd370" +dependencies = [ + "bincode", + "num-derive", + "num-traits", + "serde", + "serde_derive", + "solana-clock", + "solana-decode-error", + "solana-hash", + "solana-instruction", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", + "solana-serde-varint", + "solana-serialize-utils", + "solana-short-vec", + "solana-system-interface", +] + [[package]] name = "subtle" version = "2.6.1" @@ -1652,25 +1975,6 @@ dependencies = [ "syn 2.0.100", ] -[[package]] -name = "tiny-bip39" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" -dependencies = [ - "anyhow", - "hmac", - "once_cell", - "pbkdf2", - "rand 0.7.3", - "rustc-hash", - "sha2 0.9.9", - "thiserror 1.0.69", - "unicode-normalization", - "wasm-bindgen", - "zeroize", -] - [[package]] name = "tinyvec" version = "1.9.0" @@ -1724,15 +2028,6 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - [[package]] name = "version_check" version = "0.9.5"