Skip to content

fix: only accept a single solver for each pool#6

Merged
think-in-universe merged 22 commits intomainfrom
fix/ensure-single-solver
Sep 1, 2025
Merged

fix: only accept a single solver for each pool#6
think-in-universe merged 22 commits intomainfrom
fix/ensure-single-solver

Conversation

@think-in-universe
Copy link
Copy Markdown
Collaborator

No description provided.

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@bowenwang1996 bowenwang1996 left a comment

Choose a reason for hiding this comment

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

It looks like there are no tests for enforcing a single worker. Could you add such a test?

Copy link
Copy Markdown

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 modifies the solver registry system to enforce only a single active solver per pool, aligning with the title "fix: only accept a single solver for each pool".

Key Changes:

  • Refactored test infrastructure by moving utility functions and constants to a common module structure
  • Updated Docker Compose to rename service from cvm_runner to intents_tee_amm_solver
  • Added comprehensive test coverage for single active worker per pool functionality

Reviewed Changes

Copilot reviewed 23 out of 25 changed files in this pull request and generated no comments.

Show a summary per file
File Description
server/docker-compose.yaml Renames service to better reflect its purpose as an intents TEE AMM solver
contracts/solver-registry/tests/utils.rs Removed original utility file - functionality moved to common module
contracts/solver-registry/tests/test_single_active_worker.rs New comprehensive test suite for single active worker enforcement
contracts/solver-registry/tests/test_register_worker.rs New test suite for worker registration functionality
contracts/solver-registry/tests/test_basics.rs Removed original basic tests - replaced by more comprehensive test structure
samples/* Updated test data files with separated Alice/Bob data for multi-worker testing
constants.rs Moved constants to common module structure
Comments suppressed due to low confidence (2)

contracts/solver-registry/tests/common/constants.rs:1

  • The constants file is referenced in test files but not present in the diff. The test files import from common::constants::* but this module is missing, which will cause compilation failures.
pub const CODE_HASH: &str = "69f1a94f8c2725523087083139f925aae588ffaa76efd08d7ba06529451c31ed";

contracts/solver-registry/tests/common/utils.rs:1

  • The utils.rs file is referenced but not present in the diff. Test files are importing from common::utils::* but this module is missing, which will cause compilation failures.
use std::str::FromStr;

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@think-in-universe
Copy link
Copy Markdown
Collaborator Author

think-in-universe commented Aug 31, 2025

It looks like there are no tests for enforcing a single worker. Could you add such a test?

Yes. I have added a few test cases to test enforcing a single worker. Please help review.

I also updated dcap-qvl to its the latest release v0.3.2.

@think-in-universe think-in-universe merged commit 9340697 into main Sep 1, 2025
5 checks passed
@think-in-universe think-in-universe deleted the fix/ensure-single-solver branch September 1, 2025 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants