feat: Helius Sender SWQOS support and global check_min_tip option
- Add Helius Sender client (helius.rs) with dual routing and swqos_only mode - Helius min tip: 0.0002 SOL default, 0.000005 SOL when swqos_only=true - Add TradeConfig.check_min_tip (default false) to skip min-tip validation for lower latency - Thread check_min_tip through SwapParams and execute_parallel; only call min_tip_sol when enabled - Add SWQOS_ENDPOINTS_HELIUS and HELIUS_TIP_ACCOUNTS in constants - Extend SwqosConfig/SwqosType for Helius; add Helius to get_endpoint and get_swqos_client - Update trading_client, shared_infrastructure and middleware_system examples Made-with: Cursor
This commit is contained in:
@@ -76,6 +76,8 @@ pub struct TradeConfig {
|
||||
pub use_core_affinity: bool,
|
||||
/// Whether to output all SDK logs (timing, SWQOS submit/confirm, WSOL, blacklist, etc.). Default true.
|
||||
pub log_enabled: bool,
|
||||
/// Whether to check minimum tip per SWQOS provider (filter out configs below min). Default false to save latency.
|
||||
pub check_min_tip: bool,
|
||||
}
|
||||
|
||||
impl TradeConfig {
|
||||
@@ -96,6 +98,7 @@ impl TradeConfig {
|
||||
use_seed_optimize: true, // default: use seed optimization
|
||||
use_core_affinity: true, // default: pin parallel submit tasks to cores
|
||||
log_enabled: true, // default: enable all SDK logs
|
||||
check_min_tip: false, // default: skip min tip check to reduce latency
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,6 +112,12 @@ impl TradeConfig {
|
||||
self.use_seed_optimize = use_seed_optimize;
|
||||
self
|
||||
}
|
||||
|
||||
/// Set whether to check minimum tip per SWQOS (filter out configs below min). Default false for lower latency.
|
||||
pub fn with_check_min_tip(mut self, check_min_tip: bool) -> Self {
|
||||
self.check_min_tip = check_min_tip;
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
pub type SolanaRpcClient = solana_client::nonblocking::rpc_client::RpcClient;
|
||||
|
||||
Reference in New Issue
Block a user