- 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
230 lines
9.3 KiB
Rust
Executable File
230 lines
9.3 KiB
Rust
Executable File
use solana_program::pubkey;
|
|
use solana_sdk::pubkey::Pubkey;
|
|
|
|
|
|
pub const JITO_TIP_ACCOUNTS: &[Pubkey] = &[
|
|
pubkey!("96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5"),
|
|
pubkey!("HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe"),
|
|
pubkey!("Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY"),
|
|
pubkey!("ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49"),
|
|
pubkey!("DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh"),
|
|
pubkey!("ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt"),
|
|
pubkey!("DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL"),
|
|
pubkey!("3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT"),
|
|
];
|
|
|
|
pub const NEXTBLOCK_TIP_ACCOUNTS: &[Pubkey] = &[
|
|
pubkey!("NextbLoCkVtMGcV47JzewQdvBpLqT9TxQFozQkN98pE"),
|
|
pubkey!("NexTbLoCkWykbLuB1NkjXgFWkX9oAtcoagQegygXXA2"),
|
|
pubkey!("NeXTBLoCKs9F1y5PJS9CKrFNNLU1keHW71rfh7KgA1X"),
|
|
pubkey!("NexTBLockJYZ7QD7p2byrUa6df8ndV2WSd8GkbWqfbb"),
|
|
pubkey!("neXtBLock1LeC67jYd1QdAa32kbVeubsfPNTJC1V5At"),
|
|
pubkey!("nEXTBLockYgngeRmRrjDV31mGSekVPqZoMGhQEZtPVG"),
|
|
pubkey!("NEXTbLoCkB51HpLBLojQfpyVAMorm3zzKg7w9NFdqid"),
|
|
pubkey!("nextBLoCkPMgmG8ZgJtABeScP35qLa2AMCNKntAP7Xc"),
|
|
];
|
|
|
|
pub const ZEROSLOT_TIP_ACCOUNTS: &[Pubkey] = &[
|
|
pubkey!("Eb2KpSC8uMt9GmzyAEm5Eb1AAAgTjRaXWFjKyFXHZxF3"),
|
|
pubkey!("FCjUJZ1qozm1e8romw216qyfQMaaWKxWsuySnumVCCNe"),
|
|
pubkey!("ENxTEjSQ1YabmUpXAdCgevnHQ9MHdLv8tzFiuiYJqa13"),
|
|
pubkey!("6rYLG55Q9RpsPGvqdPNJs4z5WTxJVatMB8zV3WJhs5EK"),
|
|
pubkey!("Cix2bHfqPcKcM233mzxbLk14kSggUUiz2A87fJtGivXr"),
|
|
];
|
|
|
|
pub const NOZOMI_TIP_ACCOUNTS: &[Pubkey] = &[
|
|
pubkey!("TEMPaMeCRFAS9EKF53Jd6KpHxgL47uWLcpFArU1Fanq"),
|
|
pubkey!("noz3jAjPiHuBPqiSPkkugaJDkJscPuRhYnSpbi8UvC4"),
|
|
pubkey!("noz3str9KXfpKknefHji8L1mPgimezaiUyCHYMDv1GE"),
|
|
pubkey!("noz6uoYCDijhu1V7cutCpwxNiSovEwLdRHPwmgCGDNo"),
|
|
pubkey!("noz9EPNcT7WH6Sou3sr3GGjHQYVkN3DNirpbvDkv9YJ"),
|
|
pubkey!("nozc5yT15LazbLTFVZzoNZCwjh3yUtW86LoUyqsBu4L"),
|
|
pubkey!("nozFrhfnNGoyqwVuwPAW4aaGqempx4PU6g6D9CJMv7Z"),
|
|
pubkey!("nozievPk7HyK1Rqy1MPJwVQ7qQg2QoJGyP71oeDwbsu"),
|
|
pubkey!("noznbgwYnBLDHu8wcQVCEw6kDrXkPdKkydGJGNXGvL7"),
|
|
pubkey!("nozNVWs5N8mgzuD3qigrCG2UoKxZttxzZ85pvAQVrbP"),
|
|
pubkey!("nozpEGbwx4BcGp6pvEdAh1JoC2CQGZdU6HbNP1v2p6P"),
|
|
pubkey!("nozrhjhkCr3zXT3BiT4WCodYCUFeQvcdUkM7MqhKqge"),
|
|
pubkey!("nozrwQtWhEdrA6W8dkbt9gnUaMs52PdAv5byipnadq3"),
|
|
pubkey!("nozUacTVWub3cL4mJmGCYjKZTnE9RbdY5AP46iQgbPJ"),
|
|
pubkey!("nozWCyTPppJjRuw2fpzDhhWbW355fzosWSzrrMYB1Qk"),
|
|
pubkey!("nozWNju6dY353eMkMqURqwQEoM3SFgEKC6psLCSfUne"),
|
|
pubkey!("nozxNBgWohjR75vdspfxR5H9ceC7XXH99xpxhVGt3Bb"),
|
|
];
|
|
|
|
pub const BLOX_TIP_ACCOUNTS: &[Pubkey] = &[
|
|
pubkey!("HWEoBxYs7ssKuudEjzjmpfJVX7Dvi7wescFsVx2L5yoY"),
|
|
pubkey!("95cfoy472fcQHaw4tPGBTKpn6ZQnfEPfBgDQx6gcRmRg"),
|
|
pubkey!("3UQUKjhMKaY2S6bjcQD6yHB7utcZt5bfarRCmctpRtUd"),
|
|
pubkey!("FogxVNs6Mm2w9rnGL1vkARSwJxvLE8mujTv3LK8RnUhF"),
|
|
];
|
|
|
|
pub const NODE1_TIP_ACCOUNTS: &[Pubkey] = &[
|
|
pubkey!("node1PqAa3BWWzUnTHVbw8NJHC874zn9ngAkXjgWEej"),
|
|
pubkey!("node1UzzTxAAeBTpfZkQPJXBAqixsbdth11ba1NXLBG"),
|
|
pubkey!("node1Qm1bV4fwYnCurP8otJ9s5yrkPq7SPZ5uhj3Tsv"),
|
|
pubkey!("node1PUber6SFmSQgvf2ECmXsHP5o3boRSGhvJyPMX1"),
|
|
pubkey!("node1AyMbeqiVN6eoQzEAwCA6Pk826hrdqdAHR7cdJ3"),
|
|
pubkey!("node1YtWCoTwwVYTFLfS19zquRQzYX332hs1HEuRBjC"),
|
|
];
|
|
|
|
pub const FLASHBLOCK_TIP_ACCOUNTS: &[Pubkey] = &[
|
|
pubkey!("FLaShB3iXXTWE1vu9wQsChUKq3HFtpMAhb8kAh1pf1wi"),
|
|
pubkey!("FLashhsorBmM9dLpuq6qATawcpqk1Y2aqaZfkd48iT3W"),
|
|
pubkey!("FLaSHJNm5dWYzEgnHJWWJP5ccu128Mu61NJLxUf7mUXU"),
|
|
pubkey!("FLaSHR4Vv7sttd6TyDF4yR1bJyAxRwWKbohDytEMu3wL"),
|
|
pubkey!("FLASHRzANfcAKDuQ3RXv9hbkBy4WVEKDzoAgxJ56DiE4"),
|
|
pubkey!("FLasHstqx11M8W56zrSEqkCyhMCCpr6ze6Mjdvqope5s"),
|
|
pubkey!("FLAShWTjcweNT4NSotpjpxAkwxUr2we3eXQGhpTVzRwy"),
|
|
pubkey!("FLasHXTqrbNvpWFB6grN47HGZfK6pze9HLNTgbukfPSk"),
|
|
pubkey!("FLAshyAyBcKb39KPxSzXcepiS8iDYUhDGwJcJDPX4g2B"),
|
|
pubkey!("FLAsHZTRcf3Dy1APaz6j74ebdMC6Xx4g6i9YxjyrDybR"),
|
|
];
|
|
|
|
pub const BLOCKRAZOR_TIP_ACCOUNTS: &[Pubkey] = &[
|
|
pubkey!("FjmZZrFvhnqqb9ThCuMVnENaM3JGVuGWNyCAxRJcFpg9"),
|
|
pubkey!("6No2i3aawzHsjtThw81iq1EXPJN6rh8eSJCLaYZfKDTG"),
|
|
pubkey!("A9cWowVAiHe9pJfKAj3TJiN9VpbzMUq6E4kEvf5mUT22"),
|
|
pubkey!("Gywj98ophM7GmkDdaWs4isqZnDdFCW7B46TXmKfvyqSm"),
|
|
pubkey!("68Pwb4jS7eZATjDfhmTXgRJjCiZmw1L7Huy4HNpnxJ3o"),
|
|
pubkey!("4ABhJh5rZPjv63RBJBuyWzBK3g9gWMUQdTZP2kiW31V9"),
|
|
pubkey!("B2M4NG5eyZp5SBQrSdtemzk5TqVuaWGQnowGaCBt8GyM"),
|
|
pubkey!("5jA59cXMKQqZAVdtopv8q3yyw9SYfiE3vUCbt7p8MfVf"),
|
|
pubkey!("5YktoWygr1Bp9wiS1xtMtUki1PeYuuzuCF98tqwYxf61"),
|
|
pubkey!("295Avbam4qGShBYK7E9H5Ldew4B3WyJGmgmXfiWdeeyV"),
|
|
pubkey!("EDi4rSy2LZgKJX74mbLTFk4mxoTgT6F7HxxzG2HBAFyK"),
|
|
pubkey!("BnGKHAC386n4Qmv9xtpBVbRaUTKixjBe3oagkPFKtoy6"),
|
|
pubkey!("Dd7K2Fp7AtoN8xCghKDRmyqr5U169t48Tw5fEd3wT9mq"),
|
|
pubkey!("AP6qExwrbRgBAVaehg4b5xHENX815sMabtBzUzVB4v8S"),
|
|
];
|
|
|
|
pub const ASTRALANE_TIP_ACCOUNTS: &[Pubkey] = &[
|
|
pubkey!("astrazznxsGUhWShqgNtAdfrzP2G83DzcWVJDxwV9bF"),
|
|
pubkey!("astra4uejePWneqNaJKuFFA8oonqCE1sqF6b45kDMZm"),
|
|
pubkey!("astra9xWY93QyfG6yM8zwsKsRodscjQ2uU2HKNL5prk"),
|
|
pubkey!("astraRVUuTHjpwEVvNBeQEgwYx9w9CFyfxjYoobCZhL"),
|
|
pubkey!("astraEJ2fEj8Xmy6KLG7B3VfbKfsHXhHrNdCQx7iGJK"),
|
|
pubkey!("astraubkDw81n4LuutzSQ8uzHCv4BhPVhfvTcYv8SKC"),
|
|
pubkey!("astraZW5GLFefxNPAatceHhYjfA1ciq9gvfEg2S47xk"),
|
|
pubkey!("astrawVNP4xDBKT7rAdxrLYiTSTdqtUr63fSMduivXK"),
|
|
];
|
|
|
|
// NewYork,
|
|
// Frankfurt,
|
|
// Amsterdam,
|
|
// SLC,
|
|
// Tokyo,
|
|
// London,
|
|
// LosAngeles,
|
|
// Default,
|
|
|
|
pub const SWQOS_ENDPOINTS_JITO: [&str; 8] = [
|
|
"https://ny.mainnet.block-engine.jito.wtf",
|
|
"https://frankfurt.mainnet.block-engine.jito.wtf",
|
|
"https://amsterdam.mainnet.block-engine.jito.wtf",
|
|
"https://slc.mainnet.block-engine.jito.wtf",
|
|
"https://tokyo.mainnet.block-engine.jito.wtf",
|
|
"https://london.mainnet.block-engine.jito.wtf",
|
|
"https://ny.mainnet.block-engine.jito.wtf",
|
|
"https://mainnet.block-engine.jito.wtf",
|
|
];
|
|
|
|
pub const SWQOS_ENDPOINTS_NEXTBLOCK: [&str; 8] = [
|
|
"http://ny.nextblock.io",
|
|
"http://frankfurt.nextblock.io",
|
|
"http://amsterdam.nextblock.io",
|
|
"http://slc.nextblock.io",
|
|
"http://tokyo.nextblock.io",
|
|
"http://london.nextblock.io",
|
|
"http://singapore.nextblock.io",
|
|
"http://frankfurt.nextblock.io",
|
|
];
|
|
|
|
pub const SWQOS_ENDPOINTS_ZERO_SLOT: [&str; 8] = [
|
|
"http://ny.0slot.trade",
|
|
"http://de.0slot.trade",
|
|
"http://ams.0slot.trade",
|
|
"http://ny.0slot.trade",
|
|
"http://jp.0slot.trade",
|
|
"http://ams.0slot.trade",
|
|
"http://la.0slot.trade",
|
|
"http://de.0slot.trade",
|
|
];
|
|
|
|
pub const SWQOS_ENDPOINTS_TEMPORAL: [&str; 8] = [
|
|
"http://ewr1.nozomi.temporal.xyz",
|
|
"http://fra2.nozomi.temporal.xyz",
|
|
"http://ams1.nozomi.temporal.xyz",
|
|
"http://ewr1.nozomi.temporal.xyz",
|
|
"http://tyo1.nozomi.temporal.xyz",
|
|
"http://sgp1.nozomi.temporal.xyz",
|
|
"http://pit1.nozomi.temporal.xyz",
|
|
"http://fra2.nozomi.temporal.xyz",
|
|
];
|
|
|
|
pub const SWQOS_ENDPOINTS_BLOX: [&str; 8] = [
|
|
"https://ny.solana.dex.blxrbdn.com",
|
|
"https://germany.solana.dex.blxrbdn.com",
|
|
"https://amsterdam.solana.dex.blxrbdn.com",
|
|
"https://ny.solana.dex.blxrbdn.com",
|
|
"https://tokyo.solana.dex.blxrbdn.com",
|
|
"https://uk.solana.dex.blxrbdn.com",
|
|
"https://la.solana.dex.blxrbdn.com",
|
|
"https://germany.solana.dex.blxrbdn.com",
|
|
];
|
|
|
|
pub const SWQOS_ENDPOINTS_NODE1: [&str; 8] = [
|
|
"http://ny.node1.me",
|
|
"http://fra.node1.me",
|
|
"http://ams.node1.me",
|
|
"http://ny.node1.me",
|
|
"http://fra.node1.me",
|
|
"http://ams.node1.me",
|
|
"http://ny.node1.me",
|
|
"http://fra.node1.me",
|
|
];
|
|
|
|
pub const SWQOS_ENDPOINTS_FLASHBLOCK: [&str; 8] = [
|
|
"http://ny.flashblock.trade",
|
|
"http://fra.flashblock.trade",
|
|
"http://ams.flashblock.trade",
|
|
"http://slc.flashblock.trade",
|
|
"http://singapore.flashblock.trade",
|
|
"http://london.flashblock.trade",
|
|
"http://ny.flashblock.trade",
|
|
"http://ny.flashblock.trade",
|
|
];
|
|
|
|
pub const SWQOS_ENDPOINTS_BLOCKRAZOR: [&str; 8] = [
|
|
"http://newyork.solana.blockrazor.xyz:443/sendTransaction",
|
|
"http://frankfurt.solana.blockrazor.xyz:443/sendTransaction",
|
|
"http://amsterdam.solana.blockrazor.xyz:443/sendTransaction",
|
|
"http://newyork.solana.blockrazor.xyz:443/sendTransaction",
|
|
"http://tokyo.solana.blockrazor.xyz:443/sendTransaction",
|
|
"http://frankfurt.solana.blockrazor.xyz:443/sendTransaction",
|
|
"http://newyork.solana.blockrazor.xyz:443/sendTransaction",
|
|
"http://frankfurt.solana.blockrazor.xyz:443/sendTransaction",
|
|
];
|
|
|
|
pub const SWQOS_ENDPOINTS_ASTRALANE: [&str; 8] = [
|
|
"http://ny.gateway.astralane.io/iris",
|
|
"http://fr.gateway.astralane.io/iris",
|
|
"http://ams.gateway.astralane.io/iris",
|
|
"http://ny.gateway.astralane.io/iris",
|
|
"http://jp.gateway.astralane.io/iris",
|
|
"http://ny.gateway.astralane.io/iris",
|
|
"http://lax.gateway.astralane.io/iris",
|
|
"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;
|