plugeth/eth
gary rong 61270e5e1c
eth/gasprice: lighter gas price oracle for light client (#20409)
This PR reduces the bandwidth used by the light client to compute the
recommended gas price. The current mechanism for suggesting the price is:

- retrieve recent 20 blocks
- get the lowest gas price of these blocks
- sort the price array and return the middle(60%) one

This works for full nodes, which have all blocks available locally.
However, this is very expensive for the light client because the light
client needs to retrieve block bodies from the network.

The PR changes the default options for light client. With the new config,
the light client only retrieves the two latest blocks, but in order to
collect more sample transactions, the 3 lowest prices are collected from
each block.

This PR also changes the behavior for empty blocks. If the block is empty,
the lastest price is reused for sampling.
2020-07-03 14:50:35 +02:00
..
downloader eth/downloader: fixes data race between synchronize and other methods (#21201) 2020-06-30 19:43:29 +02:00
fetcher core, eth, internal: include read storage entries in structlog output (#21204) 2020-06-10 11:46:13 +02:00
filters all: simplify and fix database iteration with prefix/start (#20808) 2020-04-15 14:08:53 +03:00
gasprice eth/gasprice: lighter gas price oracle for light client (#20409) 2020-07-03 14:50:35 +02:00
tracers core/vm: use uint256 in EVM implementation (#20787) 2020-06-08 15:24:40 +03:00
api_backend.go rpc, internal/ethapi: default rpc gascap at 25M + better error message (#21229) 2020-07-01 19:54:21 +02:00
api_test.go eth: add debug_accountRange API (#19645) 2020-03-31 12:08:44 +02:00
api_tracer.go eth: returned revert reason in traceTx (#21195) 2020-06-26 12:19:31 +02:00
api.go eth: add debug_accountRange API (#19645) 2020-03-31 12:08:44 +02:00
backend.go les, les/lespay: implement new server pool (#20758) 2020-05-22 13:46:34 +02:00
bloombits.go eth: improve shutdown synchronization (#20695) 2020-03-27 15:03:20 +02:00
config.go eth/gasprice: lighter gas price oracle for light client (#20409) 2020-07-03 14:50:35 +02:00
discovery.go cmd/geth: enable DNS discovery by default (#20660) 2020-02-13 15:38:30 +02:00
gen_config.go rpc, internal/ethapi: default rpc gascap at 25M + better error message (#21229) 2020-07-01 19:54:21 +02:00
handler_test.go cmd, core, eth: background transaction indexing (#20302) 2020-05-11 18:58:43 +03:00
handler.go eth: don't block if transaction broadcast loop fails (#21255) 2020-06-24 13:54:13 +03:00
helper_test.go cmd, core, eth: background transaction indexing (#20302) 2020-05-11 18:58:43 +03:00
peer.go eth: don't block if transaction broadcast loop fails (#21255) 2020-06-24 13:54:13 +03:00
protocol_test.go cmd, core, eth: background transaction indexing (#20302) 2020-05-11 18:58:43 +03:00
protocol.go eth: rework tx fetcher to use O(1) ops + manage network requests 2020-02-13 15:27:15 +02:00
sync_test.go eth: improve shutdown synchronization (#20695) 2020-03-27 15:03:20 +02:00
sync.go eth: interrupt chain insertion on shutdown (#21114) 2020-05-26 21:37:37 +02:00