go-ethereum/core/state
Péter Szilágyi 4f4f9d88d3
core/state: storage journal entry should revert dirtyness too (#29641)
Currently our state journal tracks each storage update to a contract, having the ability to revert those changes to the previously set value.

For the very first modification however, it behaves a bit wonky. Reverting the update doesn't actually remove the dirty-ness of the slot, rather leaves it as "change this slot to it's original value". This can cause issues down the line with for example write witnesses needing to gather an unneeded proof.

This PR modifies the storageChange journal entry to not only track the previous value of a slot, but also whether there was any previous value at all set in the current execution context. In essence, the PR changes the semantic of storageChange so it does not simply track storage changes, rather it tracks dirty storage changes, an important distinction for being able to cleanly revert the journal item.
2024-04-24 17:45:24 +02:00
..
pruner all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
snapshot all: fix various typos (#29600) 2024-04-23 13:09:42 +03:00
access_list.go core/state: use maps.Clone (#29365) 2024-04-02 15:56:12 +03:00
database.go core: add an end-to-end verkle test (#29262) 2024-03-26 21:25:41 +01:00
dump.go eth/tracers: live chain tracing with hooks (#29189) 2024-03-22 18:53:53 +01:00
iterator.go all: fix various typos (#29600) 2024-04-23 13:09:42 +03:00
iterator_test.go all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
journal.go core/state: storage journal entry should revert dirtyness too (#29641) 2024-04-24 17:45:24 +02:00
metrics.go core/state, trie/triedb/pathdb: remove storage incomplete flag (#28940) 2024-03-05 14:31:55 +01:00
state_object.go core/state: storage journal entry should revert dirtyness too (#29641) 2024-04-24 17:45:24 +02:00
state_object_test.go build: use golangci-lint (#20295) 2019-11-18 10:49:17 +02:00
state_test.go core/state: remove account reset operation v2 (#29520) 2024-04-24 12:59:06 +03:00
statedb.go core/state: remove account reset operation v2 (#29520) 2024-04-24 12:59:06 +03:00
statedb_fuzz_test.go core/state: remove account reset operation v2 (#29520) 2024-04-24 12:59:06 +03:00
statedb_test.go core/state: remove account reset operation v2 (#29520) 2024-04-24 12:59:06 +03:00
sync.go core,eth,internal: fix typo (#29024) 2024-02-20 19:42:48 +08:00
sync_test.go eth/tracers: live chain tracing with hooks (#29189) 2024-03-22 18:53:53 +01:00
transient_storage.go all: implement EIP-1153 transient storage (#26003) 2022-11-16 10:18:52 +01:00
trie_prefetcher.go cmd, core, trie: verkle-capable `geth init` (#28270) 2023-11-14 13:09:40 +01:00
trie_prefetcher_test.go eth/tracers: live chain tracing with hooks (#29189) 2024-03-22 18:53:53 +01:00