go-ethereum/internal/ethapi
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
..
addrlock.go all: update license information (#16089) 2018-02-14 13:49:11 +01:00
api.go rpc: remove DecimalOrHex type (#26629) 2023-02-07 15:44:27 +01:00
backend.go eth/filters: avoid block body retrieval when no matching logs (#25199) 2023-02-13 10:59:27 +01:00
dbapi.go all: remove concept of public/private API definitions (#25053) 2022-06-21 12:05:43 +03:00
transaction_args.go internal/ethapi: fix comment typo (#25548) 2022-08-19 09:01:09 +03:00
transaction_args_test.go eth/filters: avoid block body retrieval when no matching logs (#25199) 2023-02-13 10:59:27 +01:00