alchemyplatform / rundler

An ERC-4337 Bundler in Rust
GNU Lesser General Public License v3.0
277 stars 41 forks source link

rpc: Consider a one-shot approach to call gas estimation w/ binary search fallback #343

Open dancoombs opened 1 year ago

dancoombs commented 1 year ago

Describe the feature @dphilipson implemented an (Alchemy internal) version of this here: https://github.com/OMGWINNING/bestimate-gas

The Stackup team also described a similar approach here: https://www.stackup.sh/blog/estimating-callgaslimit-for-useroperations

As this doesn't cover all cases (when using GAS opcode), we still need to keep the binary search fallback. This may have some performance improvements (especially if a native tracer is used) during gas estimation.

dancoombs commented 9 months ago

Linking and closing https://github.com/alchemyplatform/rundler/issues/233