1
0
Fork 0
forked from forks/go-ethereum
go-ethereum-modded-tocallarg/internal
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
..
blocktest internal/blocktest: add package for shared test code (#27270) 2023-07-11 14:57:02 +02:00
build appveyor, build, internal: ci.go cleanups, add package dep checker (#30696) 2024-10-29 13:21:17 +02:00
cmdtest all: make vendored copy of reexec (#28382) 2023-10-28 00:14:43 +02:00
debug internal/debug: rename --trace to --go-execution-trace (#30846) 2024-12-02 18:17:43 +01:00
era internal/era: random access to header and receipts (#31544) 2025-04-04 06:07:46 -06:00
ethapi eth/filters, core/filtermaps: safe chain view update (#31590) 2025-04-20 09:48:49 +02:00
flags cmd/workload: RPC workload tests for filters and history (#31189) 2025-02-27 00:07:14 +01:00
guide all: fix typos in docs and comments (#31548) 2025-04-02 13:52:40 -06:00
jsre all: fix some typos in comments and names (#31023) 2025-01-14 14:16:15 +01:00
reexec all: fix some typos in comments and names (#31023) 2025-01-14 14:16:15 +01:00
shutdowncheck eth, les: update unclean shutdown markers regularly (#24077) 2021-12-17 15:18:51 +01:00
syncx core: improve shutdown synchronization in BlockChain (#22853) 2021-10-07 15:47:50 +02:00
testlog internal/testlog: fix log output from sub-loggers (#31539) 2025-04-10 18:21:32 +02:00
testrand triedb/pathdb: improve tests (#29278) 2024-03-19 10:50:08 +08:00
utesting internal: run tests in parallel (#30381) 2024-09-16 08:44:47 +02:00
version build, internal, version: break ci.go/version->common dependency (#30638) 2024-10-20 19:28:39 +03:00
web3ext internal/ethapi: add block override to estimateGas (#30695) 2024-12-12 12:39:03 +01:00