mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-20 13:44:31 +00:00
## 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.
|
||
|---|---|---|
| .. | ||
| pruner | ||
| snapshot | ||
| access_list.go | ||
| database.go | ||
| dump.go | ||
| iterator.go | ||
| iterator_test.go | ||
| journal.go | ||
| metrics.go | ||
| state.libevm.go | ||
| state.libevm_test.go | ||
| state_object.go | ||
| state_object.libevm_test.go | ||
| state_object_test.go | ||
| state_test.go | ||
| statedb.go | ||
| statedb.libevm.go | ||
| statedb.libevm_test.go | ||
| statedb_fuzz_test.go | ||
| statedb_test.go | ||
| sync.go | ||
| sync_test.go | ||
| transient_storage.go | ||
| trie_prefetcher.go | ||
| trie_prefetcher.libevm.go | ||
| trie_prefetcher.libevm_test.go | ||
| trie_prefetcher_test.go | ||