Merged
Conversation
# Description Updates the HooksTrampoline SC to the new version. - Update the SC address - ABI schema - Forked e2e test - Also, fixes cowprotocol#3466, since @fleupold identified the issue
# Description Gnosis pay hardcodes the HooksTrampoline SC address, so we should continue using the old one in services. To double-check the old address: https://github.com/cowprotocol/services/pull/3528/files
# Description Since we made the switch to combinatorial auctions (cowprotocol#3423, cowprotocol#3385 and cowprotocol#3384) we no longer have the need for the old, single winner max score, implementation. This PR removes all logic related to the legacy implementation as well as any support code used to allow switching between implementations (legacy or combinatorial). This PR does not deal with legacy database table removal, as these are covered already by cowprotocol#3366 and cowprotocol#3362 # Changes <!-- List of detailed changes (how the change is accomplished) --> - Use always combinatorial auction implementation on the autopilot, without cutover logic. - Removed legacy `max_score` implementation - Removed the `Arbitrator` trait used to abstract and define common operations of both `max_score` and `combinatorial` implementation. Now all the operations are defined directly on the `combinatorial` mod. - Removed competition logic that stored scores on the legacy `settlement_score` table - Removed the `local_node_fairness_check ` e2e test, as it was designed for the legacy implementation and we are already covering that logic for combinatorial auctions with other tests - Adjusted the Uniswap V2 e2e test to stop relying on the legacy database tables. ## How to test I rely on the existing test passing, as no behavior should change. ## Related Issues cowprotocol#3424 --------- Co-authored-by: ilya <ilya@cow.fi>
# Description We are seeing significant performance degradation (mainly for solvers' time to solve) when using external RPC providers (cowprotocol#3409). This PR implements some optimizations related to driver async tasks that can be done in parallel. Questions: - [Token information fetching](https://github.com/cowprotocol/services/blob/main/crates/driver/src/infra/api/routes/solve/dto/solve_request.rs#L28) is not made into a task for simplicity, as there is not much performance to be gained (it's already heavily cached) - Bad token filtering needs all the orders (including CoW AMM orders) to be included in the auction before filtering. Ideally we would like to do bad token filtering only once as a data fetching task, but it would mean drastically alter the current logic (we are adding CoW AMM orders very late into the execution). So I'm not sure about it including it in this PR. # Changes - [x] Remove the AuctionProcessor, as currently it acts as a bottleneck and some of the operations (like `sort_orders`) should be done in each solver. - [x] Encapsulate the data fetching tasks (balances, app data and cow amm orders) into shared futures so they can be awaited from multiple solvers. Internally we use a `Mutex` per auction to avoid duplicating work per solver (similar approach as the `AuctionProcessor` implemented). - [x] Refactor the liquidity fetching into a data fetching task, which now it's done only once per all solvers. - [x] Run the bad token filtering in parallel with the liquidity fetching - [x] Run the order sorting in parallel with all the data fetching tasks ## How to test All existing tests pass ## Related Issues This PR implements one of the optimizations mentioned in cowprotocol#3409, the parallel liquidity fetching. But this PR goes a bit beyond that to parallelize all common async tasks in the driver --------- Co-authored-by: MartinquaXD <martin.beckmann@protonmail.com> Co-authored-by: ilya <ilya@cow.fi>
# Description The instrument macro doesn't instrument a sync function that returns a future properly, we need to wrap that future in Instrument instead. This came up after looking at the values in Grafana where this span length was in microseconds.
# Description As a continuation of adding instruments throughout the service as seen in cowprotocol#3520 and cowprotocol#3519 this PR is adding instrumentation for `autopilot`.
…)" (cowprotocol#3544) This reverts cowprotocol#3450 since it seems like it causes some issues. A rework will be done in a separate PR.
Addresses all the compiler/clippy complaints.
# Description Sometimes it is not clear whether autopilot is encountering issues with the DB because of the long-awaited queries or something else. This PR adds simple DB pool metrics that record active and idle connections to the DB. This can potentially be useful in future investigations. ## How to test Grafana
# Description This PR adds some tracing logs to the auction runloop to improve observability during debugging issues when autopilot crashloops. With that, we can probably understand if a specific operation precedes the crashloop. ## How to test Dynamicly enable the following logs: ``` autopilot::run_loop=trace,autopilot::solvable_orders=trace ```
|
I have read the CLA Document and I hereby sign the CLA 0 out of 4 committers have signed the CLA. |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Changes
How to test