mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-20 13:44:31 +00:00
* feat: pseudo-generic extra payloads in `params.ChainConfig` and `params.Rules` * feat: `params.ExtraPayloadGetter` for end-user type safety * refactor: payloads only available through `params.ExtraPayloadGetter` * chore: make `libevm/examples/extraparams` a `params` testable example * doc: `libevm/pseudo` package comments and improved readability * doc: `params.*Extra*` comments and improved readability * doc: `params.ExtraPayloadGetter` comments and improved readability * doc: `params/config.libevm_test.go` comments and improved readability * refactor: simplify `params.ChainConfig.UnmarshalJSON()` * refactor: abstract new/nil-pointer creation into `pseudo.Constructor`s * feat: precompile override via `params.Extras` hooks * doc: flesh out `PrecompileOverride()` in example * doc: complete commentary and improve readability * refactor: `ChainConfig.Hooks()` + `Rules` equivalent * chore: rename precompiles test file in keeping with geth equivalent * feat: stateful precompiles + allowlist hooks The allowlist hooks are included in this commit because they allow for the same functionality as stateful precompiles in `ava-labs/coreth` and `ava-labs/subnet-evm`. * fix: `StateTransition.canExecuteTransaction()` used `msg.From` instead of `To` * test: `params.RulesHooks.CanCreateContract` integration * test: `params.RulesHooks.CanExecuteTransaction` integration * test: `vm.NewStatefulPrecompile()` integration * refactor: simplify test of `CanCreateContract` * refactor: abstract generation of random `Address`/`Hash` values * doc: full documentation + readability refactoring/renaming * fix: remove circular dependency in tests
20 lines
643 B
Go
20 lines
643 B
Go
package libevm_test
|
|
|
|
import (
|
|
"github.com/ethereum/go-ethereum/core/vm"
|
|
"github.com/ethereum/go-ethereum/libevm"
|
|
)
|
|
|
|
// IMPORTANT: if any of these break then the libevm copy MUST be updated.
|
|
|
|
// These two interfaces MUST be identical.
|
|
var (
|
|
// Each assignment demonstrates that the methods of the LHS interface are a
|
|
// (non-strict) subset of the RHS interface's; both being possible
|
|
// proves that they are identical.
|
|
_ vm.PrecompiledContract = (libevm.PrecompiledContract)(nil)
|
|
_ libevm.PrecompiledContract = (vm.PrecompiledContract)(nil)
|
|
)
|
|
|
|
// StateReader MUST be a subset vm.StateDB.
|
|
var _ libevm.StateReader = (vm.StateDB)(nil)
|