diff --git a/docs/writing_tests/tutorials/state_transition.md b/docs/writing_tests/tutorials/state_transition.md index 3377a9e0983..2abd8533a3a 100644 --- a/docs/writing_tests/tutorials/state_transition.md +++ b/docs/writing_tests/tutorials/state_transition.md @@ -32,7 +32,7 @@ In Python, multi-line strings are denoted using `"""`. As a convention, a file's import pytest from ethereum_test_tools import Account, Alloc, Environment, StateTestFiller, Transaction -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op ``` In this snippet the required constants, types and helper functions are imported from `ethereum_test_tools`. The `Opcodes` class (aliased as `Op`) provides the Python minilang for writing EVM bytecode. We will go over these as we come across them. diff --git a/docs/writing_tests/writing_a_new_test.md b/docs/writing_tests/writing_a_new_test.md index 89e4197b902..302f225cdd4 100644 --- a/docs/writing_tests/writing_a_new_test.md +++ b/docs/writing_tests/writing_a_new_test.md @@ -176,10 +176,10 @@ For a full list of available opcodes and their usage, see [`Opcodes`][ethereum_t #### Higher-Level Constructs -For more complex control flow, you can use constructs like [`Switch`][ethereum_test_tools.code.generators.Switch] and [`Case`][ethereum_test_tools.code.generators.Case] from the `ethereum_test_tools.code.generators` module: +For more complex control flow, you can use constructs like [`Switch`][ethereum_test_tools.tools_code.generators.Switch] and [`Case`][ethereum_test_tools.tools_code.generators.Case] from the `ethereum_test_tools.tools_code.generators` module: ```python -from ethereum_test_tools.code.generators import Switch, Case +from ethereum_test_tools.tools_code.generators import Switch, Case from ethereum_test_vm.opcode import Opcodes as Op code = Switch( @@ -191,7 +191,7 @@ code = Switch( ) ``` -The `ethereum_test_tools.code.generators` module also defines other high-level constructs like [`While`][ethereum_test_tools.code.generators.While] and [`Conditional`][ethereum_test_tools.code.generators.Conditional]. +The `ethereum_test_tools.tools_code.generators` module also defines other high-level constructs like [`While`][ethereum_test_tools.tools_code.generators.While] and [`Conditional`][ethereum_test_tools.tools_code.generators.Conditional]. #### Converting Bytecode to Minilang diff --git a/pyproject.toml b/pyproject.toml index f3b85131366..8525cd71df3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -129,7 +129,7 @@ line-length = 99 [tool.ruff.lint] select = ["E", "F", "B", "W", "I", "A", "N", "D", "C"] fixable = ["I", "B", "E", "F", "W", "D", "C"] -ignore = ["D205", "D203", "D212", "D415", "C901", "A005"] +ignore = ["D205", "D203", "D212", "D415", "C420", "C901"] [tool.mypy] disable_error_code = ["import-untyped"] diff --git a/src/cli/eest/make/templates/blockchain_test.py.j2 b/src/cli/eest/make/templates/blockchain_test.py.j2 index beb6bdd4d82..7cb2c14aada 100644 --- a/src/cli/eest/make/templates/blockchain_test.py.j2 +++ b/src/cli/eest/make/templates/blockchain_test.py.j2 @@ -14,7 +14,7 @@ from ethereum_test_tools import ( Environment, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "DUMMY/eip-DUMMY.md" REFERENCE_SPEC_VERSION = "DUMMY_VERSION" diff --git a/src/cli/eest/make/templates/state_test.py.j2 b/src/cli/eest/make/templates/state_test.py.j2 index 35d845ca27d..ad5c12a7a61 100644 --- a/src/cli/eest/make/templates/state_test.py.j2 +++ b/src/cli/eest/make/templates/state_test.py.j2 @@ -7,7 +7,7 @@ import pytest from ethereum_test_forks import Fork from ethereum_test_tools import Account, Alloc, Environment, StateTestFiller, Transaction -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "DUMMY/eip-DUMMY.md" REFERENCE_SPEC_VERSION = "DUMMY_VERSION" diff --git a/src/cli/eofwrap.py b/src/cli/eofwrap.py index 479eb045fdc..c23a695a43d 100644 --- a/src/cli/eofwrap.py +++ b/src/cli/eofwrap.py @@ -33,7 +33,7 @@ from ethereum_test_types import Transaction from ethereum_test_types.block_types import Environment from ethereum_test_types.eof.v1 import Container -from ethereum_test_vm.bytecode import Bytecode +from ethereum_test_vm import Bytecode from .evm_bytes import OpcodeWithOperands, process_evm_bytes diff --git a/src/cli/evm_bytes.py b/src/cli/evm_bytes.py index cfe3c6283f1..1b847ed97fb 100644 --- a/src/cli/evm_bytes.py +++ b/src/cli/evm_bytes.py @@ -6,9 +6,8 @@ import click from ethereum_test_base_types import ZeroPaddedHexNumber -from ethereum_test_vm import Macro +from ethereum_test_vm import Bytecode, Macro from ethereum_test_vm import Opcodes as Op -from ethereum_test_vm.bytecode import Bytecode OPCODES_WITH_EMPTY_LINES_AFTER = { Op.STOP, diff --git a/src/cli/gentest/request_manager.py b/src/cli/gentest/request_manager.py index ab9ccc80d8c..e4eac7e11d4 100644 --- a/src/cli/gentest/request_manager.py +++ b/src/cli/gentest/request_manager.py @@ -15,7 +15,7 @@ from config import EnvConfig from ethereum_test_base_types import Hash from ethereum_test_rpc import BlockNumberType, DebugRPC, EthRPC -from ethereum_test_rpc.types import TransactionByHashResponse +from ethereum_test_rpc.rpc_types import TransactionByHashResponse from ethereum_test_types import Environment diff --git a/src/cli/gentest/test_context_providers.py b/src/cli/gentest/test_context_providers.py index 54b913cf86a..f0cb5c3e021 100644 --- a/src/cli/gentest/test_context_providers.py +++ b/src/cli/gentest/test_context_providers.py @@ -19,7 +19,7 @@ from pydantic import BaseModel from ethereum_test_base_types import Account, Hash -from ethereum_test_rpc.types import TransactionByHashResponse +from ethereum_test_rpc.rpc_types import TransactionByHashResponse from ethereum_test_tools import Environment, Transaction from .request_manager import RPCRequest diff --git a/src/cli/gentest/test_providers.py b/src/cli/gentest/test_providers.py index 75a44fbe899..dc29d306ee3 100644 --- a/src/cli/gentest/test_providers.py +++ b/src/cli/gentest/test_providers.py @@ -17,7 +17,7 @@ from pydantic import BaseModel from ethereum_test_base_types import Account, Address, ZeroPaddedHexNumber -from ethereum_test_rpc.types import TransactionByHashResponse +from ethereum_test_rpc.rpc_types import TransactionByHashResponse from ethereum_test_types import Environment diff --git a/src/cli/pytest_commands/pytest_ini_files/pytest-consume.ini b/src/cli/pytest_commands/pytest_ini_files/pytest-consume.ini index b6efe7a5510..e8e005aaa14 100644 --- a/src/cli/pytest_commands/pytest_ini_files/pytest-consume.ini +++ b/src/cli/pytest_commands/pytest_ini_files/pytest-consume.ini @@ -8,6 +8,6 @@ addopts = -p pytest_plugins.concurrency # disable pytest built-in logging entirely `-p no:logging` -p no:logging - -p pytest_plugins.logging.logging + -p pytest_plugins.custom_logging.plugin_logging -p pytest_plugins.consume.consume -p pytest_plugins.help.help \ No newline at end of file diff --git a/src/cli/pytest_commands/pytest_ini_files/pytest-execute-eth-config.ini b/src/cli/pytest_commands/pytest_ini_files/pytest-execute-eth-config.ini index 439116dab55..9b098a5efc9 100644 --- a/src/cli/pytest_commands/pytest_ini_files/pytest-execute-eth-config.ini +++ b/src/cli/pytest_commands/pytest_ini_files/pytest-execute-eth-config.ini @@ -6,7 +6,7 @@ python_files = *.py addopts = -p pytest_plugins.execute.eth_config.eth_config -p pytest_plugins.help.help - -p pytest_plugins.logging.logging + -p pytest_plugins.custom_logging.plugin_logging -m "not eip_version_check" --tb short --dist loadscope diff --git a/src/cli/pytest_commands/pytest_ini_files/pytest-execute.ini b/src/cli/pytest_commands/pytest_ini_files/pytest-execute.ini index 8e476ead0c7..9797d1f8920 100644 --- a/src/cli/pytest_commands/pytest_ini_files/pytest-execute.ini +++ b/src/cli/pytest_commands/pytest_ini_files/pytest-execute.ini @@ -16,7 +16,7 @@ addopts = -p pytest_plugins.execute.rpc.remote -p pytest_plugins.forks.forks -p pytest_plugins.help.help - -p pytest_plugins.logging.logging + -p pytest_plugins.custom_logging.plugin_logging --tb short --dist loadscope --ignore tests/cancun/eip4844_blobs/point_evaluation_vectors/ diff --git a/src/cli/pytest_commands/pytest_ini_files/pytest-fill.ini b/src/cli/pytest_commands/pytest_ini_files/pytest-fill.ini index d59472d7c63..018db69c28b 100644 --- a/src/cli/pytest_commands/pytest_ini_files/pytest-fill.ini +++ b/src/cli/pytest_commands/pytest_ini_files/pytest-fill.ini @@ -17,7 +17,7 @@ addopts = -p pytest_plugins.forks.forks -p pytest_plugins.eels_resolver -p pytest_plugins.help.help - -p pytest_plugins.logging.logging + -p pytest_plugins.custom_logging.plugin_logging --tb short --ignore tests/cancun/eip4844_blobs/point_evaluation_vectors/ # these customizations require the pytest-custom-report plugin diff --git a/src/ethereum_clis/__init__.py b/src/ethereum_clis/__init__.py index f555cae91e0..9b2850b7242 100644 --- a/src/ethereum_clis/__init__.py +++ b/src/ethereum_clis/__init__.py @@ -1,5 +1,12 @@ """Library of Python wrappers for the different implementations of transition tools.""" +from .cli_types import ( + BlockExceptionWithMessage, + Result, + Traces, + TransactionExceptionWithMessage, + TransitionToolOutput, +) from .clis.besu import BesuTransitionTool from .clis.ethereumjs import EthereumJSTransitionTool from .clis.evmone import EvmoneExceptionMapper, EvmOneTransitionTool @@ -10,13 +17,6 @@ from .ethereum_cli import CLINotFoundInPathError, UnknownCLIError from .fixture_consumer_tool import FixtureConsumerTool from .transition_tool import TransitionTool -from .types import ( - BlockExceptionWithMessage, - Result, - Traces, - TransactionExceptionWithMessage, - TransitionToolOutput, -) TransitionTool.set_default_tool(ExecutionSpecsTransitionTool) FixtureConsumerTool.set_default_tool(GethFixtureConsumer) diff --git a/src/ethereum_clis/types.py b/src/ethereum_clis/cli_types.py similarity index 99% rename from src/ethereum_clis/types.py rename to src/ethereum_clis/cli_types.py index 0d55c63eb23..b6c9b48bad0 100644 --- a/src/ethereum_clis/types.py +++ b/src/ethereum_clis/cli_types.py @@ -29,7 +29,7 @@ Transaction, TransactionReceipt, ) -from pytest_plugins.logging import get_logger +from pytest_plugins.custom_logging import get_logger logger = get_logger(__name__) diff --git a/src/ethereum_clis/clis/besu.py b/src/ethereum_clis/clis/besu.py index 4ddf8a9f37e..833248909f1 100644 --- a/src/ethereum_clis/clis/besu.py +++ b/src/ethereum_clis/clis/besu.py @@ -19,8 +19,8 @@ ) from ethereum_test_forks import Fork +from ..cli_types import TransitionToolOutput from ..transition_tool import TransitionTool, dump_files_to_directory, model_dump_config -from ..types import TransitionToolOutput class BesuTransitionTool(TransitionTool): diff --git a/src/ethereum_clis/clis/execution_specs.py b/src/ethereum_clis/clis/execution_specs.py index 3012acc12d1..31b5dd2e430 100644 --- a/src/ethereum_clis/clis/execution_specs.py +++ b/src/ethereum_clis/clis/execution_specs.py @@ -19,7 +19,7 @@ TransactionException, ) from ethereum_test_forks import Fork -from pytest_plugins.logging import get_logger +from pytest_plugins.custom_logging import get_logger from ..transition_tool import TransitionTool diff --git a/src/ethereum_clis/ethereum_cli.py b/src/ethereum_clis/ethereum_cli.py index d08d11b529b..7ea060fcc7c 100644 --- a/src/ethereum_clis/ethereum_cli.py +++ b/src/ethereum_clis/ethereum_cli.py @@ -8,7 +8,7 @@ from re import Pattern from typing import Any, List, Optional, Type -from pytest_plugins.logging import get_logger +from pytest_plugins.custom_logging import get_logger logger = get_logger(__name__) diff --git a/src/ethereum_clis/tests/test_transition_tools_support.py b/src/ethereum_clis/tests/test_transition_tools_support.py index 3c6fd625c14..953af15744b 100644 --- a/src/ethereum_clis/tests/test_transition_tools_support.py +++ b/src/ethereum_clis/tests/test_transition_tools_support.py @@ -31,8 +31,8 @@ Withdrawal, add_kzg_version, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types import Alloc +from ethereum_test_vm import Opcodes as Op BLOB_COMMITMENT_VERSION_KZG = 1 diff --git a/src/ethereum_clis/transition_tool.py b/src/ethereum_clis/transition_tool.py index 58d66424dcf..c3fa04ec278 100644 --- a/src/ethereum_clis/transition_tool.py +++ b/src/ethereum_clis/transition_tool.py @@ -24,9 +24,7 @@ from ethereum_test_forks.helpers import get_development_forks, get_forks from ethereum_test_types import Alloc, Environment, Transaction -from .ethereum_cli import EthereumCLI -from .file_utils import dump_files_to_directory, write_json_file -from .types import ( +from .cli_types import ( Traces, TransactionReceipt, TransactionTraces, @@ -35,6 +33,8 @@ TransitionToolOutput, TransitionToolRequest, ) +from .ethereum_cli import EthereumCLI +from .file_utils import dump_files_to_directory, write_json_file model_dump_config: Mapping = {"by_alias": True, "exclude_none": True} diff --git a/src/ethereum_test_base_types/__init__.py b/src/ethereum_test_base_types/__init__.py index 3bb8c6a3707..6562a2e848d 100644 --- a/src/ethereum_test_base_types/__init__.py +++ b/src/ethereum_test_base_types/__init__.py @@ -18,6 +18,7 @@ Wei, ZeroPaddedHexNumber, ) +from .base_types_json import to_json from .composite_types import ( AccessList, Account, @@ -38,7 +39,6 @@ TestPrivateKey2, ) from .conversions import to_bytes, to_hex -from .json import to_json from .pydantic import CamelModel, EthereumTestBaseModel, EthereumTestRootModel from .reference_spec import ReferenceSpec from .serialization import RLPSerializable, SignableRLPSerializable diff --git a/src/ethereum_test_base_types/json.py b/src/ethereum_test_base_types/base_types_json.py similarity index 100% rename from src/ethereum_test_base_types/json.py rename to src/ethereum_test_base_types/base_types_json.py diff --git a/src/ethereum_test_base_types/tests/test_base_types.py b/src/ethereum_test_base_types/tests/test_base_types.py index c53ff13898b..a521cbb971e 100644 --- a/src/ethereum_test_base_types/tests/test_base_types.py +++ b/src/ethereum_test_base_types/tests/test_base_types.py @@ -5,8 +5,8 @@ import pytest from ..base_types import Address, Hash, Wei +from ..base_types_json import to_json from ..composite_types import AccessList -from ..json import to_json @pytest.mark.parametrize( diff --git a/src/ethereum_test_exceptions/exceptions/__init__.py b/src/ethereum_test_exceptions/exceptions/__init__.py index 3587b249a1a..8434e5f3318 100644 --- a/src/ethereum_test_exceptions/exceptions/__init__.py +++ b/src/ethereum_test_exceptions/exceptions/__init__.py @@ -3,14 +3,14 @@ from .base import ExceptionBase, UndefinedException, from_pipe_str, to_pipe_str from .block import BlockException from .eof import EOFException -from .transaction import TransactionException -from .types import ( +from .exceptions_types import ( BlockExceptionInstanceOrList, EOFExceptionInstanceOrList, ExceptionBoundTypeVar, ExceptionInstanceOrList, TransactionExceptionInstanceOrList, ) +from .transaction import TransactionException __all__ = [ "ExceptionBase", diff --git a/src/ethereum_test_exceptions/exceptions/types.py b/src/ethereum_test_exceptions/exceptions/exceptions_types.py similarity index 100% rename from src/ethereum_test_exceptions/exceptions/types.py rename to src/ethereum_test_exceptions/exceptions/exceptions_types.py diff --git a/src/ethereum_test_execution/blob_transaction.py b/src/ethereum_test_execution/blob_transaction.py index 8be0a25b440..6c7f6a90d0d 100644 --- a/src/ethereum_test_execution/blob_transaction.py +++ b/src/ethereum_test_execution/blob_transaction.py @@ -9,10 +9,10 @@ from ethereum_test_base_types.base_types import Bytes from ethereum_test_forks import Fork from ethereum_test_rpc import BlobAndProofV1, BlobAndProofV2, EngineRPC, EthRPC -from ethereum_test_rpc.types import GetBlobsResponse +from ethereum_test_rpc.rpc_types import GetBlobsResponse from ethereum_test_types import NetworkWrappedTransaction, Transaction from ethereum_test_types.transaction_types import TransactionTestMetadata -from pytest_plugins.logging import get_logger +from pytest_plugins.custom_logging import get_logger from .base import BaseExecute diff --git a/src/ethereum_test_rpc/__init__.py b/src/ethereum_test_rpc/__init__.py index 5e5438a2cae..85e533d89bd 100644 --- a/src/ethereum_test_rpc/__init__.py +++ b/src/ethereum_test_rpc/__init__.py @@ -9,7 +9,7 @@ NetRPC, SendTransactionExceptionError, ) -from .types import ( +from .rpc_types import ( BlobAndProofV1, BlobAndProofV2, EthConfigResponse, diff --git a/src/ethereum_test_rpc/rpc.py b/src/ethereum_test_rpc/rpc.py index 61aa05c650e..1f289b628ff 100644 --- a/src/ethereum_test_rpc/rpc.py +++ b/src/ethereum_test_rpc/rpc.py @@ -11,9 +11,9 @@ from ethereum_test_base_types import Address, Bytes, Hash, to_json from ethereum_test_types import Transaction -from pytest_plugins.logging import get_logger +from pytest_plugins.custom_logging import get_logger -from .types import ( +from .rpc_types import ( EthConfigResponse, ForkchoiceState, ForkchoiceUpdateResponse, diff --git a/src/ethereum_test_rpc/types.py b/src/ethereum_test_rpc/rpc_types.py similarity index 100% rename from src/ethereum_test_rpc/types.py rename to src/ethereum_test_rpc/rpc_types.py diff --git a/src/ethereum_test_specs/state.py b/src/ethereum_test_specs/state.py index f840b8db1b4..4ec2cd688c2 100644 --- a/src/ethereum_test_specs/state.py +++ b/src/ethereum_test_specs/state.py @@ -35,7 +35,7 @@ Environment, Transaction, ) -from pytest_plugins.logging import get_logger +from pytest_plugins.custom_logging import get_logger from .base import BaseTest, OpMode from .blockchain import Block, BlockchainTest, Header diff --git a/src/ethereum_test_tools/__init__.py b/src/ethereum_test_tools/__init__.py index 18fa9543ec6..bb0b026ef9e 100644 --- a/src/ethereum_test_tools/__init__.py +++ b/src/ethereum_test_tools/__init__.py @@ -82,7 +82,7 @@ call_return_code, ) -from .code import ( +from .tools_code import ( CalldataCase, Case, CodeGasMeasure, diff --git a/src/ethereum_test_tools/tests/test_code.py b/src/ethereum_test_tools/tests/test_code.py index 48465367dd1..40d47821421 100644 --- a/src/ethereum_test_tools/tests/test_code.py +++ b/src/ethereum_test_tools/tests/test_code.py @@ -22,7 +22,7 @@ from ethereum_test_vm import UndefinedOpcodes from pytest_plugins.solc.solc import SOLC_EXPECTED_MIN_VERSION -from ..code import CalldataCase, Case, Conditional, Initcode, Switch +from ..tools_code import CalldataCase, Case, Conditional, Initcode, Switch @pytest.fixture(params=get_deployed_forks()) diff --git a/src/ethereum_test_tools/code/__init__.py b/src/ethereum_test_tools/tools_code/__init__.py similarity index 100% rename from src/ethereum_test_tools/code/__init__.py rename to src/ethereum_test_tools/tools_code/__init__.py diff --git a/src/ethereum_test_tools/code/generators.py b/src/ethereum_test_tools/tools_code/generators.py similarity index 100% rename from src/ethereum_test_tools/code/generators.py rename to src/ethereum_test_tools/tools_code/generators.py diff --git a/src/ethereum_test_tools/code/yul.py b/src/ethereum_test_tools/tools_code/yul.py similarity index 100% rename from src/ethereum_test_tools/code/yul.py rename to src/ethereum_test_tools/tools_code/yul.py diff --git a/src/ethereum_test_tools/vm/__init__.py b/src/ethereum_test_tools/vm/__init__.py deleted file mode 100644 index 6bd0c746484..00000000000 --- a/src/ethereum_test_tools/vm/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -"""Mirror module to import `ethereum_test_vm`.""" - -from .opcode import Bytecode, Macro, Macros, Opcode, OpcodeCallArg, Opcodes, UndefinedOpcodes - -__all__ = ( - "Bytecode", - "Macro", - "Macros", - "Opcode", - "OpcodeCallArg", - "Opcodes", - "UndefinedOpcodes", -) diff --git a/src/ethereum_test_tools/vm/opcode.py b/src/ethereum_test_tools/vm/opcode.py deleted file mode 100644 index fc5ed0c8efb..00000000000 --- a/src/ethereum_test_tools/vm/opcode.py +++ /dev/null @@ -1,21 +0,0 @@ -"""Import shortcuts for the ethereum_test_vm package.""" - -from ethereum_test_vm import ( - Bytecode, - Macro, - Macros, - Opcode, - OpcodeCallArg, - Opcodes, - UndefinedOpcodes, -) - -__all__ = ( - "Bytecode", - "Macro", - "Macros", - "Opcode", - "OpcodeCallArg", - "Opcodes", - "UndefinedOpcodes", -) diff --git a/src/ethereum_test_types/blob_types.py b/src/ethereum_test_types/blob_types.py index ca7e13afc31..3adc860c860 100644 --- a/src/ethereum_test_types/blob_types.py +++ b/src/ethereum_test_types/blob_types.py @@ -14,7 +14,7 @@ from ethereum_test_base_types.base_types import Bytes, Hash from ethereum_test_base_types.pydantic import CamelModel from ethereum_test_forks import Fork -from pytest_plugins.logging import get_logger +from pytest_plugins.custom_logging import get_logger CACHED_BLOBS_DIRECTORY: Path = ( Path(platformdirs.user_cache_dir("ethereum-execution-spec-tests")) / "cached_blobs" diff --git a/src/ethereum_test_types/transaction_types.py b/src/ethereum_test_types/transaction_types.py index 9b3c0966d20..4ffe706bb02 100644 --- a/src/ethereum_test_types/transaction_types.py +++ b/src/ethereum_test_types/transaction_types.py @@ -33,7 +33,7 @@ TestPrivateKey, ) from ethereum_test_exceptions import TransactionException -from pytest_plugins.logging import get_logger +from pytest_plugins.custom_logging import get_logger from .account_types import EOA from .blob_types import Blob diff --git a/src/ethereum_test_vm/__init__.py b/src/ethereum_test_vm/__init__.py index 34972a73a42..cd84471f207 100644 --- a/src/ethereum_test_vm/__init__.py +++ b/src/ethereum_test_vm/__init__.py @@ -3,7 +3,7 @@ from .bytecode import Bytecode from .evm_types import EVMCodeType from .helpers import call_return_code -from .opcode import Macro, Macros, Opcode, OpcodeCallArg, Opcodes, UndefinedOpcodes +from .opcodes import Macro, Macros, Opcode, OpcodeCallArg, Opcodes, UndefinedOpcodes __all__ = ( "Bytecode", diff --git a/src/ethereum_test_vm/helpers.py b/src/ethereum_test_vm/helpers.py index 7460975f632..2b7a723d5b2 100644 --- a/src/ethereum_test_vm/helpers.py +++ b/src/ethereum_test_vm/helpers.py @@ -1,6 +1,6 @@ """Helper functions for the EVM.""" -from .opcode import Opcodes as Op +from .opcodes import Opcodes as Op def call_return_code(opcode: Op, success: bool, *, revert: bool = False) -> int: diff --git a/src/ethereum_test_vm/opcode.py b/src/ethereum_test_vm/opcodes.py similarity index 100% rename from src/ethereum_test_vm/opcode.py rename to src/ethereum_test_vm/opcodes.py diff --git a/src/ethereum_test_vm/tests/test_vm.py b/src/ethereum_test_vm/tests/test_vm.py index f9da93d84e3..be9d7edd5da 100644 --- a/src/ethereum_test_vm/tests/test_vm.py +++ b/src/ethereum_test_vm/tests/test_vm.py @@ -4,9 +4,9 @@ from ethereum_test_base_types import Address -from ..opcode import Bytecode -from ..opcode import Macros as Om -from ..opcode import Opcodes as Op +from ..opcodes import Bytecode +from ..opcodes import Macros as Om +from ..opcodes import Opcodes as Op @pytest.mark.parametrize( diff --git a/src/pytest_plugins/consume/simulators/simulator_logic/test_via_engine.py b/src/pytest_plugins/consume/simulators/simulator_logic/test_via_engine.py index a4f8a62117b..1d54d0586c8 100644 --- a/src/pytest_plugins/consume/simulators/simulator_logic/test_via_engine.py +++ b/src/pytest_plugins/consume/simulators/simulator_logic/test_via_engine.py @@ -10,9 +10,9 @@ from ethereum_test_exceptions import UndefinedException from ethereum_test_fixtures import BlockchainEngineFixture from ethereum_test_rpc import EngineRPC, EthRPC -from ethereum_test_rpc.types import ForkchoiceState, JSONRPCError, PayloadStatusEnum +from ethereum_test_rpc.rpc_types import ForkchoiceState, JSONRPCError, PayloadStatusEnum -from ....logging import get_logger +from ....custom_logging import get_logger from ..helpers.exceptions import GenesisBlockMismatchExceptionError from ..helpers.timing import TimingData diff --git a/src/pytest_plugins/consume/simulators/simulator_logic/test_via_sync.py b/src/pytest_plugins/consume/simulators/simulator_logic/test_via_sync.py index c3ab8e202e3..cf30667c928 100644 --- a/src/pytest_plugins/consume/simulators/simulator_logic/test_via_sync.py +++ b/src/pytest_plugins/consume/simulators/simulator_logic/test_via_sync.py @@ -18,13 +18,13 @@ from ethereum_test_exceptions import UndefinedException from ethereum_test_fixtures import BlockchainEngineSyncFixture from ethereum_test_rpc import AdminRPC, EngineRPC, EthRPC, NetRPC -from ethereum_test_rpc.types import ( +from ethereum_test_rpc.rpc_types import ( ForkchoiceState, JSONRPCError, PayloadStatusEnum, ) -from ....logging import get_logger +from ....custom_logging import get_logger from ..helpers.exceptions import GenesisBlockMismatchExceptionError from ..helpers.timing import TimingData diff --git a/src/pytest_plugins/logging/__init__.py b/src/pytest_plugins/custom_logging/__init__.py similarity index 93% rename from src/pytest_plugins/logging/__init__.py rename to src/pytest_plugins/custom_logging/__init__.py index 7c2d7fe3e61..a03e1b28ad7 100644 --- a/src/pytest_plugins/logging/__init__.py +++ b/src/pytest_plugins/custom_logging/__init__.py @@ -1,6 +1,6 @@ """Import the logging module content to make it available from pytest_plugins.logging.""" -from .logging import ( +from .plugin_logging import ( FAIL_LEVEL, VERBOSE_LEVEL, ColorFormatter, diff --git a/src/pytest_plugins/logging/logging.py b/src/pytest_plugins/custom_logging/plugin_logging.py similarity index 100% rename from src/pytest_plugins/logging/logging.py rename to src/pytest_plugins/custom_logging/plugin_logging.py diff --git a/src/pytest_plugins/logging/tests/__init__.py b/src/pytest_plugins/custom_logging/tests/__init__.py similarity index 100% rename from src/pytest_plugins/logging/tests/__init__.py rename to src/pytest_plugins/custom_logging/tests/__init__.py diff --git a/src/pytest_plugins/logging/tests/test_logging.py b/src/pytest_plugins/custom_logging/tests/test_logging.py similarity index 98% rename from src/pytest_plugins/logging/tests/test_logging.py rename to src/pytest_plugins/custom_logging/tests/test_logging.py index dad7b82b9d9..9437f2e6cbe 100644 --- a/src/pytest_plugins/logging/tests/test_logging.py +++ b/src/pytest_plugins/custom_logging/tests/test_logging.py @@ -12,7 +12,7 @@ from pathlib import Path from unittest.mock import MagicMock, patch -from ..logging import ( +from ..plugin_logging import ( FAIL_LEVEL, VERBOSE_LEVEL, ColorFormatter, @@ -194,7 +194,7 @@ class TestPytestIntegration: def test_pytest_configure(self, monkeypatch, tmpdir): """Test that pytest_configure sets up logging correctly.""" - from pytest_plugins.logging.logging import pytest_configure + from pytest_plugins.custom_logging.plugin_logging import pytest_configure # Create logs directory if it doesn't exist log_dir = Path("logs") diff --git a/src/pytest_plugins/execute/eth_config/eth_config.py b/src/pytest_plugins/execute/eth_config/eth_config.py index 1e7da09cb34..cb8d30a029e 100644 --- a/src/pytest_plugins/execute/eth_config/eth_config.py +++ b/src/pytest_plugins/execute/eth_config/eth_config.py @@ -10,9 +10,9 @@ import requests from ethereum_test_rpc import EthRPC -from pytest_plugins.logging import get_logger +from pytest_plugins.custom_logging import get_logger -from .types import Genesis, NetworkConfigFile +from .execute_types import Genesis, NetworkConfigFile CURRENT_FILE = Path(realpath(__file__)) CURRENT_FOLDER = CURRENT_FILE.parent diff --git a/src/pytest_plugins/execute/eth_config/execute_eth_config.py b/src/pytest_plugins/execute/eth_config/execute_eth_config.py index 194bce8f752..af43ec0b1e2 100644 --- a/src/pytest_plugins/execute/eth_config/execute_eth_config.py +++ b/src/pytest_plugins/execute/eth_config/execute_eth_config.py @@ -8,9 +8,9 @@ import pytest from ethereum_test_rpc import EthConfigResponse, EthRPC -from pytest_plugins.logging import get_logger +from pytest_plugins.custom_logging import get_logger -from .types import NetworkConfig +from .execute_types import NetworkConfig logger = get_logger(__name__) diff --git a/src/pytest_plugins/execute/eth_config/types.py b/src/pytest_plugins/execute/eth_config/execute_types.py similarity index 100% rename from src/pytest_plugins/execute/eth_config/types.py rename to src/pytest_plugins/execute/eth_config/execute_types.py diff --git a/src/pytest_plugins/execute/eth_config/tests/test_execute_eth_config.py b/src/pytest_plugins/execute/eth_config/tests/test_execute_eth_config.py index 8feebb83717..bb147b82411 100644 --- a/src/pytest_plugins/execute/eth_config/tests/test_execute_eth_config.py +++ b/src/pytest_plugins/execute/eth_config/tests/test_execute_eth_config.py @@ -10,7 +10,7 @@ from ethereum_test_base_types import ForkHash from ethereum_test_rpc import EthConfigResponse -from ..types import NetworkConfig, NetworkConfigFile +from ..execute_types import NetworkConfig, NetworkConfigFile EXPECTED_CANCUN = json.loads(""" { diff --git a/src/pytest_plugins/execute/eth_config/tests/test_genesis.py b/src/pytest_plugins/execute/eth_config/tests/test_genesis.py index 46fbadba5ce..dcf02ecc65f 100644 --- a/src/pytest_plugins/execute/eth_config/tests/test_genesis.py +++ b/src/pytest_plugins/execute/eth_config/tests/test_genesis.py @@ -28,7 +28,7 @@ ForkConfigBlobSchedule, ) -from ..types import ForkActivationTimes, Genesis, NetworkConfig +from ..execute_types import ForkActivationTimes, Genesis, NetworkConfig CURRENT_FILE = Path(realpath(__file__)) CURRENT_FOLDER = CURRENT_FILE.parent diff --git a/src/pytest_plugins/execute/pre_alloc.py b/src/pytest_plugins/execute/pre_alloc.py index 8ee83b3f0a0..40ab87f8033 100644 --- a/src/pytest_plugins/execute/pre_alloc.py +++ b/src/pytest_plugins/execute/pre_alloc.py @@ -23,7 +23,7 @@ ) from ethereum_test_forks import Fork from ethereum_test_rpc import EthRPC -from ethereum_test_rpc.types import TransactionByHashResponse +from ethereum_test_rpc.rpc_types import TransactionByHashResponse from ethereum_test_tools import ( EOA, Account, diff --git a/src/pytest_plugins/execute/rpc/chain_builder_eth_rpc.py b/src/pytest_plugins/execute/rpc/chain_builder_eth_rpc.py index ac78b299688..017eb40fbcb 100644 --- a/src/pytest_plugins/execute/rpc/chain_builder_eth_rpc.py +++ b/src/pytest_plugins/execute/rpc/chain_builder_eth_rpc.py @@ -11,7 +11,7 @@ from ethereum_test_forks import Fork from ethereum_test_rpc import EngineRPC from ethereum_test_rpc import EthRPC as BaseEthRPC -from ethereum_test_rpc.types import ( +from ethereum_test_rpc.rpc_types import ( ForkchoiceState, PayloadAttributes, PayloadStatusEnum, diff --git a/src/pytest_plugins/filler/static_filler.py b/src/pytest_plugins/filler/static_filler.py index 33271d31722..9e240a75ea2 100644 --- a/src/pytest_plugins/filler/static_filler.py +++ b/src/pytest_plugins/filler/static_filler.py @@ -19,7 +19,7 @@ from ethereum_test_fixtures import BaseFixture, LabeledFixtureFormat from ethereum_test_forks import Fork, get_closest_fork from ethereum_test_specs import BaseStaticTest, BaseTest -from ethereum_test_tools.code.yul import Yul +from ethereum_test_tools.tools_code.yul import Yul from ..forks.forks import ValidityMarker from ..shared.helpers import labeled_format_parameter_set diff --git a/src/pytest_plugins/filler/tests/test_prealloc_group.py b/src/pytest_plugins/filler/tests/test_prealloc_group.py index dfceb93dcc1..86ccc9c3b61 100644 --- a/src/pytest_plugins/filler/tests/test_prealloc_group.py +++ b/src/pytest_plugins/filler/tests/test_prealloc_group.py @@ -232,7 +232,7 @@ class StateTest(FormattedTest): # noqa: D101 StateTestFiller, Transaction ) - from ethereum_test_tools.vm.opcode import Opcodes as Op + from ethereum_test_vm import Opcodes as Op @pytest.mark.valid_from("Istanbul") def test_chainid(state_test: StateTestFiller, pre: Alloc): @@ -269,7 +269,7 @@ class BlockchainTest(FormattedTest): # noqa: D101 Environment, Transaction ) - from ethereum_test_tools.vm.opcode import Opcodes as Op + from ethereum_test_vm import Opcodes as Op @pytest.mark.valid_from("Istanbul") def test_chainid_blockchain(blockchain_test: BlockchainTestFiller, pre: Alloc): diff --git a/src/pytest_plugins/forks/forks.py b/src/pytest_plugins/forks/forks.py index 6291951fecd..6fa07821f80 100644 --- a/src/pytest_plugins/forks/forks.py +++ b/src/pytest_plugins/forks/forks.py @@ -25,7 +25,7 @@ get_transition_forks, transition_fork_to, ) -from pytest_plugins.logging import get_logger +from pytest_plugins.custom_logging import get_logger logger = get_logger(__name__) diff --git a/src/pytest_plugins/pytest_hive/pytest_hive.py b/src/pytest_plugins/pytest_hive/pytest_hive.py index fb29cf33450..b8e0fd0cb9d 100644 --- a/src/pytest_plugins/pytest_hive/pytest_hive.py +++ b/src/pytest_plugins/pytest_hive/pytest_hive.py @@ -41,7 +41,7 @@ from hive.simulation import Simulation from hive.testing import HiveTest, HiveTestResult, HiveTestSuite -from ..logging import get_logger +from ..custom_logging import get_logger from .hive_info import ClientFile, HiveInfo logger = get_logger(__name__) diff --git a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py index c01cdf698d4..128f8276f8f 100644 --- a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py +++ b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py @@ -11,7 +11,6 @@ Transaction, compute_create_address, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.block_access_list import ( BalAccountExpectation, BalBalanceChange, @@ -21,6 +20,7 @@ BalStorageSlot, BlockAccessListExpectation, ) +from ethereum_test_vm import Opcodes as Op from .spec import ref_spec_7928 diff --git a/tests/benchmark/helpers.py b/tests/benchmark/helpers.py index 833a5dd1ec6..ca3e0705727 100644 --- a/tests/benchmark/helpers.py +++ b/tests/benchmark/helpers.py @@ -2,7 +2,7 @@ from ethereum_test_forks import Fork from ethereum_test_tools import Bytecode -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op def code_loop_precompile_call(calldata: Bytecode, attack_block: Bytecode, fork: Fork): diff --git a/tests/benchmark/test_worst_bytecode.py b/tests/benchmark/test_worst_bytecode.py index 67b1eca89a0..9c38e010bb2 100644 --- a/tests/benchmark/test_worst_bytecode.py +++ b/tests/benchmark/test_worst_bytecode.py @@ -23,8 +23,8 @@ While, compute_create2_address, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.helpers import compute_create_address +from ethereum_test_vm import Opcodes as Op from .helpers import code_loop_precompile_call diff --git a/tests/benchmark/test_worst_compute.py b/tests/benchmark/test_worst_compute.py index ba5d074e662..9bfdee16482 100644 --- a/tests/benchmark/test_worst_compute.py +++ b/tests/benchmark/test_worst_compute.py @@ -27,9 +27,9 @@ Transaction, add_kzg_version, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types import TransactionType -from ethereum_test_vm.opcode import Opcode +from ethereum_test_vm import Opcode +from ethereum_test_vm import Opcodes as Op from ..byzantium.eip198_modexp_precompile.test_modexp import ModExpInput from ..cancun.eip4844_blobs.spec import Spec as BlobsSpec diff --git a/tests/benchmark/test_worst_memory.py b/tests/benchmark/test_worst_memory.py index 4a1797097a3..8952c05a455 100644 --- a/tests/benchmark/test_worst_memory.py +++ b/tests/benchmark/test_worst_memory.py @@ -15,7 +15,7 @@ StateTestFiller, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from .helpers import code_loop_precompile_call diff --git a/tests/benchmark/test_worst_opcode.py b/tests/benchmark/test_worst_opcode.py index f41321fb89c..e4e6e3bcf1b 100644 --- a/tests/benchmark/test_worst_opcode.py +++ b/tests/benchmark/test_worst_opcode.py @@ -14,8 +14,8 @@ StateTestFiller, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op -from ethereum_test_vm.opcode import Opcode +from ethereum_test_vm import Opcode +from ethereum_test_vm import Opcodes as Op from .helpers import code_loop_precompile_call diff --git a/tests/benchmark/test_worst_stateful_opcodes.py b/tests/benchmark/test_worst_stateful_opcodes.py index 8146175ae7e..f68783e61c3 100644 --- a/tests/benchmark/test_worst_stateful_opcodes.py +++ b/tests/benchmark/test_worst_stateful_opcodes.py @@ -25,7 +25,7 @@ compute_create2_address, compute_create_address, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from .helpers import code_loop_precompile_call diff --git a/tests/berlin/eip2929_gas_cost_increases/test_precompile_warming.py b/tests/berlin/eip2929_gas_cost_increases/test_precompile_warming.py index 41fda5771d0..696f68b2d57 100644 --- a/tests/berlin/eip2929_gas_cost_increases/test_precompile_warming.py +++ b/tests/berlin/eip2929_gas_cost_increases/test_precompile_warming.py @@ -21,7 +21,7 @@ BlockchainTestFiller, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "EIPS/eip-2929.md" REFERENCE_SPEC_VERSION = "0e11417265a623adb680c527b15d0cb6701b870b" diff --git a/tests/byzantium/eip198_modexp_precompile/test_modexp.py b/tests/byzantium/eip198_modexp_precompile/test_modexp.py index 98c6a07058c..859a73b8e19 100644 --- a/tests/byzantium/eip198_modexp_precompile/test_modexp.py +++ b/tests/byzantium/eip198_modexp_precompile/test_modexp.py @@ -15,7 +15,7 @@ Transaction, compute_create_address, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from .helpers import ModExpInput, ModExpOutput diff --git a/tests/cancun/eip1153_tstore/test_basic_tload.py b/tests/cancun/eip1153_tstore/test_basic_tload.py index 0f93f0f6d08..0b797913a8c 100644 --- a/tests/cancun/eip1153_tstore/test_basic_tload.py +++ b/tests/cancun/eip1153_tstore/test_basic_tload.py @@ -8,7 +8,7 @@ import pytest from ethereum_test_tools import Account, Address, Alloc, Environment, StateTestFiller, Transaction -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from .spec import Spec, ref_spec_1153 diff --git a/tests/cancun/eip1153_tstore/test_tload_calls.py b/tests/cancun/eip1153_tstore/test_tload_calls.py index 6d3492624d6..27837bc797c 100644 --- a/tests/cancun/eip1153_tstore/test_tload_calls.py +++ b/tests/cancun/eip1153_tstore/test_tload_calls.py @@ -6,8 +6,8 @@ import pytest from ethereum_test_tools import Account, Address, Alloc, Environment, StateTestFiller, Transaction -from ethereum_test_tools.vm.opcode import Bytecode -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Bytecode +from ethereum_test_vm import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "EIPS/eip-1153.md" REFERENCE_SPEC_VERSION = "1eb863b534a5a3e19e9c196ab2a7f3db4bb9da17" diff --git a/tests/cancun/eip1153_tstore/test_tload_reentrancy.py b/tests/cancun/eip1153_tstore/test_tload_reentrancy.py index 3a8a52092b4..4d66ea5115c 100644 --- a/tests/cancun/eip1153_tstore/test_tload_reentrancy.py +++ b/tests/cancun/eip1153_tstore/test_tload_reentrancy.py @@ -18,9 +18,9 @@ Switch, Transaction, ) -from ethereum_test_tools.vm.opcode import Bytecode -from ethereum_test_tools.vm.opcode import Macros as Om -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Bytecode +from ethereum_test_vm import Macros as Om +from ethereum_test_vm import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "EIPS/eip-1153.md" REFERENCE_SPEC_VERSION = "1eb863b534a5a3e19e9c196ab2a7f3db4bb9da17" diff --git a/tests/cancun/eip1153_tstore/test_tstorage_clear_after_tx.py b/tests/cancun/eip1153_tstore/test_tstorage_clear_after_tx.py index 725941db677..8cf988bd763 100644 --- a/tests/cancun/eip1153_tstore/test_tstorage_clear_after_tx.py +++ b/tests/cancun/eip1153_tstore/test_tstorage_clear_after_tx.py @@ -17,8 +17,8 @@ Initcode, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container +from ethereum_test_vm import Opcodes as Op from .spec import ref_spec_1153 diff --git a/tests/cancun/eip1153_tstore/test_tstore_reentrancy.py b/tests/cancun/eip1153_tstore/test_tstore_reentrancy.py index b371ea93146..30d200b4fb6 100644 --- a/tests/cancun/eip1153_tstore/test_tstore_reentrancy.py +++ b/tests/cancun/eip1153_tstore/test_tstore_reentrancy.py @@ -18,9 +18,9 @@ Switch, Transaction, ) -from ethereum_test_tools.vm.opcode import Bytecode -from ethereum_test_tools.vm.opcode import Macros as Om -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Bytecode +from ethereum_test_vm import Macros as Om +from ethereum_test_vm import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "EIPS/eip-1153.md" REFERENCE_SPEC_VERSION = "1eb863b534a5a3e19e9c196ab2a7f3db4bb9da17" diff --git a/tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py b/tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py index d9e6f57a70b..69db3d19ab6 100644 --- a/tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py +++ b/tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py @@ -35,7 +35,7 @@ Transaction, Withdrawal, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from .spec import Spec, ref_spec_4788 diff --git a/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py b/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py index a8789765262..44257dc67df 100644 --- a/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py +++ b/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py @@ -53,7 +53,7 @@ TransactionReceipt, call_return_code, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from .common import INF_POINT, Z_Y_VALID_ENDIANNESS, Z from .spec import Spec, ref_spec_4844 diff --git a/tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py b/tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py index 22ff6476c00..02a80eb3de9 100644 --- a/tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py +++ b/tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py @@ -20,7 +20,7 @@ Transaction, ceiling_division, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from .common import INF_POINT, Z from .spec import Spec, ref_spec_4844 diff --git a/tests/cancun/eip6780_selfdestruct/test_dynamic_create2_selfdestruct_collision.py b/tests/cancun/eip6780_selfdestruct/test_dynamic_create2_selfdestruct_collision.py index 3c40ad69d6b..ea59c47f2c0 100644 --- a/tests/cancun/eip6780_selfdestruct/test_dynamic_create2_selfdestruct_collision.py +++ b/tests/cancun/eip6780_selfdestruct/test_dynamic_create2_selfdestruct_collision.py @@ -21,7 +21,7 @@ Transaction, compute_create2_address, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "EIPS/eip-6780.md" REFERENCE_SPEC_VERSION = "1b6a0e94cc47e859b9866e570391cf37dc55059a" diff --git a/tests/cancun/eip6780_selfdestruct/test_reentrancy_selfdestruct_revert.py b/tests/cancun/eip6780_selfdestruct/test_reentrancy_selfdestruct_revert.py index 40cc682480f..9a851c6b26c 100644 --- a/tests/cancun/eip6780_selfdestruct/test_reentrancy_selfdestruct_revert.py +++ b/tests/cancun/eip6780_selfdestruct/test_reentrancy_selfdestruct_revert.py @@ -18,7 +18,7 @@ StateTestFiller, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "EIPS/eip-6780.md" REFERENCE_SPEC_VERSION = "1b6a0e94cc47e859b9866e570391cf37dc55059a" diff --git a/tests/cancun/eip6780_selfdestruct/test_selfdestruct.py b/tests/cancun/eip6780_selfdestruct/test_selfdestruct.py index c38220fe005..b8396261625 100644 --- a/tests/cancun/eip6780_selfdestruct/test_selfdestruct.py +++ b/tests/cancun/eip6780_selfdestruct/test_selfdestruct.py @@ -18,6 +18,7 @@ Block, BlockchainTestFiller, Bytecode, + Conditional, Hash, Initcode, StateTestFiller, @@ -25,8 +26,7 @@ Transaction, compute_create_address, ) -from ethereum_test_tools.code.generators import Conditional -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "EIPS/eip-6780.md" REFERENCE_SPEC_VERSION = "1b6a0e94cc47e859b9866e570391cf37dc55059a" diff --git a/tests/frontier/opcodes/test_all_opcodes.py b/tests/frontier/opcodes/test_all_opcodes.py index d8679d252ca..458c332dd30 100644 --- a/tests/frontier/opcodes/test_all_opcodes.py +++ b/tests/frontier/opcodes/test_all_opcodes.py @@ -17,8 +17,8 @@ StateTestFiller, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcode, UndefinedOpcodes -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcode, UndefinedOpcodes +from ethereum_test_vm import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "N/A" REFERENCE_SPEC_VERSION = "N/A" diff --git a/tests/frontier/opcodes/test_call.py b/tests/frontier/opcodes/test_call.py index ad13a4d73a7..e7feb662db5 100644 --- a/tests/frontier/opcodes/test_call.py +++ b/tests/frontier/opcodes/test_call.py @@ -6,12 +6,12 @@ from ethereum_test_tools import ( Account, Alloc, + CodeGasMeasure, Environment, StateTestFiller, Transaction, ) -from ethereum_test_tools.code.generators import CodeGasMeasure -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op # TODO: There's an issue with gas definitions on forks previous to Berlin, remove this when fixed. diff --git a/tests/frontier/opcodes/test_call_and_callcode_gas_calculation.py b/tests/frontier/opcodes/test_call_and_callcode_gas_calculation.py index 73e9c9f3cc7..740253dbb57 100644 --- a/tests/frontier/opcodes/test_call_and_callcode_gas_calculation.py +++ b/tests/frontier/opcodes/test_call_and_callcode_gas_calculation.py @@ -37,7 +37,7 @@ StateTestFiller, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op """ PUSH opcode cost is 3, GAS opcode cost is 2. diff --git a/tests/frontier/opcodes/test_calldatacopy.py b/tests/frontier/opcodes/test_calldatacopy.py index 44ab406a45d..90bd3c68ce8 100644 --- a/tests/frontier/opcodes/test_calldatacopy.py +++ b/tests/frontier/opcodes/test_calldatacopy.py @@ -4,7 +4,7 @@ from ethereum_test_forks import Byzantium, Fork from ethereum_test_tools import Account, Alloc, Bytecode, StateTestFiller, Transaction -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op @pytest.mark.ported_from( diff --git a/tests/frontier/opcodes/test_calldataload.py b/tests/frontier/opcodes/test_calldataload.py index ca135e51a0a..41f03f12847 100644 --- a/tests/frontier/opcodes/test_calldataload.py +++ b/tests/frontier/opcodes/test_calldataload.py @@ -5,7 +5,7 @@ from ethereum_test_forks import Byzantium, Fork from ethereum_test_tools import Account, Alloc, StateTestFiller, Transaction from ethereum_test_tools import Macros as Om -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op @pytest.mark.ported_from( diff --git a/tests/frontier/opcodes/test_calldatasize.py b/tests/frontier/opcodes/test_calldatasize.py index 38a2f9415a0..d06a7330da6 100644 --- a/tests/frontier/opcodes/test_calldatasize.py +++ b/tests/frontier/opcodes/test_calldatasize.py @@ -5,7 +5,7 @@ from ethereum_test_forks import Byzantium, Fork from ethereum_test_tools import Account, Alloc, StateTestFiller, Transaction from ethereum_test_tools import Macros as Om -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op @pytest.mark.ported_from( diff --git a/tests/frontier/opcodes/test_push.py b/tests/frontier/opcodes/test_push.py index 65cb213d6d1..a97abaa982c 100644 --- a/tests/frontier/opcodes/test_push.py +++ b/tests/frontier/opcodes/test_push.py @@ -8,7 +8,7 @@ from ethereum_test_forks import Fork, Frontier, Homestead from ethereum_test_tools import Account, Alloc, Environment, StateTestFiller, Transaction from ethereum_test_tools import Opcodes as Op -from ethereum_test_vm.bytecode import Bytecode +from ethereum_test_vm import Bytecode def get_input_for_push_opcode(opcode: Op) -> bytes: diff --git a/tests/frontier/precompiles/test_precompiles.py b/tests/frontier/precompiles/test_precompiles.py index 280b7323533..24ef1b00457 100644 --- a/tests/frontier/precompiles/test_precompiles.py +++ b/tests/frontier/precompiles/test_precompiles.py @@ -13,7 +13,7 @@ StateTestFiller, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op def precompile_addresses(fork: Fork) -> Iterator[Tuple[Address, bool]]: diff --git a/tests/frontier/scenarios/common.py b/tests/frontier/scenarios/common.py index ce9170c0358..7142ca685e5 100644 --- a/tests/frontier/scenarios/common.py +++ b/tests/frontier/scenarios/common.py @@ -6,7 +6,7 @@ from ethereum_test_forks import Fork, Frontier from ethereum_test_tools import Address, Alloc, Bytecode, Conditional -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op class ScenarioExpectOpcode(Enum): diff --git a/tests/frontier/scenarios/programs/all_frontier_opcodes.py b/tests/frontier/scenarios/programs/all_frontier_opcodes.py index 1120fbf4da9..83978c7509a 100644 --- a/tests/frontier/scenarios/programs/all_frontier_opcodes.py +++ b/tests/frontier/scenarios/programs/all_frontier_opcodes.py @@ -4,7 +4,7 @@ from ethereum_test_forks import Fork from ethereum_test_tools import Alloc, Bytecode, Conditional -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from ..common import ProgramResult, ScenarioTestProgram diff --git a/tests/frontier/scenarios/programs/context_calls.py b/tests/frontier/scenarios/programs/context_calls.py index bcf0a1ba4fa..0693d181102 100644 --- a/tests/frontier/scenarios/programs/context_calls.py +++ b/tests/frontier/scenarios/programs/context_calls.py @@ -4,7 +4,7 @@ from ethereum_test_forks import Byzantium, Cancun, Constantinople, Fork, Istanbul, London, Shanghai from ethereum_test_tools import Alloc, Bytecode -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from ..common import ( ProgramResult, diff --git a/tests/frontier/scenarios/programs/invalid_opcodes.py b/tests/frontier/scenarios/programs/invalid_opcodes.py index 82c396ff586..0157dba7b2c 100644 --- a/tests/frontier/scenarios/programs/invalid_opcodes.py +++ b/tests/frontier/scenarios/programs/invalid_opcodes.py @@ -4,7 +4,7 @@ from ethereum_test_forks import Fork from ethereum_test_tools import Alloc, Bytecode -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from ..common import ProgramResult, ScenarioTestProgram, make_invalid_opcode_contract diff --git a/tests/frontier/scenarios/programs/static_violation.py b/tests/frontier/scenarios/programs/static_violation.py index 950eed293e0..42146f2c4b6 100644 --- a/tests/frontier/scenarios/programs/static_violation.py +++ b/tests/frontier/scenarios/programs/static_violation.py @@ -4,7 +4,7 @@ from ethereum_test_forks import Cancun, Fork from ethereum_test_tools import Alloc, Bytecode -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from ..common import ProgramResult, ScenarioTestProgram diff --git a/tests/frontier/scenarios/scenarios/call_combinations.py b/tests/frontier/scenarios/scenarios/call_combinations.py index 1049218f27b..e8e091307ce 100644 --- a/tests/frontier/scenarios/scenarios/call_combinations.py +++ b/tests/frontier/scenarios/scenarios/call_combinations.py @@ -4,9 +4,8 @@ from typing import List from ethereum_test_tools import Address, Alloc -from ethereum_test_tools.vm.opcode import Opcode -from ethereum_test_tools.vm.opcode import Opcodes as Op -from ethereum_test_vm import EVMCodeType +from ethereum_test_vm import EVMCodeType, Opcode +from ethereum_test_vm import Opcodes as Op from ..common import Scenario, ScenarioEnvironment, ScenarioGeneratorInput diff --git a/tests/frontier/scenarios/scenarios/create_combinations.py b/tests/frontier/scenarios/scenarios/create_combinations.py index 8c43dcb88ce..d5603913246 100644 --- a/tests/frontier/scenarios/scenarios/create_combinations.py +++ b/tests/frontier/scenarios/scenarios/create_combinations.py @@ -4,11 +4,10 @@ from typing import List from ethereum_test_tools import Alloc, Bytecode -from ethereum_test_tools.vm.opcode import Macros as Om -from ethereum_test_tools.vm.opcode import Opcode -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types import compute_create_address -from ethereum_test_vm import EVMCodeType +from ethereum_test_vm import EVMCodeType, Opcode +from ethereum_test_vm import Macros as Om +from ethereum_test_vm import Opcodes as Op from ..common import Scenario, ScenarioEnvironment, ScenarioGeneratorInput diff --git a/tests/frontier/scenarios/scenarios/revert_combinations.py b/tests/frontier/scenarios/scenarios/revert_combinations.py index 17344285236..668fe83455a 100644 --- a/tests/frontier/scenarios/scenarios/revert_combinations.py +++ b/tests/frontier/scenarios/scenarios/revert_combinations.py @@ -2,9 +2,9 @@ from typing import List -from ethereum_test_tools.vm.opcode import Macro, Opcode -from ethereum_test_tools.vm.opcode import Macros as Om -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Macro, Opcode +from ethereum_test_vm import Macros as Om +from ethereum_test_vm import Opcodes as Op from ..common import Scenario, ScenarioEnvironment, ScenarioGeneratorInput diff --git a/tests/frontier/scenarios/test_scenarios.py b/tests/frontier/scenarios/test_scenarios.py index 4fd73509ceb..585aa6aab73 100644 --- a/tests/frontier/scenarios/test_scenarios.py +++ b/tests/frontier/scenarios/test_scenarios.py @@ -18,7 +18,7 @@ Storage, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from .common import ( ExecutionEnvironment, @@ -117,7 +117,7 @@ def scenarios(fork: Fork, pre: Alloc, test_program: ScenarioTestProgram) -> List ) @pytest.mark.valid_from("Frontier") @pytest.mark.parametrize( - # select program to debug ("program_id", "scenario_name") + # select program to debug ("program_id","scenario_name") # program="" select all programs # scenario_name="" select all scenarios # Example: [ScenarioDebug(program_id=ProgramSstoreSload().id, scenario_name="scenario_CALL_CALL")], # noqa: E501 diff --git a/tests/homestead/coverage/test_coverage.py b/tests/homestead/coverage/test_coverage.py index b7240c38a31..b0120d113fb 100644 --- a/tests/homestead/coverage/test_coverage.py +++ b/tests/homestead/coverage/test_coverage.py @@ -4,7 +4,7 @@ from ethereum_test_forks import Cancun, Fork from ethereum_test_tools import Alloc, Environment, StateTestFiller, Transaction -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "N/A" REFERENCE_SPEC_VERSION = "N/A" @@ -18,7 +18,7 @@ def test_coverage( ): """ Cover gaps that result from transforming Yul code into - `ethereum_test_tools.vm.opcode.Opcodes` bytecode. + our Python opcode wrapper bytecode. E.g. Yul tends to optimize stack items by using `SWAP1` and `DUP1` opcodes, which are not regularly used in python code. diff --git a/tests/istanbul/eip1344_chainid/test_chainid.py b/tests/istanbul/eip1344_chainid/test_chainid.py index 0fb3b7fbafb..72c670268cf 100644 --- a/tests/istanbul/eip1344_chainid/test_chainid.py +++ b/tests/istanbul/eip1344_chainid/test_chainid.py @@ -6,7 +6,7 @@ import pytest from ethereum_test_tools import Account, Alloc, ChainConfig, StateTestFiller, Transaction -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "EIPS/eip-1344.md" REFERENCE_SPEC_VERSION = "02e46aebc80e6e5006ab4d2daa41876139f9a9e2" diff --git a/tests/istanbul/eip152_blake2/conftest.py b/tests/istanbul/eip152_blake2/conftest.py index c21a352ced3..ed544ec2911 100644 --- a/tests/istanbul/eip152_blake2/conftest.py +++ b/tests/istanbul/eip152_blake2/conftest.py @@ -2,8 +2,8 @@ import pytest -from ethereum_test_tools.vm.opcode import Opcodes as Op -from ethereum_test_vm.bytecode import Bytecode +from ethereum_test_vm import Bytecode +from ethereum_test_vm import Opcodes as Op from .spec import Spec diff --git a/tests/istanbul/eip152_blake2/test_blake2.py b/tests/istanbul/eip152_blake2/test_blake2.py index 0fb86607816..dab5c9e6ba3 100644 --- a/tests/istanbul/eip152_blake2/test_blake2.py +++ b/tests/istanbul/eip152_blake2/test_blake2.py @@ -16,7 +16,7 @@ StateTestFiller, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from .common import Blake2bInput, ExpectedOutput from .spec import SpecTestVectors, ref_spec_152 diff --git a/tests/osaka/eip7594_peerdas/test_get_blobs.py b/tests/osaka/eip7594_peerdas/test_get_blobs.py index 5e8e9a350fe..2d349fd93b3 100644 --- a/tests/osaka/eip7594_peerdas/test_get_blobs.py +++ b/tests/osaka/eip7594_peerdas/test_get_blobs.py @@ -19,7 +19,7 @@ Transaction, TransactionException, ) -from pytest_plugins.logging import get_logger +from pytest_plugins.custom_logging import get_logger from .spec import ref_spec_7594 diff --git a/tests/osaka/eip7823_modexp_upper_bounds/conftest.py b/tests/osaka/eip7823_modexp_upper_bounds/conftest.py index 56bfb1c9371..9a89e91db31 100644 --- a/tests/osaka/eip7823_modexp_upper_bounds/conftest.py +++ b/tests/osaka/eip7823_modexp_upper_bounds/conftest.py @@ -6,8 +6,8 @@ from ethereum_test_forks import Fork, Osaka from ethereum_test_tools import Account, Address, Alloc, Storage, Transaction, keccak256 -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types import Environment +from ethereum_test_vm import Opcodes as Op from ...byzantium.eip198_modexp_precompile.helpers import ModExpInput from ..eip7883_modexp_gas_increase.spec import Spec, Spec7883 diff --git a/tests/osaka/eip7823_modexp_upper_bounds/test_modexp_upper_bounds.py b/tests/osaka/eip7823_modexp_upper_bounds/test_modexp_upper_bounds.py index 2f32f1b94d7..fca1e181272 100644 --- a/tests/osaka/eip7823_modexp_upper_bounds/test_modexp_upper_bounds.py +++ b/tests/osaka/eip7823_modexp_upper_bounds/test_modexp_upper_bounds.py @@ -19,7 +19,7 @@ Transaction, keccak256, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from ...byzantium.eip198_modexp_precompile.helpers import ModExpInput from ..eip7883_modexp_gas_increase.spec import Spec diff --git a/tests/osaka/eip7825_transaction_gas_limit_cap/test_tx_gas_limit.py b/tests/osaka/eip7825_transaction_gas_limit_cap/test_tx_gas_limit.py index 8d06306865c..254cf62decf 100644 --- a/tests/osaka/eip7825_transaction_gas_limit_cap/test_tx_gas_limit.py +++ b/tests/osaka/eip7825_transaction_gas_limit_cap/test_tx_gas_limit.py @@ -26,7 +26,7 @@ add_kzg_version, ) from ethereum_test_tools.utility.pytest import ParameterSet -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from .spec import Spec, ref_spec_7825 diff --git a/tests/osaka/eip7825_transaction_gas_limit_cap/test_tx_gas_limit_transition_fork.py b/tests/osaka/eip7825_transaction_gas_limit_cap/test_tx_gas_limit_transition_fork.py index 9d7bd449bda..eb992e8ded1 100644 --- a/tests/osaka/eip7825_transaction_gas_limit_cap/test_tx_gas_limit_transition_fork.py +++ b/tests/osaka/eip7825_transaction_gas_limit_cap/test_tx_gas_limit_transition_fork.py @@ -15,7 +15,7 @@ Transaction, TransactionException, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from .spec import ref_spec_7825 diff --git a/tests/osaka/eip7883_modexp_gas_increase/conftest.py b/tests/osaka/eip7883_modexp_gas_increase/conftest.py index f69d6b3eb30..1a685531549 100644 --- a/tests/osaka/eip7883_modexp_gas_increase/conftest.py +++ b/tests/osaka/eip7883_modexp_gas_increase/conftest.py @@ -15,7 +15,7 @@ Transaction, keccak256, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from ...byzantium.eip198_modexp_precompile.helpers import ModExpInput from .spec import Spec, Spec7883 diff --git a/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py b/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py index b0bf716667b..4132bbfdf60 100644 --- a/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py +++ b/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py @@ -17,8 +17,8 @@ Transaction, keccak256, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.helpers import compute_create_address +from ethereum_test_vm import Opcodes as Op from ...byzantium.eip198_modexp_precompile.helpers import ModExpInput from .helpers import vectors_from_file diff --git a/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds_transition.py b/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds_transition.py index 7b3315b73c2..5c4499ace62 100644 --- a/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds_transition.py +++ b/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds_transition.py @@ -5,7 +5,7 @@ from ethereum_test_checklists import EIPChecklist from ethereum_test_forks import Fork from ethereum_test_tools import Account, Alloc, Block, BlockchainTestFiller, Transaction, keccak256 -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from ...byzantium.eip198_modexp_precompile.helpers import ModExpInput from .spec import Spec, ref_spec_7883 diff --git a/tests/osaka/eip7934_block_rlp_limit/conftest.py b/tests/osaka/eip7934_block_rlp_limit/conftest.py index 651ae98488c..c3ee0fccd83 100644 --- a/tests/osaka/eip7934_block_rlp_limit/conftest.py +++ b/tests/osaka/eip7934_block_rlp_limit/conftest.py @@ -6,8 +6,8 @@ Address, Alloc, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types import Environment +from ethereum_test_vm import Opcodes as Op @pytest.fixture diff --git a/tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py b/tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py index 6ade4a1eda4..04cb4f2a26e 100644 --- a/tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py +++ b/tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py @@ -21,7 +21,7 @@ Transaction, compute_create_address, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from ...prague.eip7702_set_code_tx.spec import Spec as Spec7702 from .spec import Spec, ref_spec_7939 diff --git a/tests/paris/security/test_selfdestruct_balance_bug.py b/tests/paris/security/test_selfdestruct_balance_bug.py index 9df539ac8ea..1122d2f460f 100644 --- a/tests/paris/security/test_selfdestruct_balance_bug.py +++ b/tests/paris/security/test_selfdestruct_balance_bug.py @@ -23,7 +23,7 @@ Transaction, compute_create_address, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op @pytest.mark.valid_from("Constantinople") diff --git a/tests/prague/eip7702_set_code_tx/test_calls.py b/tests/prague/eip7702_set_code_tx/test_calls.py index 4bd038293c8..54de1976560 100644 --- a/tests/prague/eip7702_set_code_tx/test_calls.py +++ b/tests/prague/eip7702_set_code_tx/test_calls.py @@ -13,7 +13,7 @@ StateTestFiller, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op pytestmark = pytest.mark.valid_from("Prague") REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7702.md" diff --git a/tests/prague/eip7702_set_code_tx/test_set_code_txs_2.py b/tests/prague/eip7702_set_code_tx/test_set_code_txs_2.py index c7733c238f1..e6a622246e2 100644 --- a/tests/prague/eip7702_set_code_tx/test_set_code_txs_2.py +++ b/tests/prague/eip7702_set_code_tx/test_set_code_txs_2.py @@ -14,6 +14,7 @@ BlockchainTestFiller, Bytes, Case, + CodeGasMeasure, Conditional, Environment, Hash, @@ -24,10 +25,9 @@ TransactionException, compute_create_address, ) -from ethereum_test_tools.code.generators import CodeGasMeasure -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section from ethereum_test_vm import Macros +from ethereum_test_vm import Opcodes as Op from .spec import Spec, ref_spec_7702 diff --git a/tests/shanghai/eip3651_warm_coinbase/test_warm_coinbase.py b/tests/shanghai/eip3651_warm_coinbase/test_warm_coinbase.py index 0e924a28f69..b49b8569fdf 100644 --- a/tests/shanghai/eip3651_warm_coinbase/test_warm_coinbase.py +++ b/tests/shanghai/eip3651_warm_coinbase/test_warm_coinbase.py @@ -19,7 +19,7 @@ StateTestFiller, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from .spec import ref_spec_3651 diff --git a/tests/shanghai/eip3855_push0/test_push0.py b/tests/shanghai/eip3855_push0/test_push0.py index 9633582377f..c490d0d8fa1 100644 --- a/tests/shanghai/eip3855_push0/test_push0.py +++ b/tests/shanghai/eip3855_push0/test_push0.py @@ -19,7 +19,7 @@ StateTestFiller, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from .spec import ref_spec_3855 diff --git a/tests/shanghai/eip3860_initcode/helpers.py b/tests/shanghai/eip3860_initcode/helpers.py index b97e9faf414..0719355caf9 100644 --- a/tests/shanghai/eip3860_initcode/helpers.py +++ b/tests/shanghai/eip3860_initcode/helpers.py @@ -1,7 +1,7 @@ """Helpers for the EIP-3860 initcode tests.""" from ethereum_test_tools import Initcode -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op INITCODE_RESULTING_DEPLOYED_CODE = Op.STOP diff --git a/tests/shanghai/eip3860_initcode/test_initcode.py b/tests/shanghai/eip3860_initcode/test_initcode.py index 9f3d24fb5cf..1b52b29b039 100644 --- a/tests/shanghai/eip3860_initcode/test_initcode.py +++ b/tests/shanghai/eip3860_initcode/test_initcode.py @@ -28,7 +28,7 @@ ceiling_division, compute_create_address, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from .helpers import INITCODE_RESULTING_DEPLOYED_CODE, get_create_id, get_initcode_name from .spec import Spec, ref_spec_3860 diff --git a/tests/shanghai/eip3860_initcode/test_with_eof.py b/tests/shanghai/eip3860_initcode/test_with_eof.py index ddf9132cc90..433ba31d9fe 100644 --- a/tests/shanghai/eip3860_initcode/test_with_eof.py +++ b/tests/shanghai/eip3860_initcode/test_with_eof.py @@ -14,8 +14,8 @@ Transaction, compute_create_address, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1.constants import MAX_BYTECODE_SIZE, MAX_INITCODE_SIZE +from ethereum_test_vm import Opcodes as Op from .spec import ref_spec_3860 diff --git a/tests/shanghai/eip4895_withdrawals/test_withdrawals.py b/tests/shanghai/eip4895_withdrawals/test_withdrawals.py index 5280dd1e4f1..44bbbeb9021 100644 --- a/tests/shanghai/eip4895_withdrawals/test_withdrawals.py +++ b/tests/shanghai/eip4895_withdrawals/test_withdrawals.py @@ -23,7 +23,7 @@ TransactionException, Withdrawal, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op from .spec import ref_spec_4895 diff --git a/tests/unscheduled/eip7692_eof_v1/eip3540_eof_v1/opcodes.py b/tests/unscheduled/eip7692_eof_v1/eip3540_eof_v1/opcodes.py index 4d273ec5acf..9f5e816191d 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip3540_eof_v1/opcodes.py +++ b/tests/unscheduled/eip7692_eof_v1/eip3540_eof_v1/opcodes.py @@ -2,7 +2,7 @@ from typing import List -from ethereum_test_tools.vm.opcode import Opcodes as Op +from ethereum_test_vm import Opcodes as Op V1_EOF_OPCODES: List[Op] = [ # new eof ops diff --git a/tests/unscheduled/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py b/tests/unscheduled/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py index ce669cad845..7e0875da28a 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py +++ b/tests/unscheduled/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py @@ -5,7 +5,6 @@ import pytest from ethereum_test_tools import EOFException, EOFTestFiller -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import ( AutoSection, Container, @@ -19,6 +18,7 @@ MAX_CODE_SECTIONS, MAX_STACK_INCREASE_LIMIT, ) +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME diff --git a/tests/unscheduled/eip7692_eof_v1/eip3540_eof_v1/test_execution.py b/tests/unscheduled/eip7692_eof_v1/eip3540_eof_v1/test_execution.py index 676610b9def..609ebb643c1 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip3540_eof_v1/test_execution.py +++ b/tests/unscheduled/eip7692_eof_v1/eip3540_eof_v1/test_execution.py @@ -4,8 +4,8 @@ from ethereum_test_base_types import Storage from ethereum_test_tools import Account, Alloc, Environment, StateTestFiller, Transaction -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME diff --git a/tests/unscheduled/eip7692_eof_v1/eip3540_eof_v1/test_execution_function.py b/tests/unscheduled/eip7692_eof_v1/eip3540_eof_v1/test_execution_function.py index 33d6fe41c5f..9d36525d651 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip3540_eof_v1/test_execution_function.py +++ b/tests/unscheduled/eip7692_eof_v1/eip3540_eof_v1/test_execution_function.py @@ -5,9 +5,9 @@ import pytest from ethereum_test_tools import Account, Alloc, Environment, StateTestFiller, Transaction -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section from ethereum_test_types.eof.v1.constants import MAX_CODE_SECTIONS, MAX_RETURN_STACK_HEIGHT +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME diff --git a/tests/unscheduled/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py b/tests/unscheduled/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py index 96fdef127f1..0a2e407cc5a 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py +++ b/tests/unscheduled/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py @@ -3,10 +3,10 @@ import pytest from ethereum_test_tools import Account, EOFException, EOFStateTestFiller, EOFTestFiller -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section from ethereum_test_types.eof.v1.constants import MAX_BYTECODE_SIZE from ethereum_test_vm import Bytecode +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from .helpers import JumpDirection, slot_code_worked, value_code_worked diff --git a/tests/unscheduled/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py b/tests/unscheduled/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py index f4739cf5083..3fa0e7f3f65 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py +++ b/tests/unscheduled/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py @@ -12,10 +12,10 @@ StateTestFiller, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section from ethereum_test_types.eof.v1.constants import MAX_BYTECODE_SIZE from ethereum_test_vm import Bytecode +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from .helpers import ( diff --git a/tests/unscheduled/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py b/tests/unscheduled/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py index 1fbbd28debf..7fe59d8ffaa 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py +++ b/tests/unscheduled/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py @@ -3,9 +3,9 @@ import pytest from ethereum_test_tools import Account, EOFException, EOFStateTestFiller, EOFTestFiller -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section from ethereum_test_vm import Bytecode +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from .helpers import JumpDirection, slot_code_worked, slot_conditional_result, value_code_worked diff --git a/tests/unscheduled/eip7692_eof_v1/eip4750_functions/test_code_validation.py b/tests/unscheduled/eip7692_eof_v1/eip4750_functions/test_code_validation.py index c781249137c..c705d197581 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip4750_functions/test_code_validation.py +++ b/tests/unscheduled/eip7692_eof_v1/eip4750_functions/test_code_validation.py @@ -5,7 +5,6 @@ import pytest from ethereum_test_tools import EOFException, EOFTestFiller -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.constants import MAX_RUNTIME_STACK_HEIGHT from ethereum_test_types.eof.v1 import Container, Section from ethereum_test_types.eof.v1.constants import ( @@ -13,6 +12,7 @@ MAX_CODE_SECTIONS, MAX_STACK_INCREASE_LIMIT, ) +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME diff --git a/tests/unscheduled/eip7692_eof_v1/eip5450_stack/test_code_validation.py b/tests/unscheduled/eip7692_eof_v1/eip5450_stack/test_code_validation.py index 424c5845822..ed58e09c06a 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip5450_stack/test_code_validation.py +++ b/tests/unscheduled/eip7692_eof_v1/eip5450_stack/test_code_validation.py @@ -8,10 +8,10 @@ from ethereum_test_exceptions.exceptions import EOFException from ethereum_test_tools import Account, EOFStateTestFiller, EOFTestFiller -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section from ethereum_test_types.eof.v1.constants import MAX_STACK_INCREASE_LIMIT, NON_RETURNING_SECTION -from ethereum_test_vm.bytecode import Bytecode +from ethereum_test_vm import Bytecode +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from ..eip3540_eof_v1.test_all_opcodes_in_container import valid_eof_opcodes diff --git a/tests/unscheduled/eip7692_eof_v1/eip5450_stack/test_execution.py b/tests/unscheduled/eip7692_eof_v1/eip5450_stack/test_execution.py index a4586a37870..d72f12eb148 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip5450_stack/test_execution.py +++ b/tests/unscheduled/eip7692_eof_v1/eip5450_stack/test_execution.py @@ -4,7 +4,6 @@ from ethereum_test_exceptions import EOFException from ethereum_test_tools import Account, EOFStateTestFiller -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.constants import MAX_RUNTIME_STACK_HEIGHT from ethereum_test_types.eof.v1 import Container, Section from ethereum_test_types.eof.v1.constants import ( @@ -12,6 +11,7 @@ MAX_STACK_INCREASE_LIMIT, NON_RETURNING_SECTION, ) +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME diff --git a/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_jumpf_execution.py b/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_jumpf_execution.py index 56b2a5fc7c8..c8c21022b99 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_jumpf_execution.py +++ b/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_jumpf_execution.py @@ -5,10 +5,10 @@ from ethereum_test_base_types import Storage from ethereum_test_specs import StateTestFiller from ethereum_test_tools import Account, Environment, EOFException, EOFStateTestFiller, Transaction -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types import Alloc from ethereum_test_types.eof.v1 import Container, Section from ethereum_test_types.eof.v1.constants import NON_RETURNING_SECTION +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from .helpers import ( diff --git a/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_jumpf_stack.py b/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_jumpf_stack.py index ade091a3f8d..0831a8c9c24 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_jumpf_stack.py +++ b/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_jumpf_stack.py @@ -4,9 +4,9 @@ from ethereum_test_specs import EOFTestFiller from ethereum_test_tools import Account, EOFException, EOFStateTestFiller -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.constants import MAX_RUNTIME_STACK_HEIGHT from ethereum_test_types.eof.v1 import Container, Section +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from .helpers import slot_code_worked, value_code_worked diff --git a/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_jumpf_target.py b/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_jumpf_target.py index 80e2e61ef29..dcfd397430a 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_jumpf_target.py +++ b/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_jumpf_target.py @@ -3,9 +3,9 @@ import pytest from ethereum_test_tools import Account, EOFException, EOFStateTestFiller -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section from ethereum_test_types.eof.v1.constants import NON_RETURNING_SECTION +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from .helpers import slot_code_worked, value_code_worked diff --git a/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_jumpf_validation.py b/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_jumpf_validation.py index 6abc91cf9e5..67a057df89c 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_jumpf_validation.py +++ b/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_jumpf_validation.py @@ -3,9 +3,9 @@ import pytest from ethereum_test_tools import EOFException, EOFTestFiller -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.constants import MAX_RUNTIME_STACK_HEIGHT from ethereum_test_types.eof.v1 import Container, Section +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME diff --git a/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_nonreturning_validation.py b/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_nonreturning_validation.py index 4ecf0a58310..c5bc912994e 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_nonreturning_validation.py +++ b/tests/unscheduled/eip7692_eof_v1/eip6206_jumpf/test_nonreturning_validation.py @@ -3,9 +3,9 @@ import pytest from ethereum_test_tools import EOFException, EOFTestFiller -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import NON_RETURNING_SECTION, Container, ContainerKind, Section from ethereum_test_vm import Bytecode +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME diff --git a/tests/unscheduled/eip7692_eof_v1/eip663_dupn_swapn_exchange/test_dupn.py b/tests/unscheduled/eip7692_eof_v1/eip663_dupn_swapn_exchange/test_dupn.py index 997e89808fd..4285d6c8e0c 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip663_dupn_swapn_exchange/test_dupn.py +++ b/tests/unscheduled/eip7692_eof_v1/eip663_dupn_swapn_exchange/test_dupn.py @@ -15,9 +15,9 @@ StateTestFiller, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section from ethereum_test_types.eof.v1.constants import MAX_STACK_INCREASE_LIMIT +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from . import REFERENCE_SPEC_GIT_PATH, REFERENCE_SPEC_VERSION diff --git a/tests/unscheduled/eip7692_eof_v1/eip663_dupn_swapn_exchange/test_exchange.py b/tests/unscheduled/eip7692_eof_v1/eip663_dupn_swapn_exchange/test_exchange.py index 0c7c4904855..74e40d83f19 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip663_dupn_swapn_exchange/test_exchange.py +++ b/tests/unscheduled/eip7692_eof_v1/eip663_dupn_swapn_exchange/test_exchange.py @@ -15,8 +15,8 @@ StateTestFiller, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from . import REFERENCE_SPEC_GIT_PATH, REFERENCE_SPEC_VERSION diff --git a/tests/unscheduled/eip7692_eof_v1/eip663_dupn_swapn_exchange/test_swapn.py b/tests/unscheduled/eip7692_eof_v1/eip663_dupn_swapn_exchange/test_swapn.py index 47e8c6bfafd..dedbd76771f 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip663_dupn_swapn_exchange/test_swapn.py +++ b/tests/unscheduled/eip7692_eof_v1/eip663_dupn_swapn_exchange/test_swapn.py @@ -15,9 +15,9 @@ StateTestFiller, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section from ethereum_test_types.eof.v1.constants import MAX_STACK_INCREASE_LIMIT +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from . import REFERENCE_SPEC_GIT_PATH, REFERENCE_SPEC_VERSION diff --git a/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py b/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py index 66dd853fac4..feee36e6b2b 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_address_space_extension.py @@ -5,8 +5,8 @@ import pytest from ethereum_test_tools import Account, Address, Alloc, Environment, StateTestFiller, Transaction -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from .helpers import value_exceptional_abort_canary diff --git a/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_calldata.py b/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_calldata.py index a5bdc1958fe..2bc3f36e839 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_calldata.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_calldata.py @@ -6,8 +6,8 @@ import pytest from ethereum_test_tools import Account, Alloc, Environment, StateTestFiller, Transaction -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from . import REFERENCE_SPEC_GIT_PATH, REFERENCE_SPEC_VERSION diff --git a/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_calls.py b/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_calls.py index 66ebac993a8..a6e6f0a3934 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_calls.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_calls.py @@ -15,11 +15,10 @@ Storage, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section from ethereum_test_types.helpers import compute_eofcreate_address -from ethereum_test_vm.bytecode import Bytecode -from ethereum_test_vm.evm_types import EVMCodeType +from ethereum_test_vm import Bytecode, EVMCodeType +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from .spec import ( diff --git a/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_gas.py b/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_gas.py index bd42af22e3f..e7b6ffa923c 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_gas.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_gas.py @@ -8,8 +8,8 @@ from ethereum_test_base_types import Address from ethereum_test_forks import Fork from ethereum_test_tools import Alloc, Environment, StateTestFiller -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from ..gas_test import gas_test diff --git a/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_returndataload.py b/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_returndataload.py index 37b0363c0ab..53400fd80f9 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_returndataload.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7069_extcall/test_returndataload.py @@ -8,8 +8,8 @@ import pytest from ethereum_test_tools import Account, Alloc, Environment, StateTestFiller, Storage, Transaction -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from . import REFERENCE_SPEC_GIT_PATH, REFERENCE_SPEC_VERSION diff --git a/tests/unscheduled/eip7692_eof_v1/eip7480_data_section/test_code_validation.py b/tests/unscheduled/eip7692_eof_v1/eip7480_data_section/test_code_validation.py index 0189f632d44..23df4e43362 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7480_data_section/test_code_validation.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7480_data_section/test_code_validation.py @@ -3,9 +3,9 @@ import pytest from ethereum_test_tools import EOFException, EOFTestFiller -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section from ethereum_test_types.eof.v1.constants import MAX_INITCODE_SIZE +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME diff --git a/tests/unscheduled/eip7692_eof_v1/eip7480_data_section/test_data_opcodes.py b/tests/unscheduled/eip7692_eof_v1/eip7480_data_section/test_data_opcodes.py index 238cfe7cc8a..234ea530a78 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7480_data_section/test_data_opcodes.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7480_data_section/test_data_opcodes.py @@ -4,8 +4,8 @@ from ethereum_test_specs import EOFStateTestFiller from ethereum_test_tools import Account, Alloc, Environment, StateTestFiller, Transaction -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME diff --git a/tests/unscheduled/eip7692_eof_v1/eip7480_data_section/test_datacopy_memory_expansion.py b/tests/unscheduled/eip7692_eof_v1/eip7480_data_section/test_datacopy_memory_expansion.py index a57fd999100..4c4e58d7bbf 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7480_data_section/test_datacopy_memory_expansion.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7480_data_section/test_datacopy_memory_expansion.py @@ -15,8 +15,8 @@ Storage, Transaction, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME diff --git a/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_eofcreate.py b/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_eofcreate.py index 460ed2b5d3c..3f4780368af 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_eofcreate.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_eofcreate.py @@ -14,9 +14,9 @@ Transaction, compute_eofcreate_address, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section -from ethereum_test_vm.bytecode import Bytecode +from ethereum_test_vm import Bytecode +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from ..eip7069_extcall.spec import EXTCALL_SUCCESS diff --git a/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_eofcreate_failures.py b/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_eofcreate_failures.py index 8a40c601c8c..68f50eec3ee 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_eofcreate_failures.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_eofcreate_failures.py @@ -11,9 +11,9 @@ Transaction, compute_eofcreate_address, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section from ethereum_test_types.eof.v1.constants import MAX_BYTECODE_SIZE, MAX_INITCODE_SIZE +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from ..eip7069_extcall.spec import EXTCALL_FAILURE, EXTCALL_REVERT, LEGACY_CALL_FAILURE diff --git a/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_gas.py b/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_gas.py index e010dd40ee3..f7cb2519a10 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_gas.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_gas.py @@ -4,8 +4,8 @@ from ethereum_test_forks import Fork from ethereum_test_tools import Alloc, Environment, StateTestFiller, compute_eofcreate_address -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from ..gas_test import gas_test diff --git a/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_legacy_eof_creates.py b/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_legacy_eof_creates.py index ebd607293f0..390b1ce089b 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_legacy_eof_creates.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_legacy_eof_creates.py @@ -11,10 +11,10 @@ Transaction, ) from ethereum_test_tools import Initcode as LegacyInitcode -from ethereum_test_tools.vm.opcode import Opcodes -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container from ethereum_test_types.helpers import compute_create_address +from ethereum_test_vm import Opcodes +from ethereum_test_vm import Opcodes as Op from ....prague.eip7702_set_code_tx.spec import Spec from .. import EOF_FORK_NAME diff --git a/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_memory.py b/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_memory.py index 8b0bb756a67..67748507e67 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_memory.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_memory.py @@ -4,9 +4,9 @@ from ethereum_test_base_types import Account, Storage from ethereum_test_tools import Alloc, Environment, StateTestFiller, compute_eofcreate_address -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types import Transaction from ethereum_test_types.eof.v1 import Container, Section +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from .helpers import ( diff --git a/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_returncode.py b/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_returncode.py index 788933fcf9e..3b50714dec5 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_returncode.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_returncode.py @@ -5,10 +5,10 @@ from ethereum_test_base_types import Account from ethereum_test_specs import StateTestFiller from ethereum_test_tools import Alloc, EOFException, EOFTestFiller -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types import Environment, Transaction, compute_eofcreate_address from ethereum_test_types.eof.v1 import Container, ContainerKind, Section from ethereum_test_types.eof.v1.constants import MAX_BYTECODE_SIZE +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from .helpers import ( diff --git a/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_subcontainer_validation.py b/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_subcontainer_validation.py index acd6f0a67de..045e3dbbd39 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_subcontainer_validation.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7620_eof_create/test_subcontainer_validation.py @@ -3,10 +3,10 @@ import pytest from ethereum_test_tools import Account, EOFException, EOFStateTestFiller, EOFTestFiller -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, ContainerKind, Section from ethereum_test_types.eof.v1.constants import MAX_BYTECODE_SIZE, MAX_INITCODE_SIZE from ethereum_test_vm import Bytecode +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from .helpers import slot_code_worked, value_code_worked diff --git a/tests/unscheduled/eip7692_eof_v1/eip7873_tx_create/test_creation_tx.py b/tests/unscheduled/eip7692_eof_v1/eip7873_tx_create/test_creation_tx.py index 87ad9fa1e31..7d21916f292 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7873_tx_create/test_creation_tx.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7873_tx_create/test_creation_tx.py @@ -10,7 +10,7 @@ StateTestFiller, Transaction, ) -from ethereum_test_tools.code.generators import Initcode as LegacyInitcode +from ethereum_test_tools import Initcode as LegacyInitcode from ethereum_test_types import TransactionReceipt from ethereum_test_types.eof.v1 import Container diff --git a/tests/unscheduled/eip7692_eof_v1/eip7873_tx_create/test_txcreate.py b/tests/unscheduled/eip7692_eof_v1/eip7873_tx_create/test_txcreate.py index bd7dd212952..4d3b571f233 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7873_tx_create/test_txcreate.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7873_tx_create/test_txcreate.py @@ -13,9 +13,9 @@ Transaction, compute_eofcreate_address, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section -from ethereum_test_vm.bytecode import Bytecode +from ethereum_test_vm import Bytecode +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from ..eip7069_extcall.spec import EXTCALL_SUCCESS, LEGACY_CALL_SUCCESS diff --git a/tests/unscheduled/eip7692_eof_v1/eip7873_tx_create/test_txcreate_failures.py b/tests/unscheduled/eip7692_eof_v1/eip7873_tx_create/test_txcreate_failures.py index 035861ae40e..d44588aaed5 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7873_tx_create/test_txcreate_failures.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7873_tx_create/test_txcreate_failures.py @@ -14,10 +14,10 @@ Transaction, compute_eofcreate_address, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section from ethereum_test_types.eof.v1.constants import MAX_BYTECODE_SIZE, MAX_INITCODE_SIZE -from ethereum_test_vm.bytecode import Bytecode +from ethereum_test_vm import Bytecode +from ethereum_test_vm import Opcodes as Op from .. import EOF_FORK_NAME from ..eip7069_extcall.spec import EXTCALL_FAILURE, EXTCALL_REVERT, LEGACY_CALL_FAILURE diff --git a/tests/unscheduled/eip7692_eof_v1/eip7873_tx_create/test_txcreate_validates.py b/tests/unscheduled/eip7692_eof_v1/eip7873_tx_create/test_txcreate_validates.py index dfa07b48d40..3dd9dc89652 100644 --- a/tests/unscheduled/eip7692_eof_v1/eip7873_tx_create/test_txcreate_validates.py +++ b/tests/unscheduled/eip7692_eof_v1/eip7873_tx_create/test_txcreate_validates.py @@ -17,9 +17,9 @@ Transaction, compute_eofcreate_address, ) -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section -from ethereum_test_vm.bytecode import Bytecode +from ethereum_test_vm import Bytecode +from ethereum_test_vm import Opcodes as Op from ....prague.eip7702_set_code_tx.spec import Spec from .. import EOF_FORK_NAME diff --git a/tests/unscheduled/eip7692_eof_v1/gas_test.py b/tests/unscheduled/eip7692_eof_v1/gas_test.py index d0425caf798..b2520dcbc8d 100644 --- a/tests/unscheduled/eip7692_eof_v1/gas_test.py +++ b/tests/unscheduled/eip7692_eof_v1/gas_test.py @@ -4,9 +4,9 @@ from ethereum_test_base_types.base_types import Address from ethereum_test_tools import Account, Alloc, Environment, StateTestFiller, Transaction -from ethereum_test_tools.vm.opcode import Opcodes as Op from ethereum_test_types.eof.v1 import Container, Section from ethereum_test_vm import Bytecode, EVMCodeType +from ethereum_test_vm import Opcodes as Op from .eip7069_extcall.spec import ( LEGACY_CALL_FAILURE,