You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the trader does not execute their trade on their own verifying quotes as accurately as possible is quite tricky.
We need to use simulations and state overrides which are notoriously tricky to get any useful information out.
Details
We need to make sure that quotes that get discarded because they failed the verification at least report a reasonable indicator why they did so without making the on-call engineer go through the process of recreating the complex simulation using tenderly.
The easiest way to do it is probably to adjust the solidity code used for the simulation to rigorously check pre- and post-conditions of calls and revert early with a helpful message.
Then we should print this revert message so we can easily recover it from the logs.
Testing this exhaustively is probably too complex to be worth it but we should probably have at least 1 e2e test that shows that quotes correctly get discarded when they fail the verification.
The text was updated successfully, but these errors were encountered:
Simply logging a tenderly link will likely not work.
In the old solver we already logged tenderly links which only contained the calldata of the settlement and this link was already too long to copy and open in browsers (at least in firefox).
I always had to copy everything but the calldata and then manually paste the calldata in the UI. The same thing will be horrible for state overrides.
What we could alternatively try out is logging a curl command that you can copy and run in your terminal. I assume this would not run into the same limitations.
Your are right. Nick also found a way to use the tenderly API to create those simulations in our workspace and then only share the simulation ID (not sure if this is something we can do at scale though).
But at the end of the day I think it's fine to log a json or some other content and we can write a script in the infra devcontainer to turn it into a human digestible simulation.
Background
Because the trader does not execute their trade on their own verifying quotes as accurately as possible is quite tricky.
We need to use simulations and state overrides which are notoriously tricky to get any useful information out.
Details
We need to make sure that quotes that get discarded because they failed the verification at least report a reasonable indicator why they did so without making the on-call engineer go through the process of recreating the complex simulation using tenderly.
The easiest way to do it is probably to adjust the solidity code used for the simulation to rigorously check pre- and post-conditions of calls and revert early with a helpful message.
Then we should print this revert message so we can easily recover it from the logs.
Testing this exhaustively is probably too complex to be worth it but we should probably have at least 1 e2e test that shows that quotes correctly get discarded when they fail the verification.
The text was updated successfully, but these errors were encountered: