mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-20 21:54:30 +00:00
## Why this should be merged Registration of extras requires runtime enforcement of payload types. In production, only a single set of types can be registered and any attempts at re-registration will panic (by design). Although this makes production usage safe, it doesn't allow downstream consumers (e.g. data indexers) to use extras from different chains (e.g. `coreth` _and_ `subnet-evm`) at the same time. ## How this works 1. The `libevm/register.AtMostOnce` type can now be overridden temporarily. 2. `params`, `core/types`, `core/vm`, and `state` packages introduce `WithTempRegisteredExtras()` functions. 3. `libevm/temporary.WithRegisteredExtras()` provides "atomic" override of all extras. In all cases, the scope of the override is limited to the life of a single function call. ## How this was tested Relative to numbered list above: 1. Unit test of new and existing functionality. 2. Integration tests of both packages, demonstrating both payload and behavioural override. |
||
|---|---|---|
| .. | ||
| 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 | ||