Skip to content

Conversation

@squadgazzz
Copy link
Contributor

Description

When the driver's COW AMM config is empty, the corresponding task still tries to search for surplus capturing jit order owners among the AMMs and fires a redundant warning log in that case. When the driver doesn't expect any AMMs, this log doesn't make any sense. This PR fixes this.

Changes

  • Make the COW AMM cache optional based on the COW AMMs config.
  • When None, return fast with no AMMs for every auction with no redundant logs.

How to test

Logs on chains where COW AMMs are not configured.

Related Issues

Fixes #3890

Copilot AI review requested due to automatic review settings November 25, 2025 21:05
@squadgazzz squadgazzz requested a review from a team as a code owner November 25, 2025 21:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR optimizes the COW AMM preprocessing flow by making the COW AMM cache optional when no COW AMMs are configured. This prevents unnecessary processing and eliminates spurious warning logs on chains where COW AMMs are not expected.

  • Modified Cache::new to return Option<Self>, returning None when factory mappings are empty
  • Made cow_amm_cache field optional in preprocessing utilities
  • Added early return in cow_amm_orders method when cache is not configured

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
crates/driver/src/domain/cow_amm.rs Modified Cache::new to return Option<Self>, returning None when no factory mappings are configured
crates/driver/src/domain/competition/pre_processing.rs Changed cow_amm_cache field to Option<cow_amm::Cache> and added early return logic in cow_amm_orders to handle unconfigured scenarios

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fafk fafk added this pull request to the merge queue Nov 26, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 26, 2025
@squadgazzz squadgazzz added this pull request to the merge queue Nov 26, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 26, 2025
@fafk fafk added this pull request to the merge queue Nov 26, 2025
Merged via the queue into main with commit dd6ec13 Nov 26, 2025
18 checks passed
@fafk fafk deleted the fix-amm-maintenance-when-not-configured branch November 26, 2025 12:53
@github-actions github-actions bot locked and limited conversation to collaborators Nov 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug:Irrelevant warning messages.

5 participants