feat(swqos): add minimum tip constants and conditional transaction building

- Define minimum tip constants for each SWQOS provider (JITO, NextBlock, Node1, etc.)
- Add dynamic filtering in execute_parallel to skip transaction building when tip is below provider's minimum
- Add missing SWQOS_ENDPOINTS_ASTRALANE constant
- Ensure SWQOS clients are always initialized but transactions are conditionally built based on current tip amount
This commit is contained in:
Wood
2025-11-24 06:03:31 +08:00
parent 3132981f85
commit 5358d9ea28
3 changed files with 43 additions and 15 deletions
+10
View File
@@ -217,3 +217,13 @@ pub const SWQOS_ENDPOINTS_ASTRALANE: [&str; 8] = [
"http://lim.gateway.astralane.io/iris",
];
pub const SWQOS_MIN_TIP_DEFAULT: f64 = 0.00001; // 其它SWQOS默认最低小费
pub const SWQOS_MIN_TIP_JITO: f64 = SWQOS_MIN_TIP_DEFAULT;
pub const SWQOS_MIN_TIP_NEXTBLOCK: f64 = SWQOS_MIN_TIP_DEFAULT;
pub const SWQOS_MIN_TIP_ZERO_SLOT: f64 = SWQOS_MIN_TIP_DEFAULT;
pub const SWQOS_MIN_TIP_TEMPORAL: f64 = SWQOS_MIN_TIP_DEFAULT;
pub const SWQOS_MIN_TIP_BLOXROUTE: f64 = SWQOS_MIN_TIP_DEFAULT;
pub const SWQOS_MIN_TIP_NODE1: f64 = 0.002; // 如需更高阈值可调整
pub const SWQOS_MIN_TIP_FLASHBLOCK: f64 = SWQOS_MIN_TIP_DEFAULT;
pub const SWQOS_MIN_TIP_BLOCKRAZOR: f64 = SWQOS_MIN_TIP_DEFAULT;
pub const SWQOS_MIN_TIP_ASTRALANE: f64 = SWQOS_MIN_TIP_DEFAULT;