mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-20 13:44:31 +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. |
||
|---|---|---|
| .. | ||
| forks | ||
| bootnodes.go | ||
| config.go | ||
| config.libevm.go | ||
| config.libevm_test.go | ||
| config_test.go | ||
| dao.go | ||
| denomination.go | ||
| example.libevm_test.go | ||
| hooks.libevm.go | ||
| hooks.libevm_test.go | ||
| json.libevm.go | ||
| json.libevm_test.go | ||
| network_params.go | ||
| protocol_params.go | ||
| version.go | ||
| version.libevm.go | ||
| version.libevm_test.go | ||