Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions crates/autopilot/src/arguments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ pub struct Arguments {
#[clap(long, env, default_value = "false", action = clap::ArgAction::Set)]
pub disable_order_filtering: bool,

// Filter out orders that have not been presigned even if disable_order_filtering is turned on.
#[clap(long, env, default_value = "false", action = clap::ArgAction::Set)]
pub force_presign_order_filtering: bool,

/// Enables the usage of leader lock in the database
/// The second instance of autopilot will act as a follower
/// and not cut any auctions.
Expand Down Expand Up @@ -397,6 +401,7 @@ impl std::fmt::Display for Arguments {
db_based_solver_participation_guard,
disable_order_filtering,
enable_leader_lock,
force_presign_order_filtering,
} = self;

write!(f, "{shared}")?;
Expand Down Expand Up @@ -472,6 +477,10 @@ impl std::fmt::Display for Arguments {
"db_based_solver_participation_guard: {db_based_solver_participation_guard:?}"
)?;
writeln!(f, "disable_order_filtering: {disable_order_filtering}")?;
writeln!(
f,
"force_presign_order_filtering: {force_presign_order_filtering}"
)?;
writeln!(f, "enable_leader_lock: {enable_leader_lock}")?;
Ok(())
}
Expand Down
1 change: 1 addition & 0 deletions crates/autopilot/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ pub async fn run(args: Arguments, shutdown_controller: ShutdownController) {
args.run_loop_native_price_timeout,
eth.contracts().settlement().address().into_legacy(),
args.disable_order_filtering,
args.force_presign_order_filtering,
);

let liveness = Arc::new(Liveness::new(args.max_auction_age));
Expand Down
5 changes: 4 additions & 1 deletion crates/autopilot/src/solvable_orders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ pub struct SolvableOrdersCache {
native_price_timeout: Duration,
settlement_contract: H160,
disable_order_filters: bool,
force_presign_order_filtering: bool,
}

type Balances = HashMap<Query, U256>;
Expand All @@ -128,6 +129,7 @@ impl SolvableOrdersCache {
native_price_timeout: Duration,
settlement_contract: H160,
disable_order_filters: bool,
force_presign_order_filtering: bool,
) -> Arc<Self> {
Arc::new(Self {
min_order_validity_period,
Expand All @@ -146,6 +148,7 @@ impl SolvableOrdersCache {
native_price_timeout,
settlement_contract,
disable_order_filters,
force_presign_order_filtering,
})
}

Expand Down Expand Up @@ -390,7 +393,7 @@ impl SolvableOrdersCache {
invalid_order_uids: &mut HashSet<OrderUid>,
) -> Vec<Order> {
let filter_invalid_signatures = async {
if self.disable_order_filters {
if self.disable_order_filters && !self.force_presign_order_filtering {
return Default::default();
}
find_invalid_signature_orders(&orders, self.signature_validator.as_ref()).await
Expand Down
Loading