diff --git a/.claude/commands/fill-tests.md b/.claude/commands/fill-tests.md index e1f3db7967a..d52179e8a3c 100644 --- a/.claude/commands/fill-tests.md +++ b/.claude/commands/fill-tests.md @@ -45,12 +45,6 @@ uv run fill --collect-only tests/ # Dry run: list tests wit - These two modes are **mutually exclusive** - Use `--generate-pre-alloc-groups` for stateful benchmarks -## Static Tests (Legacy) - -- `uv run fill --fill-static-tests tests/static/` — fills YAML/JSON fillers from `ethereum/tests` -- Legacy only — do NOT add new static fillers. Use Python tests instead -- Useful to check if spec changes broke how legacy tests fill - ## Fixture Formats One test function auto-generates multiple formats: `StateFixture`, `BlockchainFixture`, `BlockchainEngineFixture`. Use `--generate-all-formats` for additional formats via 2-phase execution. diff --git a/packages/testing/pyproject.toml b/packages/testing/pyproject.toml index e6472809571..5f12eaf8bbc 100644 --- a/packages/testing/pyproject.toml +++ b/packages/testing/pyproject.toml @@ -95,11 +95,9 @@ order_fixtures = "execution_testing.cli.order_fixtures:order_fixtures" evm_bytes = "execution_testing.cli.evm_bytes:evm_bytes" hasher = "execution_testing.cli.hasher:main" eest = "execution_testing.cli.eest.cli:eest" -fillerconvert = "execution_testing.cli.fillerconvert.fillerconvert:main" groupstats = "execution_testing.cli.show_pre_alloc_group_stats:main" extract_config = "execution_testing.cli.extract_config:extract_config" compare_fixtures = "execution_testing.cli.compare_fixtures:main" -modify_static_test_gas_limits = "execution_testing.cli.modify_static_test_gas_limits:main" benchmark_parser = "execution_testing.cli.benchmark_parser:main" [tool.setuptools.packages.find] diff --git a/packages/testing/src/execution_testing/cli/fillerconvert/fillerconvert.py b/packages/testing/src/execution_testing/cli/fillerconvert/fillerconvert.py deleted file mode 100644 index f0ac78ff6e5..00000000000 --- a/packages/testing/src/execution_testing/cli/fillerconvert/fillerconvert.py +++ /dev/null @@ -1,61 +0,0 @@ -"""Simple CLI tool that reads filler files in the `ethereum/tests` format.""" - -import argparse -from glob import glob -from pathlib import Path - -from .verify_filled import verify_refilled - - -def main() -> None: - """Run the main function.""" - parser = argparse.ArgumentParser(description="Filler parser.") - - parser.add_argument( - "mode", - type=str, - help="The type of filler we are trying to parse: blockchain/state.", - ) - parser.add_argument( - "folder_path", - type=Path, - help="The path to the JSON/YML filler directory", - ) - parser.add_argument( - "legacy_path", type=Path, help="The path to the legacy tests directory" - ) - - args = parser.parse_args() - args.folder_path = Path(str(args.folder_path).split("=")[-1]) - args.mode = str(args.mode).split("=")[-1] - - print("Scanning: " + str(args.folder_path)) - files = glob( - str(args.folder_path / "**" / "*.json"), recursive=True - ) + glob(str(args.folder_path / "**" / "*.yml"), recursive=True) - - if args.mode == "blockchain": - raise NotImplementedError("Blockchain filler not implemented yet.") - - if args.mode == "verify": - verified_vectors = 0 - for file in files: - print("Verify: " + file) - refilled_file = file - relative_file = file.removeprefix(str(args.folder_path))[1:] - original_file = ( - args.legacy_path / "GeneralStateTests" / relative_file - ) - verified_vectors += verify_refilled( - Path(refilled_file), original_file - ) - print(f"Total vectors verified: {verified_vectors}") - - # Solidity skipped tests - # or file.endswith("stExample/solidityExampleFiller.yml") - # or file.endswith("vmPerformance/performanceTesterFiller.yml") - # or file.endswith("vmPerformance/loopExpFiller.yml") - # or file.endswith("vmPerformance/loopMulFiller.yml") - # or - # file.endswith("stRevertTest/RevertRemoteSubCallStorageOOGFiller.yml") - # or file.endswith("stSolidityTest/SelfDestructFiller.yml") diff --git a/packages/testing/src/execution_testing/cli/fillerconvert/verify_filled.py b/packages/testing/src/execution_testing/cli/fillerconvert/verify_filled.py deleted file mode 100644 index 7e0555d3a9a..00000000000 --- a/packages/testing/src/execution_testing/cli/fillerconvert/verify_filled.py +++ /dev/null @@ -1,100 +0,0 @@ -"""Verify refilled test vs original generated test.""" - -import re -from pathlib import Path - -from pydantic import BaseModel, RootModel - - -# Define only relevant data we need to read from the files -class Indexes(BaseModel): - """Post Section Indexes.""" - - data: int - gas: int - value: int - - -class PostRecord(BaseModel): - """Post results record.""" - - hash: str - indexes: Indexes - - -class StateTest(BaseModel): - """StateTest in filled file.""" - - post: dict[str, list[PostRecord]] - - -class FilledStateTest(RootModel[dict[str, StateTest]]): - """State Test Wrapper.""" - - -def verify_refilled(refilled: Path, original: Path) -> int: - """ - Verify the post hash of the refilled test against the original. - - Extract the d,g,v from the refilled test name. Find the post record for - this d,g,v and the fork of the refilled test. Compare the post hash. - """ - verified_vectors = 0 - json_str = refilled.read_text(encoding="utf-8") - refilled_test_wrapper = FilledStateTest.model_validate_json(json_str) - - json_str = original.read_text(encoding="utf-8") - original_test_wrapper = FilledStateTest.model_validate_json(json_str) - - # Each original test has only 1 test with many posts for each fork and many - # txs - original_test_name, test_original = list( - original_test_wrapper.root.items() - )[0] - - for ( - refilled_test_name, - refilled_test, - ) in refilled_test_wrapper.root.items(): - # Each refilled test has only 1 post for 1 fork and 1 transaction - refilled_fork, refilled_result = list(refilled_test.post.items())[0] - pattern = r"v=(\d+)-g=(\d+)-d=(\d+)" - match = re.search(pattern, refilled_test_name) - if match: - v, g, d = match.groups() - v, g, d = int(v), int(g), int(d) - - found = False - original_result = test_original.post[refilled_fork] - for res in original_result: - if ( - res.indexes.data == d - and res.indexes.gas == g - and res.indexes.value == v - ): - print(f"check: {refilled_fork}, d:{d}, g:{g}, v:{v}") - if res.hash != refilled_result[0].hash: - raise Exception( - "\nRefilled test post hash mismatch: \n" - f"test_name: {refilled_test_name}\n" - f"original_name: {original}\n" - f"refilled_hash: {refilled_result[0].hash}\n" - f"original_hash: {res.hash} " - f"f: {refilled_fork}, d: {d}, g: {g}, v: {v}" - ) - found = True - verified_vectors += 1 - break - - if not found: - raise Exception( - "\nRefilled test not found in original: \n" - f"test_name: {refilled_test_name}\n" - f"original_name: {original}\n" - ) - else: - raise Exception( - "Could not regex match d.g.v indexes from refilled test name!" - ) - - return verified_vectors diff --git a/packages/testing/src/execution_testing/cli/modify_static_test_gas_limits.py b/packages/testing/src/execution_testing/cli/modify_static_test_gas_limits.py deleted file mode 100644 index 70b0d1c1ec8..00000000000 --- a/packages/testing/src/execution_testing/cli/modify_static_test_gas_limits.py +++ /dev/null @@ -1,272 +0,0 @@ -""" -Command to scan and overwrite the static tests' gas limits to new optimized -value given in the input file. -""" - -import json -import re -from pathlib import Path -from typing import Dict, List, Set - -import click -import yaml - -from execution_testing.base_types import ( - EthereumTestRootModel, - HexNumber, - ZeroPaddedHexNumber, -) -from execution_testing.cli.pytest_commands.plugins.filler.static_filler import ( # noqa: E501 - NoIntResolver, -) -from execution_testing.specs import StateStaticTest - - -class GasLimitDict(EthereumTestRootModel): - """Formatted JSON file with new gas limits in each test.""" - - root: Dict[str, int | None] - - def unique_files(self) -> Set[Path]: - """Return a list of unique test files.""" - files = set() - for test in self.root: - filename, _ = test.split("::") - files.add(Path(filename)) - return files - - def get_tests_by_file_path(self, file: Path | str) -> Set[str]: - """Return a list of all tests that belong to a given file path.""" - tests = set() - for test in self.root: - current_file, _ = test.split("::") - if current_file == str(file): - tests.add(test) - return tests - - -class StaticTestFile(EthereumTestRootModel): - """A static test file.""" - - root: Dict[str, StateStaticTest] - - -def _check_fixtures( - *, - input_path: Path, - max_gas_limit: int | None, - dry_run: bool, - verbose: bool, -) -> None: - """ - Perform checks on fixtures in the specified directory. - """ - # Load the test dictionary from the input JSON file - test_dict = GasLimitDict.model_validate_json(input_path.read_text()) - - # Iterate through each unique test file that needs modification - for test_file in test_dict.unique_files(): - tests = test_dict.get_tests_by_file_path(test_file) - test_file_contents = test_file.read_text() - - # Parse the test file based on its format (YAML or JSON) - if test_file.suffix == ".yml" or test_file.suffix == ".yaml": - loaded_yaml = yaml.load( - test_file.read_text(), Loader=NoIntResolver - ) - try: - parsed_test_file = StaticTestFile.model_validate(loaded_yaml) - except Exception as e: - yaml_dump = json.dumps(loaded_yaml, indent=2) - raise Exception( - f"Unable to parse file {test_file}: {yaml_dump}" - ) from e - else: - parsed_test_file = StaticTestFile.model_validate_json( - test_file_contents - ) - - # Validate that the file contains exactly one test - assert len(parsed_test_file.root) == 1, ( - f"File {test_file} contains more than one test." - ) - _, parsed_test = parsed_test_file.root.popitem() - - # Skip files with multiple gas limit values - if len(parsed_test.transaction.gas_limit) != 1: - if dry_run or verbose: - print( - f"Test file {test_file} contains more than one test " - "(after parsing), skipping." - ) - continue - - # Get the current gas limit and check if modification is needed - current_gas_limit = int(parsed_test.transaction.gas_limit[0]) - if max_gas_limit is not None and current_gas_limit <= max_gas_limit: - # Nothing to do, finished - for test in tests: - test_dict.root.pop(test) - continue - - # Collect valid gas values for this test file - gas_values: List[int] = [] - for gas_value in [test_dict.root[test] for test in tests]: - if gas_value is None: - if dry_run or verbose: - print( - f"Test file {test_file} contains at least one test " - "that cannot be updated, skipping." - ) - continue - else: - gas_values.append(gas_value) - - # Calculate the new gas limit (rounded up to nearest 100,000) - new_gas_limit = max(gas_values) - modified_new_gas_limit = ((new_gas_limit // 100000) + 1) * 100000 - if verbose: - print( - f"Changing exact new gas limit ({new_gas_limit}) to " - f"rounded ({modified_new_gas_limit})" - ) - new_gas_limit = modified_new_gas_limit - - # Check if the new gas limit exceeds the maximum allowed - if max_gas_limit is not None and new_gas_limit > max_gas_limit: - if dry_run or verbose: - print( - f"New gas limit ({new_gas_limit}) " - f"exceeds max ({max_gas_limit})" - ) - continue - - if dry_run or verbose: - print( - f"Test file {test_file} requires modification " - f"({new_gas_limit})" - ) - - # Find the appropriate pattern to replace the current gas limit - potential_types = [int, HexNumber, ZeroPaddedHexNumber] - substitute_pattern = None - substitute_string = None - - attempted_patterns = [] - - for current_type in potential_types: - potential_substitute_pattern = ( - rf"\b{current_type(current_gas_limit)}\b" - ) - potential_substitute_string = f"{current_type(new_gas_limit)}" - if ( - re.search( - potential_substitute_pattern, - test_file_contents, - flags=re.RegexFlag.MULTILINE, - ) - is not None - ): - substitute_pattern = potential_substitute_pattern - substitute_string = potential_substitute_string - break - - attempted_patterns.append(potential_substitute_pattern) - - # Validate that a replacement pattern was found - assert substitute_pattern is not None, ( - f"Current gas limit ({attempted_patterns}) " - f"not found in {test_file}" - ) - assert substitute_string is not None - - # Perform the replacement in the test file content - new_test_file_contents = re.sub( - substitute_pattern, substitute_string, test_file_contents - ) - - assert test_file_contents != new_test_file_contents, ( - "Could not modify test file" - ) - - # Skip writing changes if this is a dry run - if dry_run: - continue - - # Write the modified content back to the test file - test_file.write_text(new_test_file_contents) - for test in tests: - test_dict.root.pop(test) - - if dry_run: - return - - # Write changes to the input file - input_path.write_text(test_dict.model_dump_json(indent=2)) - - -MAX_GAS_LIMIT = 16_777_216 - - -@click.command() -@click.option( - "--input", - "-i", - "input_str", - type=click.Path( - exists=True, file_okay=True, dir_okay=False, readable=True - ), - required=True, - help=( - "The input json file or directory containing json listing the new " - "gas limits for the static test files." - ), -) -@click.option( - "--max-gas-limit", - default=MAX_GAS_LIMIT, - expose_value=True, - help=( - "Gas limit that triggers a test modification, and also the maximum " - "value that a test should have after modification." - ), -) -@click.option( - "--dry-run", - "-d", - "dry_run", - is_flag=True, - default=False, - expose_value=True, - help="Don't modify any files, simply print operations to be performed.", -) -@click.option( - "--verbose", - "-v", - "verbose", - is_flag=True, - default=False, - expose_value=True, - help="Print extra information.", -) -def main( - input_str: str, max_gas_limit: int | None, dry_run: bool, verbose: bool -) -> None: - """ - Perform checks on fixtures in the specified directory. - """ - input_path = Path(input_str) - if not dry_run: - # Always dry-run first before actually modifying - _check_fixtures( - input_path=input_path, - max_gas_limit=max_gas_limit, - dry_run=True, - verbose=False, - ) - _check_fixtures( - input_path=input_path, - max_gas_limit=max_gas_limit, - dry_run=dry_run, - verbose=verbose, - ) diff --git a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/execute/execute.py b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/execute/execute.py index be8743ac0d5..31cd0e04ee8 100644 --- a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/execute/execute.py +++ b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/execute/execute.py @@ -531,8 +531,5 @@ def pytest_collection_modifyitems( ) ) - if "yul" in item.fixturenames: # type: ignore - item.add_marker(pytest.mark.yul_test) - for i in reversed(items_for_removal): items.pop(i) diff --git a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/filler.py b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/filler.py index fb7fac5f239..ec45fd18ffe 100644 --- a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/filler.py +++ b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/filler.py @@ -1385,20 +1385,8 @@ def fixture_collector( Return configured fixture collector instance used for all tests in one test module. """ - # Dynamically load the 'static_filler' and 'solc' plugins if needed - if request.config.getoption("fill_static_tests_enabled"): - request.config.pluginmanager.import_plugin( - "execution_testing.cli.pytest_commands.plugins.filler.static_filler" - ) - request.config.pluginmanager.import_plugin( - "execution_testing.cli.pytest_commands.plugins.solc.solc" - ) - fixture_collector = FixtureCollector( output_dir=fixture_output.directory, - fill_static_tests=request.config.getoption( - "fill_static_tests_enabled" - ), single_fixture_per_file=fixture_output.single_fixture_per_file, filler_path=filler_path, base_dump_dir=base_dump_dir, @@ -1735,9 +1723,6 @@ def pytest_generate_tests(metafunc: pytest.Metafunc) -> None: """ Pytest hook used to dynamically generate test cases for each fixture format a given test spec supports. - - NOTE: The static test filler does NOT use this hook. See - FillerFile.collect() in ./static_filler.py for more details. """ session: FillingSession = metafunc.config.filling_session # type: ignore[attr-defined] for test_type in BaseTest.spec_types.values(): @@ -1827,8 +1812,6 @@ def pytest_collection_modifyitems( if marker.name == "fill": for mark in marker.args: item.add_marker(mark) - if "yul" in item.fixturenames: # type: ignore - item.add_marker(pytest.mark.yul_test) # Update test ID for state tests that use a transition fork if fork in get_transition_forks(): diff --git a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/static_filler.py b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/static_filler.py deleted file mode 100644 index 08b2195410f..00000000000 --- a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/static_filler.py +++ /dev/null @@ -1,466 +0,0 @@ -""" -Static filler pytest plugin that reads test cases from static files and fills -them into test fixtures. -""" - -import inspect -import itertools -import json -import warnings -from pathlib import Path -from typing import Any, Callable, Dict, Generator, List, Self, Tuple, Type - -import pytest -import yaml -from _pytest.fixtures import TopRequest -from _pytest.mark import ParameterSet -from _pytest.python import Module - -from execution_testing.fixtures import BaseFixture, LabeledFixtureFormat -from execution_testing.forks import Fork, get_closest_fork -from execution_testing.specs import BaseStaticTest, BaseTest -from execution_testing.tools.tools_code.yul import Yul - -from ..forks.forks import ValidityMarker, fork_markers -from ..shared.helpers import labeled_format_parameter_set - - -def get_test_id_from_arg_names_and_values( - arg_names: List[str], arg_values: List[Any] | Tuple[Any, ...] -) -> str: - """Get the test id from argument names and values.""" - return "-".join( - [ - f"{arg_name}={arg_value}" - for arg_name, arg_value in zip(arg_names, arg_values, strict=True) - ] - ) - - -def get_argument_names_and_values_from_parametrize_mark( - mark: pytest.Mark, -) -> Tuple[List[str], List[ParameterSet]]: - """Get the argument names and values from a parametrize mark.""" - if mark.name != "parametrize": - raise Exception("Mark is not a parametrize mark") - kwargs_dict = dict(mark.kwargs) - ids: Callable | List[str] | None = ( - kwargs_dict.pop("ids") if "ids" in kwargs_dict else None - ) - marks: List[pytest.Mark] = ( - kwargs_dict.pop("marks") if "marks" in kwargs_dict else [] - ) - if kwargs_dict: - raise Exception("Mark has kwargs which is not supported") - args = mark.args - if not isinstance(args, tuple): - raise Exception("Args is not a tuple") - if len(args) != 2: - raise Exception("Args does not have 2 elements") - arg_names = args[0] if isinstance(args[0], list) else args[0].split(",") - arg_values = [] - for arg_index, arg_value in enumerate(args[1]): - if not isinstance(arg_value, ParameterSet): - original_arg_value = arg_value - if not isinstance(arg_value, tuple) and not isinstance( - arg_value, list - ): - arg_value = (arg_value,) - test_id: str = get_test_id_from_arg_names_and_values( - arg_names, arg_value - ) - if ids: - if callable(ids): - test_id = ids(original_arg_value) - else: - test_id = ids[arg_index] - arg_values.append(ParameterSet(arg_value, marks, id=test_id)) - else: - arg_values.append(arg_value) - return arg_names, arg_values - - -def get_all_combinations_from_parametrize_marks( - parametrize_marks: List[pytest.Mark], -) -> Tuple[List[str], List[ParameterSet]]: - """Get all combinations of arguments from multiple parametrize marks.""" - assert parametrize_marks, "No parametrize marks found" - list_of_values: List[List[ParameterSet]] = [] - all_argument_names = [] - for mark in parametrize_marks: - arg_names, arg_values = ( - get_argument_names_and_values_from_parametrize_mark(mark) - ) - list_of_values.append(arg_values) - all_argument_names.extend(arg_names) - all_value_combinations: List[ParameterSet] = [] - # use itertools to get all combinations - test_ids = set() - for combination in itertools.product(*list_of_values): - values: List[Any] = [] - marks: List[pytest.Mark | pytest.MarkDecorator] = [] - for param_set in combination: - values.extend(param_set.values) - marks.extend(param_set.marks) - test_id = "-".join([param.id or "" for param in combination]) # type: ignore[misc] - if test_id in test_ids: - current_int = 2 - while f"{test_id}-{current_int}" in test_ids: - current_int += 1 - test_id = f"{test_id}-{current_int}" - all_value_combinations.append( - ParameterSet( - values=values, - marks=marks, - id=test_id, - ) - ) - test_ids.add(test_id) - - return all_argument_names, all_value_combinations - - -def pytest_collect_file( - file_path: Path, parent: Module -) -> pytest.Collector | None: - """ - Pytest hook that collects test cases from static files and fills them into - test fixtures. - """ - fill_static_tests_enabled = parent.config.getoption( - "fill_static_tests_enabled" - ) - if not fill_static_tests_enabled: - return None - if not BaseStaticTest.formats: - # No formats registered, so no need to collect any files. - return None - if file_path.suffix in (".json", ".yml", ".yaml"): - init_file = file_path.parent / "__init__.py" - module = Module.from_parent( - parent=parent, - path=init_file, - nodeid=str(init_file), - ) - return FillerFile.from_parent(module, path=file_path) - return None - - -class NoIntResolver(yaml.SafeLoader): - """Class that tells yaml to not resolve int values.""" - - pass - - -# Remove the implicit resolver for integers -# Because yaml treat unquoted numbers 000001000 as oct numbers -# Treat all numbers as str instead -for ch in list(NoIntResolver.yaml_implicit_resolvers): - resolvers = NoIntResolver.yaml_implicit_resolvers[ch] - NoIntResolver.yaml_implicit_resolvers[ch] = [ - (tag, regexp) - for tag, regexp in resolvers - if tag != "tag:yaml.org,2002:int" - ] - - -class FillerFile(pytest.File): - """ - Filler file that reads test cases from static files and fills them into - test fixtures. - """ - - def collect(self: "FillerFile") -> Generator["FillerTestItem", None, None]: - """Collect test cases from a single static file.""" - if not self.path.stem.endswith("Filler"): - return - with open(self.path, "r") as file: - try: - loaded_file = ( - json.load(file) - if self.path.suffix == ".json" - else yaml.load(file, Loader=NoIntResolver) - ) - for key in loaded_file: - filler = BaseStaticTest.model_validate(loaded_file[key]) - - func = filler.fill_function() - - function_marks: List[pytest.Mark] = [] - if hasattr(func, "pytestmark"): - function_marks = func.pytestmark[:] - parametrize_marks: List[pytest.Mark] = [ - mark - for mark in function_marks - if mark.name == "parametrize" - ] - - func_parameters = inspect.signature(func).parameters - - fixture_formats: List[ - Type[BaseFixture] | LabeledFixtureFormat - ] = [] - spec_parameter_name = "" - for test_type in BaseTest.spec_types.values(): - if ( - test_type.pytest_parameter_name() - in func_parameters - ): - assert not spec_parameter_name, ( - "Multiple spec parameters found" - ) - spec_parameter_name = ( - test_type.pytest_parameter_name() - ) - session = self.config.filling_session # type: ignore[attr-defined] - supported = test_type.supported_fixture_formats - fixture_formats.extend( - fmt - for fmt in supported - if session.should_generate_format(fmt) - ) - - test_fork_set = ( - ValidityMarker.get_test_fork_set_from_markers( - iter(function_marks) - ) - ) - if not test_fork_set: - pytest.fail( - "The test function's " - f"'{key}' fork validity markers generate " - "an empty fork range. Please check the arguments " - "to its markers: @pytest.mark.valid_from and " - "@pytest.mark.valid_until." - ) - intersection_set = ( - test_fork_set & self.config.selected_fork_set # type: ignore - ) - - extra_function_marks: List[pytest.Mark] = [ - mark - for mark in function_marks - if mark.name != "parametrize" - and not ValidityMarker.is_validity_or_filter_marker( - mark.name - ) - ] - - for format_with_or_without_label in fixture_formats: - fixture_format_parameter_set = ( - labeled_format_parameter_set( - format_with_or_without_label - ) - ) - fixture_format = ( - format_with_or_without_label.format - if isinstance( - format_with_or_without_label, - LabeledFixtureFormat, - ) - else format_with_or_without_label - ) - for fork in sorted(intersection_set): - params: Dict[str, Any] = { - spec_parameter_name: fixture_format - } - fixturenames = [ - spec_parameter_name, - ] - marks: List[pytest.Mark | pytest.MarkDecorator] = [ - mark - for mark in fixture_format_parameter_set.marks - if mark.name != "parametrize" - ] - ps_id = fixture_format_parameter_set.id - test_id = f"fork_{fork.name()}-{ps_id}" - if "fork" in func_parameters: - params["fork"] = fork - if "pre" in func_parameters: - fixturenames.append("pre") - if "request" in func_parameters: - fixturenames.append("request") - - if parametrize_marks: - parameter_names, parameter_set_list = ( - get_all_combinations_from_parametrize_marks( - parametrize_marks - ) - ) - for parameter_set in parameter_set_list: - # Copy and extend the params with the - # parameter set - case_marks = ( - marks[:] - + [ - mark - for mark in parameter_set.marks - if mark.name != "parametrize" - ] - + extra_function_marks - + fork_markers(fork=fork) - ) - case_params = params.copy() | dict( - zip( - parameter_names, - parameter_set.values, - strict=True, - ) - ) - - yield FillerTestItem.from_parent( - self, - original_name=key, - func=func, - params=case_params, - fixturenames=fixturenames, - name=f"{key}[{test_id}-{parameter_set.id}]", - fork=fork, - fixture_format=fixture_format, - marks=case_marks, - ) - else: - case_marks = marks[:] + fork_markers(fork=fork) - yield FillerTestItem.from_parent( - self, - original_name=key, - func=func, - params=params, - fixturenames=fixturenames, - name=f"{key}[{test_id}]", - fork=fork, - fixture_format=fixture_format, - marks=case_marks, - ) - except Exception as e: - pytest.fail(f"Error loading file {self.path} as a test: {e}") - warnings.warn( - f"Error loading file {self.path} as a test: {e}", - stacklevel=1, - ) - return - - -class FillerTestItem(pytest.Item): - """Filler test item produced from a single test from a static file.""" - - originalname: str - func: Callable - params: Dict[str, Any] - fixturenames: List[str] - github_url: str = "" - fork: Fork - fixture_format: Type[BaseFixture] - - def __init__( - self, - *args: Any, - original_name: str, - func: Callable, - params: Dict[str, Any], - fixturenames: List[str], - fork: Fork, - fixture_format: Type[BaseFixture], - marks: List[pytest.Mark], - **kwargs: Any, - ) -> None: - """Initialize the filler test item.""" - super().__init__(*args, **kwargs) - self.originalname = original_name - self.func = func - self.params = params - self.fixturenames = fixturenames - self.fork = fork - self.fixture_format = fixture_format - for marker in marks: - if type(marker) is pytest.Mark: - self.own_markers.append(marker) - else: - self.add_marker(marker) - - def setup(self) -> None: - """Resolve and apply fixtures before test execution.""" - self._fixtureinfo = self.session._fixturemanager.getfixtureinfo( - self, - None, - None, - ) - request = TopRequest( - self, # type: ignore[arg-type] - _ispytest=True, - ) - for fixture_name in self.fixturenames: - if fixture_name == "request": - self.params[fixture_name] = request - else: - self.params[fixture_name] = request.getfixturevalue( - fixture_name - ) - - def runtest(self) -> None: - """Execute the test logic for this specific static test.""" - self.func(**self.params) - - def reportinfo(self) -> Tuple[Path, int, str]: - """Provide information for test reporting.""" - return self.fspath, 0, f"Static file test: {self.name}" - - -@pytest.fixture -def yul(fork: Fork, request: pytest.FixtureRequest) -> Type[Yul]: - """ - Fixture that allows contract code to be defined with Yul code. - - This fixture defines a class that wraps the - ::execution_testing.tools.Yul class so that upon instantiation within - the test case, it provides the test case's current fork parameter. - The fork is then available for use in solc's arguments for the Yul - code compilation. - - Test cases can override the default value by specifying a fixed version - with the @pytest.mark.compile_yul_with(FORK) marker. - """ - solc_target_fork: Fork | None - marker = request.node.get_closest_marker("compile_yul_with") - assert hasattr(request.config, "solc_version"), ( - "solc_version not set in pytest config." - ) - if marker: - if not marker.args[0]: - node_name = request.node.name - pytest.fail( - f"{node_name}: Expected one argument in " - "'compile_yul_with' marker." - ) - for fork in request.config.all_forks: # type: ignore - if fork.name() == marker.args[0]: - solc_target_fork = fork - break - else: - node_name = request.node.name - fork_arg = marker.args[0] - pytest.fail( - f"{node_name}: Fork {fork_arg} not found in forks list." - ) - else: - solc_target_fork = get_closest_fork(fork) - assert solc_target_fork is not None, ( - "No fork supports provided solc version." - ) - if ( - solc_target_fork != fork - and request.config.getoption("verbose") >= 1 - ): - solc_name = solc_target_fork.name() - fork_name = fork.name() - warnings.warn( - f"Compiling Yul for {solc_name}, not {fork_name}.", - stacklevel=2, - ) - - class YulWrapper(Yul): - def __new__(cls, *args: Any, **kwargs: Any) -> Self: - kwargs["fork"] = solc_target_fork - return super(YulWrapper, cls).__new__(cls, *args, **kwargs) - - return YulWrapper diff --git a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/shared/execute_fill.py b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/shared/execute_fill.py index d827d96927a..bd4fc537d8c 100644 --- a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/shared/execute_fill.py +++ b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/shared/execute_fill.py @@ -171,15 +171,6 @@ def pytest_configure(config: pytest.Config) -> None: if not hasattr(config, "op_mode"): config.op_mode = OpMode.CONSENSUS # type: ignore[attr-defined] - config.addinivalue_line( - "markers", - "yul_test: a test case that compiles Yul code.", - ) - config.addinivalue_line( - "markers", - "compile_yul_with(fork): Always compile Yul source using the " - "corresponding evm version.", - ) config.addinivalue_line( "markers", "fill: Markers to be added in fill mode only.", @@ -402,17 +393,3 @@ def is_exception_test(request: pytest.FixtureRequest) -> bool: test (invalid block, invalid transaction). """ return request.node.get_closest_marker("exception_test") is not None - - -def pytest_addoption(parser: pytest.Parser) -> None: - """Add command-line options to pytest.""" - static_filler_group = parser.getgroup( - "static", "Arguments defining static filler behavior" - ) - static_filler_group.addoption( - "--fill-static-tests", - action="store_true", - dest="fill_static_tests_enabled", - default=None, - help=("Enable reading and filling from static test files."), - ) diff --git a/packages/testing/src/execution_testing/cli/pytest_commands/pytest_ini_files/pytest-fill.ini b/packages/testing/src/execution_testing/cli/pytest_commands/pytest_ini_files/pytest-fill.ini index 179ac2082f0..e627de46c9a 100644 --- a/packages/testing/src/execution_testing/cli/pytest_commands/pytest_ini_files/pytest-fill.ini +++ b/packages/testing/src/execution_testing/cli/pytest_commands/pytest_ini_files/pytest-fill.ini @@ -12,7 +12,6 @@ addopts = -p execution_testing.cli.pytest_commands.plugins.concurrency -p execution_testing.cli.pytest_commands.plugins.filler.pre_alloc -p execution_testing.cli.pytest_commands.plugins.filler.ported_tests - -p execution_testing.cli.pytest_commands.plugins.filler.static_filler -p execution_testing.cli.pytest_commands.plugins.shared.benchmarking -p execution_testing.cli.pytest_commands.plugins.shared.transaction_fixtures -p execution_testing.cli.pytest_commands.plugins.help.help diff --git a/packages/testing/src/execution_testing/fixtures/collector.py b/packages/testing/src/execution_testing/fixtures/collector.py index 02a69858dce..47c00efe803 100644 --- a/packages/testing/src/execution_testing/fixtures/collector.py +++ b/packages/testing/src/execution_testing/fixtures/collector.py @@ -208,7 +208,6 @@ class FixtureCollector: """Collects all fixtures generated by the test cases.""" output_dir: Path - fill_static_tests: bool single_fixture_per_file: bool filler_path: Path base_dump_dir: Optional[Path] = None @@ -236,12 +235,6 @@ def get_fixture_basename(self, info: TestInfo) -> Path: self.filler_path ) - # Each legacy test filler has only 1 test per file if it's a !state - # test! So no need to create directory Add11/add11.json it can be plain - # add11.json - if self.fill_static_tests: - return module_relative_output_dir.parent / info.original_name - if self.single_fixture_per_file: return module_relative_output_dir / info.get_single_test_name( mode="test" diff --git a/packages/testing/src/execution_testing/fixtures/tests/test_collector.py b/packages/testing/src/execution_testing/fixtures/tests/test_collector.py index 4b41f1c6d4f..11ef7ba1eed 100644 --- a/packages/testing/src/execution_testing/fixtures/tests/test_collector.py +++ b/packages/testing/src/execution_testing/fixtures/tests/test_collector.py @@ -71,7 +71,6 @@ def test_single_fixture_matches_json_dumps( """Output for a single fixture must match json.dumps(..., indent=4).""" collector = FixtureCollector( output_dir=output_dir, - fill_static_tests=False, single_fixture_per_file=False, filler_path=filler_path, generate_index=False, @@ -101,7 +100,6 @@ def test_multiple_fixtures_match_json_dumps( """ collector = FixtureCollector( output_dir=output_dir, - fill_static_tests=False, single_fixture_per_file=False, filler_path=filler_path, generate_index=False, @@ -136,7 +134,6 @@ def test_multiple_workers_merge_correctly( """ collector1 = FixtureCollector( output_dir=output_dir, - fill_static_tests=False, single_fixture_per_file=False, filler_path=filler_path, generate_index=False, @@ -154,7 +151,6 @@ def test_multiple_workers_merge_correctly( # Worker B writes fixtures 3-5 (separate partial file) collector2 = FixtureCollector( output_dir=output_dir, - fill_static_tests=False, single_fixture_per_file=False, filler_path=filler_path, generate_index=False, @@ -189,7 +185,6 @@ def test_output_is_valid_json( """The written file must be parseable as valid JSON.""" collector = FixtureCollector( output_dir=output_dir, - fill_static_tests=False, single_fixture_per_file=False, filler_path=filler_path, generate_index=False, @@ -214,7 +209,6 @@ def test_fixtures_sorted_by_key( """Fixture entries in the output file must be sorted by key.""" collector = FixtureCollector( output_dir=output_dir, - fill_static_tests=False, single_fixture_per_file=False, filler_path=filler_path, generate_index=False, @@ -241,7 +235,6 @@ def test_partial_files_cleaned_up_after_merge( """Partial JSONL files are deleted after merging.""" collector = FixtureCollector( output_dir=output_dir, - fill_static_tests=False, single_fixture_per_file=False, filler_path=filler_path, generate_index=False, @@ -289,7 +282,6 @@ def test_single_fixture_matches_legacy( new_dir.mkdir() collector = FixtureCollector( output_dir=new_dir, - fill_static_tests=False, single_fixture_per_file=False, filler_path=filler_path, generate_index=False, @@ -328,7 +320,6 @@ def test_multiple_fixtures_match_legacy( new_dir.mkdir() collector = FixtureCollector( output_dir=new_dir, - fill_static_tests=False, single_fixture_per_file=False, filler_path=filler_path, generate_index=False, @@ -372,7 +363,6 @@ def test_multiple_workers_match_legacy( for worker_idx in range(3): collector = FixtureCollector( output_dir=new_dir, - fill_static_tests=False, single_fixture_per_file=False, filler_path=filler_path, generate_index=False, @@ -422,7 +412,6 @@ def test_special_characters_in_keys_match_legacy( new_dir.mkdir() collector = FixtureCollector( output_dir=new_dir, - fill_static_tests=False, single_fixture_per_file=False, filler_path=filler_path, generate_index=False, diff --git a/packages/testing/src/execution_testing/specs/__init__.py b/packages/testing/src/execution_testing/specs/__init__.py index e850fe4cb23..a651530a090 100644 --- a/packages/testing/src/execution_testing/specs/__init__.py +++ b/packages/testing/src/execution_testing/specs/__init__.py @@ -1,7 +1,6 @@ """Test spec definitions and utilities.""" from .base import BaseTest, TestSpec -from .base_static import BaseStaticTest from .benchmark import ( BenchmarkTest, BenchmarkTestFiller, @@ -17,7 +16,6 @@ Header, ) from .state import StateTest, StateTestFiller, StateTestSpec -from .static_state.state_static import StateStaticTest from .transaction import ( TransactionTest, TransactionTestFiller, @@ -25,7 +23,6 @@ ) __all__ = ( - "BaseStaticTest", "BaseTest", "BenchmarkTest", "BenchmarkTestFiller", @@ -41,7 +38,6 @@ "Block", "Header", "OpcodeTarget", - "StateStaticTest", "StateTest", "StateTestFiller", "StateTestSpec", diff --git a/packages/testing/src/execution_testing/specs/base_static.py b/packages/testing/src/execution_testing/specs/base_static.py deleted file mode 100644 index decfdcd22e2..00000000000 --- a/packages/testing/src/execution_testing/specs/base_static.py +++ /dev/null @@ -1,188 +0,0 @@ -""" -Base class to parse test cases written in static formats. -""" - -import re -from abc import abstractmethod -from typing import Any, Callable, ClassVar, Dict, List, Tuple, Type, Union - -from pydantic import ( - BaseModel, - TypeAdapter, - ValidatorFunctionWrapHandler, - model_validator, -) - -from execution_testing.base_types import Bytes - - -class BaseStaticTest(BaseModel): - """Represents a base class that reads cases from static files.""" - - formats: ClassVar[List[Type["BaseStaticTest"]]] = [] - formats_type_adapter: ClassVar[TypeAdapter] - - format_name: ClassVar[str] = "" - - @classmethod - def __pydantic_init_subclass__(cls, **kwargs: Any) -> None: - """ - Register all subclasses of BaseStaticTest with a static test format - name set as possible static test format. - """ - if cls.format_name: - # Register the new fixture format - BaseStaticTest.formats.append(cls) - if len(BaseStaticTest.formats) > 1: - BaseStaticTest.formats_type_adapter = TypeAdapter( - Union[tuple(BaseStaticTest.formats)], - ) - else: - BaseStaticTest.formats_type_adapter = TypeAdapter(cls) - - @model_validator(mode="wrap") - @classmethod - def _parse_into_subclass( - cls, v: Any, handler: ValidatorFunctionWrapHandler - ) -> "BaseStaticTest": - """Parse the static test into the correct subclass.""" - if cls is BaseStaticTest: - return BaseStaticTest.formats_type_adapter.validate_python(v) - return handler(v) - - @abstractmethod - def fill_function(self) -> Callable: - """ - Return the test function that can be used to fill the test. - - This method should be implemented by the subclasses. - - The function returned can be optionally decorated with the - `@pytest.mark.parametrize` decorator to parametrize the test with the - number of sub test cases. - - Example: - ``` - @pytest.mark.parametrize("n", [1]) - @pytest.mark.parametrize("m", [1, 2]) - @pytest.mark.valid_from("Homestead") - def test_state_filler( - state_test: StateTestFiller, - fork: Fork, - pre: Alloc, - n: int, - m: int - ): - \"\"\"Generate a test from a static state filler.\"\"\" - assert n == 1 - assert m in [1, 2] - env = Environment(**self.env.model_dump()) - sender = pre.fund_eoa() - tx = Transaction( - ty=0x0, - nonce=0, - to=Address(0x1000), - gas_limit=500000, - protected=False if fork in [Frontier, Homestead] else True, - data="", - sender=sender, - ) - state_test(env=env, pre=pre, post={}, tx=tx) - ``` - - To aid the generation of the test, the function can be defined and then - the decorator be applied after defining the function: - - ``` - def test_state_filler( - state_test: StateTestFiller, - fork: Fork, - pre: Alloc, - n: int, - m: int, - ): - - ... - - test_state_filler = pytest.mark.parametrize("n", - [1])(test_state_filler - ) - test_state_filler = pytest.mark.parametrize("m", - [1, 2])(test_state_filler - ) - - if self.valid_from: - test_state_filler = pytest.mark.valid_from( - self.valid_from - )(test_state_filler) - - if self.valid_until: - test_state_filler = pytest.mark.valid_until( - self.valid_until - )(test_state_filler) - - return test_state_filler - ``` - - The function can contain the following parameters on top of the spec - type parameter (`state_test` in the example above): - `fork`: The fork - for which the test is currently being filled. - `pre`: The pre-state of - the test. - - """ - raise NotImplementedError - - @staticmethod - def remove_comments(data: Dict) -> Dict: - """Remove comments from a dictionary.""" - result = {} - for k, v in data.items(): - if isinstance(k, str) and k.startswith("//"): - continue - if isinstance(v, dict): - v = BaseStaticTest.remove_comments(v) - elif isinstance(v, list): - v = [ - BaseStaticTest.remove_comments(i) - if isinstance(i, dict) - else i - for i in v - ] - result[k] = v - return result - - @model_validator(mode="before") - @classmethod - def remove_comments_from_model(cls, data: Any) -> Any: - """Remove comments from the static file loaded, if any.""" - if isinstance(data, dict): - return BaseStaticTest.remove_comments(data) - return data - - -def remove_comments(v: str) -> str: - """ - Split by line and then remove the comments (starting with #) at the end of - each line if any. - """ - return "\n".join([line.split("#")[0].strip() for line in v.splitlines()]) - - -label_matcher = re.compile(r"^:label\s+(\S+)\s*", re.MULTILINE) -raw_matcher = re.compile(r":raw\s+(.*)", re.MULTILINE) - - -def labeled_bytes_from_string(v: str) -> Tuple[str | None, Bytes]: - """Parse `:label` and `:raw` from a string.""" - v = remove_comments(v) - - label: str | None = None - if m := label_matcher.search(v): - label = m.group(1) - v = label_matcher.sub("", v) - - m = raw_matcher.match(v.replace("\n", " ")) - if not m: - raise Exception(f"Unable to parse container from string: {v}") - strip_string = m.group(1).strip() - return label, Bytes(strip_string) diff --git a/packages/testing/src/execution_testing/specs/post_state_resolution.py b/packages/testing/src/execution_testing/specs/post_state_resolution.py new file mode 100644 index 00000000000..31891196c81 --- /dev/null +++ b/packages/testing/src/execution_testing/specs/post_state_resolution.py @@ -0,0 +1,230 @@ +""" +Runtime post-state resolution for ported static tests. + +Provides resolve_expect_post / resolve_expect_post_fork, used by the tests +under tests/ported_static/ to resolve expected post-state and exceptions for +a given (d, g, v) and fork. Relocated out of the deleted specs/static_state/ +parser. +""" + +import re +from enum import StrEnum +from typing import Any, Iterator, Set + +from pydantic import BaseModel, field_validator, model_validator + +from execution_testing.base_types import EthereumTestRootModel +from execution_testing.exceptions import TransactionExceptionInstanceOrList +from execution_testing.forks import Fork, get_forks + + +class CMP(StrEnum): + """Comparison action.""" + + LE = "<=" + GE = ">=" + LT = "<" + GT = ">" + EQ = "=" + + +class ForkConstraint(BaseModel): + """Single fork with an operand.""" + + operand: CMP + fork: Fork + + @field_validator("fork", mode="before") + @classmethod + def parse_fork_synonyms(cls, value: Any) -> Any: + """Resolve fork synonyms.""" + if value == "EIP158": + value = "Byzantium" + return value + + @model_validator(mode="before") + @classmethod + def parse_from_string(cls, data: Any) -> Any: + """Parse a fork with operand from a string.""" + if isinstance(data, str): + for cmp in CMP: + if data.startswith(cmp): + fork = data.removeprefix(cmp) + return { + "operand": cmp, + "fork": fork, + } + return { + "operand": CMP.EQ, + "fork": data, + } + return data + + def match(self, fork: Fork) -> bool: + """Return whether the fork satisfies the operand evaluation.""" + match self.operand: + case CMP.LE: + return fork <= self.fork + case CMP.GE: + return fork >= self.fork + case CMP.LT: + return fork < self.fork + case CMP.GT: + return fork > self.fork + case CMP.EQ: + return fork == self.fork + case _: + raise ValueError(f"Invalid operand: {self.operand}") + + +class ForkSet(EthereumTestRootModel): + """Set of forks.""" + + root: Set[Fork] + + @model_validator(mode="before") + @classmethod + def parse_from_list_or_string(cls, value: Any) -> Set[Fork]: + """Parse fork_with_operand `>=Cancun` into {Cancun, Prague, ...}.""" + fork_set: Set[Fork] = set() + if not isinstance(value, list): + value = [value] + + for fork_with_operand in value: + matches = re.findall(r"(<=|<|>=|>|=)([^<>=]+)", fork_with_operand) + if matches: + all_fork_constraints = [ + ForkConstraint.model_validate(f"{op}{fork.strip()}") + for op, fork in matches + ] + else: + all_fork_constraints = [ + ForkConstraint.model_validate(fork_with_operand.strip()) + ] + + for fork in get_forks(): + for f in all_fork_constraints: + if not f.match(fork): + # If any constraint does not match, skip adding + break + else: + # All constraints match, add the fork to the set + fork_set.add(fork) + + return fork_set + + def __hash__(self) -> int: + """Return the hash of the fork set.""" + h = hash(None) + for fork in sorted([str(f) for f in self]): + h ^= hash(fork) + return h + + def __contains__(self, fork: Fork) -> bool: + """Check if the fork set contains a fork.""" + return fork in self.root + + def __iter__(self) -> Iterator[Fork]: # type: ignore[override] + """Iterate over the fork set.""" + return iter(self.root) + + def __len__(self) -> int: + """Return the length of the fork set.""" + return len(self.root) + + +def _match_index(idx: int | list, val: int) -> bool: + """Check if an index specification matches a value.""" + if isinstance(idx, int): + return idx == -1 or idx == val + if isinstance(idx, list): + return val in idx + return False + + +def resolve_expect_post( + expect_entries: list[dict], + d: int, + g: int, + v: int, + fork: Fork, +) -> tuple[dict, TransactionExceptionInstanceOrList | None]: + """ + Resolve expected post-state for given d, g, v and fork. + + Used by generated Python tests at runtime. The expect_entries are + materialized Python dicts with resolved addresses and Account objects. + """ + for entry in expect_entries: + indexes = entry["indexes"] + if not _match_index(indexes.get("data", -1), d): + continue + if not _match_index(indexes.get("gas", -1), g): + continue + if not _match_index(indexes.get("value", -1), v): + continue + + # Match fork against network constraints + network = entry["network"] + fork_set = ForkSet.model_validate(network) + if fork not in fork_set: + continue + + # Found matching entry + result = entry.get("result", {}) + + # Resolve exception + exception: TransactionExceptionInstanceOrList | None = None + expect_exc = entry.get("expect_exception") + if expect_exc: + for constraint_str, exc_value in expect_exc.items(): + exc_fork_set = ForkSet.model_validate( + constraint_str.split(",") + ) + if fork in exc_fork_set: + exception = exc_value + break + + return result, exception + + raise ValueError( + f"No matching expect entry for d={d}, g={g}, v={v}, fork={fork}" + ) + + +def resolve_expect_post_fork( + expect_entries: list[dict], + fork: Fork, +) -> tuple[dict, TransactionExceptionInstanceOrList | None]: + """ + Resolve expected post-state for a given fork only (no d/g/v matching). + + Used by single-case generated Python tests that have fork-dependent + post-state (multiple expect sections with different networks but only + one (d, g, v) combo). + """ + for entry in expect_entries: + # Match fork against network constraints + network = entry["network"] + fork_set = ForkSet.model_validate(network) + if fork not in fork_set: + continue + + # Found matching entry + result = entry.get("result", {}) + + # Resolve exception + exception: TransactionExceptionInstanceOrList | None = None + expect_exc = entry.get("expect_exception") + if expect_exc: + for constraint_str, exc_value in expect_exc.items(): + exc_fork_set = ForkSet.model_validate( + constraint_str.split(",") + ) + if fork in exc_fork_set: + exception = exc_value + break + + return result, exception + + raise ValueError(f"No matching expect entry for fork={fork}") diff --git a/packages/testing/src/execution_testing/specs/static_state/__init__.py b/packages/testing/src/execution_testing/specs/static_state/__init__.py deleted file mode 100644 index 69f8b6f2047..00000000000 --- a/packages/testing/src/execution_testing/specs/static_state/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Ethereum/tests structures.""" diff --git a/packages/testing/src/execution_testing/specs/static_state/account.py b/packages/testing/src/execution_testing/specs/static_state/account.py deleted file mode 100644 index 84e2bbbcb52..00000000000 --- a/packages/testing/src/execution_testing/specs/static_state/account.py +++ /dev/null @@ -1,250 +0,0 @@ -"""Account structure of ethereum/tests fillers.""" - -import hashlib -import json -from typing import Any, Dict, List, Mapping, Set, Tuple - -from pydantic import BaseModel, ConfigDict - -from execution_testing.base_types import ( - Account, - EthereumTestRootModel, - Hash, - HexNumber, -) -from execution_testing.test_types import ( - Alloc, - contract_address_from_hash, - eoa_from_hash, -) - -from .common import ( - AddressOrTagInFiller, - CodeInFiller, - ContractTag, - SenderTag, - Tag, - TagDependentData, - TagDict, - ValueInFiller, - ValueOrTagInFiller, -) - - -class StorageInPre(EthereumTestRootModel): - """Class that represents a storage in pre-state.""" - - root: Dict[ValueInFiller, ValueOrTagInFiller] - - def tag_dependencies(self) -> Mapping[str, Tag]: - """Get tag dependencies.""" - tag_dependencies: Dict[str, Tag] = {} - for k, v in self.root.items(): - if isinstance(k, Tag): - tag_dependencies[k.name] = k - if isinstance(v, Tag): - tag_dependencies[v.name] = v - return tag_dependencies - - def resolve(self, tags: TagDict) -> Dict[ValueInFiller, ValueInFiller]: - """Resolve the storage.""" - resolved_storage: Dict[ValueInFiller, ValueInFiller] = {} - for key, value in self.root.items(): - if isinstance(value, Tag): - resolved_storage[key] = HexNumber( - int.from_bytes(value.resolve(tags), "big") - ) - else: - resolved_storage[key] = value - return resolved_storage - - -class AccountInFiller(BaseModel, TagDependentData): - """Class that represents an account in filler.""" - - balance: ValueInFiller | None = None - code: CodeInFiller | None = None - nonce: ValueInFiller | None = None - storage: StorageInPre | None = None - - model_config = ConfigDict(arbitrary_types_allowed=True, extra="forbid") - - def tag_dependencies(self) -> Mapping[str, Tag]: - """Get tag dependencies.""" - tag_dependencies: Dict[str, Tag] = {} - if self.storage is not None: - tag_dependencies.update(self.storage.tag_dependencies()) - if self.code is not None and isinstance(self.code, CodeInFiller): - tag_dependencies.update(self.code.tag_dependencies()) - return tag_dependencies - - def resolve(self, tags: TagDict) -> Dict[str, Any]: - """Resolve the account.""" - account_properties: Dict[str, Any] = {} - if self.balance is not None: - account_properties["balance"] = self.balance - if self.code is not None: - if compiled_code := self.code.compiled(tags): - account_properties["code"] = compiled_code - if self.nonce is not None: - account_properties["nonce"] = self.nonce - if self.storage is not None: - if resolved_storage := self.storage.resolve(tags): - account_properties["storage"] = resolved_storage - return account_properties - - def hash(self) -> Hash: - """Return a hash of the account as it is in the filler.""" - dumped = self.model_dump(mode="json", exclude_none=True) - return Hash( - hashlib.sha256( - json.dumps( - dumped, - sort_keys=True, - separators=(",", ":"), - ).encode("utf-8") - ).digest() - ) - - -class PreInFiller(EthereumTestRootModel): - """Class that represents a pre-state in filler.""" - - root: Dict[AddressOrTagInFiller, AccountInFiller] - - def _build_dependency_graph( - self, - ) -> Tuple[Dict[str, Set[str]], Dict[str, AddressOrTagInFiller]]: - """Build a dependency graph for all tags.""" - dep_graph: Dict[str, Set[str]] = {} - tag_to_address: Dict[str, AddressOrTagInFiller] = {} - - # First pass: identify all tags and their dependencies - for address_or_tag, account in self.root.items(): - if isinstance(address_or_tag, Tag): - tag_name = address_or_tag.name - tag_to_address[tag_name] = address_or_tag - dep_graph[tag_name] = set() - - # Get dependencies from account properties - dependencies = account.tag_dependencies() - for dep_name in dependencies: - if dep_name != tag_name: # Ignore self-references - dep_graph[tag_name].add(dep_name) - - return dep_graph, tag_to_address - - def _topological_sort(self, dep_graph: Dict[str, Set[str]]) -> List[str]: - """Perform topological sort on dependency graph.""" - # Create a copy to modify - graph = {node: deps.copy() for node, deps in dep_graph.items()} - - # Find nodes with no dependencies - no_deps = [node for node, deps in graph.items() if not deps] - sorted_nodes = [] - - while no_deps: - # Process a node with no dependencies - node = no_deps.pop() - sorted_nodes.append(node) - - # Remove this node from other nodes' dependencies - for other_node, deps in graph.items(): - if node in deps: - deps.remove(node) - if not deps and other_node not in sorted_nodes: - no_deps.append(other_node) - - # Check for cycles - remaining = [node for node in graph if node not in sorted_nodes] - if remaining: - # Handle cycles by processing remaining nodes in any order - # This works because self-references are allowed - sorted_nodes.extend(remaining) - - return sorted_nodes - - def setup(self, pre: Alloc, all_dependencies: Dict[str, Tag]) -> TagDict: - """Resolve the pre-state with improved tag resolution.""" - resolved_accounts: TagDict = {} - - # Separate tagged and non-tagged accounts - tagged_accounts = {} - non_tagged_accounts = {} - - for address_or_tag, account in self.root.items(): - if isinstance(address_or_tag, Tag): - tagged_accounts[address_or_tag] = account - else: - non_tagged_accounts[address_or_tag] = account - - # Step 1: Process non-tagged accounts but don't compile code yet - # We'll compile code later after all tags are resolved - non_tagged_to_process = [] - for address, account in non_tagged_accounts.items(): - non_tagged_to_process.append((address, account)) - resolved_accounts[address.hex()] = address - - # Step 2: Build dependency graph for tagged accounts - dep_graph, tag_to_address = self._build_dependency_graph() - - # Step 3: Get topological order - resolution_order = self._topological_sort(dep_graph) - - # Step 4: Pre-deploy all contract tags and pre-fund EOAs to get - # addresses - account_salts: Dict[Hash, int] = {} - for tag_name in resolution_order: - if tag_name in tag_to_address: - tag = tag_to_address[tag_name] - account_hash = self.root[tag].hash() - salt = account_salts.get(account_hash, 0) - account_salts[account_hash] = salt + 1 - if isinstance(tag, ContractTag): - # Get a placeholder address - resolved_accounts[tag_name] = contract_address_from_hash( - account_hash, salt - ) - elif isinstance(tag, SenderTag): - # Create a placeholder EOA - eoa = eoa_from_hash(account_hash, salt) - # Store the EOA object for SenderKeyTag resolution - resolved_accounts[tag_name] = eoa - - # Step 5: Now resolve all properties with all addresses available - for tag_name in resolution_order: - if tag_name in tag_to_address: - tag = tag_to_address[tag_name] - assert isinstance(tag, (ContractTag, SenderTag)), ( - f"Tag {tag_name} is not a contract or sender" - ) - account = tagged_accounts[tag] - - # All addresses are now available, so resolve properties - account_properties = account.resolve(resolved_accounts) - - if isinstance(tag, (ContractTag, SenderTag)): - deployed_address = resolved_accounts[tag_name] - pre[deployed_address] = Account(**account_properties) - - # Step 6: Now process non-tagged accounts (including code compilation) - for address, account_in_filler in non_tagged_to_process: - pre[address] = Account( - **account_in_filler.resolve(resolved_accounts) - ) - - # Step 7: Handle any extra dependencies not in pre - for extra_dependency in all_dependencies: - if extra_dependency not in resolved_accounts: - if all_dependencies[extra_dependency].type != "eoa": - raise ValueError( - f"Contract dependency {extra_dependency} " - "not found in pre" - ) - - # Create new EOA - this will have a dynamically generated key - # and address - eoa = pre.fund_eoa(amount=0, label=extra_dependency) - resolved_accounts[extra_dependency] = eoa - - return resolved_accounts diff --git a/packages/testing/src/execution_testing/specs/static_state/common/__init__.py b/packages/testing/src/execution_testing/specs/static_state/common/__init__.py deleted file mode 100644 index 040841d7ee6..00000000000 --- a/packages/testing/src/execution_testing/specs/static_state/common/__init__.py +++ /dev/null @@ -1,39 +0,0 @@ -"""Ethereum/tests structures.""" - -from .common import ( - AccessListInFiller, - AddressInFiller, - AddressOrCreateTagInFiller, - AddressOrTagInFiller, - AddressTag, - CodeInFiller, - ContractTag, - HashOrTagInFiller, - SenderTag, - Tag, - TagDependentData, - TagDict, - ValueInFiller, - ValueOrCreateTagInFiller, - ValueOrTagInFiller, - parse_address_or_tag, -) - -__all__ = [ - "AccessListInFiller", - "AddressInFiller", - "AddressOrCreateTagInFiller", - "AddressOrTagInFiller", - "AddressTag", - "CodeInFiller", - "ContractTag", - "HashOrTagInFiller", - "Tag", - "TagDict", - "TagDependentData", - "SenderTag", - "ValueInFiller", - "ValueOrCreateTagInFiller", - "ValueOrTagInFiller", - "parse_address_or_tag", -] diff --git a/packages/testing/src/execution_testing/specs/static_state/common/common.py b/packages/testing/src/execution_testing/specs/static_state/common/common.py deleted file mode 100644 index fead4be2e6f..00000000000 --- a/packages/testing/src/execution_testing/specs/static_state/common/common.py +++ /dev/null @@ -1,418 +0,0 @@ -"""Common field types from ethereum/tests.""" - -import re -import subprocess -import tempfile -from typing import Any, Dict, List, Mapping, Tuple, Union - -from eth_abi import encode -from eth_utils import function_signature_to_4byte_selector -from pydantic import ( - BaseModel, - BeforeValidator, - Field, - PrivateAttr, - model_validator, -) -from pydantic_core import core_schema -from typing_extensions import Annotated - -from execution_testing.base_types import ( - AccessList, - Address, - CamelModel, - Hash, - HexNumber, -) - -from .compile_yul import compile_yul -from .tags import ( - ContractTag, - CreateTag, - SenderKeyTag, - SenderTag, - Tag, - TagDependentData, - TagDict, -) - - -def parse_hex_number(i: str | int) -> int: - """Check if the given string is a valid hex number.""" - if i == "" or i == "0x": - return 0 - if isinstance(i, int): - return i - if i.startswith("0x:bigint "): - i = i[10:] - return int(i, 16) - if i.startswith("0x") or any(char in "abcdef" for char in i.lower()): - return int(i, 16) - return int(i, 10) - - -def parse_args_from_string_into_array( - stream: str, pos: int, delim: str = " " -) -> Tuple[List[str], int]: - """Parse YUL options into array.""" - args = [] - arg = "" - # Loop until end of stream or until encountering newline or '{' - while pos < len(stream) and stream[pos] not in ("\n", "{"): - if stream[pos] == delim: - args.append(arg) - arg = "" - else: - arg += stream[pos] - pos += 1 - if arg: - args.append(arg) - return args, pos - - -class CodeInFiller(BaseModel, TagDependentData): - """Not compiled code source in test filler.""" - - label: str | None - source: str - _dependencies: Dict[str, Tag] = PrivateAttr(default_factory=dict) - - @model_validator(mode="before") - @classmethod - def validate_from_string(cls, code: Any) -> Any: - """Validate from string, separating label from code source.""" - if isinstance(code, str): - label_marker = ":label" - # Only look for label at the beginning of the string (possibly - # after whitespace) - stripped_code = code.lstrip() - - # Parse :label into code options - label = None - source = code - - # Check if the code starts with :label - if stripped_code.startswith(label_marker): - # Calculate the position in the original string - label_index = code.find(label_marker) - space_index = code.find( - " ", label_index + len(label_marker) + 1 - ) - if space_index == -1: - label = code[label_index + len(label_marker) + 1 :] - source = "" # No source after label - else: - label = code[ - label_index + len(label_marker) + 1 : space_index - ] - source = code[space_index + 1 :].strip() - - return {"label": label, "source": source} - return code - - def model_post_init(self, context: Any) -> None: - """Initialize StateStaticTest.""" - super().model_post_init(context) - tag_dependencies: Dict[str, Tag] = {} - for tag_type in {ContractTag, SenderTag}: - for m in tag_type.regex_pattern.finditer(self.source): - new_tag = tag_type.model_validate(m.group(0)) - tag_dependencies[new_tag.name] = new_tag - self._dependencies = tag_dependencies - - def compiled(self, tags: TagDict) -> bytes: - """Compile the code from source to bytes.""" - raw_code = self.source - if isinstance(raw_code, int): - # Users pass code as int (very bad) - hex_str = format(raw_code, "02x") - return bytes.fromhex(hex_str) - - if not isinstance(raw_code, str): - raise ValueError( - f"code is of type {type(raw_code)} but expected a string: " - f"{raw_code}" - ) - if len(raw_code) == 0: - return b"" - - compiled_code = "" - - def replace_tags(raw_code: str, keep_prefix: bool) -> str: - for tag in self._dependencies.values(): - if tag.name not in tags: - raise ValueError(f"Tag {tag} not found in tags") - substitution_address = f"{tag.resolve(tags)}" - if not keep_prefix and substitution_address.startswith("0x"): - substitution_address = substitution_address[2:] - # Use the original string if available, otherwise construct a - # pattern - if hasattr(tag, "original_string") and tag.original_string: - raw_code = raw_code.replace( - tag.original_string, substitution_address - ) - else: - raw_code = re.sub( - f"<\\w+:{tag.name}(:0x.+)?>", - substitution_address, - raw_code, - ) - return raw_code - - raw_marker = ":raw 0x" - raw_index = raw_code.find(raw_marker) - if raw_index == -1: - raw_index = replace_tags(raw_code, True).find(raw_marker) - abi_marker = ":abi" - abi_index = raw_code.find(abi_marker) - yul_marker = ":yul" - yul_index = raw_code.find(yul_marker) - - # Parse :raw or 0x - if raw_index != -1 or raw_code.lstrip().startswith("0x"): - raw_code = replace_tags(raw_code, False) - # Parse :raw - if raw_index != -1: - compiled_code = raw_code[raw_index + len(raw_marker) :] - # Parse plain code 0x - elif raw_code.lstrip().startswith("0x"): - compiled_code = raw_code[2:].lower() - else: - raw_code = replace_tags(raw_code, True) - # Parse :yul - if yul_index != -1: - option_start = yul_index + len(yul_marker) - options: list[str] = [] - native_yul_options: str = "" - - if raw_code[option_start:].lstrip().startswith("{"): - # No yul options, proceed to code parsing - source_start = option_start - else: - opt, source_start = parse_args_from_string_into_array( - raw_code, option_start + 1 - ) - for arg in opt: - if arg == "object" or arg == '"C"': - native_yul_options += arg + " " - else: - options.append(arg) - - with tempfile.NamedTemporaryFile( - mode="w+", delete=False, suffix=".yul" - ) as tmp: - tmp.write(native_yul_options + raw_code[source_start:]) - tmp_path = tmp.name - compiled_code = compile_yul( - source_file=tmp_path, - evm_version=options[0] if len(options) >= 1 else None, - optimize=options[1] if len(options) >= 2 else None, - )[2:] - - # Parse :abi - elif abi_index != -1: - abi_encoding = raw_code[abi_index + len(abi_marker) + 1 :] - tokens = abi_encoding.strip().split() - abi = tokens[0] - function_signature = function_signature_to_4byte_selector(abi) - parameter_str = re.sub(r"^\w+", "", abi).strip() - - parameter_types = parameter_str.strip("()").split(",") - if len(tokens) > 1: - function_parameters = encode( - [parameter_str], - [ - [ - # treat big ints as 256bits - int(t.lower(), 0) & ((1 << 256) - 1) - if parameter_types[t_index] == "uint" - # treat positive values as True - else int(t.lower(), 0) > 0 - if parameter_types[t_index] == "bool" - else False - and ValueError("unhandled parameter_types") - for t_index, t in enumerate(tokens[1:]) - ] - ], - ) - return function_signature + function_parameters - return function_signature - - # Parse lllc code - elif ( - raw_code.lstrip().startswith("{") - or raw_code.lstrip().startswith("(asm") - or raw_code.lstrip().startswith(":raw 0x") - ): - with tempfile.NamedTemporaryFile( - mode="w+", delete=False - ) as tmp: - tmp.write(raw_code) - tmp_path = tmp.name - - # - using lllc - result = subprocess.run( - ["lllc", tmp_path], capture_output=True, text=True - ) - - # - using docker: If the running machine does not have lllc - # installed, we can use docker to run lllc, but we need to - # start a container first, and the process is generally slower. - # - # from .docker import get_lllc_container_id - # result = subprocess.run( ["docker", - # "exec", - # get_lllc_container_id(), - # "lllc", - # tmp_path[5:]], - # capture_output=True, - # text=True - # ) - compiled_code = "".join(result.stdout.splitlines()) - - else: - raise Exception(f'Error parsing code: "{raw_code}"') - - try: - return bytes.fromhex(compiled_code) - except ValueError as e: - raise Exception(f'Error parsing compile code: "{raw_code}"') from e - - def tag_dependencies(self) -> Mapping[str, Tag]: - """Get tag dependencies.""" - return self._dependencies - - -class AddressTag: - """ - Represents an address tag like: - - . - - . - - . - """ - - def __init__(self, tag_type: str, tag_name: str, original_string: str): - """Initialize address tag.""" - self.tag_type = tag_type # "eoa", "contract", or "coinbase" - # e.g., "sender", "target", or address for 2-part tags - self.tag_name = tag_name - self.original_string = original_string - - def __str__(self) -> str: - """Return original tag string.""" - return self.original_string - - def __repr__(self) -> str: - """Return debug representation.""" - return f"AddressTag(type={self.tag_type}, name={self.tag_name})" - - def __eq__(self, other: object) -> bool: - """Check equality based on original string.""" - if isinstance(other, AddressTag): - return self.original_string == other.original_string - return False - - def __hash__(self) -> int: - """Hash based on original string for use as dict key.""" - return hash(self.original_string) - - @classmethod - def __get_pydantic_core_schema__( - cls, source_type: Any, handler: Any - ) -> core_schema.CoreSchema: - """Pydantic core schema for AddressTag.""" - return core_schema.str_schema() - - -def parse_address_or_tag(value: Any) -> Union[Address, AddressTag]: - """Parse either a regular address or an address tag.""" - if not isinstance(value, str): - # Non-string values should be converted to Address normally - return Address(value, left_padding=True) - - # Check if it matches tag pattern: - # - , , - # - , - - # Try 3-part pattern first (type:name:address) - tag_pattern_3_part = r"^<(eoa|contract|coinbase):([^:]+):(.+)>$" - match = re.match(tag_pattern_3_part, value.strip()) - - if match: - tag_type = match.group(1) - tag_name = match.group(2) - address_part = match.group(3) - # For 3-part tags, the tag_name is the middle part - return AddressTag(tag_type, tag_name, value.strip()) - - # Try 2-part pattern (type:address) - tag_pattern_2_part = r"^<(eoa|contract|coinbase):(.+)>$" - match = re.match(tag_pattern_2_part, value.strip()) - - if match: - tag_type = match.group(1) - address_part = match.group(2) - # For 2-part tags, use the address as the tag_name - return AddressTag(tag_type, address_part, value.strip()) - - # Regular address string - return Address(value, left_padding=True) - - -def parse_address_or_tag_for_access_list(value: Any) -> Union[Address, str]: - """ - Parse either a regular address or an address tag, keeping tags as strings - for later resolution. - """ - if not isinstance(value, str): - # Non-string values should be converted to Address normally - return Address(value, left_padding=True) - - # Check if it matches a tag pattern - tag_pattern = r"^<(eoa|contract|coinbase):.+>$" - if re.match(tag_pattern, value.strip()): - # Return the tag string as-is for later resolution - return value.strip() - else: - # Regular address string - return Address(value, left_padding=True) - - -AddressInFiller = Annotated[ - Address, BeforeValidator(lambda a: Address(a, left_padding=True)) -] -AddressOrTagInFiller = ContractTag | SenderTag | Address -AddressOrCreateTagInFiller = ContractTag | SenderTag | CreateTag | Address -ValueInFiller = Annotated[HexNumber, BeforeValidator(parse_hex_number)] -ValueOrTagInFiller = ContractTag | SenderTag | ValueInFiller -ValueOrCreateTagInFiller = ContractTag | SenderTag | CreateTag | ValueInFiller -HashOrTagInFiller = SenderKeyTag | Hash - - -class AccessListInFiller(CamelModel, TagDependentData): - """ - Access List for transactions in fillers that can contain address tags. - """ - - address: AddressOrTagInFiller - storage_keys: List[Hash] = Field(default_factory=list) - - def tag_dependencies(self) -> Mapping[str, Tag]: - """Get tag dependencies.""" - if isinstance(self.address, Tag): - return { - self.address.name: self.address, - } - return {} - - def resolve(self, tags: TagDict) -> AccessList: - """Resolve the access list.""" - kwargs: Dict[str, Address | List[Hash]] = {} - if isinstance(self.address, Tag): - kwargs["address"] = self.address.resolve(tags) - else: - kwargs["address"] = self.address - kwargs["storageKeys"] = [ - Hash(key, left_padding=True) for key in self.storage_keys - ] - return AccessList(**kwargs) diff --git a/packages/testing/src/execution_testing/specs/static_state/common/compile_yul.py b/packages/testing/src/execution_testing/specs/static_state/common/compile_yul.py deleted file mode 100644 index 4fc4bd84ef6..00000000000 --- a/packages/testing/src/execution_testing/specs/static_state/common/compile_yul.py +++ /dev/null @@ -1,102 +0,0 @@ -"""compile yul with arguments.""" - -import subprocess -from pathlib import Path -from typing import LiteralString - - -def safe_solc_command( - source_file: Path | str, - evm_version: str | None = None, - optimize: str | None = None, -) -> list[str]: - """Safely construct solc command with validated inputs.""" - # Validate source file path - source_path = Path(source_file) - if not source_path.exists(): - raise FileNotFoundError(f"Source file not found: {source_file}") - - cmd: list[str] = ["solc"] - - # Add EVM version if provided (validate against known versions) - if evm_version: - valid_versions = { - "homestead", - "tangerineWhistle", - "spuriousDragon", - "byzantium", - "constantinople", - "petersburg", - "istanbul", - "berlin", - "london", - "paris", - "shanghai", - "cancun", - } - if evm_version not in valid_versions: - raise ValueError(f"Invalid EVM version: {evm_version}") - cmd.extend(["--evm-version", evm_version]) - - # Add compilation flags (using literal strings) - strict_assembly: LiteralString = "--strict-assembly" - cmd.append(strict_assembly) - - if optimize is None: - optimize_flag: LiteralString = "--optimize" - yul_opts: LiteralString = "--yul-optimizations=:" - cmd.extend([optimize_flag, yul_opts]) - - cmd.append(str(source_path)) - return cmd - - -def compile_yul( - source_file: str, - evm_version: str | None = None, - optimize: str | None = None, -) -> str: - """ - Compiles a Yul source file using solc and returns the binary - representation. - - Arguments: - source_file (str): Path to the Yul source file. - evm_version(str, optional): The EVM version to use (e.g., 'istanbul'). - Defaults to None. - optimize (any, optional): If provided (non-None), optimization flags - are not added. If None, additional - optimization flags will be included. - - Returns: str: The binary representation prefixed with "0x". - - Raises: Exception: If the solc output contains an error message. - - """ - cmd = safe_solc_command(source_file, evm_version, optimize) - - # Execute the solc command and capture both stdout and stderr - result = subprocess.run( - cmd, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - text=True, - check=False, - ) - out = result.stdout - - # Check for errors in the output - if "Error" in out: - raise Exception(f"Yul compilation error:\n{out}") - - # Search for the "Binary representation:" line and get the following line - # as the binary - lines = out.splitlines() - binary_line = "" - for i, line in enumerate(lines): - if "Binary representation:" in line: - if i + 1 < len(lines): - binary_line = lines[i + 1].strip() - break - - return f"0x{binary_line}" diff --git a/packages/testing/src/execution_testing/specs/static_state/common/tags.py b/packages/testing/src/execution_testing/specs/static_state/common/tags.py deleted file mode 100644 index e63464635d6..00000000000 --- a/packages/testing/src/execution_testing/specs/static_state/common/tags.py +++ /dev/null @@ -1,227 +0,0 @@ -"""Classes to manage tags in static state tests.""" - -import re -from abc import ABC, abstractmethod -from typing import Any, ClassVar, Dict, Generic, Mapping, TypeVar - -from pydantic import BaseModel, model_validator - -from execution_testing.base_types import Address, Bytes, Hash, HexNumber -from execution_testing.test_types import ( - EOA, - compute_create2_address, - compute_create_address, -) - -TagDict = Dict[str, Address | EOA] - -T = TypeVar("T", bound=Address | Hash) - - -class Tag(BaseModel, Generic[T]): - """Tag.""" - - name: str - type: ClassVar[str] = "" - regex_pattern: ClassVar[re.Pattern] = re.compile(r"<\w+:(\w+)(:[^>]+)?") - # Store the original tag string for replacement - original_string: str | None = None - - def __hash__(self) -> int: - """Hash based on original string for use as dict key.""" - return hash(f"{self.__class__.__name__}:{self.name}") - - @model_validator(mode="before") - @classmethod - def validate_from_string(cls, data: Any) -> Any: - """Validate the generic tag from string: .""" - if isinstance(data, str): - if m := cls.regex_pattern.match(data): - name = m.group(1) - return {"name": name, "original_string": data} - return data - - def resolve(self, tags: TagDict) -> T: - """Resolve the tag.""" - raise NotImplementedError("Subclasses must implement this method") - - -class TagDependentData(ABC): - """Data for resolving tags.""" - - @abstractmethod - def tag_dependencies(self) -> Mapping[str, Tag]: - """Get tag dependencies.""" - pass - - -class AddressTag(Tag[Address]): - """Address tag.""" - - def resolve(self, tags: TagDict) -> Address: - """Resolve the tag.""" - assert self.name in tags, f"Tag {self.name} not found in tags" - return Address(tags[self.name]) - - -class ContractTag(AddressTag): - """Contract tag.""" - - type: ClassVar[str] = "contract" - regex_pattern: ClassVar[re.Pattern] = re.compile( - r"]+)(?::(0x[a-fA-F0-9]+))?>" - ) - # Optional hard-coded address for debugging - debug_address: Address | None = None - - @model_validator(mode="before") - @classmethod - def validate_from_string(cls, data: Any) -> Any: - """ - Validate the contract tag from string: - - or - . - """ - if isinstance(data, str): - if m := cls.regex_pattern.match(data): - name_or_addr = m.group(1) - debug_addr = ( - m.group(2) if m.lastindex and m.lastindex >= 2 else None - ) - - # Check if it's a 2-part format with an address - if name_or_addr.startswith("0x") and len(name_or_addr) == 42: - # For 2-part format, use the full address as the name This - # ensures all references to the same address get the same - # tag name - return { - "name": name_or_addr, - "debug_address": Address(name_or_addr), - "original_string": data, - } - else: - # Normal 3-part format - use the name as-is - result = {"name": name_or_addr, "original_string": data} - if debug_addr: - result["debug_address"] = Address(debug_addr) - return result - return data - - -class CreateTag(AddressTag): - """Contract derived from a another contract via CREATE.""" - - create_type: str - nonce: HexNumber | None = None - salt: HexNumber | None = None - initcode: Bytes | None = None - - type: ClassVar[str] = "contract" - regex_pattern: ClassVar[re.Pattern] = re.compile( - r"<(create|create2):(\w+):(\w+):?(\w+)?>" - ) - - @model_validator(mode="before") - @classmethod - def validate_from_string(cls, data: Any) -> Any: - """Validate the create tag from string: .""" - if isinstance(data, str): - if m := cls.regex_pattern.match(data): - create_type = m.group(1) - name = m.group(2) - kwargs = { - "create_type": create_type, - "name": name, - "original_string": data, - } - if create_type == "create": - kwargs["nonce"] = m.group(3) - elif create_type == "create2": - kwargs["salt"] = m.group(3) - kwargs["initcode"] = m.group(4) - return kwargs - return data - - def resolve(self, tags: TagDict) -> Address: - """Resolve the tag.""" - assert self.name in tags, f"Tag {self.name} not found in tags" - if self.create_type == "create": - assert self.nonce is not None, "Nonce is required for create" - return compute_create_address( - address=tags[self.name], nonce=self.nonce - ) - elif self.create_type == "create2": - assert self.salt is not None, "Salt is required for create2" - assert self.initcode is not None, ( - "Init code is required for create2" - ) - return compute_create2_address( - address=tags[self.name], salt=self.salt, initcode=self.initcode - ) - else: - raise ValueError(f"Invalid create type: {self.create_type}") - - -class SenderTag(AddressTag): - """Sender tag.""" - - type: ClassVar[str] = "eoa" - regex_pattern: ClassVar[re.Pattern] = re.compile( - r"" - ) - # Optional hard-coded address for debugging - debug_address: Address | None = None - - @model_validator(mode="before") - @classmethod - def validate_from_string(cls, data: Any) -> Any: - """Validate the sender tag from string: .""" - if isinstance(data, str): - if m := cls.regex_pattern.match(data): - name = m.group(1) - debug_addr = ( - m.group(2) if m.lastindex and m.lastindex >= 2 else None - ) - - result = {"name": name, "original_string": data} - if debug_addr: - result["debug_address"] = Address(debug_addr) - return result - return data - - -class SenderKeyTag(Tag[EOA]): - """Sender eoa tag.""" - - type: ClassVar[str] = "eoa" - regex_pattern: ClassVar[re.Pattern] = re.compile( - r"" - ) - debug_key: str | None = None # Optional hard-coded key for debugging - - @model_validator(mode="before") - @classmethod - def validate_from_string(cls, data: Any) -> Any: - """Validate the sender key tag from string: .""" - if isinstance(data, str): - if m := cls.regex_pattern.match(data): - name = m.group(1) - debug_key = ( - m.group(2) if m.lastindex and m.lastindex >= 2 else None - ) - - result = {"name": name, "original_string": data} - if debug_key: - result["debug_key"] = debug_key - return result - return data - - def resolve(self, tags: TagDict) -> EOA: - """Resolve the tag.""" - assert self.name in tags, f"Tag {self.name} not found in tags" - result = tags[self.name] - assert isinstance(result, EOA), ( - f"Expected EOA but got {type(result)} for tag {self.name}" - ) - return result diff --git a/packages/testing/src/execution_testing/specs/static_state/environment.py b/packages/testing/src/execution_testing/specs/static_state/environment.py deleted file mode 100644 index 89b42cbe45b..00000000000 --- a/packages/testing/src/execution_testing/specs/static_state/environment.py +++ /dev/null @@ -1,78 +0,0 @@ -"""Environment structure of ethereum/tests fillers.""" - -from typing import Any, Dict - -from pydantic import BaseModel, ConfigDict, Field, model_validator - -from execution_testing.base_types import Address -from execution_testing.test_types import Environment - -from .common import AddressOrTagInFiller, Tag, TagDict, ValueInFiller - - -class EnvironmentInStateTestFiller(BaseModel): - """Class that represents an environment filler.""" - - current_coinbase: AddressOrTagInFiller = Field( - ..., alias="currentCoinbase" - ) - current_gas_limit: ValueInFiller = Field(..., alias="currentGasLimit") - current_number: ValueInFiller = Field(..., alias="currentNumber") - current_timestamp: ValueInFiller = Field(..., alias="currentTimestamp") - - current_difficulty: ValueInFiller | None = Field( - ValueInFiller("0x020000"), alias="currentDifficulty" - ) - current_random: ValueInFiller | None = Field( - ValueInFiller("0x020000"), alias="currentRandom" - ) - current_base_fee: ValueInFiller | None = Field( - ValueInFiller("0x0a"), alias="currentBaseFee" - ) - - current_excess_blob_gas: ValueInFiller | None = Field( - None, alias="currentExcessBlobGas" - ) - current_slot_number: ValueInFiller | None = Field(None, alias="slotNumber") - - model_config = ConfigDict(extra="forbid") - - @model_validator(mode="after") - def check_fields(self) -> "EnvironmentInStateTestFiller": - """Validate all fields are set.""" - if self.current_difficulty is None: - if self.current_random is None: - raise ValueError( - "If `currentDifficulty` is not set, " - "`currentRandom` must be set!" - ) - return self - - def get_environment(self, tags: TagDict) -> Environment: - """Get the environment.""" - kwargs: Dict[str, Any] = {} - if isinstance(self.current_coinbase, Tag): - assert self.current_coinbase.name in tags, ( - f"Tag {self.current_coinbase.name} to resolve coinbase " - "not found in tags" - ) - kwargs["fee_recipient"] = self.current_coinbase.resolve(tags) - else: - kwargs["fee_recipient"] = Address(self.current_coinbase) - if self.current_difficulty is not None: - kwargs["difficulty"] = self.current_difficulty - if self.current_random is not None: - kwargs["prev_randao"] = self.current_random - if self.current_gas_limit is not None: - kwargs["gas_limit"] = self.current_gas_limit - if self.current_number is not None: - kwargs["number"] = self.current_number - if self.current_timestamp is not None: - kwargs["timestamp"] = self.current_timestamp - if self.current_base_fee is not None: - kwargs["base_fee_per_gas"] = self.current_base_fee - if self.current_excess_blob_gas is not None: - kwargs["excess_blob_gas"] = self.current_excess_blob_gas - if self.current_slot_number is not None: - kwargs["slot_number"] = self.current_slot_number - return Environment(**kwargs) diff --git a/packages/testing/src/execution_testing/specs/static_state/expect_section.py b/packages/testing/src/execution_testing/specs/static_state/expect_section.py deleted file mode 100644 index 0425b65fb0a..00000000000 --- a/packages/testing/src/execution_testing/specs/static_state/expect_section.py +++ /dev/null @@ -1,490 +0,0 @@ -"""Expect section structure of ethereum/tests fillers.""" - -import re -from enum import StrEnum -from typing import Annotated, Any, Dict, Iterator, List, Mapping, Set, Union - -from pydantic import ( - BaseModel, - BeforeValidator, - Field, - ValidatorFunctionWrapHandler, - field_validator, - model_validator, -) - -from execution_testing.base_types import ( - Account, - Address, - CamelModel, - EthereumTestRootModel, - HexNumber, - Storage, -) -from execution_testing.exceptions import ( - TransactionExceptionInstanceOrList, -) -from execution_testing.forks import Fork, get_forks -from execution_testing.test_types import Alloc - -from .common import ( - AddressOrCreateTagInFiller, - CodeInFiller, - Tag, - TagDependentData, - TagDict, - ValueInFiller, - ValueOrCreateTagInFiller, -) - - -class Indexes(BaseModel): - """Class that represents an index filler.""" - - data: int | List[Union[int, str]] | List[int] | str = Field(-1) - gas: int | List[Union[int, str]] | List[int] | str = Field(-1) - value: int | List[Union[int, str]] | List[int] | str = Field(-1) - - -def validate_any_string_as_none(v: Any) -> Any: - """Validate "ANY" as None.""" - if type(v) is str and v == "ANY": - return None - return v - - -class StorageInExpectSection(EthereumTestRootModel, TagDependentData): - """Class that represents a storage in expect section filler.""" - - root: Dict[ - ValueOrCreateTagInFiller, - Annotated[ - ValueOrCreateTagInFiller | None, - BeforeValidator(validate_any_string_as_none), - ], - ] - - def tag_dependencies(self) -> Mapping[str, Tag]: - """Get storage dependencies.""" - tag_dependencies = {} - for key, value in self.root.items(): - if isinstance(key, Tag): - tag_dependencies[key.name] = key - if isinstance(value, Tag): - tag_dependencies[value.name] = value - return tag_dependencies - - def resolve(self, tags: TagDict) -> Storage: - """Resolve the account with the given tags.""" - storage = Storage() - for key, value in self.root.items(): - resolved_key: HexNumber | Address - if isinstance(key, Tag): - resolved_key = key.resolve(tags) - else: - resolved_key = key - if value is None: - storage.set_expect_any(resolved_key) - elif isinstance(value, Tag): - storage[resolved_key] = value.resolve(tags) - else: - storage[resolved_key] = value - return storage - - def __contains__(self, key: Address) -> bool: - """Check if the storage contains a key.""" - return key in self.root - - def __iter__(self) -> Iterator[ValueOrCreateTagInFiller]: # type: ignore[override] - """Iterate over the storage.""" - return iter(self.root) - - -class AccountInExpectSection(BaseModel, TagDependentData): - """Class that represents an account in expect section filler.""" - - balance: ValueInFiller | None = None - code: CodeInFiller | None = None - nonce: ValueInFiller | None = None - storage: StorageInExpectSection | None = None - - @model_validator(mode="wrap") # type: ignore[misc] - @classmethod - def validate_should_not_exist( - cls, v: Any, handler: ValidatorFunctionWrapHandler - ) -> "AccountInExpectSection | None": - """ - Validate the "shouldnotexist" field, which makes this validator return - `None`. - """ - if isinstance(v, dict): - if "shouldnotexist" in v: - return None - return handler(v) - - def tag_dependencies(self) -> Mapping[str, Tag]: - """Get tag dependencies.""" - tag_dependencies: Dict[str, Tag] = {} - if self.code is not None: - tag_dependencies.update(self.code.tag_dependencies()) - if self.storage is not None: - tag_dependencies.update(self.storage.tag_dependencies()) - return tag_dependencies - - def resolve(self, tags: TagDict) -> Account: - """Resolve the account with the given tags.""" - account_kwargs: Dict[str, Any] = {} - if self.storage is not None: - account_kwargs["storage"] = self.storage.resolve(tags) - if self.code is not None: - account_kwargs["code"] = self.code.compiled(tags) - if self.balance is not None: - account_kwargs["balance"] = self.balance - if self.nonce is not None: - account_kwargs["nonce"] = self.nonce - return Account(**account_kwargs) - - -class CMP(StrEnum): - """Comparison action.""" - - LE = "<=" - GE = ">=" - LT = "<" - GT = ">" - EQ = "=" - - -class ForkConstraint(BaseModel): - """Single fork with an operand.""" - - operand: CMP - fork: Fork - - @field_validator("fork", mode="before") - @classmethod - def parse_fork_synonyms(cls, value: Any) -> Any: - """Resolve fork synonyms.""" - if value == "EIP158": - value = "Byzantium" - return value - - @model_validator(mode="before") - @classmethod - def parse_from_string(cls, data: Any) -> Any: - """Parse a fork with operand from a string.""" - if isinstance(data, str): - for cmp in CMP: - if data.startswith(cmp): - fork = data.removeprefix(cmp) - return { - "operand": cmp, - "fork": fork, - } - return { - "operand": CMP.EQ, - "fork": data, - } - return data - - def match(self, fork: Fork) -> bool: - """Return whether the fork satisfies the operand evaluation.""" - match self.operand: - case CMP.LE: - return fork <= self.fork - case CMP.GE: - return fork >= self.fork - case CMP.LT: - return fork < self.fork - case CMP.GT: - return fork > self.fork - case CMP.EQ: - return fork == self.fork - case _: - raise ValueError(f"Invalid operand: {self.operand}") - - -class ForkSet(EthereumTestRootModel): - """Set of forks.""" - - root: Set[Fork] - - @model_validator(mode="before") - @classmethod - def parse_from_list_or_string(cls, value: Any) -> Set[Fork]: - """Parse fork_with_operand `>=Cancun` into {Cancun, Prague, ...}.""" - fork_set: Set[Fork] = set() - if not isinstance(value, list): - value = [value] - - for fork_with_operand in value: - matches = re.findall(r"(<=|<|>=|>|=)([^<>=]+)", fork_with_operand) - if matches: - all_fork_constraints = [ - ForkConstraint.model_validate(f"{op}{fork.strip()}") - for op, fork in matches - ] - else: - all_fork_constraints = [ - ForkConstraint.model_validate(fork_with_operand.strip()) - ] - - for fork in get_forks(): - for f in all_fork_constraints: - if not f.match(fork): - # If any constraint does not match, skip adding - break - else: - # All constraints match, add the fork to the set - fork_set.add(fork) - - return fork_set - - def __hash__(self) -> int: - """Return the hash of the fork set.""" - h = hash(None) - for fork in sorted([str(f) for f in self]): - h ^= hash(fork) - return h - - def __contains__(self, fork: Fork) -> bool: - """Check if the fork set contains a fork.""" - return fork in self.root - - def __iter__(self) -> Iterator[Fork]: # type: ignore[override] - """Iterate over the fork set.""" - return iter(self.root) - - def __len__(self) -> int: - """Return the length of the fork set.""" - return len(self.root) - - -class ResultInFiller(EthereumTestRootModel, TagDependentData): - """ - Post section in state test filler. - - A value of `None` for an address means that the account should not be in - the state trie at the end of the test. - """ - - root: Dict[AddressOrCreateTagInFiller, AccountInExpectSection | None] - - def tag_dependencies(self) -> Mapping[str, Tag]: - """Return all tags used in the result.""" - tag_dependencies: Dict[str, Tag] = {} - for address, account in self.root.items(): - if isinstance(address, Tag): - tag_dependencies[address.name] = address - - if account is None: - continue - - tag_dependencies.update(account.tag_dependencies()) - - return tag_dependencies - - def resolve(self, tags: TagDict) -> Alloc: - """Resolve the post section.""" - post = Alloc() - for address, account in self.root.items(): - if isinstance(address, Tag): - resolved_address = address.resolve(tags) - else: - resolved_address = Address(address) - - post[resolved_address] = ( - account.resolve(tags) if account is not None else account - ) - return post - - def __contains__(self, address: Address) -> bool: - """Check if the result contains an address.""" - return address in self.root - - def __iter__(self) -> Iterator[AddressOrCreateTagInFiller]: # type: ignore[override] - """Iterate over the result.""" - return iter(self.root) - - def __len__(self) -> int: - """Return the length of the result.""" - return len(self.root) - - -class ExpectException(EthereumTestRootModel): - """Expect exception model.""" - - root: Dict[ForkSet, TransactionExceptionInstanceOrList] - - def __getitem__(self, fork: Fork) -> TransactionExceptionInstanceOrList: - """Get an expectation for a given fork.""" - for k in self.root: - if fork in k: - return self.root[k] - raise KeyError(f"Fork {fork} not found in expectations.") - - def __contains__(self, fork: Fork) -> bool: - """Check if the expect exception contains a fork.""" - return fork in self.root - - def __iter__(self) -> Iterator[ForkSet]: # type: ignore[override] - """Iterate over the expect exception.""" - return iter(self.root) - - def __len__(self) -> int: - """Return the length of the expect exception.""" - return len(self.root) - - -class ExpectSectionInStateTestFiller(CamelModel): - """Expect section in state test filler.""" - - indexes: Indexes = Field(default_factory=Indexes) - network: ForkSet - result: ResultInFiller - expect_exception: ExpectException | None = None - - def model_post_init(self, __context: Any) -> None: - """Validate that the expectation is coherent.""" - if self.expect_exception is None: - return - all_forks: Set[Fork] = set() - for current_fork_set in self.expect_exception: - for fork in current_fork_set: - assert fork not in all_forks - all_forks.add(fork) - - def has_index(self, d: int, g: int, v: int) -> bool: - """Check if there is index set in indexes.""" - d_match: bool = False - g_match: bool = False - v_match: bool = False - - # Check if data index match - if isinstance(self.indexes.data, int): - d_match = ( - True - if self.indexes.data == -1 or self.indexes.data == d - else False - ) - elif isinstance(self.indexes.data, list): - d_match = True if self.indexes.data.count(d) else False - - # Check if gas index match - if isinstance(self.indexes.gas, int): - g_match = ( - True - if self.indexes.gas == -1 or self.indexes.gas == g - else False - ) - elif isinstance(self.indexes.gas, list): - g_match = True if self.indexes.gas.count(g) else False - - # Check if value index match - if isinstance(self.indexes.value, int): - v_match = ( - True - if self.indexes.value == -1 or self.indexes.value == v - else False - ) - elif isinstance(self.indexes.value, list): - v_match = True if self.indexes.value.count(v) else False - - return d_match and g_match and v_match - - -def _match_index(idx: int | list, val: int) -> bool: - """Check if an index specification matches a value.""" - if isinstance(idx, int): - return idx == -1 or idx == val - if isinstance(idx, list): - return val in idx - return False - - -def resolve_expect_post( - expect_entries: list[dict], - d: int, - g: int, - v: int, - fork: Fork, -) -> tuple[dict, TransactionExceptionInstanceOrList | None]: - """ - Resolve expected post-state for given d, g, v and fork. - - Used by generated Python tests at runtime. The expect_entries are - materialized Python dicts with resolved addresses and Account objects. - """ - for entry in expect_entries: - indexes = entry["indexes"] - if not _match_index(indexes.get("data", -1), d): - continue - if not _match_index(indexes.get("gas", -1), g): - continue - if not _match_index(indexes.get("value", -1), v): - continue - - # Match fork against network constraints - network = entry["network"] - fork_set = ForkSet.model_validate(network) - if fork not in fork_set: - continue - - # Found matching entry - result = entry.get("result", {}) - - # Resolve exception - exception: TransactionExceptionInstanceOrList | None = None - expect_exc = entry.get("expect_exception") - if expect_exc: - for constraint_str, exc_value in expect_exc.items(): - exc_fork_set = ForkSet.model_validate( - constraint_str.split(",") - ) - if fork in exc_fork_set: - exception = exc_value - break - - return result, exception - - raise ValueError( - f"No matching expect entry for d={d}, g={g}, v={v}, fork={fork}" - ) - - -def resolve_expect_post_fork( - expect_entries: list[dict], - fork: Fork, -) -> tuple[dict, TransactionExceptionInstanceOrList | None]: - """ - Resolve expected post-state for a given fork only (no d/g/v matching). - - Used by single-case generated Python tests that have fork-dependent - post-state (multiple expect sections with different networks but only - one (d, g, v) combo). - """ - for entry in expect_entries: - # Match fork against network constraints - network = entry["network"] - fork_set = ForkSet.model_validate(network) - if fork not in fork_set: - continue - - # Found matching entry - result = entry.get("result", {}) - - # Resolve exception - exception: TransactionExceptionInstanceOrList | None = None - expect_exc = entry.get("expect_exception") - if expect_exc: - for constraint_str, exc_value in expect_exc.items(): - exc_fork_set = ForkSet.model_validate( - constraint_str.split(",") - ) - if fork in exc_fork_set: - exception = exc_value - break - - return result, exception - - raise ValueError(f"No matching expect entry for fork={fork}") diff --git a/packages/testing/src/execution_testing/specs/static_state/general_transaction.py b/packages/testing/src/execution_testing/specs/static_state/general_transaction.py deleted file mode 100644 index a0878d334ec..00000000000 --- a/packages/testing/src/execution_testing/specs/static_state/general_transaction.py +++ /dev/null @@ -1,243 +0,0 @@ -"""General transaction structure of ethereum/tests fillers.""" - -from typing import Any, Dict, Generator, List, Mapping - -from pydantic import ( - BaseModel, - ConfigDict, - Field, - field_validator, - model_validator, -) - -from execution_testing.base_types import ( - Address, - CamelModel, - EthereumTestRootModel, - Hash, -) -from execution_testing.exceptions import ( - TransactionExceptionInstanceOrList, -) -from execution_testing.test_types import Transaction - -from .common import ( - AccessListInFiller, - AddressOrTagInFiller, - CodeInFiller, - HashOrTagInFiller, - Tag, - TagDependentData, - TagDict, - ValueInFiller, -) - - -class DataWithAccessList(CamelModel, TagDependentData): - """Class that represents data with access list.""" - - data: CodeInFiller - access_list: List[AccessListInFiller] | None = None - - @field_validator("access_list", mode="before") - @classmethod - def convert_keys_to_hash( - cls, access_list: List[Dict[str, Any]] | None - ) -> List[Dict[str, Any]] | None: # noqa: N805 - """Fix keys.""" - if access_list is None: - return None - for entry in access_list: - if "storageKeys" in entry: - entry["storageKeys"] = [ - Hash(key, left_padding=True) - for key in entry["storageKeys"] - ] - return access_list - - def tag_dependencies(self) -> Mapping[str, Tag]: - """Get tag dependencies.""" - tag_dependencies: Dict[str, Tag] = {} - if self.access_list is not None: - for entry in self.access_list: - tag_dependencies.update(entry.tag_dependencies()) - if self.data is not None and isinstance(self.data, CodeInFiller): - tag_dependencies.update(self.data.tag_dependencies()) - return tag_dependencies - - @model_validator(mode="wrap") - @classmethod - def wrap_data_only(cls, data: Any, handler: Any) -> "DataWithAccessList": - """Wrap data only if it is not a dictionary.""" - if not isinstance(data, dict) and not isinstance( - data, DataWithAccessList - ): - data = {"data": data} - return handler(data) - - -class LabeledDataIndex(BaseModel): - """Represents an index with a label if any.""" - - index: int - label: str | None = None - - def __str__(self) -> str: - """Transform into a string that can be part of a test name.""" - if self.label is not None: - return self.label - return f"{self.index}" - - -class LabeledDataList(EthereumTestRootModel): - """Class that represents a list of labeled data.""" - - root: List[DataWithAccessList] - - def __getitem__(self, label_or_index: int | str) -> DataWithAccessList: - """Get an item by label or index.""" - if isinstance(label_or_index, int): - return self.root[label_or_index] - if isinstance(label_or_index, str): - for item in self.root: - if item.data.label == label_or_index: - return item - raise KeyError( - f"Label/index {label_or_index} not found in data indexes" - ) - - def __contains__(self, label_or_index: int | str) -> bool: - """ - Return True if the LabeledDataList contains the given label/index. - """ - if isinstance(label_or_index, int): - return label_or_index < len(self.root) - if isinstance(label_or_index, str): - for item in self.root: - if item.data.label == label_or_index: - return True - return False - - def __len__(self) -> int: - """Return the length of the list.""" - return len(self.root) - - def __iter__(self) -> Generator[LabeledDataIndex, None, None]: # type: ignore - """Return the iterator of the root list.""" - for i, item in enumerate(self.root): - labeled_data_index = LabeledDataIndex(index=i) - if item.data.label is not None: - labeled_data_index.label = item.data.label - yield labeled_data_index - - -class GeneralTransactionInFiller(BaseModel, TagDependentData): - """Class that represents general transaction in filler.""" - - data: LabeledDataList - gas_limit: List[ValueInFiller] = Field(..., alias="gasLimit") - gas_price: ValueInFiller | None = Field(None, alias="gasPrice") - nonce: ValueInFiller | None - to: AddressOrTagInFiller | None - value: List[ValueInFiller] - secret_key: HashOrTagInFiller = Field(..., alias="secretKey") - - max_fee_per_gas: ValueInFiller | None = Field(None, alias="maxFeePerGas") - max_priority_fee_per_gas: ValueInFiller | None = Field( - None, alias="maxPriorityFeePerGas" - ) - - max_fee_per_blob_gas: ValueInFiller | None = Field( - None, alias="maxFeePerBlobGas" - ) - blob_versioned_hashes: List[Hash] | None = Field( - None, alias="blobVersionedHashes" - ) - - model_config = ConfigDict(extra="forbid") - - def tag_dependencies(self) -> Mapping[str, Tag]: - """Get tag dependencies.""" - tag_dependencies: Dict[str, Tag] = {} - if self.data: - for idx in self.data: - data = self.data[idx.index] - tag_dependencies.update(data.tag_dependencies()) - if self.to is not None and isinstance(self.to, Tag): - tag_dependencies[self.to.name] = self.to - if self.secret_key is not None and isinstance(self.secret_key, Tag): - tag_dependencies[self.secret_key.name] = self.secret_key - return tag_dependencies - - @field_validator("to", mode="before") - def check_single_key(cls, to: Any) -> Any: # noqa: N805 - """Creation transaction.""" - if to == "": - to = None - return to - - @model_validator(mode="after") - def check_fields(self) -> "GeneralTransactionInFiller": - """Validate all fields are set.""" - if self.gas_price is None: - if ( - self.max_fee_per_gas is None - or self.max_priority_fee_per_gas is None - ): - raise ValueError( - "If `gasPrice` is not set," - " `maxFeePerGas` and `maxPriorityFeePerGas` must be set!" - ) - return self - - def get_transaction( - self, - tags: TagDict, - d: int, - g: int, - v: int, - exception: TransactionExceptionInstanceOrList | None, - ) -> Transaction: - """Get the transaction.""" - data_box = self.data[d] - kwargs: Dict[str, Any] = {} - if self.to is None: - kwargs["to"] = None - elif isinstance(self.to, Tag): - kwargs["to"] = self.to.resolve(tags) - else: - kwargs["to"] = Address(self.to) - - kwargs["data"] = data_box.data.compiled(tags) - if data_box.access_list is not None: - kwargs["access_list"] = [ - entry.resolve(tags) for entry in data_box.access_list - ] - - kwargs["gas_limit"] = self.gas_limit[g] - - if isinstance(self.secret_key, Tag): - sender = self.secret_key.resolve(tags) - kwargs["secret_key"] = sender.key - else: - kwargs["secret_key"] = self.secret_key - - if self.value[v] > 0: - kwargs["value"] = self.value[v] - if self.gas_price is not None: - kwargs["gas_price"] = self.gas_price - if self.nonce is not None: - kwargs["nonce"] = self.nonce - if self.max_fee_per_gas is not None: - kwargs["max_fee_per_gas"] = self.max_fee_per_gas - if self.max_priority_fee_per_gas is not None: - kwargs["max_priority_fee_per_gas"] = self.max_priority_fee_per_gas - if self.max_fee_per_blob_gas is not None: - kwargs["max_fee_per_blob_gas"] = self.max_fee_per_blob_gas - if self.blob_versioned_hashes is not None: - kwargs["blob_versioned_hashes"] = self.blob_versioned_hashes - - if exception is not None: - kwargs["error"] = exception - - return Transaction(**kwargs) diff --git a/packages/testing/src/execution_testing/specs/static_state/state_static.py b/packages/testing/src/execution_testing/specs/static_state/state_static.py deleted file mode 100644 index 37619835a64..00000000000 --- a/packages/testing/src/execution_testing/specs/static_state/state_static.py +++ /dev/null @@ -1,231 +0,0 @@ -"""Ethereum General State Test filler static test spec parser.""" - -from typing import Any, Callable, ClassVar, List, Self, Set, Union - -import pytest -from _pytest.mark.structures import ParameterSet -from pydantic import BaseModel, ConfigDict, Field, model_validator - -from execution_testing.forks import Fork -from execution_testing.test_types import Alloc - -from ..base_static import BaseStaticTest -from ..state import StateTestFiller -from .account import PreInFiller -from .common import Tag -from .environment import EnvironmentInStateTestFiller -from .expect_section import ExpectSectionInStateTestFiller -from .general_transaction import GeneralTransactionInFiller - - -class Info(BaseModel): - """Class that represents an info filler.""" - - comment: str | None = Field(None) - pytest_marks: List[str] = Field(default_factory=list) - - -class StateStaticTest(BaseStaticTest): - """General State Test static filler from ethereum/tests.""" - - test_name: str = "" - format_name: ClassVar[str] = "state_test" - - info: Info | None = Field(None, alias="_info") - env: EnvironmentInStateTestFiller - pre: PreInFiller - transaction: GeneralTransactionInFiller - expect: List[ExpectSectionInStateTestFiller] - - model_config = ConfigDict(extra="forbid") - - def model_post_init(self, context: Any) -> None: - """Initialize StateStaticTest.""" - super().model_post_init(context) - - @model_validator(mode="after") - def match_labels(self) -> Self: - """Replace labels in expect section with corresponding tx.d indexes.""" - - def parse_string_indexes(indexes: str) -> List[int]: - """Parse index that are string in to list of int.""" - if ":label" in indexes: - # Parse labels in data - indexes = indexes.replace(":label ", "") - tx_matches: List[int] = [] - for idx in self.transaction.data: - if indexes == idx.label: - tx_matches.append(idx.index) - return tx_matches - else: - # Parse ranges in data - start, end = map(int, indexes.lstrip().split("-")) - return list(range(start, end + 1)) - - def parse_indexes( - indexes: Union[ - int, str, list[Union[int, str]], list[str], list[int] - ], - do_hint: bool = False, - ) -> List[int] | int: - """ - Parse indexes and replace all ranges and labels into tx indexes. - """ - result: List[int] | int = [] - - if do_hint: - print("Before: " + str(indexes)) - - if isinstance(indexes, int): - result = indexes - if isinstance(indexes, str): - result = parse_string_indexes(indexes) - if isinstance(indexes, list): - result = [] - for element in indexes: - parsed = parse_indexes(element) - if isinstance(parsed, int): - result.append(parsed) - else: - result.extend(parsed) - result = list(set(result)) - - if do_hint: - print("After: " + str(result)) - return result - - for expect_section in self.expect: - expect_section.indexes.data = parse_indexes( - expect_section.indexes.data - ) - expect_section.indexes.gas = parse_indexes( - expect_section.indexes.gas - ) - expect_section.indexes.value = parse_indexes( - expect_section.indexes.value - ) - - return self - - def fill_function(self) -> Callable: - """Return a StateTest spec from a static file.""" - # Check if this test uses tags - has_tags = False - tx_tag_dependencies = self.transaction.tag_dependencies() - if tx_tag_dependencies: - has_tags = True - else: - # Check expect sections for tags - for expect in self.expect: - result_tag_dependencies = expect.result.tag_dependencies() - if result_tag_dependencies: - has_tags = True - break - - fully_tagged = True - for address in self.pre.root: - if not isinstance(address, Tag): - fully_tagged = False - break - - d_g_v_parameters: List[ParameterSet] = [] - for d in self.transaction.data: - for g in range(len(self.transaction.gas_limit)): - for v in range(len(self.transaction.value)): - exception_test = False - for expect in self.expect: - if ( - expect.has_index(d.index, g, v) - and expect.expect_exception is not None - ): - exception_test = True - # TODO: This does not take into account exceptions that - # only happen on specific forks, but this requires a - # covariant parametrize - marks = ( - [pytest.mark.exception_test] if exception_test else [] - ) - id_label = "" - if len(self.transaction.data) > 1 or d.label is not None: - if d.label is not None: - id_label = f"{d}" - else: - id_label = f"d{d}" - if len(self.transaction.gas_limit) > 1: - id_label += f"-g{g}" - if len(self.transaction.value) > 1: - id_label += f"-v{v}" - d_g_v_parameters.append( - pytest.param(d.index, g, v, marks=marks, id=id_label) - ) - - @pytest.mark.valid_at(*self.get_valid_at_forks()) - @pytest.mark.parametrize("d,g,v", d_g_v_parameters) - def test_state_vectors( - state_test: StateTestFiller, - pre: Alloc, - fork: Fork, - d: int, - g: int, - v: int, - ) -> None: - for expect in self.expect: - if expect.has_index(d, g, v): - if fork in expect.network: - tx_tag_dependencies = ( - self.transaction.tag_dependencies() - ) - result_tag_dependencies = ( - expect.result.tag_dependencies() - ) - all_dependencies = { - **tx_tag_dependencies, - **result_tag_dependencies, - } - tags = self.pre.setup(pre, all_dependencies) - env = self.env.get_environment(tags) - exception = ( - None - if expect.expect_exception is None - else expect.expect_exception[fork] - ) - tx = self.transaction.get_transaction( - tags, d, g, v, exception - ) - post = expect.result.resolve(tags) - state_test( - env=env, - pre=pre, - post=post, - tx=tx, - ) - return - pytest.fail( - f"Expectation not found for d={d}, g={g}, v={v}, fork={fork}" - ) - - if self.info and self.info.pytest_marks: - for mark in self.info.pytest_marks: - apply_mark = getattr(pytest.mark, mark) - test_state_vectors = apply_mark(test_state_vectors) - - if has_tags: - test_state_vectors = pytest.mark.tagged(test_state_vectors) - if fully_tagged: - test_state_vectors = pytest.mark.fully_tagged( - test_state_vectors - ) - else: - test_state_vectors = pytest.mark.untagged(test_state_vectors) - - # All static tests are mutable since we do `pre[0x123...] = Account()` - test_state_vectors = pytest.mark.pre_alloc_mutable(test_state_vectors) - - return test_state_vectors - - def get_valid_at_forks(self) -> List[str]: - """Return list of forks that are valid for this test.""" - fork_set: Set[Fork] = set() - for expect in self.expect: - fork_set.update(expect.network) - return sorted([str(f) for f in fork_set]) diff --git a/scripts/filler_to_python/__init__.py b/scripts/filler_to_python/__init__.py deleted file mode 100644 index 359373d411c..00000000000 --- a/scripts/filler_to_python/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Convert static filler YAML/JSON to Python test files.""" diff --git a/scripts/filler_to_python/__main__.py b/scripts/filler_to_python/__main__.py deleted file mode 100644 index 83b13924c95..00000000000 --- a/scripts/filler_to_python/__main__.py +++ /dev/null @@ -1,302 +0,0 @@ -"""CLI entry point: load -> analyze -> render -> format -> write.""" - -from __future__ import annotations - -import argparse -import ast -import logging -import os -import re -import subprocess -import sys -from pathlib import Path - -from .analyzer import analyze, load_filler -from .render import render_test - -logger = logging.getLogger(__name__) - -MANUALLY_ENHANCED_TAG = "@manually-enhanced" - - -def _has_manually_enhanced_tag(file_path: Path) -> bool: - """Check if a file has @manually-enhanced in its module docstring.""" - try: - source = file_path.read_text() - tree = ast.parse(source) - except (OSError, SyntaxError): - return False - docstring = ast.get_docstring(tree) - if docstring is None: - return False - return MANUALLY_ENHANCED_TAG in docstring - - -def post_format(source: str) -> str: - """Format generated Python source with ruff.""" - # ruff format - try: - result = subprocess.run( - ["ruff", "format", "--stdin-filename", "test.py", "-"], - input=source, - capture_output=True, - text=True, - env={**os.environ, "RUST_MIN_STACK": "8388608"}, - ) - if result.returncode == 0: - source = result.stdout - except FileNotFoundError: - pass # ruff not installed - - # ruff check --fix (accept output even with remaining unfixable issues) - try: - result = subprocess.run( - [ - "ruff", - "check", - "--fix", - "--stdin-filename", - "test.py", - "-", - ], - input=source, - capture_output=True, - text=True, - env={**os.environ, "RUST_MIN_STACK": "8388608"}, - ) - if result.stdout: - source = result.stdout - except FileNotFoundError: - pass - - # Add # noqa for generated code issues that can't be auto-fixed. - # Track docstring boundaries to avoid adding noqa inside docstrings. - lines = source.split("\n") - fixed_lines: list[str] = [] - in_docstring = False - for line in lines: - stripped = line.rstrip() - if '"""' in stripped: - count = stripped.count('"""') - if count == 1: - in_docstring = not in_docstring - # count == 2 means open+close on same line, no state change - if in_docstring: - fixed_lines.append(line) - continue - noqa_parts: list[str] = [] - if len(stripped) > 79: - noqa_parts.append("E501") - # F841: deploy_contract assigns to variables used in expect dicts - if "= pre.deploy_contract(" in stripped: - noqa_parts.append("F841") - if noqa_parts and "# noqa" not in stripped: - codes = ", ".join(noqa_parts) - fixed_lines.append(f"{stripped} # noqa: {codes}") - else: - fixed_lines.append(line) - source = "\n".join(fixed_lines) - - return source - - -def _filler_name_to_filename(stem: str) -> str: - """Convert filler stem to output filename.""" - name = re.sub(r"Filler$", "", stem) - # camel_to_snake - s = re.sub(r"([a-z0-9])([A-Z])", r"\1_\2", name) - s = re.sub(r"([A-Z]+)([A-Z][a-z])", r"\1_\2", s) - result = s.lower() - result = result.replace("+", "_plus_") - result = result.replace("-", "_minus_") - result = re.sub(r"[^a-z0-9_]", "_", result) - result = re.sub(r"_+", "_", result) - return "test_" + result.strip("_") + ".py" - - -def discover_fillers(fillers_dir: Path) -> list[Path]: - """Walk a directory for *Filler.yml and *Filler.json files.""" - found: list[Path] = [] - for root, _dirs, files in os.walk(fillers_dir): - for f in sorted(files): - if f.endswith("Filler.yml") or f.endswith("Filler.json"): - found.append(Path(root) / f) - return found - - -def process_single_filler( - filler_path: Path, - fillers_base: Path, - output_dir: Path, - dry_run: bool = False, -) -> str: - """ - Process one filler file. - - Return "ok", "fail", "warn", or "skip". - """ - try: - # Relative path for the generated test's ported_from marker - try: - rel_path = filler_path.relative_to(fillers_base.parent) - except ValueError: - rel_path = filler_path - - # Skip files that have been manually enhanced - category = rel_path.parts[-2] if len(rel_path.parts) >= 2 else "" - out_file = ( - output_dir / category / _filler_name_to_filename(filler_path.stem) - ) - if out_file.exists() and _has_manually_enhanced_tag(out_file): - logger.info( - "SKIP: %s (existing file has %s tag)", - out_file, - MANUALLY_ENHANCED_TAG, - ) - return "skip" - - # Load - test_name, model = load_filler(filler_path) - - # Analyze - ir = analyze(test_name, model, rel_path) - - # Render - source = render_test(ir) - - # Verify syntax - try: - ast.parse(source) - except SyntaxError as e: - logger.error( - "Syntax error in generated code for %s: %s", - filler_path, - e, - ) - return "fail" - - # Format - source = post_format(source) - - if dry_run: - print(f"[DRY-RUN] {filler_path} -> {ir.test_name}") - return "ok" - - # Write - out_file.parent.mkdir(parents=True, exist_ok=True) - - # Write __init__.py if needed - init_file = out_file.parent / "__init__.py" - if not init_file.exists(): - init_file.write_text( - f'"""Ported static tests: {category}.""" # noqa: N999\n' - ) - - out_file.write_text(source) - logger.info("OK: %s -> %s", filler_path.name, out_file) - return "ok" - - except Exception as e: - logger.error("FAIL: %s: %s", filler_path, e) - if logger.isEnabledFor(logging.DEBUG): - logger.debug("Traceback:", exc_info=True) - return "fail" - - -def main() -> None: - """Run the filler-to-python pipeline.""" - parser = argparse.ArgumentParser( - description="Convert static filler YAML/JSON to Python test files." - ) - parser.add_argument( - "--fillers", - type=Path, - required=True, - help="Directory containing *Filler.yml/*.json files.", - ) - parser.add_argument( - "--output", - type=Path, - required=True, - help="Output directory for generated .py test files.", - ) - parser.add_argument( - "--single", - type=Path, - default=None, - help="Process a single filler file instead of the whole directory.", - ) - parser.add_argument( - "--filter", - type=Path, - default=None, - help="Only convert fillers listed in this file (one path per line).", - ) - parser.add_argument( - "--dry-run", - action="store_true", - help="Parse and analyze but don't write files.", - ) - parser.add_argument( - "-v", - "--verbose", - action="store_true", - help="Enable verbose logging.", - ) - - args = parser.parse_args() - - logging.basicConfig( - level=logging.DEBUG if args.verbose else logging.INFO, - format="%(levelname)s: %(message)s", - ) - - if args.single: - filler_paths = [args.single] - else: - if not args.fillers.is_dir(): - logger.error("--fillers must be a directory: %s", args.fillers) - sys.exit(1) - filler_paths = discover_fillers(args.fillers) - - # Apply filter - if args.filter: - allowed = set() - for line in args.filter.read_text().splitlines(): - line = line.strip() - if line and not line.startswith("#"): - allowed.add(line) - filler_paths = [ - p for p in filler_paths if str(p) in allowed or p.name in allowed - ] - - if not filler_paths: - logger.warning("No filler files found.") - sys.exit(0) - - logger.info("Processing %d filler(s)...", len(filler_paths)) - - counts = {"ok": 0, "fail": 0, "warn": 0, "skip": 0} - for filler_path in filler_paths: - status = process_single_filler( - filler_path, - args.fillers, - args.output, - dry_run=args.dry_run, - ) - counts[status] += 1 - - # Summary - total = sum(counts.values()) - skip_msg = f", {counts['skip']} skipped" if counts["skip"] else "" - print( - f"\nDone: {counts['ok']}/{total} OK, " - f"{counts['fail']} failed, {counts['warn']} warnings" - f"{skip_msg}" - ) - if counts["fail"] > 0: - sys.exit(1) - - -if __name__ == "__main__": - main() diff --git a/scripts/filler_to_python/analyzer.py b/scripts/filler_to_python/analyzer.py deleted file mode 100644 index 62a90fcdba1..00000000000 --- a/scripts/filler_to_python/analyzer.py +++ /dev/null @@ -1,1940 +0,0 @@ -"""Analyze a parsed filler model and produce codegen IR.""" - -from __future__ import annotations - -import json -import logging -import re -import warnings -from pathlib import Path -from typing import Any - -import yaml -from execution_testing.base_types import Address -from execution_testing.base_types import Hash as EHash -from execution_testing.cli.evm_bytes import process_evm_bytes_string -from execution_testing.exceptions import TransactionException -from execution_testing.forks import get_forks -from execution_testing.specs import StateStaticTest -from execution_testing.specs.static_state.common import Tag, TagDict -from execution_testing.specs.static_state.common.tags import ( - ContractTag, - SenderKeyTag, - SenderTag, -) -from execution_testing.specs.static_state.expect_section import ( - ForkSet, -) -from execution_testing.specs.static_state.general_transaction import ( - GeneralTransactionInFiller, -) -from execution_testing.test_types import ( - EOA, - Alloc, - compute_create_address, - eoa_from_hash, -) -from execution_testing.vm import Op - -from .ir import ( - AccessListEntryIR, - AccountAssertionIR, - AccountIR, - EnvironmentIR, - ExpectEntryIR, - ImportsIR, - IntermediateTestModel, - ParameterCaseIR, - SenderIR, - TransactionIR, -) - -try: - from execution_testing.cli.pytest_commands.plugins.filler.static_filler import ( # noqa: E501 - NoIntResolver, - ) -except ImportError: - import yaml as _yaml - - class NoIntResolver(_yaml.SafeLoader): # type: ignore[no-redef] - """Fallback NoIntResolver.""" - - pass - - -logger = logging.getLogger(__name__) - -MAX_BYTECODE_OP_SIZE = 24576 -SLOW_CATEGORIES = { - "stQuadraticComplexityTest", - "stStaticCall", - "stTimeConsuming", -} - -# Ported tests (relative to ``tests/ported_static/``) that must keep -# hardcoded addresses. These do not converge under ``exact-no-stack`` -# with dynamic addresses because of patterns the analyzer's heuristics -# cannot cover: -# -# - EIP-2929 warm/cold gas accounting that depends on which addresses -# are warm at call time (baseline-specific layout). -# - CREATE2 collision semantics that depend on specific pre-state -# addresses colliding with computed CREATE2 targets. -# - Keccak-derived storage keys (Solidity mappings) baked into the -# pre-state on specific sender / contract addresses. -# - Structural transaction rejections sensitive to exact pre-state -# collisions (empty-but-code, init-colliding-with-non-empty). -# - Edge cases where dynamic allocation randomly picks an address -# with a leading zero byte, changing PUSH size. -# - Tag resolution mismatches (analyzer resolves -# to a fresh deterministic address, but baseline used the hint). -# -# Treat this list as an allowlist of "we've accepted the divergence -# here; don't try to make it dynamic". See trace-divergences.md for -# the per-file rationale. -FORCE_HARDCODED_TESTS: set[str] = { - # GAS_ONLY (29) — EIP-2929 warm/cold access cost differences - "stCallCodes/test_callcode_dynamic_code.py", - "stCallCodes/test_callcode_dynamic_code2_self_call.py", - "stCallCreateCallCodeTest/test_call1024_pre_calls.py", - "stCallCreateCallCodeTest/test_contract_creation_make_call_that_ask_more_gas_then_transaction_provided.py", # noqa: E501 - "stCreate2/test_returndatacopy_following_create.py", - "stCreateTest/test_create_collision_to_empty2.py", - "stCreateTest/test_create_transaction_refund_ef.py", - "stDelegatecallTestHomestead/test_call1024_pre_calls.py", - "stDelegatecallTestHomestead/test_delegatecode_dynamic_code2_self_call.py", # noqa: E501 - "stEIP150singleCodeGasPrices/test_eip2929_oog.py", - "stEIP2930/test_manual_create.py", - "stEIP3651_warmcoinbase/test_coinbase_warm_account_call_gas_fail.py", - "stEIP3855_push0/test_push0.py", - "stEIP3855_push0/test_push0_gas2.py", - "stHomesteadSpecific/test_contract_creation_oo_gdont_leave_empty_contract_via_transaction.py", # noqa: E501 - "stRandom/test_random_statetest282.py", - "stRandom/test_random_statetest287.py", - "stRandom/test_random_statetest384.py", - "stRandom2/test_random_statetest401.py", - "stRandom2/test_random_statetest508.py", - "stRevertTest/test_cost_revert.py", - "stRevertTest/test_revert_opcode_in_calls_on_non_empty_return_data.py", - "stRevertTest/test_revert_opcode_multiple_sub_calls.py", - "stRevertTest/test_revert_precompiled_touch_paris.py", - "stStackTests/test_underflow_test.py", - "stSystemOperationsTest/test_suicide_caller_addres_too_big_left.py", - "vmBitwiseLogicOperation/test_byte.py", - "vmIOandFlowOperations/test_jump_to_push.py", - "vmIOandFlowOperations/test_jumpi.py", - # EXECUTION_PATH_DIVERGED — remaining 8 (Categories B, C, D, E) - "stCreate2/test_create2_suicide.py", - "stCreate2/test_create2collision_code2.py", - "stCreate2/test_create2collision_selfdestructed2.py", - "stDelegatecallTestHomestead/test_delegatecall_in_initcode_to_existing_contract_oog.py", # noqa: E501 - "stLogTests/test_log1_non_empty_mem.py", - "stSystemOperationsTest/test_double_selfdestruct_touch_paris.py", - "stWalletTest/test_multi_owned_change_requirement_to1.py", - "stWalletTest/test_multi_owned_revoke_nothing.py", - # EXECUTION_PATH_DIVERGED + GAS (5) - "stCreate2/test_create2collision_code.py", - "stCreate2/test_create2collision_nonce.py", - "stCreate2/test_create2collision_selfdestructed.py", - "stCreate2/test_create2collision_selfdestructed_revert.py", - "stSStoreTest/test_sstore_gas_left.py", - # OUTPUT_DIFFERS — remaining 2 (Categories F, H) - "stEIP3651_warmcoinbase/test_coinbase_warm_account_call_gas.py", - "stWalletTest/test_multi_owned_is_owner_true.py", - # Precompile-as-EOA — tests fund precompile addresses as EOAs, - # then check nonce after calling the precompile. Dynamic EOAs - # land at different addresses than the precompile targets. - # STRUCTURAL — CREATE collision / EIP-3607 rejection behaviour. - # With dynamic addresses the collision doesn't happen, so the tx - # runs instead of being rejected → traces appear where baseline - # had none. - "stCreateTest/test_transaction_collision_to_empty_but_code.py", - "stCreateTest/test_transaction_collision_to_empty_but_nonce.py", - "stEIP3607/test_init_colliding_with_non_empty_account.py", - "stEIP3607/test_transaction_colliding_with_non_empty_account_calls.py", - "stEIP3607/test_transaction_colliding_with_non_empty_account_calls_itself.py", - "stEIP3607/test_transaction_colliding_with_non_empty_account_init_paris.py", - "stEIP3607/test_transaction_colliding_with_non_empty_account_send_paris.py", - # Remaining CI assertion failures — gas measurements, keccak storage, - # collision semantics, address-in-code, precompile interactions, etc. - # that are fundamentally incompatible with dynamic addresses. - "stBadOpcode/test_measure_gas.py", - "stBadOpcode/test_operation_diff_gas.py", - "stCallCodes/test_callcode_in_initcode_to_existing_contract_with_value_transfer.py", - "stCreate2/test_create2collision_balance.py", - "stCreate2/test_revert_depth_create_address_collision.py", - "stCreate2/test_revert_depth_create_address_collision_berlin.py", - "stCreateTest/test_create_empty_contract_with_storage.py", - "stCreateTest/test_transaction_collision_to_empty2.py", - "stDelegatecallTestHomestead/test_delegatecall_in_initcode_to_existing_contract.py", - "stEIP1153_transientStorage/test_trans_storage_ok.py", - "stEIP158Specific/test_call_one_v_call_suicide2.py", - "stInitCodeTest/test_out_of_gas_prefunded_contract_creation.py", - "stNonZeroCallsTest/test_non_zero_value_call_to_one_storage_key_paris.py", - "stNonZeroCallsTest/test_non_zero_value_callcode_to_one_storage_key_paris.py", - "stNonZeroCallsTest/test_non_zero_value_delegatecall_to_one_storage_key_paris.py", - "stNonZeroCallsTest/test_non_zero_value_suicide_to_empty_paris.py", - "stNonZeroCallsTest/test_non_zero_value_suicide_to_non_non_zero_balance.py", - "stNonZeroCallsTest/test_non_zero_value_suicide_to_one_storage_key_paris.py", - "stNonZeroCallsTest/test_non_zero_value_transaction_cal_lwith_data_to_one_storage_key_paris.py", - "stNonZeroCallsTest/test_non_zero_value_transaction_call_to_one_storage_key_paris.py", - "stPreCompiledContracts2/test_call_ecrecover0.py", - "stPreCompiledContracts2/test_call_ecrecover0_complete_return_value.py", - "stPreCompiledContracts2/test_call_ecrecover0_gas3000.py", - "stPreCompiledContracts2/test_call_ecrecover0_overlapping_input_output.py", - "stPreCompiledContracts2/test_call_ecrecover_check_length.py", - "stPreCompiledContracts2/test_call_ecrecover_v_prefixed0.py", - "stPreCompiledContracts2/test_callcode_ecrecover0.py", - "stPreCompiledContracts2/test_callcode_ecrecover0_complete_return_value.py", - "stPreCompiledContracts2/test_callcode_ecrecover0_gas3000.py", - "stPreCompiledContracts2/test_callcode_ecrecover0_overlapping_input_output.py", - "stPreCompiledContracts2/test_callcode_ecrecover_v_prefixed0.py", - "stRandom/test_random_statetest144.py", - "stRandom2/test_random_statetest642.py", - "stRandom2/test_random_statetest645.py", - "stRandom2/test_random_statetest646.py", - "stRevertTest/test_revert_depth_create_address_collision.py", - "stRevertTest/test_revert_in_create_in_init_paris.py", - "stRevertTest/test_revert_prefound.py", - "stRevertTest/test_revert_prefound_empty_paris.py", - "stSpecialTest/test_failed_create_reverts_deletion_paris.py", - "stSystemOperationsTest/test_create_hash_collision.py", - "stSystemOperationsTest/test_test_random_test.py", - "stWalletTest/test_day_limit_construction.py", - "stWalletTest/test_day_limit_construction_partial.py", - "stWalletTest/test_day_limit_reset_spent_today.py", - "stWalletTest/test_day_limit_set_daily_limit.py", - "stWalletTest/test_day_limit_set_daily_limit_no_data.py", - "stWalletTest/test_multi_owned_add_owner_add_myself.py", - "stWalletTest/test_multi_owned_change_owner_from_not_owner.py", - "stWalletTest/test_multi_owned_change_owner_no_argument.py", - "stWalletTest/test_multi_owned_change_owner_to_is_owner.py", - "stWalletTest/test_multi_owned_change_requirement_to0.py", - "stWalletTest/test_multi_owned_change_requirement_to2.py", - "stWalletTest/test_multi_owned_construction_correct.py", - "stWalletTest/test_multi_owned_remove_owner_by_non_owner.py", - "stWalletTest/test_multi_owned_remove_owner_my_self.py", - "stWalletTest/test_multi_owned_remove_owner_owner_is_not_owner.py", - "stWalletTest/test_wallet_change_requirement_remove_pending_transaction.py", - "stWalletTest/test_wallet_construction.py", - "stWalletTest/test_wallet_construction_oog.py", - "stWalletTest/test_wallet_construction_partial.py", - "stWalletTest/test_wallet_kill.py", - "stWalletTest/test_wallet_kill_to_wallet.py", - "stWalletTest/test_wallet_remove_owner_remove_pending_transaction.py", - "stZeroCallsRevert/test_zero_value_call_to_one_storage_key_oog_revert_paris.py", - "stZeroCallsRevert/test_zero_value_callcode_to_one_storage_key_oog_revert_paris.py", - "stZeroCallsRevert/test_zero_value_delegatecall_to_one_storage_key_oog_revert_paris.py", - "stZeroCallsRevert/test_zero_value_suicide_to_one_storage_key_oog_revert_paris.py", - "stZeroCallsTest/test_zero_value_call_to_one_storage_key_paris.py", - "stZeroCallsTest/test_zero_value_callcode_to_one_storage_key_paris.py", - "stZeroCallsTest/test_zero_value_delegatecall_to_one_storage_key_paris.py", - "stZeroCallsTest/test_zero_value_suicide_to_empty_paris.py", - "stZeroCallsTest/test_zero_value_suicide_to_non_zero_balance.py", - "stZeroCallsTest/test_zero_value_suicide_to_one_storage_key_paris.py", - "stZeroCallsTest/test_zero_value_transaction_cal_lwith_data_to_one_storage_key_paris.py", - "stZeroCallsTest/test_zero_value_transaction_call_to_one_storage_key_paris.py", - # Slow-marked tests that fail with dynamic addresses (excluded from - # the main verification by -m "not slow" but exercised on full CI - # runs without that filter — same KV_CALL_FLIP / collision / - # ecrecover patterns as the non-slow allowlisted siblings). - "stQuadraticComplexityTest/test_return50000.py", - "stQuadraticComplexityTest/test_return50000_2.py", - "stStaticCall/test_static_call_ecrecover0.py", - "stStaticCall/test_static_call_ecrecover0_complete_return_value.py", - "stStaticCall/test_static_call_ecrecover0_gas3000.py", - "stStaticCall/test_static_call_ecrecover0_overlapping_input_output.py", - "stStaticCall/test_static_call_ecrecover_check_length.py", - "stStaticCall/test_static_call_ecrecover_v_prefixed0.py", - "stStaticCall/test_static_call_to_call_code_op_code_check.py", - "stStaticCall/test_static_call_to_call_op_code_check.py", - "stStaticCall/test_static_call_to_del_call_op_code_check.py", - "stStaticCall/test_static_call_to_static_op_code_check.py", - "stStaticCall/test_static_check_opcodes.py", - "stStaticCall/test_static_check_opcodes2.py", - "stStaticCall/test_static_check_opcodes3.py", - "stStaticCall/test_static_check_opcodes4.py", - "stStaticCall/test_static_check_opcodes5.py", -} - - -def _ported_rel_path(filler_path: Path) -> str: - """Return the ``/test_.py`` path for a filler.""" - category = filler_path.parent.name if filler_path.parent.name else "" - py_test_name = _filler_name_to_test_name(filler_path.stem) - return f"{category}/{py_test_name}.py" - - -class _AnalyzerAlloc(Alloc): - """Alloc subclass that supports fund_eoa for analysis.""" - - _eoa_counter: int = 0 - - def fund_eoa( - self, - _amount: Any = None, - _label: Any = None, - **_kwargs: Any, - ) -> EOA: - """Create a deterministic EOA for analysis.""" - self._eoa_counter += 1 - h = EHash(self._eoa_counter.to_bytes(32, "big")) - return eoa_from_hash(h, 0) - - -# --------------------------------------------------------------------------- -# Public API -# --------------------------------------------------------------------------- - - -def load_filler(path: Path) -> tuple[str, StateStaticTest]: - """Load a filler file and return (test_name, validated model).""" - with open(path) as f: - if path.suffix == ".json": - data = json.load(f) - else: - data = yaml.load(f, Loader=NoIntResolver) - - test_name = next(iter(data)) - model = StateStaticTest.model_validate(data[test_name]) - model.test_name = test_name - return test_name, model - - -def analyze( - test_name: str, - model: StateStaticTest, - filler_path: Path, -) -> IntermediateTestModel: - """Analyze a parsed filler model and produce codegen IR.""" - # 1. Gather all tag dependencies - all_deps: dict[str, Tag] = {} - all_deps.update(model.transaction.tag_dependencies()) - for expect in model.expect: - all_deps.update(expect.result.tag_dependencies()) - imports = ImportsIR() - - # 2. Resolve tags via pre-state setup - pre = _AnalyzerAlloc() - tags = model.pre.setup(pre, all_deps) - - # 2b. Honour precompile hint addresses for tagged EOAs. - # The static filler resolves ```` through - # ``eoa_from_hash`` (random placeholder address). LLL source code - # however references those addresses literally (e.g. - # ``(call gas 0x01 ...)``), so the bytecode lands at the precompile - # while the funded EOA lands somewhere else. Override the resolved - # address back to the literal hint when it falls in the precompile - # range (0x01-0x10) — that way ``addr_to_var`` registers 0x01 and - # tx-data / post-state resolutions stay consistent with bytecode. - # - # Track the override addresses so that the corresponding EOA can - # be pinned non-dynamic later. Without pinning, the variable in - # the generated test (``addr_5``) would still go through - # ``pre.fund_eoa()`` at runtime and land at a random address, - # while ``tx_data`` would carry that random address — breaking - # any contract that calls the literal precompile (0x01). - pinned_eoa_addrs: set[Address] = set() - for tag in model.pre.root.keys(): - if not isinstance(tag, SenderTag): - continue - name = tag.name - if not ( - isinstance(name, str) and name.startswith("0x") and len(name) == 42 - ): - continue - try: - hint_int = int(name, 16) - except ValueError: - continue - if 1 <= hint_int <= 0x10: - hint_addr = Address(hint_int) - tags[tag.name] = hint_addr - pinned_eoa_addrs.add(hint_addr) - - # 3. Fork range (must sort chronologically, not alphabetically) - all_fork_names = [str(f) for f in sorted(get_forks())] - valid_forks_set = set(model.get_valid_at_forks()) - valid_forks_chrono = [f for f in all_fork_names if f in valid_forks_set] - valid_from = valid_forks_chrono[0] if valid_forks_chrono else "Cancun" - - valid_until: str | None = None - if valid_forks_chrono and valid_forks_chrono[-1] != all_fork_names[-1]: - valid_until = valid_forks_chrono[-1] - - # 4. Category from filler path - category = filler_path.parent.name if filler_path.parent.name else "" - - # 5. Build address -> variable name mapping - addr_to_var = _assign_variable_names(model, tags) - - # 5b. Resolve coinbase address for later use - coinbase_addr: Address | None = None - if isinstance(model.env.current_coinbase, Tag): - tag_name = model.env.current_coinbase.name - if tag_name in tags: - resolved = tags[tag_name] - if isinstance(resolved, Address): - coinbase_addr = resolved - else: - coinbase_addr = Address(int.from_bytes(resolved, "big")) - else: - coinbase_addr = model.env.current_coinbase - - # 6. Identify sender - sender_ir, sender_tag_name = _build_sender_ir(model, tags) - - # 7. Build TX arrays - probably_bytecode = model.transaction.to is None - tx_data, tx_gas, tx_value = _build_tx_arrays( - model.transaction, - tags, - addr_to_var, - probably_bytecode, - imports, - ) - - # 8. Parameter matrix - parameters = _build_parameters(model) - is_multi_case = len(parameters) > 1 - - # Detect fork-dependent single-case tests (multiple expect sections - # with different networks but only one (d, g, v) combo) - is_fork_dependent = not is_multi_case and len(model.expect) > 1 - - # 9. Build accounts - force_hardcoded = _ported_rel_path(filler_path) in FORCE_HARDCODED_TESTS - accounts = _build_accounts( - model, - tags, - addr_to_var, - sender_tag_name, - imports, - force_hardcoded=force_hardcoded, - coinbase_addr=coinbase_addr, - pinned_eoa_addrs=pinned_eoa_addrs, - ) - - # Track if sender is not in the pre-state (for fund_eoa handling). - # When True, the generated test uses pre.fund_eoa(amount=0) instead - # of EOA(key=...), matching the static fill's setup() step 7. - if sender_tag_name and not any(a.is_sender for a in accounts): - sender_ir.not_in_pre = True - - # 10. Build environment - environment_ir = _build_environment(model, tags, addr_to_var) - - # 11. Build expect entries - expect_entries = _build_expect_entries( - model, tags, addr_to_var, all_fork_names, imports - ) - - # 11b. If post-state has unresolvable addresses — either as account - # references (Address(0x...)) or as address-like storage values - # (large ints > 2^32 that weren't resolved to variable names) — - # disable dynamic for ALL accounts (including sender) so every - # address stays fixed and CREATE-derived addresses match baseline. - # Values above 2**32 are likely addresses, not small ints. - addr_like_threshold = 0x100000000 - has_unresolved = any( - "Address(0x" in a.var_ref - for entry in expect_entries - for a in entry.result - ) or any( - isinstance(v, int) and v >= addr_like_threshold - for entry in expect_entries - for a in entry.result - if a.storage is not None - for v in a.storage.values() - ) - if has_unresolved: - for acct in accounts: - acct.use_dynamic = False - - # Sender: dynamic unless unresolvable post-state or hardcoded allowlist. - sender_ir.use_dynamic = not force_hardcoded and not has_unresolved - - # 11c. Forced hardcoded (allowlist) also pins every EOA so coinbase - # rebinds and fund_eoa-generated EOAs don't leak into an otherwise - # hardcoded test. - if force_hardcoded: - for acct in accounts: - acct.use_dynamic = False - - # 12. Build transaction IR - transaction_ir, access_list_entries = _build_transaction_ir( - model, - tags, - addr_to_var, - tx_data, - tx_gas, - tx_value, - is_multi_case, - imports, - ) - - # 13. Address constants (non-tagged, non-sender addresses) - address_constants = _build_address_constants( - model, tags, addr_to_var, sender_tag_name, accounts - ) - - # 14. Import flags - if access_list_entries or any( - model.transaction.data[d.index].access_list is not None - for d in model.transaction.data - ): - imports.needs_access_list = True - - if ( - imports.needs_access_list - or model.transaction.blob_versioned_hashes is not None - ): - imports.needs_hash = True - - if any(p.has_exception for p in parameters): - imports.needs_tx_exception = True - - # 15. Filler comment - filler_comment = "" - if model.info and model.info.comment: - filler_comment = model.info.comment - - # 16. Test name - py_test_name = _filler_name_to_test_name(test_name) - - # 17. Whether the test mutates the pre-allocation. The framework's - # ``assert_mutable()`` is triggered by: - # * ``pre[var] = Account(...)`` (any non-dynamic account) - # * ``EOA(key=...)`` (non-dynamic sender) - # * ``pre.deploy_contract(address=...)`` (non-dynamic contract) - # * ``pre.deploy_contract(..., nonce=0)`` (default emit when the - # filler's account had nonce 0 or unset) - # * ``pre.fund_eoa(nonce=...)`` (dynamic sender with explicit - # nonce — used for high-nonce senders) - # Tests not hitting any of these can run under the ``execute`` plugin. - # The template only emits ``pre.fund_eoa(nonce=...)`` when - # ``sender.nonce`` is truthy, and ``pre.deploy_contract(..., nonce=N)`` - # always emits N (defaulting to 0 when ``account.nonce`` is None). - # Mirror those conditions exactly. - sender_emits_nonce_kwarg = bool(sender_ir.nonce) - contract_nonce_zero = any( - not a.is_eoa and (a.nonce is None or a.nonce == 0) for a in accounts - ) - needs_mutable_pre = ( - not sender_ir.use_dynamic - or sender_emits_nonce_kwarg - or any(not a.use_dynamic for a in accounts) - or contract_nonce_zero - ) - - return IntermediateTestModel( - test_name=py_test_name, - filler_path=str(filler_path), - filler_comment=filler_comment, - category=category, - valid_from=valid_from, - valid_until=valid_until, - is_slow=( - (model.info is not None and "slow" in model.info.pytest_marks) - or category in SLOW_CATEGORIES - ), - is_multi_case=is_multi_case, - is_fork_dependent=is_fork_dependent, - needs_mutable_pre=needs_mutable_pre, - environment=environment_ir, - accounts=accounts, - sender=sender_ir, - parameters=parameters, - transaction=transaction_ir, - expect_entries=expect_entries, - address_constants=address_constants, - tx_data=tx_data, - tx_gas=tx_gas, - tx_value=tx_value, - imports=imports, - ) - - -# --------------------------------------------------------------------------- -# Private helpers -# --------------------------------------------------------------------------- - - -def _camel_to_snake(name: str) -> str: - """Convert CamelCase to snake_case.""" - s = re.sub(r"([a-z0-9])([A-Z])", r"\1_\2", name) - s = re.sub(r"([A-Z]+)([A-Z][a-z])", r"\1_\2", s) - return s.lower() - - -def _filler_name_to_test_name(filler_stem: str) -> str: - """Convert filler stem to Python test function name.""" - name = re.sub(r"Filler$", "", filler_stem) - result = "test_" + _camel_to_snake(name) - result = result.replace("+", "_plus_") - result = result.replace("-", "_minus_") - result = re.sub(r"[^a-z0-9_]", "_", result) - result = re.sub(r"_+", "_", result) - return result.strip("_") - - -def _classify_code_source(source: str) -> str: - """Classify code source and format as a comment block.""" - if not source or source.strip() == "": - return "" - - stripped = source.strip() - - if stripped.startswith(":yul"): - lang = "yul" - body = stripped[4:].strip() - elif stripped.startswith("{") or stripped.startswith("(asm"): - lang = "lll" - body = stripped - elif stripped.startswith(":abi"): - lang = "abi" - body = stripped[4:].strip() - elif stripped.startswith(":raw"): - lang = "raw" - body = stripped[4:].strip() - elif stripped.startswith("0x"): - lang = "hex" - body = stripped - else: - lang = "unknown" - body = stripped - - lines = body.split("\n") - if len(lines) > 30: - lines = lines[:30] + [f"... ({len(lines) - 30} more lines)"] - - comment_lines = [f" # Source: {lang}"] - for line in lines: - comment_lines.append(f" # {line}") - return "\n".join(comment_lines) - - -def _get_int_definitions( - addr_to_var: dict[Address | EOA, str] | None, -) -> dict[int, str]: - """ - Convert variable dictionary to int definitions used by the evm bytecode - parser. - """ - result: dict[int, str] = {} - if not addr_to_var: - return result - for k, v in addr_to_var.items(): - result[int.from_bytes(k, "big")] = v - return result - - -def _bytes_to_op_expr( - code_bytes: bytes, - addr_to_var: dict[Address | EOA, str] | None = None, -) -> str | None: - """Convert compiled bytecode to Op expression string.""" - if not code_bytes or len(code_bytes) > MAX_BYTECODE_OP_SIZE: - return None - - hex_str = code_bytes.hex() - if not hex_str: - return None - - try: - int_definitions = _get_int_definitions(addr_to_var) - op_str = process_evm_bytes_string( - hex_str, - assembly=False, - int_definitions=int_definitions, - ) - # Roundtrip check - compiled = eval( - op_str, {"Op": Op}, {v: k for k, v in int_definitions.items()} - ) # noqa: S307 - if compiled.hex() != hex_str.lower(): - return None - return op_str - except Exception: - return None - - -def _assign_variable_names( - model: StateStaticTest, tags: TagDict -) -> dict[Address | EOA, str]: - """Build address -> variable name mapping.""" - addr_to_var: dict[Address | EOA, str] = {} - contract_counter = 0 - - # Coinbase - coinbase_addr: Address | None = None - if isinstance(model.env.current_coinbase, Tag): - tag_name = model.env.current_coinbase.name - if tag_name in tags: - coinbase_addr = tags[tag_name] - else: - coinbase_addr = model.env.current_coinbase - - if coinbase_addr: - addr_to_var[coinbase_addr] = "coinbase" - - # Sender - sender_addr: Address | EOA | None = None - if isinstance(model.transaction.secret_key, SenderKeyTag): - tag_name = model.transaction.secret_key.name - if tag_name in tags: - sender_addr = tags[tag_name] - else: - # Non-tagged sender: derive address from key - sender_addr = EOA(key=model.transaction.secret_key) - - if sender_addr: - addr_to_var[sender_addr] = "sender" - - # Tagged pre-state accounts - for address_or_tag, _account in model.pre.root.items(): - if isinstance(address_or_tag, Tag): - tag_name = address_or_tag.name - if tag_name in tags: - addr = tags[tag_name] - if addr not in addr_to_var: - var_name = _sanitize_var_name( - tag_name, set(addr_to_var.values()) - ) - addr_to_var[addr] = var_name - - # Non-tagged pre-state accounts - for address_or_tag, _account in model.pre.root.items(): - if not isinstance(address_or_tag, Tag): - if address_or_tag not in addr_to_var: - var_name = f"contract_{contract_counter}" - contract_counter += 1 - addr_to_var[address_or_tag] = var_name - - # Transaction "to" address - if model.transaction.to is not None: - if isinstance(model.transaction.to, Tag): - tag_name = model.transaction.to.name - if tag_name in tags: - to_addr = tags[tag_name] - if to_addr not in addr_to_var: - var_name = _sanitize_var_name( - tag_name, set(addr_to_var.values()) - ) - addr_to_var[to_addr] = var_name - - return addr_to_var - - -def _sanitize_var_name(name: str, used: set[str]) -> str: - """Sanitize a tag name into a valid Python variable name.""" - var = re.sub(r"[^a-zA-Z0-9_]", "_", name) - var = re.sub(r"_+", "_", var).strip("_").lower() - if re.match(r"0x[0-9a-f]{40}", var): - # Some tagged tests use addresses as tags, which is confusing, remove - var = "addr" - if not var or var[0].isdigit(): - var = "addr_" + var - # Avoid Python keywords and builtins - _reserved = { - "type", - "hash", - "id", - "input", - "range", - "list", - "dict", - "return", - "class", - "def", - "for", - "if", - "else", - "elif", - "while", - "break", - "continue", - "pass", - "import", - "from", - "as", - "with", - "try", - "except", - "finally", - "raise", - "yield", - "lambda", - "global", - "nonlocal", - "assert", - "del", - "in", - "is", - "not", - "and", - "or", - "True", - "False", - "None", - "async", - "await", - "print", - "exec", - "eval", - "open", - "map", - "filter", - "set", - "bytes", - "int", - "str", - "float", - "bool", - "object", - "super", - "property", - "staticmethod", - "classmethod", - "abs", - "all", - "any", - "bin", - "hex", - "oct", - "len", - "max", - "min", - "pow", - "sum", - "zip", - } - if var in _reserved: - var = var + "_" - base = var - counter = 2 - while var in used: - var = f"{base}_{counter}" - counter += 1 - return var - - -def _addr_hex(addr: Address | EOA) -> str: - """Normalize an address-like value to hex string.""" - hex_str = str(addr)[2:].lstrip("0") - if hex_str == "": - hex_str = "0" - return f"0x{hex_str}" - - -def _build_sender_ir( - model: StateStaticTest, tags: TagDict -) -> tuple[SenderIR, str | None]: - """Build SenderIR and return (sender_ir, sender_tag_name).""" - if isinstance(model.transaction.secret_key, SenderKeyTag): - tag_name = model.transaction.secret_key.name - # Get the filler-derived key from tags (eoa_from_hash result) - resolved = tags.get(tag_name) - if isinstance(resolved, EOA): - key = resolved.key - assert key is not None - key_int = int.from_bytes(key, "big") - else: - key_int = 0 - # Find sender balance and nonce from pre-state - balance = 0 - nonce: int | None = None - for address_or_tag, account in model.pre.root.items(): - if isinstance(address_or_tag, SenderTag): - if address_or_tag.name == tag_name: - balance = int(account.balance) if account.balance else 0 - if account.nonce is not None: - nonce = int(account.nonce) - break - return ( - SenderIR( - is_tagged=False, key=key_int, balance=balance, nonce=nonce - ), - tag_name, - ) - else: - # Find sender balance and nonce from pre-state - eoa = EOA(key=model.transaction.secret_key) - sender_addr = _addr_hex(eoa) - balance = 0 - nonce = None - for address_or_tag, account in model.pre.root.items(): - if not isinstance(address_or_tag, Tag): - if _addr_hex(address_or_tag) == sender_addr: - balance = int(account.balance) if account.balance else 0 - if account.nonce is not None: - nonce = int(account.nonce) - break - return SenderIR( - is_tagged=False, - key=int.from_bytes(eoa.key, "big"), - balance=balance, - nonce=nonce, - ), None - - -def _build_parameters(model: StateStaticTest) -> list[ParameterCaseIR]: - """Build the (d, g, v) parameter matrix.""" - parameters: list[ParameterCaseIR] = [] - for d in model.transaction.data: - for g in range(len(model.transaction.gas_limit)): - for v in range(len(model.transaction.value)): - has_exc = False - for expect in model.expect: - if ( - expect.has_index(d.index, g, v) - and expect.expect_exception is not None - ): - has_exc = True - - # Build ID label (same logic as fill_function) - id_label = "" - if len(model.transaction.data) > 1 or d.label is not None: - if d.label is not None: - id_label = f"{d}" - else: - id_label = f"d{d}" - if len(model.transaction.gas_limit) > 1: - id_label += f"-g{g}" - if len(model.transaction.value) > 1: - id_label += f"-v{v}" - - marks = "pytest.mark.exception_test" if has_exc else None - - parameters.append( - ParameterCaseIR( - d=d.index, - g=g, - v=v, - has_exception=has_exc, - label=d.label, - id=id_label, - marks=marks, - ) - ) - return parameters - - -def _resolve_storage_values( - storage: dict[int, int], - addr_to_var: dict[Address | EOA, str], - imports: ImportsIR | None = None, -) -> dict[int, int | str]: - """Replace storage values matching known addresses with var names.""" - if not storage or not addr_to_var: - return storage - # Build int -> var_name lookup from addr_to_var - int_to_var: dict[int, str] = {} - for addr, var_name in addr_to_var.items(): - int_to_var[int.from_bytes(addr, "big")] = var_name - # Also build CREATE-derived address lookup - create_to_expr: dict[int, str] = {} - for addr, var_name in addr_to_var.items(): - for nonce in range(256): - created = compute_create_address(address=addr, nonce=nonce) - created_int = int.from_bytes(created, "big") - if created_int not in int_to_var: - create_to_expr[created_int] = ( - f"compute_create_address(address={var_name}," - f" nonce={nonce})" - ) - result: dict[int, int | str] = {} - for k, v in storage.items(): - if v in int_to_var: - result[k] = int_to_var[v] - elif v in create_to_expr: - if imports is not None: - imports.needs_compute_create_address = True - result[k] = create_to_expr[v] - else: - result[k] = v - return result - - -def _find_address_refs_in_bytecode( - code_bytes: bytes, - known_addresses: set[Address], -) -> dict[Address, int]: - """ - Find known addresses referenced in bytecode via PUSH. - - Return a mapping ``address -> minimum PUSH size observed``. - A push size < 20 means the baseline bytecode compiled the - address to fewer bytes (leading zero bytes); the referenced - contract must stay hardcoded so the compiler keeps emitting - the same short PUSH opcode and the trace stays aligned. - """ - refs: dict[Address, int] = {} - # Pre-compute int values for fast comparison - known_ints = {int.from_bytes(a, "big") for a in known_addresses} - i = 0 - while i < len(code_bytes): - opcode = code_bytes[i] - if 0x60 <= opcode <= 0x7F: # PUSH1..PUSH32 - push_size = opcode - 0x5F - push_data = code_bytes[i + 1 : i + 1 + push_size] - if len(push_data) == push_size: - # Addresses with leading zero bytes are compiled to - # a PUSH smaller than PUSH20 (down to PUSH1 for 1-byte - # addresses like 0x01). Match on int value against the - # known-address set — false positives would require a - # PUSHn that happens to push exactly a value already - # registered as a pre-state address, which is rare in - # practice. - val = int.from_bytes(push_data, "big") - if val in known_ints: - addr = Address(val) - if addr not in refs or push_size < refs[addr]: - refs[addr] = push_size - i += 1 + push_size - else: - i += 1 - return refs - - -def _topological_sort_contracts( - contract_addrs: list[Address], - deps: dict[Address, set[Address]], -) -> tuple[list[Address], set[Address]]: - """ - Return (sorted_addresses, cycle_addresses). - - If A's bytecode references B, B must be deployed before A. - """ - addr_set = set(contract_addrs) - # forward[B] = {A} means A depends on B, so B must come first - forward: dict[Address, set[Address]] = {a: set() for a in addr_set} # noqa: C420 - in_deg: dict[Address, int] = dict.fromkeys(addr_set, 0) - for a, dep_set in deps.items(): - if a not in addr_set: - continue - for b in dep_set: - if b in addr_set: - forward[b].add(a) - in_deg[a] += 1 - - # Kahn's algorithm - queue = [a for a in contract_addrs if in_deg[a] == 0] - sorted_addrs: list[Address] = [] - while queue: - node = queue.pop(0) - sorted_addrs.append(node) - for neighbor in forward[node]: - in_deg[neighbor] -= 1 - if in_deg[neighbor] == 0: - queue.append(neighbor) - - cycle_addrs = addr_set - set(sorted_addrs) - return sorted_addrs, cycle_addrs - - -def _build_accounts( - model: StateStaticTest, - tags: TagDict, - addr_to_var: dict[Address | EOA, str], - sender_tag_name: str | None, - imports: ImportsIR, - *, - force_hardcoded: bool = False, - coinbase_addr: Address | None = None, - pinned_eoa_addrs: set[Address] | None = None, -) -> list[AccountIR]: - """Build AccountIR list with dependency-ordered contracts.""" - if pinned_eoa_addrs is None: - pinned_eoa_addrs = set() - # ------------------------------------------------------------------ - # Pass 1: gather account metadata and compile bytecode (no Op yet) - # ------------------------------------------------------------------ - raw_accounts: list[AccountIR] = [] - # Map address -> compiled code_bytes for contracts (for dep analysis) - code_bytes_map: dict[Address, bytes] = {} - - for address_or_tag, account in model.pre.root.items(): - is_tagged = isinstance(address_or_tag, Tag) - # SenderTag type is always EOA, ContractTag is always contract - is_eoa = isinstance(address_or_tag, SenderTag) if is_tagged else False - is_sender = False - - if is_tagged: - tag_name = address_or_tag.name - if sender_tag_name and tag_name == sender_tag_name: - is_sender = True - is_eoa = True - resolved = tags.get(tag_name) - var_name = ( - addr_to_var.get(resolved, tag_name) - if resolved is not None - else tag_name - ) - address = resolved - else: - address_str = str(address_or_tag) - var_name = addr_to_var.get( - address_or_tag, f"addr_{address_str[:10]}" - ) - # Check if this non-tagged address is the sender - if addr_to_var.get(address_or_tag) == "sender": - is_sender = True - is_eoa = True - address = address_or_tag - - assert not var_name.startswith("0x") - - # Determine if non-tagged account has code (is a contract) - has_code = account.code is not None and account.code.source.strip() - if not is_tagged and not is_eoa and not has_code: - # Non-tagged, no code — treat as EOA - is_eoa = True - - # Compile code but defer Op expression conversion - source_comment = "" - code_bytes: bytes = b"" - oversized_code = False - if has_code: - source_comment = _classify_code_source(account.code.source) - try: - code_bytes = account.code.compiled(tags) - if len(code_bytes) > MAX_BYTECODE_OP_SIZE: - oversized_code = True - except Exception as e: - warnings.warn( - f"Code compilation failed for {var_name}: {e}", - stacklevel=2, - ) - - # Storage - storage: dict[int, int | str] = {} - if account.storage and account.storage.root: - resolved_storage = account.storage.resolve(tags) - for k, v in resolved_storage.items(): - storage[int(k)] = int(v) - storage = _resolve_storage_values(storage, addr_to_var, imports) - - # Balance and nonce - balance = int(account.balance) if account.balance is not None else 0 - nonce = int(account.nonce) if account.nonce is not None else None - - acct_ir = AccountIR( - var_name=var_name, - is_tagged=is_tagged, - is_eoa=is_eoa, - is_sender=is_sender, - balance=balance, - nonce=nonce, - address=address, - source_comment=source_comment, - code_expr="", - storage=storage, - oversized_code=oversized_code, - use_dynamic=True, - ) - - # Oversized contracts must keep hardcoded address - if oversized_code: - acct_ir.use_dynamic = False - - # Coinbase account must keep hardcoded address so - # Environment(fee_recipient=coinbase) and the pre-state - # entry refer to the same address. - if ( - coinbase_addr is not None - and address is not None - and int.from_bytes(address, "big") - == int.from_bytes(coinbase_addr, "big") - ): - acct_ir.use_dynamic = False - - raw_accounts.append(acct_ir) - if code_bytes and address is not None: - code_bytes_map[address] = code_bytes - - # ------------------------------------------------------------------ - # Build dependency graph and topological sort for contracts - # ------------------------------------------------------------------ - known_contract_addrs: set[Address] = set() - for acct in raw_accounts: - if not acct.is_eoa and acct.address is not None: - known_contract_addrs.add(acct.address) - - # All known addresses (contracts + EOAs) for bytecode ref scanning - all_known_addrs: set[Address] = set() - for addr_or_eoa in addr_to_var: - if isinstance(addr_or_eoa, Address): - all_known_addrs.add(addr_or_eoa) - else: - all_known_addrs.add(Address(int.from_bytes(addr_or_eoa, "big"))) - - # Pre-state EOA addresses — used to recognise short-PUSH refs that - # point at funded EOAs (e.g. precompile addresses 0x01-0x10 listed - # as ```` in the filler) instead of contracts. - known_eoa_addrs: set[Address] = set() - for acct in raw_accounts: - if acct.is_eoa and acct.address is not None: - known_eoa_addrs.add(acct.address) - - deps: dict[Address, set[Address]] = {} - # Contract addresses referenced via PUSH<20 anywhere: baseline - # bytecode compiled them to a short PUSH because of leading zero - # bytes, so they must stay hardcoded to keep the opcode sequence - # aligned. - short_push_refs: set[Address] = set() - # EOA addresses referenced via PUSH<20 — pin those EOAs to their - # literal address so the funded account lands at the precompile - # (e.g. 0x01) instead of a random ``pre.fund_eoa`` address. - short_push_eoa_refs: set[Address] = set() - # True when a short-PUSH ref targets an address that is neither a - # pre-state contract nor a pre-state EOA (e.g. an external tag - # like only referenced from bytecode). No - # account can be pinned, so fall back to globally disabling - # dynamic addresses for the whole test. - short_push_unpinnable = False - for addr, cb in code_bytes_map.items(): - refs = _find_address_refs_in_bytecode(cb, all_known_addrs) - # Track deps on other contracts. Keep self-references — they - # create self-loops detected as cycles, forcing hardcoded addr. - deps[addr] = set(refs) & known_contract_addrs - for ref_addr, push_size in refs.items(): - if push_size < 20: - if ref_addr in known_contract_addrs: - short_push_refs.add(ref_addr) - elif ref_addr in known_eoa_addrs: - short_push_eoa_refs.add(ref_addr) - else: - short_push_unpinnable = True - - contract_addrs_ordered = [ - acct.address - for acct in raw_accounts - if not acct.is_eoa and acct.address is not None - ] - sorted_addrs, cycle_addrs = _topological_sort_contracts( - contract_addrs_ordered, deps - ) - - # Mark cycle contracts as non-dynamic, then propagate: any contract - # referenced by a non-dynamic contract must also be non-dynamic - # (because the non-dynamic bytecode contains the old address). - non_dynamic_addrs = set(cycle_addrs) - for acct in raw_accounts: - if acct.oversized_code and acct.address is not None: - non_dynamic_addrs.add(acct.address) - # Short-PUSH refs: pin the referenced contract so its address keeps - # the same leading-zero profile as baseline. - non_dynamic_addrs.update(short_push_refs) - - changed = True - while changed: - changed = False - for addr in list(non_dynamic_addrs): - for ref in deps.get(addr, set()): - if ( - ref not in non_dynamic_addrs - and ref in known_contract_addrs - ): - non_dynamic_addrs.add(ref) - changed = True - - for acct in raw_accounts: - if acct.address in non_dynamic_addrs: - acct.use_dynamic = False - - # Pin EOAs whose addresses are referenced via short PUSH so the - # funded account lands at the literal address (e.g. precompile - # 0x01) instead of a random ``pre.fund_eoa`` address. - for acct in raw_accounts: - if acct.address in short_push_eoa_refs: - acct.use_dynamic = False - - # Pin EOAs whose tags were hint-overridden into the precompile - # range. The override registered the literal address in - # ``addr_to_var`` so tx-data and post-state resolutions point at - # ``addr_X`` (a variable). The variable must hold the literal - # precompile address at runtime, not whatever ``pre.fund_eoa`` - # picks. - for acct in raw_accounts: - if acct.address in pinned_eoa_addrs: - acct.use_dynamic = False - - # ------------------------------------------------------------------ - # Pass 2: convert bytecode to Op expressions - # ------------------------------------------------------------------ - # Collect all address variable names for arithmetic detection - addr_var_names = set(addr_to_var.values()) - - for acct in raw_accounts: - cb = code_bytes_map.get(acct.address) if acct.address else None - if not cb: - continue - try: - if acct.use_dynamic: - # Try with addr_to_var for symbolic references - op_expr = _bytes_to_op_expr(cb, addr_to_var) - if op_expr is None: - # Fallback: without addr_to_var (keep dynamic) - op_expr = _bytes_to_op_expr(cb) - else: - op_expr = _bytes_to_op_expr(cb) - - if op_expr: - acct.code_expr = op_expr - imports.needs_op = True - elif cb: - acct.code_expr = f'bytes.fromhex("{cb.hex()}")' - except Exception: - acct.code_expr = 'b""' - - # ------------------------------------------------------------------ - # Check for address variables used in arithmetic operations. - # Pattern: Op.ADD(contract_0, ...) means contracts are at - # sequential addresses and cannot be dynamically assigned. - # If found, disable dynamic for ALL contracts. - # ------------------------------------------------------------------ - arith_ops = {"Op.ADD(", "Op.SUB(", "Op.MUL(", "Op.DIV("} - has_addr_arithmetic = False - for acct in raw_accounts: - if not acct.code_expr: - continue - for var_name in addr_var_names: - for arith_op in arith_ops: - if f"{arith_op}{var_name}" in acct.code_expr: - has_addr_arithmetic = True - break - if has_addr_arithmetic: - break - if has_addr_arithmetic: - break - - # ------------------------------------------------------------------ - # Computed call targets: CALL/STATICCALL/DELEGATECALL/CALLCODE - # receiving `address=` from arithmetic or memory reads. Tests that - # do this usually rely on specific pre-state contract addresses - # (dispatch-by-offset) and won't survive dynamic allocation. - # ------------------------------------------------------------------ - computed_addr_patterns = ( - "address=Op.ADD(", - "address=Op.SUB(", - "address=Op.MUL(", - "address=Op.DIV(", - "address=Op.MOD(", - "address=Op.MLOAD(", - "address=Op.SLOAD(", - "address=Op.CALLDATALOAD(", - ) - has_computed_call_target = False - for acct in raw_accounts: - if not acct.code_expr: - continue - for pat in computed_addr_patterns: - if pat in acct.code_expr: - has_computed_call_target = True - break - if has_computed_call_target: - break - - if ( - has_addr_arithmetic - or short_push_unpinnable - or has_computed_call_target - or force_hardcoded - ): - # Disable dynamic for all contracts and re-generate Op - # expressions without addr_to_var. Triggers: - # * address arithmetic (Op.ADD(var, ...)) assumes sequential - # addresses that dynamic allocation can't preserve. - # * a short-PUSH ref that points outside the pre-state has no - # contract to pin, so the whole test must keep the filler's - # resolved addresses. - # * computed call targets (CALL with address=Op.ADD/MLOAD/ - # CALLDATALOAD/...) dispatch by baseline-relative offsets. - # * the test is on the FORCE_HARDCODED_TESTS allowlist — we've - # accepted that it can't converge under exact-no-stack with - # dynamic addresses (see module docstring on that set). - for acct in raw_accounts: - if not acct.is_eoa: - acct.use_dynamic = False - cb = code_bytes_map.get(acct.address) if acct.address else None - if not cb: - continue - try: - op_expr = _bytes_to_op_expr(cb) - if op_expr: - acct.code_expr = op_expr - elif cb: - acct.code_expr = f'bytes.fromhex("{cb.hex()}")' - except Exception: - acct.code_expr = 'b""' - - # ------------------------------------------------------------------ - # Reorder: EOAs first (filler order), then contracts (topo order) - # ------------------------------------------------------------------ - eoa_accounts = [a for a in raw_accounts if a.is_eoa] - contract_by_addr = {a.address: a for a in raw_accounts if not a.is_eoa} - # Sorted contracts first, then any cycle contracts in filler order - ordered_contracts: list[AccountIR] = [] - for addr in sorted_addrs: - if addr in contract_by_addr: - ordered_contracts.append(contract_by_addr[addr]) - # Append cycle contracts (non-dynamic) in their original filler order - for acct in raw_accounts: - if not acct.is_eoa and acct.address in cycle_addrs: - ordered_contracts.append(acct) - - return eoa_accounts + ordered_contracts - - -def _build_environment( - model: StateStaticTest, - tags: TagDict, - addr_to_var: dict[Address | EOA, str], -) -> EnvironmentIR: - """Build EnvironmentIR.""" - # Resolve coinbase - if isinstance(model.env.current_coinbase, Tag): - tag_name = model.env.current_coinbase.name - resolved = tags.get(tag_name) - coinbase_var = ( - addr_to_var.get(resolved, tag_name) if resolved else tag_name - ) - else: - coinbase_var = addr_to_var.get(model.env.current_coinbase, "coinbase") - - return EnvironmentIR( - coinbase_var=coinbase_var, - number=int(model.env.current_number), - timestamp=int(model.env.current_timestamp), - difficulty=( - int(model.env.current_difficulty) - if model.env.current_difficulty is not None - else None - ), - prev_randao=( - int(model.env.current_random) - if model.env.current_random is not None - else None - ), - base_fee_per_gas=( - int(model.env.current_base_fee) - if model.env.current_base_fee is not None - else None - ), - excess_blob_gas=( - int(model.env.current_excess_blob_gas) - if model.env.current_excess_blob_gas is not None - else None - ), - gas_limit=int(model.env.current_gas_limit), - ) - - -def _fork_set_to_constraints( - fork_set: ForkSet, all_fork_names: list[str] -) -> list[str]: - """Reconstruct constraint strings from an expanded ForkSet.""" - set_fork_names = sorted( - [str(f) for f in fork_set], - key=lambda f: all_fork_names.index(f) if f in all_fork_names else 999, - ) - - if not set_fork_names: - return [] - - if len(set_fork_names) == 1: - return [set_fork_names[0]] - - # Try to detect contiguous ranges - groups: list[list[str]] = [] - group: list[str] = [set_fork_names[0]] - for i in range(1, len(set_fork_names)): - curr_idx = all_fork_names.index(set_fork_names[i]) - prev_idx = all_fork_names.index(set_fork_names[i - 1]) - if curr_idx == prev_idx + 1: - group.append(set_fork_names[i]) - else: - groups.append(group) - group = [set_fork_names[i]] - groups.append(group) - - constraints: list[str] = [] - for g in groups: - if len(g) == 1: - constraints.append(g[0]) - else: - last_idx = all_fork_names.index(g[-1]) - if last_idx == len(all_fork_names) - 1: - constraints.append(f">={g[0]}") - else: - next_fork = all_fork_names[last_idx + 1] - constraints.append(f">={g[0]}<{next_fork}") - return constraints - - -def _format_exception_value( - exc: Any, -) -> str: - """Format a TransactionException value as a Python expression string.""" - if isinstance(exc, list): - parts = [f"TransactionException.{e.name}" for e in exc] - return "[" + ", ".join(parts) + "]" - if isinstance(exc, TransactionException): - return f"TransactionException.{exc.name}" - return str(exc) - - -def _build_expect_entries( - model: StateStaticTest, - tags: TagDict, - addr_to_var: dict[Address | EOA, str], - all_fork_names: list[str], - imports: ImportsIR, -) -> list[ExpectEntryIR]: - """Build ExpectEntryIR list.""" - entries: list[ExpectEntryIR] = [] - - for expect in model.expect: - # Indexes - indexes = { - "data": expect.indexes.data, - "gas": expect.indexes.gas, - "value": expect.indexes.value, - } - - # Network constraints - network = _fork_set_to_constraints(expect.network, all_fork_names) - - # Result: resolve and map to assertions - result_assertions: list[AccountAssertionIR] = [] - for address_or_tag, account_expect in expect.result.root.items(): - if isinstance(address_or_tag, Tag): - # Use resolve() for all tags — handles CreateTag's - # address derivation (compute_create_address etc.) - try: - addr = address_or_tag.resolve(tags) - var_ref = _resolve_address(addr, addr_to_var, imports) - except (KeyError, AssertionError): - tag_name = address_or_tag.name - addr = tags.get(tag_name, tag_name) - assert not isinstance(addr, str) - var_ref = _resolve_address(addr, addr_to_var, imports) - else: - var_ref = _resolve_address( - address_or_tag, addr_to_var, imports - ) - - if account_expect is None: - # shouldnotexist - result_assertions.append( - AccountAssertionIR( - var_ref=var_ref, - should_not_exist=True, - ) - ) - continue - - # Storage (including ANY keys) - storage: dict[int, int | str] | None = None - storage_any_keys: list[int] = [] - if account_expect.storage is not None: - storage = {} - resolved_storage = account_expect.storage.resolve(tags) - for k, v in resolved_storage.items(): - storage[int(k)] = int(v) - storage = _resolve_storage_values( - storage, addr_to_var, imports - ) - # Capture ANY keys from _any_map - if hasattr(resolved_storage, "_any_map"): - for k in resolved_storage._any_map: - storage_any_keys.append(int(k)) - - # Code - code: bytes | None = None - if account_expect.code is not None: - try: - code = account_expect.code.compiled(tags) - except Exception: - pass - - result_assertions.append( - AccountAssertionIR( - var_ref=var_ref, - storage=storage, - storage_any_keys=storage_any_keys, - code=code, - balance=( - int(account_expect.balance) - if account_expect.balance is not None - else None - ), - nonce=( - int(account_expect.nonce) - if account_expect.nonce is not None - else None - ), - ) - ) - - # Exception - expect_exc: dict[str, str] | None = None - if expect.expect_exception is not None: - expect_exc = {} - for fork_set_key in expect.expect_exception: - constraint_strs = _fork_set_to_constraints( - fork_set_key, all_fork_names - ) - constraint_key = ",".join(constraint_strs) - exc_value = expect.expect_exception.root[fork_set_key] - expect_exc[constraint_key] = _format_exception_value(exc_value) - - entries.append( - ExpectEntryIR( - indexes=indexes, - network=network, - result=result_assertions, - expect_exception=expect_exc, - ) - ) - - return entries - - -def _build_transaction_ir( - model: StateStaticTest, - tags: TagDict, - addr_to_var: dict[Address | EOA, str], - tx_data: list[str], - tx_gas: list[int], - tx_value: list[int], - is_multi_case: bool, - imports: ImportsIR, -) -> tuple[TransactionIR, list[AccessListEntryIR]]: - """Build TransactionIR. Return (transaction_ir, access_list_entries).""" - # Resolve "to" - to_var: str | None = None - to_is_none = False - if model.transaction.to is None: - to_is_none = True - elif isinstance(model.transaction.to, Tag): - tag_name = model.transaction.to.name - resolved = tags.get(tag_name) - if resolved: - to_var = addr_to_var.get(resolved, tag_name) - else: - to_var = tag_name - else: - to_var = _resolve_address(model.transaction.to, addr_to_var, imports) - - # Access lists — check if they vary per data entry - access_list_entries: list[AccessListEntryIR] = [] - per_data_access_lists: dict[int, list[AccessListEntryIR]] | None = None - - def _resolve_access_list(data_box_al): - entries = [] - for al_entry in data_box_al: - if isinstance(al_entry.address, Tag): - resolved_al = al_entry.address.resolve(tags) - al_address = Address(resolved_al) - else: - al_address = al_entry.address - # Try to resolve to variable name - var_name = addr_to_var.get(al_address) - if var_name: - al_addr_str = var_name - al_dynamic = True - else: - al_addr_str = str(al_address) - al_dynamic = False - al_keys = [str(k) for k in al_entry.storage_keys] - entries.append( - AccessListEntryIR( - address=al_addr_str, - storage_keys=al_keys, - use_dynamic=al_dynamic, - ) - ) - return entries - - # Check if any data entry has access lists - has_any_al = any( - model.transaction.data[d.index].access_list is not None - for d in model.transaction.data - ) - if has_any_al and is_multi_case: - # Build per-data access list map. - # Include entries where access_list is not None (even if empty []) - # because access_list=[] makes the tx type-2 (EIP-2930), while - # access_list=None keeps it legacy. - per_data_al: dict[int, list[AccessListEntryIR]] = {} - for d in model.transaction.data: - data_box = model.transaction.data[d.index] - if data_box.access_list is not None: - per_data_al[d.index] = _resolve_access_list( - data_box.access_list - ) - if per_data_al: - per_data_access_lists = per_data_al - elif has_any_al: - # Single-case: use first data entry's access list - first_data = model.transaction.data[0] - if first_data.access_list is not None: - access_list_entries = _resolve_access_list(first_data.access_list) - - # Blob versioned hashes - blob_hashes: list[str] | None = None - if model.transaction.blob_versioned_hashes is not None: - blob_hashes = [str(h) for h in model.transaction.blob_versioned_hashes] - - # Single-case inlines - data_inline: str | None = None - gas_limit_single: int | None = None - value_single: int | None = None - if not is_multi_case: - if tx_data and tx_data[0]: - data_inline = tx_data[0] - else: - data_inline = "b''" - gas_limit_single = tx_gas[0] if tx_gas else 21000 - value_single = tx_value[0] if tx_value else 0 - - return ( - TransactionIR( - to_var=to_var, - to_is_none=to_is_none, - gas_price=( - int(model.transaction.gas_price) - if model.transaction.gas_price is not None - else None - ), - max_fee_per_gas=( - int(model.transaction.max_fee_per_gas) - if model.transaction.max_fee_per_gas is not None - else None - ), - max_priority_fee_per_gas=( - int(model.transaction.max_priority_fee_per_gas) - if model.transaction.max_priority_fee_per_gas is not None - else None - ), - max_fee_per_blob_gas=( - int(model.transaction.max_fee_per_blob_gas) - if model.transaction.max_fee_per_blob_gas is not None - else None - ), - blob_versioned_hashes=blob_hashes, - nonce=( - int(model.transaction.nonce) - if model.transaction.nonce is not None - else None - ), - access_list=access_list_entries if has_any_al else None, - per_data_access_lists=per_data_access_lists, - data_inline=data_inline, - gas_limit=gas_limit_single, - value=value_single, - ), - access_list_entries, - ) - - -def _build_address_constants( - model: StateStaticTest, - tags: TagDict, - addr_to_var: dict[Address | EOA, str], - sender_tag_name: str | None, - accounts: list[AccountIR], -) -> list[dict[str, str]]: - """Build list of address constants for the function body.""" - constants: list[dict[str, str]] = [] - seen: set[Address | EOA] = set() - - # Collect addresses of dynamic EOAs — these are handled by - # pre.fund_eoa() in the accounts section, not as constants. - dynamic_eoa_addrs: set[Address | EOA] = set() - for acct in accounts: - if acct.is_eoa and acct.use_dynamic and acct.address is not None: - dynamic_eoa_addrs.add(acct.address) - - # Coinbase (tagged or not) — always keep as hardcoded constant - if isinstance(model.env.current_coinbase, Tag): - tag_name = model.env.current_coinbase.name - resolved = tags.get(tag_name) - if resolved: - var_name = addr_to_var.get(resolved, "coinbase") - if var_name != "sender" and resolved not in seen: - constants.append({"var_name": var_name, "hex": f"{resolved}"}) - seen.add(resolved) - else: - addr = model.env.current_coinbase - var_name = addr_to_var.get(model.env.current_coinbase) - if var_name and var_name != "sender" and addr not in seen: - constants.append({"var_name": var_name, "hex": f"{addr}"}) - seen.add(addr) - - # All non-sender, non-contract pre-state accounts (tagged or not) - for address_or_tag, _acct in model.pre.root.items(): - if isinstance(address_or_tag, Tag): - tag_name = address_or_tag.name - # Skip sender - if sender_tag_name and tag_name == sender_tag_name: - continue - # Skip ContractTag accounts (they get address via deploy_contract) - # SenderTag accounts are EOAs even if they have code - if isinstance(address_or_tag, ContractTag): - continue - resolved = tags.get(tag_name) - if resolved: - # Skip dynamic EOAs (handled by fund_eoa) - if resolved in dynamic_eoa_addrs: - continue - var_name = addr_to_var.get(resolved, tag_name) - if resolved not in seen and var_name != "coinbase": - constants.append( - {"var_name": var_name, "hex": f"{resolved}"} - ) - seen.add(resolved) - else: - # Skip dynamic EOAs (handled by fund_eoa) - if address_or_tag in dynamic_eoa_addrs: - continue - var_name = addr_to_var.get(address_or_tag) - if ( - var_name - and var_name != "sender" - and var_name != "coinbase" - and address_or_tag not in seen - ): - constants.append( - {"var_name": var_name, "hex": f"{address_or_tag}"} - ) - seen.add(address_or_tag) - - return constants - - -def _decode_tx_data_word( - data: bytes, addr_to_var: dict[Address | EOA, str], imports: ImportsIR -) -> str: - """ - Attempt to decode a single word of 32 or 20 bytes from the transaction - data into meaningful information. - """ - addr_var: str | None = None - if len(data.lstrip(b"\x00")) <= 20: - maybe_addr = Address(int.from_bytes(data, "big")) - if maybe_addr in addr_to_var: - addr_var = addr_to_var[maybe_addr] - - if len(data) == 32 or len(data) == 20: - if addr_var: - if len(data) == 20: - return addr_var - else: - imports.needs_hash = True - return f"Hash({addr_var}, left_padding=True)" - else: - if len(data) == 32: - imports.needs_hash = True - hex_type = "Hash" - else: - hex_type = "Address" - hex_string = data.hex().lstrip("0") - if len(hex_string) == 0: - hex_string = "0" - return f"{hex_type}(0x{hex_string})" - else: - imports.needs_bytes = True - hex_string = data.hex() - return f'Bytes("{hex_string}")' - - -def _decode_tx_data( - data: bytes, - addr_to_var: dict[Address | EOA, str], - probably_bytecode: bool, - imports: ImportsIR, -) -> str: - """Attempt to decode meaningful information from the transaction data.""" - if probably_bytecode: - bytecode = _bytes_to_op_expr(data, addr_to_var) - if bytecode: - imports.needs_op = True - return bytecode - decoded_words: list[str] = [] - if len(data) > 0 and len(data) % 32 in (0, 4): - if len(data) % 32 == 4: - decoded_words.append( - _decode_tx_data_word(data[:4], addr_to_var, imports) - ) - offset = 4 if len(data) % 32 == 4 else 0 - for i in range(offset, len(data), 32): - decoded_words.append( - _decode_tx_data_word(data[i : i + 32], addr_to_var, imports) - ) - else: - return _decode_tx_data_word(data, addr_to_var, imports) - return " + ".join(decoded_words) - - -def _build_tx_arrays( - tx: GeneralTransactionInFiller, - tags: TagDict, - addr_to_var: dict[Address | EOA, str], - probably_bytecode: bool, - imports: ImportsIR, -) -> tuple[list[str], list[int], list[int]]: - """Build the list of data that goes in each transaction.""" - tx_data: list[str] = [] - for d_entry in tx.data: - data_box = tx.data[d_entry.index] - compiled = data_box.data.compiled(tags) - tx_data.append( - _decode_tx_data(compiled, addr_to_var, probably_bytecode, imports) - ) - - tx_gas = [int(g) for g in tx.gas_limit] - tx_value = [int(v) for v in tx.value] - return tx_data, tx_gas, tx_value - - -def _resolve_address( - addr: Address, - addr_to_var: dict[Address | EOA, str], - imports: ImportsIR, -) -> str: - """ - Return a variable reference if the address or an address derived from it - is contained in the `addr_to_var` dictionary. - - Fallbacks to returning f"Address({addr})". - """ - for var_addr, var in addr_to_var.items(): - if addr == var_addr: - return var - # Check if the address is the result of contract creation from a known - # address. Use a larger range to cover high-nonce senders. - for var_addr, var in addr_to_var.items(): - for nonce in range(10000): - if addr == compute_create_address(address=var_addr, nonce=nonce): - imports.needs_compute_create_address = True - return f"compute_create_address(address={var}, nonce={nonce})" - - # Nested CREATE: address created by a contract that was itself created - # by a known address (2 levels deep, small nonce range to keep - # generation fast — most contracts CREATE only a few children). - for var_addr, var in addr_to_var.items(): - for n1 in range(16): - child = compute_create_address(address=var_addr, nonce=n1) - for n2 in range(16): - if addr == compute_create_address(address=child, nonce=n2): - imports.needs_compute_create_address = True - return ( - f"compute_create_address(" - f"address=compute_create_address(" - f"address={var}, nonce={n1}), nonce={n2})" - ) - - return f"Address({addr})" diff --git a/scripts/filler_to_python/ir.py b/scripts/filler_to_python/ir.py deleted file mode 100644 index 18214cf9cb1..00000000000 --- a/scripts/filler_to_python/ir.py +++ /dev/null @@ -1,158 +0,0 @@ -"""Intermediate Representation dataclasses for filler-to-python codegen.""" - -from __future__ import annotations - -from dataclasses import dataclass, field - -from execution_testing.base_types import Address - - -@dataclass -class EnvironmentIR: - """IR for the test environment.""" - - coinbase_var: str - number: int - timestamp: int - difficulty: int | None = None - prev_randao: int | None = None - base_fee_per_gas: int | None = None - excess_blob_gas: int | None = None - gas_limit: int = 0 - - -@dataclass -class AccountIR: - """IR for a pre-state account.""" - - var_name: str - is_tagged: bool - is_eoa: bool - is_sender: bool - balance: int = 0 - nonce: int | None = None - address: Address | None = None - source_comment: str = "" - code_expr: str = "" - storage: dict = field(default_factory=dict) - oversized_code: bool = False - use_dynamic: bool = True - - -@dataclass -class AccountAssertionIR: - """IR for a post-state account assertion.""" - - var_ref: str - storage: dict | None = None - storage_any_keys: list = field(default_factory=list) - code: bytes | None = None - balance: int | None = None - nonce: int | None = None - should_not_exist: bool = False - - -@dataclass -class ExpectEntryIR: - """IR for one filler expect section.""" - - indexes: dict = field(default_factory=dict) - network: list = field(default_factory=list) - result: list = field(default_factory=list) - expect_exception: dict | None = None - - -@dataclass -class ParameterCaseIR: - """IR for one (d, g, v) parameter combo.""" - - d: int = 0 - g: int = 0 - v: int = 0 - has_exception: bool = False - label: str | None = None - id: str = "" - marks: str | None = None - - -@dataclass -class AccessListEntryIR: - """IR for a single access list entry.""" - - address: str = "" - storage_keys: list = field(default_factory=list) - use_dynamic: bool = False - - -@dataclass -class TransactionIR: - """IR for the transaction.""" - - to_var: str | None = None - to_is_none: bool = False - gas_price: int | None = None - max_fee_per_gas: int | None = None - max_priority_fee_per_gas: int | None = None - max_fee_per_blob_gas: int | None = None - blob_versioned_hashes: list | None = None - nonce: int | None = None - access_list: list | None = None - per_data_access_lists: dict | None = None - data_inline: str | None = None - gas_limit: int | None = None - value: int | None = None - - -@dataclass -class SenderIR: - """IR for the transaction sender.""" - - is_tagged: bool = False - key: int | None = None - balance: int = 0 - nonce: int | None = None - not_in_pre: bool = False - use_dynamic: bool = True - - -@dataclass -class ImportsIR: - """List of import requirements for the test.""" - - needs_op: bool = False - needs_access_list: bool = False - needs_bytes: bool = False - needs_hash: bool = False - needs_tx_exception: bool = False - needs_compute_create_address: bool = False - - -@dataclass -class IntermediateTestModel: - """Complete IR for one test file.""" - - test_name: str = "" - filler_path: str = "" - filler_comment: str = "" - category: str = "" - valid_from: str = "" - valid_until: str | None = None - is_slow: bool = False - is_multi_case: bool = False - is_fork_dependent: bool = False - needs_mutable_pre: bool = False - environment: EnvironmentIR = field( - default_factory=lambda: EnvironmentIR( - coinbase_var="coinbase", number=0, timestamp=0 - ) - ) - accounts: list = field(default_factory=list) - sender: SenderIR = field(default_factory=SenderIR) - parameters: list = field(default_factory=list) - transaction: TransactionIR = field(default_factory=TransactionIR) - expect_entries: list = field(default_factory=list) - address_constants: list = field(default_factory=list) - tx_data: list = field(default_factory=list) - tx_gas: list = field(default_factory=list) - tx_value: list = field(default_factory=list) - imports: ImportsIR = field(default_factory=ImportsIR) diff --git a/scripts/filler_to_python/render.py b/scripts/filler_to_python/render.py deleted file mode 100644 index 000abe511f5..00000000000 --- a/scripts/filler_to_python/render.py +++ /dev/null @@ -1,295 +0,0 @@ -"""Jinja2 rendering for filler-to-python codegen.""" - -from __future__ import annotations - -from dataclasses import asdict -from pathlib import Path - -import jinja2 - -from .ir import AccountAssertionIR, IntermediateTestModel - -TEMPLATE_DIR = Path(__file__).parent / "templates" - - -# --------------------------------------------------------------------------- -# Custom Jinja2 filters -# --------------------------------------------------------------------------- - - -def format_int(v: int | None) -> str: - """Format an integer as Python literal: hex for large values.""" - if v is None: - return "0" - if isinstance(v, bool): - return str(v) - v = int(v) - if v > 0xFFFF: - return hex(v) - return str(v) - - -def format_hex(v: int | str) -> str: - """Always format as hex.""" - if isinstance(v, str): - return v - return hex(int(v)) - - -def format_storage(d: dict) -> str: - """Format a {slot: value} storage dict as Python literal.""" - if not d: - return "{}" - items = [] - for k in sorted(d.keys()): - v = d[k] - if isinstance(v, str): - items.append(f"{format_int(k)}: {v}") - else: - items.append(f"{format_int(k)}: {format_int(v)}") - single = "{" + ", ".join(items) + "}" - if len(single) <= 50: - return single - formatted = ",\n ".join(items) - return "{\n " + formatted + ",\n }" - - -def format_account(a: AccountAssertionIR) -> str: - """Format an AccountAssertionIR as Account(...) expression.""" - if a.should_not_exist: - return "Account.NONEXISTENT" - - parts: list[str] = [] - if a.storage is not None: - if a.storage_any_keys: - # Need Storage object with set_expect_any calls - storage_str = format_storage(a.storage) - any_keys = a.storage_any_keys - parts.append( - f"storage=_storage_with_any({storage_str}, {any_keys})" - ) - else: - parts.append(f"storage={format_storage(a.storage)}") - if a.code is not None: - if a.code: - parts.append(f'code=bytes.fromhex("{a.code.hex()}")') - else: - parts.append('code=b""') - if a.balance is not None: - parts.append(f"balance={format_int(a.balance)}") - if a.nonce is not None: - parts.append(f"nonce={a.nonce}") - - if not parts: - return "Account()" - single = "Account(" + ", ".join(parts) + ")" - if len(single) <= 60: - return single - inner = ",\n ".join(parts) - return "Account(\n " + inner + ",\n )" - - -def format_post(result: list) -> str: - """Format a list of AccountAssertionIR as a post dict literal.""" - if not result: - return "{}" - - entries: list[str] = [] - for a in result: - entries.append(f"{a.var_ref}: {format_account(a)}") - - if len(entries) == 1: - single = "{" + entries[0] + "}" - if len(single) <= 70: - return single - - inner = ",\n ".join(entries) - return "{\n " + inner + ",\n }" - - -def format_expect_exception(d: dict) -> str: - """Format expect_exception dict with unquoted exception values.""" - items = [] - for k, v in d.items(): - items.append(f'"{k}": {v}') - return "{" + ", ".join(items) + "}" - - -def wrap_op_chain(s: str, indent: int = 8) -> str: - """Split an Op chain at + boundaries to fit 79-char lines.""" - if not s: - return '""' - - prefix = " " * indent - # If it fits on one line, just return it - if len(prefix + s) <= 79: - return s - - # If it's a bytes.fromhex expression, just return it (will get noqa) - if s.startswith("bytes.fromhex("): - return s - - # Split at " + " - parts = s.split(" + ") - if len(parts) <= 1: - return s - - lines: list[str] = [] - current_line = parts[0] - for part in parts[1:]: - candidate = current_line + " + " + part - if len(prefix + candidate) <= 79: - current_line = candidate - else: - lines.append(current_line) - current_line = part - - lines.append(current_line) - - if len(lines) == 1: - return lines[0] - - joiner = "\n" + prefix + "+ " - return lines[0] + joiner + joiner.join(lines[1:]) - - -# --------------------------------------------------------------------------- -# Template rendering -# --------------------------------------------------------------------------- - - -def _build_template_env() -> jinja2.Environment: - """Create and configure the Jinja2 environment.""" - env = jinja2.Environment( - loader=jinja2.FileSystemLoader(str(TEMPLATE_DIR)), - keep_trailing_newline=True, - trim_blocks=True, - lstrip_blocks=True, - ) - env.filters["format_int"] = format_int - env.filters["format_hex"] = format_hex - env.filters["format_storage"] = format_storage - env.filters["format_account"] = format_account - env.filters["format_post"] = format_post - env.filters["format_expect_exception"] = format_expect_exception - env.filters["wrap_op_chain"] = wrap_op_chain - return env - - -_template_env = _build_template_env() - - -def render_test(ir: IntermediateTestModel) -> str: - """Render a Python test file from an IR model.""" - template = _template_env.get_template("state_test.py.j2") - - # Build short docstring (first sentence of filler comment) - short_docstring = ir.filler_comment or ir.test_name - if "." in short_docstring: - short_docstring = short_docstring[: short_docstring.index(".") + 1] - if len(short_docstring) > 70: - # Truncate at word boundary - truncated = short_docstring[:67] - last_space = truncated.rfind(" ") - if last_space > 40: - truncated = truncated[:last_space] - short_docstring = truncated + "..." - # Ensure ends with period (D400/D415) - if not short_docstring.endswith("."): - short_docstring += "." - # Capitalize first letter (D403), avoid "This" (D404) - if short_docstring and short_docstring[0].islower(): - short_docstring = short_docstring[0].upper() + short_docstring[1:] - if short_docstring.startswith("This "): - short_docstring = "Test: t" + short_docstring[2:] - # Escape any quotes - short_docstring = short_docstring.replace('"', '\\"') - - # Build docstring — ensure first line ends with period (D400/D415) - docstring = ir.filler_comment or ir.test_name - first_line = docstring.split("\n")[0] - if not first_line.rstrip().endswith("."): - docstring = ( - first_line.rstrip() + ".\n" + "\n".join(docstring.split("\n")[1:]) - ) - docstring = docstring.rstrip() - # Capitalize first letter (D403) and avoid starting with "This" (D404) - if docstring and docstring[0].islower(): - docstring = docstring[0].upper() + docstring[1:] - if docstring.startswith("This "): - docstring = "Test: " + docstring[0].lower() + docstring[1:] - # Ensure all docstring lines fit 79 chars. - # First line must end with period (D400), so truncate if needed. - import textwrap - - doc_lines = docstring.split("\n") - first = doc_lines[0] - if len(first) > 75: - # Truncate at word boundary, add period - trunc = first[:72] - sp = trunc.rfind(" ") - if sp > 40: - trunc = trunc[:sp] - first = trunc + "..." - if not first.endswith("."): - first += "." - doc_lines[0] = first - # Ensure blank line after first line so D400 only checks line 1 - if len(doc_lines) > 1 and doc_lines[1].strip(): - doc_lines.insert(1, "") - wrapped_lines: list[str] = [doc_lines[0]] - for line in doc_lines[1:]: - if len(line) > 79: - wrapped_lines.extend(textwrap.wrap(line, width=79)) - else: - wrapped_lines.append(line) - docstring = "\n".join(wrapped_lines) - - # Has exceptions? - has_exceptions = any(p.has_exception for p in ir.parameters) - - # Needs _storage_with_any helper? - needs_storage_any = any( - a.storage_any_keys for entry in ir.expect_entries for a in entry.result - ) - - # Single-case post and error - single_post = None - single_error = None - if ir.expect_entries and len(ir.expect_entries) == 1: - entry = ir.expect_entries[0] - if entry.result: - single_post = entry.result - if entry.expect_exception: - exc_values = list(entry.expect_exception.values()) - if exc_values: - single_error = exc_values[0] - - context = { - "docstring": docstring, - "filler_path": ir.filler_path, - "test_name": ir.test_name, - "short_docstring": short_docstring, - "valid_from": ir.valid_from, - "valid_until": ir.valid_until, - "is_slow": ir.is_slow, - "is_multi_case": ir.is_multi_case, - "is_fork_dependent": ir.is_fork_dependent, - "needs_mutable_pre": ir.needs_mutable_pre, - "has_exceptions": has_exceptions, - "env": ir.environment, - "accounts": ir.accounts, - "tx": ir.transaction, - "tx_data": ir.tx_data, - "tx_gas": ir.tx_gas, - "tx_value": ir.tx_value, - "expect_entries": ir.expect_entries, - "parameters": ir.parameters, - "sender": ir.sender, - "address_constants": ir.address_constants, - "needs_storage_any": needs_storage_any, - "single_post": single_post, - "single_error": single_error, - } | asdict(ir.imports) - - return template.render(**context) diff --git a/scripts/filler_to_python/templates/state_test.py.j2 b/scripts/filler_to_python/templates/state_test.py.j2 deleted file mode 100644 index 5f0e7559e1d..00000000000 --- a/scripts/filler_to_python/templates/state_test.py.j2 +++ /dev/null @@ -1,412 +0,0 @@ -{#- - Jinja2 template for generating Python test files from static fillers. - - Parametrize approach: always (d, g, v). - Transaction fields are looked up from module-level arrays: - tx_data[d], tx_gas[g], tx_value[v] - Post-state and exceptions are resolved at runtime: - resolve_expect_post(expect_entries_, d, g, v, fork) - - Context variables (from IntermediateTestModel via render.py): - - docstring str Module docstring (from _info.comment) - filler_path str Relative path to filler file - test_name str Python function name (test_xxx) - short_docstring str One-line docstring for the function - valid_from str Fork name (e.g., "Cancun") - valid_until str|None Fork name or None - is_slow bool Mark @pytest.mark.slow - is_multi_case bool len(parameters) > 1 - has_exceptions bool Any case has an exception - - needs_op bool Import Op - needs_tx_exception bool Import TransactionException - needs_access_list bool Import AccessList - needs_hash bool Import Hash - - env EnvironmentIR - accounts list[AccountIR] - transaction TransactionIR - - -- Module-level arrays (from filler transaction) -- - - tx_data list[str] Compiled data hex per d index - tx_gas list[int] Gas limit per g index - tx_value list[int] Value per v index - - -- Expect entries (from filler expect sections) -- - - expect_entries list[ExpectEntryIR] - Each has: .indexes (dict), .network (list[str]), - .result (dict: var_name -> Account assertion), - .expect_exception (dict | None) - Resolved from expect.result.resolve(tags). - Used at runtime by resolve_expect_post(). - - -- Parametrize (d, g, v) combos -- - - parameters list[ParameterCaseIR] - Each has: .d, .g, .v, .has_exception, .label - Built from data x gasLimit x value matrix. - - -- Single-case data (when not is_multi_case) -- - - single_post str|None Formatted post dict, or None if empty - single_error str|None Formatted error, or None - - -- Sender -- - - sender SenderIR .is_tagged, .key, .balance - address_constants list Non-tagged address variables - [{var_name, hex}] - - Custom filters: - format_int(v) Hex vs decimal heuristic - format_storage(d) Format {slot: value} dict - format_account(a) Format Account(storage=..., code=...) - format_post(post) Format post dict {addr: Account(...)} - wrap_op_chain(s, ind) Split Op chain at + for 79-char lines --#} -""" -{{ docstring }} - -Ported from: -{{ filler_path }} -""" - -import pytest -from execution_testing import ( - EOA, - Account, - Address, - Alloc, -{% if needs_bytes %} - Bytes, -{% endif %} - Environment, - StateTestFiller, - Transaction, -{% if needs_tx_exception %} - TransactionException, -{% endif %} -{% if needs_access_list %} - AccessList, -{% endif %} -{% if needs_hash %} - Hash, -{% endif %} -{% if needs_storage_any %} - Storage, -{% endif %} -{% if needs_compute_create_address %} - compute_create_address, -{% endif %} -) -{% if needs_op %} -from execution_testing.vm import Op -{% endif %} -{% if is_multi_case %} -from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post, -) -{% elif is_fork_dependent %} -from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( - resolve_expect_post_fork, -) -{% endif %} - -REFERENCE_SPEC_GIT_PATH = "N/A" -REFERENCE_SPEC_VERSION = "N/A" - -{% if needs_storage_any %} -def _storage_with_any(base: dict, any_keys: list) -> Storage: - """Create Storage with set_expect_any for specified keys.""" - s = Storage(base) - for k in any_keys: - s.set_expect_any(k) - return s - -{% endif %} - -@pytest.mark.ported_from( - ["{{ filler_path }}"], -) -@pytest.mark.valid_from("{{ valid_from }}") -{% if valid_until %} -@pytest.mark.valid_until("{{ valid_until }}") -{% endif %} -{% if is_slow %} -@pytest.mark.slow -{% endif %} -{% if is_multi_case %} -@pytest.mark.parametrize( - "d, g, v", - [ -{% for case in parameters %} - pytest.param( - {{ case.d }}, {{ case.g }}, {{ case.v }}, - id="{{ case.id }}", -{% if case.marks %} - marks={{ case.marks }}, -{% endif %} - ), -{% endfor %} - ], -) -{% endif %} -{% if has_exceptions and not is_multi_case %} -@pytest.mark.exception_test -{% endif %} -{% if needs_mutable_pre %} -@pytest.mark.pre_alloc_mutable -{% endif %} -def {{ test_name }}( - state_test: StateTestFiller, - pre: Alloc, -{% if is_multi_case %} - fork: Fork, - d: int, - g: int, - v: int, -{% elif is_fork_dependent %} - fork: Fork, -{% endif %} -) -> None: - """{{ short_docstring }}""" -{% for addr in address_constants %} - {{ addr.var_name }} = Address({{ addr.hex }}) -{% endfor %} -{% if sender.use_dynamic %} -{% if sender.nonce %} - sender = pre.fund_eoa(amount={{ sender.balance | format_int }}, nonce={{ sender.nonce }}) -{% else %} - sender = pre.fund_eoa(amount={{ sender.balance | format_int }}) -{% endif %} -{% elif sender.not_in_pre %} - sender = pre.fund_eoa(amount=0) -{% else %} - sender = EOA( - key={{ sender.key | format_int }} - ) -{% endif %} - - env = Environment( - fee_recipient={{ env.coinbase_var }}, - number={{ env.number }}, - timestamp={{ env.timestamp }}, -{% if env.prev_randao is not none %} - prev_randao={{ env.prev_randao | format_int }}, -{% endif %} -{% if env.difficulty is not none and env.prev_randao is none %} - difficulty={{ env.difficulty | format_int }}, -{% endif %} -{% if env.base_fee_per_gas is not none %} - base_fee_per_gas={{ env.base_fee_per_gas }}, -{% endif %} -{% if env.excess_blob_gas is not none %} - excess_blob_gas={{ env.excess_blob_gas | format_int }}, -{% endif %} - gas_limit={{ env.gas_limit }}, - ) - -{# Pre-state account setup #} -{% for account in accounts %} -{% if account.is_sender and sender.use_dynamic %} -{# Sender balance already set via pre.fund_eoa() above #} -{% elif account.is_sender %} - pre[sender] = Account(balance={{ account.balance | format_int }}{{ ", nonce=%d" | format(account.nonce) if account.nonce }}{{ ", storage=%s" | format(account.storage | format_storage) if account.storage }}{{ ", code=%s" | format(account.code_expr | wrap_op_chain(indent=8)) if account.code_expr }}) -{% elif account.is_eoa and account.use_dynamic %} - {{ account.var_name }} = pre.fund_eoa(amount={{ account.balance | format_int }}) # noqa: F841 -{% elif account.is_eoa %} - pre[{{ account.var_name }}] = Account(balance={{ account.balance | format_int }}{{ ", nonce=%d" | format(account.nonce) if account.nonce }}{{ ", storage=%s" | format(account.storage | format_storage) if account.storage }}{{ ", code=%s" | format(account.code_expr | wrap_op_chain(indent=8)) if account.code_expr }}) -{% else %} -{# Contract: source comment + deploy #} -{{ account.source_comment }} -{% if account.oversized_code %} - {{ account.var_name }} = Address({{ account.address }}) # oversized contract - pre[{{ account.var_name }}] = Account( - code={{ account.code_expr | wrap_op_chain(indent=8) }}, -{% if account.storage %} - storage={{ account.storage | format_storage }}, -{% endif %} -{% if account.balance %} - balance={{ account.balance | format_int }}, -{% endif %} -{% if account.nonce is not none %} - nonce={{ account.nonce }}, -{% endif %} - ) -{% else %} - {{ account.var_name }} = pre.deploy_contract( - code={{ account.code_expr | wrap_op_chain(indent=8) }}, -{% if account.storage %} - storage={{ account.storage | format_storage }}, -{% endif %} -{% if account.balance %} - balance={{ account.balance | format_int }}, -{% endif %} -{% if account.nonce is not none %} - nonce={{ account.nonce }}, -{% endif %} -{% if not account.use_dynamic %} - address=Address({{ account.address }}), # noqa: E501 -{% endif %} - ) -{% endif %} -{% endif %} -{% endfor %} - -{# Expect entries (used by resolve_expect_post at runtime) #} -{% if single_post %} -{# Post will be assigned below #} -{% elif is_multi_case or is_fork_dependent %} - expect_entries_: list[dict] = [ -{% for entry in expect_entries %} - { -{% if is_multi_case %} - "indexes": {{ entry.indexes }}, -{% endif %} - "network": {{ entry.network }}, - "result": {{ entry.result | format_post }}, -{% if entry.expect_exception %} - "expect_exception": {{ entry.expect_exception | format_expect_exception }}, -{% endif %} - }, -{% endfor %} - ] - -{% if is_multi_case %} - post, _exc = resolve_expect_post(expect_entries_, d, g, v, fork) -{% else %} - post, _exc = resolve_expect_post_fork(expect_entries_, fork) -{% endif %} -{% endif %} - -{% if is_multi_case %} -{# Case value arrays: tx fields indexed by d, g, v #} - tx_data = [ - {% for d in tx_data %} - {{ d }}, - {% endfor %} - ] - tx_gas = [{{ tx_gas | join(", ") }}] -{% if tx_value != [0] %} - tx_value = [{{ tx_value | join(", ") }}] -{% endif %} -{% if tx.per_data_access_lists %} - tx_access_lists: dict[int, list] = { - {% for d_idx, al_entries in tx.per_data_access_lists.items() %} - {{ d_idx }}: [ - {% for al in al_entries %} - AccessList( - {% if al.use_dynamic %} - address={{ al.address }}, - {% else %} - address=Address({{ al.address }}), - {% endif %} - storage_keys=[ - {% for sk in al.storage_keys %} - Hash("{{ sk }}"), # noqa: E501 - {% endfor %} - ], - ), - {% endfor %} - ], - {% endfor %} - } -{% endif %} - -{% endif %} - -{# Transaction #} - tx = Transaction( - sender=sender, -{% if tx.to_var is not none %} - to={{ tx.to_var }}, -{% elif tx.to_is_none %} - to=None, -{% endif %} -{% if is_multi_case %} - data=tx_data[d], - gas_limit=tx_gas[g], -{% if tx_value != [0] %} - value=tx_value[v], -{% endif %} -{% else %} -{% if tx.data_inline and tx.data_inline != "b''" %} - data={{ tx.data_inline }}, -{% endif %} -{% if tx.gas_limit is not none and tx.gas_limit != 21000 %} - gas_limit={{ tx.gas_limit }}, -{% endif %} -{% if tx.value %} - value={{ tx.value | format_int }}, -{% endif %} -{% endif %} -{% if tx.max_fee_per_gas is not none %} - max_fee_per_gas={{ tx.max_fee_per_gas }}, -{% endif %} -{% if tx.max_priority_fee_per_gas is not none %} - max_priority_fee_per_gas={{ tx.max_priority_fee_per_gas }}, -{% endif %} -{% if tx.nonce is not none and tx.nonce != 0 %} - nonce={{ tx.nonce }}, -{% endif %} -{% if tx.gas_price is not none and tx.gas_price != 10 %} - gas_price={{ tx.gas_price }}, -{% endif %} -{% if tx.max_fee_per_blob_gas is not none %} - max_fee_per_blob_gas={{ tx.max_fee_per_blob_gas | format_int }}, -{% endif %} -{% if tx.blob_versioned_hashes is not none %} - blob_versioned_hashes=[ -{% for h in tx.blob_versioned_hashes %} - Hash( - "{{ h }}" # noqa: E501 - ), -{% endfor %} - ], -{% endif %} -{% if tx.per_data_access_lists and is_multi_case %} - access_list=tx_access_lists.get(d), -{% elif tx.access_list is not none %} - access_list=[ -{% for al in tx.access_list %} - AccessList( -{% if al.use_dynamic %} - address={{ al.address }}, -{% else %} - address=Address({{ al.address }}), -{% endif %} - storage_keys=[ -{% for sk in al.storage_keys %} - Hash( - "{{ sk }}" # noqa: E501 - ), -{% endfor %} - ], - ), -{% endfor %} - ], -{% endif %} -{% if single_error %} - error={{ single_error }}, -{% elif single_post %} - {# Single post without error #} -{% elif is_multi_case or is_fork_dependent %} - error=_exc, -{% endif %} - ) - -{# Post-state #} -{% if single_post %} - post = {{ single_post | format_post }} -{% elif is_multi_case or is_fork_dependent %} -{# Post resolved above via resolve_expect_post / resolve_expect_post_fork #} -{% else %} - post: dict = {} -{% endif %} - - state_test(env=env, pre=pre, post=post, tx=tx) diff --git a/scripts/verify_dynamic_addresses.sh b/scripts/verify_dynamic_addresses.sh deleted file mode 100755 index 3cbd19becaa..00000000000 --- a/scripts/verify_dynamic_addresses.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# Verify that filler_to_python with dynamic addresses produces -# trace-equivalent tests. Assumes output/traces_baseline/ already -# exists (generated once before any code changes). -set -euo pipefail - -export TMPDIR=./.tmp -mkdir -p "$TMPDIR" output/traces_new - -if [ ! -d "output/traces_baseline" ]; then - echo "ERROR: output/traces_baseline/ not found." - echo "Generate baseline first (before code changes):" - echo " TMPDIR=./.tmp uv run fill tests/ported_static/ --evm-dump-dir output/traces_baseline -n 10 -m 'not slow'" - exit 1 -fi - -# Step 1: Run filler_to_python (overwrites tests/ported_static/) -echo "=== Step 1: Running filler_to_python ===" -uv run python -m scripts.filler_to_python \ - --fillers tests/static/static/state_tests/ \ - --output tests/ported_static/ - -# Step 2: Fill new tests + verify against baseline -echo "=== Step 2: Filling new tests and verifying traces ===" -uv run fill \ - tests/ported_static/ \ - --evm-dump-dir output/traces_new \ - --verify-traces output/traces_baseline \ - --verify-traces-comparator exact-no-stack \ - -n 10 \ - -m "not slow" - -echo "=== Done. Check output above for trace mismatches ===" -echo "=== Use 'git diff tests/ported_static/' to see code changes ===" diff --git a/tests/ported_static/stArgsZeroOneBalance/test_add_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_add_non_const.py index 0a24f5ffbc1..8d5f126bd1f 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_add_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_add_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_addmod_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_addmod_non_const.py index fae816dfd1e..6d99eb7e471 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_addmod_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_addmod_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_and_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_and_non_const.py index 8eb6f763863..15f5ac2ff21 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_and_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_and_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_balance_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_balance_non_const.py index ae940bbaa03..a9bf02efe0e 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_balance_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_balance_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_byte_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_byte_non_const.py index 544001d697d..4cd70ba0e3c 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_byte_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_byte_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_call_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_call_non_const.py index a8e915e499a..02f334013bf 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_call_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_call_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_callcode_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_callcode_non_const.py index e24b3d5f963..b46d85a8824 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_callcode_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_callcode_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_calldatacopy_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_calldatacopy_non_const.py index 9a0b8f9f9c2..3420fe5e51e 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_calldatacopy_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_calldatacopy_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_calldataload_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_calldataload_non_const.py index dc0f8b82b2e..bfd3d81f15c 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_calldataload_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_calldataload_non_const.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_codecopy_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_codecopy_non_const.py index c097c5f467e..f9b0348c7c4 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_codecopy_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_codecopy_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_create_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_create_non_const.py index 5106ec78a51..4ad0c1c1ade 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_create_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_create_non_const.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_delegatecall_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_delegatecall_non_const.py index 2fc22d2747d..774a4f1145a 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_delegatecall_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_delegatecall_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_div_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_div_non_const.py index 754da2814ab..b510ce0f065 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_div_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_div_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_eq_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_eq_non_const.py index 09c30fc9052..a1157ad4fec 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_eq_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_eq_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_exp_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_exp_non_const.py index 72f6aace5a0..5a4ddad89eb 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_exp_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_exp_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_extcodecopy_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_extcodecopy_non_const.py index 1b0cd7e9c8c..f27a1678fdb 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_extcodecopy_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_extcodecopy_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_extcodesize_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_extcodesize_non_const.py index e67e53ea57c..7e58b0044d4 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_extcodesize_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_extcodesize_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_gt_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_gt_non_const.py index d8db68a6f82..57694bf14d0 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_gt_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_gt_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_iszero_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_iszero_non_const.py index dc4585cd190..74703b65de1 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_iszero_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_iszero_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_jump_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_jump_non_const.py index a7a6d0ed8b7..0236d60c777 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_jump_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_jump_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_jumpi_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_jumpi_non_const.py index 8ad626d763f..a00b048b06b 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_jumpi_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_jumpi_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_log0_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_log0_non_const.py index 365c39eaccf..dd441a1f193 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_log0_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_log0_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_log1_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_log1_non_const.py index 83826d6f6b3..807e068a70e 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_log1_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_log1_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_log2_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_log2_non_const.py index 418cb6e8be0..65f255ba82e 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_log2_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_log2_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_log3_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_log3_non_const.py index 4a34ed3a76c..fccdeb0d4f3 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_log3_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_log3_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_lt_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_lt_non_const.py index 34354330ff4..081c4226da8 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_lt_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_lt_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_mload_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_mload_non_const.py index 244fefd710b..0a1e539be78 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_mload_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_mload_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_mod_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_mod_non_const.py index bda76416253..9f86e0e3247 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_mod_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_mod_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_mstore8_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_mstore8_non_const.py index 0447a50df4c..789c7745868 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_mstore8_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_mstore8_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_mstore_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_mstore_non_const.py index 8b021a9b2cd..a0da8bc123e 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_mstore_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_mstore_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_mul_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_mul_non_const.py index 76886038831..ac2b0247a6a 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_mul_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_mul_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_mulmod_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_mulmod_non_const.py index cd61591b4c6..455b2a1c64a 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_mulmod_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_mulmod_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_not_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_not_non_const.py index 5ff4ec0e605..90c8ec3127d 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_not_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_not_non_const.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_or_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_or_non_const.py index 343f19c2fec..ba76c7b43aa 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_or_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_or_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_return_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_return_non_const.py index 4e790b391e0..900ba9cd85c 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_return_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_return_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_sdiv_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_sdiv_non_const.py index fe11f8c49a8..77128c0bf49 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_sdiv_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_sdiv_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_sgt_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_sgt_non_const.py index 8e955bebd63..aee59083378 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_sgt_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_sgt_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_sha3_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_sha3_non_const.py index 6efbe2105b6..c6461800a8d 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_sha3_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_sha3_non_const.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_signext_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_signext_non_const.py index ca26efca5c8..0d4f9a8871a 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_signext_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_signext_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_sload_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_sload_non_const.py index 253acce3f33..f8ee9c4b38b 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_sload_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_sload_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_slt_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_slt_non_const.py index 4785add59ca..55cbb3f5adb 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_slt_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_slt_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_smod_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_smod_non_const.py index 1408d1dbfb2..b539e6fd91d 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_smod_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_smod_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_sstore_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_sstore_non_const.py index 8f1e6ba7914..889c824fd71 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_sstore_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_sstore_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_sub_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_sub_non_const.py index 311cc71bfa2..49f6f6a387f 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_sub_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_sub_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stArgsZeroOneBalance/test_xor_non_const.py b/tests/ported_static/stArgsZeroOneBalance/test_xor_non_const.py index 1ca082aca84..de1b0470a8c 100644 --- a/tests/ported_static/stArgsZeroOneBalance/test_xor_non_const.py +++ b/tests/ported_static/stArgsZeroOneBalance/test_xor_non_const.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stBadOpcode/test_measure_gas.py b/tests/ported_static/stBadOpcode/test_measure_gas.py index b262b96b127..e420a60c962 100644 --- a/tests/ported_static/stBadOpcode/test_measure_gas.py +++ b/tests/ported_static/stBadOpcode/test_measure_gas.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stBadOpcode/test_operation_diff_gas.py b/tests/ported_static/stBadOpcode/test_operation_diff_gas.py index 82a3e5c4cbd..0d26ce8aece 100644 --- a/tests/ported_static/stBadOpcode/test_operation_diff_gas.py +++ b/tests/ported_static/stBadOpcode/test_operation_diff_gas.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCallCodes/test_callcode_dynamic_code.py b/tests/ported_static/stCallCodes/test_callcode_dynamic_code.py index b9d711740ab..42b255ee1dd 100644 --- a/tests/ported_static/stCallCodes/test_callcode_dynamic_code.py +++ b/tests/ported_static/stCallCodes/test_callcode_dynamic_code.py @@ -18,7 +18,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCallCodes/test_callcode_dynamic_code2_self_call.py b/tests/ported_static/stCallCodes/test_callcode_dynamic_code2_self_call.py index 258217d6fae..08c7ab6dfd4 100644 --- a/tests/ported_static/stCallCodes/test_callcode_dynamic_code2_self_call.py +++ b/tests/ported_static/stCallCodes/test_callcode_dynamic_code2_self_call.py @@ -18,7 +18,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_empty_contract.py b/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_empty_contract.py index edd2ad15114..fa2e3c12707 100644 --- a/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_empty_contract.py +++ b/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_empty_contract.py @@ -18,7 +18,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_exis_contract_with_v_transfer_ne_money.py b/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_exis_contract_with_v_transfer_ne_money.py index 12715a68d24..b089a955028 100644 --- a/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_exis_contract_with_v_transfer_ne_money.py +++ b/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_exis_contract_with_v_transfer_ne_money.py @@ -18,7 +18,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_existing_contract.py b/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_existing_contract.py index 68451f0f3ad..2c0e35d7d78 100644 --- a/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_existing_contract.py +++ b/tests/ported_static/stCallCodes/test_callcode_in_initcode_to_existing_contract.py @@ -18,7 +18,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_call1024_oog.py b/tests/ported_static/stCallCreateCallCodeTest/test_call1024_oog.py index 127b02327fd..229f8519ed7 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_call1024_oog.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_call1024_oog.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_call1024_pre_calls.py b/tests/ported_static/stCallCreateCallCodeTest/test_call1024_pre_calls.py index bece3316ff2..71307102785 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_call1024_pre_calls.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_call1024_pre_calls.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_call_with_high_value_and_gas_oog.py b/tests/ported_static/stCallCreateCallCodeTest/test_call_with_high_value_and_gas_oog.py index 5240cae80cd..8396067b26b 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_call_with_high_value_and_gas_oog.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_call_with_high_value_and_gas_oog.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_call_with_high_value_and_oo_gat_tx_level.py b/tests/ported_static/stCallCreateCallCodeTest/test_call_with_high_value_and_oo_gat_tx_level.py index d105d652d73..2b6209afb86 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_call_with_high_value_and_oo_gat_tx_level.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_call_with_high_value_and_oo_gat_tx_level.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_callcode1024_oog.py b/tests/ported_static/stCallCreateCallCodeTest/test_callcode1024_oog.py index 2b2f42bd104..a083b602d29 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_callcode1024_oog.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_callcode1024_oog.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_callcode_lose_gas_oog.py b/tests/ported_static/stCallCreateCallCodeTest/test_callcode_lose_gas_oog.py index 8ed143eb578..29ad5d90f37 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_callcode_lose_gas_oog.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_callcode_lose_gas_oog.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_contract_creation_make_call_that_ask_more_gas_then_transaction_provided.py b/tests/ported_static/stCallCreateCallCodeTest/test_contract_creation_make_call_that_ask_more_gas_then_transaction_provided.py index 8571a26ae45..875d9a473a2 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_contract_creation_make_call_that_ask_more_gas_then_transaction_provided.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_contract_creation_make_call_that_ask_more_gas_then_transaction_provided.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_create_fail_balance_too_low.py b/tests/ported_static/stCallCreateCallCodeTest/test_create_fail_balance_too_low.py index a9036d4c58c..839a55e6921 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_create_fail_balance_too_low.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_create_fail_balance_too_low.py @@ -18,7 +18,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_create_init_oo_gfor_create.py b/tests/ported_static/stCallCreateCallCodeTest/test_create_init_oo_gfor_create.py index 7207b0ccaa1..a746029fa1b 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_create_init_oo_gfor_create.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_create_init_oo_gfor_create.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_create_name_registrator_per_txs_not_enough_gas.py b/tests/ported_static/stCallCreateCallCodeTest/test_create_name_registrator_per_txs_not_enough_gas.py index a6159ad7409..ea2bfbc606e 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_create_name_registrator_per_txs_not_enough_gas.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_create_name_registrator_per_txs_not_enough_gas.py @@ -16,7 +16,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCodeSizeLimit/test_create2_code_size_limit.py b/tests/ported_static/stCodeSizeLimit/test_create2_code_size_limit.py index b3bf7840879..35d0d1ea289 100644 --- a/tests/ported_static/stCodeSizeLimit/test_create2_code_size_limit.py +++ b/tests/ported_static/stCodeSizeLimit/test_create2_code_size_limit.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCodeSizeLimit/test_create_code_size_limit.py b/tests/ported_static/stCodeSizeLimit/test_create_code_size_limit.py index 84ab61dc09c..f46eb92d75e 100644 --- a/tests/ported_static/stCodeSizeLimit/test_create_code_size_limit.py +++ b/tests/ported_static/stCodeSizeLimit/test_create_code_size_limit.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create2_first_byte_loop.py b/tests/ported_static/stCreate2/test_create2_first_byte_loop.py index 65d516db2aa..1961cdda0f8 100644 --- a/tests/ported_static/stCreate2/test_create2_first_byte_loop.py +++ b/tests/ported_static/stCreate2/test_create2_first_byte_loop.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create2_high_nonce_delegatecall.py b/tests/ported_static/stCreate2/test_create2_high_nonce_delegatecall.py index bccd4bc252a..0f02ff8d2bd 100644 --- a/tests/ported_static/stCreate2/test_create2_high_nonce_delegatecall.py +++ b/tests/ported_static/stCreate2/test_create2_high_nonce_delegatecall.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create2_init_codes.py b/tests/ported_static/stCreate2/test_create2_init_codes.py index e1ad5fa965b..411e004d82b 100644 --- a/tests/ported_static/stCreate2/test_create2_init_codes.py +++ b/tests/ported_static/stCreate2/test_create2_init_codes.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create2_oo_gafter_init_code.py b/tests/ported_static/stCreate2/test_create2_oo_gafter_init_code.py index ab52f770473..b2f7bd42c69 100644 --- a/tests/ported_static/stCreate2/test_create2_oo_gafter_init_code.py +++ b/tests/ported_static/stCreate2/test_create2_oo_gafter_init_code.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create2_oo_gafter_init_code_returndata2.py b/tests/ported_static/stCreate2/test_create2_oo_gafter_init_code_returndata2.py index f259f787b86..f7a8de72f18 100644 --- a/tests/ported_static/stCreate2/test_create2_oo_gafter_init_code_returndata2.py +++ b/tests/ported_static/stCreate2/test_create2_oo_gafter_init_code_returndata2.py @@ -18,7 +18,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create2_oog_from_call_refunds.py b/tests/ported_static/stCreate2/test_create2_oog_from_call_refunds.py index 41fa4bb6e0d..bbe03e07ac9 100644 --- a/tests/ported_static/stCreate2/test_create2_oog_from_call_refunds.py +++ b/tests/ported_static/stCreate2/test_create2_oog_from_call_refunds.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create2_recursive.py b/tests/ported_static/stCreate2/test_create2_recursive.py index 0f9066fe503..10247091c04 100644 --- a/tests/ported_static/stCreate2/test_create2_recursive.py +++ b/tests/ported_static/stCreate2/test_create2_recursive.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create2_smart_init_code.py b/tests/ported_static/stCreate2/test_create2_smart_init_code.py index 0d5a967638e..367f26ff6e5 100644 --- a/tests/ported_static/stCreate2/test_create2_smart_init_code.py +++ b/tests/ported_static/stCreate2/test_create2_smart_init_code.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create2_suicide.py b/tests/ported_static/stCreate2/test_create2_suicide.py index 0fa854ae984..9cdfe3816ac 100644 --- a/tests/ported_static/stCreate2/test_create2_suicide.py +++ b/tests/ported_static/stCreate2/test_create2_suicide.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create2call_precompiles.py b/tests/ported_static/stCreate2/test_create2call_precompiles.py index 969be62840e..e902747959d 100644 --- a/tests/ported_static/stCreate2/test_create2call_precompiles.py +++ b/tests/ported_static/stCreate2/test_create2call_precompiles.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create2check_fields_in_initcode.py b/tests/ported_static/stCreate2/test_create2check_fields_in_initcode.py index 4f883160226..665d024eeab 100644 --- a/tests/ported_static/stCreate2/test_create2check_fields_in_initcode.py +++ b/tests/ported_static/stCreate2/test_create2check_fields_in_initcode.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create2collision_balance.py b/tests/ported_static/stCreate2/test_create2collision_balance.py index 463ebb5f599..5a063f352fe 100644 --- a/tests/ported_static/stCreate2/test_create2collision_balance.py +++ b/tests/ported_static/stCreate2/test_create2collision_balance.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create2collision_code2.py b/tests/ported_static/stCreate2/test_create2collision_code2.py index fce405e07c9..65bf74bd340 100644 --- a/tests/ported_static/stCreate2/test_create2collision_code2.py +++ b/tests/ported_static/stCreate2/test_create2collision_code2.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create2collision_selfdestructed.py b/tests/ported_static/stCreate2/test_create2collision_selfdestructed.py index e3a2e1ae029..0c9033dda9b 100644 --- a/tests/ported_static/stCreate2/test_create2collision_selfdestructed.py +++ b/tests/ported_static/stCreate2/test_create2collision_selfdestructed.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create2collision_selfdestructed2.py b/tests/ported_static/stCreate2/test_create2collision_selfdestructed2.py index c55ec9f9d50..4c00bb1c276 100644 --- a/tests/ported_static/stCreate2/test_create2collision_selfdestructed2.py +++ b/tests/ported_static/stCreate2/test_create2collision_selfdestructed2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create2no_cash.py b/tests/ported_static/stCreate2/test_create2no_cash.py index 0d5894a3320..e3add623fd0 100644 --- a/tests/ported_static/stCreate2/test_create2no_cash.py +++ b/tests/ported_static/stCreate2/test_create2no_cash.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create_message_reverted.py b/tests/ported_static/stCreate2/test_create_message_reverted.py index 0d0a5bff1f3..99a4b94d7b8 100644 --- a/tests/ported_static/stCreate2/test_create_message_reverted.py +++ b/tests/ported_static/stCreate2/test_create_message_reverted.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_create_message_reverted_oog_in_init2.py b/tests/ported_static/stCreate2/test_create_message_reverted_oog_in_init2.py index 927b3fa082e..3cab7f9796b 100644 --- a/tests/ported_static/stCreate2/test_create_message_reverted_oog_in_init2.py +++ b/tests/ported_static/stCreate2/test_create_message_reverted_oog_in_init2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_returndatacopy_following_create.py b/tests/ported_static/stCreate2/test_returndatacopy_following_create.py index 323a9dda6c8..2109b8e368a 100644 --- a/tests/ported_static/stCreate2/test_returndatacopy_following_create.py +++ b/tests/ported_static/stCreate2/test_returndatacopy_following_create.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_revert_depth_create2_oog.py b/tests/ported_static/stCreate2/test_revert_depth_create2_oog.py index 293fe888c7a..81dcfb55a94 100644 --- a/tests/ported_static/stCreate2/test_revert_depth_create2_oog.py +++ b/tests/ported_static/stCreate2/test_revert_depth_create2_oog.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_revert_depth_create2_oog_berlin.py b/tests/ported_static/stCreate2/test_revert_depth_create2_oog_berlin.py index e55f6b2a6ef..285613d9ff9 100644 --- a/tests/ported_static/stCreate2/test_revert_depth_create2_oog_berlin.py +++ b/tests/ported_static/stCreate2/test_revert_depth_create2_oog_berlin.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_revert_depth_create_address_collision.py b/tests/ported_static/stCreate2/test_revert_depth_create_address_collision.py index 3cd45030619..296b22f7b93 100644 --- a/tests/ported_static/stCreate2/test_revert_depth_create_address_collision.py +++ b/tests/ported_static/stCreate2/test_revert_depth_create_address_collision.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_revert_depth_create_address_collision_berlin.py b/tests/ported_static/stCreate2/test_revert_depth_create_address_collision_berlin.py index 72fca5e4127..bd628018a9c 100644 --- a/tests/ported_static/stCreate2/test_revert_depth_create_address_collision_berlin.py +++ b/tests/ported_static/stCreate2/test_revert_depth_create_address_collision_berlin.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreate2/test_revert_opcode_create.py b/tests/ported_static/stCreate2/test_revert_opcode_create.py index 73c21783789..2a13379443e 100644 --- a/tests/ported_static/stCreate2/test_revert_opcode_create.py +++ b/tests/ported_static/stCreate2/test_revert_opcode_create.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreateTest/test_code_in_constructor.py b/tests/ported_static/stCreateTest/test_code_in_constructor.py index 1a33dbe1033..170b8e35e35 100644 --- a/tests/ported_static/stCreateTest/test_code_in_constructor.py +++ b/tests/ported_static/stCreateTest/test_code_in_constructor.py @@ -19,7 +19,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreateTest/test_create_address_warm_after_fail.py b/tests/ported_static/stCreateTest/test_create_address_warm_after_fail.py index fc6321be024..50913ca71cb 100644 --- a/tests/ported_static/stCreateTest/test_create_address_warm_after_fail.py +++ b/tests/ported_static/stCreateTest/test_create_address_warm_after_fail.py @@ -25,7 +25,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreateTest/test_create_collision_to_empty2.py b/tests/ported_static/stCreateTest/test_create_collision_to_empty2.py index a8cb5f0f42e..4da7a65cf1c 100644 --- a/tests/ported_static/stCreateTest/test_create_collision_to_empty2.py +++ b/tests/ported_static/stCreateTest/test_create_collision_to_empty2.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreateTest/test_create_e_contract_create_ne_contract_in_init_oog_tr.py b/tests/ported_static/stCreateTest/test_create_e_contract_create_ne_contract_in_init_oog_tr.py index c5b2fbd670f..f27ed5369c2 100644 --- a/tests/ported_static/stCreateTest/test_create_e_contract_create_ne_contract_in_init_oog_tr.py +++ b/tests/ported_static/stCreateTest/test_create_e_contract_create_ne_contract_in_init_oog_tr.py @@ -16,7 +16,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreateTest/test_create_fail_result.py b/tests/ported_static/stCreateTest/test_create_fail_result.py index c87f3c0ec2d..71ef3c56413 100644 --- a/tests/ported_static/stCreateTest/test_create_fail_result.py +++ b/tests/ported_static/stCreateTest/test_create_fail_result.py @@ -19,7 +19,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreateTest/test_create_large_result.py b/tests/ported_static/stCreateTest/test_create_large_result.py index 936dde89a2a..879e1f85a2c 100644 --- a/tests/ported_static/stCreateTest/test_create_large_result.py +++ b/tests/ported_static/stCreateTest/test_create_large_result.py @@ -19,7 +19,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code.py b/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code.py index 8a4e086e17c..b67ceb498ed 100644 --- a/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code.py +++ b/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code_returndata2.py b/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code_returndata2.py index baf51e193f4..9608e93367d 100644 --- a/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code_returndata2.py +++ b/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code_returndata2.py @@ -18,7 +18,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code_revert2.py b/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code_revert2.py index d7a8fbcadff..7de7b08b006 100644 --- a/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code_revert2.py +++ b/tests/ported_static/stCreateTest/test_create_oo_gafter_init_code_revert2.py @@ -18,7 +18,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreateTest/test_create_oo_gafter_max_codesize.py b/tests/ported_static/stCreateTest/test_create_oo_gafter_max_codesize.py index 4cd22b226bc..f22e9a35d5e 100644 --- a/tests/ported_static/stCreateTest/test_create_oo_gafter_max_codesize.py +++ b/tests/ported_static/stCreateTest/test_create_oo_gafter_max_codesize.py @@ -18,7 +18,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreateTest/test_create_oog_from_call_refunds.py b/tests/ported_static/stCreateTest/test_create_oog_from_call_refunds.py index f1ff087ac10..4dea4c376ce 100644 --- a/tests/ported_static/stCreateTest/test_create_oog_from_call_refunds.py +++ b/tests/ported_static/stCreateTest/test_create_oog_from_call_refunds.py @@ -19,7 +19,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreateTest/test_create_results.py b/tests/ported_static/stCreateTest/test_create_results.py index 67af6122a4d..12631c97ba1 100644 --- a/tests/ported_static/stCreateTest/test_create_results.py +++ b/tests/ported_static/stCreateTest/test_create_results.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreateTest/test_create_transaction_call_data.py b/tests/ported_static/stCreateTest/test_create_transaction_call_data.py index e30600d6af6..7896febf447 100644 --- a/tests/ported_static/stCreateTest/test_create_transaction_call_data.py +++ b/tests/ported_static/stCreateTest/test_create_transaction_call_data.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreateTest/test_create_transaction_high_nonce.py b/tests/ported_static/stCreateTest/test_create_transaction_high_nonce.py index 6ba82dc452b..15f1eba4ce5 100644 --- a/tests/ported_static/stCreateTest/test_create_transaction_high_nonce.py +++ b/tests/ported_static/stCreateTest/test_create_transaction_high_nonce.py @@ -16,7 +16,7 @@ TransactionException, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreateTest/test_transaction_collision_to_empty2.py b/tests/ported_static/stCreateTest/test_transaction_collision_to_empty2.py index 2e85f6b9b3c..682bb03af6d 100644 --- a/tests/ported_static/stCreateTest/test_transaction_collision_to_empty2.py +++ b/tests/ported_static/stCreateTest/test_transaction_collision_to_empty2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stCreateTest/test_transaction_collision_to_empty_but_code.py b/tests/ported_static/stCreateTest/test_transaction_collision_to_empty_but_code.py index 36f9cdd064e..b059e1217ef 100644 --- a/tests/ported_static/stCreateTest/test_transaction_collision_to_empty_but_code.py +++ b/tests/ported_static/stCreateTest/test_transaction_collision_to_empty_but_code.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stDelegatecallTestHomestead/test_call1024_oog.py b/tests/ported_static/stDelegatecallTestHomestead/test_call1024_oog.py index 2eb7e09753e..c0d7bb900ba 100644 --- a/tests/ported_static/stDelegatecallTestHomestead/test_call1024_oog.py +++ b/tests/ported_static/stDelegatecallTestHomestead/test_call1024_oog.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stDelegatecallTestHomestead/test_call1024_pre_calls.py b/tests/ported_static/stDelegatecallTestHomestead/test_call1024_pre_calls.py index 79dc8d66b56..95f74c1155e 100644 --- a/tests/ported_static/stDelegatecallTestHomestead/test_call1024_pre_calls.py +++ b/tests/ported_static/stDelegatecallTestHomestead/test_call1024_pre_calls.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stDelegatecallTestHomestead/test_callcode_lose_gas_oog.py b/tests/ported_static/stDelegatecallTestHomestead/test_callcode_lose_gas_oog.py index 37d33839061..4fe60b46959 100644 --- a/tests/ported_static/stDelegatecallTestHomestead/test_callcode_lose_gas_oog.py +++ b/tests/ported_static/stDelegatecallTestHomestead/test_callcode_lose_gas_oog.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP1153_transientStorage/test_trans_storage_ok.py b/tests/ported_static/stEIP1153_transientStorage/test_trans_storage_ok.py index 818e6e4d756..652b20f43c4 100644 --- a/tests/ported_static/stEIP1153_transientStorage/test_trans_storage_ok.py +++ b/tests/ported_static/stEIP1153_transientStorage/test_trans_storage_ok.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP1153_transientStorage/test_trans_storage_reset.py b/tests/ported_static/stEIP1153_transientStorage/test_trans_storage_reset.py index de1ad618dd6..1bc3bdf5f20 100644 --- a/tests/ported_static/stEIP1153_transientStorage/test_trans_storage_reset.py +++ b/tests/ported_static/stEIP1153_transientStorage/test_trans_storage_reset.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP150singleCodeGasPrices/test_eip2929.py b/tests/ported_static/stEIP150singleCodeGasPrices/test_eip2929.py index c62a6e1859a..ab39cd56c80 100644 --- a/tests/ported_static/stEIP150singleCodeGasPrices/test_eip2929.py +++ b/tests/ported_static/stEIP150singleCodeGasPrices/test_eip2929.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP150singleCodeGasPrices/test_eip2929_minus_ff.py b/tests/ported_static/stEIP150singleCodeGasPrices/test_eip2929_minus_ff.py index 0e9ecf78d46..aac2b2a223f 100644 --- a/tests/ported_static/stEIP150singleCodeGasPrices/test_eip2929_minus_ff.py +++ b/tests/ported_static/stEIP150singleCodeGasPrices/test_eip2929_minus_ff.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP150singleCodeGasPrices/test_gas_cost.py b/tests/ported_static/stEIP150singleCodeGasPrices/test_gas_cost.py index 98b4497269a..9641f66294b 100644 --- a/tests/ported_static/stEIP150singleCodeGasPrices/test_gas_cost.py +++ b/tests/ported_static/stEIP150singleCodeGasPrices/test_gas_cost.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP150singleCodeGasPrices/test_gas_cost_memory.py b/tests/ported_static/stEIP150singleCodeGasPrices/test_gas_cost_memory.py index aad4a36436a..bf592f49284 100644 --- a/tests/ported_static/stEIP150singleCodeGasPrices/test_gas_cost_memory.py +++ b/tests/ported_static/stEIP150singleCodeGasPrices/test_gas_cost_memory.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP1559/test_low_gas_limit.py b/tests/ported_static/stEIP1559/test_low_gas_limit.py index d2baa131eae..d5d0c0fbd7b 100644 --- a/tests/ported_static/stEIP1559/test_low_gas_limit.py +++ b/tests/ported_static/stEIP1559/test_low_gas_limit.py @@ -17,7 +17,7 @@ TransactionException, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP1559/test_low_gas_price_old_types.py b/tests/ported_static/stEIP1559/test_low_gas_price_old_types.py index 48974cd0123..6ace361fe79 100644 --- a/tests/ported_static/stEIP1559/test_low_gas_price_old_types.py +++ b/tests/ported_static/stEIP1559/test_low_gas_price_old_types.py @@ -16,7 +16,7 @@ TransactionException, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP1559/test_out_of_funds.py b/tests/ported_static/stEIP1559/test_out_of_funds.py index 8684ccdbf0d..acd6dd4d34e 100644 --- a/tests/ported_static/stEIP1559/test_out_of_funds.py +++ b/tests/ported_static/stEIP1559/test_out_of_funds.py @@ -16,7 +16,7 @@ TransactionException, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP1559/test_out_of_funds_old_types.py b/tests/ported_static/stEIP1559/test_out_of_funds_old_types.py index faa5538f101..56647547cc7 100644 --- a/tests/ported_static/stEIP1559/test_out_of_funds_old_types.py +++ b/tests/ported_static/stEIP1559/test_out_of_funds_old_types.py @@ -16,7 +16,7 @@ TransactionException, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP1559/test_val_causes_oof.py b/tests/ported_static/stEIP1559/test_val_causes_oof.py index dfbb5a3e162..00eccbc9974 100644 --- a/tests/ported_static/stEIP1559/test_val_causes_oof.py +++ b/tests/ported_static/stEIP1559/test_val_causes_oof.py @@ -17,7 +17,7 @@ TransactionException, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP2930/test_address_opcodes.py b/tests/ported_static/stEIP2930/test_address_opcodes.py index 2461399d90c..c9d1a5cdb89 100644 --- a/tests/ported_static/stEIP2930/test_address_opcodes.py +++ b/tests/ported_static/stEIP2930/test_address_opcodes.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP2930/test_coinbase_t01.py b/tests/ported_static/stEIP2930/test_coinbase_t01.py index 62e00904240..2be32a03971 100644 --- a/tests/ported_static/stEIP2930/test_coinbase_t01.py +++ b/tests/ported_static/stEIP2930/test_coinbase_t01.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP2930/test_coinbase_t2.py b/tests/ported_static/stEIP2930/test_coinbase_t2.py index 22716cfa65b..631ae72d054 100644 --- a/tests/ported_static/stEIP2930/test_coinbase_t2.py +++ b/tests/ported_static/stEIP2930/test_coinbase_t2.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP2930/test_manual_create.py b/tests/ported_static/stEIP2930/test_manual_create.py index 057b623c7e0..39c1ef107da 100644 --- a/tests/ported_static/stEIP2930/test_manual_create.py +++ b/tests/ported_static/stEIP2930/test_manual_create.py @@ -19,7 +19,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP2930/test_storage_costs.py b/tests/ported_static/stEIP2930/test_storage_costs.py index 2c5f0f91686..d0b99cde412 100644 --- a/tests/ported_static/stEIP2930/test_storage_costs.py +++ b/tests/ported_static/stEIP2930/test_storage_costs.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP2930/test_transaction_costs.py b/tests/ported_static/stEIP2930/test_transaction_costs.py index 3695bf9a542..a5ef579d737 100644 --- a/tests/ported_static/stEIP2930/test_transaction_costs.py +++ b/tests/ported_static/stEIP2930/test_transaction_costs.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Amsterdam, Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP2930/test_varied_context.py b/tests/ported_static/stEIP2930/test_varied_context.py index 20f3bd03c20..1db7b24eb38 100644 --- a/tests/ported_static/stEIP2930/test_varied_context.py +++ b/tests/ported_static/stEIP2930/test_varied_context.py @@ -20,7 +20,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP3607/test_transaction_colliding_with_non_empty_account_init_paris.py b/tests/ported_static/stEIP3607/test_transaction_colliding_with_non_empty_account_init_paris.py index 2428bbb10d9..daae79ff0d9 100644 --- a/tests/ported_static/stEIP3607/test_transaction_colliding_with_non_empty_account_init_paris.py +++ b/tests/ported_static/stEIP3607/test_transaction_colliding_with_non_empty_account_init_paris.py @@ -17,7 +17,7 @@ TransactionException, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP3855_push0/test_push0.py b/tests/ported_static/stEIP3855_push0/test_push0.py index 82a91325613..3e56ef86fa5 100644 --- a/tests/ported_static/stEIP3855_push0/test_push0.py +++ b/tests/ported_static/stEIP3855_push0/test_push0.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP3855_push0/test_push0_gas2.py b/tests/ported_static/stEIP3855_push0/test_push0_gas2.py index 7405bce15a3..462d380148c 100644 --- a/tests/ported_static/stEIP3855_push0/test_push0_gas2.py +++ b/tests/ported_static/stEIP3855_push0/test_push0_gas2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP3860_limitmeterinitcode/test_create2_init_code_size_limit.py b/tests/ported_static/stEIP3860_limitmeterinitcode/test_create2_init_code_size_limit.py index 006e46e0616..d7ea51c79ef 100644 --- a/tests/ported_static/stEIP3860_limitmeterinitcode/test_create2_init_code_size_limit.py +++ b/tests/ported_static/stEIP3860_limitmeterinitcode/test_create2_init_code_size_limit.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP3860_limitmeterinitcode/test_create_init_code_size_limit.py b/tests/ported_static/stEIP3860_limitmeterinitcode/test_create_init_code_size_limit.py index dd3acfc9717..b1542fa9a35 100644 --- a/tests/ported_static/stEIP3860_limitmeterinitcode/test_create_init_code_size_limit.py +++ b/tests/ported_static/stEIP3860_limitmeterinitcode/test_create_init_code_size_limit.py @@ -18,7 +18,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP3860_limitmeterinitcode/test_creation_tx_init_code_size_limit.py b/tests/ported_static/stEIP3860_limitmeterinitcode/test_creation_tx_init_code_size_limit.py index 8a935525416..ae0963737ef 100644 --- a/tests/ported_static/stEIP3860_limitmeterinitcode/test_creation_tx_init_code_size_limit.py +++ b/tests/ported_static/stEIP3860_limitmeterinitcode/test_creation_tx_init_code_size_limit.py @@ -19,7 +19,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) diff --git a/tests/ported_static/stEIP5656_MCOPY/test_mcopy.py b/tests/ported_static/stEIP5656_MCOPY/test_mcopy.py index acae638389f..497650f239c 100644 --- a/tests/ported_static/stEIP5656_MCOPY/test_mcopy.py +++ b/tests/ported_static/stEIP5656_MCOPY/test_mcopy.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP5656_MCOPY/test_mcopy_copy_cost.py b/tests/ported_static/stEIP5656_MCOPY/test_mcopy_copy_cost.py index 92430e5fbce..8949aad9834 100644 --- a/tests/ported_static/stEIP5656_MCOPY/test_mcopy_copy_cost.py +++ b/tests/ported_static/stEIP5656_MCOPY/test_mcopy_copy_cost.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stEIP5656_MCOPY/test_mcopy_memory_expansion_cost.py b/tests/ported_static/stEIP5656_MCOPY/test_mcopy_memory_expansion_cost.py index c6b1b90837d..4ae9f88d946 100644 --- a/tests/ported_static/stEIP5656_MCOPY/test_mcopy_memory_expansion_cost.py +++ b/tests/ported_static/stEIP5656_MCOPY/test_mcopy_memory_expansion_cost.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stExample/test_labels_example.py b/tests/ported_static/stExample/test_labels_example.py index 9a8208197ee..72557a0653d 100644 --- a/tests/ported_static/stExample/test_labels_example.py +++ b/tests/ported_static/stExample/test_labels_example.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stExample/test_ranges_example.py b/tests/ported_static/stExample/test_ranges_example.py index 2a1990456f4..20d5eb9e50a 100644 --- a/tests/ported_static/stExample/test_ranges_example.py +++ b/tests/ported_static/stExample/test_ranges_example.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stInitCodeTest/test_out_of_gas_contract_creation.py b/tests/ported_static/stInitCodeTest/test_out_of_gas_contract_creation.py index 9525495cff9..3b6397313c0 100644 --- a/tests/ported_static/stInitCodeTest/test_out_of_gas_contract_creation.py +++ b/tests/ported_static/stInitCodeTest/test_out_of_gas_contract_creation.py @@ -16,7 +16,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stInitCodeTest/test_out_of_gas_prefunded_contract_creation.py b/tests/ported_static/stInitCodeTest/test_out_of_gas_prefunded_contract_creation.py index 51dd0b6725e..d7f0e94bb89 100644 --- a/tests/ported_static/stInitCodeTest/test_out_of_gas_prefunded_contract_creation.py +++ b/tests/ported_static/stInitCodeTest/test_out_of_gas_prefunded_contract_creation.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stMemExpandingEIP150Calls/test_oo_gin_return.py b/tests/ported_static/stMemExpandingEIP150Calls/test_oo_gin_return.py index 145e2b341e1..02bf7d3705a 100644 --- a/tests/ported_static/stMemExpandingEIP150Calls/test_oo_gin_return.py +++ b/tests/ported_static/stMemExpandingEIP150Calls/test_oo_gin_return.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stMemoryStressTest/test_fill_stack.py b/tests/ported_static/stMemoryStressTest/test_fill_stack.py index ecb5ba40c04..2399bb99348 100644 --- a/tests/ported_static/stMemoryStressTest/test_fill_stack.py +++ b/tests/ported_static/stMemoryStressTest/test_fill_stack.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stMemoryStressTest/test_mload32bit_bound.py b/tests/ported_static/stMemoryStressTest/test_mload32bit_bound.py index 5763dad5154..f41c54e45db 100644 --- a/tests/ported_static/stMemoryStressTest/test_mload32bit_bound.py +++ b/tests/ported_static/stMemoryStressTest/test_mload32bit_bound.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stMemoryStressTest/test_mload32bit_bound2.py b/tests/ported_static/stMemoryStressTest/test_mload32bit_bound2.py index 322e11428e8..c0ae2182396 100644 --- a/tests/ported_static/stMemoryStressTest/test_mload32bit_bound2.py +++ b/tests/ported_static/stMemoryStressTest/test_mload32bit_bound2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stMemoryStressTest/test_mload32bit_bound_msize.py b/tests/ported_static/stMemoryStressTest/test_mload32bit_bound_msize.py index ccff8e7bdf2..b5cd4567b91 100644 --- a/tests/ported_static/stMemoryStressTest/test_mload32bit_bound_msize.py +++ b/tests/ported_static/stMemoryStressTest/test_mload32bit_bound_msize.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stMemoryStressTest/test_mstore_bounds2a.py b/tests/ported_static/stMemoryStressTest/test_mstore_bounds2a.py index 82cbcebb094..9b009aaaf55 100644 --- a/tests/ported_static/stMemoryStressTest/test_mstore_bounds2a.py +++ b/tests/ported_static/stMemoryStressTest/test_mstore_bounds2a.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stMemoryStressTest/test_return_bounds.py b/tests/ported_static/stMemoryStressTest/test_return_bounds.py index 8014fe56cb0..48e93ef188e 100644 --- a/tests/ported_static/stMemoryStressTest/test_return_bounds.py +++ b/tests/ported_static/stMemoryStressTest/test_return_bounds.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stMemoryStressTest/test_sstore_bounds.py b/tests/ported_static/stMemoryStressTest/test_sstore_bounds.py index 3aee2e858ab..98be9ebf303 100644 --- a/tests/ported_static/stMemoryStressTest/test_sstore_bounds.py +++ b/tests/ported_static/stMemoryStressTest/test_sstore_bounds.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stMemoryTest/test_buffer.py b/tests/ported_static/stMemoryTest/test_buffer.py index e8eb1086eaf..62a290101bc 100644 --- a/tests/ported_static/stMemoryTest/test_buffer.py +++ b/tests/ported_static/stMemoryTest/test_buffer.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stMemoryTest/test_buffer_src_offset.py b/tests/ported_static/stMemoryTest/test_buffer_src_offset.py index 1a644f966f1..43489ce724b 100644 --- a/tests/ported_static/stMemoryTest/test_buffer_src_offset.py +++ b/tests/ported_static/stMemoryTest/test_buffer_src_offset.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stMemoryTest/test_oog.py b/tests/ported_static/stMemoryTest/test_oog.py index 5c2f1cc4f01..b8da04c7308 100644 --- a/tests/ported_static/stMemoryTest/test_oog.py +++ b/tests/ported_static/stMemoryTest/test_oog.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stPreCompiledContracts/test_modexp.py b/tests/ported_static/stPreCompiledContracts/test_modexp.py index 982a98231e2..9afbf00558b 100644 --- a/tests/ported_static/stPreCompiledContracts/test_modexp.py +++ b/tests/ported_static/stPreCompiledContracts/test_modexp.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stPreCompiledContracts/test_modexp_tests.py b/tests/ported_static/stPreCompiledContracts/test_modexp_tests.py index 487eb639575..15fdd4d1d05 100644 --- a/tests/ported_static/stPreCompiledContracts/test_modexp_tests.py +++ b/tests/ported_static/stPreCompiledContracts/test_modexp_tests.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stPreCompiledContracts/test_precomps_eip2929_cancun.py b/tests/ported_static/stPreCompiledContracts/test_precomps_eip2929_cancun.py index 6bc03947432..ff3af29fb50 100644 --- a/tests/ported_static/stPreCompiledContracts/test_precomps_eip2929_cancun.py +++ b/tests/ported_static/stPreCompiledContracts/test_precomps_eip2929_cancun.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stPreCompiledContracts2/test_call_ecrecover_overflow.py b/tests/ported_static/stPreCompiledContracts2/test_call_ecrecover_overflow.py index a2eaac17506..13c53d6161f 100644 --- a/tests/ported_static/stPreCompiledContracts2/test_call_ecrecover_overflow.py +++ b/tests/ported_static/stPreCompiledContracts2/test_call_ecrecover_overflow.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stPreCompiledContracts2/test_ecrecover_weird_v.py b/tests/ported_static/stPreCompiledContracts2/test_ecrecover_weird_v.py index 3a607960508..7fc09e1f22f 100644 --- a/tests/ported_static/stPreCompiledContracts2/test_ecrecover_weird_v.py +++ b/tests/ported_static/stPreCompiledContracts2/test_ecrecover_weird_v.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_20500.py b/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_20500.py index 59e3af2c647..6aa981cac1f 100644 --- a/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_20500.py +++ b/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_20500.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stQuadraticComplexityTest/test_call1_mb1024_calldepth.py b/tests/ported_static/stQuadraticComplexityTest/test_call1_mb1024_calldepth.py index 228828eea8c..fcb98290daa 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_call1_mb1024_calldepth.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_call1_mb1024_calldepth.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stQuadraticComplexityTest/test_call20_kbytes_contract50_1.py b/tests/ported_static/stQuadraticComplexityTest/test_call20_kbytes_contract50_1.py index 8d7d15a89d2..c7c49fa5701 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_call20_kbytes_contract50_1.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_call20_kbytes_contract50_1.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stQuadraticComplexityTest/test_call20_kbytes_contract50_2.py b/tests/ported_static/stQuadraticComplexityTest/test_call20_kbytes_contract50_2.py index 00f12488c0a..d21dbfb093f 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_call20_kbytes_contract50_2.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_call20_kbytes_contract50_2.py @@ -19,7 +19,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stQuadraticComplexityTest/test_call20_kbytes_contract50_3.py b/tests/ported_static/stQuadraticComplexityTest/test_call20_kbytes_contract50_3.py index 172093e2818..3cf6d13492c 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_call20_kbytes_contract50_3.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_call20_kbytes_contract50_3.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stQuadraticComplexityTest/test_call50000.py b/tests/ported_static/stQuadraticComplexityTest/test_call50000.py index b250e191052..5e85b647dc1 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_call50000.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_call50000.py @@ -19,7 +19,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stQuadraticComplexityTest/test_call50000_ecrec.py b/tests/ported_static/stQuadraticComplexityTest/test_call50000_ecrec.py index 5ef0eba7901..63d129227be 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_call50000_ecrec.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_call50000_ecrec.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stQuadraticComplexityTest/test_call50000_identity.py b/tests/ported_static/stQuadraticComplexityTest/test_call50000_identity.py index 6d52d835c00..407c6ecdb82 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_call50000_identity.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_call50000_identity.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stQuadraticComplexityTest/test_call50000_identity2.py b/tests/ported_static/stQuadraticComplexityTest/test_call50000_identity2.py index f2d27a68845..ac0dc1526b7 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_call50000_identity2.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_call50000_identity2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stQuadraticComplexityTest/test_call50000_rip160.py b/tests/ported_static/stQuadraticComplexityTest/test_call50000_rip160.py index 143a678a724..534d96edc5f 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_call50000_rip160.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_call50000_rip160.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stQuadraticComplexityTest/test_call50000_sha256.py b/tests/ported_static/stQuadraticComplexityTest/test_call50000_sha256.py index 21b44470ceb..8224ca5f2ed 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_call50000_sha256.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_call50000_sha256.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stQuadraticComplexityTest/test_callcode50000.py b/tests/ported_static/stQuadraticComplexityTest/test_callcode50000.py index ad6b43a3b19..5f39c109d36 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_callcode50000.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_callcode50000.py @@ -19,7 +19,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stQuadraticComplexityTest/test_create1000.py b/tests/ported_static/stQuadraticComplexityTest/test_create1000.py index 74c1e0f1112..9108c051a75 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_create1000.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_create1000.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stQuadraticComplexityTest/test_create1000_shnghai.py b/tests/ported_static/stQuadraticComplexityTest/test_create1000_shnghai.py index 81abf9ec742..fa40bd809f2 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_create1000_shnghai.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_create1000_shnghai.py @@ -18,7 +18,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stQuadraticComplexityTest/test_return50000.py b/tests/ported_static/stQuadraticComplexityTest/test_return50000.py index db6a155085d..d5333081f9c 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_return50000.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_return50000.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stQuadraticComplexityTest/test_return50000_2.py b/tests/ported_static/stQuadraticComplexityTest/test_return50000_2.py index 2f1ea8906eb..3e3b87539a1 100644 --- a/tests/ported_static/stQuadraticComplexityTest/test_return50000_2.py +++ b/tests/ported_static/stQuadraticComplexityTest/test_return50000_2.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRefundTest/test_refund_call_to_suicide_no_storage.py b/tests/ported_static/stRefundTest/test_refund_call_to_suicide_no_storage.py index a374d190c0b..5201b7490c3 100644 --- a/tests/ported_static/stRefundTest/test_refund_call_to_suicide_no_storage.py +++ b/tests/ported_static/stRefundTest/test_refund_call_to_suicide_no_storage.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRefundTest/test_refund_call_to_suicide_storage.py b/tests/ported_static/stRefundTest/test_refund_call_to_suicide_storage.py index ebc41bce622..5c335d772fc 100644 --- a/tests/ported_static/stRefundTest/test_refund_call_to_suicide_storage.py +++ b/tests/ported_static/stRefundTest/test_refund_call_to_suicide_storage.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRefundTest/test_refund_call_to_suicide_twice.py b/tests/ported_static/stRefundTest/test_refund_call_to_suicide_twice.py index bbcce3a6ed0..09f45d946d9 100644 --- a/tests/ported_static/stRefundTest/test_refund_call_to_suicide_twice.py +++ b/tests/ported_static/stRefundTest/test_refund_call_to_suicide_twice.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRefundTest/test_refund_suicide50procent_cap.py b/tests/ported_static/stRefundTest/test_refund_suicide50procent_cap.py index 2fc32dac534..3e610ab6684 100644 --- a/tests/ported_static/stRefundTest/test_refund_suicide50procent_cap.py +++ b/tests/ported_static/stRefundTest/test_refund_suicide50procent_cap.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stReturnDataTest/test_modexp_modsize0_returndatasize.py b/tests/ported_static/stReturnDataTest/test_modexp_modsize0_returndatasize.py index b5f159459d4..86b9ab8729c 100644 --- a/tests/ported_static/stReturnDataTest/test_modexp_modsize0_returndatasize.py +++ b/tests/ported_static/stReturnDataTest/test_modexp_modsize0_returndatasize.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stReturnDataTest/test_too_long_return_data_copy.py b/tests/ported_static/stReturnDataTest/test_too_long_return_data_copy.py index ee261f186bc..bb22ca60225 100644 --- a/tests/ported_static/stReturnDataTest/test_too_long_return_data_copy.py +++ b/tests/ported_static/stReturnDataTest/test_too_long_return_data_copy.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRevertTest/test_cost_revert.py b/tests/ported_static/stRevertTest/test_cost_revert.py index 7c6fddec42c..2e83610d30f 100644 --- a/tests/ported_static/stRevertTest/test_cost_revert.py +++ b/tests/ported_static/stRevertTest/test_cost_revert.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRevertTest/test_revert_depth_create_address_collision.py b/tests/ported_static/stRevertTest/test_revert_depth_create_address_collision.py index 21dfadc052b..659bc821516 100644 --- a/tests/ported_static/stRevertTest/test_revert_depth_create_address_collision.py +++ b/tests/ported_static/stRevertTest/test_revert_depth_create_address_collision.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRevertTest/test_revert_depth_create_oog.py b/tests/ported_static/stRevertTest/test_revert_depth_create_oog.py index 12dadbe7ce4..9798ba38051 100644 --- a/tests/ported_static/stRevertTest/test_revert_depth_create_oog.py +++ b/tests/ported_static/stRevertTest/test_revert_depth_create_oog.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRevertTest/test_revert_opcode.py b/tests/ported_static/stRevertTest/test_revert_opcode.py index e76a7ee25f2..086e24cf05a 100644 --- a/tests/ported_static/stRevertTest/test_revert_opcode.py +++ b/tests/ported_static/stRevertTest/test_revert_opcode.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRevertTest/test_revert_opcode_calls.py b/tests/ported_static/stRevertTest/test_revert_opcode_calls.py index 1ac94a6d4f7..b0c9f0e365c 100644 --- a/tests/ported_static/stRevertTest/test_revert_opcode_calls.py +++ b/tests/ported_static/stRevertTest/test_revert_opcode_calls.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRevertTest/test_revert_opcode_create.py b/tests/ported_static/stRevertTest/test_revert_opcode_create.py index 2672aa489e8..55f55f841e2 100644 --- a/tests/ported_static/stRevertTest/test_revert_opcode_create.py +++ b/tests/ported_static/stRevertTest/test_revert_opcode_create.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRevertTest/test_revert_opcode_direct_call.py b/tests/ported_static/stRevertTest/test_revert_opcode_direct_call.py index 76b0eb62908..8f1d519a678 100644 --- a/tests/ported_static/stRevertTest/test_revert_opcode_direct_call.py +++ b/tests/ported_static/stRevertTest/test_revert_opcode_direct_call.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRevertTest/test_revert_opcode_in_calls_on_non_empty_return_data.py b/tests/ported_static/stRevertTest/test_revert_opcode_in_calls_on_non_empty_return_data.py index 83e34b96b21..b75263c8967 100644 --- a/tests/ported_static/stRevertTest/test_revert_opcode_in_calls_on_non_empty_return_data.py +++ b/tests/ported_static/stRevertTest/test_revert_opcode_in_calls_on_non_empty_return_data.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRevertTest/test_revert_opcode_multiple_sub_calls.py b/tests/ported_static/stRevertTest/test_revert_opcode_multiple_sub_calls.py index 4cb54d7251c..ba9f013151f 100644 --- a/tests/ported_static/stRevertTest/test_revert_opcode_multiple_sub_calls.py +++ b/tests/ported_static/stRevertTest/test_revert_opcode_multiple_sub_calls.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRevertTest/test_revert_opcode_return.py b/tests/ported_static/stRevertTest/test_revert_opcode_return.py index 4cd809a728e..9a8525f2473 100644 --- a/tests/ported_static/stRevertTest/test_revert_opcode_return.py +++ b/tests/ported_static/stRevertTest/test_revert_opcode_return.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRevertTest/test_revert_precompiled_touch_exact_oog_paris.py b/tests/ported_static/stRevertTest/test_revert_precompiled_touch_exact_oog_paris.py index ef19a867f29..b3f8f22e6af 100644 --- a/tests/ported_static/stRevertTest/test_revert_precompiled_touch_exact_oog_paris.py +++ b/tests/ported_static/stRevertTest/test_revert_precompiled_touch_exact_oog_paris.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRevertTest/test_revert_precompiled_touch_paris.py b/tests/ported_static/stRevertTest/test_revert_precompiled_touch_paris.py index 5e3ebc1ede5..09932a5acb2 100644 --- a/tests/ported_static/stRevertTest/test_revert_precompiled_touch_paris.py +++ b/tests/ported_static/stRevertTest/test_revert_precompiled_touch_paris.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRevertTest/test_revert_precompiled_touch_storage_paris.py b/tests/ported_static/stRevertTest/test_revert_precompiled_touch_storage_paris.py index 25d6fe6394e..c89413e9e81 100644 --- a/tests/ported_static/stRevertTest/test_revert_precompiled_touch_storage_paris.py +++ b/tests/ported_static/stRevertTest/test_revert_precompiled_touch_storage_paris.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stRevertTest/test_revert_sub_call_storage_oog.py b/tests/ported_static/stRevertTest/test_revert_sub_call_storage_oog.py index db8c009d780..5a93d349e1f 100644 --- a/tests/ported_static/stRevertTest/test_revert_sub_call_storage_oog.py +++ b/tests/ported_static/stRevertTest/test_revert_sub_call_storage_oog.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) diff --git a/tests/ported_static/stRevertTest/test_revert_sub_call_storage_oog2.py b/tests/ported_static/stRevertTest/test_revert_sub_call_storage_oog2.py index 6b5bf707e63..1fefec30de0 100644 --- a/tests/ported_static/stRevertTest/test_revert_sub_call_storage_oog2.py +++ b/tests/ported_static/stRevertTest/test_revert_sub_call_storage_oog2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) diff --git a/tests/ported_static/stSStoreTest/test_sstore_0to0.py b/tests/ported_static/stSStoreTest/test_sstore_0to0.py index 9b3b0321a91..f1fc8b93a61 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_0to0.py +++ b/tests/ported_static/stSStoreTest/test_sstore_0to0.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_0to0to0.py b/tests/ported_static/stSStoreTest/test_sstore_0to0to0.py index a0764f16d91..5da52f3ccc3 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_0to0to0.py +++ b/tests/ported_static/stSStoreTest/test_sstore_0to0to0.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_0to0to_x.py b/tests/ported_static/stSStoreTest/test_sstore_0to0to_x.py index 6fa2b1d32a3..9e4c73475f0 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_0to0to_x.py +++ b/tests/ported_static/stSStoreTest/test_sstore_0to0to_x.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_0to_x.py b/tests/ported_static/stSStoreTest/test_sstore_0to_x.py index 616a7058319..5b63b897bf3 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_0to_x.py +++ b/tests/ported_static/stSStoreTest/test_sstore_0to_x.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_0to_xto0.py b/tests/ported_static/stSStoreTest/test_sstore_0to_xto0.py index 03b3c3bf134..aa796f4012e 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_0to_xto0.py +++ b/tests/ported_static/stSStoreTest/test_sstore_0to_xto0.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_0to_xto0to_x.py b/tests/ported_static/stSStoreTest/test_sstore_0to_xto0to_x.py index 14c8adefa63..ebe4d9ee492 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_0to_xto0to_x.py +++ b/tests/ported_static/stSStoreTest/test_sstore_0to_xto0to_x.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_0to_xto_x.py b/tests/ported_static/stSStoreTest/test_sstore_0to_xto_x.py index 5ba077ae378..2a8f2699529 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_0to_xto_x.py +++ b/tests/ported_static/stSStoreTest/test_sstore_0to_xto_x.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_0to_xto_y.py b/tests/ported_static/stSStoreTest/test_sstore_0to_xto_y.py index e1930122ced..126d97316a7 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_0to_xto_y.py +++ b/tests/ported_static/stSStoreTest/test_sstore_0to_xto_y.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_change_from_external_call_in_init_code.py b/tests/ported_static/stSStoreTest/test_sstore_change_from_external_call_in_init_code.py index f2cd4f56ff1..428680a30c1 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_change_from_external_call_in_init_code.py +++ b/tests/ported_static/stSStoreTest/test_sstore_change_from_external_call_in_init_code.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_gas_left.py b/tests/ported_static/stSStoreTest/test_sstore_gas_left.py index caa81fb185e..bed943ebd60 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_gas_left.py +++ b/tests/ported_static/stSStoreTest/test_sstore_gas_left.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto0.py b/tests/ported_static/stSStoreTest/test_sstore_xto0.py index 5f6bcb9a9af..78bb843dd7a 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto0.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto0.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto0to0.py b/tests/ported_static/stSStoreTest/test_sstore_xto0to0.py index e78926d2c21..253b9b0be00 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto0to0.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto0to0.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto0to_x.py b/tests/ported_static/stSStoreTest/test_sstore_xto0to_x.py index 1f26059f935..ca88d49c557 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto0to_x.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto0to_x.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto0to_xto0.py b/tests/ported_static/stSStoreTest/test_sstore_xto0to_xto0.py index c65fa6c8539..5934a3d39d4 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto0to_xto0.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto0to_xto0.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto0to_y.py b/tests/ported_static/stSStoreTest/test_sstore_xto0to_y.py index 0152a4437bd..e34e8a47d61 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto0to_y.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto0to_y.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_x.py b/tests/ported_static/stSStoreTest/test_sstore_xto_x.py index 624f8477042..c6776b43a87 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_x.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_x.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_xto0.py b/tests/ported_static/stSStoreTest/test_sstore_xto_xto0.py index f8cceff2e08..3a5235c017a 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_xto0.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_xto0.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_xto_x.py b/tests/ported_static/stSStoreTest/test_sstore_xto_xto_x.py index d35b0f6152b..0e01b4c31bf 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_xto_x.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_xto_x.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_xto_y.py b/tests/ported_static/stSStoreTest/test_sstore_xto_xto_y.py index dbddb17fed5..693ad49c335 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_xto_y.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_xto_y.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_y.py b/tests/ported_static/stSStoreTest/test_sstore_xto_y.py index 58220a6d3ea..8d7e0538963 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_y.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_y.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_yto0.py b/tests/ported_static/stSStoreTest/test_sstore_xto_yto0.py index 84a664f84cd..8009bd85849 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_yto0.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_yto0.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_yto_x.py b/tests/ported_static/stSStoreTest/test_sstore_xto_yto_x.py index 2d393c8df0f..c603ee3235f 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_yto_x.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_yto_x.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_yto_y.py b/tests/ported_static/stSStoreTest/test_sstore_xto_yto_y.py index f1a39c8dc91..145e517c274 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_yto_y.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_yto_y.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSStoreTest/test_sstore_xto_yto_z.py b/tests/ported_static/stSStoreTest/test_sstore_xto_yto_z.py index 4e4d7d8f0dc..b2037a0b163 100644 --- a/tests/ported_static/stSStoreTest/test_sstore_xto_yto_z.py +++ b/tests/ported_static/stSStoreTest/test_sstore_xto_yto_z.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSelfBalance/test_self_balance_call_types.py b/tests/ported_static/stSelfBalance/test_self_balance_call_types.py index fb8f5d29929..dd5c1190de6 100644 --- a/tests/ported_static/stSelfBalance/test_self_balance_call_types.py +++ b/tests/ported_static/stSelfBalance/test_self_balance_call_types.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSpecialTest/test_eoa_empty_paris.py b/tests/ported_static/stSpecialTest/test_eoa_empty_paris.py index 5c93c366823..402702484da 100644 --- a/tests/ported_static/stSpecialTest/test_eoa_empty_paris.py +++ b/tests/ported_static/stSpecialTest/test_eoa_empty_paris.py @@ -19,7 +19,7 @@ TransactionException, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStackTests/test_underflow_test.py b/tests/ported_static/stStackTests/test_underflow_test.py index 92b79de5edb..82aba25328b 100644 --- a/tests/ported_static/stStackTests/test_underflow_test.py +++ b/tests/ported_static/stStackTests/test_underflow_test.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_ab_acalls0.py b/tests/ported_static/stStaticCall/test_static_ab_acalls0.py index ca1b6965436..cf758dd319c 100644 --- a/tests/ported_static/stStaticCall/test_static_ab_acalls0.py +++ b/tests/ported_static/stStaticCall/test_static_ab_acalls0.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_ab_acalls1.py b/tests/ported_static/stStaticCall/test_static_ab_acalls1.py index 7f4ceb8d318..8ab15be41fa 100644 --- a/tests/ported_static/stStaticCall/test_static_ab_acalls1.py +++ b/tests/ported_static/stStaticCall/test_static_ab_acalls1.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_ab_acalls2.py b/tests/ported_static/stStaticCall/test_static_ab_acalls2.py index df9f37353a3..8384f816847 100644 --- a/tests/ported_static/stStaticCall/test_static_ab_acalls2.py +++ b/tests/ported_static/stStaticCall/test_static_ab_acalls2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_ab_acalls3.py b/tests/ported_static/stStaticCall/test_static_ab_acalls3.py index 7e32882c2b8..9307d32d4dd 100644 --- a/tests/ported_static/stStaticCall/test_static_ab_acalls3.py +++ b/tests/ported_static/stStaticCall/test_static_ab_acalls3.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_ab_acalls_suicide0.py b/tests/ported_static/stStaticCall/test_static_ab_acalls_suicide0.py index 94fcf44f866..190dfc1259d 100644 --- a/tests/ported_static/stStaticCall/test_static_ab_acalls_suicide0.py +++ b/tests/ported_static/stStaticCall/test_static_ab_acalls_suicide0.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call10.py b/tests/ported_static/stStaticCall/test_static_call10.py index 36c2f6bf4e0..a5d9b50a294 100644 --- a/tests/ported_static/stStaticCall/test_static_call10.py +++ b/tests/ported_static/stStaticCall/test_static_call10.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call1024_balance_too_low.py b/tests/ported_static/stStaticCall/test_static_call1024_balance_too_low.py index c35d515be61..9254d840acc 100644 --- a/tests/ported_static/stStaticCall/test_static_call1024_balance_too_low.py +++ b/tests/ported_static/stStaticCall/test_static_call1024_balance_too_low.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call1024_balance_too_low2.py b/tests/ported_static/stStaticCall/test_static_call1024_balance_too_low2.py index 6b2a4856aee..35b5a14a2fa 100644 --- a/tests/ported_static/stStaticCall/test_static_call1024_balance_too_low2.py +++ b/tests/ported_static/stStaticCall/test_static_call1024_balance_too_low2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call1024_oog.py b/tests/ported_static/stStaticCall/test_static_call1024_oog.py index bdb6507da01..18e3640c124 100644 --- a/tests/ported_static/stStaticCall/test_static_call1024_oog.py +++ b/tests/ported_static/stStaticCall/test_static_call1024_oog.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call1024_pre_calls.py b/tests/ported_static/stStaticCall/test_static_call1024_pre_calls.py index e0d260f263f..afdb481f6bb 100644 --- a/tests/ported_static/stStaticCall/test_static_call1024_pre_calls.py +++ b/tests/ported_static/stStaticCall/test_static_call1024_pre_calls.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call1024_pre_calls2.py b/tests/ported_static/stStaticCall/test_static_call1024_pre_calls2.py index 8cf74830cb1..5e5986f424e 100644 --- a/tests/ported_static/stStaticCall/test_static_call1024_pre_calls2.py +++ b/tests/ported_static/stStaticCall/test_static_call1024_pre_calls2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call1024_pre_calls3.py b/tests/ported_static/stStaticCall/test_static_call1024_pre_calls3.py index 6448a69f8f0..b2e070c67a1 100644 --- a/tests/ported_static/stStaticCall/test_static_call1024_pre_calls3.py +++ b/tests/ported_static/stStaticCall/test_static_call1024_pre_calls3.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call1_mb1024_calldepth.py b/tests/ported_static/stStaticCall/test_static_call1_mb1024_calldepth.py index 09ad53cc867..710e17365c4 100644 --- a/tests/ported_static/stStaticCall/test_static_call1_mb1024_calldepth.py +++ b/tests/ported_static/stStaticCall/test_static_call1_mb1024_calldepth.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call50000.py b/tests/ported_static/stStaticCall/test_static_call50000.py index 00bf19407fd..22c02c0f477 100644 --- a/tests/ported_static/stStaticCall/test_static_call50000.py +++ b/tests/ported_static/stStaticCall/test_static_call50000.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call50000_ecrec.py b/tests/ported_static/stStaticCall/test_static_call50000_ecrec.py index 00a665359f4..57764e7c581 100644 --- a/tests/ported_static/stStaticCall/test_static_call50000_ecrec.py +++ b/tests/ported_static/stStaticCall/test_static_call50000_ecrec.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call50000_identity.py b/tests/ported_static/stStaticCall/test_static_call50000_identity.py index 411f8506a38..77d90028c90 100644 --- a/tests/ported_static/stStaticCall/test_static_call50000_identity.py +++ b/tests/ported_static/stStaticCall/test_static_call50000_identity.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call50000_identity2.py b/tests/ported_static/stStaticCall/test_static_call50000_identity2.py index cbbe552fd44..a5b6a4fb055 100644 --- a/tests/ported_static/stStaticCall/test_static_call50000_identity2.py +++ b/tests/ported_static/stStaticCall/test_static_call50000_identity2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call50000bytes_contract50_1.py b/tests/ported_static/stStaticCall/test_static_call50000bytes_contract50_1.py index c1571a59264..acd219f6509 100644 --- a/tests/ported_static/stStaticCall/test_static_call50000bytes_contract50_1.py +++ b/tests/ported_static/stStaticCall/test_static_call50000bytes_contract50_1.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call50000bytes_contract50_2.py b/tests/ported_static/stStaticCall/test_static_call50000bytes_contract50_2.py index ad164e9725c..3f9ce66baf2 100644 --- a/tests/ported_static/stStaticCall/test_static_call50000bytes_contract50_2.py +++ b/tests/ported_static/stStaticCall/test_static_call50000bytes_contract50_2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call50000bytes_contract50_3.py b/tests/ported_static/stStaticCall/test_static_call50000bytes_contract50_3.py index 1041834efd5..6e44f7f64a3 100644 --- a/tests/ported_static/stStaticCall/test_static_call50000bytes_contract50_3.py +++ b/tests/ported_static/stStaticCall/test_static_call50000bytes_contract50_3.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call_and_callcode_consume_more_gas_then_transaction_has.py b/tests/ported_static/stStaticCall/test_static_call_and_callcode_consume_more_gas_then_transaction_has.py index 1186ce1cc64..40680637909 100644 --- a/tests/ported_static/stStaticCall/test_static_call_and_callcode_consume_more_gas_then_transaction_has.py +++ b/tests/ported_static/stStaticCall/test_static_call_and_callcode_consume_more_gas_then_transaction_has.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call_ask_more_gas_on_depth2_then_transaction_has.py b/tests/ported_static/stStaticCall/test_static_call_ask_more_gas_on_depth2_then_transaction_has.py index 1ff95945afb..d759ef61a43 100644 --- a/tests/ported_static/stStaticCall/test_static_call_ask_more_gas_on_depth2_then_transaction_has.py +++ b/tests/ported_static/stStaticCall/test_static_call_ask_more_gas_on_depth2_then_transaction_has.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call_basic.py b/tests/ported_static/stStaticCall/test_static_call_basic.py index a3cf98b6409..0ae1ef4494b 100644 --- a/tests/ported_static/stStaticCall/test_static_call_basic.py +++ b/tests/ported_static/stStaticCall/test_static_call_basic.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call_change_revert.py b/tests/ported_static/stStaticCall/test_static_call_change_revert.py index 2d6b7295118..b027c5b923a 100644 --- a/tests/ported_static/stStaticCall/test_static_call_change_revert.py +++ b/tests/ported_static/stStaticCall/test_static_call_change_revert.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_and_call_it_oog.py b/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_and_call_it_oog.py index e6b7b771be7..fae59e95f5e 100644 --- a/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_and_call_it_oog.py +++ b/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_and_call_it_oog.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_oog.py b/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_oog.py index cdf25c71569..0d02a44e025 100644 --- a/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_oog.py +++ b/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_oog.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_oog_bonus_gas.py b/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_oog_bonus_gas.py index 33baff843c7..b63b31e9f30 100644 --- a/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_oog_bonus_gas.py +++ b/tests/ported_static/stStaticCall/test_static_call_contract_to_create_contract_oog_bonus_gas.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call_create.py b/tests/ported_static/stStaticCall/test_static_call_create.py index b72fd28baf7..4be9138b3c1 100644 --- a/tests/ported_static/stStaticCall/test_static_call_create.py +++ b/tests/ported_static/stStaticCall/test_static_call_create.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call_create2.py b/tests/ported_static/stStaticCall/test_static_call_create2.py index 98394b0847c..963a0978f46 100644 --- a/tests/ported_static/stStaticCall/test_static_call_create2.py +++ b/tests/ported_static/stStaticCall/test_static_call_create2.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call_ecrecover0_0input.py b/tests/ported_static/stStaticCall/test_static_call_ecrecover0_0input.py index 3e8f4614d9f..497df31654b 100644 --- a/tests/ported_static/stStaticCall/test_static_call_ecrecover0_0input.py +++ b/tests/ported_static/stStaticCall/test_static_call_ecrecover0_0input.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_call_with_high_value_and_gas_oog.py b/tests/ported_static/stStaticCall/test_static_call_with_high_value_and_gas_oog.py index ddf1233324b..544dd1f3758 100644 --- a/tests/ported_static/stStaticCall/test_static_call_with_high_value_and_gas_oog.py +++ b/tests/ported_static/stStaticCall/test_static_call_with_high_value_and_gas_oog.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_callcall_00.py b/tests/ported_static/stStaticCall/test_static_callcall_00.py index 1dc2606afd2..64d247f867d 100644 --- a/tests/ported_static/stStaticCall/test_static_callcall_00.py +++ b/tests/ported_static/stStaticCall/test_static_callcall_00.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_callcall_00_ooge.py b/tests/ported_static/stStaticCall/test_static_callcall_00_ooge.py index 8ba69156208..1134b5ec1d0 100644 --- a/tests/ported_static/stStaticCall/test_static_callcall_00_ooge.py +++ b/tests/ported_static/stStaticCall/test_static_callcall_00_ooge.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_callcall_00_ooge_1.py b/tests/ported_static/stStaticCall/test_static_callcall_00_ooge_1.py index b1f3f3deb06..0beb89c9af8 100644 --- a/tests/ported_static/stStaticCall/test_static_callcall_00_ooge_1.py +++ b/tests/ported_static/stStaticCall/test_static_callcall_00_ooge_1.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_callcallcall_000.py b/tests/ported_static/stStaticCall/test_static_callcallcall_000.py index 2388568f0db..b651110a186 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcall_000.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcall_000.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_callcallcall_000_ooge.py b/tests/ported_static/stStaticCall/test_static_callcallcall_000_ooge.py index 83d2fc21188..5525f928b09 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcall_000_ooge.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcall_000_ooge.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_callcallcallcode_001.py b/tests/ported_static/stStaticCall/test_static_callcallcallcode_001.py index 10695d92061..bdf2ff7adee 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcallcode_001.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcallcode_001.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_callcallcallcode_001_2.py b/tests/ported_static/stStaticCall/test_static_callcallcallcode_001_2.py index f76a30dbfa5..e9a5b85d867 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcallcode_001_2.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcallcode_001_2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_callcallcode_01_2.py b/tests/ported_static/stStaticCall/test_static_callcallcode_01_2.py index 66ab50c76f3..34f2373d64e 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcode_01_2.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcode_01_2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_callcallcodecall_010_2.py b/tests/ported_static/stStaticCall/test_static_callcallcodecall_010_2.py index fbd6b903580..9ad31bf1a4b 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcodecall_010_2.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcodecall_010_2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_2.py b/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_2.py index a9751f80768..77e215d80ac 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_2.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_ooge_2.py b/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_ooge_2.py index 9b73ceaab58..c3f4fd96ad8 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_ooge_2.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_ooge_2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_oogm_before2.py b/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_oogm_before2.py index b0ff081f608..f23461a2a1a 100644 --- a/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_oogm_before2.py +++ b/tests/ported_static/stStaticCall/test_static_callcallcodecallcode_011_oogm_before2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_callcodecall_10_suicide_end2.py b/tests/ported_static/stStaticCall/test_static_callcodecall_10_suicide_end2.py index 92fe9bf3b88..6f1f0ed6e80 100644 --- a/tests/ported_static/stStaticCall/test_static_callcodecall_10_suicide_end2.py +++ b/tests/ported_static/stStaticCall/test_static_callcodecall_10_suicide_end2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_callcodecallcall_100_oogm_after_3.py b/tests/ported_static/stStaticCall/test_static_callcodecallcall_100_oogm_after_3.py index c4003605e60..8b77c0d0840 100644 --- a/tests/ported_static/stStaticCall/test_static_callcodecallcall_100_oogm_after_3.py +++ b/tests/ported_static/stStaticCall/test_static_callcodecallcall_100_oogm_after_3.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_callcodecallcallcode_101_oogm_after_3.py b/tests/ported_static/stStaticCall/test_static_callcodecallcallcode_101_oogm_after_3.py index 7b3110cfe17..808c7b249da 100644 --- a/tests/ported_static/stStaticCall/test_static_callcodecallcallcode_101_oogm_after_3.py +++ b/tests/ported_static/stStaticCall/test_static_callcodecallcallcode_101_oogm_after_3.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_callcodecallcodecall_110_suicide_end2.py b/tests/ported_static/stStaticCall/test_static_callcodecallcodecall_110_suicide_end2.py index 6843361d732..7c7a06e4934 100644 --- a/tests/ported_static/stStaticCall/test_static_callcodecallcodecall_110_suicide_end2.py +++ b/tests/ported_static/stStaticCall/test_static_callcodecallcodecall_110_suicide_end2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_check_opcodes.py b/tests/ported_static/stStaticCall/test_static_check_opcodes.py index c909ed7c8c5..eb432e76401 100644 --- a/tests/ported_static/stStaticCall/test_static_check_opcodes.py +++ b/tests/ported_static/stStaticCall/test_static_check_opcodes.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_check_opcodes2.py b/tests/ported_static/stStaticCall/test_static_check_opcodes2.py index 39abab90f7d..46a6ff3f4ab 100644 --- a/tests/ported_static/stStaticCall/test_static_check_opcodes2.py +++ b/tests/ported_static/stStaticCall/test_static_check_opcodes2.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_check_opcodes3.py b/tests/ported_static/stStaticCall/test_static_check_opcodes3.py index 67c36145697..c3316874700 100644 --- a/tests/ported_static/stStaticCall/test_static_check_opcodes3.py +++ b/tests/ported_static/stStaticCall/test_static_check_opcodes3.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_check_opcodes4.py b/tests/ported_static/stStaticCall/test_static_check_opcodes4.py index d212aec2a60..fbc700e1210 100644 --- a/tests/ported_static/stStaticCall/test_static_check_opcodes4.py +++ b/tests/ported_static/stStaticCall/test_static_check_opcodes4.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_check_opcodes5.py b/tests/ported_static/stStaticCall/test_static_check_opcodes5.py index 253610f1dc7..c11a2a05488 100644 --- a/tests/ported_static/stStaticCall/test_static_check_opcodes5.py +++ b/tests/ported_static/stStaticCall/test_static_check_opcodes5.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_contract_creation_make_call_that_ask_more_gas_then_transaction_provided.py b/tests/ported_static/stStaticCall/test_static_contract_creation_make_call_that_ask_more_gas_then_transaction_provided.py index 82b1fe9027c..acae9e64354 100644 --- a/tests/ported_static/stStaticCall/test_static_contract_creation_make_call_that_ask_more_gas_then_transaction_provided.py +++ b/tests/ported_static/stStaticCall/test_static_contract_creation_make_call_that_ask_more_gas_then_transaction_provided.py @@ -16,7 +16,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_execute_call_that_ask_fore_gas_then_trabsaction_has.py b/tests/ported_static/stStaticCall/test_static_execute_call_that_ask_fore_gas_then_trabsaction_has.py index c48d9cfe3d4..9508a6272ee 100644 --- a/tests/ported_static/stStaticCall/test_static_execute_call_that_ask_fore_gas_then_trabsaction_has.py +++ b/tests/ported_static/stStaticCall/test_static_execute_call_that_ask_fore_gas_then_trabsaction_has.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_loop_calls_then_revert.py b/tests/ported_static/stStaticCall/test_static_loop_calls_then_revert.py index 32fdd9495db..065a19dd3d0 100644 --- a/tests/ported_static/stStaticCall/test_static_loop_calls_then_revert.py +++ b/tests/ported_static/stStaticCall/test_static_loop_calls_then_revert.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_raw_call_gas_ask.py b/tests/ported_static/stStaticCall/test_static_raw_call_gas_ask.py index 0ea735ae867..28ee2fbefbd 100644 --- a/tests/ported_static/stStaticCall/test_static_raw_call_gas_ask.py +++ b/tests/ported_static/stStaticCall/test_static_raw_call_gas_ask.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_refund_call_to_suicide_twice.py b/tests/ported_static/stStaticCall/test_static_refund_call_to_suicide_twice.py index 6860878412f..4d9ad41aaac 100644 --- a/tests/ported_static/stStaticCall/test_static_refund_call_to_suicide_twice.py +++ b/tests/ported_static/stStaticCall/test_static_refund_call_to_suicide_twice.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stStaticCall/test_static_return_bounds_oog.py b/tests/ported_static/stStaticCall/test_static_return_bounds_oog.py index f6d2df13154..060aaefffe6 100644 --- a/tests/ported_static/stStaticCall/test_static_return_bounds_oog.py +++ b/tests/ported_static/stStaticCall/test_static_return_bounds_oog.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSystemOperationsTest/test_call_to_name_registrator_zeor_size_mem_expansion.py b/tests/ported_static/stSystemOperationsTest/test_call_to_name_registrator_zeor_size_mem_expansion.py index 9fabe5dbf41..7fd197a0779 100644 --- a/tests/ported_static/stSystemOperationsTest/test_call_to_name_registrator_zeor_size_mem_expansion.py +++ b/tests/ported_static/stSystemOperationsTest/test_call_to_name_registrator_zeor_size_mem_expansion.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSystemOperationsTest/test_callcode_to_name_registrator_zero_mem_expanion.py b/tests/ported_static/stSystemOperationsTest/test_callcode_to_name_registrator_zero_mem_expanion.py index e00c3e9847b..edca27132df 100644 --- a/tests/ported_static/stSystemOperationsTest/test_callcode_to_name_registrator_zero_mem_expanion.py +++ b/tests/ported_static/stSystemOperationsTest/test_callcode_to_name_registrator_zero_mem_expanion.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSystemOperationsTest/test_double_selfdestruct_test.py b/tests/ported_static/stSystemOperationsTest/test_double_selfdestruct_test.py index 49d06c563b2..65291ceea03 100644 --- a/tests/ported_static/stSystemOperationsTest/test_double_selfdestruct_test.py +++ b/tests/ported_static/stSystemOperationsTest/test_double_selfdestruct_test.py @@ -22,7 +22,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSystemOperationsTest/test_double_selfdestruct_touch_paris.py b/tests/ported_static/stSystemOperationsTest/test_double_selfdestruct_touch_paris.py index 26364936fba..45cabd9d614 100644 --- a/tests/ported_static/stSystemOperationsTest/test_double_selfdestruct_touch_paris.py +++ b/tests/ported_static/stSystemOperationsTest/test_double_selfdestruct_touch_paris.py @@ -20,7 +20,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stSystemOperationsTest/test_multi_selfdestruct.py b/tests/ported_static/stSystemOperationsTest/test_multi_selfdestruct.py index 3ce56c97495..ea17ab787f6 100644 --- a/tests/ported_static/stSystemOperationsTest/test_multi_selfdestruct.py +++ b/tests/ported_static/stSystemOperationsTest/test_multi_selfdestruct.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stTransactionTest/test_no_src_account.py b/tests/ported_static/stTransactionTest/test_no_src_account.py index 1a5c3d9e625..d6eb28aeefe 100644 --- a/tests/ported_static/stTransactionTest/test_no_src_account.py +++ b/tests/ported_static/stTransactionTest/test_no_src_account.py @@ -18,7 +18,7 @@ TransactionException, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stTransactionTest/test_no_src_account1559.py b/tests/ported_static/stTransactionTest/test_no_src_account1559.py index d87e3e0e0be..a71b761ac9f 100644 --- a/tests/ported_static/stTransactionTest/test_no_src_account1559.py +++ b/tests/ported_static/stTransactionTest/test_no_src_account1559.py @@ -18,7 +18,7 @@ TransactionException, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stTransactionTest/test_no_src_account_create.py b/tests/ported_static/stTransactionTest/test_no_src_account_create.py index eb70f1d3636..f21b1e689ef 100644 --- a/tests/ported_static/stTransactionTest/test_no_src_account_create.py +++ b/tests/ported_static/stTransactionTest/test_no_src_account_create.py @@ -18,7 +18,7 @@ TransactionException, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stTransactionTest/test_no_src_account_create1559.py b/tests/ported_static/stTransactionTest/test_no_src_account_create1559.py index 8438ccb8900..c8683fe4978 100644 --- a/tests/ported_static/stTransactionTest/test_no_src_account_create1559.py +++ b/tests/ported_static/stTransactionTest/test_no_src_account_create1559.py @@ -17,7 +17,7 @@ TransactionException, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stTransactionTest/test_opcodes_transaction_init.py b/tests/ported_static/stTransactionTest/test_opcodes_transaction_init.py index f93284cfd53..149f3d57764 100644 --- a/tests/ported_static/stTransactionTest/test_opcodes_transaction_init.py +++ b/tests/ported_static/stTransactionTest/test_opcodes_transaction_init.py @@ -18,7 +18,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stTransactionTest/test_overflow_gas_require2.py b/tests/ported_static/stTransactionTest/test_overflow_gas_require2.py index 6b78f079f48..4d600d97a6f 100644 --- a/tests/ported_static/stTransactionTest/test_overflow_gas_require2.py +++ b/tests/ported_static/stTransactionTest/test_overflow_gas_require2.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post_fork, ) diff --git a/tests/ported_static/stTransactionTest/test_suicides_and_internal_call_suicides_success.py b/tests/ported_static/stTransactionTest/test_suicides_and_internal_call_suicides_success.py index d0240ef8265..a5303d049fb 100644 --- a/tests/ported_static/stTransactionTest/test_suicides_and_internal_call_suicides_success.py +++ b/tests/ported_static/stTransactionTest/test_suicides_and_internal_call_suicides_success.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stWalletTest/test_multi_owned_construction_not_enough_gas_partial.py b/tests/ported_static/stWalletTest/test_multi_owned_construction_not_enough_gas_partial.py index 22e4a3b9a29..caf4d27ddc3 100644 --- a/tests/ported_static/stWalletTest/test_multi_owned_construction_not_enough_gas_partial.py +++ b/tests/ported_static/stWalletTest/test_multi_owned_construction_not_enough_gas_partial.py @@ -17,7 +17,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) diff --git a/tests/ported_static/stWalletTest/test_wallet_construction_oog.py b/tests/ported_static/stWalletTest/test_wallet_construction_oog.py index d10fa9cb910..f32c6e8fefc 100644 --- a/tests/ported_static/stWalletTest/test_wallet_construction_oog.py +++ b/tests/ported_static/stWalletTest/test_wallet_construction_oog.py @@ -18,7 +18,7 @@ compute_create_address, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) diff --git a/tests/ported_static/stZeroKnowledge/test_pairing_test.py b/tests/ported_static/stZeroKnowledge/test_pairing_test.py index bf844166115..191d7da1b9c 100644 --- a/tests/ported_static/stZeroKnowledge/test_pairing_test.py +++ b/tests/ported_static/stZeroKnowledge/test_pairing_test.py @@ -16,7 +16,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stZeroKnowledge/test_point_mul_add.py b/tests/ported_static/stZeroKnowledge/test_point_mul_add.py index 85872c32263..76c45f40dae 100644 --- a/tests/ported_static/stZeroKnowledge/test_point_mul_add.py +++ b/tests/ported_static/stZeroKnowledge/test_point_mul_add.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/stZeroKnowledge/test_point_mul_add2.py b/tests/ported_static/stZeroKnowledge/test_point_mul_add2.py index 7722b69ba5a..3d019627c81 100644 --- a/tests/ported_static/stZeroKnowledge/test_point_mul_add2.py +++ b/tests/ported_static/stZeroKnowledge/test_point_mul_add2.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmArithmeticTest/test_add.py b/tests/ported_static/vmArithmeticTest/test_add.py index 38a910bcf77..4efb7ffcd0c 100644 --- a/tests/ported_static/vmArithmeticTest/test_add.py +++ b/tests/ported_static/vmArithmeticTest/test_add.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmArithmeticTest/test_addmod.py b/tests/ported_static/vmArithmeticTest/test_addmod.py index 122864ca167..ef630839c3c 100644 --- a/tests/ported_static/vmArithmeticTest/test_addmod.py +++ b/tests/ported_static/vmArithmeticTest/test_addmod.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmArithmeticTest/test_div.py b/tests/ported_static/vmArithmeticTest/test_div.py index 5a13e87254f..12e0b3cf155 100644 --- a/tests/ported_static/vmArithmeticTest/test_div.py +++ b/tests/ported_static/vmArithmeticTest/test_div.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmArithmeticTest/test_exp.py b/tests/ported_static/vmArithmeticTest/test_exp.py index 5514c6d2f91..f5e13412a9d 100644 --- a/tests/ported_static/vmArithmeticTest/test_exp.py +++ b/tests/ported_static/vmArithmeticTest/test_exp.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmArithmeticTest/test_mod.py b/tests/ported_static/vmArithmeticTest/test_mod.py index 44970acfe0f..bd3f9125cb7 100644 --- a/tests/ported_static/vmArithmeticTest/test_mod.py +++ b/tests/ported_static/vmArithmeticTest/test_mod.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmArithmeticTest/test_mul.py b/tests/ported_static/vmArithmeticTest/test_mul.py index dd176fbf7cd..e52669c6173 100644 --- a/tests/ported_static/vmArithmeticTest/test_mul.py +++ b/tests/ported_static/vmArithmeticTest/test_mul.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmArithmeticTest/test_mulmod.py b/tests/ported_static/vmArithmeticTest/test_mulmod.py index 173ad89d1cc..9422703524f 100644 --- a/tests/ported_static/vmArithmeticTest/test_mulmod.py +++ b/tests/ported_static/vmArithmeticTest/test_mulmod.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmArithmeticTest/test_sdiv.py b/tests/ported_static/vmArithmeticTest/test_sdiv.py index 7c360e52047..31c151d8614 100644 --- a/tests/ported_static/vmArithmeticTest/test_sdiv.py +++ b/tests/ported_static/vmArithmeticTest/test_sdiv.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmArithmeticTest/test_signextend.py b/tests/ported_static/vmArithmeticTest/test_signextend.py index d05e6c2c264..00746d2b504 100644 --- a/tests/ported_static/vmArithmeticTest/test_signextend.py +++ b/tests/ported_static/vmArithmeticTest/test_signextend.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmArithmeticTest/test_smod.py b/tests/ported_static/vmArithmeticTest/test_smod.py index 728f89a210b..862d5dfea21 100644 --- a/tests/ported_static/vmArithmeticTest/test_smod.py +++ b/tests/ported_static/vmArithmeticTest/test_smod.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmArithmeticTest/test_sub.py b/tests/ported_static/vmArithmeticTest/test_sub.py index 2d8d2654766..17289e2401f 100644 --- a/tests/ported_static/vmArithmeticTest/test_sub.py +++ b/tests/ported_static/vmArithmeticTest/test_sub.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_and.py b/tests/ported_static/vmBitwiseLogicOperation/test_and.py index 919c2763837..46a3e3fefb1 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_and.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_and.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_byte.py b/tests/ported_static/vmBitwiseLogicOperation/test_byte.py index 56887a82b99..188d83ec4a6 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_byte.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_byte.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_eq.py b/tests/ported_static/vmBitwiseLogicOperation/test_eq.py index 3c20ccd8773..bb1adac28fc 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_eq.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_eq.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_gt.py b/tests/ported_static/vmBitwiseLogicOperation/test_gt.py index 06e1b39c681..9b96876fbf5 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_gt.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_gt.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_iszero.py b/tests/ported_static/vmBitwiseLogicOperation/test_iszero.py index e83fe80b0d8..fa56cbb39d5 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_iszero.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_iszero.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_lt.py b/tests/ported_static/vmBitwiseLogicOperation/test_lt.py index d2be95c3d03..6df42c8efa1 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_lt.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_lt.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_not.py b/tests/ported_static/vmBitwiseLogicOperation/test_not.py index 4b4e07d8dd0..eccd888f82b 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_not.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_not.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_or.py b/tests/ported_static/vmBitwiseLogicOperation/test_or.py index 7fc19e60d81..8d182673025 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_or.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_or.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_sgt.py b/tests/ported_static/vmBitwiseLogicOperation/test_sgt.py index 5164480e359..2170d00687e 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_sgt.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_sgt.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_slt.py b/tests/ported_static/vmBitwiseLogicOperation/test_slt.py index fc950a2787d..6551df02aaa 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_slt.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_slt.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmBitwiseLogicOperation/test_xor.py b/tests/ported_static/vmBitwiseLogicOperation/test_xor.py index b5bdb7b26bf..10dfcbc1a8c 100644 --- a/tests/ported_static/vmBitwiseLogicOperation/test_xor.py +++ b/tests/ported_static/vmBitwiseLogicOperation/test_xor.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmIOandFlowOperations/test_codecopy.py b/tests/ported_static/vmIOandFlowOperations/test_codecopy.py index bfc509a4799..0640c3f7821 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_codecopy.py +++ b/tests/ported_static/vmIOandFlowOperations/test_codecopy.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmIOandFlowOperations/test_gas.py b/tests/ported_static/vmIOandFlowOperations/test_gas.py index fdfe01710a7..1d1ed40f988 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_gas.py +++ b/tests/ported_static/vmIOandFlowOperations/test_gas.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmIOandFlowOperations/test_jump.py b/tests/ported_static/vmIOandFlowOperations/test_jump.py index ba214f9deca..89f3db731f0 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_jump.py +++ b/tests/ported_static/vmIOandFlowOperations/test_jump.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmIOandFlowOperations/test_jump_to_push.py b/tests/ported_static/vmIOandFlowOperations/test_jump_to_push.py index f3168e3b044..04a3e713208 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_jump_to_push.py +++ b/tests/ported_static/vmIOandFlowOperations/test_jump_to_push.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmIOandFlowOperations/test_jumpi.py b/tests/ported_static/vmIOandFlowOperations/test_jumpi.py index c2da7dde412..e9ffcfc3705 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_jumpi.py +++ b/tests/ported_static/vmIOandFlowOperations/test_jumpi.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmIOandFlowOperations/test_loops_conditionals.py b/tests/ported_static/vmIOandFlowOperations/test_loops_conditionals.py index ec091a54e3d..cd5a0c60f3e 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_loops_conditionals.py +++ b/tests/ported_static/vmIOandFlowOperations/test_loops_conditionals.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmIOandFlowOperations/test_mload.py b/tests/ported_static/vmIOandFlowOperations/test_mload.py index cf11bf25816..0378a6c93e3 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_mload.py +++ b/tests/ported_static/vmIOandFlowOperations/test_mload.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmIOandFlowOperations/test_msize.py b/tests/ported_static/vmIOandFlowOperations/test_msize.py index 5cc3faad9f2..ca83b3765db 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_msize.py +++ b/tests/ported_static/vmIOandFlowOperations/test_msize.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmIOandFlowOperations/test_mstore.py b/tests/ported_static/vmIOandFlowOperations/test_mstore.py index 8ab043b473a..d1f5c038b48 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_mstore.py +++ b/tests/ported_static/vmIOandFlowOperations/test_mstore.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmIOandFlowOperations/test_mstore8.py b/tests/ported_static/vmIOandFlowOperations/test_mstore8.py index 23cc67ce2c1..96a445facd4 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_mstore8.py +++ b/tests/ported_static/vmIOandFlowOperations/test_mstore8.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmIOandFlowOperations/test_pc.py b/tests/ported_static/vmIOandFlowOperations/test_pc.py index fc3df94d285..9b6a8f3d654 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_pc.py +++ b/tests/ported_static/vmIOandFlowOperations/test_pc.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmIOandFlowOperations/test_pop.py b/tests/ported_static/vmIOandFlowOperations/test_pop.py index 9e49f6e31bc..1e5b1d59de9 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_pop.py +++ b/tests/ported_static/vmIOandFlowOperations/test_pop.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmIOandFlowOperations/test_return.py b/tests/ported_static/vmIOandFlowOperations/test_return.py index 17e39f195f8..5e09bbbe4b0 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_return.py +++ b/tests/ported_static/vmIOandFlowOperations/test_return.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmIOandFlowOperations/test_sstore_sload.py b/tests/ported_static/vmIOandFlowOperations/test_sstore_sload.py index 21b82a91fe5..9ab1afc2764 100644 --- a/tests/ported_static/vmIOandFlowOperations/test_sstore_sload.py +++ b/tests/ported_static/vmIOandFlowOperations/test_sstore_sload.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmLogTest/test_log0.py b/tests/ported_static/vmLogTest/test_log0.py index d743762ab28..ee9e2b29797 100644 --- a/tests/ported_static/vmLogTest/test_log0.py +++ b/tests/ported_static/vmLogTest/test_log0.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmLogTest/test_log1.py b/tests/ported_static/vmLogTest/test_log1.py index b4309d454e6..8a156ddc767 100644 --- a/tests/ported_static/vmLogTest/test_log1.py +++ b/tests/ported_static/vmLogTest/test_log1.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmLogTest/test_log2.py b/tests/ported_static/vmLogTest/test_log2.py index 95fa656fe44..8024c9c4b3b 100644 --- a/tests/ported_static/vmLogTest/test_log2.py +++ b/tests/ported_static/vmLogTest/test_log2.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmLogTest/test_log3.py b/tests/ported_static/vmLogTest/test_log3.py index a763ee5fd27..7174b9ff19e 100644 --- a/tests/ported_static/vmLogTest/test_log3.py +++ b/tests/ported_static/vmLogTest/test_log3.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmLogTest/test_log4.py b/tests/ported_static/vmLogTest/test_log4.py index 3266265017a..a079f42d990 100644 --- a/tests/ported_static/vmLogTest/test_log4.py +++ b/tests/ported_static/vmLogTest/test_log4.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmTests/test_block_info.py b/tests/ported_static/vmTests/test_block_info.py index 57fc33cc47d..3f18be7e2cf 100644 --- a/tests/ported_static/vmTests/test_block_info.py +++ b/tests/ported_static/vmTests/test_block_info.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmTests/test_env_info.py b/tests/ported_static/vmTests/test_env_info.py index 67c2e62f6d6..0e9c837229a 100644 --- a/tests/ported_static/vmTests/test_env_info.py +++ b/tests/ported_static/vmTests/test_env_info.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmTests/test_random.py b/tests/ported_static/vmTests/test_random.py index 5a64236ce99..e3a5f84b62c 100644 --- a/tests/ported_static/vmTests/test_random.py +++ b/tests/ported_static/vmTests/test_random.py @@ -17,7 +17,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmTests/test_sha3.py b/tests/ported_static/vmTests/test_sha3.py index a3805b31105..dd677286fa8 100644 --- a/tests/ported_static/vmTests/test_sha3.py +++ b/tests/ported_static/vmTests/test_sha3.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op diff --git a/tests/ported_static/vmTests/test_suicide.py b/tests/ported_static/vmTests/test_suicide.py index 02c1db148af..b4730930154 100644 --- a/tests/ported_static/vmTests/test_suicide.py +++ b/tests/ported_static/vmTests/test_suicide.py @@ -18,7 +18,7 @@ Transaction, ) from execution_testing.forks import Fork -from execution_testing.specs.static_state.expect_section import ( +from execution_testing.specs.post_state_resolution import ( resolve_expect_post, ) from execution_testing.vm import Op