go-ethereum/core
rjl493456442 052c634917
core: rework tx indexer (#25723)
This PR reworks tx indexer a bit. Compared to the original version, one scenario is no longer handled - upgrading  from legacy geth without indexer support. 

The tx indexer was introduced in 2020 and have been present through hardforks, so it can be assumed that all Geth nodes have tx indexer already. So we can simplify the tx indexer logic a bit:

-    If the tail flag is not present, it means node is just initialized may or may not with an ancient store attached. In this case all blocks are regarded as unindexed
-   If the tail flag is present, it means blocks below tail are unindexed, blocks above tail are indexed

This change also address some weird cornercases that could make the indexer not work after a crash.
2022-09-29 09:50:24 +02:00
..
asm all: change format 0x%x to %#x (#25221) 2022-07-04 11:03:32 +03:00
beacon build: upgrade to go 1.19 (#25726) 2022-09-10 13:25:40 +02:00
bloombits Chore: Minimal gramatical errors (signleton -> singleton) (#25057) 2022-06-10 18:47:06 +03:00
forkid params: set sepolia mergeNetsplitBlock to 1735371 (#25372) 2022-07-23 09:54:11 +02:00
rawdb core: rework tx indexer (#25723) 2022-09-29 09:50:24 +02:00
state cmd, core, eth, les, light: track deleted nodes (#25757) 2022-09-27 10:01:02 +02:00
types core/types: improve accuracy of header.Size() (#25859) 2022-09-26 09:10:39 +02:00
vm core/vm: minor trivial clean up (#25880) 2022-09-28 13:21:54 +02:00
.gitignore Renamed chain => core 2014-12-04 10:28:02 +01:00
bench_test.go all: cleanup tests (#25641) 2022-09-07 20:21:59 +02:00
block_validator_test.go all: cleanup tests (#25641) 2022-09-07 20:21:59 +02:00
block_validator.go cmd, core, eth, miner: deprecate miner.gastarget flag (#23213) 2021-08-10 11:28:33 +03:00
blockchain_insert.go core: fix log order in "Imported new chain segment" (#25768) 2022-09-15 13:18:23 +02:00
blockchain_reader.go core, eth/downloader: handle spurious junk bodies from racey rollbacks (#25578) 2022-08-23 14:02:51 +03:00
blockchain_repair_test.go all: cleanup tests (#25641) 2022-09-07 20:21:59 +02:00
blockchain_sethead_test.go all: cleanup tests (#25641) 2022-09-07 20:21:59 +02:00
blockchain_snapshot_test.go all: cleanup tests (#25641) 2022-09-07 20:21:59 +02:00
blockchain_test.go core: rework tx indexer (#25723) 2022-09-29 09:50:24 +02:00
blockchain.go core: rework tx indexer (#25723) 2022-09-29 09:50:24 +02:00
blocks.go core: typos and comments improve 2017-05-25 17:14:33 +03:00
bloom_indexer.go core: preallocate batch size in bloomIndexer (#25289) 2022-08-03 17:02:09 +02:00
chain_indexer_test.go core: fix potential race in chainIndexerTest (#22346) 2021-03-19 13:32:57 +01:00
chain_indexer.go all: make logs a bit easier on the eye to digest (#22665) 2021-04-15 20:35:00 +03:00
chain_makers_test.go all: move genesis initialization to blockchain (#25523) 2022-08-30 18:22:28 +02:00
chain_makers.go all: cleanup tests (#25641) 2022-09-07 20:21:59 +02:00
dao_test.go all: cleanup tests (#25641) 2022-09-07 20:21:59 +02:00
error.go all: remove duplicate word in comments (#25618) 2022-08-29 11:16:34 +03:00
events.go eth/filters: remove use of event.TypeMux for pending logs (#20312) 2019-12-10 12:39:14 +01:00
evm.go core/evm: fix error in comment (#25040) 2022-06-08 18:40:37 +02:00
forkchoice.go all: core rework for the merge transition (#23761) 2021-11-26 13:23:02 +02:00
gaspool.go miner: avoid unnecessary work (#15883) 2018-01-15 12:57:06 +02:00
gen_genesis_account.go tests: update for London (#22976) 2021-06-07 14:37:56 +02:00
gen_genesis.go core: change baseFee into baseFeePerGas in genesis json 2021-06-14 14:04:44 +02:00
genesis_alloc.go core/genesis: remove calaverasAllocData (#25516) 2022-08-12 13:58:06 +02:00
genesis_test.go all: move genesis initialization to blockchain (#25523) 2022-08-30 18:22:28 +02:00
genesis.go cmd/geth: make dumpgenesis load genesis datadir if it exists (#25135) 2022-09-26 13:55:18 +02:00
headerchain_test.go all: cleanup tests (#25641) 2022-09-07 20:21:59 +02:00
headerchain.go core: recover state when beacon sets canonical head if it's missing (#24613) 2022-05-05 10:36:26 +03:00
mkalloc.go build: upgrade to go 1.19 (#25726) 2022-09-10 13:25:40 +02:00
rlp_test.go all: cleanup tests (#25641) 2022-09-07 20:21:59 +02:00
state_prefetcher.go all: removed blockhash from statedb (#23126) 2021-06-30 15:17:01 +02:00
state_processor_test.go all: cleanup tests (#25641) 2022-09-07 20:21:59 +02:00
state_processor.go core: remove unused bc ChainContext in applyTransaction 2022-08-10 08:02:37 +02:00
state_transition.go build: upgrade to go 1.19 (#25726) 2022-09-10 13:25:40 +02:00
tx_cacher.go Comment error (#18303) 2018-12-14 11:15:31 +01:00
tx_journal.go core: make tx journal check and open atomic (#25530) 2022-08-17 14:16:18 +03:00
tx_list_test.go core: fix benchmark tests (#23803) 2021-10-27 13:08:51 +02:00
tx_list.go core: fixed stale comment in txlist (#23825) 2021-10-28 14:59:51 +02:00
tx_noncer.go core: don't cache zero nonce in txNoncer (#25603) 2022-09-16 18:23:13 +02:00
tx_pool_test.go all: add whitespace linter (#25312) 2022-07-25 13:14:03 +03:00
tx_pool.go core: fix datarace in txpool, fixes #25870 and #25869 (#25872) 2022-09-26 11:34:15 +02:00
types.go core: prefetch next block state concurrently 2019-04-01 11:06:15 +03:00