Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
cc93ca1
driver: parallel unsupported order detection
metalurgical Apr 20, 2026
889f437
driver(tests): unsupported_order_uids test cases
metalurgical Apr 22, 2026
ae060d2
lint: run cargo fmt
metalurgical Apr 22, 2026
c5cf81d
refactor
metalurgical Apr 29, 2026
8ae2e9b
refactor: implement trait to cover simulation branch in test
metalurgical Apr 29, 2026
144212f
fix: lint
metalurgical Apr 30, 2026
8375c44
fix: lint
metalurgical Apr 30, 2026
13d0be9
Merge branch 'main' into fix_chore_3516
metalurgical May 1, 2026
5ad8f6b
update: use tokio::spawn to schedule filtering and liquidity fetching…
metalurgical May 1, 2026
b56b2b9
review: address comments
metalurgical May 4, 2026
6045c8b
refactor: simplify test
metalurgical May 5, 2026
ede7489
review: address additional review comments
metalurgical May 5, 2026
efc6d90
fix: comment
metalurgical May 5, 2026
e01df58
fix: comment
metalurgical May 5, 2026
9dac353
Merge branch 'main' into fix_chore_3516
metalurgical May 5, 2026
5707a99
Merge branch 'main' into fix_chore_3516
metalurgical May 6, 2026
c06963a
refactor: separate concerns in without_unsupported_orders
metalurgical May 6, 2026
60e766f
update
metalurgical May 7, 2026
f41f0d9
Merge branch 'main' into fix_chore_3516
metalurgical May 8, 2026
e954f2c
update: flashloan test for quote changes
metalurgical May 9, 2026
035b6bf
fix: flashloan quote test names
metalurgical May 9, 2026
9aa8acc
Merge branch 'main' into fix_chore_3516
metalurgical May 11, 2026
e17a6ae
Merge branch 'main' into fix_chore_3516
metalurgical May 11, 2026
405dfc9
Merge branch 'main' into fix_chore_3516
metalurgical May 12, 2026
be82231
Merge branch 'main' into fix_chore_3516
metalurgical May 16, 2026
e9ce935
Merge branch 'main' into fix_chore_3516
metalurgical May 21, 2026
b6293f1
Merge branch 'main' into fix_chore_3516
metalurgical May 22, 2026
0e22fb0
Merge branch 'main' into fix_chore_3516
metalurgical May 24, 2026
fcc1f50
Merge branch 'main' into fix_chore_3516
metalurgical May 26, 2026
4f06588
Merge branch 'main' into fix_chore_3516
metalurgical May 27, 2026
01b1703
Merge branch 'main' into fix_chore_3516
metalurgical May 29, 2026
3fab09c
Merge branch 'main' into fix_chore_3516
metalurgical May 30, 2026
f9e8b33
Merge branch 'main' into fix_chore_3516
metalurgical Jun 2, 2026
49c0f66
Merge branch 'main' into fix_chore_3516
metalurgical Jun 5, 2026
21ea1fb
Merge branch 'main' into fix_chore_3516
metalurgical Jun 9, 2026
58ac443
Merge branch 'main' into fix_chore_3516
metalurgical Jun 9, 2026
09609b1
Merge branch 'main' into fix_chore_3516
metalurgical Jun 15, 2026
65614c8
Merge remote-tracking branch 'upstream/main' into fix_chore_3516
metalurgical Jun 20, 2026
4135259
update
metalurgical Jun 20, 2026
53514c9
cargo-fmt
metalurgical Jun 20, 2026
5f1f50e
add abort guard
metalurgical Jun 20, 2026
ed1decb
update
metalurgical Jun 20, 2026
93f0024
Merge branch 'main' into fix_chore_3516
metalurgical Jun 25, 2026
d7fdb55
Merge branch 'main' into fix_chore_3516
metalurgical Jun 26, 2026
fe6e0dd
Merge remote-tracking branch 'upstream/main' into fix_chore_3516
metalurgical Jun 30, 2026
018bf15
fix regression
metalurgical Jul 2, 2026
4e22e75
Merge branch 'main' into fix_chore_3516
metalurgical Jul 2, 2026
086086d
Merge branch 'main' into fix_chore_3516
metalurgical Jul 3, 2026
4a05533
Merge branch 'main' into fix_chore_3516
metalurgical Jul 7, 2026
926bf29
Merge branch 'main' into fix_chore_3516
metalurgical Jul 7, 2026
0128cee
Merge branch 'main' into fix_chore_3516
metalurgical Jul 9, 2026
8180edd
Merge branch 'main' into fix_chore_3516
metalurgical Jul 10, 2026
d5337a8
Merge branch 'main' into fix_chore_3516
metalurgical Jul 13, 2026
7ac2f17
Merge branch 'main' into fix_chore_3516
metalurgical Jul 19, 2026
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
29 changes: 13 additions & 16 deletions crates/driver/src/domain/competition/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use {
time::Instant,
},
tokio::{sync::mpsc, task},
tracing::{Instrument, instrument},
tracing::Instrument,
};

pub mod auction;
Expand Down Expand Up @@ -339,11 +339,11 @@ impl Competition {
Self::sort_orders(auction, solver_address, order_sorting_strategies)
});

// We can sort the orders and fetch auction data in parallel
// We can sort the orders and fetch auction data in parallel.
let (auction, balances, app_data) =
tokio::join!(sort_orders_future, tasks.balances, tasks.app_data);

let auction = Self::run_blocking_with_timer("update_orders", move || {
let mut auction = Self::run_blocking_with_timer("update_orders", move || {
// Same as before with sort_orders, we use spawn_blocking() because a lot of CPU
// bound computations are happening and we want to avoid blocking
// the runtime.
Expand All @@ -352,14 +352,21 @@ impl Competition {
.await;

// We can run bad token filtering and liquidity fetching in parallel
let (liquidity, auction) = tokio::join!(
let (_, liquidity) = tokio::join!(
async {
self.risk_detector
.filter_unsupported_orders_in_auction(
&mut auction,
self.solver.config().flashloans_enabled,
)
.await
},
async {
match self.solver.liquidity() {
solver::Liquidity::Fetch => tasks.liquidity.await,
solver::Liquidity::Skip => Arc::new(Vec::new()),
}
},
self.without_unsupported_orders(auction)
}
);

let elapsed = start.elapsed();
Expand Down Expand Up @@ -951,16 +958,6 @@ impl Competition {
}
Ok(())
}

#[instrument(skip_all)]
async fn without_unsupported_orders(&self, mut auction: Auction) -> Auction {
if !self.solver.config().flashloans_enabled {
auction.orders.retain(|o| o.app_data.flashloan().is_none());
}
self.risk_detector
.filter_unsupported_orders_in_auction(auction)
.await
}
}

const MAX_SOLUTIONS_TO_MERGE: usize = 10;
Expand Down
Loading
Loading