mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-01 09:03:48 +00:00
This workaround is meant to minimize the possibility for snapshot generation once the geth node upgrades to new version (specifically #30752 ) In #30752, the journal format in state snapshot is modified by removing the destruct set. Therefore, the existing old format (version = 0) will be discarded and all in-memory layers will be lost. Unfortunately, the lost in-memory layers can't be recovered by some other approaches, and the entire state snapshot will be regenerated (it will last about 2.5 hours). This pull request introduces a workaround to adopt the legacy journal if the destruct set contained is empty. Since self-destruction has been deprecated following the cancun fork, the destruct set is expected to be nil for layers above the fork block. However, an exception occurs during contract deployment: pre-funded accounts may self-destruct, causing accounts with non-zero balances to be removed from the state. For example, https://etherscan.io/tx/0xa087333d83f0cd63b96bdafb686462e1622ce25f40bd499e03efb1051f31fe49). For nodes with a fully synced state, the legacy journal is likely compatible with the updated definition, eliminating the need for regeneration. Unfortunately, nodes performing a full sync of historical chain segments or encountering pre-funded account deletions may face incompatibilities, leading to automatic snapshot regeneration. |
||
|---|---|---|
| .. | ||
| pruner | ||
| snapshot | ||
| access_events.go | ||
| access_events_test.go | ||
| access_list.go | ||
| database.go | ||
| dump.go | ||
| iterator.go | ||
| iterator_test.go | ||
| journal.go | ||
| metrics.go | ||
| reader.go | ||
| state_object.go | ||
| state_object_test.go | ||
| state_test.go | ||
| statedb.go | ||
| statedb_fuzz_test.go | ||
| statedb_hooked.go | ||
| statedb_hooked_test.go | ||
| statedb_test.go | ||
| stateupdate.go | ||
| sync.go | ||
| sync_test.go | ||
| transient_storage.go | ||
| trie_prefetcher.go | ||
| trie_prefetcher_test.go | ||