Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: low level calls cause log spamming if not adhering to the interface #91

Closed
mfw78 opened this issue Oct 5, 2023 · 0 comments · Fixed by #94
Closed

bug: low level calls cause log spamming if not adhering to the interface #91

mfw78 opened this issue Oct 5, 2023 · 0 comments · Fixed by #94
Assignees
Labels
bug Something isn't working E:1.2: Watch Tower Service https://github.com/cowprotocol/pm/issues/8

Comments

@mfw78
Copy link
Contributor

mfw78 commented Oct 5, 2023

Problem

When the watch tower polls a custom order type, the selector / revert error returned has no guarantee of being compliant with the interface. It's currently being observed that old TWAP orders from the pre-production version of the contracts are returning OrderNotValid() selectors, as opposed to OrderNotValid(string) which is causing these to not be recognised by the low-level call handlers.

Impact

Causes needless log spamming, and doesn't promote strict interface adherence.

To reproduce

  1. Observe the goerli watch tower in production.

Expected behaviour

If an order doesn't adhere to the interface, it should not be monitored. Any order that doesn't return a known custom error for the revert should be dropped immediately.

Screenshots/logs

2023-10-05T01:31:28.999Z ERROR checkForAndPlaceOrder:_pollLegacy:5:2.8@9810859: Error on CALL to getTradeableOrderWithSignature. Simulate: https://dashboard.tenderly.co/gp-v2/watch-tower-prod/simulator/new?network=5&contractAddress=0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74&rawFunctionInput=0x26e0a1960000000000000000000000008654d1136f2a760ba3e1c9e131cb9ad217921b52000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000260000000000000000000000000910d00a310f7dc5b29fe73458f47f519be547d3d000000000000000000000000000000000000000000000000000000189e3ae4af00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000140000000000000000000000000b4fbf271143f4fbf7b91a5ded31805e42b2208d600000000000000000000000091056d4a53e1faa1a84306d4deaec71085394bc80000000000000000000000008654d1136f2a760ba3e1c9e131cb9ad217921b5200000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000000062a37aa81e9beb9780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000007080000000000000000000000000000000000000000000000000000000000000000506960793899dbd9225c61c44bd44927462151c82dec95315cf937f6b95ef21f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
2023-10-05T01:31:28.999Z ERROR checkForAndPlaceOrder:_handleGetTradableOrderCall:5:2.8@9810859: checkForAndPlaceOrder:_handleGetTradableOrderCall:5:2.8@9810859 Unexpected error LowLevelError: low-level call failed
    at _pollLegacy (/usr/src/app/dist/src/domain/checkForAndPlaceOrder.js:340:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async _processConditionalOrder (/usr/src/app/dist/src/domain/checkForAndPlaceOrder.js:141:26)
    at async checkForAndPlaceOrder (/usr/src/app/dist/src/domain/checkForAndPlaceOrder.js:70:32)
    at async processBlock (/usr/src/app/dist/src/domain/chainContext.js:213:20)
    at async JsonRpcProvider.<anonymous> (/usr/src/app/dist/src/domain/chainContext.js:155:21) {
  data: '0xf3ec7a9f'
}

In this case, 0xf3ec7a9f corresponds to the previous OrderNotValid() selector prior to the insertion of the string for there reason (implemented just before push to production).

Tenderly watch-tower version/commit hash

Version: v1.0.1-rc.0

@mfw78 mfw78 added the bug Something isn't working label Oct 5, 2023
@mfw78 mfw78 self-assigned this Oct 5, 2023
@mfw78 mfw78 closed this as completed in #94 Oct 9, 2023
mfw78 added a commit that referenced this issue Oct 9, 2023
# Description
Currently incompatible orders (where there is a low level reversion
that's not expected) are *NOT* deleted. This corrects that.

# Changes

- [x] Drop orders that return non-compatible interface revert messages.

## How to test
1. Sync goerli from genesis and confirm no unexpected errors.

## Related Issues

Fixes #91
@mfw78 mfw78 added the E:1.2: Watch Tower Service https://github.com/cowprotocol/pm/issues/8 label Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working E:1.2: Watch Tower Service https://github.com/cowprotocol/pm/issues/8
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant