From 7a08370347990f828d2bb5138304709853b76f6f Mon Sep 17 00:00:00 2001 From: MartinquaXD Date: Thu, 18 Dec 2025 13:00:43 +0000 Subject: [PATCH] Remove soft cancellation --- crates/driver/example.toml | 1 - crates/driver/src/infra/config/file/load.rs | 1 - crates/driver/src/infra/config/file/mod.rs | 11 ----------- crates/driver/src/infra/mempool/mod.rs | 1 - crates/driver/src/tests/setup/solver.rs | 1 - 5 files changed, 15 deletions(-) diff --git a/crates/driver/example.toml b/crates/driver/example.toml index 26df5b6ce2..126973f2e5 100644 --- a/crates/driver/example.toml +++ b/crates/driver/example.toml @@ -26,7 +26,6 @@ url = "https://your.custom.rpc.endpoint" name = "custom_name" max-additional-tip = "5000000000" additional-tip-percentage = 0.05 -use-soft-cancellations = false mines-reverting-txs = true [contracts] # Optionally override the contract addresses, necessary on less popular blockchains diff --git a/crates/driver/src/infra/config/file/load.rs b/crates/driver/src/infra/config/file/load.rs index c766492bb7..f99811ac67 100644 --- a/crates/driver/src/infra/config/file/load.rs +++ b/crates/driver/src/infra/config/file/load.rs @@ -342,7 +342,6 @@ pub async fn load(chain: Chain, path: &Path) -> infra::Config { }, max_additional_tip: mempool.max_additional_tip, additional_tip_percentage: mempool.additional_tip_percentage, - use_soft_cancellations: mempool.use_soft_cancellations, }) .collect(), simulator: match (config.tenderly, config.enso) { diff --git a/crates/driver/src/infra/config/file/mod.rs b/crates/driver/src/infra/config/file/mod.rs index 0ccae1db7c..b060cb1830 100644 --- a/crates/driver/src/infra/config/file/mod.rs +++ b/crates/driver/src/infra/config/file/mod.rs @@ -162,13 +162,6 @@ struct Mempool { /// floating point value between 0 and 1. #[serde(default = "default_additional_tip_percentage")] additional_tip_percentage: f64, - /// Configures whether the submission logic is allowed to assume the - /// submission nodes implement soft cancellations. With soft - /// cancellations a cancellation transaction doesn't have to get mined - /// to have an effect. On arrival in the node all pending transactions - /// with the same sender and nonce will get discarded immediately. - #[serde(default = "default_soft_cancellations_flag")] - use_soft_cancellations: bool, /// Informs the submission logic whether a reverting transaction will /// actually be mined or just ignored. This is an advanced feature /// for private mempools so for most configured mempools you have to @@ -226,10 +219,6 @@ fn default_max_additional_tip() -> eth::U256 { eth::U256::from(3) * eth::U256::from(10).pow(eth::U256::from(9)) } -fn default_soft_cancellations_flag() -> bool { - false -} - fn default_mines_reverting_txs() -> bool { true } diff --git a/crates/driver/src/infra/mempool/mod.rs b/crates/driver/src/infra/mempool/mod.rs index 46291dfa9f..3969da83b4 100644 --- a/crates/driver/src/infra/mempool/mod.rs +++ b/crates/driver/src/infra/mempool/mod.rs @@ -22,7 +22,6 @@ pub struct Config { /// web3 lib's default behavior, which is `latest`. pub nonce_block_number: Option, pub url: reqwest::Url, - pub use_soft_cancellations: bool, pub name: String, pub revert_protection: RevertProtection, pub max_additional_tip: eth::U256, diff --git a/crates/driver/src/tests/setup/solver.rs b/crates/driver/src/tests/setup/solver.rs index c24f206772..7ed2eb695c 100644 --- a/crates/driver/src/tests/setup/solver.rs +++ b/crates/driver/src/tests/setup/solver.rs @@ -462,7 +462,6 @@ impl Solver { additional_tip_percentage: 0., revert_protection: infra::mempool::RevertProtection::Disabled, nonce_block_number: None, - use_soft_cancellations: false, url: config.blockchain.web3_url.parse().unwrap(), }], )