Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set high default gas for access list estimation (#2411)
# Description Today we started seeing simulation errors caused by: > 2024-02-15T10:16:19.713Z ERROR request{id="9"}:/solve{solver=mysolver auction_id=4076}: driver::infra::observe: discarded solution: settlement encoding id=Id(0) err=Simulation(Other(Blockchain(Web3(Rpc(Error { code: ServerError(-32000), message: "failed to apply transaction: 0xa5c722a26ff6b2b573f98e1d3f14285feb469411fa300139e9b7d25995ad756f err: intrinsic gas too low: have 21000, want 32220", data: None }))))) Usually when you create a tx to simulate or create access lists for you only set the `gas` value if you want to avoid the tx costing more than that. If you leave it empty "a sensible default" should be picked by the node. It looks like that logic stopped working for some reason (still unclear why because AFAIK we didn't update any relevant infra that could cause that) # Changes To avoid that we now set the `gas` value very high whenever we compute an access list using the `web3` node (that code path is also taken when the `enso` simulator is configured). Setting a very high value here is not concerning since we don't actually execute any transaction so a weird tx gobbling up all our ETH for gas is not a problem. ## How to test I reproduced the issue locally by using our alchemy nodes as our RPC and `enso` as the simulator. Without the fix I got `intrinsic gas too low` for transactions that pay out to a regular user and `out of gas` for tx paying out ETH to smart contracts. With the fix applied both simulations worked again.
- Loading branch information