feat: optimize RPC polling and remove data size limit
Significantly reduce RPC pressure and fix MaxLoadedAccountsDataSizeExceeded errors. Major improvements: 1. Add wait_confirmation parameter to all swqos clients - Skip polling entirely when wait_transaction_confirmed=false (100% RPC reduction) - Optimize getTransaction calls to only execute on errors or after 10s (50% reduction) - Update all 13 swqos client implementations 2. Remove LoadedAccountsDataSize instruction and data_size_limit parameter - Eliminate MaxLoadedAccountsDataSizeExceeded errors reported by users - Clean up gas_fee_strategy, params, and transaction builder - Simplify compute budget instruction generation Results: - Single channel: 30 RPC calls → 0-15 calls (50-100% reduction) - Multi-channel (3x): 90 RPC calls → 0-45 calls (50-100% reduction) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.5
parent
710de8a92a
commit
321f4c4a25
+2
-2
@@ -126,8 +126,8 @@ pub type SwqosClient = dyn SwqosClientTrait + Send + Sync + 'static;
|
||||
|
||||
#[async_trait::async_trait]
|
||||
pub trait SwqosClientTrait {
|
||||
async fn send_transaction(&self, trade_type: TradeType, transaction: &VersionedTransaction) -> Result<()>;
|
||||
async fn send_transactions(&self, trade_type: TradeType, transactions: &Vec<VersionedTransaction>) -> Result<()>;
|
||||
async fn send_transaction(&self, trade_type: TradeType, transaction: &VersionedTransaction, wait_confirmation: bool) -> Result<()>;
|
||||
async fn send_transactions(&self, trade_type: TradeType, transactions: &Vec<VersionedTransaction>, wait_confirmation: bool) -> Result<()>;
|
||||
fn get_tip_account(&self) -> Result<String>;
|
||||
fn get_swqos_type(&self) -> SwqosType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user