go-ethereum/eth/tracers
Sina M 615d29f7c2
core: reduce load on txindexer from API (#31752)
Fixes https://github.com/ethereum/go-ethereum/issues/31732.

This logic was removed in the recent refactoring in the txindexer to
handle history cutoff (#31393). It was first introduced in this PR:
https://github.com/ethereum/go-ethereum/pull/28908.

I have tested it and it works as an alternative to #31745.

This PR packs 3 changes to the flow of fetching txs from the API:

- It caches the indexer tail after each run is over to avoid hitting the
db all the time as was done originally in #28908.

- Changes `backend.GetTransaction`. It doesn't return an error anymore
when tx indexer is in progress. It shifts the responsibility to the
caller to check the progress. The reason is that in most cases we anyway
check the txpool for the tx. If it was indeed a pending tx we can avoid
the indexer progress check.

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-05-05 10:07:55 +08:00
..
internal eth/tracers: refactor block context in test runner (#29450) 2025-02-20 15:04:35 +01:00
js core/vm: clean up EVM environmental structure (#31061) 2025-02-18 21:53:33 +08:00
live core/tracing: state journal wrapper (#30441) 2025-02-05 13:58:25 +01:00
logger internal/ethapi: exclude 7702 authorities from result in eth_createAccessList (#31336) 2025-03-25 15:01:21 +01:00
native all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
api.go core: reduce load on txindexer from API (#31752) 2025-05-05 10:07:55 +08:00
api_test.go core: reduce load on txindexer from API (#31752) 2025-05-05 10:07:55 +08:00
dir.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
live.go eth/tracers: various fixes (#30540) 2024-10-17 06:51:47 +02:00
tracers_test.go cmd/evm: consolidate evm output switches (#30849) 2024-12-10 09:43:24 +01:00
tracker.go eth/traces: add state limit (#25812) 2022-10-06 10:48:04 +02:00
tracker_test.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00