go-ethereum/internal/ethapi
Felföldi Zsolt 7f574372d5
eth/filters, core/filtermaps: safe chain view update (#31590)
This PR changes the chain view update mechanism of the log filter.
Previously the head updates were all wired through the indexer, even in
unindexed mode. This was both a bit weird and also unsafe as the
indexer's chain view was updates asynchronously with some delay, making
some log related tests flaky. Also, the reorg safety of the indexed
search was integrated with unindexed search in a weird way, relying on
`syncRange.ValidBlocks` in the unindexed case too, with a special
condition added to only consider the head of the valid range but not the
tail in the unindexed case.

In this PR the current chain view is directly accessible through the
filter backend and unindexed search is also chain view based, making it
inherently safe. The matcher sync mechanism is now only used for indexed
search as originally intended, removing a few ugly special conditions.

The PR is currently based on top of
https://github.com/ethereum/go-ethereum/pull/31642
Together they fix https://github.com/ethereum/go-ethereum/issues/31518
and replace https://github.com/ethereum/go-ethereum/pull/31542

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-04-20 09:48:49 +02:00
..
override internal/ethapi: support for beacon root and withdrawals in simulate api (#31304) 2025-03-24 19:08:53 +01:00
testdata core: implement eip-7623 floor data gas (#30946) 2025-01-30 09:07:45 -07:00
addrlock.go all: update license information (#16089) 2018-02-14 13:49:11 +01:00
api.go eth, eth/filters: implement API error code for pruned blocks (#31361) 2025-04-01 13:42:01 +02:00
api_test.go eth/filters, core/filtermaps: safe chain view update (#31590) 2025-04-20 09:48:49 +02:00
backend.go eth/filters, core/filtermaps: safe chain view update (#31590) 2025-04-20 09:48:49 +02:00
dbapi.go all: remove concept of public/private API definitions (#25053) 2022-06-21 12:05:43 +03:00
errors.go internal/ethapi: eth_multicall (#27720) 2024-09-06 11:31:00 +02:00
logtracer.go internal/ethapi: eth_multicall (#27720) 2024-09-06 11:31:00 +02:00
simulate.go core: fail execution if system call fails to execute (#31639) 2025-04-19 13:42:54 +02:00
simulate_test.go internal/ethapi: update default simulation timestamp increment to 12 (#30981) 2025-01-03 20:15:06 +08:00
transaction_args.go params,core: add max and target value to chain config (#31002) 2025-02-04 15:43:18 +01:00
transaction_args_test.go eth/filters, core/filtermaps: safe chain view update (#31590) 2025-04-20 09:48:49 +02:00