op-geth/light
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
..
lightchain.go core, les, light: implement timestamp based sethead and genesis rewinds 2023-01-03 12:57:07 +02:00
lightchain_test.go consensus/clique, core: API cleanup (#23100) 2021-10-11 23:16:46 +02:00
nodeset.go all: integrate the freezer with fast sync 2019-05-16 10:39:32 +03:00
odr.go all: refactor txpool into it's own package in prep for 4844 2022-10-24 16:35:53 +03:00
odr_test.go cmd, core, eth, les, light: track deleted nodes (#25757) 2022-09-27 10:01:02 +02:00
odr_util.go eth/filters: avoid block body retrieval when no matching logs (#25199) 2023-02-13 10:59:27 +01:00
postprocess.go core/state, trie: remove unused error-return from trie Commit operation (#26641) 2023-02-09 08:56:59 -05:00
trie.go core/state, trie: remove unused error-return from trie Commit operation (#26641) 2023-02-09 08:56:59 -05:00
trie_test.go all: cleanup tests (#25641) 2022-09-07 20:21:59 +02:00
txpool.go all: make timestamp-based fork checks based on uint64 (#26474) 2023-01-25 12:12:28 +01:00
txpool_test.go light: fix receiver name from Python style to Go (#26631) 2023-02-08 11:37:33 +02:00