lambdaclass / starknet-replay

Provides a way of reading a real Starknet State, so you can re-execute an existing transaction in any of the Starknet networks in an easy way
Apache License 2.0
6 stars 1 forks source link

Failing Tx `0x07805c2bf5abaf4fe0eb1db7b7be0486a14757b4bf96634c828d11c07e4a763c` #8

Closed fmoletta closed 2 weeks ago

fmoletta commented 5 months ago

Error:

This transaction fails with the revert error: "Transaction execution has failed:\n0: Error in the called contract (contract address: 0x05897662ae996ca4fb8d8a431f6a2a2d3e7033241316bd8f668ec77a5c878330, class hash: 0x029927c8af6bccf3f6fda035981e765a7bdbf18a2dc0d630494f8758aa908e2b, selector: 0x015d40a3d6ca2ac30f4031e42be28da9b056fef9bb7357ac5e85627ee876e5ad):\nNative execution error: argent/multicall-failed\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\u{1}Error at pc=0:10:\nGot an exception while executing a hint: Native execution error: Failed to deserialize param #1\nCairo traceback (most recent call last):\nUnknown location (pc=0:430)\nUnknown location (pc=0:416)\n\n"

Investigation Status:

The contract succesfully passes the __validate__ entrypoint, returning VALID, executes the first approve call, but fails when calling the multi_route_swap function. The CallEntryPoint created to execute the multi_route_swap is the same when executing with native and vm, inculding the called contract's address, selector and calldata (and these match the network data too). Contracts with signatures similar to the multi_route_swap have been tested to work properly with standalone native. I also did a quick test with passing large nested arrays and those worked fine too.

Relevant links:

pefontana commented 2 weeks ago

In this commit is fixed 0fcec273617bb5c73382e975f93a4e3d3d557a8a