aboutsummaryrefslogtreecommitdiffstats
path: root/internal/ethapi/tracer.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-01-21 06:39:16 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-01-21 06:39:16 +0800
commit682875adff760a29a2bb0024190883e4b4dd5d72 (patch)
tree36507842d38b82731d222878cda7e977b2b82a3e /internal/ethapi/tracer.go
parent0126d014351bc4f58e2d7e6564a054fb80f87153 (diff)
downloaddexon-682875adff760a29a2bb0024190883e4b4dd5d72.tar
dexon-682875adff760a29a2bb0024190883e4b4dd5d72.tar.gz
dexon-682875adff760a29a2bb0024190883e4b4dd5d72.tar.bz2
dexon-682875adff760a29a2bb0024190883e4b4dd5d72.tar.lz
dexon-682875adff760a29a2bb0024190883e4b4dd5d72.tar.xz
dexon-682875adff760a29a2bb0024190883e4b4dd5d72.tar.zst
dexon-682875adff760a29a2bb0024190883e4b4dd5d72.zip
accounts/abi/bind, internal/ethapi: binary search gas estimation (#3587)
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.
Diffstat (limited to 'internal/ethapi/tracer.go')
0 files changed, 0 insertions, 0 deletions