-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle fatal errors when indexing cow amms (#2934)
# Description Currently the `autopilot` maintenance loop can get stuck when the configured cow amm helper contract does not support a found contract with this error: ``` 2024-09-03T06:13:17.420Z WARN autopilot::maintenance: failed to run background task successfully err=method 'tokens(address):(address[])' failure: contract call reverted with message: None Caused by: contract call reverted with message: None ``` So far we have been retrying this error over and over although the call to detect which tokens the pool is trading will never work if an amm is misconfigured or generally not supported by the helper contract. # Changes Differentiate between retryable and fatal errors while indexing the amms and retry or skip this pool respectively. # Testplan Set up sepolia configuration locally and checked that we don't get stuck on the unsupported pools: ``` 2024-09-03T06:24:55.880Z INFO cow_amm::cache: helper contract does not support amm cow_amm=0xe4abfda4e8c02fcafc34981dafaeb426aa4186e6 err=MethodError { signature: "tokens(address):(address[])", inner: Revert(None) } 2024-09-03T06:24:55.921Z INFO cow_amm::cache: indexed new cow amm cow_amm=0xac140f325afd20a733e12580aeb22ff9bf46982f 2024-09-03T06:24:55.956Z INFO cow_amm::cache: indexed new cow amm cow_amm=0xa54442606548bf1b627662a465a40b31b7e8e711 ```
- Loading branch information
1 parent
d26cf41
commit 5584cba
Showing
3 changed files
with
33 additions
and
16 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