go-ethereum/core/state
Arran Schlosberg 464de82910
feat: state-key transformation w/ override (#205)
## Why this should be merged

`ava-labs/coreth` has a partitioned state-address space, achieved by
setting or clearing a specific bit in the hash used to key the space.
This change allows such behaviour to be achieved with pure `libevm`
instead of the `StateDB` wrapping that `coreth` currently uses.

## How this works

Introduction of `state.StateDBHooks` interface, including a
`TransformStateKey()` method that allows for arbitrary change of state
key. If registered, this hook will be honoured by
`StateDB.{Get,GetCommitted,State}Key()` methods unless they receive a
`stateconf.SkipStateKeyTransformation` option.

## How this was tested

Unit test of `SetState() -> GetState() + GetCommittedState()` round trip
with and without options to skip.
2025-07-22 13:08:53 -04:00
..
pruner [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
snapshot core/state/snapshot: add a missing lock (#30001) 2025-06-10 15:08:40 +01:00
access_list.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
database.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
dump.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
iterator.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
iterator_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
journal.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
metrics.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
state.libevm.go feat: types.HeaderHooks for RLP overrides (#89) 2024-12-17 13:54:58 +00:00
state.libevm_test.go chore: placate goheader (#195) 2025-06-23 15:25:18 +00:00
state_object.go fix: state.stateObject.empty() with extra payload (#62) 2024-10-28 11:34:19 -07:00
state_object.libevm_test.go chore: placate goheader (#195) 2025-06-23 15:25:18 +00:00
state_object_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
state_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
statedb.go feat: state-key transformation w/ override (#205) 2025-07-22 13:08:53 -04:00
statedb.libevm.go feat: state-key transformation w/ override (#205) 2025-07-22 13:08:53 -04:00
statedb.libevm_test.go feat: state-key transformation w/ override (#205) 2025-07-22 13:08:53 -04:00
statedb_fuzz_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
statedb_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
sync.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
sync_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
transient_storage.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
trie_prefetcher.go feat(core/state): async trie prefetching (#76) 2024-11-26 08:01:47 -08:00
trie_prefetcher.libevm.go feat(core/state): async trie prefetching (#76) 2024-11-26 08:01:47 -08:00
trie_prefetcher.libevm_test.go feat(core/state): async trie prefetching (#76) 2024-11-26 08:01:47 -08:00
trie_prefetcher_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00