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

feat: allow to define storage to debug tenderly actions #54

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

anxolin
Copy link
Contributor

@anxolin anxolin commented Aug 20, 2023

Sometimes, logs are insufficient (Tenderly hides them, and is hard to find in Sentry or they are missing)

It becomes super useful to be able to reproduce a failed execution in Tenderly Production, but locally.

This PR allows you to debug Locally failed executions

Workflow

We just get inside a failing execution to see the details:

image

There we can check the block number and the network.

image

Once we have this information, we get the Storage of Tenderly for that network.

image

Once we have the network, block and storage, we can reproduce the failure locally:

  • if you prefer, you can use your .env file to set this params
NETWORK=100 \
BLOCK_NUMBER=29556180 \
STORAGE='{"dataType":"Map","value":[["0x50736F4707eD0c7bae86bd801d65377BB3739550",{"dataType":"Set","value":[{"tx":"0xcd0290fdd5ae2f267d2edd9de2b8ff2efcc7955f5f446b67473be551f3172c23","params":["0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5","0x00000000000000000000000000000000000000000000000000000018a07bdb56","0x000000000000000000000000ddafbb505ad214d7b80b1f830fccc89b60fb7a83000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d00000000000000000000000050736f4707ed0c7bae86bd801d65377bb37395500000000000000000000000000000000000000000000000000000000001d1ed6b0000000000000000000000000000000000000000000000017d67c2c674a4cfd700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000014a00000000000000000000000000000000000000000000000000000000000000000c3a54b92553839622917193585cbe577bb93dcef84eabc5f569521e0236b42d"],"proof":null,"orders":{"dataType":"Map","value":[["0xef75bc1ed9f8089ba7c59734294169e0a455124029576bdfbe8c3b7df5603b5750736f4707ed0c7bae86bd801d65377bb373955064df2bcb",1]]},"composableCow":"0xfdafc9d1902f4e0b84f65f49f244b32b31013b74"},{"tx":"0x850f10e38bf44d4b0cd0a3b74c330688fe7abdb2782c615d7fe9d71ba7b5d34a","params":["0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5","0x00000000000000000000000000000000000000000000000000000018a0856459","0x000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d000000000000000000000000177127622c4a00f3d409b75571e12cb3c8973d3c00000000000000000000000050736f4707ed0c7bae86bd801d65377bb3739550000000000000000000000000000000000000000000000001a7a9f8a3412883ea000000000000000000000000000000000000000000000018462b885009cba27800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000014a00000000000000000000000000000000000000000000000000000000000000000c3a54b92553839622917193585cbe577bb93dcef84eabc5f569521e0236b42d"],"proof":null,"orders":{"dataType":"Map","value":[]},"composableCow":"0xfdafc9d1902f4e0b84f65f49f244b32b31013b74"}]}],["0xb84Ef42568A67aB9F27E95E978f85D3dDC0AaF30",{"dataType":"Set","value":[]}],["0x4E69b65cB5eF43a2527B585aEb51868d761Da8Ea",{"dataType":"Set","value":[]}],["0xe60d513F367326c70f447875984940ccF9348B3C",{"dataType":"Set","value":[{"tx":"0xcf62a4ff38ae24015269c41dbf3b9f70e3b4ac711d7a08c4b001f412f48e3ba5","params":["0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5","0x00000000000000000000000000000000000000000000000000000018a0a57f10","0x000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d0000000000000000000000006a023ccd1ff6f2045c3309768ead9e68f978f6e1000000000000000000000000e60d513f367326c70f447875984940ccf9348b3c000000000000000000000000000000000000000000000000632086ba195c9249000000000000000000000000000000000000000000000000000db3c7bcc31b06000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000015180000000000000000000000000000000000000000000000000000000000000000008489f72537e15a218363f4fb0569adba7bd546b6c8bf611c03f6474d76206d8"],"proof":null,"orders":{"dataType":"Map","value":[]},"composableCow":"0xfdafc9d1902f4e0b84f65f49f244b32b31013b74"},{"tx":"0x43e3f032d7f3afe91a799fe75ff50e1120efdb2a9a430439b965980df75930fa","params":["0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5","0x00000000000000000000000000000000000000000000000000000018a0a5b515","0x000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d0000000000000000000000006a023ccd1ff6f2045c3309768ead9e68f978f6e1000000000000000000000000d6c23e2c0e19dfdf8638b076f1d076f7b29b74e1000000000000000000000000000000000000000000000000632086ba195c9249000000000000000000000000000000000000000000000000000db39309a4ffb3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000015180000000000000000000000000000000000000000000000000000000000000000008489f72537e15a218363f4fb0569adba7bd546b6c8bf611c03f6474d76206d8"],"proof":null,"orders":{"dataType":"Map","value":[]},"composableCow":"0xfdafc9d1902f4e0b84f65f49f244b32b31013b74"}]}],["0x19ff8a03ccEC1615c693c20D25d93847Bbfa7950",{"dataType":"Set","value":[{"tx":"0x1e71b226a165f156ece10ea1338b3bd1d1c8c02ac9624740e4e771962e47ab2c","params":["0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5","0x00000000000000000000000000000000000000000000000000000018a1249bde","0x000000000000000000000000cb444e90d8198415266c6a2724b7900fb12fc56e0000000000000000000000009c58bacc331c9aa871afd802db6379a98e80cedb00000000000000000000000019ff8a03ccec1615c693c20d25d93847bbfa7950000000000000000000000000000000000000000000000043c33c193756480000000000000000000000000000000000000000000000000000b0bcead08bc8735e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000151800000000000000000000000000000000000000000000000000000000000000008b9b58de7bf0cb313da8cdc07153c42088649f4fd2de04329eae1cd244f31487"],"proof":null,"orders":{"dataType":"Map","value":[]},"composableCow":"0xfdafc9d1902f4e0b84f65f49f244b32b31013b74"}]}]]}' \
yarn start:actions

Additionally

This PR improves the logs in the run_local.ts script, so its easier to see where it fails.

Now the script will return a non-zero error (100) if the execution of either addContract or checkForAndPlaceOrder or fails.

image image

@anxolin anxolin requested review from mfw78 and a team August 20, 2023 14:46
@anxolin anxolin changed the title Allow to define storage to debug tenderly actions feat: allow to define storage to debug tenderly actions Aug 20, 2023
mfw78
mfw78 previously approved these changes Aug 20, 2023
@anxolin anxolin changed the base branch from fix-async-issues to main August 21, 2023 09:50
@anxolin anxolin dismissed mfw78’s stale review August 21, 2023 09:50

The base branch was changed.

@anxolin anxolin merged commit 028955d into main Aug 21, 2023
2 checks passed
@alfetopito alfetopito deleted the debug-locally-with-storage branch August 21, 2023 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants