EnsoFinance / temper

Temper your expectations - Ethereum Transaction Simulator
MIT License
343 stars 43 forks source link

Current Simulation halts on multiple EVM errors #8

Open polyphia opened 1 year ago

polyphia commented 1 year ago

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 .

devanoneth commented 1 year ago

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?

polyphia commented 1 year ago

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

JONEmoad commented 1 year ago

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