go-ethereum/libevm/temporary
Arran Schlosberg 35926db4d6
feat: temporary extras (#234)
## 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.
2025-10-02 17:42:26 +01:00
..
temporary.go feat: temporary extras (#234) 2025-10-02 17:42:26 +01:00