• Péter Szilágyi's avatar
    accounts/abi/bind, internal/ethapi: binary search gas estimation (#3587) · 682875ad
    Péter Szilágyi authored
    Gas estimation currently mostly works, but can underestimate for more funky
    refunds. This is because various ops (e.g. CALL) need more gas to run than they
    actually consume (e.g. 2300 stipend that is refunded if not used). With more
    intricate contract interplays, it becomes almost impossible to return a proper
    value to the user.
    
    This commit swaps out the simplistic gas estimation to a binary search approach,
    honing in on the correct gas use. This does mean that gas estimation needs to
    rerun the transaction log(max-price) times to measure whether it fails or not,
    but it's a price paid by the transaction issuer, and it should be worth it to
    support proper estimates.
    682875ad
Name
Last commit
Last update
.github Loading commit data...
accounts Loading commit data...
build Loading commit data...
cmd Loading commit data...
common Loading commit data...
compression/rle Loading commit data...
console Loading commit data...
containers Loading commit data...
contracts Loading commit data...
core Loading commit data...
crypto Loading commit data...
errs Loading commit data...
eth Loading commit data...
ethclient Loading commit data...
ethdb Loading commit data...
ethstats Loading commit data...
event Loading commit data...
internal Loading commit data...
les Loading commit data...
light Loading commit data...
logger Loading commit data...
metrics Loading commit data...
miner Loading commit data...
mobile Loading commit data...
node Loading commit data...
p2p Loading commit data...
params Loading commit data...
pow Loading commit data...
rlp Loading commit data...
rpc Loading commit data...
swarm Loading commit data...
tests Loading commit data...
trie Loading commit data...
vendor Loading commit data...
whisper Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LESSER Loading commit data...
Dockerfile Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
VERSION Loading commit data...
appveyor.yml Loading commit data...
circle.yml Loading commit data...
interfaces.go Loading commit data...
vendor.conf Loading commit data...