mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
This PR fixes a bug in the map renderer that sometimes used an obsolete block log value pointer to initialize the iterator for rendering from a snapshot. This bug was triggered by chain reorgs and sometimes caused indexing errors and invalid search results. A few other conditions are also made safer that were not reported to cause issues yet but could potentially be unsafe in some corner cases. A new unit test is also added that reproduced the bug but passes with the new fixes. Fixes https://github.com/ethereum/go-ethereum/issues/31593 Might also fix https://github.com/ethereum/go-ethereum/issues/31589 though this issue has not been reproduced yet, but it appears to be related to a log index database corruption around a specific block, similarly to the other issue. Note that running this branch resets and regenerates the log index database. For this purpose a `Version` field has been added to `rawdb.FilterMapsRange` which will also make this easier in the future if a breaking database change is needed or the existing one is considered potentially broken due to a bug, like in this case. |
||
|---|---|---|
| .. | ||
| ancienttest | ||
| testdata | ||
| accessors_chain.go | ||
| accessors_chain_test.go | ||
| accessors_indexes.go | ||
| accessors_indexes_test.go | ||
| accessors_metadata.go | ||
| accessors_snapshot.go | ||
| accessors_state.go | ||
| accessors_sync.go | ||
| accessors_trie.go | ||
| ancient_scheme.go | ||
| ancient_utils.go | ||
| chain_freezer.go | ||
| chain_iterator.go | ||
| chain_iterator_test.go | ||
| database.go | ||
| database_test.go | ||
| freezer.go | ||
| freezer_batch.go | ||
| freezer_memory.go | ||
| freezer_memory_test.go | ||
| freezer_meta.go | ||
| freezer_meta_test.go | ||
| freezer_resettable.go | ||
| freezer_resettable_test.go | ||
| freezer_table.go | ||
| freezer_table_test.go | ||
| freezer_test.go | ||
| freezer_utils.go | ||
| freezer_utils_test.go | ||
| key_length_iterator.go | ||
| key_length_iterator_test.go | ||
| schema.go | ||
| table.go | ||
| table_test.go | ||