-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configuration To Skip Liquidity Fetching for Solver (#1925)
# Description This PR makes a **hacky** (but IMO pragmatic) change proposal to the driver. In particular, in our current setup we share a `driver` instance across solvers that both use and don't use liquidity. This is an issue because solvers that don't need liquidity will end up waiting for liquidity that they don't use, increasing solving and quoting latency for those solvers. The way this was imagined to work was to set up separate `driver` instances for solvers with different liquidity requirements. However, the downside to this is that those multiple `driver` instances don't share other valuable caches (balances, token infos, etc.). In addition, this adds additional complexity in the infrastructure setup (multiple drivers to deploy, multiple drivers as sources for logs, etc.). The solution is simple, add an "all or nothing" flag to each solver configured in the `driver` to control whether or not to invoke the liquidity fetcher for that solver. This allows us to use a single `driver` instance, while not increasing latency for `/solve`-ing and `/quote`-ing with solvers that don't care at all about liquidity. # Changes 1. Adds a new per-solver configuration option 2. Skips fetching liquidity if this configuration option is enabled for a particular solver when quoting and solving. ## How to test Rust compiler. Logic was simple enough that I did not an driver test for it. That being said, we should probably have one, but the current driver test setup is very much geared towards actually computing solutions (which we don't care about here) and would need a slightly different setup to make a test for this possible.
- Loading branch information
Nicholas Rodrigues Lordello
authored
Oct 9, 2023
1 parent
4dbeeb8
commit 9c21e7e
Showing
6 changed files
with
51 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters