go-ethereum/eth
Sina Mahmoodi 2def62b99b
eth/filters: avoid block body retrieval when no matching logs (#25199)
Logs stored on disk have minimal information. Contextual information such as block
number, index of log in block, index of transaction in block are filled in upon request.
We can fill in all these fields only having the block header and list of receipts.
But determining the transaction hash of a log requires the block body.

The goal of this PR is postponing this retrieval until we are sure we the transaction hash.
It happens often that the header bloom filter signals there might be matches in a block,
but after actually checking them reveals the logs do not match. We want to avoid fetching
the body in this case.

Note that this changes the semantics of Backend.GetLogs. Downstream callers of
GetLogs now assume log context fields have not been derived, and need to call
DeriveFields on the logs if necessary.
2023-02-13 10:59:27 +01:00
..
catalyst eth/catalyst: disallow forkchoiceupdate v1 post-shanghai (#26645) 2023-02-09 10:53:22 +02:00
downloader eth/downloader: fix timeout resurrection panic (#26652) 2023-02-09 14:56:15 +02:00
ethconfig all: make timestamp-based fork checks based on uint64 (#26474) 2023-01-25 12:12:28 +01:00
fetcher common/prque: generic priority queue (#26290) 2023-02-09 13:03:54 +02:00
filters eth/filters: avoid block body retrieval when no matching logs (#25199) 2023-02-13 10:59:27 +01:00
gasprice common/lru: add generic LRU implementation (#26162) 2022-11-14 15:41:56 +01:00
protocols core/state, trie: remove unused error-return from trie Commit operation (#26641) 2023-02-09 08:56:59 -05:00
tracers core/vm: set tracer-observable `value` of a delegatecall to match parent `value` (#26632) 2023-02-10 10:26:43 +01:00
api.go core/state: return error when storage trie can't be opened (#26350) 2022-12-21 10:21:21 +01:00
api_backend.go eth/filters: avoid block body retrieval when no matching logs (#25199) 2023-02-13 10:59:27 +01:00
api_test.go core/state: return error when storage trie can't be opened (#26350) 2022-12-21 10:21:21 +01:00
backend.go miner, cmd, eth: require explicit etherbase address (#26413) 2023-01-20 11:26:01 -05:00
bloombits.go eth: move eth.Config to a common package (#22205) 2021-02-05 13:51:15 +01:00
handler.go eth, les: polish forkid a bit, fix races and transition validation 2023-01-06 15:29:57 +02:00
handler_eth.go eth: implement eth/68 (#25980) 2022-10-31 16:23:26 +02:00
handler_eth_test.go eth, catalyst: fix flaky tests (#26153) 2022-11-11 13:22:54 +01:00
handler_snap.go eth: check snap satelliteness, delegate drop to eth (#22235) 2021-02-02 10:44:36 +02:00
handler_test.go all: cleanup tests (#25641) 2022-09-07 20:21:59 +02:00
peer.go all: more linters (#24783) 2022-06-13 16:24:45 +02:00
peerset.go all: fix some typos (#25551) 2022-08-19 09:00:21 +03:00
state_accessor.go eth/filters, eth/tracers: add request cancellation checks (#26320) 2022-12-15 07:52:07 -05:00
sync.go cmd, core, eth, les, params: add merge-passed chain config (#24538) 2022-08-01 15:13:25 +03:00
sync_test.go eth: introduce eth67 protocol (#24093) 2022-06-15 12:56:47 +02:00