temper icon indicating copy to clipboard operation
temper copied to clipboard

Current Simulation halts on multiple EVM errors

Open polyphia opened this issue 2 years ago • 3 comments

I have been playing around with simulation bundles and noticed everytime there is an EVM error in one of the transactions the entire simulation stops and there isn't a response at all .

Response data: { code: 500, message: 'EVM_ERROR' }

On the backend :

INFO ts::api > 127.0.0.1:40026 "POST /api/v1/simulate-bundle HTTP/1.1" 500 "-" "axios/0.27.2" 1.702706046s [src/evm.rs:177] &err = "backend: failed while inspecting: Transaction(LackOfFundForGasLimit { gas_limit: 0x00000000000000000000000000000000000000000000000027d449cb495f0000_U256, balance: 0x00000000000000000000000000000000000000000000000000174e50d6e133ec_U256 })"

Errors like these and other present on the error handling file are apparently pretty common, so it would be nice if the current simulation would just skip the particular transaction causing any of these errors instead of exiting with an error and failing to simulate everything else .

polyphia avatar Jun 21 '23 10:06 polyphia

As the bundle endpoint is currently implemented, I would say this is expected behavior. However, I would be open to a flag / new endpoint which allows failing transactions in the middle of a bundle. What do you think of something like that?

"allowRevert": true or something in the SimulationRequest?

devanoneth avatar Jun 22 '23 08:06 devanoneth

Seems perfect, new endpoint having the (negligible) benefict of a slightly smaller payload .

polyphia avatar Jun 22 '23 10:06 polyphia

I am facing the same issue described in this thread. Is there any update or fix available for this problem?

JONEmoad avatar Aug 28 '23 10:08 JONEmoad