go-ethereum/core/state/snapshot
rjl493456442 6d2aeb43d5
cmd, core/state, eth, tests, trie: improve state reader (#27428)
The state availability is checked during the creation of a state reader.

-    In hash-based database, if the specified root node does not exist on disk disk, then
    the state reader won't be created and an error will be returned.

-    In path-based database, if the specified state layer is not available, then the
    state reader won't be created and an error will be returned.

This change also contains a stricter semantics regarding the `Commit` operation: once it has been performed, the trie is no longer usable, and certain operations will return an error.
2023-06-20 15:31:45 -04:00
..
context.go core/state/snapshot: detect and clean up dangling storage snapshot in generation (#24811) 2022-05-23 13:26:22 +03:00
conversion.go core/state/snapshot, core/types, eth: move account definition to type (#27323) 2023-06-06 11:17:39 +03:00
difflayer.go core: use slices package for sorting (#27489) 2023-06-20 11:58:47 +02:00
difflayer_test.go all: remove deprecated uses of math.rand (#26710) 2023-02-16 14:36:58 -05:00
disklayer.go core/state/snapshot, core/types, eth: move account definition to type (#27323) 2023-06-06 11:17:39 +03:00
disklayer_test.go core/rawdb: simplify TestDiskSeek to use memorydb (#25182) 2022-06-29 11:54:42 +02:00
generate.go cmd, core/state, eth, tests, trie: improve state reader (#27428) 2023-06-20 15:31:45 -04:00
generate_test.go core/state/snapshot, core/types, eth: move account definition to type (#27323) 2023-06-06 11:17:39 +03:00
holdable_iterator.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
holdable_iterator_test.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
iterator.go core: fix typo in iterator.go (#23502) 2021-08-31 10:21:42 +02:00
iterator_binary.go snapshot, trie: fixed typos, mostly in snapshot pkg (#22133) 2021-01-07 08:36:21 +02:00
iterator_fast.go core: use slices package for sorting (#27489) 2023-06-20 11:58:47 +02:00
iterator_test.go all: remove deprecated uses of math.rand (#26710) 2023-02-16 14:36:58 -05:00
journal.go core,console: replace noarg fmt.Errorf with errors.New (#27332) 2023-05-25 08:24:09 -04:00
metrics.go all: fix spelling mistakes (#25961) 2022-10-11 09:37:00 +02:00
snapshot.go core/state/snapshot, core/types, eth: move account definition to type (#27323) 2023-06-06 11:17:39 +03:00
snapshot_test.go core/state/snapshot, core/types, eth: move account definition to type (#27323) 2023-06-06 11:17:39 +03:00
utils.go core/state/snapshot, core/types, eth: move account definition to type (#27323) 2023-06-06 11:17:39 +03:00