From b74a73dc5c4a433b118a839bf15300f16a126fff Mon Sep 17 00:00:00 2001 From: Hugo De la cruz Date: Wed, 28 Aug 2024 21:49:31 -0700 Subject: [PATCH 1/3] Add new exceptions --- .../evmone_exceptions.py | 8 +++++++- src/ethereum_test_exceptions/exceptions.py | 18 +++++++++++++++++- .../test_subcontainer_validation.py | 2 +- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/ethereum_test_exceptions/evmone_exceptions.py b/src/ethereum_test_exceptions/evmone_exceptions.py index a23e27bf85..a056076f35 100644 --- a/src/ethereum_test_exceptions/evmone_exceptions.py +++ b/src/ethereum_test_exceptions/evmone_exceptions.py @@ -36,6 +36,7 @@ class EvmoneExceptionMapper: ExceptionMessage( EOFException.INVALID_NON_RETURNING_FLAG, "err: invalid_non_returning_flag" ), + ExceptionMessage(EOFException.CALLF_TO_NON_RETURNING_FUNCTION, "err: callf_to_non_returning_function"), ExceptionMessage(EOFException.INVALID_MAGIC, "err: invalid_prefix"), ExceptionMessage( EOFException.INVALID_FIRST_SECTION_TYPE, "err: invalid_first_section_type" @@ -57,6 +58,7 @@ class EvmoneExceptionMapper: ExceptionMessage(EOFException.INVALID_RJUMP_DESTINATION, "err: invalid_rjump_destination"), ExceptionMessage(EOFException.UNREACHABLE_CODE_SECTIONS, "err: unreachable_code_sections"), ExceptionMessage(EOFException.STACK_UNDERFLOW, "err: stack_underflow"), + ExceptionMessage(EOFException.STACK_OVERFLOW, "err: stack_overflow"), ExceptionMessage( EOFException.MAX_STACK_HEIGHT_ABOVE_LIMIT, "err: max_stack_height_above_limit" ), @@ -84,10 +86,14 @@ class EvmoneExceptionMapper: EOFException.INCOMPATIBLE_CONTAINER_KIND, "err: incompatible_container_kind" ), ExceptionMessage(EOFException.STACK_HEIGHT_MISMATCH, "err: stack_height_mismatch"), - ExceptionMessage(EOFException.TOO_MANY_CONTAINERS, "err: too_many_container_sections"), + ExceptionMessage(EOFException.TOO_MANY_CONTAINER_SECTIONS, "err: too_many_container_sections"), + ExceptionMessage(EOFException.EOF_CREATE_WITH_TRUNCATED_CONTAINER, "err: eofcreate_with_truncated_container"), ExceptionMessage( EOFException.INVALID_CODE_SECTION_INDEX, "err: invalid_code_section_index" ), + ExceptionMessage( + EOFException.AMBIGUOUS_CONTAINER_KIND, "err: ambiguous_container_kind" + ), ) def __init__(self) -> None: diff --git a/src/ethereum_test_exceptions/exceptions.py b/src/ethereum_test_exceptions/exceptions.py index f2c19f2937..e1a0e96eff 100644 --- a/src/ethereum_test_exceptions/exceptions.py +++ b/src/ethereum_test_exceptions/exceptions.py @@ -589,6 +589,10 @@ class EOFException(ExceptionBase): """ EOF container's section has non-returning flag set incorrectly. """ + CALLF_TO_NON_RETURNING_FUNCTION = auto() + """ + EOF container's section has CALLF instruction to non-returning function. + """ INVALID_RJUMP_DESTINATION = auto() """ Code has RJUMP instruction with invalid parameters. @@ -665,6 +669,10 @@ class EOFException(ExceptionBase): """ EOF container header has too many code sections. """ + EOF_CREATE_WITH_TRUNCATED_CONTAINER = auto() + """ + EOF Create has truncated container. + """ MISSING_STOP_OPCODE = auto() """ EOF container's code missing STOP bytecode at it's end. @@ -685,6 +693,10 @@ class EOFException(ExceptionBase): """ EOF container's code produces an stack underflow. """ + STACK_OVERFLOW = auto() + """ + EOF container's code produces an stack overflow. + """ STACK_HEIGHT_MISMATCH = auto() """ EOF container section stack height mismatch. @@ -734,7 +746,7 @@ class EOFException(ExceptionBase): """ Incompatible instruction found in a container of a specific kind. """ - TOO_MANY_CONTAINERS = auto() + TOO_MANY_CONTAINER_SECTIONS = auto() """ EOF container header has too many sub-containers. """ @@ -746,6 +758,10 @@ class EOFException(ExceptionBase): """ Header parsing encounterd a section kind it wasn't expecting """ + AMBIGUOUS_CONTAINER_KIND = auto() + """ + Container referenced by eofcreate and returncontract. + """ """ diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_subcontainer_validation.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_subcontainer_validation.py index f882e478b5..e497a88851 100644 --- a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_subcontainer_validation.py +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_subcontainer_validation.py @@ -595,7 +595,7 @@ def test_deep_container( ["width", "exception"], [ pytest.param(256, None, id="256"), - pytest.param(257, EOFException.TOO_MANY_CONTAINERS, id="257"), + pytest.param(257, EOFException.TOO_MANY_CONTAINER_SECTIONS, id="257"), pytest.param(0x8000, EOFException.CONTAINER_SIZE_ABOVE_LIMIT, id="negative_i16"), pytest.param(0xFFFF, EOFException.CONTAINER_SIZE_ABOVE_LIMIT, id="max_u16"), ], From b570b79953a8e3948f51ac96b5ba5903c814339a Mon Sep 17 00:00:00 2001 From: Hugo De la cruz Date: Wed, 18 Sep 2024 22:37:13 -0700 Subject: [PATCH 2/3] Consider container kind to determine if container is duplicated --- src/ethereum_test_specs/eof.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/ethereum_test_specs/eof.py b/src/ethereum_test_specs/eof.py index 924e667050..9d40447191 100644 --- a/src/ethereum_test_specs/eof.py +++ b/src/ethereum_test_specs/eof.py @@ -7,7 +7,7 @@ from pathlib import Path from shutil import which from subprocess import CompletedProcess -from typing import Any, Callable, ClassVar, Dict, Generator, List, Optional, Type +from typing import Any, Callable, ClassVar, Dict, Generator, List, Optional, Tuple, Type import pytest from pydantic import Field, model_validator @@ -32,7 +32,7 @@ from .base import BaseTest from .state import StateTest -existing_tests: Dict[Bytes, str] = {} +existing_tests: Dict[Tuple[Bytes, ContainerKind], str] = {} class EOFBaseException(Exception): @@ -203,11 +203,12 @@ def make_eof_test_fixture( """ Generate the EOF test fixture. """ - if self.data in existing_tests: + container_kind = self.container_kind or ContainerKind.RUNTIME + if (self.data, container_kind) in existing_tests: pytest.fail( - f"Duplicate EOF test: {self.data}, existing test: {existing_tests[self.data]}" + f"Duplicate EOF test: {self.data} ({container_kind}), existing test: {existing_tests[self.data, container_kind]}" ) - existing_tests[self.data] = request.node.nodeid + existing_tests[(self.data, container_kind)] = request.node.nodeid vectors = [ Vector( code=self.data, @@ -386,7 +387,8 @@ def generate( Generate the BlockchainTest fixture. """ if fixture_format == EOFFixture: - if self.data in existing_tests: + container_kind = self.container_kind or ContainerKind.RUNTIME + if (self.data, container_kind) in existing_tests: # Gracefully skip duplicate tests because one EOFStateTest can generate multiple # state fixtures with the same data. pytest.skip(f"Duplicate EOF container on EOFStateTest: {request.node.nodeid}") From a801a2bdb1728f17698311bde6851f142d988532 Mon Sep 17 00:00:00 2001 From: Hugo De la cruz Date: Tue, 15 Oct 2024 21:50:20 -0700 Subject: [PATCH 3/3] Add evmone generated tests --- .../test_data_section_missing.py | 56 + .../test_deprecated_instructions.py | 225 + .../test_eof1_code_section_0_size.py | 75 + .../test_eof1_code_section_missing.py | 57 + ...t_eof1_data_section_before_code_section.py | 63 + ..._eof1_data_section_before_types_section.py | 65 + .../test_eof1_header_not_terminated.py | 72 + .../test_eof1_invalid_section_0_type.py | 69 + .../test_eof1_invalid_type_section_size.py | 183 + .../test_eof1_multiple_data_sections.py | 62 + .../test_eof1_multiple_type_sections.py | 102 + .../eip3540_eof_v1/test_eof1_section_order.py | 437 ++ ...er_containing_unreachable_code_sections.py | 76 + .../test_eof1_too_many_code_sections.py | 50 + .../test_eof1_trailing_bytes_top_level.py | 96 + .../test_eof1_truncated_push.py | 6753 +++++++++++++++++ .../test_eof1_type_section_not_first.py | 160 + .../test_eof1_types_section_0_size.py | 77 + .../test_eof1_types_section_missing.py | 128 + .../test_eof1_undefined_opcodes.py | 2398 ++++++ .../test_eof1_unknown_section.py | 183 + .../test_incomplete_section_size.py | 53 + .../eip3540_eof_v1/test_max_stack_height.py | 146 + .../test_minimal_valid_eof1_code_with_data.py | 46 + ...nimal_valid_eof1_multiple_code_sections.py | 91 + ..._valid_eof1_multiple_container_sections.py | 68 + .../test_multiple_code_sections_headers.py | 76 + .../test_unreachable_code_sections.py | 153 + .../test_validate_eof_prefix.py | 148 + .../test_validate_eof_version.py | 182 + .../test_eof1_rjump_invalid_destination.py | 120 + .../test_eof1_rjumpi_invalid_destination.py | 144 + .../test_eof1_rjumpi_truncated.py | 57 + .../test_eof1_rjumpv_invalid_destination.py | 192 + .../test_eof1_rjumpv_truncated.py | 81 + .../test_eof1_valid_rjump.py | 69 + .../test_eof1_valid_rjumpi.py | 69 + .../test_eof1_valid_rjumpv.py | 81 + .../test_callf_into_nonreturning.py | 46 + .../test_callf_invalid_code_section_index.py | 45 + .../test_eof1_callf_truncated.py | 57 + .../test_max_arguments_count.py | 85 + .../test_non_returning_status.py | 155 + .../test_backwards_rjump.py | 93 + .../test_backwards_rjump_variable_stack.py | 117 + .../test_backwards_rjumpi.py | 153 + .../test_backwards_rjumpi_variable_stack.py | 141 + .../test_backwards_rjumpv.py | 129 + .../test_backwards_rjumpv_variable_stack.py | 129 + .../test_callf_stack_overflow.py | 100 + ...est_callf_stack_overflow_variable_stack.py | 111 + .../test_callf_stack_validation.py | 75 + .../test_callf_with_inputs_stack_overflow.py | 111 + ...th_inputs_stack_overflow_variable_stack.py | 163 + .../test_dupn_stack_validation.py | 105 + .../test_exchange_deep_stack_validation.py | 45 + .../test_exchange_stack_validation.py | 309 + .../test_forwards_rjump.py | 81 + .../test_forwards_rjump_variable_stack.py | 93 + .../test_forwards_rjumpi.py | 189 + .../test_forwards_rjumpi_variable_stack.py | 189 + .../test_forwards_rjumpv.py | 153 + .../test_forwards_rjumpv_variable_stack.py | 153 + .../test_jumpf_stack_overflow.py | 95 + ...est_jumpf_stack_overflow_variable_stack.py | 110 + .../test_jumpf_to_nonreturning.py | 85 + ...st_jumpf_to_nonreturning_variable_stack.py | 85 + .../test_jumpf_to_returning.py | 187 + .../test_jumpf_to_returning_variable_stack.py | 145 + .../test_jumpf_with_inputs_stack_overflow.py | 72 + ...th_inputs_stack_overflow_variable_stack.py | 98 + .../test_no_terminating_instruction.py | 69 + .../test_non_constant_stack_height.py | 69 + .../test_retf_stack_validation.py | 85 + .../test_retf_variable_stack.py | 85 + .../test_self_referencing_jumps.py | 57 + ...t_self_referencing_jumps_variable_stack.py | 69 + .../test_stack_range_maximally_broad.py | 73 + .../test_swapn_stack_validation.py | 105 + .../test_underflow.py | 85 + .../test_underflow_variable_stack.py | 123 + .../test_unreachable_instructions.py | 45 + .../test_eof1_code_section_offset.py | 47 + .../test_jumpf_compatible_outputs.py | 47 + .../eip6206_jumpf/test_jumpf_equal_outputs.py | 47 + .../test_jumpf_incompatible_outputs.py | 47 + .../eip7480_data_section/test_dataloadn.py | 136 + .../test_eof1_dataloadn_truncated.py | 57 + .../test_eof1_embedded_container.py | 180 + .../test_eof1_embedded_container_invalid.py | 240 + .../test_eof1_eofcreate_invalid.py | 144 + .../test_eof1_eofcreate_valid.py | 88 + .../test_eof1_returncontract_invalid.py | 93 + .../test_eof1_returncontract_valid.py | 59 + ...est_eof1_trailing_bytes_in_subcontainer.py | 81 + ..._eof1_unreferenced_subcontainer_invalid.py | 52 + ...returncontract_targeting_same_container.py | 79 + ...est_eofcreate_return_and_returncontract.py | 59 + .../test_eofcreate_stop_and_returncontract.py | 59 + .../test_initcode_container_return.py | 65 + .../test_initcode_container_revert.py | 65 + .../test_initcode_container_stop.py | 65 + .../test_max_nested_containers_eofcreate.py | 61 + ...ted_containers_eofcreate_returncontract.py | 69 + .../test_runtime_container_return.py | 91 + .../test_runtime_container_returncontract.py | 112 + .../test_runtime_container_revert.py | 91 + .../test_runtime_container_stop.py | 79 + 108 files changed, 20145 insertions(+) create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_data_section_missing.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_deprecated_instructions.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_code_section_0_size.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_code_section_missing.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_data_section_before_code_section.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_data_section_before_types_section.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_header_not_terminated.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_invalid_section_0_type.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_invalid_type_section_size.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_multiple_data_sections.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_multiple_type_sections.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_section_order.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_subcontainer_containing_unreachable_code_sections.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_too_many_code_sections.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_trailing_bytes_top_level.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_truncated_push.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_type_section_not_first.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_types_section_0_size.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_types_section_missing.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_undefined_opcodes.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_unknown_section.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_incomplete_section_size.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_max_stack_height.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_minimal_valid_eof1_code_with_data.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_minimal_valid_eof1_multiple_code_sections.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_minimal_valid_eof1_multiple_container_sections.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_multiple_code_sections_headers.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_unreachable_code_sections.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_validate_eof_prefix.py create mode 100644 tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_validate_eof_version.py create mode 100644 tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjump_invalid_destination.py create mode 100644 tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjumpi_invalid_destination.py create mode 100644 tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjumpi_truncated.py create mode 100644 tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjumpv_invalid_destination.py create mode 100644 tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjumpv_truncated.py create mode 100644 tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_valid_rjump.py create mode 100644 tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_valid_rjumpi.py create mode 100644 tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_valid_rjumpv.py create mode 100644 tests/osaka/eip7692_eof_v1/eip4750_functions/test_callf_into_nonreturning.py create mode 100644 tests/osaka/eip7692_eof_v1/eip4750_functions/test_callf_invalid_code_section_index.py create mode 100644 tests/osaka/eip7692_eof_v1/eip4750_functions/test_eof1_callf_truncated.py create mode 100644 tests/osaka/eip7692_eof_v1/eip4750_functions/test_max_arguments_count.py create mode 100644 tests/osaka/eip7692_eof_v1/eip4750_functions/test_non_returning_status.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjump.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjump_variable_stack.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjumpi.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjumpi_variable_stack.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjumpv.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjumpv_variable_stack.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_stack_overflow.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_stack_overflow_variable_stack.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_stack_validation.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_with_inputs_stack_overflow.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_with_inputs_stack_overflow_variable_stack.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_dupn_stack_validation.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_exchange_deep_stack_validation.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_exchange_stack_validation.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjump.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjump_variable_stack.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjumpi.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjumpi_variable_stack.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjumpv.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjumpv_variable_stack.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_stack_overflow.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_stack_overflow_variable_stack.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_to_nonreturning.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_to_nonreturning_variable_stack.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_to_returning.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_to_returning_variable_stack.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_with_inputs_stack_overflow.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_with_inputs_stack_overflow_variable_stack.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_no_terminating_instruction.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_non_constant_stack_height.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_retf_stack_validation.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_retf_variable_stack.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_self_referencing_jumps.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_self_referencing_jumps_variable_stack.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_stack_range_maximally_broad.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_swapn_stack_validation.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_underflow.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_underflow_variable_stack.py create mode 100644 tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_unreachable_instructions.py create mode 100644 tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_eof1_code_section_offset.py create mode 100644 tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_compatible_outputs.py create mode 100644 tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_equal_outputs.py create mode 100644 tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_incompatible_outputs.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7480_data_section/test_dataloadn.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7480_data_section/test_eof1_dataloadn_truncated.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_embedded_container.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_embedded_container_invalid.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_eofcreate_invalid.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_eofcreate_valid.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_returncontract_invalid.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_returncontract_valid.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_trailing_bytes_in_subcontainer.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_unreferenced_subcontainer_invalid.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eofcreate_and_returncontract_targeting_same_container.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eofcreate_return_and_returncontract.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eofcreate_stop_and_returncontract.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_initcode_container_return.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_initcode_container_revert.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_initcode_container_stop.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_max_nested_containers_eofcreate.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_max_nested_containers_eofcreate_returncontract.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_runtime_container_return.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_runtime_container_returncontract.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_runtime_container_revert.py create mode 100644 tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_runtime_container_stop.py diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_data_section_missing.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_data_section_missing.py new file mode 100644 index 0000000000..8880193e91 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_data_section_missing.py @@ -0,0 +1,56 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + #--- Error: Invalid Data Header ---# + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0xfe, + ]), + ) + , + "ef000101000402000100010000800000fe", + EOFException.MISSING_DATA_SECTION, + id="data_section_missing_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_deprecated_instructions.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_deprecated_instructions.py new file mode 100644 index 0000000000..6c354ab970 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_deprecated_instructions.py @@ -0,0 +1,225 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.CALLCODE, max_stack_height=0), + ], + ) + , + "ef000101000402000100010400000000800000f2", + EOFException.UNDEFINED_INSTRUCTION, + id="deprecated_instructions_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.SELFDESTRUCT, max_stack_height=0), + ], + ) + , + "ef000101000402000100010400000000800000ff", + EOFException.UNDEFINED_INSTRUCTION, + id="deprecated_instructions_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.JUMP, max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000056", + EOFException.UNDEFINED_INSTRUCTION, + id="deprecated_instructions_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.JUMPI, max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000057", + EOFException.UNDEFINED_INSTRUCTION, + id="deprecated_instructions_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PC, max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000058", + EOFException.UNDEFINED_INSTRUCTION, + id="deprecated_instructions_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.CALL, max_stack_height=0), + ], + ) + , + "ef000101000402000100010400000000800000f1", + EOFException.UNDEFINED_INSTRUCTION, + id="deprecated_instructions_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.STATICCALL, max_stack_height=0), + ], + ) + , + "ef000101000402000100010400000000800000fa", + EOFException.UNDEFINED_INSTRUCTION, + id="deprecated_instructions_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.DELEGATECALL, max_stack_height=0), + ], + ) + , + "ef000101000402000100010400000000800000f4", + EOFException.UNDEFINED_INSTRUCTION, + id="deprecated_instructions_7" + ), + pytest.param( + Container( + name = 'EOFV1_0009', + sections = [ + Section.Code(code=Op.CREATE, max_stack_height=0), + ], + ) + , + "ef000101000402000100010400000000800000f0", + EOFException.UNDEFINED_INSTRUCTION, + id="deprecated_instructions_8" + ), + pytest.param( + Container( + name = 'EOFV1_0010', + sections = [ + Section.Code(code=Op.CREATE2, max_stack_height=0), + ], + ) + , + "ef000101000402000100010400000000800000f5", + EOFException.UNDEFINED_INSTRUCTION, + id="deprecated_instructions_9" + ), + pytest.param( + Container( + name = 'EOFV1_0011', + sections = [ + Section.Code(code=Op.CODESIZE, max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000038", + EOFException.UNDEFINED_INSTRUCTION, + id="deprecated_instructions_10" + ), + pytest.param( + Container( + name = 'EOFV1_0012', + sections = [ + Section.Code(code=Op.CODECOPY, max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000039", + EOFException.UNDEFINED_INSTRUCTION, + id="deprecated_instructions_11" + ), + pytest.param( + Container( + name = 'EOFV1_0013', + sections = [ + Section.Code(code=Op.EXTCODESIZE, max_stack_height=0), + ], + ) + , + "ef0001010004020001000104000000008000003b", + EOFException.UNDEFINED_INSTRUCTION, + id="deprecated_instructions_12" + ), + pytest.param( + Container( + name = 'EOFV1_0014', + sections = [ + Section.Code(code=Op.EXTCODECOPY, max_stack_height=0), + ], + ) + , + "ef0001010004020001000104000000008000003c", + EOFException.UNDEFINED_INSTRUCTION, + id="deprecated_instructions_13" + ), + pytest.param( + Container( + name = 'EOFV1_0015', + sections = [ + Section.Code(code=Op.EXTCODEHASH, max_stack_height=0), + ], + ) + , + "ef0001010004020001000104000000008000003f", + EOFException.UNDEFINED_INSTRUCTION, + id="deprecated_instructions_14" + ), + pytest.param( + Container( + name = 'EOFV1_0016', + sections = [ + Section.Code(code=Op.GAS, max_stack_height=0), + ], + ) + , + "ef0001010004020001000104000000008000005a", + EOFException.UNDEFINED_INSTRUCTION, + id="deprecated_instructions_15" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_code_section_0_size.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_code_section_0_size.py new file mode 100644 index 0000000000..f11c55ff4f --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_code_section_0_size.py @@ -0,0 +1,75 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + #--- Error: Invalid Code Header ---# + 0x02, + 0x00, + 0x00, + 0x00, + ]), + ) + , + "ef000101000402000000", + EOFException.ZERO_SECTION_SIZE, + id="eof1_code_section_0_size_0" + ), + pytest.param( + Container( + name="EOFV1_0002", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + #--- Error: Invalid Code Header ---# + 0x02, + 0x00, + 0x00, + 0x04, + 0x00, + 0x01, + 0x00, + 0xda, + ]), + ) + , + "ef000101000402000004000100da", + EOFException.ZERO_SECTION_SIZE, + id="eof1_code_section_0_size_1" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_code_section_missing.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_code_section_missing.py new file mode 100644 index 0000000000..6dc946bf5c --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_code_section_missing.py @@ -0,0 +1,57 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0002", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + #--- Error: Invalid Code Header ---# + 0x04, + 0x00, + 0x01, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0xda, + ]), + ) + , + "ef00010100040400010000800000da", + EOFException.MISSING_CODE_HEADER, + id="eof1_code_section_missing_1" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_data_section_before_code_section.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_data_section_before_code_section.py new file mode 100644 index 0000000000..21b07db94a --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_data_section_before_code_section.py @@ -0,0 +1,63 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + #--- Error: Invalid Code Header ---# + 0x03, + 0x00, + 0x01, + 0x02, + 0x00, + 0x01, + 0x00, + 0x01, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0xaa, + 0xfe, + ]), + ) + , + "ef000101000403000102000100010000800000aafe", + EOFException.MISSING_CODE_HEADER, + id="eof1_data_section_before_code_section_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_data_section_before_types_section.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_data_section_before_types_section.py new file mode 100644 index 0000000000..341c43fd8d --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_data_section_before_types_section.py @@ -0,0 +1,65 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + #--- Error: Invalid Types Header ---# + 0x04, + 0x00, + 0x01, + 0x01, + 0x00, + 0x04, + 0x02, + 0x00, + 0x01, + 0x00, + 0x01, + 0x00, + 0xaa, + 0x00, + 0x80, + 0x00, + 0x00, + 0xfe, + ]), + ) + , + "ef0001040001010004020001000100aa00800000fe", + EOFException.MISSING_TYPE_HEADER, + id="eof1_data_section_before_types_section_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_header_not_terminated.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_header_not_terminated.py new file mode 100644 index 0000000000..912d76b4c7 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_header_not_terminated.py @@ -0,0 +1,72 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0006", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x04, 0x00, 0x01, # Data Length: 1 + #--- Error: Invalid Terminator ---# + + ]), + ) + , + "ef00010100040200010001040001", + EOFException.MISSING_HEADERS_TERMINATOR, + id="eof1_header_not_terminated_5" + ), + pytest.param( + Container( + name="EOFV1_0007", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x04, 0x00, 0x01, # Data Length: 1 + #--- Error: Invalid Terminator ---# + 0xfe, + 0xaa, + ]), + ) + , + "ef00010100040200010001040001feaa", + EOFException.MISSING_TERMINATOR, + id="eof1_header_not_terminated_6" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_invalid_section_0_type.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_invalid_section_0_type.py new file mode 100644 index 0000000000..a415aa7b4f --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_invalid_section_0_type.py @@ -0,0 +1,69 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.TLOAD, code_outputs=1, max_stack_height=0), + ], + ) + , + "ef00010100040200010003040000000001000060005c", + EOFException.INVALID_FIRST_SECTION_TYPE, + id="eof1_invalid_section_0_type_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.INVALID, code_inputs=1, max_stack_height=0), + ], + ) + , + "ef000101000402000100010400000001800000fe", + EOFException.INVALID_FIRST_SECTION_TYPE, + id="eof1_invalid_section_0_type_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.TLOAD, code_inputs=2, code_outputs=3, max_stack_height=0), + ], + ) + , + "ef00010100040200010003040000000203000060005c", + EOFException.INVALID_FIRST_SECTION_TYPE, + id="eof1_invalid_section_0_type_3" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_invalid_type_section_size.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_invalid_type_section_size.py new file mode 100644 index 0000000000..436c5edd92 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_invalid_type_section_size.py @@ -0,0 +1,183 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x01, # Types Length: 1 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x04, 0x00, 0x00, # Data Length: 0 + 0x00, # Terminator + #--- Error: Invalid Types Content ---# + 0x00, + 0xfe, + ]), + ) + , + "ef000101000102000100010400000000fe", + EOFException.INVALID_TYPE_SECTION_SIZE, + id="eof1_invalid_type_section_size_0" + ), + pytest.param( + Container( + name="EOFV1_0002", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x02, # Types Length: 2 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x04, 0x00, 0x00, # Data Length: 0 + 0x00, # Terminator + #--- Error: Invalid Types Content ---# + 0x00, + 0x80, + 0xfe, + ]), + ) + , + "ef00010100020200010001040000000080fe", + EOFException.INVALID_TYPE_SECTION_SIZE, + id="eof1_invalid_type_section_size_1" + ), + pytest.param( + Container( + name="EOFV1_0003", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x08, # Types Length: 8 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x04, 0x00, 0x00, # Data Length: 0 + 0x00, # Terminator + # Code Section 0 types + 0x00, # Inputs: 0 + 0x80, # Outputs: 0 (Non-returning function) + 0x00, 0x00, # Max Stack Height: 0 + # Code Section 1 types + 0x00, # Inputs: 0 + 0x00, # Outputs: 0 + 0x00, 0x00, # Max Stack Height: 0 + #--- Error: Code and Type sections mismatch ---# + # Code Section 0 + 0xfe, # [0] INVALID + ]), + ) + , + "ef00010100080200010001040000000080000000000000fe", + EOFException.INVALID_TYPE_SECTION_SIZE, + id="eof1_invalid_type_section_size_2" + ), + pytest.param( + Container( + name="EOFV1_0004", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x08, # Types Length: 8 + 0x02, 0x00, 0x03, # Code Sections (Length: 3) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x00, 0x01, # Code Section 1 (Length: 1) + 0x00, 0x01, # Code Section 2 (Length: 1) + 0x04, 0x00, 0x00, # Data Length: 0 + 0x00, # Terminator + # Code Section 0 types + 0x00, # Inputs: 0 + 0x80, # Outputs: 0 (Non-returning function) + 0x00, 0x00, # Max Stack Height: 0 + # Code Section 1 types + 0x00, # Inputs: 0 + 0x80, # Outputs: 0 (Non-returning function) + 0x00, 0x00, # Max Stack Height: 0 + #--- Error: Code and Type sections mismatch ---# + # Code Section 0 + 0xfe, # [0] INVALID + # Code Section 1 + 0xfe, # [0] INVALID + # Code Section 2 + 0xfe, # [0] INVALID + ]), + ) + , + "ef0001010008020003000100010001040000000080000000800000fefefe", + EOFException.INVALID_TYPE_SECTION_SIZE, + id="eof1_invalid_type_section_size_3" + ), + pytest.param( + Container( + name="EOFV1_0005", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x10, # Types Length: 16 + 0x02, 0x00, 0x03, # Code Sections (Length: 3) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x00, 0x01, # Code Section 1 (Length: 1) + 0x00, 0x01, # Code Section 2 (Length: 1) + 0x04, 0x00, 0x00, # Data Length: 0 + 0x00, # Terminator + # Code Section 0 types + 0x00, # Inputs: 0 + 0x80, # Outputs: 0 (Non-returning function) + 0x00, 0x00, # Max Stack Height: 0 + # Code Section 1 types + 0x00, # Inputs: 0 + 0x80, # Outputs: 0 (Non-returning function) + 0x00, 0x00, # Max Stack Height: 0 + # Code Section 2 types + 0x00, # Inputs: 0 + 0x80, # Outputs: 0 (Non-returning function) + 0x00, 0x00, # Max Stack Height: 0 + # Code Section 3 types + 0x00, # Inputs: 0 + 0x80, # Outputs: 0 (Non-returning function) + 0x00, 0x00, # Max Stack Height: 0 + #--- Error: Code and Type sections mismatch ---# + # Code Section 0 + 0xfe, # [0] INVALID + # Code Section 1 + 0xfe, # [0] INVALID + # Code Section 2 + 0xfe, # [0] INVALID + ]), + ) + , + "ef00010100100200030001000100010400000000800000008000000080000000800000fefefe", + EOFException.INVALID_TYPE_SECTION_SIZE, + id="eof1_invalid_type_section_size_4" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_multiple_data_sections.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_multiple_data_sections.py new file mode 100644 index 0000000000..c2b0f4c7d2 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_multiple_data_sections.py @@ -0,0 +1,62 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x04, 0x00, 0x01, # Data Length: 1 + #--- Error: Invalid Terminator ---# + 0x04, + 0x00, + 0x01, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0xfe, + 0xda, + 0xda, + ]), + ) + , + "ef000101000402000100010400010400010000800000fedada", + EOFException.MISSING_TERMINATOR, + id="eof1_multiple_data_sections_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_multiple_type_sections.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_multiple_type_sections.py new file mode 100644 index 0000000000..fb3841af34 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_multiple_type_sections.py @@ -0,0 +1,102 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + #--- Error: Invalid Code Header ---# + 0x01, + 0x00, + 0x04, + 0x02, + 0x00, + 0x02, + 0x00, + 0x01, + 0x00, + 0x01, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0xfe, + 0xfe, + ]), + ) + , + "ef000101000401000402000200010001000080000000800000fefe", + EOFException.MISSING_CODE_HEADER, + id="eof1_multiple_type_sections_0" + ), + pytest.param( + Container( + name="EOFV1_0002", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + #--- Error: Invalid Types Header ---# + 0x03, + 0x00, + 0x02, + 0x01, + 0x00, + 0x01, + 0x01, + 0x00, + 0x01, + 0x04, + 0x00, + 0x02, + 0x00, + 0x00, + 0x00, + 0xfe, + 0xfe, + 0x00, + 0x00, + ]), + ) + , + "ef0001030002010001010001040002000000fefe0000", + EOFException.MISSING_TYPE_HEADER, + id="eof1_multiple_type_sections_1" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_section_order.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_section_order.py new file mode 100644 index 0000000000..010eba7bae --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_section_order.py @@ -0,0 +1,437 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMP[0] + Op.STOP, max_stack_height=1), + Section.Data(data="aabb") + ], + ) + , + "ef0001010004020001000604000200008000016000e0000000aabb", + None, + id="eof1_section_order_0" + ), + pytest.param( + Container( + name="EOFV1_0002", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + #--- Error: Invalid Code Header ---# + 0x04, + 0x00, + 0x02, + 0x02, + 0x00, + 0x01, + 0x00, + 0x06, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0xaa, + 0xbb, + 0x60, + 0x00, + 0xe0, + 0x00, + 0x00, + 0x00, + ]), + ) + , + "ef000101000404000202000100060000800000aabb6000e0000000", + EOFException.MISSING_CODE_HEADER, + id="eof1_section_order_1" + ), + pytest.param( + Container( + name="EOFV1_0003", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + #--- Error: Invalid Types Header ---# + 0x02, + 0x00, + 0x01, + 0x00, + 0x06, + 0x01, + 0x00, + 0x04, + 0x04, + 0x00, + 0x02, + 0x00, + 0x60, + 0x00, + 0xe0, + 0x00, + 0x00, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0xaa, + 0xbb, + ]), + ) + , + "ef00010200010006010004040002006000e000000000800000aabb", + EOFException.MISSING_TYPE_HEADER, + id="eof1_section_order_2" + ), + pytest.param( + Container( + name="EOFV1_0004", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + #--- Error: Invalid Types Header ---# + 0x02, + 0x00, + 0x01, + 0x00, + 0x06, + 0x04, + 0x00, + 0x02, + 0x01, + 0x00, + 0x04, + 0x00, + 0x60, + 0x00, + 0xe0, + 0x00, + 0x00, + 0x00, + 0xaa, + 0xbb, + 0x00, + 0x80, + 0x00, + 0x00, + ]), + ) + , + "ef00010200010006040002010004006000e0000000aabb00800000", + EOFException.MISSING_TYPE_HEADER, + id="eof1_section_order_3" + ), + pytest.param( + Container( + name="EOFV1_0005", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + #--- Error: Invalid Types Header ---# + 0x04, + 0x00, + 0x02, + 0x01, + 0x00, + 0x04, + 0x02, + 0x00, + 0x01, + 0x00, + 0x06, + 0x00, + 0xaa, + 0xbb, + 0x00, + 0x80, + 0x00, + 0x00, + 0x60, + 0x00, + 0xe0, + 0x00, + 0x00, + 0x00, + ]), + ) + , + "ef0001040002010004020001000600aabb008000006000e0000000", + EOFException.MISSING_TYPE_HEADER, + id="eof1_section_order_4" + ), + pytest.param( + Container( + name="EOFV1_0006", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + #--- Error: Invalid Types Header ---# + 0x04, + 0x00, + 0x02, + 0x02, + 0x00, + 0x01, + 0x00, + 0x06, + 0x01, + 0x00, + 0x04, + 0x00, + 0xaa, + 0xbb, + 0x60, + 0x00, + 0xe0, + 0x00, + 0x00, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + ]), + ) + , + "ef0001040002020001000601000400aabb6000e000000000800000", + EOFException.MISSING_TYPE_HEADER, + id="eof1_section_order_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH0 * 4 + Op.EOFCREATE[0] + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0007_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), Section.Data(data="aabb") + + ], + ) + , + "ef00010100040200010007030001001404000200008000045f5f5f5fec0000ef000101000402000100010400000000800000feaabb", + None, + id="eof1_section_order_6" + ), + pytest.param( + Container( + name="EOFV1_0008", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + #--- Error: Invalid Types Header ---# + 0x03, + 0x00, + 0x01, + 0x00, + 0x14, + 0x01, + 0x00, + 0x04, + 0x02, + 0x00, + 0x01, + 0x00, + 0x07, + 0x04, + 0x00, + 0x02, + 0x00, + 0xef, + 0x00, + 0x01, + 0x01, + 0x00, + 0x04, + 0x02, + 0x00, + 0x01, + 0x00, + 0x01, + 0x04, + 0x00, + 0x00, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0xfe, + 0x00, + 0x80, + 0x00, + 0x04, + 0x5f, + 0x5f, + 0x5f, + 0x5f, + 0xec, + 0x00, + 0x00, + 0xaa, + 0xbb, + ]), + ) + , + "ef00010300010014010004020001000704000200ef000101000402000100010400000000800000fe008000045f5f5f5fec0000aabb", + EOFException.MISSING_TYPE_HEADER, + id="eof1_section_order_7" + ), + pytest.param( + Container( + name="EOFV1_0009", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + #--- Error: Invalid Code Header ---# + 0x03, + 0x00, + 0x01, + 0x00, + 0x14, + 0x02, + 0x00, + 0x01, + 0x00, + 0x07, + 0x04, + 0x00, + 0x02, + 0x00, + 0x00, + 0x80, + 0x00, + 0x04, + 0xef, + 0x00, + 0x01, + 0x01, + 0x00, + 0x04, + 0x02, + 0x00, + 0x01, + 0x00, + 0x01, + 0x04, + 0x00, + 0x00, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0xfe, + 0x5f, + 0x5f, + 0x5f, + 0x5f, + 0xec, + 0x00, + 0x00, + 0xaa, + 0xbb, + ]), + ) + , + "ef0001010004030001001402000100070400020000800004ef000101000402000100010400000000800000fe5f5f5f5fec0000aabb", + EOFException.MISSING_CODE_HEADER, + id="eof1_section_order_8" + ), + pytest.param( + Container( + name="EOFV1_0010", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x07, # Code Section 0 (Length: 7) + 0x04, 0x00, 0x02, # Data Length: 2 + #--- Error: Invalid Terminator ---# + 0x03, + 0x00, + 0x01, + 0x00, + 0x14, + 0x00, + 0x00, + 0x80, + 0x00, + 0x04, + 0x5f, + 0x5f, + 0x5f, + 0x5f, + 0xec, + 0x00, + 0x00, + 0xaa, + 0xbb, + 0xef, + 0x00, + 0x01, + 0x01, + 0x00, + 0x04, + 0x02, + 0x00, + 0x01, + 0x00, + 0x01, + 0x04, + 0x00, + 0x00, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0xfe, + ]), + ) + , + "ef00010100040200010007040002030001001400008000045f5f5f5fec0000aabbef000101000402000100010400000000800000fe", + EOFException.MISSING_TERMINATOR, + id="eof1_section_order_9" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_subcontainer_containing_unreachable_code_sections.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_subcontainer_containing_unreachable_code_sections.py new file mode 100644 index 0000000000..ea39bfc933 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_subcontainer_containing_unreachable_code_sections.py @@ -0,0 +1,76 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0001_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + ) + , + "ef0001010004020001000b030001001b04000000008000046000600060006000ec0000ef000101000802000200010001040000000080000000800000fefe", + EOFException.UNREACHABLE_CODE_SECTIONS, + id="eof1_subcontainer_containing_unreachable_code_sections_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0002_D1I0', + sections = [ + Section.Code(code=Op.JUMPF[1], max_stack_height=0), + Section.Code(code=Op.JUMPF[2], max_stack_height=0), + Section.Code(code=Op.INVALID, max_stack_height=0), + Section.Code(code=Op.JUMPF[4], max_stack_height=0), + Section.Code(code=Op.JUMPF[3], max_stack_height=0), + ], + ) + ), + ], + ) + , + "ef0001010004020001000b030001003804000000008000046000600060006000ec0000ef000101001402000500030003000100030003040000000080000000800000008000000080000000800000e50001e50002fee50004e50003", + EOFException.UNREACHABLE_CODE_SECTIONS, + id="eof1_subcontainer_containing_unreachable_code_sections_1" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_too_many_code_sections.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_too_many_code_sections.py new file mode 100644 index 0000000000..093d90b837 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_too_many_code_sections.py @@ -0,0 +1,50 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +sections_1023 = [] +for i in range(0, 1022): + sections_1023.append(Section.Code(code=Op.JUMPF[i+1])) +sections_1023.append(Section.Code(code=Op.STOP)) + +valid_1023 = Container( + name="EOFV1_0001", + sections=sections_1023 +) + + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + valid_1023, + "ef0001010ffc0203ff00030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000104000000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000e50001e50002e50003e50004e50005e50006e50007e50008e50009e5000ae5000be5000ce5000de5000ee5000fe50010e50011e50012e50013e50014e50015e50016e50017e50018e50019e5001ae5001be5001ce5001de5001ee5001fe50020e50021e50022e50023e50024e50025e50026e50027e50028e50029e5002ae5002be5002ce5002de5002ee5002fe50030e50031e50032e50033e50034e50035e50036e50037e50038e50039e5003ae5003be5003ce5003de5003ee5003fe50040e50041e50042e50043e50044e50045e50046e50047e50048e50049e5004ae5004be5004ce5004de5004ee5004fe50050e50051e50052e50053e50054e50055e50056e50057e50058e50059e5005ae5005be5005ce5005de5005ee5005fe50060e50061e50062e50063e50064e50065e50066e50067e50068e50069e5006ae5006be5006ce5006de5006ee5006fe50070e50071e50072e50073e50074e50075e50076e50077e50078e50079e5007ae5007be5007ce5007de5007ee5007fe50080e50081e50082e50083e50084e50085e50086e50087e50088e50089e5008ae5008be5008ce5008de5008ee5008fe50090e50091e50092e50093e50094e50095e50096e50097e50098e50099e5009ae5009be5009ce5009de5009ee5009fe500a0e500a1e500a2e500a3e500a4e500a5e500a6e500a7e500a8e500a9e500aae500abe500ace500ade500aee500afe500b0e500b1e500b2e500b3e500b4e500b5e500b6e500b7e500b8e500b9e500bae500bbe500bce500bde500bee500bfe500c0e500c1e500c2e500c3e500c4e500c5e500c6e500c7e500c8e500c9e500cae500cbe500cce500cde500cee500cfe500d0e500d1e500d2e500d3e500d4e500d5e500d6e500d7e500d8e500d9e500dae500dbe500dce500dde500dee500dfe500e0e500e1e500e2e500e3e500e4e500e5e500e6e500e7e500e8e500e9e500eae500ebe500ece500ede500eee500efe500f0e500f1e500f2e500f3e500f4e500f5e500f6e500f7e500f8e500f9e500fae500fbe500fce500fde500fee500ffe50100e50101e50102e50103e50104e50105e50106e50107e50108e50109e5010ae5010be5010ce5010de5010ee5010fe50110e50111e50112e50113e50114e50115e50116e50117e50118e50119e5011ae5011be5011ce5011de5011ee5011fe50120e50121e50122e50123e50124e50125e50126e50127e50128e50129e5012ae5012be5012ce5012de5012ee5012fe50130e50131e50132e50133e50134e50135e50136e50137e50138e50139e5013ae5013be5013ce5013de5013ee5013fe50140e50141e50142e50143e50144e50145e50146e50147e50148e50149e5014ae5014be5014ce5014de5014ee5014fe50150e50151e50152e50153e50154e50155e50156e50157e50158e50159e5015ae5015be5015ce5015de5015ee5015fe50160e50161e50162e50163e50164e50165e50166e50167e50168e50169e5016ae5016be5016ce5016de5016ee5016fe50170e50171e50172e50173e50174e50175e50176e50177e50178e50179e5017ae5017be5017ce5017de5017ee5017fe50180e50181e50182e50183e50184e50185e50186e50187e50188e50189e5018ae5018be5018ce5018de5018ee5018fe50190e50191e50192e50193e50194e50195e50196e50197e50198e50199e5019ae5019be5019ce5019de5019ee5019fe501a0e501a1e501a2e501a3e501a4e501a5e501a6e501a7e501a8e501a9e501aae501abe501ace501ade501aee501afe501b0e501b1e501b2e501b3e501b4e501b5e501b6e501b7e501b8e501b9e501bae501bbe501bce501bde501bee501bfe501c0e501c1e501c2e501c3e501c4e501c5e501c6e501c7e501c8e501c9e501cae501cbe501cce501cde501cee501cfe501d0e501d1e501d2e501d3e501d4e501d5e501d6e501d7e501d8e501d9e501dae501dbe501dce501dde501dee501dfe501e0e501e1e501e2e501e3e501e4e501e5e501e6e501e7e501e8e501e9e501eae501ebe501ece501ede501eee501efe501f0e501f1e501f2e501f3e501f4e501f5e501f6e501f7e501f8e501f9e501fae501fbe501fce501fde501fee501ffe50200e50201e50202e50203e50204e50205e50206e50207e50208e50209e5020ae5020be5020ce5020de5020ee5020fe50210e50211e50212e50213e50214e50215e50216e50217e50218e50219e5021ae5021be5021ce5021de5021ee5021fe50220e50221e50222e50223e50224e50225e50226e50227e50228e50229e5022ae5022be5022ce5022de5022ee5022fe50230e50231e50232e50233e50234e50235e50236e50237e50238e50239e5023ae5023be5023ce5023de5023ee5023fe50240e50241e50242e50243e50244e50245e50246e50247e50248e50249e5024ae5024be5024ce5024de5024ee5024fe50250e50251e50252e50253e50254e50255e50256e50257e50258e50259e5025ae5025be5025ce5025de5025ee5025fe50260e50261e50262e50263e50264e50265e50266e50267e50268e50269e5026ae5026be5026ce5026de5026ee5026fe50270e50271e50272e50273e50274e50275e50276e50277e50278e50279e5027ae5027be5027ce5027de5027ee5027fe50280e50281e50282e50283e50284e50285e50286e50287e50288e50289e5028ae5028be5028ce5028de5028ee5028fe50290e50291e50292e50293e50294e50295e50296e50297e50298e50299e5029ae5029be5029ce5029de5029ee5029fe502a0e502a1e502a2e502a3e502a4e502a5e502a6e502a7e502a8e502a9e502aae502abe502ace502ade502aee502afe502b0e502b1e502b2e502b3e502b4e502b5e502b6e502b7e502b8e502b9e502bae502bbe502bce502bde502bee502bfe502c0e502c1e502c2e502c3e502c4e502c5e502c6e502c7e502c8e502c9e502cae502cbe502cce502cde502cee502cfe502d0e502d1e502d2e502d3e502d4e502d5e502d6e502d7e502d8e502d9e502dae502dbe502dce502dde502dee502dfe502e0e502e1e502e2e502e3e502e4e502e5e502e6e502e7e502e8e502e9e502eae502ebe502ece502ede502eee502efe502f0e502f1e502f2e502f3e502f4e502f5e502f6e502f7e502f8e502f9e502fae502fbe502fce502fde502fee502ffe50300e50301e50302e50303e50304e50305e50306e50307e50308e50309e5030ae5030be5030ce5030de5030ee5030fe50310e50311e50312e50313e50314e50315e50316e50317e50318e50319e5031ae5031be5031ce5031de5031ee5031fe50320e50321e50322e50323e50324e50325e50326e50327e50328e50329e5032ae5032be5032ce5032de5032ee5032fe50330e50331e50332e50333e50334e50335e50336e50337e50338e50339e5033ae5033be5033ce5033de5033ee5033fe50340e50341e50342e50343e50344e50345e50346e50347e50348e50349e5034ae5034be5034ce5034de5034ee5034fe50350e50351e50352e50353e50354e50355e50356e50357e50358e50359e5035ae5035be5035ce5035de5035ee5035fe50360e50361e50362e50363e50364e50365e50366e50367e50368e50369e5036ae5036be5036ce5036de5036ee5036fe50370e50371e50372e50373e50374e50375e50376e50377e50378e50379e5037ae5037be5037ce5037de5037ee5037fe50380e50381e50382e50383e50384e50385e50386e50387e50388e50389e5038ae5038be5038ce5038de5038ee5038fe50390e50391e50392e50393e50394e50395e50396e50397e50398e50399e5039ae5039be5039ce5039de5039ee5039fe503a0e503a1e503a2e503a3e503a4e503a5e503a6e503a7e503a8e503a9e503aae503abe503ace503ade503aee503afe503b0e503b1e503b2e503b3e503b4e503b5e503b6e503b7e503b8e503b9e503bae503bbe503bce503bde503bee503bfe503c0e503c1e503c2e503c3e503c4e503c5e503c6e503c7e503c8e503c9e503cae503cbe503cce503cde503cee503cfe503d0e503d1e503d2e503d3e503d4e503d5e503d6e503d7e503d8e503d9e503dae503dbe503dce503dde503dee503dfe503e0e503e1e503e2e503e3e503e4e503e5e503e6e503e7e503e8e503e9e503eae503ebe503ece503ede503eee503efe503f0e503f1e503f2e503f3e503f4e503f5e503f6e503f7e503f8e503f9e503fae503fbe503fce503fde503fe00", + None, + id="valid_1023" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_trailing_bytes_top_level.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_trailing_bytes_top_level.py new file mode 100644 index 0000000000..37b8c9296c --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_trailing_bytes_top_level.py @@ -0,0 +1,96 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x04, 0x00, 0x00, # Data Length: 0 + 0x00, # Terminator + # Code Section 0 types + 0x00, # Inputs: 0 + 0x80, # Outputs: 0 (Non-returning function) + 0x00, 0x00, # Max Stack Height: 0 + + # Code Section 0 + 0xfe, # [0] INVALID + #--- Error: Trailing bytes ---# + 0xde, + 0xad, + 0xbe, + 0xef, + ]), + ) + , + "ef000101000402000100010400000000800000fedeadbeef", + EOFException.INVALID_SECTION_BODIES_SIZE, + id="eof1_trailing_bytes_top_level_0" + ), + pytest.param( + Container( + name="EOFV1_0002", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x04, 0x00, 0x02, # Data Length: 2 + 0x00, # Terminator + # Code Section 0 types + 0x00, # Inputs: 0 + 0x80, # Outputs: 0 (Non-returning function) + 0x00, 0x00, # Max Stack Height: 0 + + # Code Section 0 + 0xfe, # [0] INVALID + # Data Section + 0xaa, + 0xbb, + #--- Error: Trailing bytes ---# + 0xde, + 0xad, + 0xbe, + 0xef, + ]), + ) + , + "ef000101000402000100010400020000800000feaabbdeadbeef", + EOFException.INVALID_SECTION_BODIES_SIZE, + id="eof1_trailing_bytes_top_level_1" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_truncated_push.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_truncated_push.py new file mode 100644 index 0000000000..14ff2579f7 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_truncated_push.py @@ -0,0 +1,6753 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=[0x60], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000060", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef000101000402000100030400000000800001600000", + None, + id="eof1_truncated_push_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=[0x61], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000061", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=[0x61, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000006100", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH2[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef00010100040200010004040000000080000161000000", + None, + id="eof1_truncated_push_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=[0x62], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000062", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=[0x62, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000006200", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=[0x62, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000620000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_7" + ), + pytest.param( + Container( + name = 'EOFV1_0009', + sections = [ + Section.Code(code=Op.PUSH3[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000504000000008000016200000000", + None, + id="eof1_truncated_push_8" + ), + pytest.param( + Container( + name = 'EOFV1_0010', + sections = [ + Section.Code(code=[0x63], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000063", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_9" + ), + pytest.param( + Container( + name = 'EOFV1_0011', + sections = [ + Section.Code(code=[0x63, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000006300", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_10" + ), + pytest.param( + Container( + name = 'EOFV1_0012', + sections = [ + Section.Code(code=[0x63, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000630000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_11" + ), + pytest.param( + Container( + name = 'EOFV1_0013', + sections = [ + Section.Code(code=[0x63, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010004040000000080000063000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_12" + ), + pytest.param( + Container( + name = 'EOFV1_0014', + sections = [ + Section.Code(code=Op.PUSH4[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef000101000402000100060400000000800001630000000000", + None, + id="eof1_truncated_push_13" + ), + pytest.param( + Container( + name = 'EOFV1_0015', + sections = [ + Section.Code(code=[0x64], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000064", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_14" + ), + pytest.param( + Container( + name = 'EOFV1_0016', + sections = [ + Section.Code(code=[0x64, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000006400", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_15" + ), + pytest.param( + Container( + name = 'EOFV1_0017', + sections = [ + Section.Code(code=[0x64, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000640000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_16" + ), + pytest.param( + Container( + name = 'EOFV1_0018', + sections = [ + Section.Code(code=[0x64, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010004040000000080000064000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_17" + ), + pytest.param( + Container( + name = 'EOFV1_0019', + sections = [ + Section.Code(code=[0x64, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000006400000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_18" + ), + pytest.param( + Container( + name = 'EOFV1_0020', + sections = [ + Section.Code(code=Op.PUSH5[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef00010100040200010007040000000080000164000000000000", + None, + id="eof1_truncated_push_19" + ), + pytest.param( + Container( + name = 'EOFV1_0021', + sections = [ + Section.Code(code=[0x65], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000065", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_20" + ), + pytest.param( + Container( + name = 'EOFV1_0022', + sections = [ + Section.Code(code=[0x65, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000006500", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_21" + ), + pytest.param( + Container( + name = 'EOFV1_0023', + sections = [ + Section.Code(code=[0x65, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000650000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_22" + ), + pytest.param( + Container( + name = 'EOFV1_0024', + sections = [ + Section.Code(code=[0x65, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010004040000000080000065000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_23" + ), + pytest.param( + Container( + name = 'EOFV1_0025', + sections = [ + Section.Code(code=[0x65, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000006500000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_24" + ), + pytest.param( + Container( + name = 'EOFV1_0026', + sections = [ + Section.Code(code=[0x65, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100060400000000800000650000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_25" + ), + pytest.param( + Container( + name = 'EOFV1_0027', + sections = [ + Section.Code(code=Op.PUSH6[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000804000000008000016500000000000000", + None, + id="eof1_truncated_push_26" + ), + pytest.param( + Container( + name = 'EOFV1_0028', + sections = [ + Section.Code(code=[0x66], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000066", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_27" + ), + pytest.param( + Container( + name = 'EOFV1_0029', + sections = [ + Section.Code(code=[0x66, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000006600", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_28" + ), + pytest.param( + Container( + name = 'EOFV1_0030', + sections = [ + Section.Code(code=[0x66, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000660000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_29" + ), + pytest.param( + Container( + name = 'EOFV1_0031', + sections = [ + Section.Code(code=[0x66, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010004040000000080000066000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_30" + ), + pytest.param( + Container( + name = 'EOFV1_0032', + sections = [ + Section.Code(code=[0x66, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000006600000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_31" + ), + pytest.param( + Container( + name = 'EOFV1_0033', + sections = [ + Section.Code(code=[0x66, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100060400000000800000660000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_32" + ), + pytest.param( + Container( + name = 'EOFV1_0034', + sections = [ + Section.Code(code=[0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010007040000000080000066000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_33" + ), + pytest.param( + Container( + name = 'EOFV1_0035', + sections = [ + Section.Code(code=Op.PUSH7[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef000101000402000100090400000000800001660000000000000000", + None, + id="eof1_truncated_push_34" + ), + pytest.param( + Container( + name = 'EOFV1_0036', + sections = [ + Section.Code(code=[0x67], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000067", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_35" + ), + pytest.param( + Container( + name = 'EOFV1_0037', + sections = [ + Section.Code(code=[0x67, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000006700", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_36" + ), + pytest.param( + Container( + name = 'EOFV1_0038', + sections = [ + Section.Code(code=[0x67, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000670000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_37" + ), + pytest.param( + Container( + name = 'EOFV1_0039', + sections = [ + Section.Code(code=[0x67, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010004040000000080000067000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_38" + ), + pytest.param( + Container( + name = 'EOFV1_0040', + sections = [ + Section.Code(code=[0x67, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000006700000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_39" + ), + pytest.param( + Container( + name = 'EOFV1_0041', + sections = [ + Section.Code(code=[0x67, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100060400000000800000670000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_40" + ), + pytest.param( + Container( + name = 'EOFV1_0042', + sections = [ + Section.Code(code=[0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010007040000000080000067000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_41" + ), + pytest.param( + Container( + name = 'EOFV1_0043', + sections = [ + Section.Code(code=[0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000006700000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_42" + ), + pytest.param( + Container( + name = 'EOFV1_0044', + sections = [ + Section.Code(code=Op.PUSH8[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000a040000000080000167000000000000000000", + None, + id="eof1_truncated_push_43" + ), + pytest.param( + Container( + name = 'EOFV1_0045', + sections = [ + Section.Code(code=[0x68], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000068", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_44" + ), + pytest.param( + Container( + name = 'EOFV1_0046', + sections = [ + Section.Code(code=[0x68, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000006800", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_45" + ), + pytest.param( + Container( + name = 'EOFV1_0047', + sections = [ + Section.Code(code=[0x68, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000680000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_46" + ), + pytest.param( + Container( + name = 'EOFV1_0048', + sections = [ + Section.Code(code=[0x68, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010004040000000080000068000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_47" + ), + pytest.param( + Container( + name = 'EOFV1_0049', + sections = [ + Section.Code(code=[0x68, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000006800000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_48" + ), + pytest.param( + Container( + name = 'EOFV1_0050', + sections = [ + Section.Code(code=[0x68, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100060400000000800000680000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_49" + ), + pytest.param( + Container( + name = 'EOFV1_0051', + sections = [ + Section.Code(code=[0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010007040000000080000068000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_50" + ), + pytest.param( + Container( + name = 'EOFV1_0052', + sections = [ + Section.Code(code=[0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000006800000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_51" + ), + pytest.param( + Container( + name = 'EOFV1_0053', + sections = [ + Section.Code(code=[0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100090400000000800000680000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_52" + ), + pytest.param( + Container( + name = 'EOFV1_0054', + sections = [ + Section.Code(code=Op.PUSH9[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000b04000000008000016800000000000000000000", + None, + id="eof1_truncated_push_53" + ), + pytest.param( + Container( + name = 'EOFV1_0055', + sections = [ + Section.Code(code=[0x69], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000069", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_54" + ), + pytest.param( + Container( + name = 'EOFV1_0056', + sections = [ + Section.Code(code=[0x69, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000006900", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_55" + ), + pytest.param( + Container( + name = 'EOFV1_0057', + sections = [ + Section.Code(code=[0x69, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000690000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_56" + ), + pytest.param( + Container( + name = 'EOFV1_0058', + sections = [ + Section.Code(code=[0x69, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010004040000000080000069000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_57" + ), + pytest.param( + Container( + name = 'EOFV1_0059', + sections = [ + Section.Code(code=[0x69, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000006900000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_58" + ), + pytest.param( + Container( + name = 'EOFV1_0060', + sections = [ + Section.Code(code=[0x69, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100060400000000800000690000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_59" + ), + pytest.param( + Container( + name = 'EOFV1_0061', + sections = [ + Section.Code(code=[0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010007040000000080000069000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_60" + ), + pytest.param( + Container( + name = 'EOFV1_0062', + sections = [ + Section.Code(code=[0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000006900000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_61" + ), + pytest.param( + Container( + name = 'EOFV1_0063', + sections = [ + Section.Code(code=[0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100090400000000800000690000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_62" + ), + pytest.param( + Container( + name = 'EOFV1_0064', + sections = [ + Section.Code(code=[0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a040000000080000069000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_63" + ), + pytest.param( + Container( + name = 'EOFV1_0065', + sections = [ + Section.Code(code=Op.PUSH10[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000c0400000000800001690000000000000000000000", + None, + id="eof1_truncated_push_64" + ), + pytest.param( + Container( + name = 'EOFV1_0066', + sections = [ + Section.Code(code=[0x6a], max_stack_height=0), + ], + ) + , + "ef0001010004020001000104000000008000006a", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_65" + ), + pytest.param( + Container( + name = 'EOFV1_0067', + sections = [ + Section.Code(code=[0x6a, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000006a00", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_66" + ), + pytest.param( + Container( + name = 'EOFV1_0068', + sections = [ + Section.Code(code=[0x6a, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000304000000008000006a0000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_67" + ), + pytest.param( + Container( + name = 'EOFV1_0069', + sections = [ + Section.Code(code=[0x6a, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000404000000008000006a000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_68" + ), + pytest.param( + Container( + name = 'EOFV1_0070', + sections = [ + Section.Code(code=[0x6a, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000006a00000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_69" + ), + pytest.param( + Container( + name = 'EOFV1_0071', + sections = [ + Section.Code(code=[0x6a, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000604000000008000006a0000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_70" + ), + pytest.param( + Container( + name = 'EOFV1_0072', + sections = [ + Section.Code(code=[0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000704000000008000006a000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_71" + ), + pytest.param( + Container( + name = 'EOFV1_0073', + sections = [ + Section.Code(code=[0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000006a00000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_72" + ), + pytest.param( + Container( + name = 'EOFV1_0074', + sections = [ + Section.Code(code=[0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000904000000008000006a0000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_73" + ), + pytest.param( + Container( + name = 'EOFV1_0075', + sections = [ + Section.Code(code=[0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a04000000008000006a000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_74" + ), + pytest.param( + Container( + name = 'EOFV1_0076', + sections = [ + Section.Code(code=[0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000006a00000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_75" + ), + pytest.param( + Container( + name = 'EOFV1_0077', + sections = [ + Section.Code(code=Op.PUSH11[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000d04000000008000016a000000000000000000000000", + None, + id="eof1_truncated_push_76" + ), + pytest.param( + Container( + name = 'EOFV1_0078', + sections = [ + Section.Code(code=[0x6b], max_stack_height=0), + ], + ) + , + "ef0001010004020001000104000000008000006b", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_77" + ), + pytest.param( + Container( + name = 'EOFV1_0079', + sections = [ + Section.Code(code=[0x6b, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000006b00", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_78" + ), + pytest.param( + Container( + name = 'EOFV1_0080', + sections = [ + Section.Code(code=[0x6b, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000304000000008000006b0000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_79" + ), + pytest.param( + Container( + name = 'EOFV1_0081', + sections = [ + Section.Code(code=[0x6b, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000404000000008000006b000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_80" + ), + pytest.param( + Container( + name = 'EOFV1_0082', + sections = [ + Section.Code(code=[0x6b, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000006b00000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_81" + ), + pytest.param( + Container( + name = 'EOFV1_0083', + sections = [ + Section.Code(code=[0x6b, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000604000000008000006b0000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_82" + ), + pytest.param( + Container( + name = 'EOFV1_0084', + sections = [ + Section.Code(code=[0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000704000000008000006b000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_83" + ), + pytest.param( + Container( + name = 'EOFV1_0085', + sections = [ + Section.Code(code=[0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000006b00000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_84" + ), + pytest.param( + Container( + name = 'EOFV1_0086', + sections = [ + Section.Code(code=[0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000904000000008000006b0000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_85" + ), + pytest.param( + Container( + name = 'EOFV1_0087', + sections = [ + Section.Code(code=[0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a04000000008000006b000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_86" + ), + pytest.param( + Container( + name = 'EOFV1_0088', + sections = [ + Section.Code(code=[0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000006b00000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_87" + ), + pytest.param( + Container( + name = 'EOFV1_0089', + sections = [ + Section.Code(code=[0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c04000000008000006b0000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_88" + ), + pytest.param( + Container( + name = 'EOFV1_0090', + sections = [ + Section.Code(code=Op.PUSH12[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000e04000000008000016b00000000000000000000000000", + None, + id="eof1_truncated_push_89" + ), + pytest.param( + Container( + name = 'EOFV1_0091', + sections = [ + Section.Code(code=[0x6c], max_stack_height=0), + ], + ) + , + "ef0001010004020001000104000000008000006c", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_90" + ), + pytest.param( + Container( + name = 'EOFV1_0092', + sections = [ + Section.Code(code=[0x6c, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000006c00", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_91" + ), + pytest.param( + Container( + name = 'EOFV1_0093', + sections = [ + Section.Code(code=[0x6c, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000304000000008000006c0000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_92" + ), + pytest.param( + Container( + name = 'EOFV1_0094', + sections = [ + Section.Code(code=[0x6c, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000404000000008000006c000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_93" + ), + pytest.param( + Container( + name = 'EOFV1_0095', + sections = [ + Section.Code(code=[0x6c, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000006c00000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_94" + ), + pytest.param( + Container( + name = 'EOFV1_0096', + sections = [ + Section.Code(code=[0x6c, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000604000000008000006c0000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_95" + ), + pytest.param( + Container( + name = 'EOFV1_0097', + sections = [ + Section.Code(code=[0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000704000000008000006c000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_96" + ), + pytest.param( + Container( + name = 'EOFV1_0098', + sections = [ + Section.Code(code=[0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000006c00000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_97" + ), + pytest.param( + Container( + name = 'EOFV1_0099', + sections = [ + Section.Code(code=[0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000904000000008000006c0000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_98" + ), + pytest.param( + Container( + name = 'EOFV1_0100', + sections = [ + Section.Code(code=[0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a04000000008000006c000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_99" + ), + pytest.param( + Container( + name = 'EOFV1_0101', + sections = [ + Section.Code(code=[0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000006c00000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_100" + ), + pytest.param( + Container( + name = 'EOFV1_0102', + sections = [ + Section.Code(code=[0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c04000000008000006c0000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_101" + ), + pytest.param( + Container( + name = 'EOFV1_0103', + sections = [ + Section.Code(code=[0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d04000000008000006c000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_102" + ), + pytest.param( + Container( + name = 'EOFV1_0104', + sections = [ + Section.Code(code=Op.PUSH13[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000f04000000008000016c0000000000000000000000000000", + None, + id="eof1_truncated_push_103" + ), + pytest.param( + Container( + name = 'EOFV1_0105', + sections = [ + Section.Code(code=[0x6d], max_stack_height=0), + ], + ) + , + "ef0001010004020001000104000000008000006d", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_104" + ), + pytest.param( + Container( + name = 'EOFV1_0106', + sections = [ + Section.Code(code=[0x6d, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000006d00", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_105" + ), + pytest.param( + Container( + name = 'EOFV1_0107', + sections = [ + Section.Code(code=[0x6d, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000304000000008000006d0000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_106" + ), + pytest.param( + Container( + name = 'EOFV1_0108', + sections = [ + Section.Code(code=[0x6d, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000404000000008000006d000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_107" + ), + pytest.param( + Container( + name = 'EOFV1_0109', + sections = [ + Section.Code(code=[0x6d, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000006d00000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_108" + ), + pytest.param( + Container( + name = 'EOFV1_0110', + sections = [ + Section.Code(code=[0x6d, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000604000000008000006d0000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_109" + ), + pytest.param( + Container( + name = 'EOFV1_0111', + sections = [ + Section.Code(code=[0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000704000000008000006d000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_110" + ), + pytest.param( + Container( + name = 'EOFV1_0112', + sections = [ + Section.Code(code=[0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000006d00000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_111" + ), + pytest.param( + Container( + name = 'EOFV1_0113', + sections = [ + Section.Code(code=[0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000904000000008000006d0000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_112" + ), + pytest.param( + Container( + name = 'EOFV1_0114', + sections = [ + Section.Code(code=[0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a04000000008000006d000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_113" + ), + pytest.param( + Container( + name = 'EOFV1_0115', + sections = [ + Section.Code(code=[0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000006d00000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_114" + ), + pytest.param( + Container( + name = 'EOFV1_0116', + sections = [ + Section.Code(code=[0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c04000000008000006d0000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_115" + ), + pytest.param( + Container( + name = 'EOFV1_0117', + sections = [ + Section.Code(code=[0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d04000000008000006d000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_116" + ), + pytest.param( + Container( + name = 'EOFV1_0118', + sections = [ + Section.Code(code=[0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000006d00000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_117" + ), + pytest.param( + Container( + name = 'EOFV1_0119', + sections = [ + Section.Code(code=Op.PUSH14[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001001004000000008000016d000000000000000000000000000000", + None, + id="eof1_truncated_push_118" + ), + pytest.param( + Container( + name = 'EOFV1_0120', + sections = [ + Section.Code(code=[0x6e], max_stack_height=0), + ], + ) + , + "ef0001010004020001000104000000008000006e", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_119" + ), + pytest.param( + Container( + name = 'EOFV1_0121', + sections = [ + Section.Code(code=[0x6e, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000006e00", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_120" + ), + pytest.param( + Container( + name = 'EOFV1_0122', + sections = [ + Section.Code(code=[0x6e, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000304000000008000006e0000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_121" + ), + pytest.param( + Container( + name = 'EOFV1_0123', + sections = [ + Section.Code(code=[0x6e, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000404000000008000006e000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_122" + ), + pytest.param( + Container( + name = 'EOFV1_0124', + sections = [ + Section.Code(code=[0x6e, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000006e00000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_123" + ), + pytest.param( + Container( + name = 'EOFV1_0125', + sections = [ + Section.Code(code=[0x6e, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000604000000008000006e0000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_124" + ), + pytest.param( + Container( + name = 'EOFV1_0126', + sections = [ + Section.Code(code=[0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000704000000008000006e000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_125" + ), + pytest.param( + Container( + name = 'EOFV1_0127', + sections = [ + Section.Code(code=[0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000006e00000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_126" + ), + pytest.param( + Container( + name = 'EOFV1_0128', + sections = [ + Section.Code(code=[0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000904000000008000006e0000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_127" + ), + pytest.param( + Container( + name = 'EOFV1_0129', + sections = [ + Section.Code(code=[0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a04000000008000006e000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_128" + ), + pytest.param( + Container( + name = 'EOFV1_0130', + sections = [ + Section.Code(code=[0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000006e00000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_129" + ), + pytest.param( + Container( + name = 'EOFV1_0131', + sections = [ + Section.Code(code=[0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c04000000008000006e0000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_130" + ), + pytest.param( + Container( + name = 'EOFV1_0132', + sections = [ + Section.Code(code=[0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d04000000008000006e000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_131" + ), + pytest.param( + Container( + name = 'EOFV1_0133', + sections = [ + Section.Code(code=[0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000006e00000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_132" + ), + pytest.param( + Container( + name = 'EOFV1_0134', + sections = [ + Section.Code(code=[0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f04000000008000006e0000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_133" + ), + pytest.param( + Container( + name = 'EOFV1_0135', + sections = [ + Section.Code(code=Op.PUSH15[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001001104000000008000016e00000000000000000000000000000000", + None, + id="eof1_truncated_push_134" + ), + pytest.param( + Container( + name = 'EOFV1_0136', + sections = [ + Section.Code(code=[0x6f], max_stack_height=0), + ], + ) + , + "ef0001010004020001000104000000008000006f", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_135" + ), + pytest.param( + Container( + name = 'EOFV1_0137', + sections = [ + Section.Code(code=[0x6f, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000006f00", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_136" + ), + pytest.param( + Container( + name = 'EOFV1_0138', + sections = [ + Section.Code(code=[0x6f, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000304000000008000006f0000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_137" + ), + pytest.param( + Container( + name = 'EOFV1_0139', + sections = [ + Section.Code(code=[0x6f, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000404000000008000006f000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_138" + ), + pytest.param( + Container( + name = 'EOFV1_0140', + sections = [ + Section.Code(code=[0x6f, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000006f00000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_139" + ), + pytest.param( + Container( + name = 'EOFV1_0141', + sections = [ + Section.Code(code=[0x6f, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000604000000008000006f0000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_140" + ), + pytest.param( + Container( + name = 'EOFV1_0142', + sections = [ + Section.Code(code=[0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000704000000008000006f000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_141" + ), + pytest.param( + Container( + name = 'EOFV1_0143', + sections = [ + Section.Code(code=[0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000006f00000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_142" + ), + pytest.param( + Container( + name = 'EOFV1_0144', + sections = [ + Section.Code(code=[0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000904000000008000006f0000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_143" + ), + pytest.param( + Container( + name = 'EOFV1_0145', + sections = [ + Section.Code(code=[0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a04000000008000006f000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_144" + ), + pytest.param( + Container( + name = 'EOFV1_0146', + sections = [ + Section.Code(code=[0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000006f00000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_145" + ), + pytest.param( + Container( + name = 'EOFV1_0147', + sections = [ + Section.Code(code=[0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c04000000008000006f0000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_146" + ), + pytest.param( + Container( + name = 'EOFV1_0148', + sections = [ + Section.Code(code=[0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d04000000008000006f000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_147" + ), + pytest.param( + Container( + name = 'EOFV1_0149', + sections = [ + Section.Code(code=[0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000006f00000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_148" + ), + pytest.param( + Container( + name = 'EOFV1_0150', + sections = [ + Section.Code(code=[0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f04000000008000006f0000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_149" + ), + pytest.param( + Container( + name = 'EOFV1_0151', + sections = [ + Section.Code(code=[0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001004000000008000006f000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_150" + ), + pytest.param( + Container( + name = 'EOFV1_0152', + sections = [ + Section.Code(code=Op.PUSH16[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001001204000000008000016f0000000000000000000000000000000000", + None, + id="eof1_truncated_push_151" + ), + pytest.param( + Container( + name = 'EOFV1_0153', + sections = [ + Section.Code(code=[0x70], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000070", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_152" + ), + pytest.param( + Container( + name = 'EOFV1_0154', + sections = [ + Section.Code(code=[0x70, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000007000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_153" + ), + pytest.param( + Container( + name = 'EOFV1_0155', + sections = [ + Section.Code(code=[0x70, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000700000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_154" + ), + pytest.param( + Container( + name = 'EOFV1_0156', + sections = [ + Section.Code(code=[0x70, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010004040000000080000070000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_155" + ), + pytest.param( + Container( + name = 'EOFV1_0157', + sections = [ + Section.Code(code=[0x70, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000007000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_156" + ), + pytest.param( + Container( + name = 'EOFV1_0158', + sections = [ + Section.Code(code=[0x70, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100060400000000800000700000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_157" + ), + pytest.param( + Container( + name = 'EOFV1_0159', + sections = [ + Section.Code(code=[0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010007040000000080000070000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_158" + ), + pytest.param( + Container( + name = 'EOFV1_0160', + sections = [ + Section.Code(code=[0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000007000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_159" + ), + pytest.param( + Container( + name = 'EOFV1_0161', + sections = [ + Section.Code(code=[0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100090400000000800000700000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_160" + ), + pytest.param( + Container( + name = 'EOFV1_0162', + sections = [ + Section.Code(code=[0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a040000000080000070000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_161" + ), + pytest.param( + Container( + name = 'EOFV1_0163', + sections = [ + Section.Code(code=[0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000007000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_162" + ), + pytest.param( + Container( + name = 'EOFV1_0164', + sections = [ + Section.Code(code=[0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c0400000000800000700000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_163" + ), + pytest.param( + Container( + name = 'EOFV1_0165', + sections = [ + Section.Code(code=[0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d040000000080000070000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_164" + ), + pytest.param( + Container( + name = 'EOFV1_0166', + sections = [ + Section.Code(code=[0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000007000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_165" + ), + pytest.param( + Container( + name = 'EOFV1_0167', + sections = [ + Section.Code(code=[0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f0400000000800000700000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_166" + ), + pytest.param( + Container( + name = 'EOFV1_0168', + sections = [ + Section.Code(code=[0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010010040000000080000070000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_167" + ), + pytest.param( + Container( + name = 'EOFV1_0169', + sections = [ + Section.Code(code=[0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001104000000008000007000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_168" + ), + pytest.param( + Container( + name = 'EOFV1_0170', + sections = [ + Section.Code(code=Op.PUSH17[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef00010100040200010013040000000080000170000000000000000000000000000000000000", + None, + id="eof1_truncated_push_169" + ), + pytest.param( + Container( + name = 'EOFV1_0171', + sections = [ + Section.Code(code=[0x71], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000071", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_170" + ), + pytest.param( + Container( + name = 'EOFV1_0172', + sections = [ + Section.Code(code=[0x71, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000007100", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_171" + ), + pytest.param( + Container( + name = 'EOFV1_0173', + sections = [ + Section.Code(code=[0x71, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000710000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_172" + ), + pytest.param( + Container( + name = 'EOFV1_0174', + sections = [ + Section.Code(code=[0x71, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010004040000000080000071000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_173" + ), + pytest.param( + Container( + name = 'EOFV1_0175', + sections = [ + Section.Code(code=[0x71, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000007100000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_174" + ), + pytest.param( + Container( + name = 'EOFV1_0176', + sections = [ + Section.Code(code=[0x71, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100060400000000800000710000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_175" + ), + pytest.param( + Container( + name = 'EOFV1_0177', + sections = [ + Section.Code(code=[0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010007040000000080000071000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_176" + ), + pytest.param( + Container( + name = 'EOFV1_0178', + sections = [ + Section.Code(code=[0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000007100000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_177" + ), + pytest.param( + Container( + name = 'EOFV1_0179', + sections = [ + Section.Code(code=[0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100090400000000800000710000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_178" + ), + pytest.param( + Container( + name = 'EOFV1_0180', + sections = [ + Section.Code(code=[0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a040000000080000071000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_179" + ), + pytest.param( + Container( + name = 'EOFV1_0181', + sections = [ + Section.Code(code=[0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000007100000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_180" + ), + pytest.param( + Container( + name = 'EOFV1_0182', + sections = [ + Section.Code(code=[0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c0400000000800000710000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_181" + ), + pytest.param( + Container( + name = 'EOFV1_0183', + sections = [ + Section.Code(code=[0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d040000000080000071000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_182" + ), + pytest.param( + Container( + name = 'EOFV1_0184', + sections = [ + Section.Code(code=[0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000007100000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_183" + ), + pytest.param( + Container( + name = 'EOFV1_0185', + sections = [ + Section.Code(code=[0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f0400000000800000710000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_184" + ), + pytest.param( + Container( + name = 'EOFV1_0186', + sections = [ + Section.Code(code=[0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010010040000000080000071000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_185" + ), + pytest.param( + Container( + name = 'EOFV1_0187', + sections = [ + Section.Code(code=[0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001104000000008000007100000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_186" + ), + pytest.param( + Container( + name = 'EOFV1_0188', + sections = [ + Section.Code(code=[0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100120400000000800000710000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_187" + ), + pytest.param( + Container( + name = 'EOFV1_0189', + sections = [ + Section.Code(code=Op.PUSH18[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001001404000000008000017100000000000000000000000000000000000000", + None, + id="eof1_truncated_push_188" + ), + pytest.param( + Container( + name = 'EOFV1_0190', + sections = [ + Section.Code(code=[0x72], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000072", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_189" + ), + pytest.param( + Container( + name = 'EOFV1_0191', + sections = [ + Section.Code(code=[0x72, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000007200", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_190" + ), + pytest.param( + Container( + name = 'EOFV1_0192', + sections = [ + Section.Code(code=[0x72, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000720000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_191" + ), + pytest.param( + Container( + name = 'EOFV1_0193', + sections = [ + Section.Code(code=[0x72, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010004040000000080000072000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_192" + ), + pytest.param( + Container( + name = 'EOFV1_0194', + sections = [ + Section.Code(code=[0x72, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000007200000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_193" + ), + pytest.param( + Container( + name = 'EOFV1_0195', + sections = [ + Section.Code(code=[0x72, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100060400000000800000720000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_194" + ), + pytest.param( + Container( + name = 'EOFV1_0196', + sections = [ + Section.Code(code=[0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010007040000000080000072000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_195" + ), + pytest.param( + Container( + name = 'EOFV1_0197', + sections = [ + Section.Code(code=[0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000007200000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_196" + ), + pytest.param( + Container( + name = 'EOFV1_0198', + sections = [ + Section.Code(code=[0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100090400000000800000720000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_197" + ), + pytest.param( + Container( + name = 'EOFV1_0199', + sections = [ + Section.Code(code=[0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a040000000080000072000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_198" + ), + pytest.param( + Container( + name = 'EOFV1_0200', + sections = [ + Section.Code(code=[0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000007200000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_199" + ), + pytest.param( + Container( + name = 'EOFV1_0201', + sections = [ + Section.Code(code=[0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c0400000000800000720000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_200" + ), + pytest.param( + Container( + name = 'EOFV1_0202', + sections = [ + Section.Code(code=[0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d040000000080000072000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_201" + ), + pytest.param( + Container( + name = 'EOFV1_0203', + sections = [ + Section.Code(code=[0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000007200000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_202" + ), + pytest.param( + Container( + name = 'EOFV1_0204', + sections = [ + Section.Code(code=[0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f0400000000800000720000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_203" + ), + pytest.param( + Container( + name = 'EOFV1_0205', + sections = [ + Section.Code(code=[0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010010040000000080000072000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_204" + ), + pytest.param( + Container( + name = 'EOFV1_0206', + sections = [ + Section.Code(code=[0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001104000000008000007200000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_205" + ), + pytest.param( + Container( + name = 'EOFV1_0207', + sections = [ + Section.Code(code=[0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100120400000000800000720000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_206" + ), + pytest.param( + Container( + name = 'EOFV1_0208', + sections = [ + Section.Code(code=[0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010013040000000080000072000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_207" + ), + pytest.param( + Container( + name = 'EOFV1_0209', + sections = [ + Section.Code(code=Op.PUSH19[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef000101000402000100150400000000800001720000000000000000000000000000000000000000", + None, + id="eof1_truncated_push_208" + ), + pytest.param( + Container( + name = 'EOFV1_0210', + sections = [ + Section.Code(code=[0x73], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000073", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_209" + ), + pytest.param( + Container( + name = 'EOFV1_0211', + sections = [ + Section.Code(code=[0x73, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000007300", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_210" + ), + pytest.param( + Container( + name = 'EOFV1_0212', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000730000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_211" + ), + pytest.param( + Container( + name = 'EOFV1_0213', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010004040000000080000073000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_212" + ), + pytest.param( + Container( + name = 'EOFV1_0214', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000007300000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_213" + ), + pytest.param( + Container( + name = 'EOFV1_0215', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100060400000000800000730000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_214" + ), + pytest.param( + Container( + name = 'EOFV1_0216', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010007040000000080000073000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_215" + ), + pytest.param( + Container( + name = 'EOFV1_0217', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000007300000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_216" + ), + pytest.param( + Container( + name = 'EOFV1_0218', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100090400000000800000730000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_217" + ), + pytest.param( + Container( + name = 'EOFV1_0219', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a040000000080000073000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_218" + ), + pytest.param( + Container( + name = 'EOFV1_0220', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000007300000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_219" + ), + pytest.param( + Container( + name = 'EOFV1_0221', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c0400000000800000730000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_220" + ), + pytest.param( + Container( + name = 'EOFV1_0222', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d040000000080000073000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_221" + ), + pytest.param( + Container( + name = 'EOFV1_0223', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000007300000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_222" + ), + pytest.param( + Container( + name = 'EOFV1_0224', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f0400000000800000730000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_223" + ), + pytest.param( + Container( + name = 'EOFV1_0225', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010010040000000080000073000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_224" + ), + pytest.param( + Container( + name = 'EOFV1_0226', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001104000000008000007300000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_225" + ), + pytest.param( + Container( + name = 'EOFV1_0227', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100120400000000800000730000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_226" + ), + pytest.param( + Container( + name = 'EOFV1_0228', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010013040000000080000073000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_227" + ), + pytest.param( + Container( + name = 'EOFV1_0229', + sections = [ + Section.Code(code=[0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001404000000008000007300000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_228" + ), + pytest.param( + Container( + name = 'EOFV1_0230', + sections = [ + Section.Code(code=Op.PUSH20[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef00010100040200010016040000000080000173000000000000000000000000000000000000000000", + None, + id="eof1_truncated_push_229" + ), + pytest.param( + Container( + name = 'EOFV1_0231', + sections = [ + Section.Code(code=[0x74], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000074", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_230" + ), + pytest.param( + Container( + name = 'EOFV1_0232', + sections = [ + Section.Code(code=[0x74, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000007400", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_231" + ), + pytest.param( + Container( + name = 'EOFV1_0233', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000740000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_232" + ), + pytest.param( + Container( + name = 'EOFV1_0234', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010004040000000080000074000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_233" + ), + pytest.param( + Container( + name = 'EOFV1_0235', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000007400000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_234" + ), + pytest.param( + Container( + name = 'EOFV1_0236', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100060400000000800000740000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_235" + ), + pytest.param( + Container( + name = 'EOFV1_0237', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010007040000000080000074000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_236" + ), + pytest.param( + Container( + name = 'EOFV1_0238', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000007400000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_237" + ), + pytest.param( + Container( + name = 'EOFV1_0239', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100090400000000800000740000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_238" + ), + pytest.param( + Container( + name = 'EOFV1_0240', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a040000000080000074000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_239" + ), + pytest.param( + Container( + name = 'EOFV1_0241', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000007400000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_240" + ), + pytest.param( + Container( + name = 'EOFV1_0242', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c0400000000800000740000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_241" + ), + pytest.param( + Container( + name = 'EOFV1_0243', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d040000000080000074000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_242" + ), + pytest.param( + Container( + name = 'EOFV1_0244', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000007400000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_243" + ), + pytest.param( + Container( + name = 'EOFV1_0245', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f0400000000800000740000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_244" + ), + pytest.param( + Container( + name = 'EOFV1_0246', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010010040000000080000074000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_245" + ), + pytest.param( + Container( + name = 'EOFV1_0247', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001104000000008000007400000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_246" + ), + pytest.param( + Container( + name = 'EOFV1_0248', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100120400000000800000740000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_247" + ), + pytest.param( + Container( + name = 'EOFV1_0249', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010013040000000080000074000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_248" + ), + pytest.param( + Container( + name = 'EOFV1_0250', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001404000000008000007400000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_249" + ), + pytest.param( + Container( + name = 'EOFV1_0251', + sections = [ + Section.Code(code=[0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100150400000000800000740000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_250" + ), + pytest.param( + Container( + name = 'EOFV1_0252', + sections = [ + Section.Code(code=Op.PUSH21[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001001704000000008000017400000000000000000000000000000000000000000000", + None, + id="eof1_truncated_push_251" + ), + pytest.param( + Container( + name = 'EOFV1_0253', + sections = [ + Section.Code(code=[0x75], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000075", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_252" + ), + pytest.param( + Container( + name = 'EOFV1_0254', + sections = [ + Section.Code(code=[0x75, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000007500", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_253" + ), + pytest.param( + Container( + name = 'EOFV1_0255', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000750000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_254" + ), + pytest.param( + Container( + name = 'EOFV1_0256', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010004040000000080000075000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_255" + ), + pytest.param( + Container( + name = 'EOFV1_0257', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000007500000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_256" + ), + pytest.param( + Container( + name = 'EOFV1_0258', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100060400000000800000750000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_257" + ), + pytest.param( + Container( + name = 'EOFV1_0259', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010007040000000080000075000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_258" + ), + pytest.param( + Container( + name = 'EOFV1_0260', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000007500000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_259" + ), + pytest.param( + Container( + name = 'EOFV1_0261', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100090400000000800000750000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_260" + ), + pytest.param( + Container( + name = 'EOFV1_0262', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a040000000080000075000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_261" + ), + pytest.param( + Container( + name = 'EOFV1_0263', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000007500000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_262" + ), + pytest.param( + Container( + name = 'EOFV1_0264', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c0400000000800000750000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_263" + ), + pytest.param( + Container( + name = 'EOFV1_0265', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d040000000080000075000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_264" + ), + pytest.param( + Container( + name = 'EOFV1_0266', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000007500000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_265" + ), + pytest.param( + Container( + name = 'EOFV1_0267', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f0400000000800000750000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_266" + ), + pytest.param( + Container( + name = 'EOFV1_0268', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010010040000000080000075000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_267" + ), + pytest.param( + Container( + name = 'EOFV1_0269', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001104000000008000007500000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_268" + ), + pytest.param( + Container( + name = 'EOFV1_0270', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100120400000000800000750000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_269" + ), + pytest.param( + Container( + name = 'EOFV1_0271', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010013040000000080000075000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_270" + ), + pytest.param( + Container( + name = 'EOFV1_0272', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001404000000008000007500000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_271" + ), + pytest.param( + Container( + name = 'EOFV1_0273', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100150400000000800000750000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_272" + ), + pytest.param( + Container( + name = 'EOFV1_0274', + sections = [ + Section.Code(code=[0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010016040000000080000075000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_273" + ), + pytest.param( + Container( + name = 'EOFV1_0275', + sections = [ + Section.Code(code=Op.PUSH22[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef000101000402000100180400000000800001750000000000000000000000000000000000000000000000", + None, + id="eof1_truncated_push_274" + ), + pytest.param( + Container( + name = 'EOFV1_0276', + sections = [ + Section.Code(code=[0x76], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000076", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_275" + ), + pytest.param( + Container( + name = 'EOFV1_0277', + sections = [ + Section.Code(code=[0x76, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000007600", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_276" + ), + pytest.param( + Container( + name = 'EOFV1_0278', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000760000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_277" + ), + pytest.param( + Container( + name = 'EOFV1_0279', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010004040000000080000076000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_278" + ), + pytest.param( + Container( + name = 'EOFV1_0280', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000007600000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_279" + ), + pytest.param( + Container( + name = 'EOFV1_0281', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100060400000000800000760000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_280" + ), + pytest.param( + Container( + name = 'EOFV1_0282', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010007040000000080000076000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_281" + ), + pytest.param( + Container( + name = 'EOFV1_0283', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000007600000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_282" + ), + pytest.param( + Container( + name = 'EOFV1_0284', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100090400000000800000760000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_283" + ), + pytest.param( + Container( + name = 'EOFV1_0285', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a040000000080000076000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_284" + ), + pytest.param( + Container( + name = 'EOFV1_0286', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000007600000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_285" + ), + pytest.param( + Container( + name = 'EOFV1_0287', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c0400000000800000760000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_286" + ), + pytest.param( + Container( + name = 'EOFV1_0288', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d040000000080000076000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_287" + ), + pytest.param( + Container( + name = 'EOFV1_0289', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000007600000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_288" + ), + pytest.param( + Container( + name = 'EOFV1_0290', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f0400000000800000760000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_289" + ), + pytest.param( + Container( + name = 'EOFV1_0291', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010010040000000080000076000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_290" + ), + pytest.param( + Container( + name = 'EOFV1_0292', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001104000000008000007600000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_291" + ), + pytest.param( + Container( + name = 'EOFV1_0293', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100120400000000800000760000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_292" + ), + pytest.param( + Container( + name = 'EOFV1_0294', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010013040000000080000076000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_293" + ), + pytest.param( + Container( + name = 'EOFV1_0295', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001404000000008000007600000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_294" + ), + pytest.param( + Container( + name = 'EOFV1_0296', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100150400000000800000760000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_295" + ), + pytest.param( + Container( + name = 'EOFV1_0297', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010016040000000080000076000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_296" + ), + pytest.param( + Container( + name = 'EOFV1_0298', + sections = [ + Section.Code(code=[0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001704000000008000007600000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_297" + ), + pytest.param( + Container( + name = 'EOFV1_0299', + sections = [ + Section.Code(code=Op.PUSH23[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef00010100040200010019040000000080000176000000000000000000000000000000000000000000000000", + None, + id="eof1_truncated_push_298" + ), + pytest.param( + Container( + name = 'EOFV1_0300', + sections = [ + Section.Code(code=[0x77], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000077", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_299" + ), + pytest.param( + Container( + name = 'EOFV1_0301', + sections = [ + Section.Code(code=[0x77, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000007700", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_300" + ), + pytest.param( + Container( + name = 'EOFV1_0302', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000770000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_301" + ), + pytest.param( + Container( + name = 'EOFV1_0303', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010004040000000080000077000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_302" + ), + pytest.param( + Container( + name = 'EOFV1_0304', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000007700000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_303" + ), + pytest.param( + Container( + name = 'EOFV1_0305', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100060400000000800000770000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_304" + ), + pytest.param( + Container( + name = 'EOFV1_0306', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010007040000000080000077000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_305" + ), + pytest.param( + Container( + name = 'EOFV1_0307', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000007700000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_306" + ), + pytest.param( + Container( + name = 'EOFV1_0308', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100090400000000800000770000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_307" + ), + pytest.param( + Container( + name = 'EOFV1_0309', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a040000000080000077000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_308" + ), + pytest.param( + Container( + name = 'EOFV1_0310', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000007700000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_309" + ), + pytest.param( + Container( + name = 'EOFV1_0311', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c0400000000800000770000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_310" + ), + pytest.param( + Container( + name = 'EOFV1_0312', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d040000000080000077000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_311" + ), + pytest.param( + Container( + name = 'EOFV1_0313', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000007700000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_312" + ), + pytest.param( + Container( + name = 'EOFV1_0314', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f0400000000800000770000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_313" + ), + pytest.param( + Container( + name = 'EOFV1_0315', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010010040000000080000077000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_314" + ), + pytest.param( + Container( + name = 'EOFV1_0316', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001104000000008000007700000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_315" + ), + pytest.param( + Container( + name = 'EOFV1_0317', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100120400000000800000770000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_316" + ), + pytest.param( + Container( + name = 'EOFV1_0318', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010013040000000080000077000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_317" + ), + pytest.param( + Container( + name = 'EOFV1_0319', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001404000000008000007700000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_318" + ), + pytest.param( + Container( + name = 'EOFV1_0320', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100150400000000800000770000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_319" + ), + pytest.param( + Container( + name = 'EOFV1_0321', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010016040000000080000077000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_320" + ), + pytest.param( + Container( + name = 'EOFV1_0322', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001704000000008000007700000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_321" + ), + pytest.param( + Container( + name = 'EOFV1_0323', + sections = [ + Section.Code(code=[0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100180400000000800000770000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_322" + ), + pytest.param( + Container( + name = 'EOFV1_0324', + sections = [ + Section.Code(code=Op.PUSH24[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001001a04000000008000017700000000000000000000000000000000000000000000000000", + None, + id="eof1_truncated_push_323" + ), + pytest.param( + Container( + name = 'EOFV1_0325', + sections = [ + Section.Code(code=[0x78], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000078", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_324" + ), + pytest.param( + Container( + name = 'EOFV1_0326', + sections = [ + Section.Code(code=[0x78, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000007800", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_325" + ), + pytest.param( + Container( + name = 'EOFV1_0327', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000780000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_326" + ), + pytest.param( + Container( + name = 'EOFV1_0328', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010004040000000080000078000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_327" + ), + pytest.param( + Container( + name = 'EOFV1_0329', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000007800000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_328" + ), + pytest.param( + Container( + name = 'EOFV1_0330', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100060400000000800000780000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_329" + ), + pytest.param( + Container( + name = 'EOFV1_0331', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010007040000000080000078000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_330" + ), + pytest.param( + Container( + name = 'EOFV1_0332', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000007800000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_331" + ), + pytest.param( + Container( + name = 'EOFV1_0333', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100090400000000800000780000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_332" + ), + pytest.param( + Container( + name = 'EOFV1_0334', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a040000000080000078000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_333" + ), + pytest.param( + Container( + name = 'EOFV1_0335', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000007800000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_334" + ), + pytest.param( + Container( + name = 'EOFV1_0336', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c0400000000800000780000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_335" + ), + pytest.param( + Container( + name = 'EOFV1_0337', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d040000000080000078000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_336" + ), + pytest.param( + Container( + name = 'EOFV1_0338', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000007800000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_337" + ), + pytest.param( + Container( + name = 'EOFV1_0339', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f0400000000800000780000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_338" + ), + pytest.param( + Container( + name = 'EOFV1_0340', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010010040000000080000078000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_339" + ), + pytest.param( + Container( + name = 'EOFV1_0341', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001104000000008000007800000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_340" + ), + pytest.param( + Container( + name = 'EOFV1_0342', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100120400000000800000780000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_341" + ), + pytest.param( + Container( + name = 'EOFV1_0343', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010013040000000080000078000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_342" + ), + pytest.param( + Container( + name = 'EOFV1_0344', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001404000000008000007800000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_343" + ), + pytest.param( + Container( + name = 'EOFV1_0345', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100150400000000800000780000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_344" + ), + pytest.param( + Container( + name = 'EOFV1_0346', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010016040000000080000078000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_345" + ), + pytest.param( + Container( + name = 'EOFV1_0347', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001704000000008000007800000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_346" + ), + pytest.param( + Container( + name = 'EOFV1_0348', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100180400000000800000780000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_347" + ), + pytest.param( + Container( + name = 'EOFV1_0349', + sections = [ + Section.Code(code=[0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010019040000000080000078000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_348" + ), + pytest.param( + Container( + name = 'EOFV1_0350', + sections = [ + Section.Code(code=Op.PUSH25[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001001b0400000000800001780000000000000000000000000000000000000000000000000000", + None, + id="eof1_truncated_push_349" + ), + pytest.param( + Container( + name = 'EOFV1_0351', + sections = [ + Section.Code(code=[0x79], max_stack_height=0), + ], + ) + , + "ef00010100040200010001040000000080000079", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_350" + ), + pytest.param( + Container( + name = 'EOFV1_0352', + sections = [ + Section.Code(code=[0x79, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000007900", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_351" + ), + pytest.param( + Container( + name = 'EOFV1_0353', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100030400000000800000790000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_352" + ), + pytest.param( + Container( + name = 'EOFV1_0354', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010004040000000080000079000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_353" + ), + pytest.param( + Container( + name = 'EOFV1_0355', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000007900000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_354" + ), + pytest.param( + Container( + name = 'EOFV1_0356', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100060400000000800000790000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_355" + ), + pytest.param( + Container( + name = 'EOFV1_0357', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010007040000000080000079000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_356" + ), + pytest.param( + Container( + name = 'EOFV1_0358', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000007900000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_357" + ), + pytest.param( + Container( + name = 'EOFV1_0359', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100090400000000800000790000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_358" + ), + pytest.param( + Container( + name = 'EOFV1_0360', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a040000000080000079000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_359" + ), + pytest.param( + Container( + name = 'EOFV1_0361', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000007900000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_360" + ), + pytest.param( + Container( + name = 'EOFV1_0362', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c0400000000800000790000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_361" + ), + pytest.param( + Container( + name = 'EOFV1_0363', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d040000000080000079000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_362" + ), + pytest.param( + Container( + name = 'EOFV1_0364', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000007900000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_363" + ), + pytest.param( + Container( + name = 'EOFV1_0365', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f0400000000800000790000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_364" + ), + pytest.param( + Container( + name = 'EOFV1_0366', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010010040000000080000079000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_365" + ), + pytest.param( + Container( + name = 'EOFV1_0367', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001104000000008000007900000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_366" + ), + pytest.param( + Container( + name = 'EOFV1_0368', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100120400000000800000790000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_367" + ), + pytest.param( + Container( + name = 'EOFV1_0369', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010013040000000080000079000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_368" + ), + pytest.param( + Container( + name = 'EOFV1_0370', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001404000000008000007900000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_369" + ), + pytest.param( + Container( + name = 'EOFV1_0371', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100150400000000800000790000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_370" + ), + pytest.param( + Container( + name = 'EOFV1_0372', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010016040000000080000079000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_371" + ), + pytest.param( + Container( + name = 'EOFV1_0373', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001704000000008000007900000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_372" + ), + pytest.param( + Container( + name = 'EOFV1_0374', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100180400000000800000790000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_373" + ), + pytest.param( + Container( + name = 'EOFV1_0375', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef00010100040200010019040000000080000079000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_374" + ), + pytest.param( + Container( + name = 'EOFV1_0376', + sections = [ + Section.Code(code=[0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001a04000000008000007900000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_375" + ), + pytest.param( + Container( + name = 'EOFV1_0377', + sections = [ + Section.Code(code=Op.PUSH26[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001001c040000000080000179000000000000000000000000000000000000000000000000000000", + None, + id="eof1_truncated_push_376" + ), + pytest.param( + Container( + name = 'EOFV1_0378', + sections = [ + Section.Code(code=[0x7a], max_stack_height=0), + ], + ) + , + "ef0001010004020001000104000000008000007a", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_377" + ), + pytest.param( + Container( + name = 'EOFV1_0379', + sections = [ + Section.Code(code=[0x7a, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000007a00", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_378" + ), + pytest.param( + Container( + name = 'EOFV1_0380', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000304000000008000007a0000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_379" + ), + pytest.param( + Container( + name = 'EOFV1_0381', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000404000000008000007a000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_380" + ), + pytest.param( + Container( + name = 'EOFV1_0382', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000007a00000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_381" + ), + pytest.param( + Container( + name = 'EOFV1_0383', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000604000000008000007a0000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_382" + ), + pytest.param( + Container( + name = 'EOFV1_0384', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000704000000008000007a000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_383" + ), + pytest.param( + Container( + name = 'EOFV1_0385', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000007a00000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_384" + ), + pytest.param( + Container( + name = 'EOFV1_0386', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000904000000008000007a0000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_385" + ), + pytest.param( + Container( + name = 'EOFV1_0387', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a04000000008000007a000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_386" + ), + pytest.param( + Container( + name = 'EOFV1_0388', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000007a00000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_387" + ), + pytest.param( + Container( + name = 'EOFV1_0389', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c04000000008000007a0000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_388" + ), + pytest.param( + Container( + name = 'EOFV1_0390', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d04000000008000007a000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_389" + ), + pytest.param( + Container( + name = 'EOFV1_0391', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000007a00000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_390" + ), + pytest.param( + Container( + name = 'EOFV1_0392', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f04000000008000007a0000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_391" + ), + pytest.param( + Container( + name = 'EOFV1_0393', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001004000000008000007a000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_392" + ), + pytest.param( + Container( + name = 'EOFV1_0394', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001104000000008000007a00000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_393" + ), + pytest.param( + Container( + name = 'EOFV1_0395', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001204000000008000007a0000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_394" + ), + pytest.param( + Container( + name = 'EOFV1_0396', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001304000000008000007a000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_395" + ), + pytest.param( + Container( + name = 'EOFV1_0397', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001404000000008000007a00000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_396" + ), + pytest.param( + Container( + name = 'EOFV1_0398', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001504000000008000007a0000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_397" + ), + pytest.param( + Container( + name = 'EOFV1_0399', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001604000000008000007a000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_398" + ), + pytest.param( + Container( + name = 'EOFV1_0400', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001704000000008000007a00000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_399" + ), + pytest.param( + Container( + name = 'EOFV1_0401', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001804000000008000007a0000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_400" + ), + pytest.param( + Container( + name = 'EOFV1_0402', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001904000000008000007a000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_401" + ), + pytest.param( + Container( + name = 'EOFV1_0403', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001a04000000008000007a00000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_402" + ), + pytest.param( + Container( + name = 'EOFV1_0404', + sections = [ + Section.Code(code=[0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001b04000000008000007a0000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_403" + ), + pytest.param( + Container( + name = 'EOFV1_0405', + sections = [ + Section.Code(code=Op.PUSH27[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001001d04000000008000017a00000000000000000000000000000000000000000000000000000000", + None, + id="eof1_truncated_push_404" + ), + pytest.param( + Container( + name = 'EOFV1_0406', + sections = [ + Section.Code(code=[0x7b], max_stack_height=0), + ], + ) + , + "ef0001010004020001000104000000008000007b", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_405" + ), + pytest.param( + Container( + name = 'EOFV1_0407', + sections = [ + Section.Code(code=[0x7b, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000007b00", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_406" + ), + pytest.param( + Container( + name = 'EOFV1_0408', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000304000000008000007b0000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_407" + ), + pytest.param( + Container( + name = 'EOFV1_0409', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000404000000008000007b000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_408" + ), + pytest.param( + Container( + name = 'EOFV1_0410', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000007b00000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_409" + ), + pytest.param( + Container( + name = 'EOFV1_0411', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000604000000008000007b0000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_410" + ), + pytest.param( + Container( + name = 'EOFV1_0412', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000704000000008000007b000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_411" + ), + pytest.param( + Container( + name = 'EOFV1_0413', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000007b00000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_412" + ), + pytest.param( + Container( + name = 'EOFV1_0414', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000904000000008000007b0000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_413" + ), + pytest.param( + Container( + name = 'EOFV1_0415', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a04000000008000007b000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_414" + ), + pytest.param( + Container( + name = 'EOFV1_0416', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000007b00000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_415" + ), + pytest.param( + Container( + name = 'EOFV1_0417', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c04000000008000007b0000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_416" + ), + pytest.param( + Container( + name = 'EOFV1_0418', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d04000000008000007b000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_417" + ), + pytest.param( + Container( + name = 'EOFV1_0419', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000007b00000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_418" + ), + pytest.param( + Container( + name = 'EOFV1_0420', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f04000000008000007b0000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_419" + ), + pytest.param( + Container( + name = 'EOFV1_0421', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001004000000008000007b000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_420" + ), + pytest.param( + Container( + name = 'EOFV1_0422', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001104000000008000007b00000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_421" + ), + pytest.param( + Container( + name = 'EOFV1_0423', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001204000000008000007b0000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_422" + ), + pytest.param( + Container( + name = 'EOFV1_0424', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001304000000008000007b000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_423" + ), + pytest.param( + Container( + name = 'EOFV1_0425', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001404000000008000007b00000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_424" + ), + pytest.param( + Container( + name = 'EOFV1_0426', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001504000000008000007b0000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_425" + ), + pytest.param( + Container( + name = 'EOFV1_0427', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001604000000008000007b000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_426" + ), + pytest.param( + Container( + name = 'EOFV1_0428', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001704000000008000007b00000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_427" + ), + pytest.param( + Container( + name = 'EOFV1_0429', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001804000000008000007b0000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_428" + ), + pytest.param( + Container( + name = 'EOFV1_0430', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001904000000008000007b000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_429" + ), + pytest.param( + Container( + name = 'EOFV1_0431', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001a04000000008000007b00000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_430" + ), + pytest.param( + Container( + name = 'EOFV1_0432', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001b04000000008000007b0000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_431" + ), + pytest.param( + Container( + name = 'EOFV1_0433', + sections = [ + Section.Code(code=[0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001c04000000008000007b000000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_432" + ), + pytest.param( + Container( + name = 'EOFV1_0434', + sections = [ + Section.Code(code=Op.PUSH28[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001001e04000000008000017b0000000000000000000000000000000000000000000000000000000000", + None, + id="eof1_truncated_push_433" + ), + pytest.param( + Container( + name = 'EOFV1_0435', + sections = [ + Section.Code(code=[0x7c], max_stack_height=0), + ], + ) + , + "ef0001010004020001000104000000008000007c", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_434" + ), + pytest.param( + Container( + name = 'EOFV1_0436', + sections = [ + Section.Code(code=[0x7c, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000007c00", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_435" + ), + pytest.param( + Container( + name = 'EOFV1_0437', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000304000000008000007c0000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_436" + ), + pytest.param( + Container( + name = 'EOFV1_0438', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000404000000008000007c000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_437" + ), + pytest.param( + Container( + name = 'EOFV1_0439', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000007c00000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_438" + ), + pytest.param( + Container( + name = 'EOFV1_0440', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000604000000008000007c0000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_439" + ), + pytest.param( + Container( + name = 'EOFV1_0441', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000704000000008000007c000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_440" + ), + pytest.param( + Container( + name = 'EOFV1_0442', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000007c00000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_441" + ), + pytest.param( + Container( + name = 'EOFV1_0443', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000904000000008000007c0000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_442" + ), + pytest.param( + Container( + name = 'EOFV1_0444', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a04000000008000007c000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_443" + ), + pytest.param( + Container( + name = 'EOFV1_0445', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000007c00000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_444" + ), + pytest.param( + Container( + name = 'EOFV1_0446', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c04000000008000007c0000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_445" + ), + pytest.param( + Container( + name = 'EOFV1_0447', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d04000000008000007c000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_446" + ), + pytest.param( + Container( + name = 'EOFV1_0448', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000007c00000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_447" + ), + pytest.param( + Container( + name = 'EOFV1_0449', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f04000000008000007c0000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_448" + ), + pytest.param( + Container( + name = 'EOFV1_0450', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001004000000008000007c000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_449" + ), + pytest.param( + Container( + name = 'EOFV1_0451', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001104000000008000007c00000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_450" + ), + pytest.param( + Container( + name = 'EOFV1_0452', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001204000000008000007c0000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_451" + ), + pytest.param( + Container( + name = 'EOFV1_0453', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001304000000008000007c000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_452" + ), + pytest.param( + Container( + name = 'EOFV1_0454', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001404000000008000007c00000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_453" + ), + pytest.param( + Container( + name = 'EOFV1_0455', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001504000000008000007c0000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_454" + ), + pytest.param( + Container( + name = 'EOFV1_0456', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001604000000008000007c000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_455" + ), + pytest.param( + Container( + name = 'EOFV1_0457', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001704000000008000007c00000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_456" + ), + pytest.param( + Container( + name = 'EOFV1_0458', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001804000000008000007c0000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_457" + ), + pytest.param( + Container( + name = 'EOFV1_0459', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001904000000008000007c000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_458" + ), + pytest.param( + Container( + name = 'EOFV1_0460', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001a04000000008000007c00000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_459" + ), + pytest.param( + Container( + name = 'EOFV1_0461', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001b04000000008000007c0000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_460" + ), + pytest.param( + Container( + name = 'EOFV1_0462', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001c04000000008000007c000000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_461" + ), + pytest.param( + Container( + name = 'EOFV1_0463', + sections = [ + Section.Code(code=[0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001d04000000008000007c00000000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_462" + ), + pytest.param( + Container( + name = 'EOFV1_0464', + sections = [ + Section.Code(code=Op.PUSH29[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001001f04000000008000017c000000000000000000000000000000000000000000000000000000000000", + None, + id="eof1_truncated_push_463" + ), + pytest.param( + Container( + name = 'EOFV1_0465', + sections = [ + Section.Code(code=[0x7d], max_stack_height=0), + ], + ) + , + "ef0001010004020001000104000000008000007d", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_464" + ), + pytest.param( + Container( + name = 'EOFV1_0466', + sections = [ + Section.Code(code=[0x7d, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000007d00", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_465" + ), + pytest.param( + Container( + name = 'EOFV1_0467', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000304000000008000007d0000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_466" + ), + pytest.param( + Container( + name = 'EOFV1_0468', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000404000000008000007d000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_467" + ), + pytest.param( + Container( + name = 'EOFV1_0469', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000007d00000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_468" + ), + pytest.param( + Container( + name = 'EOFV1_0470', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000604000000008000007d0000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_469" + ), + pytest.param( + Container( + name = 'EOFV1_0471', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000704000000008000007d000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_470" + ), + pytest.param( + Container( + name = 'EOFV1_0472', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000007d00000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_471" + ), + pytest.param( + Container( + name = 'EOFV1_0473', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000904000000008000007d0000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_472" + ), + pytest.param( + Container( + name = 'EOFV1_0474', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a04000000008000007d000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_473" + ), + pytest.param( + Container( + name = 'EOFV1_0475', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000007d00000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_474" + ), + pytest.param( + Container( + name = 'EOFV1_0476', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c04000000008000007d0000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_475" + ), + pytest.param( + Container( + name = 'EOFV1_0477', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d04000000008000007d000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_476" + ), + pytest.param( + Container( + name = 'EOFV1_0478', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000007d00000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_477" + ), + pytest.param( + Container( + name = 'EOFV1_0479', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f04000000008000007d0000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_478" + ), + pytest.param( + Container( + name = 'EOFV1_0480', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001004000000008000007d000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_479" + ), + pytest.param( + Container( + name = 'EOFV1_0481', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001104000000008000007d00000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_480" + ), + pytest.param( + Container( + name = 'EOFV1_0482', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001204000000008000007d0000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_481" + ), + pytest.param( + Container( + name = 'EOFV1_0483', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001304000000008000007d000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_482" + ), + pytest.param( + Container( + name = 'EOFV1_0484', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001404000000008000007d00000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_483" + ), + pytest.param( + Container( + name = 'EOFV1_0485', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001504000000008000007d0000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_484" + ), + pytest.param( + Container( + name = 'EOFV1_0486', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001604000000008000007d000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_485" + ), + pytest.param( + Container( + name = 'EOFV1_0487', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001704000000008000007d00000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_486" + ), + pytest.param( + Container( + name = 'EOFV1_0488', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001804000000008000007d0000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_487" + ), + pytest.param( + Container( + name = 'EOFV1_0489', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001904000000008000007d000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_488" + ), + pytest.param( + Container( + name = 'EOFV1_0490', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001a04000000008000007d00000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_489" + ), + pytest.param( + Container( + name = 'EOFV1_0491', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001b04000000008000007d0000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_490" + ), + pytest.param( + Container( + name = 'EOFV1_0492', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001c04000000008000007d000000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_491" + ), + pytest.param( + Container( + name = 'EOFV1_0493', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001d04000000008000007d00000000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_492" + ), + pytest.param( + Container( + name = 'EOFV1_0494', + sections = [ + Section.Code(code=[0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001e04000000008000007d0000000000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_493" + ), + pytest.param( + Container( + name = 'EOFV1_0495', + sections = [ + Section.Code(code=Op.PUSH30[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001002004000000008000017d00000000000000000000000000000000000000000000000000000000000000", + None, + id="eof1_truncated_push_494" + ), + pytest.param( + Container( + name = 'EOFV1_0496', + sections = [ + Section.Code(code=[0x7e], max_stack_height=0), + ], + ) + , + "ef0001010004020001000104000000008000007e", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_495" + ), + pytest.param( + Container( + name = 'EOFV1_0497', + sections = [ + Section.Code(code=[0x7e, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000007e00", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_496" + ), + pytest.param( + Container( + name = 'EOFV1_0498', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000304000000008000007e0000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_497" + ), + pytest.param( + Container( + name = 'EOFV1_0499', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000404000000008000007e000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_498" + ), + pytest.param( + Container( + name = 'EOFV1_0500', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000007e00000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_499" + ), + pytest.param( + Container( + name = 'EOFV1_0501', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000604000000008000007e0000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_500" + ), + pytest.param( + Container( + name = 'EOFV1_0502', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000704000000008000007e000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_501" + ), + pytest.param( + Container( + name = 'EOFV1_0503', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000007e00000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_502" + ), + pytest.param( + Container( + name = 'EOFV1_0504', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000904000000008000007e0000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_503" + ), + pytest.param( + Container( + name = 'EOFV1_0505', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a04000000008000007e000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_504" + ), + pytest.param( + Container( + name = 'EOFV1_0506', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000007e00000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_505" + ), + pytest.param( + Container( + name = 'EOFV1_0507', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c04000000008000007e0000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_506" + ), + pytest.param( + Container( + name = 'EOFV1_0508', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d04000000008000007e000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_507" + ), + pytest.param( + Container( + name = 'EOFV1_0509', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000007e00000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_508" + ), + pytest.param( + Container( + name = 'EOFV1_0510', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f04000000008000007e0000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_509" + ), + pytest.param( + Container( + name = 'EOFV1_0511', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001004000000008000007e000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_510" + ), + pytest.param( + Container( + name = 'EOFV1_0512', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001104000000008000007e00000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_511" + ), + pytest.param( + Container( + name = 'EOFV1_0513', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001204000000008000007e0000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_512" + ), + pytest.param( + Container( + name = 'EOFV1_0514', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001304000000008000007e000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_513" + ), + pytest.param( + Container( + name = 'EOFV1_0515', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001404000000008000007e00000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_514" + ), + pytest.param( + Container( + name = 'EOFV1_0516', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001504000000008000007e0000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_515" + ), + pytest.param( + Container( + name = 'EOFV1_0517', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001604000000008000007e000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_516" + ), + pytest.param( + Container( + name = 'EOFV1_0518', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001704000000008000007e00000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_517" + ), + pytest.param( + Container( + name = 'EOFV1_0519', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001804000000008000007e0000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_518" + ), + pytest.param( + Container( + name = 'EOFV1_0520', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001904000000008000007e000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_519" + ), + pytest.param( + Container( + name = 'EOFV1_0521', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001a04000000008000007e00000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_520" + ), + pytest.param( + Container( + name = 'EOFV1_0522', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001b04000000008000007e0000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_521" + ), + pytest.param( + Container( + name = 'EOFV1_0523', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001c04000000008000007e000000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_522" + ), + pytest.param( + Container( + name = 'EOFV1_0524', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001d04000000008000007e00000000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_523" + ), + pytest.param( + Container( + name = 'EOFV1_0525', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001e04000000008000007e0000000000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_524" + ), + pytest.param( + Container( + name = 'EOFV1_0526', + sections = [ + Section.Code(code=[0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001f04000000008000007e000000000000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_525" + ), + pytest.param( + Container( + name = 'EOFV1_0527', + sections = [ + Section.Code(code=Op.PUSH31[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001002104000000008000017e0000000000000000000000000000000000000000000000000000000000000000", + None, + id="eof1_truncated_push_526" + ), + pytest.param( + Container( + name = 'EOFV1_0528', + sections = [ + Section.Code(code=[0x7f], max_stack_height=0), + ], + ) + , + "ef0001010004020001000104000000008000007f", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_527" + ), + pytest.param( + Container( + name = 'EOFV1_0529', + sections = [ + Section.Code(code=[0x7f, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000007f00", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_528" + ), + pytest.param( + Container( + name = 'EOFV1_0530', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000304000000008000007f0000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_529" + ), + pytest.param( + Container( + name = 'EOFV1_0531', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000404000000008000007f000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_530" + ), + pytest.param( + Container( + name = 'EOFV1_0532', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000007f00000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_531" + ), + pytest.param( + Container( + name = 'EOFV1_0533', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000604000000008000007f0000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_532" + ), + pytest.param( + Container( + name = 'EOFV1_0534', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000704000000008000007f000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_533" + ), + pytest.param( + Container( + name = 'EOFV1_0535', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000804000000008000007f00000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_534" + ), + pytest.param( + Container( + name = 'EOFV1_0536', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000904000000008000007f0000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_535" + ), + pytest.param( + Container( + name = 'EOFV1_0537', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000a04000000008000007f000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_536" + ), + pytest.param( + Container( + name = 'EOFV1_0538', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000b04000000008000007f00000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_537" + ), + pytest.param( + Container( + name = 'EOFV1_0539', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000c04000000008000007f0000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_538" + ), + pytest.param( + Container( + name = 'EOFV1_0540', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000d04000000008000007f000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_539" + ), + pytest.param( + Container( + name = 'EOFV1_0541', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000e04000000008000007f00000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_540" + ), + pytest.param( + Container( + name = 'EOFV1_0542', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000f04000000008000007f0000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_541" + ), + pytest.param( + Container( + name = 'EOFV1_0543', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001004000000008000007f000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_542" + ), + pytest.param( + Container( + name = 'EOFV1_0544', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001104000000008000007f00000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_543" + ), + pytest.param( + Container( + name = 'EOFV1_0545', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001204000000008000007f0000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_544" + ), + pytest.param( + Container( + name = 'EOFV1_0546', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001304000000008000007f000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_545" + ), + pytest.param( + Container( + name = 'EOFV1_0547', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001404000000008000007f00000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_546" + ), + pytest.param( + Container( + name = 'EOFV1_0548', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001504000000008000007f0000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_547" + ), + pytest.param( + Container( + name = 'EOFV1_0549', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001604000000008000007f000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_548" + ), + pytest.param( + Container( + name = 'EOFV1_0550', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001704000000008000007f00000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_549" + ), + pytest.param( + Container( + name = 'EOFV1_0551', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001804000000008000007f0000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_550" + ), + pytest.param( + Container( + name = 'EOFV1_0552', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001904000000008000007f000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_551" + ), + pytest.param( + Container( + name = 'EOFV1_0553', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001a04000000008000007f00000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_552" + ), + pytest.param( + Container( + name = 'EOFV1_0554', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001b04000000008000007f0000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_553" + ), + pytest.param( + Container( + name = 'EOFV1_0555', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001c04000000008000007f000000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_554" + ), + pytest.param( + Container( + name = 'EOFV1_0556', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001d04000000008000007f00000000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_555" + ), + pytest.param( + Container( + name = 'EOFV1_0557', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001e04000000008000007f0000000000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_556" + ), + pytest.param( + Container( + name = 'EOFV1_0558', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001001f04000000008000007f000000000000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_557" + ), + pytest.param( + Container( + name = 'EOFV1_0559', + sections = [ + Section.Code(code=[0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001002004000000008000007f00000000000000000000000000000000000000000000000000000000000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_truncated_push_558" + ), + pytest.param( + Container( + name = 'EOFV1_0560', + sections = [ + Section.Code(code=Op.PUSH32[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001002204000000008000017f000000000000000000000000000000000000000000000000000000000000000000", + None, + id="eof1_truncated_push_559" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_type_section_not_first.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_type_section_not_first.py new file mode 100644 index 0000000000..2568bddd7e --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_type_section_not_first.py @@ -0,0 +1,160 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + #--- Error: Invalid Types Header ---# + 0x02, + 0x00, + 0x01, + 0x00, + 0x01, + 0x01, + 0x00, + 0x04, + 0x00, + 0xfe, + 0x00, + 0x80, + 0x00, + 0x00, + ]), + ) + , + "ef0001020001000101000400fe00800000", + EOFException.MISSING_TYPE_HEADER, + id="eof1_type_section_not_first_0" + ), + pytest.param( + Container( + name="EOFV1_0002", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + #--- Error: Invalid Types Header ---# + 0x02, + 0x00, + 0x02, + 0x00, + 0x01, + 0x00, + 0x01, + 0x01, + 0x00, + 0x04, + 0x00, + 0xfe, + 0xfe, + 0x00, + 0x80, + 0x00, + 0x00, + ]), + ) + , + "ef00010200020001000101000400fefe00800000", + EOFException.MISSING_TYPE_HEADER, + id="eof1_type_section_not_first_1" + ), + pytest.param( + Container( + name="EOFV1_0003", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + #--- Error: Invalid Types Header ---# + 0x02, + 0x00, + 0x01, + 0x00, + 0x01, + 0x01, + 0x00, + 0x04, + 0x04, + 0x00, + 0x03, + 0x00, + 0xfe, + 0x00, + 0x80, + 0x00, + 0x00, + 0xaa, + 0xbb, + 0xcc, + ]), + ) + , + "ef0001020001000101000404000300fe00800000aabbcc", + EOFException.MISSING_TYPE_HEADER, + id="eof1_type_section_not_first_2" + ), + pytest.param( + Container( + name="EOFV1_0004", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + #--- Error: Invalid Types Header ---# + 0x02, + 0x00, + 0x01, + 0x00, + 0x01, + 0x04, + 0x00, + 0x03, + 0x01, + 0x00, + 0x04, + 0x00, + 0xfe, + 0xaa, + 0xbb, + 0xcc, + 0x00, + 0x80, + 0x00, + 0x00, + ]), + ) + , + "ef0001020001000104000301000400feaabbcc00800000", + EOFException.MISSING_TYPE_HEADER, + id="eof1_type_section_not_first_3" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_types_section_0_size.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_types_section_0_size.py new file mode 100644 index 0000000000..c53bdd32b4 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_types_section_0_size.py @@ -0,0 +1,77 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x00, # Types Length: 0 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x04, 0x00, 0x00, # Data Length: 0 + 0x00, # Terminator + #--- Error: Code and Type sections mismatch ---# + # Code Section 0 + 0xfe, # [0] INVALID + ]), + ) + , + "ef0001010000020001000104000000fe", + EOFException.ZERO_SECTION_SIZE, + id="eof1_types_section_0_size_0" + ), + pytest.param( + Container( + name="EOFV1_0002", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x00, # Types Length: 0 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x04, 0x00, 0x01, # Data Length: 1 + 0x00, # Terminator + #--- Error: Code and Type sections mismatch ---# + # Code Section 0 + 0xfe, # [0] INVALID + # Data Section + 0xda, + ]), + ) + , + "ef0001010000020001000104000100feda", + EOFException.ZERO_SECTION_SIZE, + id="eof1_types_section_0_size_1" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_types_section_missing.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_types_section_missing.py new file mode 100644 index 0000000000..51f62184d7 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_types_section_missing.py @@ -0,0 +1,128 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0002", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + #--- Error: Invalid Types Header ---# + 0x02, + 0x00, + 0x01, + 0x00, + 0x01, + 0x00, + 0xfe, + ]), + ) + , + "ef0001020001000100fe", + EOFException.MISSING_TYPE_HEADER, + id="eof1_types_section_missing_1" + ), + pytest.param( + Container( + name="EOFV1_0003", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + #--- Error: Invalid Types Header ---# + 0x02, + 0x00, + 0x01, + 0x00, + 0x01, + 0x03, + 0x00, + 0x01, + 0x00, + 0xfe, + 0xda, + ]), + ) + , + "ef0001020001000103000100feda", + EOFException.MISSING_TYPE_HEADER, + id="eof1_types_section_missing_2" + ), + pytest.param( + Container( + name="EOFV1_0004", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + #--- Error: Invalid Types Header ---# + 0x02, + 0x00, + 0x01, + 0x00, + 0x01, + 0x04, + 0x00, + 0x01, + 0x00, + 0xfe, + 0xda, + ]), + ) + , + "ef0001020001000104000100feda", + EOFException.MISSING_TYPE_HEADER, + id="eof1_types_section_missing_3" + ), + pytest.param( + Container( + name="EOFV1_0005", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + #--- Error: Invalid Types Header ---# + 0x02, + 0x00, + 0x02, + 0x00, + 0x01, + 0x00, + 0x01, + 0x00, + 0xfe, + 0xfe, + ]), + ) + , + "ef00010200020001000100fefe", + EOFException.MISSING_TYPE_HEADER, + id="eof1_types_section_missing_4" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_undefined_opcodes.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_undefined_opcodes.py new file mode 100644 index 0000000000..77970933bd --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_undefined_opcodes.py @@ -0,0 +1,2398 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, UndefinedOpcodes as UOp, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" +Op.NOP = Op.JUMPDEST + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef00010100040200010013040000000080001160018080808080808080808080808080808000", + None, + id="eof1_undefined_opcodes_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.ADD + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080800100", + None, + id="eof1_undefined_opcodes_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.MUL + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080800200", + None, + id="eof1_undefined_opcodes_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SUB + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080800300", + None, + id="eof1_undefined_opcodes_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DIV + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080800400", + None, + id="eof1_undefined_opcodes_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SDIV + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080800500", + None, + id="eof1_undefined_opcodes_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.MOD + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080800600", + None, + id="eof1_undefined_opcodes_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SMOD + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080800700", + None, + id="eof1_undefined_opcodes_7" + ), + pytest.param( + Container( + name = 'EOFV1_0009', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.ADDMOD + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080800800", + None, + id="eof1_undefined_opcodes_8" + ), + pytest.param( + Container( + name = 'EOFV1_0010', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.MULMOD + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080800900", + None, + id="eof1_undefined_opcodes_9" + ), + pytest.param( + Container( + name = 'EOFV1_0011', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.EXP + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080800a00", + None, + id="eof1_undefined_opcodes_10" + ), + pytest.param( + Container( + name = 'EOFV1_0012', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SIGNEXTEND + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080800b00", + None, + id="eof1_undefined_opcodes_11" + ), + pytest.param( + Container( + name = 'EOFV1_0013', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_0C + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080800c00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_12" + ), + pytest.param( + Container( + name = 'EOFV1_0014', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_0D + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080800d00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_13" + ), + pytest.param( + Container( + name = 'EOFV1_0015', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_0E + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080800e00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_14" + ), + pytest.param( + Container( + name = 'EOFV1_0016', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_0F + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080800f00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_15" + ), + pytest.param( + Container( + name = 'EOFV1_0017', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.LT + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080801000", + None, + id="eof1_undefined_opcodes_16" + ), + pytest.param( + Container( + name = 'EOFV1_0018', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.GT + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080801100", + None, + id="eof1_undefined_opcodes_17" + ), + pytest.param( + Container( + name = 'EOFV1_0019', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SLT + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080801200", + None, + id="eof1_undefined_opcodes_18" + ), + pytest.param( + Container( + name = 'EOFV1_0020', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SGT + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080801300", + None, + id="eof1_undefined_opcodes_19" + ), + pytest.param( + Container( + name = 'EOFV1_0021', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.EQ + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080801400", + None, + id="eof1_undefined_opcodes_20" + ), + pytest.param( + Container( + name = 'EOFV1_0022', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.ISZERO + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080801500", + None, + id="eof1_undefined_opcodes_21" + ), + pytest.param( + Container( + name = 'EOFV1_0023', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.AND + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080801600", + None, + id="eof1_undefined_opcodes_22" + ), + pytest.param( + Container( + name = 'EOFV1_0024', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.OR + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080801700", + None, + id="eof1_undefined_opcodes_23" + ), + pytest.param( + Container( + name = 'EOFV1_0025', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.XOR + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080801800", + None, + id="eof1_undefined_opcodes_24" + ), + pytest.param( + Container( + name = 'EOFV1_0026', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.NOT + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080801900", + None, + id="eof1_undefined_opcodes_25" + ), + pytest.param( + Container( + name = 'EOFV1_0027', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.BYTE + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080801a00", + None, + id="eof1_undefined_opcodes_26" + ), + pytest.param( + Container( + name = 'EOFV1_0028', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SHL + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080801b00", + None, + id="eof1_undefined_opcodes_27" + ), + pytest.param( + Container( + name = 'EOFV1_0029', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SHR + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080801c00", + None, + id="eof1_undefined_opcodes_28" + ), + pytest.param( + Container( + name = 'EOFV1_0030', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SAR + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080801d00", + None, + id="eof1_undefined_opcodes_29" + ), + pytest.param( + Container( + name = 'EOFV1_0031', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_1E + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080801e00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_30" + ), + pytest.param( + Container( + name = 'EOFV1_0032', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_1F + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080801f00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_31" + ), + pytest.param( + Container( + name = 'EOFV1_0033', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SHA3 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080802000", + None, + id="eof1_undefined_opcodes_32" + ), + pytest.param( + Container( + name = 'EOFV1_0034', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_21 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080802100", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_33" + ), + pytest.param( + Container( + name = 'EOFV1_0035', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_22 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080802200", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_34" + ), + pytest.param( + Container( + name = 'EOFV1_0036', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_23 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080802300", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_35" + ), + pytest.param( + Container( + name = 'EOFV1_0037', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_24 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080802400", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_36" + ), + pytest.param( + Container( + name = 'EOFV1_0038', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_25 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080802500", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_37" + ), + pytest.param( + Container( + name = 'EOFV1_0039', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_26 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080802600", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_38" + ), + pytest.param( + Container( + name = 'EOFV1_0040', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_27 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080802700", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_39" + ), + pytest.param( + Container( + name = 'EOFV1_0041', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_28 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080802800", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_40" + ), + pytest.param( + Container( + name = 'EOFV1_0042', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_29 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080802900", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_41" + ), + pytest.param( + Container( + name = 'EOFV1_0043', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_2A + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080802a00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_42" + ), + pytest.param( + Container( + name = 'EOFV1_0044', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_2B + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080802b00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_43" + ), + pytest.param( + Container( + name = 'EOFV1_0045', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_2C + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080802c00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_44" + ), + pytest.param( + Container( + name = 'EOFV1_0046', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_2D + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080802d00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_45" + ), + pytest.param( + Container( + name = 'EOFV1_0047', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_2E + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080802e00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_46" + ), + pytest.param( + Container( + name = 'EOFV1_0048', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_2F + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080802f00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_47" + ), + pytest.param( + Container( + name = 'EOFV1_0049', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.ADDRESS + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080803000", + None, + id="eof1_undefined_opcodes_48" + ), + pytest.param( + Container( + name = 'EOFV1_0050', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.BALANCE + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080803100", + None, + id="eof1_undefined_opcodes_49" + ), + pytest.param( + Container( + name = 'EOFV1_0051', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.ORIGIN + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080803200", + None, + id="eof1_undefined_opcodes_50" + ), + pytest.param( + Container( + name = 'EOFV1_0052', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.CALLER + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080803300", + None, + id="eof1_undefined_opcodes_51" + ), + pytest.param( + Container( + name = 'EOFV1_0053', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.CALLVALUE + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080803400", + None, + id="eof1_undefined_opcodes_52" + ), + pytest.param( + Container( + name = 'EOFV1_0054', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.CALLDATALOAD + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080803500", + None, + id="eof1_undefined_opcodes_53" + ), + pytest.param( + Container( + name = 'EOFV1_0055', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.CALLDATASIZE + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080803600", + None, + id="eof1_undefined_opcodes_54" + ), + pytest.param( + Container( + name = 'EOFV1_0056', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.CALLDATACOPY + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080803700", + None, + id="eof1_undefined_opcodes_55" + ), + pytest.param( + Container( + name = 'EOFV1_0057', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.GASPRICE + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080803a00", + None, + id="eof1_undefined_opcodes_56" + ), + pytest.param( + Container( + name = 'EOFV1_0058', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.RETURNDATASIZE + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080803d00", + None, + id="eof1_undefined_opcodes_57" + ), + pytest.param( + Container( + name = 'EOFV1_0059', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.RETURNDATACOPY + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080803e00", + None, + id="eof1_undefined_opcodes_58" + ), + pytest.param( + Container( + name = 'EOFV1_0060', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.BLOCKHASH + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080804000", + None, + id="eof1_undefined_opcodes_59" + ), + pytest.param( + Container( + name = 'EOFV1_0061', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.COINBASE + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080804100", + None, + id="eof1_undefined_opcodes_60" + ), + pytest.param( + Container( + name = 'EOFV1_0062', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.TIMESTAMP + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080804200", + None, + id="eof1_undefined_opcodes_61" + ), + pytest.param( + Container( + name = 'EOFV1_0063', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.NUMBER + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080804300", + None, + id="eof1_undefined_opcodes_62" + ), + pytest.param( + Container( + name = 'EOFV1_0064', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.PREVRANDAO + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080804400", + None, + id="eof1_undefined_opcodes_63" + ), + pytest.param( + Container( + name = 'EOFV1_0065', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.GASLIMIT + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080804500", + None, + id="eof1_undefined_opcodes_64" + ), + pytest.param( + Container( + name = 'EOFV1_0066', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.CHAINID + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080804600", + None, + id="eof1_undefined_opcodes_65" + ), + pytest.param( + Container( + name = 'EOFV1_0067', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SELFBALANCE + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080804700", + None, + id="eof1_undefined_opcodes_66" + ), + pytest.param( + Container( + name = 'EOFV1_0068', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.BASEFEE + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080804800", + None, + id="eof1_undefined_opcodes_67" + ), + pytest.param( + Container( + name = 'EOFV1_0069', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.BLOBHASH + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080804900", + None, + id="eof1_undefined_opcodes_68" + ), + pytest.param( + Container( + name = 'EOFV1_0070', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.BLOBBASEFEE + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080804a00", + None, + id="eof1_undefined_opcodes_69" + ), + pytest.param( + Container( + name = 'EOFV1_0071', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_4B + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080804b00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_70" + ), + pytest.param( + Container( + name = 'EOFV1_0072', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_4C + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080804c00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_71" + ), + pytest.param( + Container( + name = 'EOFV1_0073', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_4D + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080804d00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_72" + ), + pytest.param( + Container( + name = 'EOFV1_0074', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_4E + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080804e00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_73" + ), + pytest.param( + Container( + name = 'EOFV1_0075', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_4F + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080804f00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_74" + ), + pytest.param( + Container( + name = 'EOFV1_0076', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.POP + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080805000", + None, + id="eof1_undefined_opcodes_75" + ), + pytest.param( + Container( + name = 'EOFV1_0077', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.MLOAD + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080805100", + None, + id="eof1_undefined_opcodes_76" + ), + pytest.param( + Container( + name = 'EOFV1_0078', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.MSTORE + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080805200", + None, + id="eof1_undefined_opcodes_77" + ), + pytest.param( + Container( + name = 'EOFV1_0079', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.MSTORE8 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080805300", + None, + id="eof1_undefined_opcodes_78" + ), + pytest.param( + Container( + name = 'EOFV1_0080', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SLOAD + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080805400", + None, + id="eof1_undefined_opcodes_79" + ), + pytest.param( + Container( + name = 'EOFV1_0081', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SSTORE + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080805500", + None, + id="eof1_undefined_opcodes_80" + ), + pytest.param( + Container( + name = 'EOFV1_0082', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.MSIZE + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080805900", + None, + id="eof1_undefined_opcodes_81" + ), + pytest.param( + Container( + name = 'EOFV1_0083', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.NOP + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080805b00", + None, + id="eof1_undefined_opcodes_82" + ), + pytest.param( + Container( + name = 'EOFV1_0084', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.TLOAD + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080805c00", + None, + id="eof1_undefined_opcodes_83" + ), + pytest.param( + Container( + name = 'EOFV1_0085', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.TSTORE + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080805d00", + None, + id="eof1_undefined_opcodes_84" + ), + pytest.param( + Container( + name = 'EOFV1_0086', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.MCOPY + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080805e00", + None, + id="eof1_undefined_opcodes_85" + ), + pytest.param( + Container( + name = 'EOFV1_0087', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.PUSH0 + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080805f00", + None, + id="eof1_undefined_opcodes_86" + ), + pytest.param( + Container( + name = 'EOFV1_0088', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 17 + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080808000", + None, + id="eof1_undefined_opcodes_87" + ), + pytest.param( + Container( + name = 'EOFV1_0089', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DUP2 + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080808100", + None, + id="eof1_undefined_opcodes_88" + ), + pytest.param( + Container( + name = 'EOFV1_0090', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DUP3 + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080808200", + None, + id="eof1_undefined_opcodes_89" + ), + pytest.param( + Container( + name = 'EOFV1_0091', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DUP4 + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080808300", + None, + id="eof1_undefined_opcodes_90" + ), + pytest.param( + Container( + name = 'EOFV1_0092', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DUP5 + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080808400", + None, + id="eof1_undefined_opcodes_91" + ), + pytest.param( + Container( + name = 'EOFV1_0093', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DUP6 + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080808500", + None, + id="eof1_undefined_opcodes_92" + ), + pytest.param( + Container( + name = 'EOFV1_0094', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DUP7 + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080808600", + None, + id="eof1_undefined_opcodes_93" + ), + pytest.param( + Container( + name = 'EOFV1_0095', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DUP8 + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080808700", + None, + id="eof1_undefined_opcodes_94" + ), + pytest.param( + Container( + name = 'EOFV1_0096', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DUP9 + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080808800", + None, + id="eof1_undefined_opcodes_95" + ), + pytest.param( + Container( + name = 'EOFV1_0097', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DUP10 + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080808900", + None, + id="eof1_undefined_opcodes_96" + ), + pytest.param( + Container( + name = 'EOFV1_0098', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DUP11 + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080808a00", + None, + id="eof1_undefined_opcodes_97" + ), + pytest.param( + Container( + name = 'EOFV1_0099', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DUP12 + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080808b00", + None, + id="eof1_undefined_opcodes_98" + ), + pytest.param( + Container( + name = 'EOFV1_0100', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DUP13 + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080808c00", + None, + id="eof1_undefined_opcodes_99" + ), + pytest.param( + Container( + name = 'EOFV1_0101', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DUP14 + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080808d00", + None, + id="eof1_undefined_opcodes_100" + ), + pytest.param( + Container( + name = 'EOFV1_0102', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DUP15 + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080808e00", + None, + id="eof1_undefined_opcodes_101" + ), + pytest.param( + Container( + name = 'EOFV1_0103', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DUP16 + Op.STOP, max_stack_height=18), + ], + ) + , + "ef0001010004020001001404000000008000126001808080808080808080808080808080808f00", + None, + id="eof1_undefined_opcodes_102" + ), + pytest.param( + Container( + name = 'EOFV1_0104', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SWAP1 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080809000", + None, + id="eof1_undefined_opcodes_103" + ), + pytest.param( + Container( + name = 'EOFV1_0105', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SWAP2 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080809100", + None, + id="eof1_undefined_opcodes_104" + ), + pytest.param( + Container( + name = 'EOFV1_0106', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SWAP3 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080809200", + None, + id="eof1_undefined_opcodes_105" + ), + pytest.param( + Container( + name = 'EOFV1_0107', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SWAP4 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080809300", + None, + id="eof1_undefined_opcodes_106" + ), + pytest.param( + Container( + name = 'EOFV1_0108', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SWAP5 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080809400", + None, + id="eof1_undefined_opcodes_107" + ), + pytest.param( + Container( + name = 'EOFV1_0109', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SWAP6 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080809500", + None, + id="eof1_undefined_opcodes_108" + ), + pytest.param( + Container( + name = 'EOFV1_0110', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SWAP7 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080809600", + None, + id="eof1_undefined_opcodes_109" + ), + pytest.param( + Container( + name = 'EOFV1_0111', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SWAP8 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080809700", + None, + id="eof1_undefined_opcodes_110" + ), + pytest.param( + Container( + name = 'EOFV1_0112', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SWAP9 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080809800", + None, + id="eof1_undefined_opcodes_111" + ), + pytest.param( + Container( + name = 'EOFV1_0113', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SWAP10 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080809900", + None, + id="eof1_undefined_opcodes_112" + ), + pytest.param( + Container( + name = 'EOFV1_0114', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SWAP11 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080809a00", + None, + id="eof1_undefined_opcodes_113" + ), + pytest.param( + Container( + name = 'EOFV1_0115', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SWAP12 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080809b00", + None, + id="eof1_undefined_opcodes_114" + ), + pytest.param( + Container( + name = 'EOFV1_0116', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SWAP13 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080809c00", + None, + id="eof1_undefined_opcodes_115" + ), + pytest.param( + Container( + name = 'EOFV1_0117', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SWAP14 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080809d00", + None, + id="eof1_undefined_opcodes_116" + ), + pytest.param( + Container( + name = 'EOFV1_0118', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SWAP15 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080809e00", + None, + id="eof1_undefined_opcodes_117" + ), + pytest.param( + Container( + name = 'EOFV1_0119', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.SWAP16 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef0001010004020001001404000000008000116001808080808080808080808080808080809f00", + None, + id="eof1_undefined_opcodes_118" + ), + pytest.param( + Container( + name = 'EOFV1_0120', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.LOG0 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080a000", + None, + id="eof1_undefined_opcodes_119" + ), + pytest.param( + Container( + name = 'EOFV1_0121', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.LOG1 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080a100", + None, + id="eof1_undefined_opcodes_120" + ), + pytest.param( + Container( + name = 'EOFV1_0122', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.LOG2 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080a200", + None, + id="eof1_undefined_opcodes_121" + ), + pytest.param( + Container( + name = 'EOFV1_0123', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.LOG3 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080a300", + None, + id="eof1_undefined_opcodes_122" + ), + pytest.param( + Container( + name = 'EOFV1_0124', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.LOG4 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080a400", + None, + id="eof1_undefined_opcodes_123" + ), + pytest.param( + Container( + name = 'EOFV1_0125', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_A5 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080a500", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_124" + ), + pytest.param( + Container( + name = 'EOFV1_0126', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_A6 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080a600", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_125" + ), + pytest.param( + Container( + name = 'EOFV1_0127', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_A7 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080a700", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_126" + ), + pytest.param( + Container( + name = 'EOFV1_0128', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_A8 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080a800", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_127" + ), + pytest.param( + Container( + name = 'EOFV1_0129', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_A9 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080a900", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_128" + ), + pytest.param( + Container( + name = 'EOFV1_0130', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_AA + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080aa00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_129" + ), + pytest.param( + Container( + name = 'EOFV1_0131', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_AB + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080ab00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_130" + ), + pytest.param( + Container( + name = 'EOFV1_0132', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_AC + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080ac00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_131" + ), + pytest.param( + Container( + name = 'EOFV1_0133', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_AD + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080ad00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_132" + ), + pytest.param( + Container( + name = 'EOFV1_0134', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_AE + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080ae00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_133" + ), + pytest.param( + Container( + name = 'EOFV1_0135', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_AF + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080af00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_134" + ), + pytest.param( + Container( + name = 'EOFV1_0136', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_B0 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080b000", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_135" + ), + pytest.param( + Container( + name = 'EOFV1_0137', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_B1 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080b100", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_136" + ), + pytest.param( + Container( + name = 'EOFV1_0138', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_B2 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080b200", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_137" + ), + pytest.param( + Container( + name = 'EOFV1_0139', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_B3 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080b300", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_138" + ), + pytest.param( + Container( + name = 'EOFV1_0140', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_B4 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080b400", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_139" + ), + pytest.param( + Container( + name = 'EOFV1_0141', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_B5 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080b500", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_140" + ), + pytest.param( + Container( + name = 'EOFV1_0142', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_B6 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080b600", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_141" + ), + pytest.param( + Container( + name = 'EOFV1_0143', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_B7 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080b700", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_142" + ), + pytest.param( + Container( + name = 'EOFV1_0144', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_B8 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080b800", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_143" + ), + pytest.param( + Container( + name = 'EOFV1_0145', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_B9 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080b900", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_144" + ), + pytest.param( + Container( + name = 'EOFV1_0146', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_BA + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080ba00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_145" + ), + pytest.param( + Container( + name = 'EOFV1_0147', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_BB + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080bb00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_146" + ), + pytest.param( + Container( + name = 'EOFV1_0148', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_BC + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080bc00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_147" + ), + pytest.param( + Container( + name = 'EOFV1_0149', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_BD + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080bd00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_148" + ), + pytest.param( + Container( + name = 'EOFV1_0150', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_BE + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080be00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_149" + ), + pytest.param( + Container( + name = 'EOFV1_0151', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_BF + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080bf00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_150" + ), + pytest.param( + Container( + name = 'EOFV1_0152', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_C0 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080c000", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_151" + ), + pytest.param( + Container( + name = 'EOFV1_0153', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_C1 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080c100", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_152" + ), + pytest.param( + Container( + name = 'EOFV1_0154', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_C2 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080c200", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_153" + ), + pytest.param( + Container( + name = 'EOFV1_0155', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_C3 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080c300", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_154" + ), + pytest.param( + Container( + name = 'EOFV1_0156', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_C4 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080c400", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_155" + ), + pytest.param( + Container( + name = 'EOFV1_0157', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_C5 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080c500", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_156" + ), + pytest.param( + Container( + name = 'EOFV1_0158', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_C6 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080c600", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_157" + ), + pytest.param( + Container( + name = 'EOFV1_0159', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_C7 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080c700", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_158" + ), + pytest.param( + Container( + name = 'EOFV1_0160', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_C8 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080c800", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_159" + ), + pytest.param( + Container( + name = 'EOFV1_0161', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_C9 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080c900", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_160" + ), + pytest.param( + Container( + name = 'EOFV1_0162', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_CA + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080ca00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_161" + ), + pytest.param( + Container( + name = 'EOFV1_0163', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_CB + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080cb00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_162" + ), + pytest.param( + Container( + name = 'EOFV1_0164', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_CC + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080cc00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_163" + ), + pytest.param( + Container( + name = 'EOFV1_0165', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_CD + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080cd00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_164" + ), + pytest.param( + Container( + name = 'EOFV1_0166', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_CE + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080ce00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_165" + ), + pytest.param( + Container( + name = 'EOFV1_0167', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_CF + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080cf00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_166" + ), + pytest.param( + Container( + name = 'EOFV1_0168', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DATALOAD + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080d000", + None, + id="eof1_undefined_opcodes_167" + ), + pytest.param( + Container( + name = 'EOFV1_0169', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DATASIZE + Op.STOP, max_stack_height=18), + ], + ) + , + "ef000101000402000100140400000000800012600180808080808080808080808080808080d200", + None, + id="eof1_undefined_opcodes_168" + ), + pytest.param( + Container( + name = 'EOFV1_0170', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.DATACOPY + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080d300", + None, + id="eof1_undefined_opcodes_169" + ), + pytest.param( + Container( + name = 'EOFV1_0171', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_D4 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080d400", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_170" + ), + pytest.param( + Container( + name = 'EOFV1_0172', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_D5 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080d500", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_171" + ), + pytest.param( + Container( + name = 'EOFV1_0173', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_D6 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080d600", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_172" + ), + pytest.param( + Container( + name = 'EOFV1_0174', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_D7 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080d700", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_173" + ), + pytest.param( + Container( + name = 'EOFV1_0175', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_D8 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080d800", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_174" + ), + pytest.param( + Container( + name = 'EOFV1_0176', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_D9 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080d900", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_175" + ), + pytest.param( + Container( + name = 'EOFV1_0177', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_DA + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080da00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_176" + ), + pytest.param( + Container( + name = 'EOFV1_0178', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_DB + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080db00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_177" + ), + pytest.param( + Container( + name = 'EOFV1_0179', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_DC + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080dc00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_178" + ), + pytest.param( + Container( + name = 'EOFV1_0180', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_DD + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080dd00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_179" + ), + pytest.param( + Container( + name = 'EOFV1_0181', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_DE + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080de00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_180" + ), + pytest.param( + Container( + name = 'EOFV1_0182', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_DF + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080df00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_181" + ), + pytest.param( + Container( + name = 'EOFV1_0184', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_E9 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080e900", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_183" + ), + pytest.param( + Container( + name = 'EOFV1_0185', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_EA + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080ea00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_184" + ), + pytest.param( + Container( + name = 'EOFV1_0186', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_EB + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080eb00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_185" + ), + pytest.param( + Container( + name = 'EOFV1_0187', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_ED + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080ed00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_186" + ), + pytest.param( + Container( + name = 'EOFV1_0188', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_EF + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080ef00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_187" + ), + pytest.param( + Container( + name = 'EOFV1_0189', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.RETURN, max_stack_height=17), + ], + ) + , + "ef000101000402000100130400000000800011600180808080808080808080808080808080f3", + None, + id="eof1_undefined_opcodes_188" + ), + pytest.param( + Container( + name = 'EOFV1_0190', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_F6 + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080f600", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_189" + ), + pytest.param( + Container( + name = 'EOFV1_0191', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.RETURNDATALOAD + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080f700", + None, + id="eof1_undefined_opcodes_190" + ), + pytest.param( + Container( + name = 'EOFV1_0192', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.EXTCALL + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080f800", + None, + id="eof1_undefined_opcodes_191" + ), + pytest.param( + Container( + name = 'EOFV1_0193', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.EXTDELEGATECALL + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080f900", + None, + id="eof1_undefined_opcodes_192" + ), + pytest.param( + Container( + name = 'EOFV1_0194', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.EXTSTATICCALL + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080fb00", + None, + id="eof1_undefined_opcodes_193" + ), + pytest.param( + Container( + name = 'EOFV1_0195', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + UOp.OPCODE_FC + Op.STOP, max_stack_height=17), + ], + ) + , + "ef000101000402000100140400000000800011600180808080808080808080808080808080fc00", + EOFException.UNDEFINED_INSTRUCTION, + id="eof1_undefined_opcodes_194" + ), + pytest.param( + Container( + name = 'EOFV1_0196', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.REVERT, max_stack_height=17), + ], + ) + , + "ef000101000402000100130400000000800011600180808080808080808080808080808080fd", + None, + id="eof1_undefined_opcodes_195" + ), + pytest.param( + Container( + name = 'EOFV1_0197', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.DUP1 * 16 + Op.INVALID, max_stack_height=17), + ], + ) + , + "ef000101000402000100130400000000800011600180808080808080808080808080808080fe", + None, + id="eof1_undefined_opcodes_196" + ), + pytest.param( + Container( + name = 'EOFV1_0198', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + , + "ef000101000402000100010400000000800000fe", + None, + id="eof1_undefined_opcodes_197" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_unknown_section.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_unknown_section.py new file mode 100644 index 0000000000..c4248dbcb5 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_eof1_unknown_section.py @@ -0,0 +1,183 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + #--- Error: Invalid Types Header ---# + 0x05, + 0x00, + 0x01, + 0x00, + 0xfe, + ]), + ) + , + "ef000105000100fe", + EOFException.MISSING_TYPE_HEADER, + id="eof1_unknown_section_0" + ), + pytest.param( + Container( + name="EOFV1_0002", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + #--- Error: Invalid Types Header ---# + 0xff, + 0x00, + 0x01, + 0x00, + 0xfe, + ]), + ) + , + "ef0001ff000100fe", + EOFException.MISSING_TYPE_HEADER, + id="eof1_unknown_section_1" + ), + pytest.param( + Container( + name="EOFV1_0003", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + #--- Error: Invalid Data Header ---# + 0x05, + 0x00, + 0x01, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0xfe, + 0x00, + ]), + ) + , + "ef000101000402000100010500010000800000fe00", + EOFException.MISSING_DATA_SECTION, + id="eof1_unknown_section_2" + ), + pytest.param( + Container( + name="EOFV1_0004", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + #--- Error: Invalid Data Header ---# + 0xff, + 0x00, + 0x01, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0xfe, + 0x00, + ]), + ) + , + "ef00010100040200010001ff00010000800000fe00", + EOFException.MISSING_DATA_SECTION, + id="eof1_unknown_section_3" + ), + pytest.param( + Container( + name="EOFV1_0005", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x04, 0x00, 0x01, # Data Length: 1 + #--- Error: Invalid Terminator ---# + 0x05, + 0x00, + 0x01, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0xfe, + 0xaa, + 0x00, + ]), + ) + , + "ef000101000402000100010400010500010000800000feaa00", + EOFException.MISSING_TERMINATOR, + id="eof1_unknown_section_4" + ), + pytest.param( + Container( + name="EOFV1_0006", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x04, 0x00, 0x01, # Data Length: 1 + #--- Error: Invalid Terminator ---# + 0xff, + 0x00, + 0x01, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0xfe, + 0xaa, + 0x00, + ]), + ) + , + "ef00010100040200010001040001ff00010000800000feaa00", + EOFException.MISSING_TERMINATOR, + id="eof1_unknown_section_5" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_incomplete_section_size.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_incomplete_section_size.py new file mode 100644 index 0000000000..64167e8ced --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_incomplete_section_size.py @@ -0,0 +1,53 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x01, 0x00, # Types Length: 256 + #--- Error: Invalid Code Header ---# + 0x02, + 0x00, + 0x3f, + 0x01, + 0x00, + ]), + ) + , + "ef000101010002003f0100", + EOFException.INCOMPLETE_SECTION_SIZE, + id="incomplete_section_size_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_max_stack_height.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_max_stack_height.py new file mode 100644 index 0000000000..1da57967ed --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_max_stack_height.py @@ -0,0 +1,146 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=0), + Section.Code(code=Op.PUSH1[1] * 1023 + Op.POP * 1023 + Op.RETF, code_outputs=0, max_stack_height=1023), + ], + ) + , + "ef000101000802000200040bfe0400000000800000000003ffe3000100600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050e4", + None, + id="max_stack_height_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[1] * 1023 + Op.POP * 1023 + Op.CALLF[1] + Op.STOP, max_stack_height=1023), + Section.Code(code=Op.RETF, code_outputs=0, max_stack_height=0), + ], + ) + , + "ef00010100080200020c01000104000000008003ff00000000600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050e3000100e4", + None, + id="max_stack_height_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[1] * 1024 + Op.STOP, max_stack_height=1024), + ], + ) + , + "ef000101000402000108010400000000800400600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600100", + EOFException.MAX_STACK_HEIGHT_ABOVE_LIMIT, + id="max_stack_height_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH1[1] * 1024 + Op.CALLF[1] + Op.POP * 1024 + Op.STOP, max_stack_height=1024), + Section.Code(code=Op.RETF, code_outputs=0, max_stack_height=0), + ], + ) + , + "ef00010100080200020c0400010400000000800400000000006001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e300015050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505000e4", + EOFException.MAX_STACK_HEIGHT_ABOVE_LIMIT, + id="max_stack_height_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=0), + Section.Code(code=Op.PUSH1[1] * 1024 + Op.POP * 1024 + Op.RETF, code_outputs=0, max_stack_height=1023), + ], + ) + , + "ef000101000802000200040c010400000000800000000003ffe3000100600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600150505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050e4", + EOFException.INVALID_MAX_STACK_HEIGHT, + id="max_stack_height_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH1[1] * 1024 + Op.CALLF[1] + Op.POP * 1024 + Op.STOP, max_stack_height=1023), + Section.Code(code=Op.RETF, code_outputs=0, max_stack_height=0), + ], + ) + , + "ef00010100080200020c04000104000000008003ff000000006001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e300015050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505000e4", + EOFException.INVALID_MAX_STACK_HEIGHT, + id="max_stack_height_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH1[1] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000804000000008000016000e10002600100", + None, + id="max_stack_height_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[-3] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000604000000008000016000e1fffd00", + EOFException.STACK_HEIGHT_MISMATCH, + id="max_stack_height_7" + ), + pytest.param( + Container( + name = 'EOFV1_0009', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPV[-4] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000704000000008000016000e200fffc00", + EOFException.STACK_HEIGHT_MISMATCH, + id="max_stack_height_8" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_minimal_valid_eof1_code_with_data.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_minimal_valid_eof1_code_with_data.py new file mode 100644 index 0000000000..775c336a7e --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_minimal_valid_eof1_code_with_data.py @@ -0,0 +1,46 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + Section.Data(data="da") + ], + ) + , + "ef000101000402000100010400010000800000feda", + None, + id="minimal_valid_eof1_code_with_data_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_minimal_valid_eof1_multiple_code_sections.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_minimal_valid_eof1_multiple_code_sections.py new file mode 100644 index 0000000000..27a08fe420 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_minimal_valid_eof1_multiple_code_sections.py @@ -0,0 +1,91 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x08, # Types Length: 8 + 0x02, 0x00, 0x02, # Code Sections (Length: 2) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x00, 0x01, # Code Section 1 (Length: 1) + #--- Error: Invalid Data Header ---# + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0xfe, + 0xfe, + ]), + ) + , + "ef000101000802000200010001000080000000800000fefe", + EOFException.MISSING_DATA_SECTION, + id="no_data_section" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.CALLF[1] + Op.STOP, max_stack_height=1), + Section.Code(code=Op.POP + Op.CALLF[2] + Op.POP + Op.RETF, code_inputs=1, code_outputs=0, max_stack_height=1), + Section.Code(code=Op.ADDRESS + Op.DUP1 + Op.CALLF[3] + Op.POP * 2 + Op.RETF, code_outputs=1, max_stack_height=3), + Section.Code(code=Op.DUP1 + Op.RETF, code_inputs=2, code_outputs=3, max_stack_height=3), + ], + ) + , + "ef0001010010020004000500060008000204000000008000010100000100010003020300035fe300010050e3000250e43080e300035050e480e4", + None, + id="non_void_input_output" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.JUMPF[1], max_stack_height=0), + Section.Code(code=Op.INVALID, max_stack_height=0), + Section.Data(data="da") + ], + ) + , + "ef000101000802000200030001040001000080000000800000e50001feda", + None, + id="with_data_section" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_minimal_valid_eof1_multiple_container_sections.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_minimal_valid_eof1_multiple_container_sections.py new file mode 100644 index 0000000000..2de51825a7 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_minimal_valid_eof1_multiple_container_sections.py @@ -0,0 +1,68 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x03, 0x00, 0x01, # Container Sections (Length: 1) + 0x00, 0x01, # Container Section 0 (Length: 1) + #--- Error: Invalid Data Header ---# + 0x03, + 0x00, + 0x01, + 0x00, + 0x01, + 0x04, + 0x00, + 0x00, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + ]), + ) + , + "ef00010100040200010001030001000103000100010400000000800000000000", + EOFException.MISSING_DATA_SECTION, + id="no_data_section" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_multiple_code_sections_headers.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_multiple_code_sections_headers.py new file mode 100644 index 0000000000..a37f154272 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_multiple_code_sections_headers.py @@ -0,0 +1,76 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x08, # Types Length: 8 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x04, # Code Section 0 (Length: 4) + #--- Error: Invalid Data Header ---# + 0x02, + 0x00, + 0x01, + 0x00, + 0x05, + 0x04, + 0x00, + 0x00, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0x04, + 0x5c, + 0x00, + 0x00, + 0x00, + 0x40, + 0x5c, + 0x00, + 0x00, + 0x00, + 0x2e, + 0x00, + 0x05, + ]), + ) + , + "ef0001010008020001000402000100050400000000800000045c000000405c0000002e0005", + EOFException.MISSING_DATA_SECTION, + id="multiple_code_sections_headers_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_unreachable_code_sections.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_unreachable_code_sections.py new file mode 100644 index 0000000000..093afb8674 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_unreachable_code_sections.py @@ -0,0 +1,153 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +# Container containing 256 code sections, section index 2 is unreachable +unreachable_code_sections_6 = Container( + name="EOFV1_0007", + sections=[ + Section.Code(code=Op.JUMPF[1]), + Section.Code(code=Op.JUMPF[1]), + ] + [Section.Code(code=Op.JUMPF[i+1]) for i in range(2, 255)] + + [Section.Code(code=Op.NOP * 3 + Op.STOP)] +) + +# Container containing 256 code sections, section index 255 is unreachable +unreachable_code_sections_7 = Container( + name="EOFV1_0007", + sections=[ + Section.Code(code=Op.JUMPF[1]), + ] + [Section.Code(code=Op.JUMPF[i+1]) for i in range(1, 254)] + + [Section.Code(code=Op.JUMPF[254])] + + [Section.Code(code=Op.NOP * 3 + Op.STOP)] +) + + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=0), + Section.Code(code=Op.NOP + Op.RETF, code_outputs=0, max_stack_height=0), + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + , + "ef000101000c02000300040002000104000000008000000000000000800000e30001005be4fe", + EOFException.UNREACHABLE_CODE_SECTIONS, + id="unreachable_code_sections_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.CALLF[2] + Op.STOP, max_stack_height=0), + Section.Code(code=Op.INVALID, max_stack_height=0), + Section.Code(code=Op.NOP + Op.RETF, code_outputs=0, max_stack_height=0), + ], + ) + , + "ef000101000c02000300040001000204000000008000000080000000000000e3000200fe5be4", + EOFException.UNREACHABLE_CODE_SECTIONS, + id="unreachable_code_sections_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.CALLF[3] + Op.STOP, max_stack_height=0), + Section.Code(code=Op.INVALID, max_stack_height=0), + Section.Code(code=Op.NOP + Op.RETF, code_outputs=0, max_stack_height=0), + Section.Code(code=Op.CALLF[2] + Op.RETF, code_outputs=0, max_stack_height=0), + ], + ) + , + "ef000101001002000400040001000200040400000000800000008000000000000000000000e3000300fe5be4e30002e4", + EOFException.UNREACHABLE_CODE_SECTIONS, + id="unreachable_code_sections_3" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.JUMPF[1], max_stack_height=0), + Section.Code(code=Op.STOP, max_stack_height=0), + Section.Code(code=Op.NOP + Op.RETF, code_outputs=0, max_stack_height=0), + ], + ) + , + "ef000101000c02000300030001000204000000008000000080000000000000e50001005be4", + EOFException.UNREACHABLE_CODE_SECTIONS, + id="unreachable_code_sections_5" + ), + pytest.param( + unreachable_code_sections_6, + "ef000101040002010000030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300040400000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000e50001e50001e50003e50004e50005e50006e50007e50008e50009e5000ae5000be5000ce5000de5000ee5000fe50010e50011e50012e50013e50014e50015e50016e50017e50018e50019e5001ae5001be5001ce5001de5001ee5001fe50020e50021e50022e50023e50024e50025e50026e50027e50028e50029e5002ae5002be5002ce5002de5002ee5002fe50030e50031e50032e50033e50034e50035e50036e50037e50038e50039e5003ae5003be5003ce5003de5003ee5003fe50040e50041e50042e50043e50044e50045e50046e50047e50048e50049e5004ae5004be5004ce5004de5004ee5004fe50050e50051e50052e50053e50054e50055e50056e50057e50058e50059e5005ae5005be5005ce5005de5005ee5005fe50060e50061e50062e50063e50064e50065e50066e50067e50068e50069e5006ae5006be5006ce5006de5006ee5006fe50070e50071e50072e50073e50074e50075e50076e50077e50078e50079e5007ae5007be5007ce5007de5007ee5007fe50080e50081e50082e50083e50084e50085e50086e50087e50088e50089e5008ae5008be5008ce5008de5008ee5008fe50090e50091e50092e50093e50094e50095e50096e50097e50098e50099e5009ae5009be5009ce5009de5009ee5009fe500a0e500a1e500a2e500a3e500a4e500a5e500a6e500a7e500a8e500a9e500aae500abe500ace500ade500aee500afe500b0e500b1e500b2e500b3e500b4e500b5e500b6e500b7e500b8e500b9e500bae500bbe500bce500bde500bee500bfe500c0e500c1e500c2e500c3e500c4e500c5e500c6e500c7e500c8e500c9e500cae500cbe500cce500cde500cee500cfe500d0e500d1e500d2e500d3e500d4e500d5e500d6e500d7e500d8e500d9e500dae500dbe500dce500dde500dee500dfe500e0e500e1e500e2e500e3e500e4e500e5e500e6e500e7e500e8e500e9e500eae500ebe500ece500ede500eee500efe500f0e500f1e500f2e500f3e500f4e500f5e500f6e500f7e500f8e500f9e500fae500fbe500fce500fde500fee500ff5b5b5b00", + EOFException.UNREACHABLE_CODE_SECTIONS, + id="unreachable_code_sections_6" + ), + pytest.param( + unreachable_code_sections_7, + "ef000101040002010000030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300040400000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000008000000080000000800000e50001e50002e50003e50004e50005e50006e50007e50008e50009e5000ae5000be5000ce5000de5000ee5000fe50010e50011e50012e50013e50014e50015e50016e50017e50018e50019e5001ae5001be5001ce5001de5001ee5001fe50020e50021e50022e50023e50024e50025e50026e50027e50028e50029e5002ae5002be5002ce5002de5002ee5002fe50030e50031e50032e50033e50034e50035e50036e50037e50038e50039e5003ae5003be5003ce5003de5003ee5003fe50040e50041e50042e50043e50044e50045e50046e50047e50048e50049e5004ae5004be5004ce5004de5004ee5004fe50050e50051e50052e50053e50054e50055e50056e50057e50058e50059e5005ae5005be5005ce5005de5005ee5005fe50060e50061e50062e50063e50064e50065e50066e50067e50068e50069e5006ae5006be5006ce5006de5006ee5006fe50070e50071e50072e50073e50074e50075e50076e50077e50078e50079e5007ae5007be5007ce5007de5007ee5007fe50080e50081e50082e50083e50084e50085e50086e50087e50088e50089e5008ae5008be5008ce5008de5008ee5008fe50090e50091e50092e50093e50094e50095e50096e50097e50098e50099e5009ae5009be5009ce5009de5009ee5009fe500a0e500a1e500a2e500a3e500a4e500a5e500a6e500a7e500a8e500a9e500aae500abe500ace500ade500aee500afe500b0e500b1e500b2e500b3e500b4e500b5e500b6e500b7e500b8e500b9e500bae500bbe500bce500bde500bee500bfe500c0e500c1e500c2e500c3e500c4e500c5e500c6e500c7e500c8e500c9e500cae500cbe500cce500cde500cee500cfe500d0e500d1e500d2e500d3e500d4e500d5e500d6e500d7e500d8e500d9e500dae500dbe500dce500dde500dee500dfe500e0e500e1e500e2e500e3e500e4e500e5e500e6e500e7e500e8e500e9e500eae500ebe500ece500ede500eee500efe500f0e500f1e500f2e500f3e500f4e500f5e500f6e500f7e500f8e500f9e500fae500fbe500fce500fde500fee500fe5b5b5b00", + EOFException.UNREACHABLE_CODE_SECTIONS, + id="unreachable_code_sections_7" + ), + pytest.param( + Container( + name = 'EOFV1_0009', + sections = [ + Section.Code(code=Op.JUMPF[1], max_stack_height=0), + Section.Code(code=Op.JUMPF[1], max_stack_height=0), + Section.Code(code=Op.JUMPF[2], max_stack_height=0), + ], + ) + , + "ef000101000c02000300030003000304000000008000000080000000800000e50001e50001e50002", + EOFException.UNREACHABLE_CODE_SECTIONS, + id="unreachable_code_sections_8" + ), + pytest.param( + Container( + name = 'EOFV1_0010', + sections = [ + Section.Code(code=Op.JUMPF[1], max_stack_height=0), + Section.Code(code=Op.JUMPF[2], max_stack_height=0), + Section.Code(code=Op.INVALID, max_stack_height=0), + Section.Code(code=Op.JUMPF[4], max_stack_height=0), + Section.Code(code=Op.JUMPF[3], max_stack_height=0), + ], + ) + , + "ef000101001402000500030003000100030003040000000080000000800000008000000080000000800000e50001e50002fee50004e50003", + EOFException.UNREACHABLE_CODE_SECTIONS, + id="unreachable_code_sections_9" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_validate_eof_prefix.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_validate_eof_prefix.py new file mode 100644 index 0000000000..20647cc2bc --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_validate_eof_prefix.py @@ -0,0 +1,148 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + #--- Error found: Invalid Magic+Version ---# + 0xef, + 0xff, + 0x01, + 0x01, + 0x00, + 0x04, + 0x02, + 0x00, + 0x01, + 0x00, + 0x03, + 0x04, + 0x00, + 0x04, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0x60, + 0x00, + 0x00, + 0xaa, + 0xbb, + 0xcc, + 0xdd, + ]), + ) + , + "efff0101000402000100030400040000800000600000aabbccdd", + EOFException.INVALID_MAGIC, + id="valid_except_magic" + ), + pytest.param( + Container( + name="EOFV1_0002", + raw_bytes=( + [ + #--- Error found: Invalid Magic+Version ---# + 0x00, + ]), + ) + , + "00", + EOFException.INVALID_MAGIC, + id="validate_eof_prefix_0" + ), + pytest.param( + Container( + name="EOFV1_0003", + raw_bytes=( + [ + #--- Error found: Invalid Magic+Version ---# + 0xfe, + ]), + ) + , + "fe", + EOFException.INVALID_MAGIC, + id="validate_eof_prefix_1" + ), + pytest.param( + Container( + name="EOFV1_0005", + raw_bytes=( + [ + #--- Error found: Invalid Magic+Version ---# + 0xef, + 0x01, + 0x01, + ]), + ) + , + "ef0101", + EOFException.INVALID_MAGIC, + id="validate_eof_prefix_3" + ), + pytest.param( + Container( + name="EOFV1_0006", + raw_bytes=( + [ + #--- Error found: Invalid Magic+Version ---# + 0xef, + 0xef, + 0x01, + ]), + ) + , + "efef01", + EOFException.INVALID_MAGIC, + id="validate_eof_prefix_4" + ), + pytest.param( + Container( + name="EOFV1_0007", + raw_bytes=( + [ + #--- Error found: Invalid Magic+Version ---# + 0xef, + 0xff, + 0x01, + ]), + ) + , + "efff01", + EOFException.INVALID_MAGIC, + id="validate_eof_prefix_5" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_validate_eof_version.py b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_validate_eof_version.py new file mode 100644 index 0000000000..5e38f8535c --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_validate_eof_version.py @@ -0,0 +1,182 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-3540.md" +REFERENCE_SPEC_VERSION = "12ca2f0bd2f7380100e154aaaa0995c46cbb2710" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + #--- Error found: Invalid Magic+Version ---# + 0xef, + 0x00, + 0xff, + 0x01, + 0x00, + 0x04, + 0x02, + 0x00, + 0x01, + 0x00, + 0x03, + 0x04, + 0x00, + 0x04, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0x60, + 0x00, + 0x00, + 0xaa, + 0xbb, + 0xcc, + 0xdd, + ]), + ) + , + "ef00ff01000402000100030400040000800000600000aabbccdd", + EOFException.INVALID_VERSION, + id="valid_except_version_ff" + ), + pytest.param( + Container( + name="EOFV1_0002", + raw_bytes=( + [ + #--- Error found: Invalid Magic+Version ---# + 0xef, + 0x00, + 0x00, + 0x01, + 0x00, + 0x04, + 0x02, + 0x00, + 0x01, + 0x00, + 0x03, + 0x04, + 0x00, + 0x04, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0x60, + 0x00, + 0x00, + 0xaa, + 0xbb, + 0xcc, + 0xdd, + ]), + ) + , + "ef000001000402000100030400040000800000600000aabbccdd", + EOFException.INVALID_VERSION, + id="valid_except_version_00" + ), + pytest.param( + Container( + name="EOFV1_0003", + raw_bytes=( + [ + #--- Error found: Invalid Magic+Version ---# + 0xef, + 0x00, + 0x02, + ]), + ) + , + "ef0002", + EOFException.INVALID_VERSION, + id="validate_eof_version_0" + ), + pytest.param( + Container( + name="EOFV1_0004", + raw_bytes=( + [ + #--- Error found: Invalid Magic+Version ---# + 0xef, + 0x00, + 0xff, + ]), + ) + , + "ef00ff", + EOFException.INVALID_VERSION, + id="validate_eof_version_1" + ), + pytest.param( + Container( + name="EOFV1_0005", + raw_bytes=( + [ + #--- Error found: Invalid Magic+Version ---# + 0xef, + 0x00, + 0x02, + 0x01, + 0x00, + 0x04, + 0x02, + 0x00, + 0x01, + 0x00, + 0x03, + 0x04, + 0x00, + 0x04, + 0x00, + 0x00, + 0x80, + 0x00, + 0x00, + 0x60, + 0x00, + 0x00, + 0xaa, + 0xbb, + 0xcc, + 0xdd, + ]), + ) + , + "ef000201000402000100030400040000800000600000aabbccdd", + EOFException.INVALID_VERSION, + id="valid_except_version_02" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjump_invalid_destination.py b/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjump_invalid_destination.py new file mode 100644 index 0000000000..9df3756156 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjump_invalid_destination.py @@ -0,0 +1,120 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section, ContainerKind + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-4200.md" +REFERENCE_SPEC_VERSION = "b452cf8a47e5b5bf08a1576a4dfaf828306beb5a" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.RJUMP[-5] + Op.STOP, max_stack_height=0), + ], + ) + , + "ef000101000402000100040400000000800000e0fffb00", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjump_invalid_destination_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.RJUMP[-13] + Op.STOP, max_stack_height=0), + ], + ) + , + "ef000101000402000100040400000000800000e0fff300", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjump_invalid_destination_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.RJUMP[2] + Op.STOP, max_stack_height=0), + ], + ) + , + "ef000101000402000100040400000000800000e0000200", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjump_invalid_destination_2" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMP[-4] + Op.STOP, max_stack_height=0), + ], + ) + , + "ef0001010004020001000604000000008000006000e0fffc00", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjump_invalid_destination_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.RJUMP[9] + Op.PUSH1[0] + Op.PUSH1[255] + Op.PUSH1[0] * 2 + Op.EOFCREATE[0] + Op.POP + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0007_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + ) + , + "ef0001010004020001000f03000100140400000000800004e00009600060ff60006000ec005000ef000101000402000100010400000000800000fe", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjump_invalid_destination_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.RJUMP[5] + Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container(container=Container( + name = 'EOFV1_0008_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + kind=ContainerKind.INITCODE + ) + , + "ef0001010004020001000903000100140400000000800002e0000560006000ee00ef000101000402000100010400000000800000fe", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjump_invalid_destination_7" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjumpi_invalid_destination.py b/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjumpi_invalid_destination.py new file mode 100644 index 0000000000..2df911b455 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjumpi_invalid_destination.py @@ -0,0 +1,144 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section, ContainerKind + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-4200.md" +REFERENCE_SPEC_VERSION = "b452cf8a47e5b5bf08a1576a4dfaf828306beb5a" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[-7] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000604000000008000016000e1fff900", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpi_invalid_destination_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[-15] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000604000000008000016000e1fff100", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpi_invalid_destination_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[2] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000604000000008000016000e1000200", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpi_invalid_destination_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[1] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000604000000008000016000e1000100", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpi_invalid_destination_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[-1] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000604000000008000016000e1ffff00", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpi_invalid_destination_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[-4] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000604000000008000016000e1fffc00", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpi_invalid_destination_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[9] + Op.PUSH1[0] + Op.PUSH1[255] + Op.PUSH1[0] * 2 + Op.EOFCREATE[0] + Op.POP + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0007_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + ) + , + "ef00010100040200010011030001001404000000008000046000e10009600060ff60006000ec005000ef000101000402000100010400000000800000fe", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpi_invalid_destination_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[5] + Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container(container=Container( + name = 'EOFV1_0008_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + kind=ContainerKind.INITCODE + ) + , + "ef0001010004020001000b030001001404000000008000026000e1000560006000ee00ef000101000402000100010400000000800000fe", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpi_invalid_destination_7" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjumpi_truncated.py b/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjumpi_truncated.py new file mode 100644 index 0000000000..43c2c99644 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjumpi_truncated.py @@ -0,0 +1,57 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-4200.md" +REFERENCE_SPEC_VERSION = "b452cf8a47e5b5bf08a1576a4dfaf828306beb5a" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=[0x60, 0x00, 0xe1], max_stack_height=0), + ], + ) + , + "ef0001010004020001000304000000008000006000e1", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_rjumpi_truncated_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=[0x60, 0x00, 0xe1, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000404000000008000006000e100", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_rjumpi_truncated_1" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjumpv_invalid_destination.py b/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjumpv_invalid_destination.py new file mode 100644 index 0000000000..f1e65f47a7 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjumpv_invalid_destination.py @@ -0,0 +1,192 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section, ContainerKind + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-4200.md" +REFERENCE_SPEC_VERSION = "b452cf8a47e5b5bf08a1576a4dfaf828306beb5a" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPV[-23] + Op.PUSH1[1] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000904000000008000016000e200ffe9600100", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpv_invalid_destination_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPV[-8] + Op.PUSH1[1] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000904000000008000016000e200fff8600100", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpv_invalid_destination_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPV[-1] + Op.PUSH1[1] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000904000000008000016000e200ffff600100", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpv_invalid_destination_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPV[3] + Op.PUSH1[1] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000904000000008000016000e2000003600100", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpv_invalid_destination_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPV[4] + Op.PUSH1[1] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000904000000008000016000e2000004600100", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpv_invalid_destination_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH1[2] + Op.RJUMPV[0,3,-27] + Op.PUSH1[1] + Op.STOP + Op.PUSH1[2] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001001004000000008000016002e20200000003ffe5600100600200", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpv_invalid_destination_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH1[2] + Op.RJUMPV[0,3,-12] + Op.PUSH1[1] + Op.STOP + Op.PUSH1[2] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001001004000000008000016002e20200000003fff4600100600200", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpv_invalid_destination_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.PUSH1[2] + Op.RJUMPV[0,3,-1] + Op.PUSH1[1] + Op.STOP + Op.PUSH1[2] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001001004000000008000016002e20200000003ffff600100600200", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpv_invalid_destination_7" + ), + pytest.param( + Container( + name = 'EOFV1_0009', + sections = [ + Section.Code(code=Op.PUSH1[2] + Op.RJUMPV[0,3,6] + Op.PUSH1[1] + Op.STOP + Op.PUSH1[2] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001001004000000008000016002e202000000030006600100600200", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpv_invalid_destination_8" + ), + pytest.param( + Container( + name = 'EOFV1_0010', + sections = [ + Section.Code(code=Op.PUSH1[2] + Op.RJUMPV[0,3,7] + Op.PUSH1[1] + Op.STOP + Op.PUSH1[2] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001001004000000008000016002e202000000030007600100600200", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpv_invalid_destination_9" + ), + pytest.param( + Container( + name = 'EOFV1_0011', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPV[9] + Op.PUSH1[0] + Op.PUSH1[255] + Op.PUSH1[0] * 2 + Op.EOFCREATE[0] + Op.POP + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0011_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + ) + , + "ef00010100040200010012030001001404000000008000046000e2000009600060ff60006000ec005000ef000101000402000100010400000000800000fe", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpv_invalid_destination_10" + ), + pytest.param( + Container( + name = 'EOFV1_0012', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPV[5] + Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container(container=Container( + name = 'EOFV1_0012_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + kind=ContainerKind.INITCODE + ) + , + "ef0001010004020001000c030001001404000000008000026000e200000560006000ee00ef000101000402000100010400000000800000fe", + EOFException.INVALID_RJUMP_DESTINATION, + id="eof1_rjumpv_invalid_destination_11" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjumpv_truncated.py b/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjumpv_truncated.py new file mode 100644 index 0000000000..79b223878c --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_rjumpv_truncated.py @@ -0,0 +1,81 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-4200.md" +REFERENCE_SPEC_VERSION = "b452cf8a47e5b5bf08a1576a4dfaf828306beb5a" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=[0x60, 0x00, 0xe2, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000006000e20000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_rjumpv_truncated_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=[0x60, 0x00, 0xe2, 0x01, 0x00, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000704000000008000006000e201000000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_rjumpv_truncated_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=[0x60, 0x02, 0xe2, 0x01, 0x00, 0x00], max_stack_height=0), + ], + ) + , + "ef0001010004020001000604000000008000006002e2010000", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_rjumpv_truncated_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=[0x60, 0x02, 0xe2, 0x02, 0x00, 0x00, 0x00, 0x03, 0xff], max_stack_height=0), + ], + ) + , + "ef0001010004020001000904000000008000006002e20200000003ff", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_rjumpv_truncated_3" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_valid_rjump.py b/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_valid_rjump.py new file mode 100644 index 0000000000..6421b5378c --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_valid_rjump.py @@ -0,0 +1,69 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-4200.md" +REFERENCE_SPEC_VERSION = "b452cf8a47e5b5bf08a1576a4dfaf828306beb5a" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.NOP + Op.RJUMP[-4], max_stack_height=0), + ], + ) + , + "ef0001010004020001000404000000008000005be0fffc", + None, + id="offset_negative" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.RJUMPI[5] + Op.PUSH0 * 2 + Op.RJUMP[3] + Op.PUSH0 + Op.PUSH1[1] + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000d04000000008000025fe100055f5fe000035f600100", + None, + id="offset_positive" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.RJUMP[0] + Op.STOP, max_stack_height=0), + ], + ) + , + "ef000101000402000100040400000000800000e0000000", + None, + id="offset_zero" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_valid_rjumpi.py b/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_valid_rjumpi.py new file mode 100644 index 0000000000..23f61b047b --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_valid_rjumpi.py @@ -0,0 +1,69 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-4200.md" +REFERENCE_SPEC_VERSION = "b452cf8a47e5b5bf08a1576a4dfaf828306beb5a" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[-5] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000604000000008000016000e1fffb00", + None, + id="offset_negative" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[3] + Op.NOP * 3 + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000904000000008000016000e100035b5b5b00", + None, + id="offset_positive" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000604000000008000016000e1000000", + None, + id="offset_zero" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_valid_rjumpv.py b/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_valid_rjumpv.py new file mode 100644 index 0000000000..87869a1d7b --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_eof1_valid_rjumpv.py @@ -0,0 +1,81 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-4200.md" +REFERENCE_SPEC_VERSION = "b452cf8a47e5b5bf08a1576a4dfaf828306beb5a" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPV[0] + Op.PUSH1[1] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000904000000008000016000e2000000600100", + None, + id="single_entry_case_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPV[0,3] + Op.PUSH1[1] + Op.STOP + Op.PUSH1[2] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000e04000000008000016000e20100000003600100600200", + None, + id="two_entries_case_0" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[2] + Op.RJUMPV[0,3,-10] + Op.PUSH1[1] + Op.STOP + Op.PUSH1[2] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001001004000000008000016002e20200000003fff6600100600200", + None, + id="three_entries_case_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH1[2] + Op.RJUMPV[0,3] + Op.PUSH1[1] + Op.STOP + Op.PUSH1[2] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000e04000000008000016002e20100000003600100600200", + None, + id="two_entries_case_2" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip4750_functions/test_callf_into_nonreturning.py b/tests/osaka/eip7692_eof_v1/eip4750_functions/test_callf_into_nonreturning.py new file mode 100644 index 0000000000..376205ed60 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip4750_functions/test_callf_into_nonreturning.py @@ -0,0 +1,46 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-4750.md" +REFERENCE_SPEC_VERSION = "76c94b69eccb06786fe0b95213ff209fa9aef7c1" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=0), + Section.Code(code=Op.STOP, max_stack_height=0), + ], + ) + , + "ef000101000802000200040001040000000080000000800000e300010000", + EOFException.CALLF_TO_NON_RETURNING_FUNCTION, + id="callf_into_nonreturning_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip4750_functions/test_callf_invalid_code_section_index.py b/tests/osaka/eip7692_eof_v1/eip4750_functions/test_callf_invalid_code_section_index.py new file mode 100644 index 0000000000..9afe94eaf4 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip4750_functions/test_callf_invalid_code_section_index.py @@ -0,0 +1,45 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-4750.md" +REFERENCE_SPEC_VERSION = "76c94b69eccb06786fe0b95213ff209fa9aef7c1" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=0), + ], + ) + , + "ef000101000402000100040400000000800000e3000100", + EOFException.INVALID_CODE_SECTION_INDEX, + id="callf_invalid_code_section_index_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip4750_functions/test_eof1_callf_truncated.py b/tests/osaka/eip7692_eof_v1/eip4750_functions/test_eof1_callf_truncated.py new file mode 100644 index 0000000000..adbc1d64f8 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip4750_functions/test_eof1_callf_truncated.py @@ -0,0 +1,57 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-4750.md" +REFERENCE_SPEC_VERSION = "76c94b69eccb06786fe0b95213ff209fa9aef7c1" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=[0xe3], max_stack_height=0), + ], + ) + , + "ef000101000402000100010400000000800000e3", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_callf_truncated_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=[0xe3, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100020400000000800000e300", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_callf_truncated_1" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip4750_functions/test_max_arguments_count.py b/tests/osaka/eip7692_eof_v1/eip4750_functions/test_max_arguments_count.py new file mode 100644 index 0000000000..eb02873a36 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip4750_functions/test_max_arguments_count.py @@ -0,0 +1,85 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-4750.md" +REFERENCE_SPEC_VERSION = "76c94b69eccb06786fe0b95213ff209fa9aef7c1" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=0), + Section.Code(code=Op.RETF, code_inputs=128, max_stack_height=128), + ], + ) + , + "ef000101000802000200040001040000000080000080800080e3000100e4", + EOFException.INPUTS_OUTPUTS_NUM_ABOVE_LIMIT, + id="max_arguments_count_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=127), + Section.Code(code=Op.PUSH1[1] * 127 + Op.RETF, code_outputs=127, max_stack_height=127), + ], + ) + , + "ef0001010008020002000400ff040000000080007f007f007fe30001006001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e4", + None, + id="max_arguments_count_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=129), + Section.Code(code=Op.PUSH1[1] * 129 + Op.RETF, code_outputs=129, max_stack_height=129), + ], + ) + , + "ef000101000802000200040103040000000080008100810081e3000100600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e4", + EOFException.INPUTS_OUTPUTS_NUM_ABOVE_LIMIT, + id="max_arguments_count_3" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH1[1] * 128 + Op.CALLF[1] + Op.STOP, max_stack_height=128), + Section.Code(code=Op.POP * 128 + Op.RETF, code_inputs=128, code_outputs=0, max_stack_height=128), + ], + ) + , + "ef00010100080200020104008104000000008000808000008060016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30001005050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050e4", + EOFException.INPUTS_OUTPUTS_NUM_ABOVE_LIMIT, + id="max_arguments_count_5" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip4750_functions/test_non_returning_status.py b/tests/osaka/eip7692_eof_v1/eip4750_functions/test_non_returning_status.py new file mode 100644 index 0000000000..28e1d999fe --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip4750_functions/test_non_returning_status.py @@ -0,0 +1,155 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-4750.md" +REFERENCE_SPEC_VERSION = "76c94b69eccb06786fe0b95213ff209fa9aef7c1" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.JUMPF[1], max_stack_height=0), + Section.Code(code=Op.STOP, max_stack_height=0), + ], + ) + , + "ef000101000802000200030001040000000080000000800000e5000100", + None, + id="non_returning_status_1" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=0), + Section.Code(code=Op.JUMPF[2], code_outputs=0, max_stack_height=0), + Section.Code(code=Op.RETF, code_outputs=0, max_stack_height=0), + ], + ) + , + "ef000101000c02000300040003000104000000008000000000000000000000e3000100e50002e4", + None, + id="non_returning_status_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH0 + Op.CALLF[1] + Op.STOP, max_stack_height=1), + Section.Code(code=Op.RJUMPI[1] + Op.RETF + Op.JUMPF[2], code_inputs=1, code_outputs=0, max_stack_height=1), + Section.Code(code=Op.RETF, code_outputs=0, max_stack_height=0), + ], + ) + , + "ef000101000c020003000500070001040000000080000101000001000000005fe3000100e10001e4e50002e4", + None, + id="non_returning_status_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH0 + Op.CALLF[1] + Op.STOP, max_stack_height=1), + Section.Code(code=Op.RJUMPI[1] + Op.RETF + Op.JUMPF[0], code_inputs=1, code_outputs=0, max_stack_height=1), + ], + ) + , + "ef0001010008020002000500070400000000800001010000015fe3000100e10001e4e50000", + None, + id="non_returning_status_5" + ), + pytest.param( + Container( + name = 'EOFV1_0010', + sections = [ + Section.Code(code=Op.JUMPF[1], max_stack_height=0), + Section.Code(code=Op.JUMPF[0], code_outputs=0, max_stack_height=0), + ], + ) + , + "ef000101000802000200030003040000000080000000000000e50001e50000", + EOFException.INVALID_NON_RETURNING_FLAG, + id="non_returning_status_9" + ), + pytest.param( + Container( + name = 'EOFV1_0011', + sections = [ + Section.Code(code=Op.PUSH0 + Op.JUMPF[1], max_stack_height=1), + Section.Code(code=Op.RJUMPI[1] + Op.RETF + Op.JUMPF[2], code_inputs=1, max_stack_height=1), + Section.Code(code=Op.RETF, code_outputs=0, max_stack_height=0), + ], + ) + , + "ef000101000c020003000400070001040000000080000101800001000000005fe50001e10001e4e50002e4", + EOFException.INVALID_NON_RETURNING_FLAG, + id="non_returning_status_10" + ), + pytest.param( + Container( + name = 'EOFV1_0012', + sections = [ + Section.Code(code=Op.PUSH0 + Op.JUMPF[1], max_stack_height=1), + Section.Code(code=Op.RJUMPI[1] + Op.RETF + Op.JUMPF[0], code_inputs=1, max_stack_height=1), + ], + ) + , + "ef0001010008020002000400070400000000800001018000015fe50001e10001e4e50000", + EOFException.INVALID_NON_RETURNING_FLAG, + id="non_returning_status_11" + ), + pytest.param( + Container( + name = 'EOFV1_0013', + sections = [ + Section.Code(code=Op.JUMPF[1], max_stack_height=0), + Section.Code(code=Op.JUMPF[2], max_stack_height=0), + Section.Code(code=Op.JUMPF[1], max_stack_height=0), + ], + ) + , + "ef000101000c02000300030003000304000000008000000080000000800000e50001e50002e50001", + None, + id="non_returning_status_12" + ), + pytest.param( + Container( + name = 'EOFV1_0014', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=0), + Section.Code(code=Op.JUMPF[2], code_outputs=0, max_stack_height=0), + Section.Code(code=Op.JUMPF[1], code_outputs=0, max_stack_height=0), + ], + ) + , + "ef000101000c02000300040003000304000000008000000000000000000000e3000100e50002e50001", + None, + id="non_returning_status_13" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjump.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjump.py new file mode 100644 index 0000000000..48ebc5db72 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjump.py @@ -0,0 +1,93 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.POP + Op.RJUMP[-5], max_stack_height=1), + ], + ) + , + "ef0001010004020001000504000000008000015f50e0fffb", + None, + id="backwards_rjump_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.POP + Op.PUSH1[1] + Op.RJUMPI[3] + Op.RJUMP[-8] + Op.RJUMP[-11], max_stack_height=1), + ], + ) + , + "ef0001010004020001000d04000000008000015f506001e10003e0fff8e0fff5", + None, + id="backwards_rjump_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.POP + Op.PUSH1[1] + Op.RJUMPI[3] + Op.RJUMP[-8] + Op.PUSH0 + Op.RJUMP[-12], max_stack_height=1), + ], + ) + , + "ef0001010004020001000e04000000008000015f506001e10003e0fff85fe0fff4", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjump_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH0 + Op.RJUMP[-4], max_stack_height=1), + ], + ) + , + "ef0001010004020001000404000000008000015fe0fffc", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjump_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH0 + Op.POP + Op.RJUMP[-4], max_stack_height=1), + ], + ) + , + "ef0001010004020001000504000000008000015f50e0fffc", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjump_5" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjump_variable_stack.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjump_variable_stack.py new file mode 100644 index 0000000000..c86e2df194 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjump_variable_stack.py @@ -0,0 +1,117 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.POP + Op.RJUMP[-5], max_stack_height=4), + ], + ) + , + "ef0001010004020001000d04000000008000045f6000e100025f5f5f50e0fffb", + None, + id="backwards_rjump_variable_stack_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.POP + Op.PUSH1[1] + Op.RJUMPI[3] + Op.RJUMP[-8] + Op.RJUMP[-11], max_stack_height=4), + ], + ) + , + "ef0001010004020001001504000000008000045f6000e100025f5f5f506001e10003e0fff8e0fff5", + None, + id="backwards_rjump_variable_stack_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.POP + Op.PUSH1[1] + Op.RJUMPI[3] + Op.RJUMP[-8] + Op.PUSH0 + Op.RJUMP[-12], max_stack_height=4), + ], + ) + , + "ef0001010004020001001604000000008000045f6000e100025f5f5f506001e10003e0fff85fe0fff4", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjump_variable_stack_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[0] + Op.RJUMPI[1] + Op.PUSH0 + Op.RJUMP[-7], max_stack_height=4), + ], + ) + , + "ef0001010004020001001104000000008000045f6000e100025f5f6000e100015fe0fff9", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjump_variable_stack_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[0] + Op.RJUMPI[1] + Op.POP + Op.RJUMP[-7], max_stack_height=4), + ], + ) + , + "ef0001010004020001001104000000008000045f6000e100025f5f6000e1000150e0fff9", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjump_variable_stack_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.RJUMP[-4], max_stack_height=4), + ], + ) + , + "ef0001010004020001000c04000000008000045f6000e100025f5f5fe0fffc", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjump_variable_stack_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.POP + Op.RJUMP[-4], max_stack_height=3), + ], + ) + , + "ef0001010004020001000d04000000008000035f6000e100025f5f5f50e0fffc", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjump_variable_stack_6" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjumpi.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjumpi.py new file mode 100644 index 0000000000..84996c7afd --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjumpi.py @@ -0,0 +1,153 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 + Op.POP + Op.PUSH1[0] + Op.RJUMPI[-7] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000804000000008000015f506000e1fff900", + None, + id="backwards_rjumpi_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.POP + Op.PUSH1[0] + Op.RJUMPI[-7] + Op.PUSH1[0] + Op.RJUMPI[-12] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000d04000000008000015f506000e1fff96000e1fff400", + None, + id="backwards_rjumpi_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.POP + Op.PUSH1[0] + Op.RJUMPI[-7] + Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[-13] + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000e04000000008000025f506000e1fff95f6000e1fff300", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpi_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[1] + Op.ADD + Op.DUP1 + Op.RJUMPI[-7] + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000904000000008000025f60010180e1fff900", + None, + id="backwards_rjumpi_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[1] + Op.ADD + Op.DUP1 * 2 + Op.RJUMPI[-8] + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000a04000000008000025f6001018080e1fff800", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpi_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH0 * 3 + Op.POP + Op.RJUMPI[-4] + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000804000000008000025f5f5f50e1fffc00", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpi_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH0 + Op.POP + Op.PUSH1[0] + Op.RJUMPI[-7] + Op.RJUMP[-10], max_stack_height=1), + ], + ) + , + "ef0001010004020001000a04000000008000015f506000e1fff9e0fff6", + None, + id="backwards_rjumpi_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.PUSH0 + Op.POP + Op.PUSH1[0] + Op.RJUMPI[-7] + Op.PUSH0 + Op.RJUMP[-11], max_stack_height=1), + ], + ) + , + "ef0001010004020001000b04000000008000015f506000e1fff95fe0fff5", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpi_7" + ), + pytest.param( + Container( + name = 'EOFV1_0009', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[1] + Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[-11] + Op.STOP, max_stack_height=3), + ], + ) + , + "ef0001010004020001000d04000000008000035f6000e100015f6000e1fff500", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpi_8" + ), + pytest.param( + Container( + name = 'EOFV1_0010', + sections = [ + Section.Code(code=Op.PUSH1[190] + Op.PUSH1[0] + Op.RJUMPI[1] + Op.POP + Op.PUSH1[0] + Op.RJUMPI[-11] + Op.STOP, max_stack_height=3), + ], + ) + , + "ef0001010004020001000e040000000080000360be6000e10001506000e1fff500", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpi_9" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjumpi_variable_stack.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjumpi_variable_stack.py new file mode 100644 index 0000000000..3d88dce861 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjumpi_variable_stack.py @@ -0,0 +1,141 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[0] + Op.RJUMPI[-5] + Op.STOP, max_stack_height=4), + ], + ) + , + "ef0001010004020001000e04000000008000045f6000e100025f5f6000e1fffb00", + None, + id="backwards_rjumpi_variable_stack_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.POP + Op.PUSH1[0] + Op.RJUMPI[-7] + Op.STOP, max_stack_height=4), + ], + ) + , + "ef0001010004020001001004000000008000045f6000e100025f5f5f506000e1fff900", + None, + id="backwards_rjumpi_variable_stack_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.POP + Op.PUSH1[0] + Op.RJUMPI[-7] + Op.PUSH1[0] + Op.RJUMPI[-12] + Op.STOP, max_stack_height=4), + ], + ) + , + "ef0001010004020001001504000000008000045f6000e100025f5f5f506000e1fff96000e1fff400", + None, + id="backwards_rjumpi_variable_stack_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.POP + Op.PUSH1[0] + Op.RJUMPI[-7] + Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[-13] + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001604000000008000055f6000e100025f5f5f506000e1fff95f6000e1fff300", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpi_variable_stack_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[1] + Op.ADD + Op.DUP1 + Op.RJUMPI[-7] + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001104000000008000055f6000e100025f5f5f60010180e1fff900", + None, + id="backwards_rjumpi_variable_stack_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[1] + Op.ADD + Op.DUP1 * 2 + Op.RJUMPI[-8] + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001204000000008000055f6000e100025f5f5f6001018080e1fff800", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpi_variable_stack_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 5 + Op.POP + Op.RJUMPI[-4] + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001004000000008000055f6000e100025f5f5f5f5f50e1fffc00", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpi_variable_stack_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.POP + Op.PUSH1[0] + Op.RJUMPI[-7] + Op.RJUMP[-10], max_stack_height=4), + ], + ) + , + "ef0001010004020001001204000000008000045f6000e100025f5f5f506000e1fff9e0fff6", + None, + id="backwards_rjumpi_variable_stack_7" + ), + pytest.param( + Container( + name = 'EOFV1_0009', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.POP + Op.PUSH1[0] + Op.RJUMPI[-7] + Op.PUSH0 + Op.RJUMP[-11], max_stack_height=4), + ], + ) + , + "ef0001010004020001001304000000008000045f6000e100025f5f5f506000e1fff95fe0fff5", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpi_variable_stack_8" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjumpv.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjumpv.py new file mode 100644 index 0000000000..1ea2a0c1f3 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjumpv.py @@ -0,0 +1,129 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPV[-6] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000704000000008000016000e200fffa00", + None, + id="backwards_rjumpv_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.POP + Op.PUSH1[0] + Op.RJUMPV[-8] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000904000000008000015f506000e200fff800", + None, + id="backwards_rjumpv_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.POP + Op.PUSH1[0] + Op.RJUMPV[-8] + Op.PUSH1[0] + Op.RJUMPV[-14] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000f04000000008000015f506000e200fff86000e200fff200", + None, + id="backwards_rjumpv_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.POP + Op.PUSH1[0] + Op.RJUMPV[-8] + Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPV[-15] + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001001004000000008000025f506000e200fff85f6000e200fff100", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpv_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH0 + Op.POP + Op.PUSH1[0] + Op.RJUMPV[-8] + Op.RJUMP[-11], max_stack_height=1), + ], + ) + , + "ef0001010004020001000b04000000008000015f506000e200fff8e0fff5", + None, + id="backwards_rjumpv_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH0 + Op.POP + Op.PUSH1[0] + Op.RJUMPV[-8] + Op.PUSH0 + Op.RJUMP[-12], max_stack_height=1), + ], + ) + , + "ef0001010004020001000c04000000008000015f506000e200fff85fe0fff4", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpv_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[1] + Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPV[-12] + Op.STOP, max_stack_height=3), + ], + ) + , + "ef0001010004020001000e04000000008000035f6000e100015f6000e200fff400", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpv_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.PUSH1[190] + Op.PUSH1[0] + Op.RJUMPI[1] + Op.POP + Op.PUSH1[0] + Op.RJUMPV[-12] + Op.STOP, max_stack_height=3), + ], + ) + , + "ef0001010004020001000f040000000080000360be6000e10001506000e200fff400", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpv_7" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjumpv_variable_stack.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjumpv_variable_stack.py new file mode 100644 index 0000000000..dffb414b56 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_backwards_rjumpv_variable_stack.py @@ -0,0 +1,129 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[0] + Op.RJUMPV[-6] + Op.STOP, max_stack_height=4), + ], + ) + , + "ef0001010004020001000f04000000008000045f6000e100025f5f6000e200fffa00", + None, + id="backwards_rjumpv_variable_stack_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.POP + Op.PUSH1[0] + Op.RJUMPV[-8] + Op.STOP, max_stack_height=4), + ], + ) + , + "ef0001010004020001001104000000008000045f6000e100025f5f5f506000e200fff800", + None, + id="backwards_rjumpv_variable_stack_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.POP + Op.PUSH1[0] + Op.RJUMPV[-8] + Op.PUSH1[0] + Op.RJUMPV[-14] + Op.STOP, max_stack_height=4), + ], + ) + , + "ef0001010004020001001704000000008000045f6000e100025f5f5f506000e200fff86000e200fff200", + None, + id="backwards_rjumpv_variable_stack_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.POP + Op.PUSH1[0] + Op.RJUMPV[-8] + Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPV[-15] + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001804000000008000055f6000e100025f5f5f506000e200fff85f6000e200fff100", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpv_variable_stack_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.POP + Op.PUSH1[0] + Op.RJUMPV[-8] + Op.RJUMP[-11], max_stack_height=4), + ], + ) + , + "ef0001010004020001001304000000008000045f6000e100025f5f5f506000e200fff8e0fff5", + None, + id="backwards_rjumpv_variable_stack_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.POP + Op.PUSH1[0] + Op.RJUMPV[-8] + Op.PUSH0 + Op.RJUMP[-12], max_stack_height=4), + ], + ) + , + "ef0001010004020001001404000000008000045f6000e100025f5f5f506000e200fff85fe0fff4", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpv_variable_stack_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPI[1] + Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPV[-12] + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001604000000008000055f6000e100025f5f5f6000e100015f6000e200fff400", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpv_variable_stack_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 4 + Op.PUSH1[0] + Op.RJUMPI[1] + Op.POP + Op.PUSH1[0] + Op.RJUMPV[-12] + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001704000000008000055f6000e100025f5f5f5f6000e10001506000e200fff400", + EOFException.STACK_HEIGHT_MISMATCH, + id="backwards_rjumpv_variable_stack_7" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_stack_overflow.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_stack_overflow.py new file mode 100644 index 0000000000..c6940b0fe4 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_stack_overflow.py @@ -0,0 +1,100 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=0), + Section.Code(code=Op.PUSH1[1] * 512 + Op.CALLF[1] + Op.POP * 512 + Op.RETF, code_outputs=0, max_stack_height=512), + ], + ) + , + "ef000101000802000200040604040000000080000000000200e300010060016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e300015050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050e4", + None, + id="callf_stack_overflow_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=0), + Section.Code(code=Op.PUSH1[1] * 513 + Op.CALLF[1] + Op.POP * 513 + Op.RETF, code_outputs=0, max_stack_height=513), + ], + ) + , + "ef000101000802000200040607040000000080000000000201e3000100600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30001505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050e4", + EOFException.STACK_OVERFLOW, + id="callf_stack_overflow_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=0), + Section.Code(code=Op.PUSH1[1] * 1023 + Op.CALLF[1] + Op.POP * 1023 + Op.RETF, code_outputs=0, max_stack_height=1023), + ], + ) + , + "ef000101000802000200040c010400000000800000000003ffe3000100600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30001505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050e4", + EOFException.STACK_OVERFLOW, + id="callf_stack_overflow_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=0), + Section.Code(code=Op.PUSH1[1] * 1023 + Op.CALLF[2] + Op.POP * 1023 + Op.RETF, code_outputs=0, max_stack_height=1023), + Section.Code(code=Op.PUSH0 + Op.POP + Op.RETF, code_outputs=0, max_stack_height=1), + ], + ) + , + "ef000101000c02000300040c0100030400000000800000000003ff00000001e3000100600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30002505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050e45f50e4", + None, + id="callf_stack_overflow_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=0), + Section.Code(code=Op.PUSH1[1] * 1023 + Op.CALLF[2] + Op.POP * 1023 + Op.RETF, code_outputs=0, max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 2 + Op.POP * 2 + Op.RETF, code_outputs=0, max_stack_height=2), + ], + ) + , + "ef000101000c02000300040c0100050400000000800000000003ff00000002e3000100600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30002505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050e45f5f5050e4", + EOFException.STACK_OVERFLOW, + id="callf_stack_overflow_4" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_stack_overflow_variable_stack.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_stack_overflow_variable_stack.py new file mode 100644 index 0000000000..800ef2b925 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_stack_overflow_variable_stack.py @@ -0,0 +1,111 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] * 509 + Op.CALLF[1] + Op.STOP, max_stack_height=512), + Section.Code(code=Op.PUSH1[1] * 512 + Op.POP * 512 + Op.RETF, code_outputs=0, max_stack_height=512), + ], + ) + , + "ef0001010008020002040606010400000000800200000002005f6000e100025f5f60016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e3000100600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160015050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050e4", + None, + id="callf_stack_overflow_variable_stack_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] * 509 + Op.CALLF[1] + Op.STOP, max_stack_height=512), + Section.Code(code=Op.PUSH1[1] * 515 + Op.POP * 515 + Op.RETF, code_outputs=0, max_stack_height=515), + ], + ) + , + "ef00010100080200020406060a0400000000800200000002035f6000e100025f5f60016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e3000100600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160015050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050e4", + EOFException.STACK_OVERFLOW, + id="callf_stack_overflow_variable_stack_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] * 509 + Op.CALLF[1] + Op.STOP, max_stack_height=512), + Section.Code(code=Op.PUSH1[1] * 514 + Op.POP * 514 + Op.RETF, code_outputs=0, max_stack_height=514), + ], + ) + , + "ef0001010008020002040606070400000000800200000002025f6000e100025f5f60016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e3000100600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600150505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050e4", + EOFException.STACK_OVERFLOW, + id="callf_stack_overflow_variable_stack_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] * 1020 + Op.CALLF[1] + Op.STOP, max_stack_height=1023), + Section.Code(code=Op.PUSH0 + Op.POP + Op.RETF, code_outputs=0, max_stack_height=1), + ], + ) + , + "ef00010100080200020804000304000000008003ff000000015f6000e100025f5f600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30001005f50e4", + None, + id="callf_stack_overflow_variable_stack_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] * 1020 + Op.CALLF[1] + Op.STOP, max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 5 + Op.POP * 5 + Op.RETF, code_outputs=0, max_stack_height=5), + ], + ) + , + "ef00010100080200020804000b04000000008003ff000000055f6000e100025f5f600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30001005f5f5f5f5f5050505050e4", + EOFException.STACK_OVERFLOW, + id="callf_stack_overflow_variable_stack_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] * 1020 + Op.CALLF[1] + Op.STOP, max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 2 + Op.POP * 2 + Op.RETF, code_outputs=0, max_stack_height=2), + ], + ) + , + "ef00010100080200020804000504000000008003ff000000025f6000e100025f5f600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30001005f5f5050e4", + EOFException.STACK_OVERFLOW, + id="callf_stack_overflow_variable_stack_5" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_stack_validation.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_stack_validation.py new file mode 100644 index 0000000000..871f92e664 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_stack_validation.py @@ -0,0 +1,75 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=1), + Section.Code(code=Op.PUSH0 * 2 + Op.CALLF[2] + Op.RETF, code_outputs=1, max_stack_height=2), + Section.Code(code=Op.POP + Op.RETF, code_inputs=2, code_outputs=1, max_stack_height=2), + ], + ) + , + "ef000101000c02000300040006000204000000008000010001000202010002e30001005f5fe30002e450e4", + None, + id="callf_stack_validation_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=1), + Section.Code(code=Op.PUSH0 * 3 + Op.CALLF[2] + Op.RETF, code_outputs=1, max_stack_height=3), + Section.Code(code=Op.POP + Op.RETF, code_inputs=2, code_outputs=1, max_stack_height=2), + ], + ) + , + "ef000101000c02000300040007000204000000008000010001000302010002e30001005f5f5fe30002e450e4", + EOFException.STACK_HIGHER_THAN_OUTPUTS, + id="callf_stack_validation_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=1), + Section.Code(code=Op.PUSH0 + Op.CALLF[2] + Op.RETF, code_outputs=1, max_stack_height=1), + Section.Code(code=Op.POP + Op.RETF, code_inputs=2, code_outputs=1, max_stack_height=2), + ], + ) + , + "ef000101000c02000300040005000204000000008000010001000102010002e30001005fe30002e450e4", + EOFException.STACK_UNDERFLOW, + id="callf_stack_validation_2" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_with_inputs_stack_overflow.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_with_inputs_stack_overflow.py new file mode 100644 index 0000000000..42e32f410e --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_with_inputs_stack_overflow.py @@ -0,0 +1,111 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[1] * 1023 + Op.CALLF[1] + Op.POP * 1019 + Op.RETURN, max_stack_height=1023), + Section.Code(code=Op.POP * 2 + Op.RETF, code_inputs=2, code_outputs=0, max_stack_height=2), + ], + ) + , + "ef00010100080200020bfd000304000000008003ff02000002600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e300015050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050f35050e4", + None, + id="callf_with_inputs_stack_overflow_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[1] * 1023 + Op.CALLF[1] + Op.POP * 1021 + Op.RETURN, max_stack_height=1023), + Section.Code(code=Op.PUSH1[1] + Op.POP + Op.RETF, code_inputs=3, code_outputs=3, max_stack_height=4), + ], + ) + , + "ef00010100080200020bff000404000000008003ff03030004600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e3000150505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050f3600150e4", + None, + id="callf_with_inputs_stack_overflow_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[1] * 1023 + Op.CALLF[1] + Op.POP * 1021 + Op.RETURN, max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 2 + Op.RETF, code_inputs=3, code_outputs=5, max_stack_height=5), + ], + ) + , + "ef00010100080200020bff000304000000008003ff03050005600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e3000150505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050f35f5fe4", + EOFException.STACK_OVERFLOW, + id="callf_with_inputs_stack_overflow_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH1[1] * 1023 + Op.CALLF[1] + Op.POP * 1021 + Op.RETURN, max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 2 + Op.POP * 2 + Op.RETF, code_inputs=3, code_outputs=3, max_stack_height=5), + ], + ) + , + "ef00010100080200020bff000504000000008003ff03030005600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e3000150505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050f35f5f5050e4", + EOFException.STACK_OVERFLOW, + id="callf_with_inputs_stack_overflow_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH1[1] * 1024 + Op.CALLF[1] + Op.POP * 1020 + Op.RETURN, max_stack_height=1023), + Section.Code(code=Op.PUSH0 + Op.POP * 3 + Op.RETF, code_inputs=2, code_outputs=0, max_stack_height=3), + ], + ) + , + "ef00010100080200020c00000504000000008003ff020000036001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30001505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050f35f505050e4", + EOFException.STACK_OVERFLOW, + id="callf_with_inputs_stack_overflow_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH1[1] * 1023 + Op.CALLF[1] + Op.POP * 1020 + Op.RETURN, max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 2 + Op.POP * 4 + Op.RETF, code_inputs=2, code_outputs=0, max_stack_height=4), + ], + ) + , + "ef00010100080200020bfe000704000000008003ff02000004600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30001505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050f35f5f50505050e4", + EOFException.STACK_OVERFLOW, + id="callf_with_inputs_stack_overflow_5" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_with_inputs_stack_overflow_variable_stack.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_with_inputs_stack_overflow_variable_stack.py new file mode 100644 index 0000000000..d0fdc0581c --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_callf_with_inputs_stack_overflow_variable_stack.py @@ -0,0 +1,163 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] * 1020 + Op.CALLF[1] + Op.STOP, max_stack_height=1023), + Section.Code(code=Op.POP * 2 + Op.RETF, code_inputs=2, code_outputs=0, max_stack_height=2), + ], + ) + , + "ef00010100080200020804000304000000008003ff020000025f6000e100025f5f600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30001005050e4", + None, + id="callf_with_inputs_stack_overflow_variable_stack_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] * 1020 + Op.CALLF[1] + Op.STOP, max_stack_height=1023), + Section.Code(code=Op.PUSH1[1] + Op.POP + Op.RETF, code_inputs=3, code_outputs=3, max_stack_height=4), + ], + ) + , + "ef00010100080200020804000404000000008003ff030300045f6000e100025f5f600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e3000100600150e4", + None, + id="callf_with_inputs_stack_overflow_variable_stack_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] * 1020 + Op.CALLF[1] + Op.STOP, max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 4 + Op.RETF, code_inputs=3, code_outputs=7, max_stack_height=7), + ], + ) + , + "ef00010100080200020804000504000000008003ff030700075f6000e100025f5f600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30001005f5f5f5fe4", + EOFException.STACK_OVERFLOW, + id="callf_with_inputs_stack_overflow_variable_stack_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] * 1020 + Op.CALLF[1] + Op.STOP, max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 2 + Op.RETF, code_inputs=3, code_outputs=5, max_stack_height=5), + ], + ) + , + "ef00010100080200020804000304000000008003ff030500055f6000e100025f5f600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30001005f5fe4", + EOFException.STACK_OVERFLOW, + id="callf_with_inputs_stack_overflow_variable_stack_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] * 1020 + Op.CALLF[1] + Op.STOP, max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 4 + Op.POP * 2 + Op.RETF, code_inputs=3, code_outputs=3, max_stack_height=7), + ], + ) + , + "ef00010100080200020804000704000000008003ff030300075f6000e100025f5f600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30001005f5f5f5f5050e4", + EOFException.STACK_OVERFLOW, + id="callf_with_inputs_stack_overflow_variable_stack_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] * 1020 + Op.CALLF[1] + Op.STOP, max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 2 + Op.POP * 2 + Op.RETF, code_inputs=3, code_outputs=3, max_stack_height=5), + ], + ) + , + "ef00010100080200020804000504000000008003ff030300055f6000e100025f5f600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30001005f5f5050e4", + EOFException.STACK_OVERFLOW, + id="callf_with_inputs_stack_overflow_variable_stack_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] * 1021 + Op.CALLF[1] + Op.STOP, max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 3 + Op.POP * 5 + Op.RETF, code_inputs=2, code_outputs=0, max_stack_height=5), + ], + ) + , + "ef00010100080200020806000904000000008003ff020000055f6000e100025f5f6001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30001005f5f5f5050505050e4", + EOFException.STACK_OVERFLOW, + id="callf_with_inputs_stack_overflow_variable_stack_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] * 1021 + Op.CALLF[1] + Op.STOP, max_stack_height=1023), + Section.Code(code=Op.PUSH0 + Op.POP * 3 + Op.RETF, code_inputs=2, code_outputs=0, max_stack_height=3), + ], + ) + , + "ef00010100080200020806000504000000008003ff020000035f6000e100025f5f6001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30001005f505050e4", + EOFException.STACK_OVERFLOW, + id="callf_with_inputs_stack_overflow_variable_stack_7" + ), + pytest.param( + Container( + name = 'EOFV1_0009', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] * 1020 + Op.CALLF[1] + Op.STOP, max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 4 + Op.POP * 6 + Op.RETF, code_inputs=2, code_outputs=0, max_stack_height=6), + ], + ) + , + "ef00010100080200020804000b04000000008003ff020000065f6000e100025f5f600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30001005f5f5f5f505050505050e4", + EOFException.STACK_OVERFLOW, + id="callf_with_inputs_stack_overflow_variable_stack_8" + ), + pytest.param( + Container( + name = 'EOFV1_0010', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] * 1020 + Op.CALLF[1] + Op.STOP, max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 2 + Op.POP * 4 + Op.RETF, code_inputs=2, code_outputs=0, max_stack_height=4), + ], + ) + , + "ef00010100080200020804000704000000008003ff020000045f6000e100025f5f600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e30001005f5f50505050e4", + EOFException.STACK_OVERFLOW, + id="callf_with_inputs_stack_overflow_variable_stack_9" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_dupn_stack_validation.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_dupn_stack_validation.py new file mode 100644 index 0000000000..989fbc76b4 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_dupn_stack_validation.py @@ -0,0 +1,105 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[1] * 20 + Op.DUPN[0] + Op.STOP, max_stack_height=21), + ], + ) + , + "ef0001010004020001002b040000000080001560016001600160016001600160016001600160016001600160016001600160016001600160016001e60000", + None, + id="dupn_stack_validation_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[1] * 20 + Op.DUPN[19] + Op.STOP, max_stack_height=21), + ], + ) + , + "ef0001010004020001002b040000000080001560016001600160016001600160016001600160016001600160016001600160016001600160016001e61300", + None, + id="dupn_stack_validation_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[1] * 20 + Op.DUPN[20] + Op.STOP, max_stack_height=21), + ], + ) + , + "ef0001010004020001002b040000000080001560016001600160016001600160016001600160016001600160016001600160016001600160016001e61400", + EOFException.STACK_UNDERFLOW, + id="dupn_stack_validation_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH1[1] * 20 + Op.DUPN[208] + Op.STOP, max_stack_height=21), + ], + ) + , + "ef0001010004020001002b040000000080001560016001600160016001600160016001600160016001600160016001600160016001600160016001e6d000", + EOFException.STACK_UNDERFLOW, + id="dupn_stack_validation_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH1[1] * 20 + Op.DUPN[254] + Op.STOP, max_stack_height=21), + ], + ) + , + "ef0001010004020001002b040000000080001560016001600160016001600160016001600160016001600160016001600160016001600160016001e6fe00", + EOFException.STACK_UNDERFLOW, + id="dupn_stack_validation_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH1[1] * 20 + Op.DUPN[255] + Op.STOP, max_stack_height=21), + ], + ) + , + "ef0001010004020001002b040000000080001560016001600160016001600160016001600160016001600160016001600160016001600160016001e6ff00", + EOFException.STACK_UNDERFLOW, + id="dupn_stack_validation_5" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_exchange_deep_stack_validation.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_exchange_deep_stack_validation.py new file mode 100644 index 0000000000..36cc5b100a --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_exchange_deep_stack_validation.py @@ -0,0 +1,45 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[1] * 33 + Op.EXCHANGE[255] + Op.STOP, max_stack_height=33), + ], + ) + , + "ef000101000402000100450400000000800021600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e8ff00", + None, + id="exchange_deep_stack_validation_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_exchange_stack_validation.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_exchange_stack_validation.py new file mode 100644 index 0000000000..c871550084 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_exchange_stack_validation.py @@ -0,0 +1,309 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[0] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e80000", + None, + id="exchange_stack_validation_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[16] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e81000", + None, + id="exchange_stack_validation_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[1] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e80100", + None, + id="exchange_stack_validation_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[32] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e82000", + None, + id="exchange_stack_validation_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[2] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e80200", + None, + id="exchange_stack_validation_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[112] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e87000", + None, + id="exchange_stack_validation_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[7] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e80700", + None, + id="exchange_stack_validation_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[17] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e81100", + None, + id="exchange_stack_validation_7" + ), + pytest.param( + Container( + name = 'EOFV1_0009', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[52] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e83400", + None, + id="exchange_stack_validation_8" + ), + pytest.param( + Container( + name = 'EOFV1_0010', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[67] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e84300", + None, + id="exchange_stack_validation_9" + ), + pytest.param( + Container( + name = 'EOFV1_0011', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[22] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e81600", + None, + id="exchange_stack_validation_10" + ), + pytest.param( + Container( + name = 'EOFV1_0012', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[97] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e86100", + None, + id="exchange_stack_validation_11" + ), + pytest.param( + Container( + name = 'EOFV1_0013', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[128] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e88000", + EOFException.STACK_UNDERFLOW, + id="exchange_stack_validation_12" + ), + pytest.param( + Container( + name = 'EOFV1_0014', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[8] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e80800", + EOFException.STACK_UNDERFLOW, + id="exchange_stack_validation_13" + ), + pytest.param( + Container( + name = 'EOFV1_0015', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[113] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e87100", + EOFException.STACK_UNDERFLOW, + id="exchange_stack_validation_14" + ), + pytest.param( + Container( + name = 'EOFV1_0016', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[23] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e81700", + EOFException.STACK_UNDERFLOW, + id="exchange_stack_validation_15" + ), + pytest.param( + Container( + name = 'EOFV1_0017', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[68] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e84400", + EOFException.STACK_UNDERFLOW, + id="exchange_stack_validation_16" + ), + pytest.param( + Container( + name = 'EOFV1_0018', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[83] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e85300", + EOFException.STACK_UNDERFLOW, + id="exchange_stack_validation_17" + ), + pytest.param( + Container( + name = 'EOFV1_0019', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[53] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e83500", + EOFException.STACK_UNDERFLOW, + id="exchange_stack_validation_18" + ), + pytest.param( + Container( + name = 'EOFV1_0020', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[238] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e8ee00", + EOFException.STACK_UNDERFLOW, + id="exchange_stack_validation_19" + ), + pytest.param( + Container( + name = 'EOFV1_0021', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[239] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e8ef00", + EOFException.STACK_UNDERFLOW, + id="exchange_stack_validation_20" + ), + pytest.param( + Container( + name = 'EOFV1_0022', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[254] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e8fe00", + EOFException.STACK_UNDERFLOW, + id="exchange_stack_validation_21" + ), + pytest.param( + Container( + name = 'EOFV1_0023', + sections = [ + Section.Code(code=Op.PUSH1[1] * 10 + Op.EXCHANGE[255] + Op.STOP, max_stack_height=10), + ], + ) + , + "ef00010100040200010017040000000080000a6001600160016001600160016001600160016001e8ff00", + EOFException.STACK_UNDERFLOW, + id="exchange_stack_validation_22" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjump.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjump.py new file mode 100644 index 0000000000..f5e334326f --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjump.py @@ -0,0 +1,81 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[3] + Op.RJUMP[1] + Op.NOT + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000b04000000008000025f6000e10003e000011900", + None, + id="forwards_rjump_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[8] + Op.PUSH1[0] + Op.RJUMPI[6] + Op.RJUMP[4] + Op.RJUMP[1] + Op.NOT + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001001304000000008000025f6000e100086000e10006e00004e000011900", + None, + id="forwards_rjump_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[3] + Op.RJUMP[1] + Op.PUSH0 + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000b04000000008000025f6000e10003e000015f00", + None, + id="forwards_rjump_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[8] + Op.PUSH1[0] + Op.RJUMPI[7] + Op.RJUMP[5] + Op.PUSH0 + Op.RJUMP[1] + Op.NOT + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001001404000000008000025f6000e100086000e10007e000055fe000011900", + None, + id="forwards_rjump_3" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjump_variable_stack.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjump_variable_stack.py new file mode 100644 index 0000000000..d19a305fc8 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjump_variable_stack.py @@ -0,0 +1,93 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.RJUMP[0] + Op.STOP, max_stack_height=3), + ], + ) + , + "ef0001010004020001000c04000000008000035f6000e100025f5fe0000000", + None, + id="forwards_rjump_variable_stack_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPI[3] + Op.RJUMP[1] + Op.NOT + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001304000000008000055f6000e100025f5f5f6000e10003e000011900", + None, + id="forwards_rjump_variable_stack_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPI[8] + Op.PUSH1[0] + Op.RJUMPI[6] + Op.RJUMP[4] + Op.RJUMP[1] + Op.NOT + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001b04000000008000055f6000e100025f5f5f6000e100086000e10006e00004e000011900", + None, + id="forwards_rjump_variable_stack_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPI[3] + Op.RJUMP[1] + Op.PUSH0 + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001304000000008000055f6000e100025f5f5f6000e10003e000015f00", + None, + id="forwards_rjump_variable_stack_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[0] + Op.RJUMPI[8] + Op.PUSH1[0] + Op.RJUMPI[7] + Op.RJUMP[5] + Op.PUSH0 + Op.RJUMP[1] + Op.NOT + Op.STOP, max_stack_height=4), + ], + ) + , + "ef0001010004020001001b04000000008000045f6000e100025f5f6000e100086000e10007e000055fe000011900", + None, + id="forwards_rjump_variable_stack_4" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjumpi.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjumpi.py new file mode 100644 index 0000000000..8e45eea97f --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjumpi.py @@ -0,0 +1,189 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.RJUMPI[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000604000000008000016001e1000000", + None, + id="forwards_rjumpi_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[1] + Op.NOT + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000804000000008000025f6000e100011900", + None, + id="forwards_rjumpi_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[6] + Op.PUSH1[0] + Op.RJUMPI[1] + Op.NOT + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000d04000000008000025f6000e100066000e100011900", + None, + id="forwards_rjumpi_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[1] + Op.PUSH0 + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000804000000008000025f6000e100015f00", + None, + id="forwards_rjumpi_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[7] + Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[1] + Op.NOT + Op.STOP, max_stack_height=3), + ], + ) + , + "ef0001010004020001000e04000000008000035f6000e100075f6000e100011900", + None, + id="forwards_rjumpi_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[1] + Op.ADD + Op.DUP1 + Op.PUSH1[10] + Op.GT + Op.RJUMPI[4] + Op.DUP1 + Op.RJUMPI[-14] + Op.STOP, max_stack_height=3), + ], + ) + , + "ef0001010004020001001004000000008000035f60010180600a11e1000480e1fff200", + None, + id="forwards_rjumpi_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[1] + Op.ADD + Op.DUP1 + Op.PUSH1[10] + Op.GT + Op.RJUMPI[5] + Op.PUSH0 + Op.DUP1 + Op.RJUMPI[-13] + Op.STOP, max_stack_height=3), + ], + ) + , + "ef0001010004020001001104000000008000035f60010180600a11e100055f80e1fff300", + None, + id="forwards_rjumpi_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[4] + Op.PUSH0 + Op.RJUMP[1] + Op.PUSH0 + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000c04000000008000025f6000e100045fe000015f00", + None, + id="forwards_rjumpi_7" + ), + pytest.param( + Container( + name = 'EOFV1_0009', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[4] + Op.PUSH0 + Op.RJUMP[1] + Op.NOT + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000c04000000008000025f6000e100045fe000011900", + None, + id="forwards_rjumpi_8" + ), + pytest.param( + Container( + name = 'EOFV1_0010', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[4] + Op.POP + Op.RJUMP[1] + Op.POP + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000c04000000008000025f6000e1000450e000015000", + None, + id="forwards_rjumpi_9" + ), + pytest.param( + Container( + name = 'EOFV1_0011', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[4] + Op.POP + Op.RJUMP[1] + Op.NOT + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000c04000000008000025f6000e1000450e000011900", + None, + id="forwards_rjumpi_10" + ), + pytest.param( + Container( + name = 'EOFV1_0012', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[3] + Op.RJUMP[0] + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000a04000000008000025f6000e10003e0000000", + None, + id="forwards_rjumpi_11" + ), + pytest.param( + Container( + name = 'EOFV1_0013', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[4] + Op.PUSH0 + Op.RJUMP[0] + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000b04000000008000025f6000e100045fe0000000", + None, + id="forwards_rjumpi_12" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjumpi_variable_stack.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjumpi_variable_stack.py new file mode 100644 index 0000000000..b4db16bd44 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjumpi_variable_stack.py @@ -0,0 +1,189 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] + Op.RJUMPI[0] + Op.STOP, max_stack_height=4), + ], + ) + , + "ef0001010004020001000e04000000008000045f6000e100025f5f6001e1000000", + None, + id="forwards_rjumpi_variable_stack_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPI[1] + Op.NOT + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001004000000008000055f6000e100025f5f5f6000e100011900", + None, + id="forwards_rjumpi_variable_stack_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPI[6] + Op.PUSH1[0] + Op.RJUMPI[1] + Op.NOT + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001504000000008000055f6000e100025f5f5f6000e100066000e100011900", + None, + id="forwards_rjumpi_variable_stack_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPI[1] + Op.PUSH0 + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001004000000008000055f6000e100025f5f5f6000e100015f00", + None, + id="forwards_rjumpi_variable_stack_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPI[7] + Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[1] + Op.NOT + Op.STOP, max_stack_height=6), + ], + ) + , + "ef0001010004020001001604000000008000065f6000e100025f5f5f6000e100075f6000e100011900", + None, + id="forwards_rjumpi_variable_stack_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[1] + Op.ADD + Op.DUP1 + Op.PUSH1[10] + Op.GT + Op.RJUMPI[4] + Op.DUP1 + Op.RJUMPI[-14] + Op.STOP, max_stack_height=6), + ], + ) + , + "ef0001010004020001001804000000008000065f6000e100025f5f5f60010180600a11e1000480e1fff200", + None, + id="forwards_rjumpi_variable_stack_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[1] + Op.ADD + Op.DUP1 + Op.PUSH1[10] + Op.GT + Op.RJUMPI[5] + Op.PUSH0 + Op.DUP1 + Op.RJUMPI[-13] + Op.STOP, max_stack_height=6), + ], + ) + , + "ef0001010004020001001904000000008000065f6000e100025f5f5f60010180600a11e100055f80e1fff300", + None, + id="forwards_rjumpi_variable_stack_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPI[4] + Op.PUSH0 + Op.RJUMP[1] + Op.PUSH0 + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001404000000008000055f6000e100025f5f5f6000e100045fe000015f00", + None, + id="forwards_rjumpi_variable_stack_7" + ), + pytest.param( + Container( + name = 'EOFV1_0009', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPI[4] + Op.PUSH0 + Op.RJUMP[1] + Op.NOT + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001404000000008000055f6000e100025f5f5f6000e100045fe000011900", + None, + id="forwards_rjumpi_variable_stack_8" + ), + pytest.param( + Container( + name = 'EOFV1_0010', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPI[4] + Op.POP + Op.RJUMP[1] + Op.POP + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001404000000008000055f6000e100025f5f5f6000e1000450e000015000", + None, + id="forwards_rjumpi_variable_stack_9" + ), + pytest.param( + Container( + name = 'EOFV1_0011', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPI[4] + Op.POP + Op.RJUMP[1] + Op.NOT + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001404000000008000055f6000e100025f5f5f6000e1000450e000011900", + None, + id="forwards_rjumpi_variable_stack_10" + ), + pytest.param( + Container( + name = 'EOFV1_0012', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPI[3] + Op.RJUMP[0] + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001204000000008000055f6000e100025f5f5f6000e10003e0000000", + None, + id="forwards_rjumpi_variable_stack_11" + ), + pytest.param( + Container( + name = 'EOFV1_0013', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPI[4] + Op.PUSH0 + Op.RJUMP[0] + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001304000000008000055f6000e100025f5f5f6000e100045fe0000000", + None, + id="forwards_rjumpi_variable_stack_12" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjumpv.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjumpv.py new file mode 100644 index 0000000000..621e7ba16d --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjumpv.py @@ -0,0 +1,153 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.RJUMPV[0] + Op.STOP, max_stack_height=1), + ], + ) + , + "ef0001010004020001000704000000008000016001e200000000", + None, + id="forwards_rjumpv_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPV[1] + Op.NOT + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000904000000008000025f6000e20000011900", + None, + id="forwards_rjumpv_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPV[2,3] + Op.PUSH0 + Op.POP + Op.NOT + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000d04000000008000025f6000e201000200035f501900", + None, + id="forwards_rjumpv_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPV[1] + Op.PUSH0 + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000904000000008000025f6000e20000015f00", + None, + id="forwards_rjumpv_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPV[1,2] + Op.PUSH0 * 2 + Op.NOT + Op.STOP, max_stack_height=3), + ], + ) + , + "ef0001010004020001000d04000000008000035f6000e201000100025f5f1900", + None, + id="forwards_rjumpv_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPV[5,10] + Op.PUSH1[1] + Op.RJUMP[7] + Op.PUSH1[2] + Op.RJUMP[2] + Op.PUSH1[3] + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001001604000000008000025f6000e2010005000a6001e000076002e00002600300", + None, + id="forwards_rjumpv_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPV[4,9] + Op.PUSH0 + Op.RJUMP[8] + Op.PUSH0 * 2 + Op.RJUMP[3] + Op.PUSH0 * 3 + Op.STOP, max_stack_height=4), + ], + ) + , + "ef0001010004020001001604000000008000045f6000e201000400095fe000085f5fe000035f5f5f00", + None, + id="forwards_rjumpv_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.PUSH0 * 4 + Op.PUSH1[0] + Op.RJUMPV[4,9] + Op.POP + Op.RJUMP[8] + Op.POP * 2 + Op.RJUMP[3] + Op.POP * 3 + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001904000000008000055f5f5f5f6000e2010004000950e000085050e0000350505000", + None, + id="forwards_rjumpv_7" + ), + pytest.param( + Container( + name = 'EOFV1_0009', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPV[3] + Op.RJUMP[0] + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000b04000000008000025f6000e2000003e0000000", + None, + id="forwards_rjumpv_8" + ), + pytest.param( + Container( + name = 'EOFV1_0010', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPV[4] + Op.PUSH0 + Op.RJUMP[0] + Op.STOP, max_stack_height=2), + ], + ) + , + "ef0001010004020001000c04000000008000025f6000e20000045fe0000000", + None, + id="forwards_rjumpv_9" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjumpv_variable_stack.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjumpv_variable_stack.py new file mode 100644 index 0000000000..a2de815b40 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_forwards_rjumpv_variable_stack.py @@ -0,0 +1,153 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[1] + Op.RJUMPV[0] + Op.STOP, max_stack_height=4), + ], + ) + , + "ef0001010004020001000f04000000008000045f6000e100025f5f6001e200000000", + None, + id="forwards_rjumpv_variable_stack_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPV[1] + Op.NOT + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001104000000008000055f6000e100025f5f5f6000e20000011900", + None, + id="forwards_rjumpv_variable_stack_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPV[2,3] + Op.PUSH0 + Op.POP + Op.NOT + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001504000000008000055f6000e100025f5f5f6000e201000200035f501900", + None, + id="forwards_rjumpv_variable_stack_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPV[1] + Op.PUSH0 + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001104000000008000055f6000e100025f5f5f6000e20000015f00", + None, + id="forwards_rjumpv_variable_stack_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPV[1,2] + Op.PUSH0 * 2 + Op.NOT + Op.STOP, max_stack_height=6), + ], + ) + , + "ef0001010004020001001504000000008000065f6000e100025f5f5f6000e201000100025f5f1900", + None, + id="forwards_rjumpv_variable_stack_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPV[5,10] + Op.PUSH1[1] + Op.RJUMP[7] + Op.PUSH1[2] + Op.RJUMP[2] + Op.PUSH1[3] + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001e04000000008000055f6000e100025f5f5f6000e2010005000a6001e000076002e00002600300", + None, + id="forwards_rjumpv_variable_stack_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPV[4,9] + Op.PUSH0 + Op.RJUMP[8] + Op.PUSH0 * 2 + Op.RJUMP[3] + Op.PUSH0 * 3 + Op.STOP, max_stack_height=7), + ], + ) + , + "ef0001010004020001001e04000000008000075f6000e100025f5f5f6000e201000400095fe000085f5fe000035f5f5f00", + None, + id="forwards_rjumpv_variable_stack_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 6 + Op.PUSH1[0] + Op.RJUMPV[4,9] + Op.POP + Op.RJUMP[8] + Op.POP * 2 + Op.RJUMP[3] + Op.POP * 3 + Op.STOP, max_stack_height=8), + ], + ) + , + "ef0001010004020001002104000000008000085f6000e100025f5f5f5f5f5f6000e2010004000950e000085050e0000350505000", + None, + id="forwards_rjumpv_variable_stack_7" + ), + pytest.param( + Container( + name = 'EOFV1_0009', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPV[3] + Op.RJUMP[0] + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001304000000008000055f6000e100025f5f5f6000e2000003e0000000", + None, + id="forwards_rjumpv_variable_stack_8" + ), + pytest.param( + Container( + name = 'EOFV1_0010', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 3 + Op.PUSH1[0] + Op.RJUMPV[4] + Op.PUSH0 + Op.RJUMP[0] + Op.STOP, max_stack_height=5), + ], + ) + , + "ef0001010004020001001404000000008000055f6000e100025f5f5f6000e20000045fe0000000", + None, + id="forwards_rjumpv_variable_stack_9" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_stack_overflow.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_stack_overflow.py new file mode 100644 index 0000000000..7f4d048600 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_stack_overflow.py @@ -0,0 +1,95 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[1] * 512 + Op.JUMPF[0], max_stack_height=512), + ], + ) + , + "ef00010100040200010403040000000080020060016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e50000", + None, + id="jumpf_stack_overflow_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[1] * 513 + Op.JUMPF[0], max_stack_height=513), + ], + ) + , + "ef000101000402000104050400000000800201600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e50000", + EOFException.STACK_OVERFLOW, + id="jumpf_stack_overflow_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[1] * 1023 + Op.JUMPF[0], max_stack_height=1023), + ], + ) + , + "ef0001010004020001080104000000008003ff600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e50000", + EOFException.STACK_OVERFLOW, + id="jumpf_stack_overflow_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH1[1] * 1023 + Op.JUMPF[1], max_stack_height=1023), + Section.Code(code=Op.PUSH0 + Op.STOP, max_stack_height=1), + ], + ) + , + "ef00010100080200020801000204000000008003ff00800001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e500015f00", + None, + id="jumpf_stack_overflow_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH1[1] * 1023 + Op.JUMPF[1], max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 2 + Op.STOP, max_stack_height=2), + ], + ) + , + "ef00010100080200020801000304000000008003ff00800002600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001600160016001e500015f5f00", + EOFException.STACK_OVERFLOW, + id="jumpf_stack_overflow_4" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_stack_overflow_variable_stack.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_stack_overflow_variable_stack.py new file mode 100644 index 0000000000..11149745ce --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_stack_overflow_variable_stack.py @@ -0,0 +1,110 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 511 + Op.JUMPF[0], max_stack_height=512), + ], + ) + , + "ef0001010004020001020804000000008002005f6000e100025f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5fe50000", + None, + id="jumpf_stack_overflow_variable_stack_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 511 + Op.JUMPF[1], max_stack_height=512), + Section.Code(code=Op.PUSH0 * 515 + Op.STOP, max_stack_height=515), + ], + ) + , + "ef0001010008020002020802040400000000800200008002035f6000e100025f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5fe500015f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f00", + EOFException.STACK_OVERFLOW, + id="jumpf_stack_overflow_variable_stack_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 511 + Op.JUMPF[1], max_stack_height=512), + Section.Code(code=Op.PUSH0 * 514 + Op.STOP, max_stack_height=514), + ], + ) + , + "ef0001010008020002020802030400000000800200008002025f6000e100025f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5fe500015f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f00", + EOFException.STACK_OVERFLOW, + id="jumpf_stack_overflow_variable_stack_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 1022 + Op.JUMPF[1], max_stack_height=1023), + Section.Code(code=Op.PUSH0 + Op.STOP, max_stack_height=1), + ], + ) + , + "ef00010100080200020407000204000000008003ff008000015f6000e100025f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5fe500015f00", + None, + id="jumpf_stack_overflow_variable_stack_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 1022 + Op.JUMPF[1], max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 5 + Op.STOP, max_stack_height=5), + ], + ) + , + "ef00010100080200020407000604000000008003ff008000055f6000e100025f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5fe500015f5f5f5f5f00", + EOFException.STACK_OVERFLOW, + id="jumpf_stack_overflow_variable_stack_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 1022 + Op.JUMPF[1], max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 2 + Op.STOP, max_stack_height=2), + ], + ) + , + "ef00010100080200020407000304000000008003ff008000025f6000e100025f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5fe500015f5f00", + EOFException.STACK_OVERFLOW, + id="jumpf_stack_overflow_variable_stack_5" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_to_nonreturning.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_to_nonreturning.py new file mode 100644 index 0000000000..de308c290d --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_to_nonreturning.py @@ -0,0 +1,85 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 * 2 + Op.JUMPF[1], max_stack_height=2), + Section.Code(code=Op.STOP, max_stack_height=0), + ], + ) + , + "ef0001010008020002000500010400000000800002008000005f5fe5000100", + None, + id="jumpf_to_nonreturning_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 * 3 + Op.JUMPF[1], max_stack_height=3), + Section.Code(code=Op.STOP, code_inputs=3, max_stack_height=3), + ], + ) + , + "ef0001010008020002000600010400000000800003038000035f5f5fe5000100", + None, + id="jumpf_to_nonreturning_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 * 4 + Op.JUMPF[1], max_stack_height=4), + Section.Code(code=Op.STOP, code_inputs=3, max_stack_height=3), + ], + ) + , + "ef0001010008020002000700010400000000800004038000035f5f5f5fe5000100", + None, + id="jumpf_to_nonreturning_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 * 2 + Op.JUMPF[1], max_stack_height=2), + Section.Code(code=Op.STOP, code_inputs=3, max_stack_height=3), + ], + ) + , + "ef0001010008020002000500010400000000800002038000035f5fe5000100", + EOFException.STACK_UNDERFLOW, + id="jumpf_to_nonreturning_3" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_to_nonreturning_variable_stack.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_to_nonreturning_variable_stack.py new file mode 100644 index 0000000000..68d1337d9f --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_to_nonreturning_variable_stack.py @@ -0,0 +1,85 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.JUMPF[1], max_stack_height=3), + Section.Code(code=Op.INVALID, code_inputs=5, max_stack_height=5), + ], + ) + , + "ef0001010008020002000b00010400000000800003058000055f6000e100025f5fe50001fe", + EOFException.STACK_UNDERFLOW, + id="jumpf_to_nonreturning_variable_stack_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.JUMPF[1], max_stack_height=3), + Section.Code(code=Op.INVALID, code_inputs=3, max_stack_height=3), + ], + ) + , + "ef0001010008020002000b00010400000000800003038000035f6000e100025f5fe50001fe", + EOFException.STACK_UNDERFLOW, + id="jumpf_to_nonreturning_variable_stack_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.JUMPF[1], max_stack_height=3), + Section.Code(code=Op.INVALID, code_inputs=1, max_stack_height=1), + ], + ) + , + "ef0001010008020002000b00010400000000800003018000015f6000e100025f5fe50001fe", + None, + id="jumpf_to_nonreturning_variable_stack_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.JUMPF[1], max_stack_height=3), + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + , + "ef0001010008020002000b00010400000000800003008000005f6000e100025f5fe50001fe", + None, + id="jumpf_to_nonreturning_variable_stack_3" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_to_returning.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_to_returning.py new file mode 100644 index 0000000000..5d37c81abc --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_to_returning.py @@ -0,0 +1,187 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.JUMPF[2], code_outputs=2, max_stack_height=0), + Section.Code(code=Op.PUSH0 * 2 + Op.RETF, code_outputs=2, max_stack_height=2), + ], + ) + , + "ef000101000c02000300040003000304000000008000020002000000020002e3000100e500025f5fe4", + None, + id="jumpf_to_returning_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.PUSH0 * 2 + Op.JUMPF[2], code_outputs=2, max_stack_height=2), + Section.Code(code=Op.PUSH0 * 2 + Op.RETF, code_outputs=2, max_stack_height=2), + ], + ) + , + "ef000101000c02000300040005000304000000008000020002000200020002e30001005f5fe500025f5fe4", + EOFException.STACK_HIGHER_THAN_OUTPUTS, + id="jumpf_to_returning_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.PUSH0 * 3 + Op.JUMPF[2], code_outputs=2, max_stack_height=3), + Section.Code(code=Op.POP + Op.RETF, code_inputs=3, code_outputs=2, max_stack_height=3), + ], + ) + , + "ef000101000c02000300040006000204000000008000020002000303020003e30001005f5f5fe5000250e4", + None, + id="jumpf_to_returning_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.PUSH0 * 4 + Op.JUMPF[2], code_outputs=2, max_stack_height=4), + Section.Code(code=Op.POP + Op.RETF, code_inputs=3, code_outputs=2, max_stack_height=3), + ], + ) + , + "ef000101000c02000300040007000204000000008000020002000403020003e30001005f5f5f5fe5000250e4", + EOFException.STACK_HIGHER_THAN_OUTPUTS, + id="jumpf_to_returning_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.PUSH0 * 2 + Op.JUMPF[2], code_outputs=2, max_stack_height=2), + Section.Code(code=Op.POP + Op.RETF, code_inputs=3, code_outputs=2, max_stack_height=3), + ], + ) + , + "ef000101000c02000300040005000204000000008000020002000203020003e30001005f5fe5000250e4", + EOFException.STACK_UNDERFLOW, + id="jumpf_to_returning_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.PUSH0 + Op.JUMPF[2], code_outputs=2, max_stack_height=1), + Section.Code(code=Op.PUSH0 + Op.RETF, code_outputs=1, max_stack_height=1), + ], + ) + , + "ef000101000c02000300040004000204000000008000020002000100010001e30001005fe500025fe4", + None, + id="jumpf_to_returning_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.PUSH0 * 3 + Op.JUMPF[2], code_outputs=2, max_stack_height=3), + Section.Code(code=Op.PUSH0 + Op.RETF, code_outputs=1, max_stack_height=1), + ], + ) + , + "ef000101000c02000300040006000204000000008000020002000300010001e30001005f5f5fe500025fe4", + EOFException.STACK_HIGHER_THAN_OUTPUTS, + id="jumpf_to_returning_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.JUMPF[2], code_outputs=2, max_stack_height=0), + Section.Code(code=Op.PUSH0 + Op.RETF, code_outputs=1, max_stack_height=1), + ], + ) + , + "ef000101000c02000300040003000204000000008000020002000000010001e3000100e500025fe4", + EOFException.STACK_UNDERFLOW, + id="jumpf_to_returning_7" + ), + pytest.param( + Container( + name = 'EOFV1_0009', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.PUSH0 * 4 + Op.JUMPF[2], code_outputs=2, max_stack_height=4), + Section.Code(code=Op.POP * 2 + Op.RETF, code_inputs=3, code_outputs=1, max_stack_height=3), + ], + ) + , + "ef000101000c02000300040007000304000000008000020002000403010003e30001005f5f5f5fe500025050e4", + None, + id="jumpf_to_returning_8" + ), + pytest.param( + Container( + name = 'EOFV1_0010', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.PUSH0 * 5 + Op.JUMPF[2], code_outputs=2, max_stack_height=5), + Section.Code(code=Op.POP * 2 + Op.RETF, code_inputs=3, code_outputs=1, max_stack_height=3), + ], + ) + , + "ef000101000c02000300040008000304000000008000020002000503010003e30001005f5f5f5f5fe500025050e4", + EOFException.STACK_HIGHER_THAN_OUTPUTS, + id="jumpf_to_returning_9" + ), + pytest.param( + Container( + name = 'EOFV1_0011', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.PUSH0 * 3 + Op.JUMPF[2], code_outputs=2, max_stack_height=3), + Section.Code(code=Op.POP * 2 + Op.RETF, code_inputs=3, code_outputs=1, max_stack_height=3), + ], + ) + , + "ef000101000c02000300040006000304000000008000020002000303010003e30001005f5f5fe500025050e4", + EOFException.STACK_UNDERFLOW, + id="jumpf_to_returning_10" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_to_returning_variable_stack.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_to_returning_variable_stack.py new file mode 100644 index 0000000000..fc6bdec637 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_to_returning_variable_stack.py @@ -0,0 +1,145 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=3), + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.JUMPF[2], code_outputs=3, max_stack_height=3), + Section.Code(code=Op.PUSH0 + Op.RETF, code_inputs=5, code_outputs=3, max_stack_height=3), + ], + ) + , + "ef000101000c0200030004000b000204000000008000030003000305030003e30001005f6000e100025f5fe500025fe4", + EOFException.STACK_UNDERFLOW, + id="jumpf_to_returning_variable_stack_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=3), + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.JUMPF[2], code_outputs=3, max_stack_height=3), + Section.Code(code=Op.RETF, code_inputs=3, code_outputs=3, max_stack_height=3), + ], + ) + , + "ef000101000c0200030004000b000104000000008000030003000303030003e30001005f6000e100025f5fe50002e4", + EOFException.STACK_UNDERFLOW, + id="jumpf_to_returning_variable_stack_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=3), + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.JUMPF[2], code_outputs=3, max_stack_height=3), + Section.Code(code=Op.PUSH0 * 2 + Op.RETF, code_inputs=1, code_outputs=3, max_stack_height=5), + ], + ) + , + "ef000101000c0200030004000b000304000000008000030003000301030005e30001005f6000e100025f5fe500025f5fe4", + EOFException.STACK_HIGHER_THAN_OUTPUTS, + id="jumpf_to_returning_variable_stack_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=3), + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.JUMPF[2], code_outputs=3, max_stack_height=3), + Section.Code(code=Op.PUSH0 * 3 + Op.RETF, code_outputs=3, max_stack_height=3), + ], + ) + , + "ef000101000c0200030004000b000404000000008000030003000300030003e30001005f6000e100025f5fe500025f5f5fe4", + EOFException.STACK_HIGHER_THAN_OUTPUTS, + id="jumpf_to_returning_variable_stack_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.JUMPF[2], code_outputs=2, max_stack_height=3), + Section.Code(code=Op.POP * 4 + Op.RETF, code_inputs=5, code_outputs=1, max_stack_height=5), + ], + ) + , + "ef000101000c0200030004000b000504000000008000020002000305010005e30001005f6000e100025f5fe5000250505050e4", + EOFException.STACK_UNDERFLOW, + id="jumpf_to_returning_variable_stack_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.JUMPF[2], code_outputs=2, max_stack_height=3), + Section.Code(code=Op.POP * 2 + Op.RETF, code_inputs=3, code_outputs=1, max_stack_height=3), + ], + ) + , + "ef000101000c0200030004000b000304000000008000020002000303010003e30001005f6000e100025f5fe500025050e4", + EOFException.STACK_UNDERFLOW, + id="jumpf_to_returning_variable_stack_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.JUMPF[2], code_outputs=2, max_stack_height=3), + Section.Code(code=Op.RETF, code_inputs=1, code_outputs=1, max_stack_height=1), + ], + ) + , + "ef000101000c0200030004000b000104000000008000020002000301010001e30001005f6000e100025f5fe50002e4", + EOFException.STACK_HIGHER_THAN_OUTPUTS, + id="jumpf_to_returning_variable_stack_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.JUMPF[2], code_outputs=2, max_stack_height=3), + Section.Code(code=Op.PUSH0 + Op.RETF, code_outputs=1, max_stack_height=1), + ], + ) + , + "ef000101000c0200030004000b000204000000008000020002000300010001e30001005f6000e100025f5fe500025fe4", + EOFException.STACK_HIGHER_THAN_OUTPUTS, + id="jumpf_to_returning_variable_stack_7" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_with_inputs_stack_overflow.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_with_inputs_stack_overflow.py new file mode 100644 index 0000000000..07e2dcf5cb --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_with_inputs_stack_overflow.py @@ -0,0 +1,72 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 * 1023 + Op.JUMPF[1], max_stack_height=1023), + Section.Code(code=Op.PUSH0 + Op.STOP, code_inputs=2, max_stack_height=3), + ], + ) + , + "ef00010100080200020402000204000000008003ff028000035f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5fe500015f00", + None, + id="jumpf_with_inputs_stack_overflow_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 * 1023 + Op.JUMPF[1], max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 2 + Op.STOP, code_inputs=2, max_stack_height=4), + ], + ) + , + "ef00010100080200020402000304000000008003ff028000045f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5fe500015f5f00", + EOFException.STACK_OVERFLOW, + id="jumpf_with_inputs_stack_overflow_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 * 1024 + Op.JUMPF[1], max_stack_height=1023), + Section.Code(code=Op.PUSH0 + Op.STOP, code_inputs=2, max_stack_height=3), + ], + ) + , + "ef00010100080200020403000204000000008003ff028000035f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5fe500015f00", + EOFException.STACK_OVERFLOW, + id="jumpf_with_inputs_stack_overflow_2" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_with_inputs_stack_overflow_variable_stack.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_with_inputs_stack_overflow_variable_stack.py new file mode 100644 index 0000000000..b0124cb923 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_jumpf_with_inputs_stack_overflow_variable_stack.py @@ -0,0 +1,98 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 1022 + Op.JUMPF[1], max_stack_height=1023), + Section.Code(code=Op.PUSH0 + Op.STOP, code_inputs=2, max_stack_height=3), + ], + ) + , + "ef00010100080200020407000204000000008003ff028000035f6000e100025f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5fe500015f00", + None, + id="jumpf_with_inputs_stack_overflow_variable_stack_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 1022 + Op.JUMPF[1], max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 4 + Op.STOP, code_inputs=2, max_stack_height=6), + ], + ) + , + "ef00010100080200020407000504000000008003ff028000065f6000e100025f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5fe500015f5f5f5f00", + EOFException.STACK_OVERFLOW, + id="jumpf_with_inputs_stack_overflow_variable_stack_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 1022 + Op.JUMPF[1], max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 2 + Op.STOP, code_inputs=2, max_stack_height=4), + ], + ) + , + "ef00010100080200020407000304000000008003ff028000045f6000e100025f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5fe500015f5f00", + EOFException.STACK_OVERFLOW, + id="jumpf_with_inputs_stack_overflow_variable_stack_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 1023 + Op.JUMPF[1], max_stack_height=1023), + Section.Code(code=Op.PUSH0 * 3 + Op.STOP, code_inputs=2, max_stack_height=5), + ], + ) + , + "ef00010100080200020408000404000000008003ff028000055f6000e100025f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5fe500015f5f5f00", + EOFException.STACK_OVERFLOW, + id="jumpf_with_inputs_stack_overflow_variable_stack_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 1023 + Op.JUMPF[1], max_stack_height=1023), + Section.Code(code=Op.PUSH0 + Op.STOP, code_inputs=2, max_stack_height=3), + ], + ) + , + "ef00010100080200020408000204000000008003ff028000035f6000e100025f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5fe500015f00", + EOFException.STACK_OVERFLOW, + id="jumpf_with_inputs_stack_overflow_variable_stack_4" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_no_terminating_instruction.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_no_terminating_instruction.py new file mode 100644 index 0000000000..b7b2883d9c --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_no_terminating_instruction.py @@ -0,0 +1,69 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0, max_stack_height=0), + ], + ) + , + "ef0001010004020001000104000000008000005f", + EOFException.MISSING_STOP_OPCODE, + id="no_terminating_instruction_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[2] + Op.PUSH1[1] + Op.ADD, max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000006002600101", + EOFException.MISSING_STOP_OPCODE, + id="no_terminating_instruction_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.RJUMPI[-5], max_stack_height=0), + ], + ) + , + "ef0001010004020001000504000000008000006001e1fffb", + EOFException.MISSING_STOP_OPCODE, + id="no_terminating_instruction_2" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_non_constant_stack_height.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_non_constant_stack_height.py new file mode 100644 index 0000000000..245205d741 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_non_constant_stack_height.py @@ -0,0 +1,69 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 + Op.RJUMPI[7] + Op.PUSH0 * 3 + Op.RJUMPI[1] + Op.POP + Op.PUSH0 * 2 + Op.REVERT, max_stack_height=4), + ], + ) + , + "ef0001010004020001000e04000000008000045fe100075f5f5fe10001505f5ffd", + None, + id="non_constant_stack_height_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 * 2 + Op.RJUMPI[7] + Op.PUSH0 * 3 + Op.RJUMPI[1] + Op.POP + Op.PUSH0 * 2 + Op.REVERT, max_stack_height=5), + ], + ) + , + "ef0001010004020001000f04000000008000055f5fe100075f5f5fe10001505f5ffd", + None, + id="non_constant_stack_height_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.RJUMPI[7] + Op.PUSH0 * 3 + Op.RJUMPI[1] + Op.POP * 2 + Op.PUSH0 * 2 + Op.REVERT, max_stack_height=4), + ], + ) + , + "ef0001010004020001000f04000000008000045fe100075f5f5fe1000150505f5ffd", + EOFException.STACK_UNDERFLOW, + id="non_constant_stack_height_2" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_retf_stack_validation.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_retf_stack_validation.py new file mode 100644 index 0000000000..ad7c8ce057 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_retf_stack_validation.py @@ -0,0 +1,85 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.PUSH0 * 2 + Op.RETF, code_outputs=2, max_stack_height=2), + ], + ) + , + "ef000101000802000200040003040000000080000200020002e30001005f5fe4", + None, + id="retf_stack_validation_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.PUSH0 + Op.RETF, code_outputs=2, max_stack_height=1), + ], + ) + , + "ef000101000802000200040002040000000080000200020001e30001005fe4", + EOFException.STACK_UNDERFLOW, + id="retf_stack_validation_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.PUSH0 * 3 + Op.RETF, code_outputs=2, max_stack_height=3), + ], + ) + , + "ef000101000802000200040004040000000080000200020003e30001005f5f5fe4", + EOFException.STACK_HIGHER_THAN_OUTPUTS, + id="retf_stack_validation_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.RJUMPI[7] + Op.PUSH1[1] * 2 + Op.RJUMP[2] + Op.PUSH0 * 2 + Op.RETF, code_inputs=1, code_outputs=2, max_stack_height=2), + ], + ) + , + "ef00010100080200020005000d0400000000800002010200025fe3000100e1000760016001e000025f5fe4", + None, + id="retf_stack_validation_3" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_retf_variable_stack.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_retf_variable_stack.py new file mode 100644 index 0000000000..4c6691e793 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_retf_variable_stack.py @@ -0,0 +1,85 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=5), + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.RETF, code_outputs=5, max_stack_height=3), + ], + ) + , + "ef000101000802000200040009040000000080000500050003e30001005f6000e100025f5fe4", + EOFException.STACK_UNDERFLOW, + id="retf_variable_stack_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=3), + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.RETF, code_outputs=3, max_stack_height=3), + ], + ) + , + "ef000101000802000200040009040000000080000300030003e30001005f6000e100025f5fe4", + EOFException.STACK_UNDERFLOW, + id="retf_variable_stack_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=1), + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.RETF, code_outputs=1, max_stack_height=3), + ], + ) + , + "ef000101000802000200040009040000000080000100010003e30001005f6000e100025f5fe4", + EOFException.STACK_HIGHER_THAN_OUTPUTS, + id="retf_variable_stack_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=0), + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.RETF, code_outputs=0, max_stack_height=3), + ], + ) + , + "ef000101000802000200040009040000000080000000000003e30001005f6000e100025f5fe4", + EOFException.STACK_HIGHER_THAN_OUTPUTS, + id="retf_variable_stack_3" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_self_referencing_jumps.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_self_referencing_jumps.py new file mode 100644 index 0000000000..9b83ade57f --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_self_referencing_jumps.py @@ -0,0 +1,57 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[-3] + Op.STOP, max_stack_height=0), + ], + ) + , + "ef0001010004020001000604000000008000006000e1fffd00", + EOFException.STACK_HEIGHT_MISMATCH, + id="rjumpi" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPV[-4] + Op.STOP, max_stack_height=0), + ], + ) + , + "ef0001010004020001000704000000008000006000e200fffc00", + EOFException.STACK_HEIGHT_MISMATCH, + id="rjumpv" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_self_referencing_jumps_variable_stack.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_self_referencing_jumps_variable_stack.py new file mode 100644 index 0000000000..cf0cad89d5 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_self_referencing_jumps_variable_stack.py @@ -0,0 +1,69 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.RJUMP[-3], max_stack_height=3), + ], + ) + , + "ef0001010004020001000b04000000008000035f6000e100025f5fe0fffd", + None, + id="rjump" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[0] + Op.RJUMPI[-3] + Op.STOP, max_stack_height=4), + ], + ) + , + "ef0001010004020001000e04000000008000045f6000e100025f5f6000e1fffd00", + EOFException.STACK_HEIGHT_MISMATCH, + id="rjumpi" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.PUSH1[0] + Op.RJUMPV[-4] + Op.STOP, max_stack_height=4), + ], + ) + , + "ef0001010004020001000f04000000008000045f6000e100025f5f6000e200fffc00", + EOFException.STACK_HEIGHT_MISMATCH, + id="rjumpv" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_stack_range_maximally_broad.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_stack_range_maximally_broad.py new file mode 100644 index 0000000000..97c0264865 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_stack_range_maximally_broad.py @@ -0,0 +1,73 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section, ContainerKind + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +# Invalid 1024 RJUMPIs +rjumpis_1023 = Op.STOP +offset = 1 +for i in range(0, 1023): + rjumpis_1023 = Op.PUSH0 + Op.RJUMPI[offset] + Op.PUSH0 + rjumpis_1023 + offset += 5 + +rjumpis_1024 = Op.PUSH0 + Op.RJUMPI[offset] + Op.PUSH0 + rjumpis_1023 + +invalid_1024_rjumpis = Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=rjumpis_1024, max_stack_height=1023), + ], + kind=ContainerKind.RUNTIME +) + +# Construct series of RJUMPIs all targeting final STOP +# Stack range at STOP is [0, 1023] +valid_1023_rjumpis = Container( + name='EOFV1_0002', + sections=[ + Section.Code(code=rjumpis_1023, max_stack_height=1023), + ], + kind=ContainerKind.RUNTIME +) + + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + invalid_1024_rjumpis, + "ef0001010004020001140104000000008003ff5fe113fc5f5fe113f75f5fe113f25f5fe113ed5f5fe113e85f5fe113e35f5fe113de5f5fe113d95f5fe113d45f5fe113cf5f5fe113ca5f5fe113c55f5fe113c05f5fe113bb5f5fe113b65f5fe113b15f5fe113ac5f5fe113a75f5fe113a25f5fe1139d5f5fe113985f5fe113935f5fe1138e5f5fe113895f5fe113845f5fe1137f5f5fe1137a5f5fe113755f5fe113705f5fe1136b5f5fe113665f5fe113615f5fe1135c5f5fe113575f5fe113525f5fe1134d5f5fe113485f5fe113435f5fe1133e5f5fe113395f5fe113345f5fe1132f5f5fe1132a5f5fe113255f5fe113205f5fe1131b5f5fe113165f5fe113115f5fe1130c5f5fe113075f5fe113025f5fe112fd5f5fe112f85f5fe112f35f5fe112ee5f5fe112e95f5fe112e45f5fe112df5f5fe112da5f5fe112d55f5fe112d05f5fe112cb5f5fe112c65f5fe112c15f5fe112bc5f5fe112b75f5fe112b25f5fe112ad5f5fe112a85f5fe112a35f5fe1129e5f5fe112995f5fe112945f5fe1128f5f5fe1128a5f5fe112855f5fe112805f5fe1127b5f5fe112765f5fe112715f5fe1126c5f5fe112675f5fe112625f5fe1125d5f5fe112585f5fe112535f5fe1124e5f5fe112495f5fe112445f5fe1123f5f5fe1123a5f5fe112355f5fe112305f5fe1122b5f5fe112265f5fe112215f5fe1121c5f5fe112175f5fe112125f5fe1120d5f5fe112085f5fe112035f5fe111fe5f5fe111f95f5fe111f45f5fe111ef5f5fe111ea5f5fe111e55f5fe111e05f5fe111db5f5fe111d65f5fe111d15f5fe111cc5f5fe111c75f5fe111c25f5fe111bd5f5fe111b85f5fe111b35f5fe111ae5f5fe111a95f5fe111a45f5fe1119f5f5fe1119a5f5fe111955f5fe111905f5fe1118b5f5fe111865f5fe111815f5fe1117c5f5fe111775f5fe111725f5fe1116d5f5fe111685f5fe111635f5fe1115e5f5fe111595f5fe111545f5fe1114f5f5fe1114a5f5fe111455f5fe111405f5fe1113b5f5fe111365f5fe111315f5fe1112c5f5fe111275f5fe111225f5fe1111d5f5fe111185f5fe111135f5fe1110e5f5fe111095f5fe111045f5fe110ff5f5fe110fa5f5fe110f55f5fe110f05f5fe110eb5f5fe110e65f5fe110e15f5fe110dc5f5fe110d75f5fe110d25f5fe110cd5f5fe110c85f5fe110c35f5fe110be5f5fe110b95f5fe110b45f5fe110af5f5fe110aa5f5fe110a55f5fe110a05f5fe1109b5f5fe110965f5fe110915f5fe1108c5f5fe110875f5fe110825f5fe1107d5f5fe110785f5fe110735f5fe1106e5f5fe110695f5fe110645f5fe1105f5f5fe1105a5f5fe110555f5fe110505f5fe1104b5f5fe110465f5fe110415f5fe1103c5f5fe110375f5fe110325f5fe1102d5f5fe110285f5fe110235f5fe1101e5f5fe110195f5fe110145f5fe1100f5f5fe1100a5f5fe110055f5fe110005f5fe10ffb5f5fe10ff65f5fe10ff15f5fe10fec5f5fe10fe75f5fe10fe25f5fe10fdd5f5fe10fd85f5fe10fd35f5fe10fce5f5fe10fc95f5fe10fc45f5fe10fbf5f5fe10fba5f5fe10fb55f5fe10fb05f5fe10fab5f5fe10fa65f5fe10fa15f5fe10f9c5f5fe10f975f5fe10f925f5fe10f8d5f5fe10f885f5fe10f835f5fe10f7e5f5fe10f795f5fe10f745f5fe10f6f5f5fe10f6a5f5fe10f655f5fe10f605f5fe10f5b5f5fe10f565f5fe10f515f5fe10f4c5f5fe10f475f5fe10f425f5fe10f3d5f5fe10f385f5fe10f335f5fe10f2e5f5fe10f295f5fe10f245f5fe10f1f5f5fe10f1a5f5fe10f155f5fe10f105f5fe10f0b5f5fe10f065f5fe10f015f5fe10efc5f5fe10ef75f5fe10ef25f5fe10eed5f5fe10ee85f5fe10ee35f5fe10ede5f5fe10ed95f5fe10ed45f5fe10ecf5f5fe10eca5f5fe10ec55f5fe10ec05f5fe10ebb5f5fe10eb65f5fe10eb15f5fe10eac5f5fe10ea75f5fe10ea25f5fe10e9d5f5fe10e985f5fe10e935f5fe10e8e5f5fe10e895f5fe10e845f5fe10e7f5f5fe10e7a5f5fe10e755f5fe10e705f5fe10e6b5f5fe10e665f5fe10e615f5fe10e5c5f5fe10e575f5fe10e525f5fe10e4d5f5fe10e485f5fe10e435f5fe10e3e5f5fe10e395f5fe10e345f5fe10e2f5f5fe10e2a5f5fe10e255f5fe10e205f5fe10e1b5f5fe10e165f5fe10e115f5fe10e0c5f5fe10e075f5fe10e025f5fe10dfd5f5fe10df85f5fe10df35f5fe10dee5f5fe10de95f5fe10de45f5fe10ddf5f5fe10dda5f5fe10dd55f5fe10dd05f5fe10dcb5f5fe10dc65f5fe10dc15f5fe10dbc5f5fe10db75f5fe10db25f5fe10dad5f5fe10da85f5fe10da35f5fe10d9e5f5fe10d995f5fe10d945f5fe10d8f5f5fe10d8a5f5fe10d855f5fe10d805f5fe10d7b5f5fe10d765f5fe10d715f5fe10d6c5f5fe10d675f5fe10d625f5fe10d5d5f5fe10d585f5fe10d535f5fe10d4e5f5fe10d495f5fe10d445f5fe10d3f5f5fe10d3a5f5fe10d355f5fe10d305f5fe10d2b5f5fe10d265f5fe10d215f5fe10d1c5f5fe10d175f5fe10d125f5fe10d0d5f5fe10d085f5fe10d035f5fe10cfe5f5fe10cf95f5fe10cf45f5fe10cef5f5fe10cea5f5fe10ce55f5fe10ce05f5fe10cdb5f5fe10cd65f5fe10cd15f5fe10ccc5f5fe10cc75f5fe10cc25f5fe10cbd5f5fe10cb85f5fe10cb35f5fe10cae5f5fe10ca95f5fe10ca45f5fe10c9f5f5fe10c9a5f5fe10c955f5fe10c905f5fe10c8b5f5fe10c865f5fe10c815f5fe10c7c5f5fe10c775f5fe10c725f5fe10c6d5f5fe10c685f5fe10c635f5fe10c5e5f5fe10c595f5fe10c545f5fe10c4f5f5fe10c4a5f5fe10c455f5fe10c405f5fe10c3b5f5fe10c365f5fe10c315f5fe10c2c5f5fe10c275f5fe10c225f5fe10c1d5f5fe10c185f5fe10c135f5fe10c0e5f5fe10c095f5fe10c045f5fe10bff5f5fe10bfa5f5fe10bf55f5fe10bf05f5fe10beb5f5fe10be65f5fe10be15f5fe10bdc5f5fe10bd75f5fe10bd25f5fe10bcd5f5fe10bc85f5fe10bc35f5fe10bbe5f5fe10bb95f5fe10bb45f5fe10baf5f5fe10baa5f5fe10ba55f5fe10ba05f5fe10b9b5f5fe10b965f5fe10b915f5fe10b8c5f5fe10b875f5fe10b825f5fe10b7d5f5fe10b785f5fe10b735f5fe10b6e5f5fe10b695f5fe10b645f5fe10b5f5f5fe10b5a5f5fe10b555f5fe10b505f5fe10b4b5f5fe10b465f5fe10b415f5fe10b3c5f5fe10b375f5fe10b325f5fe10b2d5f5fe10b285f5fe10b235f5fe10b1e5f5fe10b195f5fe10b145f5fe10b0f5f5fe10b0a5f5fe10b055f5fe10b005f5fe10afb5f5fe10af65f5fe10af15f5fe10aec5f5fe10ae75f5fe10ae25f5fe10add5f5fe10ad85f5fe10ad35f5fe10ace5f5fe10ac95f5fe10ac45f5fe10abf5f5fe10aba5f5fe10ab55f5fe10ab05f5fe10aab5f5fe10aa65f5fe10aa15f5fe10a9c5f5fe10a975f5fe10a925f5fe10a8d5f5fe10a885f5fe10a835f5fe10a7e5f5fe10a795f5fe10a745f5fe10a6f5f5fe10a6a5f5fe10a655f5fe10a605f5fe10a5b5f5fe10a565f5fe10a515f5fe10a4c5f5fe10a475f5fe10a425f5fe10a3d5f5fe10a385f5fe10a335f5fe10a2e5f5fe10a295f5fe10a245f5fe10a1f5f5fe10a1a5f5fe10a155f5fe10a105f5fe10a0b5f5fe10a065f5fe10a015f5fe109fc5f5fe109f75f5fe109f25f5fe109ed5f5fe109e85f5fe109e35f5fe109de5f5fe109d95f5fe109d45f5fe109cf5f5fe109ca5f5fe109c55f5fe109c05f5fe109bb5f5fe109b65f5fe109b15f5fe109ac5f5fe109a75f5fe109a25f5fe1099d5f5fe109985f5fe109935f5fe1098e5f5fe109895f5fe109845f5fe1097f5f5fe1097a5f5fe109755f5fe109705f5fe1096b5f5fe109665f5fe109615f5fe1095c5f5fe109575f5fe109525f5fe1094d5f5fe109485f5fe109435f5fe1093e5f5fe109395f5fe109345f5fe1092f5f5fe1092a5f5fe109255f5fe109205f5fe1091b5f5fe109165f5fe109115f5fe1090c5f5fe109075f5fe109025f5fe108fd5f5fe108f85f5fe108f35f5fe108ee5f5fe108e95f5fe108e45f5fe108df5f5fe108da5f5fe108d55f5fe108d05f5fe108cb5f5fe108c65f5fe108c15f5fe108bc5f5fe108b75f5fe108b25f5fe108ad5f5fe108a85f5fe108a35f5fe1089e5f5fe108995f5fe108945f5fe1088f5f5fe1088a5f5fe108855f5fe108805f5fe1087b5f5fe108765f5fe108715f5fe1086c5f5fe108675f5fe108625f5fe1085d5f5fe108585f5fe108535f5fe1084e5f5fe108495f5fe108445f5fe1083f5f5fe1083a5f5fe108355f5fe108305f5fe1082b5f5fe108265f5fe108215f5fe1081c5f5fe108175f5fe108125f5fe1080d5f5fe108085f5fe108035f5fe107fe5f5fe107f95f5fe107f45f5fe107ef5f5fe107ea5f5fe107e55f5fe107e05f5fe107db5f5fe107d65f5fe107d15f5fe107cc5f5fe107c75f5fe107c25f5fe107bd5f5fe107b85f5fe107b35f5fe107ae5f5fe107a95f5fe107a45f5fe1079f5f5fe1079a5f5fe107955f5fe107905f5fe1078b5f5fe107865f5fe107815f5fe1077c5f5fe107775f5fe107725f5fe1076d5f5fe107685f5fe107635f5fe1075e5f5fe107595f5fe107545f5fe1074f5f5fe1074a5f5fe107455f5fe107405f5fe1073b5f5fe107365f5fe107315f5fe1072c5f5fe107275f5fe107225f5fe1071d5f5fe107185f5fe107135f5fe1070e5f5fe107095f5fe107045f5fe106ff5f5fe106fa5f5fe106f55f5fe106f05f5fe106eb5f5fe106e65f5fe106e15f5fe106dc5f5fe106d75f5fe106d25f5fe106cd5f5fe106c85f5fe106c35f5fe106be5f5fe106b95f5fe106b45f5fe106af5f5fe106aa5f5fe106a55f5fe106a05f5fe1069b5f5fe106965f5fe106915f5fe1068c5f5fe106875f5fe106825f5fe1067d5f5fe106785f5fe106735f5fe1066e5f5fe106695f5fe106645f5fe1065f5f5fe1065a5f5fe106555f5fe106505f5fe1064b5f5fe106465f5fe106415f5fe1063c5f5fe106375f5fe106325f5fe1062d5f5fe106285f5fe106235f5fe1061e5f5fe106195f5fe106145f5fe1060f5f5fe1060a5f5fe106055f5fe106005f5fe105fb5f5fe105f65f5fe105f15f5fe105ec5f5fe105e75f5fe105e25f5fe105dd5f5fe105d85f5fe105d35f5fe105ce5f5fe105c95f5fe105c45f5fe105bf5f5fe105ba5f5fe105b55f5fe105b05f5fe105ab5f5fe105a65f5fe105a15f5fe1059c5f5fe105975f5fe105925f5fe1058d5f5fe105885f5fe105835f5fe1057e5f5fe105795f5fe105745f5fe1056f5f5fe1056a5f5fe105655f5fe105605f5fe1055b5f5fe105565f5fe105515f5fe1054c5f5fe105475f5fe105425f5fe1053d5f5fe105385f5fe105335f5fe1052e5f5fe105295f5fe105245f5fe1051f5f5fe1051a5f5fe105155f5fe105105f5fe1050b5f5fe105065f5fe105015f5fe104fc5f5fe104f75f5fe104f25f5fe104ed5f5fe104e85f5fe104e35f5fe104de5f5fe104d95f5fe104d45f5fe104cf5f5fe104ca5f5fe104c55f5fe104c05f5fe104bb5f5fe104b65f5fe104b15f5fe104ac5f5fe104a75f5fe104a25f5fe1049d5f5fe104985f5fe104935f5fe1048e5f5fe104895f5fe104845f5fe1047f5f5fe1047a5f5fe104755f5fe104705f5fe1046b5f5fe104665f5fe104615f5fe1045c5f5fe104575f5fe104525f5fe1044d5f5fe104485f5fe104435f5fe1043e5f5fe104395f5fe104345f5fe1042f5f5fe1042a5f5fe104255f5fe104205f5fe1041b5f5fe104165f5fe104115f5fe1040c5f5fe104075f5fe104025f5fe103fd5f5fe103f85f5fe103f35f5fe103ee5f5fe103e95f5fe103e45f5fe103df5f5fe103da5f5fe103d55f5fe103d05f5fe103cb5f5fe103c65f5fe103c15f5fe103bc5f5fe103b75f5fe103b25f5fe103ad5f5fe103a85f5fe103a35f5fe1039e5f5fe103995f5fe103945f5fe1038f5f5fe1038a5f5fe103855f5fe103805f5fe1037b5f5fe103765f5fe103715f5fe1036c5f5fe103675f5fe103625f5fe1035d5f5fe103585f5fe103535f5fe1034e5f5fe103495f5fe103445f5fe1033f5f5fe1033a5f5fe103355f5fe103305f5fe1032b5f5fe103265f5fe103215f5fe1031c5f5fe103175f5fe103125f5fe1030d5f5fe103085f5fe103035f5fe102fe5f5fe102f95f5fe102f45f5fe102ef5f5fe102ea5f5fe102e55f5fe102e05f5fe102db5f5fe102d65f5fe102d15f5fe102cc5f5fe102c75f5fe102c25f5fe102bd5f5fe102b85f5fe102b35f5fe102ae5f5fe102a95f5fe102a45f5fe1029f5f5fe1029a5f5fe102955f5fe102905f5fe1028b5f5fe102865f5fe102815f5fe1027c5f5fe102775f5fe102725f5fe1026d5f5fe102685f5fe102635f5fe1025e5f5fe102595f5fe102545f5fe1024f5f5fe1024a5f5fe102455f5fe102405f5fe1023b5f5fe102365f5fe102315f5fe1022c5f5fe102275f5fe102225f5fe1021d5f5fe102185f5fe102135f5fe1020e5f5fe102095f5fe102045f5fe101ff5f5fe101fa5f5fe101f55f5fe101f05f5fe101eb5f5fe101e65f5fe101e15f5fe101dc5f5fe101d75f5fe101d25f5fe101cd5f5fe101c85f5fe101c35f5fe101be5f5fe101b95f5fe101b45f5fe101af5f5fe101aa5f5fe101a55f5fe101a05f5fe1019b5f5fe101965f5fe101915f5fe1018c5f5fe101875f5fe101825f5fe1017d5f5fe101785f5fe101735f5fe1016e5f5fe101695f5fe101645f5fe1015f5f5fe1015a5f5fe101555f5fe101505f5fe1014b5f5fe101465f5fe101415f5fe1013c5f5fe101375f5fe101325f5fe1012d5f5fe101285f5fe101235f5fe1011e5f5fe101195f5fe101145f5fe1010f5f5fe1010a5f5fe101055f5fe101005f5fe100fb5f5fe100f65f5fe100f15f5fe100ec5f5fe100e75f5fe100e25f5fe100dd5f5fe100d85f5fe100d35f5fe100ce5f5fe100c95f5fe100c45f5fe100bf5f5fe100ba5f5fe100b55f5fe100b05f5fe100ab5f5fe100a65f5fe100a15f5fe1009c5f5fe100975f5fe100925f5fe1008d5f5fe100885f5fe100835f5fe1007e5f5fe100795f5fe100745f5fe1006f5f5fe1006a5f5fe100655f5fe100605f5fe1005b5f5fe100565f5fe100515f5fe1004c5f5fe100475f5fe100425f5fe1003d5f5fe100385f5fe100335f5fe1002e5f5fe100295f5fe100245f5fe1001f5f5fe1001a5f5fe100155f5fe100105f5fe1000b5f5fe100065f5fe100015f00", + EOFException.INVALID_MAX_STACK_HEIGHT, + id="invalid_1024_rjumpis" + ), + pytest.param( + valid_1023_rjumpis, + "ef000101000402000113fc04000000008003ff5fe113f75f5fe113f25f5fe113ed5f5fe113e85f5fe113e35f5fe113de5f5fe113d95f5fe113d45f5fe113cf5f5fe113ca5f5fe113c55f5fe113c05f5fe113bb5f5fe113b65f5fe113b15f5fe113ac5f5fe113a75f5fe113a25f5fe1139d5f5fe113985f5fe113935f5fe1138e5f5fe113895f5fe113845f5fe1137f5f5fe1137a5f5fe113755f5fe113705f5fe1136b5f5fe113665f5fe113615f5fe1135c5f5fe113575f5fe113525f5fe1134d5f5fe113485f5fe113435f5fe1133e5f5fe113395f5fe113345f5fe1132f5f5fe1132a5f5fe113255f5fe113205f5fe1131b5f5fe113165f5fe113115f5fe1130c5f5fe113075f5fe113025f5fe112fd5f5fe112f85f5fe112f35f5fe112ee5f5fe112e95f5fe112e45f5fe112df5f5fe112da5f5fe112d55f5fe112d05f5fe112cb5f5fe112c65f5fe112c15f5fe112bc5f5fe112b75f5fe112b25f5fe112ad5f5fe112a85f5fe112a35f5fe1129e5f5fe112995f5fe112945f5fe1128f5f5fe1128a5f5fe112855f5fe112805f5fe1127b5f5fe112765f5fe112715f5fe1126c5f5fe112675f5fe112625f5fe1125d5f5fe112585f5fe112535f5fe1124e5f5fe112495f5fe112445f5fe1123f5f5fe1123a5f5fe112355f5fe112305f5fe1122b5f5fe112265f5fe112215f5fe1121c5f5fe112175f5fe112125f5fe1120d5f5fe112085f5fe112035f5fe111fe5f5fe111f95f5fe111f45f5fe111ef5f5fe111ea5f5fe111e55f5fe111e05f5fe111db5f5fe111d65f5fe111d15f5fe111cc5f5fe111c75f5fe111c25f5fe111bd5f5fe111b85f5fe111b35f5fe111ae5f5fe111a95f5fe111a45f5fe1119f5f5fe1119a5f5fe111955f5fe111905f5fe1118b5f5fe111865f5fe111815f5fe1117c5f5fe111775f5fe111725f5fe1116d5f5fe111685f5fe111635f5fe1115e5f5fe111595f5fe111545f5fe1114f5f5fe1114a5f5fe111455f5fe111405f5fe1113b5f5fe111365f5fe111315f5fe1112c5f5fe111275f5fe111225f5fe1111d5f5fe111185f5fe111135f5fe1110e5f5fe111095f5fe111045f5fe110ff5f5fe110fa5f5fe110f55f5fe110f05f5fe110eb5f5fe110e65f5fe110e15f5fe110dc5f5fe110d75f5fe110d25f5fe110cd5f5fe110c85f5fe110c35f5fe110be5f5fe110b95f5fe110b45f5fe110af5f5fe110aa5f5fe110a55f5fe110a05f5fe1109b5f5fe110965f5fe110915f5fe1108c5f5fe110875f5fe110825f5fe1107d5f5fe110785f5fe110735f5fe1106e5f5fe110695f5fe110645f5fe1105f5f5fe1105a5f5fe110555f5fe110505f5fe1104b5f5fe110465f5fe110415f5fe1103c5f5fe110375f5fe110325f5fe1102d5f5fe110285f5fe110235f5fe1101e5f5fe110195f5fe110145f5fe1100f5f5fe1100a5f5fe110055f5fe110005f5fe10ffb5f5fe10ff65f5fe10ff15f5fe10fec5f5fe10fe75f5fe10fe25f5fe10fdd5f5fe10fd85f5fe10fd35f5fe10fce5f5fe10fc95f5fe10fc45f5fe10fbf5f5fe10fba5f5fe10fb55f5fe10fb05f5fe10fab5f5fe10fa65f5fe10fa15f5fe10f9c5f5fe10f975f5fe10f925f5fe10f8d5f5fe10f885f5fe10f835f5fe10f7e5f5fe10f795f5fe10f745f5fe10f6f5f5fe10f6a5f5fe10f655f5fe10f605f5fe10f5b5f5fe10f565f5fe10f515f5fe10f4c5f5fe10f475f5fe10f425f5fe10f3d5f5fe10f385f5fe10f335f5fe10f2e5f5fe10f295f5fe10f245f5fe10f1f5f5fe10f1a5f5fe10f155f5fe10f105f5fe10f0b5f5fe10f065f5fe10f015f5fe10efc5f5fe10ef75f5fe10ef25f5fe10eed5f5fe10ee85f5fe10ee35f5fe10ede5f5fe10ed95f5fe10ed45f5fe10ecf5f5fe10eca5f5fe10ec55f5fe10ec05f5fe10ebb5f5fe10eb65f5fe10eb15f5fe10eac5f5fe10ea75f5fe10ea25f5fe10e9d5f5fe10e985f5fe10e935f5fe10e8e5f5fe10e895f5fe10e845f5fe10e7f5f5fe10e7a5f5fe10e755f5fe10e705f5fe10e6b5f5fe10e665f5fe10e615f5fe10e5c5f5fe10e575f5fe10e525f5fe10e4d5f5fe10e485f5fe10e435f5fe10e3e5f5fe10e395f5fe10e345f5fe10e2f5f5fe10e2a5f5fe10e255f5fe10e205f5fe10e1b5f5fe10e165f5fe10e115f5fe10e0c5f5fe10e075f5fe10e025f5fe10dfd5f5fe10df85f5fe10df35f5fe10dee5f5fe10de95f5fe10de45f5fe10ddf5f5fe10dda5f5fe10dd55f5fe10dd05f5fe10dcb5f5fe10dc65f5fe10dc15f5fe10dbc5f5fe10db75f5fe10db25f5fe10dad5f5fe10da85f5fe10da35f5fe10d9e5f5fe10d995f5fe10d945f5fe10d8f5f5fe10d8a5f5fe10d855f5fe10d805f5fe10d7b5f5fe10d765f5fe10d715f5fe10d6c5f5fe10d675f5fe10d625f5fe10d5d5f5fe10d585f5fe10d535f5fe10d4e5f5fe10d495f5fe10d445f5fe10d3f5f5fe10d3a5f5fe10d355f5fe10d305f5fe10d2b5f5fe10d265f5fe10d215f5fe10d1c5f5fe10d175f5fe10d125f5fe10d0d5f5fe10d085f5fe10d035f5fe10cfe5f5fe10cf95f5fe10cf45f5fe10cef5f5fe10cea5f5fe10ce55f5fe10ce05f5fe10cdb5f5fe10cd65f5fe10cd15f5fe10ccc5f5fe10cc75f5fe10cc25f5fe10cbd5f5fe10cb85f5fe10cb35f5fe10cae5f5fe10ca95f5fe10ca45f5fe10c9f5f5fe10c9a5f5fe10c955f5fe10c905f5fe10c8b5f5fe10c865f5fe10c815f5fe10c7c5f5fe10c775f5fe10c725f5fe10c6d5f5fe10c685f5fe10c635f5fe10c5e5f5fe10c595f5fe10c545f5fe10c4f5f5fe10c4a5f5fe10c455f5fe10c405f5fe10c3b5f5fe10c365f5fe10c315f5fe10c2c5f5fe10c275f5fe10c225f5fe10c1d5f5fe10c185f5fe10c135f5fe10c0e5f5fe10c095f5fe10c045f5fe10bff5f5fe10bfa5f5fe10bf55f5fe10bf05f5fe10beb5f5fe10be65f5fe10be15f5fe10bdc5f5fe10bd75f5fe10bd25f5fe10bcd5f5fe10bc85f5fe10bc35f5fe10bbe5f5fe10bb95f5fe10bb45f5fe10baf5f5fe10baa5f5fe10ba55f5fe10ba05f5fe10b9b5f5fe10b965f5fe10b915f5fe10b8c5f5fe10b875f5fe10b825f5fe10b7d5f5fe10b785f5fe10b735f5fe10b6e5f5fe10b695f5fe10b645f5fe10b5f5f5fe10b5a5f5fe10b555f5fe10b505f5fe10b4b5f5fe10b465f5fe10b415f5fe10b3c5f5fe10b375f5fe10b325f5fe10b2d5f5fe10b285f5fe10b235f5fe10b1e5f5fe10b195f5fe10b145f5fe10b0f5f5fe10b0a5f5fe10b055f5fe10b005f5fe10afb5f5fe10af65f5fe10af15f5fe10aec5f5fe10ae75f5fe10ae25f5fe10add5f5fe10ad85f5fe10ad35f5fe10ace5f5fe10ac95f5fe10ac45f5fe10abf5f5fe10aba5f5fe10ab55f5fe10ab05f5fe10aab5f5fe10aa65f5fe10aa15f5fe10a9c5f5fe10a975f5fe10a925f5fe10a8d5f5fe10a885f5fe10a835f5fe10a7e5f5fe10a795f5fe10a745f5fe10a6f5f5fe10a6a5f5fe10a655f5fe10a605f5fe10a5b5f5fe10a565f5fe10a515f5fe10a4c5f5fe10a475f5fe10a425f5fe10a3d5f5fe10a385f5fe10a335f5fe10a2e5f5fe10a295f5fe10a245f5fe10a1f5f5fe10a1a5f5fe10a155f5fe10a105f5fe10a0b5f5fe10a065f5fe10a015f5fe109fc5f5fe109f75f5fe109f25f5fe109ed5f5fe109e85f5fe109e35f5fe109de5f5fe109d95f5fe109d45f5fe109cf5f5fe109ca5f5fe109c55f5fe109c05f5fe109bb5f5fe109b65f5fe109b15f5fe109ac5f5fe109a75f5fe109a25f5fe1099d5f5fe109985f5fe109935f5fe1098e5f5fe109895f5fe109845f5fe1097f5f5fe1097a5f5fe109755f5fe109705f5fe1096b5f5fe109665f5fe109615f5fe1095c5f5fe109575f5fe109525f5fe1094d5f5fe109485f5fe109435f5fe1093e5f5fe109395f5fe109345f5fe1092f5f5fe1092a5f5fe109255f5fe109205f5fe1091b5f5fe109165f5fe109115f5fe1090c5f5fe109075f5fe109025f5fe108fd5f5fe108f85f5fe108f35f5fe108ee5f5fe108e95f5fe108e45f5fe108df5f5fe108da5f5fe108d55f5fe108d05f5fe108cb5f5fe108c65f5fe108c15f5fe108bc5f5fe108b75f5fe108b25f5fe108ad5f5fe108a85f5fe108a35f5fe1089e5f5fe108995f5fe108945f5fe1088f5f5fe1088a5f5fe108855f5fe108805f5fe1087b5f5fe108765f5fe108715f5fe1086c5f5fe108675f5fe108625f5fe1085d5f5fe108585f5fe108535f5fe1084e5f5fe108495f5fe108445f5fe1083f5f5fe1083a5f5fe108355f5fe108305f5fe1082b5f5fe108265f5fe108215f5fe1081c5f5fe108175f5fe108125f5fe1080d5f5fe108085f5fe108035f5fe107fe5f5fe107f95f5fe107f45f5fe107ef5f5fe107ea5f5fe107e55f5fe107e05f5fe107db5f5fe107d65f5fe107d15f5fe107cc5f5fe107c75f5fe107c25f5fe107bd5f5fe107b85f5fe107b35f5fe107ae5f5fe107a95f5fe107a45f5fe1079f5f5fe1079a5f5fe107955f5fe107905f5fe1078b5f5fe107865f5fe107815f5fe1077c5f5fe107775f5fe107725f5fe1076d5f5fe107685f5fe107635f5fe1075e5f5fe107595f5fe107545f5fe1074f5f5fe1074a5f5fe107455f5fe107405f5fe1073b5f5fe107365f5fe107315f5fe1072c5f5fe107275f5fe107225f5fe1071d5f5fe107185f5fe107135f5fe1070e5f5fe107095f5fe107045f5fe106ff5f5fe106fa5f5fe106f55f5fe106f05f5fe106eb5f5fe106e65f5fe106e15f5fe106dc5f5fe106d75f5fe106d25f5fe106cd5f5fe106c85f5fe106c35f5fe106be5f5fe106b95f5fe106b45f5fe106af5f5fe106aa5f5fe106a55f5fe106a05f5fe1069b5f5fe106965f5fe106915f5fe1068c5f5fe106875f5fe106825f5fe1067d5f5fe106785f5fe106735f5fe1066e5f5fe106695f5fe106645f5fe1065f5f5fe1065a5f5fe106555f5fe106505f5fe1064b5f5fe106465f5fe106415f5fe1063c5f5fe106375f5fe106325f5fe1062d5f5fe106285f5fe106235f5fe1061e5f5fe106195f5fe106145f5fe1060f5f5fe1060a5f5fe106055f5fe106005f5fe105fb5f5fe105f65f5fe105f15f5fe105ec5f5fe105e75f5fe105e25f5fe105dd5f5fe105d85f5fe105d35f5fe105ce5f5fe105c95f5fe105c45f5fe105bf5f5fe105ba5f5fe105b55f5fe105b05f5fe105ab5f5fe105a65f5fe105a15f5fe1059c5f5fe105975f5fe105925f5fe1058d5f5fe105885f5fe105835f5fe1057e5f5fe105795f5fe105745f5fe1056f5f5fe1056a5f5fe105655f5fe105605f5fe1055b5f5fe105565f5fe105515f5fe1054c5f5fe105475f5fe105425f5fe1053d5f5fe105385f5fe105335f5fe1052e5f5fe105295f5fe105245f5fe1051f5f5fe1051a5f5fe105155f5fe105105f5fe1050b5f5fe105065f5fe105015f5fe104fc5f5fe104f75f5fe104f25f5fe104ed5f5fe104e85f5fe104e35f5fe104de5f5fe104d95f5fe104d45f5fe104cf5f5fe104ca5f5fe104c55f5fe104c05f5fe104bb5f5fe104b65f5fe104b15f5fe104ac5f5fe104a75f5fe104a25f5fe1049d5f5fe104985f5fe104935f5fe1048e5f5fe104895f5fe104845f5fe1047f5f5fe1047a5f5fe104755f5fe104705f5fe1046b5f5fe104665f5fe104615f5fe1045c5f5fe104575f5fe104525f5fe1044d5f5fe104485f5fe104435f5fe1043e5f5fe104395f5fe104345f5fe1042f5f5fe1042a5f5fe104255f5fe104205f5fe1041b5f5fe104165f5fe104115f5fe1040c5f5fe104075f5fe104025f5fe103fd5f5fe103f85f5fe103f35f5fe103ee5f5fe103e95f5fe103e45f5fe103df5f5fe103da5f5fe103d55f5fe103d05f5fe103cb5f5fe103c65f5fe103c15f5fe103bc5f5fe103b75f5fe103b25f5fe103ad5f5fe103a85f5fe103a35f5fe1039e5f5fe103995f5fe103945f5fe1038f5f5fe1038a5f5fe103855f5fe103805f5fe1037b5f5fe103765f5fe103715f5fe1036c5f5fe103675f5fe103625f5fe1035d5f5fe103585f5fe103535f5fe1034e5f5fe103495f5fe103445f5fe1033f5f5fe1033a5f5fe103355f5fe103305f5fe1032b5f5fe103265f5fe103215f5fe1031c5f5fe103175f5fe103125f5fe1030d5f5fe103085f5fe103035f5fe102fe5f5fe102f95f5fe102f45f5fe102ef5f5fe102ea5f5fe102e55f5fe102e05f5fe102db5f5fe102d65f5fe102d15f5fe102cc5f5fe102c75f5fe102c25f5fe102bd5f5fe102b85f5fe102b35f5fe102ae5f5fe102a95f5fe102a45f5fe1029f5f5fe1029a5f5fe102955f5fe102905f5fe1028b5f5fe102865f5fe102815f5fe1027c5f5fe102775f5fe102725f5fe1026d5f5fe102685f5fe102635f5fe1025e5f5fe102595f5fe102545f5fe1024f5f5fe1024a5f5fe102455f5fe102405f5fe1023b5f5fe102365f5fe102315f5fe1022c5f5fe102275f5fe102225f5fe1021d5f5fe102185f5fe102135f5fe1020e5f5fe102095f5fe102045f5fe101ff5f5fe101fa5f5fe101f55f5fe101f05f5fe101eb5f5fe101e65f5fe101e15f5fe101dc5f5fe101d75f5fe101d25f5fe101cd5f5fe101c85f5fe101c35f5fe101be5f5fe101b95f5fe101b45f5fe101af5f5fe101aa5f5fe101a55f5fe101a05f5fe1019b5f5fe101965f5fe101915f5fe1018c5f5fe101875f5fe101825f5fe1017d5f5fe101785f5fe101735f5fe1016e5f5fe101695f5fe101645f5fe1015f5f5fe1015a5f5fe101555f5fe101505f5fe1014b5f5fe101465f5fe101415f5fe1013c5f5fe101375f5fe101325f5fe1012d5f5fe101285f5fe101235f5fe1011e5f5fe101195f5fe101145f5fe1010f5f5fe1010a5f5fe101055f5fe101005f5fe100fb5f5fe100f65f5fe100f15f5fe100ec5f5fe100e75f5fe100e25f5fe100dd5f5fe100d85f5fe100d35f5fe100ce5f5fe100c95f5fe100c45f5fe100bf5f5fe100ba5f5fe100b55f5fe100b05f5fe100ab5f5fe100a65f5fe100a15f5fe1009c5f5fe100975f5fe100925f5fe1008d5f5fe100885f5fe100835f5fe1007e5f5fe100795f5fe100745f5fe1006f5f5fe1006a5f5fe100655f5fe100605f5fe1005b5f5fe100565f5fe100515f5fe1004c5f5fe100475f5fe100425f5fe1003d5f5fe100385f5fe100335f5fe1002e5f5fe100295f5fe100245f5fe1001f5f5fe1001a5f5fe100155f5fe100105f5fe1000b5f5fe100065f5fe100015f00", + None, + id="valid_1023_rjumpis" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_swapn_stack_validation.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_swapn_stack_validation.py new file mode 100644 index 0000000000..37de35825f --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_swapn_stack_validation.py @@ -0,0 +1,105 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[1] * 20 + Op.SWAPN[0] + Op.STOP, max_stack_height=20), + ], + ) + , + "ef0001010004020001002b040000000080001460016001600160016001600160016001600160016001600160016001600160016001600160016001e70000", + None, + id="swapn_stack_validation_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[1] * 20 + Op.SWAPN[18] + Op.STOP, max_stack_height=20), + ], + ) + , + "ef0001010004020001002b040000000080001460016001600160016001600160016001600160016001600160016001600160016001600160016001e71200", + None, + id="swapn_stack_validation_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[1] * 20 + Op.SWAPN[19] + Op.STOP, max_stack_height=20), + ], + ) + , + "ef0001010004020001002b040000000080001460016001600160016001600160016001600160016001600160016001600160016001600160016001e71300", + EOFException.STACK_UNDERFLOW, + id="swapn_stack_validation_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH1[1] * 20 + Op.SWAPN[208] + Op.STOP, max_stack_height=20), + ], + ) + , + "ef0001010004020001002b040000000080001460016001600160016001600160016001600160016001600160016001600160016001600160016001e7d000", + EOFException.STACK_UNDERFLOW, + id="swapn_stack_validation_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH1[1] * 20 + Op.SWAPN[254] + Op.STOP, max_stack_height=20), + ], + ) + , + "ef0001010004020001002b040000000080001460016001600160016001600160016001600160016001600160016001600160016001600160016001e7fe00", + EOFException.STACK_UNDERFLOW, + id="swapn_stack_validation_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH1[1] * 20 + Op.SWAPN[255] + Op.STOP, max_stack_height=20), + ], + ) + , + "ef0001010004020001002b040000000080001460016001600160016001600160016001600160016001600160016001600160016001600160016001e7ff00", + EOFException.STACK_UNDERFLOW, + id="swapn_stack_validation_5" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_underflow.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_underflow.py new file mode 100644 index 0000000000..745227e936 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_underflow.py @@ -0,0 +1,85 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.ADD + Op.STOP, max_stack_height=0), + ], + ) + , + "ef0001010004020001000204000000008000000100", + EOFException.STACK_UNDERFLOW, + id="underflow_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=1), + Section.Code(code=Op.PUSH0 + Op.RETF, code_inputs=1, code_outputs=2, max_stack_height=2), + ], + ) + , + "ef000101000802000200040002040000000080000101020002e30001005fe4", + EOFException.STACK_UNDERFLOW, + id="underflow_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=2), + Section.Code(code=Op.JUMPF[2], code_outputs=2, max_stack_height=0), + Section.Code(code=Op.PUSH0 + Op.RETF, code_inputs=1, code_outputs=2, max_stack_height=2), + ], + ) + , + "ef000101000c02000300040003000204000000008000020002000001020002e3000100e500025fe4", + EOFException.STACK_UNDERFLOW, + id="underflow_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.JUMPF[1], max_stack_height=0), + Section.Code(code=Op.PUSH1[0] * 2 + Op.REVERT, code_inputs=1, max_stack_height=3), + ], + ) + , + "ef000101000802000200030005040000000080000001800003e5000160006000fd", + EOFException.STACK_UNDERFLOW, + id="underflow_3" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_underflow_variable_stack.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_underflow_variable_stack.py new file mode 100644 index 0000000000..0070232415 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_underflow_variable_stack.py @@ -0,0 +1,123 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.LOG2 + Op.STOP, max_stack_height=3), + ], + ) + , + "ef0001010004020001000a04000000008000035f6000e100025f5fa200", + EOFException.STACK_UNDERFLOW, + id="underflow_variable_stack_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.ADD + Op.STOP, max_stack_height=3), + ], + ) + , + "ef0001010004020001000a04000000008000035f6000e100025f5f0100", + EOFException.STACK_UNDERFLOW, + id="underflow_variable_stack_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.CALLF[1] + Op.STOP, max_stack_height=4), + Section.Code(code=Op.PUSH0 + Op.RETF, code_inputs=4, code_outputs=5, max_stack_height=5), + ], + ) + , + "ef0001010008020002000c00020400000000800004040500055f6000e100025f5fe30001005fe4", + EOFException.STACK_UNDERFLOW, + id="underflow_variable_stack_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.CALLF[1] + Op.STOP, max_stack_height=4), + Section.Code(code=Op.PUSH0 + Op.RETF, code_inputs=3, code_outputs=4, max_stack_height=4), + ], + ) + , + "ef0001010008020002000c00020400000000800004030400045f6000e100025f5fe30001005fe4", + EOFException.STACK_UNDERFLOW, + id="underflow_variable_stack_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=3), + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.JUMPF[2], code_outputs=3, max_stack_height=3), + Section.Code(code=Op.POP * 2 + Op.RETF, code_inputs=5, code_outputs=3, max_stack_height=3), + ], + ) + , + "ef000101000c0200030004000b000304000000008000030003000305030003e30001005f6000e100025f5fe500025050e4", + EOFException.STACK_UNDERFLOW, + id="underflow_variable_stack_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.JUMPF[1], max_stack_height=0), + Section.Code(code=Op.PUSH1[0] * 2 + Op.REVERT, code_inputs=5, max_stack_height=7), + ], + ) + , + "ef0001010008020002000b00050400000000800000058000075f6000e100025f5fe5000160006000fd", + EOFException.STACK_UNDERFLOW, + id="underflow_variable_stack_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH0 + Op.PUSH1[0] + Op.RJUMPI[2] + Op.PUSH0 * 2 + Op.JUMPF[1], max_stack_height=0), + Section.Code(code=Op.PUSH1[0] * 2 + Op.REVERT, code_inputs=3, max_stack_height=5), + ], + ) + , + "ef0001010008020002000b00050400000000800000038000055f6000e100025f5fe5000160006000fd", + EOFException.STACK_UNDERFLOW, + id="underflow_variable_stack_6" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_unreachable_instructions.py b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_unreachable_instructions.py new file mode 100644 index 0000000000..3c72fdb410 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip5450_stack_validation/test_unreachable_instructions.py @@ -0,0 +1,45 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-5450.md" +REFERENCE_SPEC_VERSION = "9c7c91bf7b9b7af9e76248f7921a03ddc17f99ef" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.RJUMP[1] + Op.STOP + Op.RJUMP[-4], max_stack_height=0), + ], + ) + , + "ef000101000402000100070400000000800000e0000100e0fffc", + EOFException.UNREACHABLE_INSTRUCTIONS, + id="unreachable_instructions_2" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_eof1_code_section_offset.py b/tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_eof1_code_section_offset.py new file mode 100644 index 0000000000..54effbb7e6 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_eof1_code_section_offset.py @@ -0,0 +1,47 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-6206.md" +REFERENCE_SPEC_VERSION = "c97849460824210bc5db0b00af87aaa0b5a07346" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.JUMPF[1], max_stack_height=0), + Section.Code(code=Op.INVALID, max_stack_height=0), + Section.Data(data="00000000") + ], + ) + , + "ef000101000802000200030001040004000080000000800000e50001fe00000000", + None, + id="eof1_code_section_offset_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_compatible_outputs.py b/tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_compatible_outputs.py new file mode 100644 index 0000000000..e4ee805137 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_compatible_outputs.py @@ -0,0 +1,47 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-6206.md" +REFERENCE_SPEC_VERSION = "c97849460824210bc5db0b00af87aaa0b5a07346" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=5), + Section.Code(code=Op.PUSH0 * 2 + Op.JUMPF[2], code_outputs=5, max_stack_height=2), + Section.Code(code=Op.PUSH0 * 3 + Op.RETF, code_outputs=3, max_stack_height=3), + ], + ) + , + "ef000101000c02000300040005000404000000008000050005000200030003e30001005f5fe500025f5f5fe4", + None, + id="jumpf_compatible_outputs_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_equal_outputs.py b/tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_equal_outputs.py new file mode 100644 index 0000000000..c4ff0186e3 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_equal_outputs.py @@ -0,0 +1,47 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-6206.md" +REFERENCE_SPEC_VERSION = "c97849460824210bc5db0b00af87aaa0b5a07346" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=3), + Section.Code(code=Op.JUMPF[2], code_outputs=3, max_stack_height=0), + Section.Code(code=Op.PUSH0 * 3 + Op.RETF, code_outputs=3, max_stack_height=3), + ], + ) + , + "ef000101000c02000300040003000404000000008000030003000000030003e3000100e500025f5f5fe4", + None, + id="jumpf_equal_outputs_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_incompatible_outputs.py b/tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_incompatible_outputs.py new file mode 100644 index 0000000000..38ea947bdd --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_incompatible_outputs.py @@ -0,0 +1,47 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-6206.md" +REFERENCE_SPEC_VERSION = "c97849460824210bc5db0b00af87aaa0b5a07346" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=3), + Section.Code(code=Op.JUMPF[2], code_outputs=3, max_stack_height=0), + Section.Code(code=Op.PUSH0 * 5 + Op.RETF, code_outputs=5, max_stack_height=3), + ], + ) + , + "ef000101000c02000300040003000604000000008000030003000000050003e3000100e500025f5f5f5f5fe4", + EOFException.JUMPF_DESTINATION_INCOMPATIBLE_OUTPUTS, + id="jumpf_incompatible_outputs_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7480_data_section/test_dataloadn.py b/tests/osaka/eip7692_eof_v1/eip7480_data_section/test_dataloadn.py new file mode 100644 index 0000000000..521cc4ef6d --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7480_data_section/test_dataloadn.py @@ -0,0 +1,136 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7480.md" +REFERENCE_SPEC_VERSION = "d1cafe61fa83c0f2a752bb0aaf220cd0d20bca98" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.DATALOADN[0] + Op.POP + Op.STOP, max_stack_height=1), + Section.Data(data="0000000000000000111111111111111122222222222222223333333333333333") + ], + ) + , + "ef000101000402000100050400200000800001d1000050000000000000000000111111111111111122222222222222223333333333333333", + None, + id="dataloadn_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.DATALOADN[1] + Op.POP + Op.STOP, max_stack_height=1), + Section.Data(data="000000000000000011111111111111112222222222222222333333333333333344") + ], + ) + , + "ef000101000402000100050400210000800001d100015000000000000000000011111111111111112222222222222222333333333333333344", + None, + id="dataloadn_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.DATALOADN[32] + Op.POP + Op.STOP, max_stack_height=1), + Section.Data(data="00000000000000001111111111111111222222222222222233333333333333330000000000000000111111111111111122222222222222223333333333333333") + ], + ) + , + "ef000101000402000100050400400000800001d10020500000000000000000001111111111111111222222222222222233333333333333330000000000000000111111111111111122222222222222223333333333333333", + None, + id="dataloadn_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.DATALOADN[0] + Op.POP + Op.STOP, max_stack_height=1), + ], + ) + , + "ef000101000402000100050400000000800001d100005000", + EOFException.INVALID_DATALOADN_INDEX, + id="dataloadn_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.DATALOADN[1] + Op.POP + Op.STOP, max_stack_height=1), + Section.Data(data="00") + ], + ) + , + "ef000101000402000100050400010000800001d10001500000", + EOFException.INVALID_DATALOADN_INDEX, + id="dataloadn_4" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.DATALOADN[32] + Op.POP + Op.STOP, max_stack_height=1), + Section.Data(data="0000000000000000111111111111111122222222222222223333333333333333") + ], + ) + , + "ef000101000402000100050400200000800001d1002050000000000000000000111111111111111122222222222222223333333333333333", + EOFException.INVALID_DATALOADN_INDEX, + id="dataloadn_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.DATALOADN[-1] + Op.POP + Op.STOP, max_stack_height=1), + Section.Data(data="0000000000000000111111111111111122222222222222223333333333333333") + ], + ) + , + "ef000101000402000100050400200000800001d1ffff50000000000000000000111111111111111122222222222222223333333333333333", + EOFException.INVALID_DATALOADN_INDEX, + id="dataloadn_6" + ), + pytest.param( + Container( + name = 'EOFV1_0008', + sections = [ + Section.Code(code=Op.DATALOADN[32] + Op.POP + Op.STOP, max_stack_height=1), + Section.Data(data="000000000000000011111111111111112222222222222222333333333333333300000000000000001111111111111111222222222222222233333333333333") + ], + ) + , + "ef0001010004020001000504003f0000800001d100205000000000000000000011111111111111112222222222222222333333333333333300000000000000001111111111111111222222222222222233333333333333", + EOFException.INVALID_DATALOADN_INDEX, + id="dataloadn_7" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7480_data_section/test_eof1_dataloadn_truncated.py b/tests/osaka/eip7692_eof_v1/eip7480_data_section/test_eof1_dataloadn_truncated.py new file mode 100644 index 0000000000..4811400b95 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7480_data_section/test_eof1_dataloadn_truncated.py @@ -0,0 +1,57 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7480.md" +REFERENCE_SPEC_VERSION = "d1cafe61fa83c0f2a752bb0aaf220cd0d20bca98" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=[0xd1], max_stack_height=0), + ], + ) + , + "ef000101000402000100010400000000800000d1", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_dataloadn_truncated_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=[0xd1, 0x00], max_stack_height=0), + ], + ) + , + "ef000101000402000100020400000000800000d100", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_dataloadn_truncated_1" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_embedded_container.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_embedded_container.py new file mode 100644 index 0000000000..6ebcc0471a --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_embedded_container.py @@ -0,0 +1,180 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section, ContainerKind + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +# Max number (256) of container sections +bytecode = None +for i in range(0, 256): + if bytecode: + bytecode += Op.PUSH1[0] * 4 + Op.EOFCREATE[i] + Op.POP + else: + bytecode = Op.PUSH1[0] * 4 + Op.EOFCREATE[i] + Op.POP +bytecode += Op.STOP + +code = Section.Code(code=bytecode) +subcontainer = Container( + name="EOFV1_MINCONTAINER", + sections=[ + Section.Code(code=Op.INVALID), + ] + ) + +eof1_embedded_container_6 = Container( + name = "EOFV1_0006", + sections = [code] + [Section.Container(container=subcontainer)] * 256 +) + + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[2] + Op.PUSH1[0] + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container( + container=Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x04, 0x00, 0x02, # Data Length: 2 + 0x00, # Terminator + # Code Section 0 types + 0x00, # Inputs: 0 + 0x80, # Outputs: 0 (Non-returning function) + 0x00, 0x00, # Max Stack Height: 0 + + # Code Section 0 + 0xfe, # [0] INVALID + # Empty Data Section (Truncated: 0 != 2) + ]), + ) + ), + + ], + kind=ContainerKind.INITCODE + ) + , + "ef000101000402000100060300010014040000000080000260026000ee00ef000101000402000100010400020000800000fe", + None, + id="eof1_embedded_container_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[1] + Op.PUSH1[0] + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container( + container=Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x04, 0x00, 0x02, # Data Length: 2 + 0x00, # Terminator + # Code Section 0 types + 0x00, # Inputs: 0 + 0x80, # Outputs: 0 (Non-returning function) + 0x00, 0x00, # Max Stack Height: 0 + + # Code Section 0 + 0xfe, # [0] INVALID + # Data Section (Truncated: 1 != 2) + 0xaa + ]), + ) + ), + + ], + kind=ContainerKind.INITCODE + ) + , + "ef000101000402000100060300010015040000000080000260016000ee00ef000101000402000100010400020000800000feaa", + None, + id="eof1_embedded_container_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0004_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), Section.Data(data="aabb") + + ], + ) + , + "ef0001010004020001000b030001001404000200008000046000600060006000ec0000ef000101000402000100010400000000800000feaabb", + None, + id="eof1_embedded_container_3" + ), + pytest.param( + Container( + name = 'EOFV1_0006', + sections = [ + Section.Code(code=Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.POP + Op.PUSH1[0] * 4 + Op.EOFCREATE[1] + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0006_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), Section.Container(container=Container( + name = 'EOFV1_0006_D1I1', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.REVERT, max_stack_height=2), + ], + ) + ), + ], + ) + , + "ef000101000402000100160300020014001804000000008000046000600060006000ec00506000600060006000ec0100ef000101000402000100010400000000800000feef00010100040200010005040000000080000260006000fd", + None, + id="eof1_embedded_container_5" + ), + pytest.param( + eof1_embedded_container_6, + "ef00010100040200010b01030100001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001404000000008000046000600060006000ec00506000600060006000ec01506000600060006000ec02506000600060006000ec03506000600060006000ec04506000600060006000ec05506000600060006000ec06506000600060006000ec07506000600060006000ec08506000600060006000ec09506000600060006000ec0a506000600060006000ec0b506000600060006000ec0c506000600060006000ec0d506000600060006000ec0e506000600060006000ec0f506000600060006000ec10506000600060006000ec11506000600060006000ec12506000600060006000ec13506000600060006000ec14506000600060006000ec15506000600060006000ec16506000600060006000ec17506000600060006000ec18506000600060006000ec19506000600060006000ec1a506000600060006000ec1b506000600060006000ec1c506000600060006000ec1d506000600060006000ec1e506000600060006000ec1f506000600060006000ec20506000600060006000ec21506000600060006000ec22506000600060006000ec23506000600060006000ec24506000600060006000ec25506000600060006000ec26506000600060006000ec27506000600060006000ec28506000600060006000ec29506000600060006000ec2a506000600060006000ec2b506000600060006000ec2c506000600060006000ec2d506000600060006000ec2e506000600060006000ec2f506000600060006000ec30506000600060006000ec31506000600060006000ec32506000600060006000ec33506000600060006000ec34506000600060006000ec35506000600060006000ec36506000600060006000ec37506000600060006000ec38506000600060006000ec39506000600060006000ec3a506000600060006000ec3b506000600060006000ec3c506000600060006000ec3d506000600060006000ec3e506000600060006000ec3f506000600060006000ec40506000600060006000ec41506000600060006000ec42506000600060006000ec43506000600060006000ec44506000600060006000ec45506000600060006000ec46506000600060006000ec47506000600060006000ec48506000600060006000ec49506000600060006000ec4a506000600060006000ec4b506000600060006000ec4c506000600060006000ec4d506000600060006000ec4e506000600060006000ec4f506000600060006000ec50506000600060006000ec51506000600060006000ec52506000600060006000ec53506000600060006000ec54506000600060006000ec55506000600060006000ec56506000600060006000ec57506000600060006000ec58506000600060006000ec59506000600060006000ec5a506000600060006000ec5b506000600060006000ec5c506000600060006000ec5d506000600060006000ec5e506000600060006000ec5f506000600060006000ec60506000600060006000ec61506000600060006000ec62506000600060006000ec63506000600060006000ec64506000600060006000ec65506000600060006000ec66506000600060006000ec67506000600060006000ec68506000600060006000ec69506000600060006000ec6a506000600060006000ec6b506000600060006000ec6c506000600060006000ec6d506000600060006000ec6e506000600060006000ec6f506000600060006000ec70506000600060006000ec71506000600060006000ec72506000600060006000ec73506000600060006000ec74506000600060006000ec75506000600060006000ec76506000600060006000ec77506000600060006000ec78506000600060006000ec79506000600060006000ec7a506000600060006000ec7b506000600060006000ec7c506000600060006000ec7d506000600060006000ec7e506000600060006000ec7f506000600060006000ec80506000600060006000ec81506000600060006000ec82506000600060006000ec83506000600060006000ec84506000600060006000ec85506000600060006000ec86506000600060006000ec87506000600060006000ec88506000600060006000ec89506000600060006000ec8a506000600060006000ec8b506000600060006000ec8c506000600060006000ec8d506000600060006000ec8e506000600060006000ec8f506000600060006000ec90506000600060006000ec91506000600060006000ec92506000600060006000ec93506000600060006000ec94506000600060006000ec95506000600060006000ec96506000600060006000ec97506000600060006000ec98506000600060006000ec99506000600060006000ec9a506000600060006000ec9b506000600060006000ec9c506000600060006000ec9d506000600060006000ec9e506000600060006000ec9f506000600060006000eca0506000600060006000eca1506000600060006000eca2506000600060006000eca3506000600060006000eca4506000600060006000eca5506000600060006000eca6506000600060006000eca7506000600060006000eca8506000600060006000eca9506000600060006000ecaa506000600060006000ecab506000600060006000ecac506000600060006000ecad506000600060006000ecae506000600060006000ecaf506000600060006000ecb0506000600060006000ecb1506000600060006000ecb2506000600060006000ecb3506000600060006000ecb4506000600060006000ecb5506000600060006000ecb6506000600060006000ecb7506000600060006000ecb8506000600060006000ecb9506000600060006000ecba506000600060006000ecbb506000600060006000ecbc506000600060006000ecbd506000600060006000ecbe506000600060006000ecbf506000600060006000ecc0506000600060006000ecc1506000600060006000ecc2506000600060006000ecc3506000600060006000ecc4506000600060006000ecc5506000600060006000ecc6506000600060006000ecc7506000600060006000ecc8506000600060006000ecc9506000600060006000ecca506000600060006000eccb506000600060006000eccc506000600060006000eccd506000600060006000ecce506000600060006000eccf506000600060006000ecd0506000600060006000ecd1506000600060006000ecd2506000600060006000ecd3506000600060006000ecd4506000600060006000ecd5506000600060006000ecd6506000600060006000ecd7506000600060006000ecd8506000600060006000ecd9506000600060006000ecda506000600060006000ecdb506000600060006000ecdc506000600060006000ecdd506000600060006000ecde506000600060006000ecdf506000600060006000ece0506000600060006000ece1506000600060006000ece2506000600060006000ece3506000600060006000ece4506000600060006000ece5506000600060006000ece6506000600060006000ece7506000600060006000ece8506000600060006000ece9506000600060006000ecea506000600060006000eceb506000600060006000ecec506000600060006000eced506000600060006000ecee506000600060006000ecef506000600060006000ecf0506000600060006000ecf1506000600060006000ecf2506000600060006000ecf3506000600060006000ecf4506000600060006000ecf5506000600060006000ecf6506000600060006000ecf7506000600060006000ecf8506000600060006000ecf9506000600060006000ecfa506000600060006000ecfb506000600060006000ecfc506000600060006000ecfd506000600060006000ecfe506000600060006000ecff5000ef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000fe", + None, + id="eof1_embedded_container_6" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_embedded_container_invalid.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_embedded_container_invalid.py new file mode 100644 index 0000000000..a01d20fd87 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_embedded_container_invalid.py @@ -0,0 +1,240 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +# Too many subcontainers (257) +raw_container = Container( + name="RAW_CONTAINER", + raw_bytes=[ + 0x00, # Op.STOP + ] +) + +eof1_embedded_container_invalid_8 = Container( + name="EOFV1_0009", + sections = [Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[0] + Op.STOP)] + + [Section.Container(container=raw_container)] * 257 +) + + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x06, # Code Section 0 (Length: 6) + #--- Error: Invalid Container Header ---# + 0x03, + ]), + ) + , + "ef0001010004020001000603", + EOFException.INCOMPLETE_SECTION_NUMBER, + id="eof1_embedded_container_invalid_0" + ), + pytest.param( + Container( + name="EOFV1_0002", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x06, # Code Section 0 (Length: 6) + #--- Error: Invalid Container Header ---# + 0x03, + 0x00, + ]), + ) + , + "ef000101000402000100060300", + EOFException.INCOMPLETE_SECTION_NUMBER, + id="eof1_embedded_container_invalid_1" + ), + pytest.param( + Container( + name="EOFV1_0003", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x06, # Code Section 0 (Length: 6) + #--- Error: Invalid Container Header ---# + 0x03, + 0x00, + 0x01, + ]), + ) + , + "ef00010100040200010006030001", + EOFException.MISSING_HEADERS_TERMINATOR, + id="eof1_embedded_container_invalid_2" + ), + pytest.param( + Container( + name="EOFV1_0004", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x06, # Code Section 0 (Length: 6) + #--- Error: Invalid Container Header ---# + 0x03, + 0x00, + 0x01, + 0x00, + ]), + ) + , + "ef0001010004020001000603000100", + EOFException.INCOMPLETE_SECTION_SIZE, + id="eof1_embedded_container_invalid_3" + ), + pytest.param( + Container( + name="EOFV1_0005", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x06, # Code Section 0 (Length: 6) + 0x03, 0x00, 0x01, # Container Sections (Length: 1) + 0x00, 0x14, # Container Section 0 (Length: 20) + #--- Error: Invalid Data Header ---# + + ]), + ) + , + "ef000101000402000100060300010014", + EOFException.MISSING_HEADERS_TERMINATOR, + id="eof1_embedded_container_invalid_4" + ), + pytest.param( + Container( + name="EOFV1_0006", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x06, # Code Section 0 (Length: 6) + #--- Error: Invalid Container Header ---# + 0x03, + 0x00, + 0x00, + 0x04, + 0x00, + 0x00, + 0x00, + 0x00, + 0x80, + 0x00, + 0x01, + 0x60, + 0x00, + 0xe1, + 0x00, + 0x00, + 0x00, + ]), + ) + , + "ef0001010004020001000603000004000000008000016000e1000000", + EOFException.ZERO_SECTION_SIZE, + id="eof1_embedded_container_invalid_5" + ), + pytest.param( + Container( + name = 'EOFV1_0007', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[0] + Op.STOP, max_stack_height=1), + Section.Container( + container=Container( + name="EOFV1_0001", + raw_bytes=( + [ + #--- Error found: Empty code ---# + + ]), + ) + ), + + ], + ) + , + "ef00010100040200010006030001000004000000008000016000e1000000", + EOFException.ZERO_SECTION_SIZE, + id="eof1_embedded_container_invalid_6" + ), + pytest.param( + Container( + name="EOFV1_0008", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x06, # Code Section 0 (Length: 6) + 0x03, 0x00, 0x01, # Container Sections (Length: 1) + 0x00, 0x14, # Container Section 0 (Length: 20) + 0x04, 0x00, 0x00, # Data Length: 0 + 0x00, # Terminator + # Code Section 0 types + 0x00, # Inputs: 0 + 0x80, # Outputs: 0 (Non-returning function) + 0x00, 0x01, # Max Stack Height: 1 + + # Code Section 0 + 0x60, 0x00, # [0] PUSH1(0) + 0xe1, 0x00, 0x00, # [2] RJUMPI(0) + 0x00, # [5] STOP + #--- Error: Invalid Container Content ---# + + ]), + ) + , + "ef00010100040200010006030001001404000000008000016000e1000000", + EOFException.INVALID_SECTION_BODIES_SIZE, + id="eof1_embedded_container_invalid_7" + ), + pytest.param( + eof1_embedded_container_invalid_8, + "ef000101000402000100060301010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000104000000008000016000e10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + EOFException.TOO_MANY_CONTAINER_SECTIONS, + id="eof1_embedded_container_invalid_8" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_eofcreate_invalid.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_eofcreate_invalid.py new file mode 100644 index 0000000000..77d4d068b2 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_eofcreate_invalid.py @@ -0,0 +1,144 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section, ContainerKind + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +# Truncated EOFCREATE at the end +eof1_eofcreate_invalid_0 = Container( + name="EOFV1_0001", + sections=[ + Section.Code(code=Op.PUSH1[0] + Op.PUSH1[0xff] + Op.PUSH1[0] * 2 + Op.EOFCREATE), + Section.Container(container=Container(name="EOFV1_MINCONTAINER", sections=[Section.Code(code=Op.INVALID)])), + ], + kind=ContainerKind.RUNTIME, +) + + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + eof1_eofcreate_invalid_0, + "ef0001010004020001000903000100140400000000800004600060ff60006000ecef000101000402000100010400000000800000fe", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_eofcreate_invalid_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.PUSH1[255] + Op.PUSH1[0] * 2 + Op.EOFCREATE[0], max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0002_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + ) + , + "ef0001010004020001000a03000100140400000000800004600060ff60006000ec00ef000101000402000100010400000000800000fe", + EOFException.MISSING_STOP_OPCODE, + id="eof1_eofcreate_invalid_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.PUSH1[255] + Op.PUSH1[0] * 2 + Op.EOFCREATE[1] + Op.POP + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0003_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + ) + , + "ef0001010004020001000c03000100140400000000800004600060ff60006000ec015000ef000101000402000100010400000000800000fe", + EOFException.INVALID_CONTAINER_SECTION_INDEX, + id="eof1_eofcreate_invalid_2" + ), + pytest.param( + Container( + name = 'EOFV1_0004', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.PUSH1[255] + Op.PUSH1[0] * 2 + Op.EOFCREATE[255] + Op.POP + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0004_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + ) + , + "ef0001010004020001000c03000100140400000000800004600060ff60006000ecff5000ef000101000402000100010400000000800000fe", + EOFException.INVALID_CONTAINER_SECTION_INDEX, + id="eof1_eofcreate_invalid_3" + ), + pytest.param( + Container( + name = 'EOFV1_0005', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.PUSH1[255] + Op.PUSH1[0] * 2 + Op.EOFCREATE[0] + Op.POP + Op.STOP, max_stack_height=4), + Section.Container( + container=Container( + name="EOFV1_0001", + raw_bytes=( + [ + 0xef, 0x00, 0x01, # Version: 1 + 0x01, 0x00, 0x04, # Types Length: 4 + 0x02, 0x00, 0x01, # Code Sections (Length: 1) + 0x00, 0x01, # Code Section 0 (Length: 1) + 0x04, 0x00, 0x03, # Data Length: 3 + 0x00, # Terminator + # Code Section 0 types + 0x00, # Inputs: 0 + 0x80, # Outputs: 0 (Non-returning function) + 0x00, 0x00, # Max Stack Height: 0 + + # Code Section 0 + 0xfe, # [0] INVALID + # Data Section (Truncated: 2 != 3) + 0xaa, + 0xbb + ]), + ) + ), + + ], + ) + , + "ef0001010004020001000c03000100160400000000800004600060ff60006000ec005000ef000101000402000100010400030000800000feaabb", + EOFException.EOF_CREATE_WITH_TRUNCATED_CONTAINER, + id="eof1_eofcreate_invalid_4" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_eofcreate_valid.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_eofcreate_valid.py new file mode 100644 index 0000000000..0c7bc4bbd4 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_eofcreate_valid.py @@ -0,0 +1,88 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +# initcontainer index 0..255 +bytecode = None +for i in range(0, 256): + if bytecode: + bytecode += Op.CALLDATASIZE + Op.PUSH1[0] * 3 + Op.EOFCREATE[i] + Op.POP + else: + bytecode = Op.CALLDATASIZE + Op.PUSH1[0] * 3 + Op.EOFCREATE[i] + Op.POP +bytecode += Op.STOP + +code = Section.Code(code=bytecode) +subcontainer = Container( + name="EOFV1_MINCONTAINER", + sections=[ + Section.Code(code=Op.INVALID), + ] + ) + +eof1_eofcreate_valid_2 = Container( + name = "EOFV1_0003", + sections = [code] + + [Section.Container(container=subcontainer)] * 256 +) + + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.CALLDATASIZE + Op.PUSH1[0] + Op.PUSH1[255] + Op.PUSH1[0] + Op.EOFCREATE[0] + Op.POP + Op.CALLDATASIZE + Op.PUSH1[0] + Op.PUSH1[254] + Op.PUSH1[0] + Op.EOFCREATE[1] + Op.POP + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0002_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), Section.Container(container=Container( + name = 'EOFV1_0002_D1I1', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + ) + , + "ef0001010004020001001503000200140014040000000080000436600060ff6000ec005036600060fe6000ec015000ef000101000402000100010400000000800000feef000101000402000100010400000000800000fe", + None, + id="eof1_eofcreate_valid_1" + ), + pytest.param( + eof1_eofcreate_valid_2, + "ef00010100040200010a010301000014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014001400140014040000000080000436600060006000ec005036600060006000ec015036600060006000ec025036600060006000ec035036600060006000ec045036600060006000ec055036600060006000ec065036600060006000ec075036600060006000ec085036600060006000ec095036600060006000ec0a5036600060006000ec0b5036600060006000ec0c5036600060006000ec0d5036600060006000ec0e5036600060006000ec0f5036600060006000ec105036600060006000ec115036600060006000ec125036600060006000ec135036600060006000ec145036600060006000ec155036600060006000ec165036600060006000ec175036600060006000ec185036600060006000ec195036600060006000ec1a5036600060006000ec1b5036600060006000ec1c5036600060006000ec1d5036600060006000ec1e5036600060006000ec1f5036600060006000ec205036600060006000ec215036600060006000ec225036600060006000ec235036600060006000ec245036600060006000ec255036600060006000ec265036600060006000ec275036600060006000ec285036600060006000ec295036600060006000ec2a5036600060006000ec2b5036600060006000ec2c5036600060006000ec2d5036600060006000ec2e5036600060006000ec2f5036600060006000ec305036600060006000ec315036600060006000ec325036600060006000ec335036600060006000ec345036600060006000ec355036600060006000ec365036600060006000ec375036600060006000ec385036600060006000ec395036600060006000ec3a5036600060006000ec3b5036600060006000ec3c5036600060006000ec3d5036600060006000ec3e5036600060006000ec3f5036600060006000ec405036600060006000ec415036600060006000ec425036600060006000ec435036600060006000ec445036600060006000ec455036600060006000ec465036600060006000ec475036600060006000ec485036600060006000ec495036600060006000ec4a5036600060006000ec4b5036600060006000ec4c5036600060006000ec4d5036600060006000ec4e5036600060006000ec4f5036600060006000ec505036600060006000ec515036600060006000ec525036600060006000ec535036600060006000ec545036600060006000ec555036600060006000ec565036600060006000ec575036600060006000ec585036600060006000ec595036600060006000ec5a5036600060006000ec5b5036600060006000ec5c5036600060006000ec5d5036600060006000ec5e5036600060006000ec5f5036600060006000ec605036600060006000ec615036600060006000ec625036600060006000ec635036600060006000ec645036600060006000ec655036600060006000ec665036600060006000ec675036600060006000ec685036600060006000ec695036600060006000ec6a5036600060006000ec6b5036600060006000ec6c5036600060006000ec6d5036600060006000ec6e5036600060006000ec6f5036600060006000ec705036600060006000ec715036600060006000ec725036600060006000ec735036600060006000ec745036600060006000ec755036600060006000ec765036600060006000ec775036600060006000ec785036600060006000ec795036600060006000ec7a5036600060006000ec7b5036600060006000ec7c5036600060006000ec7d5036600060006000ec7e5036600060006000ec7f5036600060006000ec805036600060006000ec815036600060006000ec825036600060006000ec835036600060006000ec845036600060006000ec855036600060006000ec865036600060006000ec875036600060006000ec885036600060006000ec895036600060006000ec8a5036600060006000ec8b5036600060006000ec8c5036600060006000ec8d5036600060006000ec8e5036600060006000ec8f5036600060006000ec905036600060006000ec915036600060006000ec925036600060006000ec935036600060006000ec945036600060006000ec955036600060006000ec965036600060006000ec975036600060006000ec985036600060006000ec995036600060006000ec9a5036600060006000ec9b5036600060006000ec9c5036600060006000ec9d5036600060006000ec9e5036600060006000ec9f5036600060006000eca05036600060006000eca15036600060006000eca25036600060006000eca35036600060006000eca45036600060006000eca55036600060006000eca65036600060006000eca75036600060006000eca85036600060006000eca95036600060006000ecaa5036600060006000ecab5036600060006000ecac5036600060006000ecad5036600060006000ecae5036600060006000ecaf5036600060006000ecb05036600060006000ecb15036600060006000ecb25036600060006000ecb35036600060006000ecb45036600060006000ecb55036600060006000ecb65036600060006000ecb75036600060006000ecb85036600060006000ecb95036600060006000ecba5036600060006000ecbb5036600060006000ecbc5036600060006000ecbd5036600060006000ecbe5036600060006000ecbf5036600060006000ecc05036600060006000ecc15036600060006000ecc25036600060006000ecc35036600060006000ecc45036600060006000ecc55036600060006000ecc65036600060006000ecc75036600060006000ecc85036600060006000ecc95036600060006000ecca5036600060006000eccb5036600060006000eccc5036600060006000eccd5036600060006000ecce5036600060006000eccf5036600060006000ecd05036600060006000ecd15036600060006000ecd25036600060006000ecd35036600060006000ecd45036600060006000ecd55036600060006000ecd65036600060006000ecd75036600060006000ecd85036600060006000ecd95036600060006000ecda5036600060006000ecdb5036600060006000ecdc5036600060006000ecdd5036600060006000ecde5036600060006000ecdf5036600060006000ece05036600060006000ece15036600060006000ece25036600060006000ece35036600060006000ece45036600060006000ece55036600060006000ece65036600060006000ece75036600060006000ece85036600060006000ece95036600060006000ecea5036600060006000eceb5036600060006000ecec5036600060006000eced5036600060006000ecee5036600060006000ecef5036600060006000ecf05036600060006000ecf15036600060006000ecf25036600060006000ecf35036600060006000ecf45036600060006000ecf55036600060006000ecf65036600060006000ecf75036600060006000ecf85036600060006000ecf95036600060006000ecfa5036600060006000ecfb5036600060006000ecfc5036600060006000ecfd5036600060006000ecfe5036600060006000ecff5000ef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000feef000101000402000100010400000000800000fe", + None, + id="eof1_eofcreate_valid_2" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_returncontract_invalid.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_returncontract_invalid.py new file mode 100644 index 0000000000..513df0ac91 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_returncontract_invalid.py @@ -0,0 +1,93 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section, ContainerKind + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=[0x60, 0x00, 0x60, 0x00, 0xee], max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0001_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + kind=ContainerKind.INITCODE + ) + , + "ef000101000402000100050300010014040000000080000460006000eeef000101000402000100010400000000800000fe", + EOFException.TRUNCATED_INSTRUCTION, + id="eof1_returncontract_invalid_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[1], max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0002_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + kind=ContainerKind.INITCODE + ) + , + "ef000101000402000100060300010014040000000080000460006000ee01ef000101000402000100010400000000800000fe", + EOFException.INVALID_CONTAINER_SECTION_INDEX, + id="eof1_returncontract_invalid_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[255], max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0003_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + kind=ContainerKind.INITCODE + ) + , + "ef000101000402000100060300010014040000000080000460006000eeffef000101000402000100010400000000800000fe", + EOFException.INVALID_CONTAINER_SECTION_INDEX, + id="eof1_returncontract_invalid_2" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_returncontract_valid.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_returncontract_valid.py new file mode 100644 index 0000000000..ff2614631c --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_returncontract_valid.py @@ -0,0 +1,59 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section, ContainerKind + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0002_D1I0', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container(container=Container( + name = 'EOFV1_0002_D2I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + ) + ), + ], + ) + , + "ef0001010004020001000b030001003204000000008000046000600060006000ec0000ef000101000402000100060300010014040000000080000260006000ee00ef000101000402000100010400000000800000fe", + None, + id="eof1_returncontract_valid_1" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_trailing_bytes_in_subcontainer.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_trailing_bytes_in_subcontainer.py new file mode 100644 index 0000000000..433a8595e7 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_trailing_bytes_in_subcontainer.py @@ -0,0 +1,81 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +min_container = Container( + name="EOFV1_MINCONTAINER", + sections=[ + Section.Code(code=Op.INVALID), + ] +) + +invalid_subcontainer_0 = bytes(min_container) + b"\xde\xad\xbe\xef" # Add some trailing bytes + +eof1_trailing_bytes_in_subcontainer_0 = Container( + name="EOFV1_0000", + sections=[ + Section.Code(Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.STOP, max_stack_height=4), + Section.Container(container=Container(name="EOFV1_0000_D1I0", raw_bytes=invalid_subcontainer_0)), + ], +) + +min_container_with_data = Container( + name="EOFV1_MINCONTAINER", + sections=[ + Section.Code(code=Op.INVALID), + Section.Data(data="aabb"), + ] +) + +invalid_subcontainer_1 = bytes(min_container_with_data) + b"\xde\xad\xbe\xef" # Add some trailing bytes + +eof1_trailing_bytes_in_subcontainer_1 = Container( + name="EOFV1_0001", + sections=[ + Section.Code(Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.STOP, max_stack_height=4), + Section.Container(container=Container(name="EOFV1_0001_D1I0", raw_bytes=invalid_subcontainer_1)), + ], +) + + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + eof1_trailing_bytes_in_subcontainer_0, + "ef0001010004020001000b030001001804000000008000046000600060006000ec0000ef000101000402000100010400000000800000fedeadbeef", + EOFException.INVALID_SECTION_BODIES_SIZE, + id="eof1_trailing_bytes_in_subcontainer_0" + ), + pytest.param( + eof1_trailing_bytes_in_subcontainer_1, + "ef0001010004020001000b030001001a04000000008000046000600060006000ec0000ef000101000402000100010400020000800000feaabbdeadbeef", + EOFException.INVALID_SECTION_BODIES_SIZE, + id="eof1_trailing_bytes_in_subcontainer_1" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_unreferenced_subcontainer_invalid.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_unreferenced_subcontainer_invalid.py new file mode 100644 index 0000000000..f54821da7a --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eof1_unreferenced_subcontainer_invalid.py @@ -0,0 +1,52 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.STOP, max_stack_height=0), + Section.Container(container=Container( + name = 'EOFV1_0001_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + ) + , + "ef000101000402000100010300010014040000000080000000ef000101000402000100010400000000800000fe", + EOFException.ORPHAN_SUBCONTAINER, + id="eof1_unreferenced_subcontainer_invalid_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eofcreate_and_returncontract_targeting_same_container.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eofcreate_and_returncontract_targeting_same_container.py new file mode 100644 index 0000000000..842a86b229 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eofcreate_and_returncontract_targeting_same_container.py @@ -0,0 +1,79 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section, ContainerKind + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0001_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + kind=ContainerKind.INITCODE + ) + , + "ef00010100040200010010030001001404000000008000046000600060006000ec0060006000ee00ef000101000402000100010400000000800000fe", + EOFException.AMBIGUOUS_CONTAINER_KIND, + id="eofcreate_and_returncontract_targeting_same_container_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0002_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), Section.Container(container=Container( + name = 'EOFV1_0002_D1I1', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + kind=ContainerKind.INITCODE + ) + , + "ef000101000402000100100300020014001404000000008000046000600060006000ec0060006000ee00ef000101000402000100010400000000800000feef000101000402000100010400000000800000fe", + EOFException.AMBIGUOUS_CONTAINER_KIND, + id="eofcreate_and_returncontract_targeting_same_container_1" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eofcreate_return_and_returncontract.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eofcreate_return_and_returncontract.py new file mode 100644 index 0000000000..1bc418640a --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eofcreate_return_and_returncontract.py @@ -0,0 +1,59 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0001_D1I0', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[5] + Op.PUSH1[0] * 2 + Op.RETURN + Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container(container=Container( + name = 'EOFV1_0001_D2I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + ) + ), + ], + ) + , + "ef0001010004020001000b030001003c04000000008000046000600060006000ec0000ef00010100040200010010030001001404000000008000026000e1000560006000f360006000ee00ef000101000402000100010400000000800000fe", + EOFException.INCOMPATIBLE_CONTAINER_KIND, + id="eofcreate_return_and_returncontract_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eofcreate_stop_and_returncontract.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eofcreate_stop_and_returncontract.py new file mode 100644 index 0000000000..91eefb3ebf --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eofcreate_stop_and_returncontract.py @@ -0,0 +1,59 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0001_D1I0', + sections = [ + Section.Code(code=Op.PUSH1[0] + Op.RJUMPI[1] + Op.STOP + Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container(container=Container( + name = 'EOFV1_0001_D2I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + ) + ), + ], + ) + , + "ef0001010004020001000b030001003804000000008000046000600060006000ec0000ef0001010004020001000c030001001404000000008000026000e100010060006000ee00ef000101000402000100010400000000800000fe", + EOFException.INCOMPATIBLE_CONTAINER_KIND, + id="eofcreate_stop_and_returncontract_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_initcode_container_return.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_initcode_container_return.py new file mode 100644 index 0000000000..c046a6ad1a --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_initcode_container_return.py @@ -0,0 +1,65 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section, ContainerKind + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURN, max_stack_height=2), + ], + kind=ContainerKind.INITCODE + ) + , + "ef00010100040200010005040000000080000260006000f3", + EOFException.INCOMPATIBLE_CONTAINER_KIND, + id="initcode_container_return_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0002_D1I0', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURN, max_stack_height=2), + ], + ) + ), + ], + ) + , + "ef0001010004020001000b030001001804000000008000046000600060006000ec0000ef00010100040200010005040000000080000260006000f3", + EOFException.INCOMPATIBLE_CONTAINER_KIND, + id="initcode_container_return_1" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_initcode_container_revert.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_initcode_container_revert.py new file mode 100644 index 0000000000..9ffcf3ea9e --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_initcode_container_revert.py @@ -0,0 +1,65 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section, ContainerKind + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.REVERT, max_stack_height=2), + ], + kind=ContainerKind.INITCODE + ) + , + "ef00010100040200010005040000000080000260006000fd", + None, + id="initcode_container_revert_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0002_D1I0', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.REVERT, max_stack_height=2), + ], + ) + ), + ], + ) + , + "ef0001010004020001000b030001001804000000008000046000600060006000ec0000ef00010100040200010005040000000080000260006000fd", + None, + id="initcode_container_revert_1" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_initcode_container_stop.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_initcode_container_stop.py new file mode 100644 index 0000000000..3100b81a51 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_initcode_container_stop.py @@ -0,0 +1,65 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section, ContainerKind + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.STOP, max_stack_height=0), + ], + kind=ContainerKind.INITCODE + ) + , + "ef00010100040200010001040000000080000000", + EOFException.INCOMPATIBLE_CONTAINER_KIND, + id="initcode_container_stop_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0002_D1I0', + sections = [ + Section.Code(code=Op.STOP, max_stack_height=0), + ], + ) + ), + ], + ) + , + "ef0001010004020001000b030001001404000000008000046000600060006000ec0000ef00010100040200010001040000000080000000", + EOFException.INCOMPATIBLE_CONTAINER_KIND, + id="initcode_container_stop_1" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_max_nested_containers_eofcreate.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_max_nested_containers_eofcreate.py new file mode 100644 index 0000000000..4396f3db6e --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_max_nested_containers_eofcreate.py @@ -0,0 +1,61 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section +from ethereum_test_types.eof.v1.constants import MAX_INITCODE_SIZE + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +# Maximum nested containers EOF create +code = None +nextcode = Container( + name="EOFV1_MINCONTAINER", + sections=[ + Section.Code(code=Op.INVALID), + ] +) + +while len(nextcode) < MAX_INITCODE_SIZE: + code = nextcode + nextcode = Container( + sections=[ + Section.Code(code=Op.PUSH0 * 4 + Op.EOFCREATE[0] + Op.INVALID), + Section.Container(container=nextcode), + ] + ) + +max_nested_containers_eofcreate_0 = code + + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + max_nested_containers_eofcreate_0, + "ef00010100040200010007030001bfc504000000008000045f5f5f5fec00feef00010100040200010007030001bfa604000000008000045f5f5f5fec00feef00010100040200010007030001bf8704000000008000045f5f5f5fec00feef00010100040200010007030001bf6804000000008000045f5f5f5fec00feef00010100040200010007030001bf4904000000008000045f5f5f5fec00feef00010100040200010007030001bf2a04000000008000045f5f5f5fec00feef00010100040200010007030001bf0b04000000008000045f5f5f5fec00feef00010100040200010007030001beec04000000008000045f5f5f5fec00feef00010100040200010007030001becd04000000008000045f5f5f5fec00feef00010100040200010007030001beae04000000008000045f5f5f5fec00feef00010100040200010007030001be8f04000000008000045f5f5f5fec00feef00010100040200010007030001be7004000000008000045f5f5f5fec00feef00010100040200010007030001be5104000000008000045f5f5f5fec00feef00010100040200010007030001be3204000000008000045f5f5f5fec00feef00010100040200010007030001be1304000000008000045f5f5f5fec00feef00010100040200010007030001bdf404000000008000045f5f5f5fec00feef00010100040200010007030001bdd504000000008000045f5f5f5fec00feef00010100040200010007030001bdb604000000008000045f5f5f5fec00feef00010100040200010007030001bd9704000000008000045f5f5f5fec00feef00010100040200010007030001bd7804000000008000045f5f5f5fec00feef00010100040200010007030001bd5904000000008000045f5f5f5fec00feef00010100040200010007030001bd3a04000000008000045f5f5f5fec00feef00010100040200010007030001bd1b04000000008000045f5f5f5fec00feef00010100040200010007030001bcfc04000000008000045f5f5f5fec00feef00010100040200010007030001bcdd04000000008000045f5f5f5fec00feef00010100040200010007030001bcbe04000000008000045f5f5f5fec00feef00010100040200010007030001bc9f04000000008000045f5f5f5fec00feef00010100040200010007030001bc8004000000008000045f5f5f5fec00feef00010100040200010007030001bc6104000000008000045f5f5f5fec00feef00010100040200010007030001bc4204000000008000045f5f5f5fec00feef00010100040200010007030001bc2304000000008000045f5f5f5fec00feef00010100040200010007030001bc0404000000008000045f5f5f5fec00feef00010100040200010007030001bbe504000000008000045f5f5f5fec00feef00010100040200010007030001bbc604000000008000045f5f5f5fec00feef00010100040200010007030001bba704000000008000045f5f5f5fec00feef00010100040200010007030001bb8804000000008000045f5f5f5fec00feef00010100040200010007030001bb6904000000008000045f5f5f5fec00feef00010100040200010007030001bb4a04000000008000045f5f5f5fec00feef00010100040200010007030001bb2b04000000008000045f5f5f5fec00feef00010100040200010007030001bb0c04000000008000045f5f5f5fec00feef00010100040200010007030001baed04000000008000045f5f5f5fec00feef00010100040200010007030001bace04000000008000045f5f5f5fec00feef00010100040200010007030001baaf04000000008000045f5f5f5fec00feef00010100040200010007030001ba9004000000008000045f5f5f5fec00feef00010100040200010007030001ba7104000000008000045f5f5f5fec00feef00010100040200010007030001ba5204000000008000045f5f5f5fec00feef00010100040200010007030001ba3304000000008000045f5f5f5fec00feef00010100040200010007030001ba1404000000008000045f5f5f5fec00feef00010100040200010007030001b9f504000000008000045f5f5f5fec00feef00010100040200010007030001b9d604000000008000045f5f5f5fec00feef00010100040200010007030001b9b704000000008000045f5f5f5fec00feef00010100040200010007030001b99804000000008000045f5f5f5fec00feef00010100040200010007030001b97904000000008000045f5f5f5fec00feef00010100040200010007030001b95a04000000008000045f5f5f5fec00feef00010100040200010007030001b93b04000000008000045f5f5f5fec00feef00010100040200010007030001b91c04000000008000045f5f5f5fec00feef00010100040200010007030001b8fd04000000008000045f5f5f5fec00feef00010100040200010007030001b8de04000000008000045f5f5f5fec00feef00010100040200010007030001b8bf04000000008000045f5f5f5fec00feef00010100040200010007030001b8a004000000008000045f5f5f5fec00feef00010100040200010007030001b88104000000008000045f5f5f5fec00feef00010100040200010007030001b86204000000008000045f5f5f5fec00feef00010100040200010007030001b84304000000008000045f5f5f5fec00feef00010100040200010007030001b82404000000008000045f5f5f5fec00feef00010100040200010007030001b80504000000008000045f5f5f5fec00feef00010100040200010007030001b7e604000000008000045f5f5f5fec00feef00010100040200010007030001b7c704000000008000045f5f5f5fec00feef00010100040200010007030001b7a804000000008000045f5f5f5fec00feef00010100040200010007030001b78904000000008000045f5f5f5fec00feef00010100040200010007030001b76a04000000008000045f5f5f5fec00feef00010100040200010007030001b74b04000000008000045f5f5f5fec00feef00010100040200010007030001b72c04000000008000045f5f5f5fec00feef00010100040200010007030001b70d04000000008000045f5f5f5fec00feef00010100040200010007030001b6ee04000000008000045f5f5f5fec00feef00010100040200010007030001b6cf04000000008000045f5f5f5fec00feef00010100040200010007030001b6b004000000008000045f5f5f5fec00feef00010100040200010007030001b69104000000008000045f5f5f5fec00feef00010100040200010007030001b67204000000008000045f5f5f5fec00feef00010100040200010007030001b65304000000008000045f5f5f5fec00feef00010100040200010007030001b63404000000008000045f5f5f5fec00feef00010100040200010007030001b61504000000008000045f5f5f5fec00feef00010100040200010007030001b5f604000000008000045f5f5f5fec00feef00010100040200010007030001b5d704000000008000045f5f5f5fec00feef00010100040200010007030001b5b804000000008000045f5f5f5fec00feef00010100040200010007030001b59904000000008000045f5f5f5fec00feef00010100040200010007030001b57a04000000008000045f5f5f5fec00feef00010100040200010007030001b55b04000000008000045f5f5f5fec00feef00010100040200010007030001b53c04000000008000045f5f5f5fec00feef00010100040200010007030001b51d04000000008000045f5f5f5fec00feef00010100040200010007030001b4fe04000000008000045f5f5f5fec00feef00010100040200010007030001b4df04000000008000045f5f5f5fec00feef00010100040200010007030001b4c004000000008000045f5f5f5fec00feef00010100040200010007030001b4a104000000008000045f5f5f5fec00feef00010100040200010007030001b48204000000008000045f5f5f5fec00feef00010100040200010007030001b46304000000008000045f5f5f5fec00feef00010100040200010007030001b44404000000008000045f5f5f5fec00feef00010100040200010007030001b42504000000008000045f5f5f5fec00feef00010100040200010007030001b40604000000008000045f5f5f5fec00feef00010100040200010007030001b3e704000000008000045f5f5f5fec00feef00010100040200010007030001b3c804000000008000045f5f5f5fec00feef00010100040200010007030001b3a904000000008000045f5f5f5fec00feef00010100040200010007030001b38a04000000008000045f5f5f5fec00feef00010100040200010007030001b36b04000000008000045f5f5f5fec00feef00010100040200010007030001b34c04000000008000045f5f5f5fec00feef00010100040200010007030001b32d04000000008000045f5f5f5fec00feef00010100040200010007030001b30e04000000008000045f5f5f5fec00feef00010100040200010007030001b2ef04000000008000045f5f5f5fec00feef00010100040200010007030001b2d004000000008000045f5f5f5fec00feef00010100040200010007030001b2b104000000008000045f5f5f5fec00feef00010100040200010007030001b29204000000008000045f5f5f5fec00feef00010100040200010007030001b27304000000008000045f5f5f5fec00feef00010100040200010007030001b25404000000008000045f5f5f5fec00feef00010100040200010007030001b23504000000008000045f5f5f5fec00feef00010100040200010007030001b21604000000008000045f5f5f5fec00feef00010100040200010007030001b1f704000000008000045f5f5f5fec00feef00010100040200010007030001b1d804000000008000045f5f5f5fec00feef00010100040200010007030001b1b904000000008000045f5f5f5fec00feef00010100040200010007030001b19a04000000008000045f5f5f5fec00feef00010100040200010007030001b17b04000000008000045f5f5f5fec00feef00010100040200010007030001b15c04000000008000045f5f5f5fec00feef00010100040200010007030001b13d04000000008000045f5f5f5fec00feef00010100040200010007030001b11e04000000008000045f5f5f5fec00feef00010100040200010007030001b0ff04000000008000045f5f5f5fec00feef00010100040200010007030001b0e004000000008000045f5f5f5fec00feef00010100040200010007030001b0c104000000008000045f5f5f5fec00feef00010100040200010007030001b0a204000000008000045f5f5f5fec00feef00010100040200010007030001b08304000000008000045f5f5f5fec00feef00010100040200010007030001b06404000000008000045f5f5f5fec00feef00010100040200010007030001b04504000000008000045f5f5f5fec00feef00010100040200010007030001b02604000000008000045f5f5f5fec00feef00010100040200010007030001b00704000000008000045f5f5f5fec00feef00010100040200010007030001afe804000000008000045f5f5f5fec00feef00010100040200010007030001afc904000000008000045f5f5f5fec00feef00010100040200010007030001afaa04000000008000045f5f5f5fec00feef00010100040200010007030001af8b04000000008000045f5f5f5fec00feef00010100040200010007030001af6c04000000008000045f5f5f5fec00feef00010100040200010007030001af4d04000000008000045f5f5f5fec00feef00010100040200010007030001af2e04000000008000045f5f5f5fec00feef00010100040200010007030001af0f04000000008000045f5f5f5fec00feef00010100040200010007030001aef004000000008000045f5f5f5fec00feef00010100040200010007030001aed104000000008000045f5f5f5fec00feef00010100040200010007030001aeb204000000008000045f5f5f5fec00feef00010100040200010007030001ae9304000000008000045f5f5f5fec00feef00010100040200010007030001ae7404000000008000045f5f5f5fec00feef00010100040200010007030001ae5504000000008000045f5f5f5fec00feef00010100040200010007030001ae3604000000008000045f5f5f5fec00feef00010100040200010007030001ae1704000000008000045f5f5f5fec00feef00010100040200010007030001adf804000000008000045f5f5f5fec00feef00010100040200010007030001add904000000008000045f5f5f5fec00feef00010100040200010007030001adba04000000008000045f5f5f5fec00feef00010100040200010007030001ad9b04000000008000045f5f5f5fec00feef00010100040200010007030001ad7c04000000008000045f5f5f5fec00feef00010100040200010007030001ad5d04000000008000045f5f5f5fec00feef00010100040200010007030001ad3e04000000008000045f5f5f5fec00feef00010100040200010007030001ad1f04000000008000045f5f5f5fec00feef00010100040200010007030001ad0004000000008000045f5f5f5fec00feef00010100040200010007030001ace104000000008000045f5f5f5fec00feef00010100040200010007030001acc204000000008000045f5f5f5fec00feef00010100040200010007030001aca304000000008000045f5f5f5fec00feef00010100040200010007030001ac8404000000008000045f5f5f5fec00feef00010100040200010007030001ac6504000000008000045f5f5f5fec00feef00010100040200010007030001ac4604000000008000045f5f5f5fec00feef00010100040200010007030001ac2704000000008000045f5f5f5fec00feef00010100040200010007030001ac0804000000008000045f5f5f5fec00feef00010100040200010007030001abe904000000008000045f5f5f5fec00feef00010100040200010007030001abca04000000008000045f5f5f5fec00feef00010100040200010007030001abab04000000008000045f5f5f5fec00feef00010100040200010007030001ab8c04000000008000045f5f5f5fec00feef00010100040200010007030001ab6d04000000008000045f5f5f5fec00feef00010100040200010007030001ab4e04000000008000045f5f5f5fec00feef00010100040200010007030001ab2f04000000008000045f5f5f5fec00feef00010100040200010007030001ab1004000000008000045f5f5f5fec00feef00010100040200010007030001aaf104000000008000045f5f5f5fec00feef00010100040200010007030001aad204000000008000045f5f5f5fec00feef00010100040200010007030001aab304000000008000045f5f5f5fec00feef00010100040200010007030001aa9404000000008000045f5f5f5fec00feef00010100040200010007030001aa7504000000008000045f5f5f5fec00feef00010100040200010007030001aa5604000000008000045f5f5f5fec00feef00010100040200010007030001aa3704000000008000045f5f5f5fec00feef00010100040200010007030001aa1804000000008000045f5f5f5fec00feef00010100040200010007030001a9f904000000008000045f5f5f5fec00feef00010100040200010007030001a9da04000000008000045f5f5f5fec00feef00010100040200010007030001a9bb04000000008000045f5f5f5fec00feef00010100040200010007030001a99c04000000008000045f5f5f5fec00feef00010100040200010007030001a97d04000000008000045f5f5f5fec00feef00010100040200010007030001a95e04000000008000045f5f5f5fec00feef00010100040200010007030001a93f04000000008000045f5f5f5fec00feef00010100040200010007030001a92004000000008000045f5f5f5fec00feef00010100040200010007030001a90104000000008000045f5f5f5fec00feef00010100040200010007030001a8e204000000008000045f5f5f5fec00feef00010100040200010007030001a8c304000000008000045f5f5f5fec00feef00010100040200010007030001a8a404000000008000045f5f5f5fec00feef00010100040200010007030001a88504000000008000045f5f5f5fec00feef00010100040200010007030001a86604000000008000045f5f5f5fec00feef00010100040200010007030001a84704000000008000045f5f5f5fec00feef00010100040200010007030001a82804000000008000045f5f5f5fec00feef00010100040200010007030001a80904000000008000045f5f5f5fec00feef00010100040200010007030001a7ea04000000008000045f5f5f5fec00feef00010100040200010007030001a7cb04000000008000045f5f5f5fec00feef00010100040200010007030001a7ac04000000008000045f5f5f5fec00feef00010100040200010007030001a78d04000000008000045f5f5f5fec00feef00010100040200010007030001a76e04000000008000045f5f5f5fec00feef00010100040200010007030001a74f04000000008000045f5f5f5fec00feef00010100040200010007030001a73004000000008000045f5f5f5fec00feef00010100040200010007030001a71104000000008000045f5f5f5fec00feef00010100040200010007030001a6f204000000008000045f5f5f5fec00feef00010100040200010007030001a6d304000000008000045f5f5f5fec00feef00010100040200010007030001a6b404000000008000045f5f5f5fec00feef00010100040200010007030001a69504000000008000045f5f5f5fec00feef00010100040200010007030001a67604000000008000045f5f5f5fec00feef00010100040200010007030001a65704000000008000045f5f5f5fec00feef00010100040200010007030001a63804000000008000045f5f5f5fec00feef00010100040200010007030001a61904000000008000045f5f5f5fec00feef00010100040200010007030001a5fa04000000008000045f5f5f5fec00feef00010100040200010007030001a5db04000000008000045f5f5f5fec00feef00010100040200010007030001a5bc04000000008000045f5f5f5fec00feef00010100040200010007030001a59d04000000008000045f5f5f5fec00feef00010100040200010007030001a57e04000000008000045f5f5f5fec00feef00010100040200010007030001a55f04000000008000045f5f5f5fec00feef00010100040200010007030001a54004000000008000045f5f5f5fec00feef00010100040200010007030001a52104000000008000045f5f5f5fec00feef00010100040200010007030001a50204000000008000045f5f5f5fec00feef00010100040200010007030001a4e304000000008000045f5f5f5fec00feef00010100040200010007030001a4c404000000008000045f5f5f5fec00feef00010100040200010007030001a4a504000000008000045f5f5f5fec00feef00010100040200010007030001a48604000000008000045f5f5f5fec00feef00010100040200010007030001a46704000000008000045f5f5f5fec00feef00010100040200010007030001a44804000000008000045f5f5f5fec00feef00010100040200010007030001a42904000000008000045f5f5f5fec00feef00010100040200010007030001a40a04000000008000045f5f5f5fec00feef00010100040200010007030001a3eb04000000008000045f5f5f5fec00feef00010100040200010007030001a3cc04000000008000045f5f5f5fec00feef00010100040200010007030001a3ad04000000008000045f5f5f5fec00feef00010100040200010007030001a38e04000000008000045f5f5f5fec00feef00010100040200010007030001a36f04000000008000045f5f5f5fec00feef00010100040200010007030001a35004000000008000045f5f5f5fec00feef00010100040200010007030001a33104000000008000045f5f5f5fec00feef00010100040200010007030001a31204000000008000045f5f5f5fec00feef00010100040200010007030001a2f304000000008000045f5f5f5fec00feef00010100040200010007030001a2d404000000008000045f5f5f5fec00feef00010100040200010007030001a2b504000000008000045f5f5f5fec00feef00010100040200010007030001a29604000000008000045f5f5f5fec00feef00010100040200010007030001a27704000000008000045f5f5f5fec00feef00010100040200010007030001a25804000000008000045f5f5f5fec00feef00010100040200010007030001a23904000000008000045f5f5f5fec00feef00010100040200010007030001a21a04000000008000045f5f5f5fec00feef00010100040200010007030001a1fb04000000008000045f5f5f5fec00feef00010100040200010007030001a1dc04000000008000045f5f5f5fec00feef00010100040200010007030001a1bd04000000008000045f5f5f5fec00feef00010100040200010007030001a19e04000000008000045f5f5f5fec00feef00010100040200010007030001a17f04000000008000045f5f5f5fec00feef00010100040200010007030001a16004000000008000045f5f5f5fec00feef00010100040200010007030001a14104000000008000045f5f5f5fec00feef00010100040200010007030001a12204000000008000045f5f5f5fec00feef00010100040200010007030001a10304000000008000045f5f5f5fec00feef00010100040200010007030001a0e404000000008000045f5f5f5fec00feef00010100040200010007030001a0c504000000008000045f5f5f5fec00feef00010100040200010007030001a0a604000000008000045f5f5f5fec00feef00010100040200010007030001a08704000000008000045f5f5f5fec00feef00010100040200010007030001a06804000000008000045f5f5f5fec00feef00010100040200010007030001a04904000000008000045f5f5f5fec00feef00010100040200010007030001a02a04000000008000045f5f5f5fec00feef00010100040200010007030001a00b04000000008000045f5f5f5fec00feef000101000402000100070300019fec04000000008000045f5f5f5fec00feef000101000402000100070300019fcd04000000008000045f5f5f5fec00feef000101000402000100070300019fae04000000008000045f5f5f5fec00feef000101000402000100070300019f8f04000000008000045f5f5f5fec00feef000101000402000100070300019f7004000000008000045f5f5f5fec00feef000101000402000100070300019f5104000000008000045f5f5f5fec00feef000101000402000100070300019f3204000000008000045f5f5f5fec00feef000101000402000100070300019f1304000000008000045f5f5f5fec00feef000101000402000100070300019ef404000000008000045f5f5f5fec00feef000101000402000100070300019ed504000000008000045f5f5f5fec00feef000101000402000100070300019eb604000000008000045f5f5f5fec00feef000101000402000100070300019e9704000000008000045f5f5f5fec00feef000101000402000100070300019e7804000000008000045f5f5f5fec00feef000101000402000100070300019e5904000000008000045f5f5f5fec00feef000101000402000100070300019e3a04000000008000045f5f5f5fec00feef000101000402000100070300019e1b04000000008000045f5f5f5fec00feef000101000402000100070300019dfc04000000008000045f5f5f5fec00feef000101000402000100070300019ddd04000000008000045f5f5f5fec00feef000101000402000100070300019dbe04000000008000045f5f5f5fec00feef000101000402000100070300019d9f04000000008000045f5f5f5fec00feef000101000402000100070300019d8004000000008000045f5f5f5fec00feef000101000402000100070300019d6104000000008000045f5f5f5fec00feef000101000402000100070300019d4204000000008000045f5f5f5fec00feef000101000402000100070300019d2304000000008000045f5f5f5fec00feef000101000402000100070300019d0404000000008000045f5f5f5fec00feef000101000402000100070300019ce504000000008000045f5f5f5fec00feef000101000402000100070300019cc604000000008000045f5f5f5fec00feef000101000402000100070300019ca704000000008000045f5f5f5fec00feef000101000402000100070300019c8804000000008000045f5f5f5fec00feef000101000402000100070300019c6904000000008000045f5f5f5fec00feef000101000402000100070300019c4a04000000008000045f5f5f5fec00feef000101000402000100070300019c2b04000000008000045f5f5f5fec00feef000101000402000100070300019c0c04000000008000045f5f5f5fec00feef000101000402000100070300019bed04000000008000045f5f5f5fec00feef000101000402000100070300019bce04000000008000045f5f5f5fec00feef000101000402000100070300019baf04000000008000045f5f5f5fec00feef000101000402000100070300019b9004000000008000045f5f5f5fec00feef000101000402000100070300019b7104000000008000045f5f5f5fec00feef000101000402000100070300019b5204000000008000045f5f5f5fec00feef000101000402000100070300019b3304000000008000045f5f5f5fec00feef000101000402000100070300019b1404000000008000045f5f5f5fec00feef000101000402000100070300019af504000000008000045f5f5f5fec00feef000101000402000100070300019ad604000000008000045f5f5f5fec00feef000101000402000100070300019ab704000000008000045f5f5f5fec00feef000101000402000100070300019a9804000000008000045f5f5f5fec00feef000101000402000100070300019a7904000000008000045f5f5f5fec00feef000101000402000100070300019a5a04000000008000045f5f5f5fec00feef000101000402000100070300019a3b04000000008000045f5f5f5fec00feef000101000402000100070300019a1c04000000008000045f5f5f5fec00feef0001010004020001000703000199fd04000000008000045f5f5f5fec00feef0001010004020001000703000199de04000000008000045f5f5f5fec00feef0001010004020001000703000199bf04000000008000045f5f5f5fec00feef0001010004020001000703000199a004000000008000045f5f5f5fec00feef00010100040200010007030001998104000000008000045f5f5f5fec00feef00010100040200010007030001996204000000008000045f5f5f5fec00feef00010100040200010007030001994304000000008000045f5f5f5fec00feef00010100040200010007030001992404000000008000045f5f5f5fec00feef00010100040200010007030001990504000000008000045f5f5f5fec00feef0001010004020001000703000198e604000000008000045f5f5f5fec00feef0001010004020001000703000198c704000000008000045f5f5f5fec00feef0001010004020001000703000198a804000000008000045f5f5f5fec00feef00010100040200010007030001988904000000008000045f5f5f5fec00feef00010100040200010007030001986a04000000008000045f5f5f5fec00feef00010100040200010007030001984b04000000008000045f5f5f5fec00feef00010100040200010007030001982c04000000008000045f5f5f5fec00feef00010100040200010007030001980d04000000008000045f5f5f5fec00feef0001010004020001000703000197ee04000000008000045f5f5f5fec00feef0001010004020001000703000197cf04000000008000045f5f5f5fec00feef0001010004020001000703000197b004000000008000045f5f5f5fec00feef00010100040200010007030001979104000000008000045f5f5f5fec00feef00010100040200010007030001977204000000008000045f5f5f5fec00feef00010100040200010007030001975304000000008000045f5f5f5fec00feef00010100040200010007030001973404000000008000045f5f5f5fec00feef00010100040200010007030001971504000000008000045f5f5f5fec00feef0001010004020001000703000196f604000000008000045f5f5f5fec00feef0001010004020001000703000196d704000000008000045f5f5f5fec00feef0001010004020001000703000196b804000000008000045f5f5f5fec00feef00010100040200010007030001969904000000008000045f5f5f5fec00feef00010100040200010007030001967a04000000008000045f5f5f5fec00feef00010100040200010007030001965b04000000008000045f5f5f5fec00feef00010100040200010007030001963c04000000008000045f5f5f5fec00feef00010100040200010007030001961d04000000008000045f5f5f5fec00feef0001010004020001000703000195fe04000000008000045f5f5f5fec00feef0001010004020001000703000195df04000000008000045f5f5f5fec00feef0001010004020001000703000195c004000000008000045f5f5f5fec00feef0001010004020001000703000195a104000000008000045f5f5f5fec00feef00010100040200010007030001958204000000008000045f5f5f5fec00feef00010100040200010007030001956304000000008000045f5f5f5fec00feef00010100040200010007030001954404000000008000045f5f5f5fec00feef00010100040200010007030001952504000000008000045f5f5f5fec00feef00010100040200010007030001950604000000008000045f5f5f5fec00feef0001010004020001000703000194e704000000008000045f5f5f5fec00feef0001010004020001000703000194c804000000008000045f5f5f5fec00feef0001010004020001000703000194a904000000008000045f5f5f5fec00feef00010100040200010007030001948a04000000008000045f5f5f5fec00feef00010100040200010007030001946b04000000008000045f5f5f5fec00feef00010100040200010007030001944c04000000008000045f5f5f5fec00feef00010100040200010007030001942d04000000008000045f5f5f5fec00feef00010100040200010007030001940e04000000008000045f5f5f5fec00feef0001010004020001000703000193ef04000000008000045f5f5f5fec00feef0001010004020001000703000193d004000000008000045f5f5f5fec00feef0001010004020001000703000193b104000000008000045f5f5f5fec00feef00010100040200010007030001939204000000008000045f5f5f5fec00feef00010100040200010007030001937304000000008000045f5f5f5fec00feef00010100040200010007030001935404000000008000045f5f5f5fec00feef00010100040200010007030001933504000000008000045f5f5f5fec00feef00010100040200010007030001931604000000008000045f5f5f5fec00feef0001010004020001000703000192f704000000008000045f5f5f5fec00feef0001010004020001000703000192d804000000008000045f5f5f5fec00feef0001010004020001000703000192b904000000008000045f5f5f5fec00feef00010100040200010007030001929a04000000008000045f5f5f5fec00feef00010100040200010007030001927b04000000008000045f5f5f5fec00feef00010100040200010007030001925c04000000008000045f5f5f5fec00feef00010100040200010007030001923d04000000008000045f5f5f5fec00feef00010100040200010007030001921e04000000008000045f5f5f5fec00feef0001010004020001000703000191ff04000000008000045f5f5f5fec00feef0001010004020001000703000191e004000000008000045f5f5f5fec00feef0001010004020001000703000191c104000000008000045f5f5f5fec00feef0001010004020001000703000191a204000000008000045f5f5f5fec00feef00010100040200010007030001918304000000008000045f5f5f5fec00feef00010100040200010007030001916404000000008000045f5f5f5fec00feef00010100040200010007030001914504000000008000045f5f5f5fec00feef00010100040200010007030001912604000000008000045f5f5f5fec00feef00010100040200010007030001910704000000008000045f5f5f5fec00feef0001010004020001000703000190e804000000008000045f5f5f5fec00feef0001010004020001000703000190c904000000008000045f5f5f5fec00feef0001010004020001000703000190aa04000000008000045f5f5f5fec00feef00010100040200010007030001908b04000000008000045f5f5f5fec00feef00010100040200010007030001906c04000000008000045f5f5f5fec00feef00010100040200010007030001904d04000000008000045f5f5f5fec00feef00010100040200010007030001902e04000000008000045f5f5f5fec00feef00010100040200010007030001900f04000000008000045f5f5f5fec00feef000101000402000100070300018ff004000000008000045f5f5f5fec00feef000101000402000100070300018fd104000000008000045f5f5f5fec00feef000101000402000100070300018fb204000000008000045f5f5f5fec00feef000101000402000100070300018f9304000000008000045f5f5f5fec00feef000101000402000100070300018f7404000000008000045f5f5f5fec00feef000101000402000100070300018f5504000000008000045f5f5f5fec00feef000101000402000100070300018f3604000000008000045f5f5f5fec00feef000101000402000100070300018f1704000000008000045f5f5f5fec00feef000101000402000100070300018ef804000000008000045f5f5f5fec00feef000101000402000100070300018ed904000000008000045f5f5f5fec00feef000101000402000100070300018eba04000000008000045f5f5f5fec00feef000101000402000100070300018e9b04000000008000045f5f5f5fec00feef000101000402000100070300018e7c04000000008000045f5f5f5fec00feef000101000402000100070300018e5d04000000008000045f5f5f5fec00feef000101000402000100070300018e3e04000000008000045f5f5f5fec00feef000101000402000100070300018e1f04000000008000045f5f5f5fec00feef000101000402000100070300018e0004000000008000045f5f5f5fec00feef000101000402000100070300018de104000000008000045f5f5f5fec00feef000101000402000100070300018dc204000000008000045f5f5f5fec00feef000101000402000100070300018da304000000008000045f5f5f5fec00feef000101000402000100070300018d8404000000008000045f5f5f5fec00feef000101000402000100070300018d6504000000008000045f5f5f5fec00feef000101000402000100070300018d4604000000008000045f5f5f5fec00feef000101000402000100070300018d2704000000008000045f5f5f5fec00feef000101000402000100070300018d0804000000008000045f5f5f5fec00feef000101000402000100070300018ce904000000008000045f5f5f5fec00feef000101000402000100070300018cca04000000008000045f5f5f5fec00feef000101000402000100070300018cab04000000008000045f5f5f5fec00feef000101000402000100070300018c8c04000000008000045f5f5f5fec00feef000101000402000100070300018c6d04000000008000045f5f5f5fec00feef000101000402000100070300018c4e04000000008000045f5f5f5fec00feef000101000402000100070300018c2f04000000008000045f5f5f5fec00feef000101000402000100070300018c1004000000008000045f5f5f5fec00feef000101000402000100070300018bf104000000008000045f5f5f5fec00feef000101000402000100070300018bd204000000008000045f5f5f5fec00feef000101000402000100070300018bb304000000008000045f5f5f5fec00feef000101000402000100070300018b9404000000008000045f5f5f5fec00feef000101000402000100070300018b7504000000008000045f5f5f5fec00feef000101000402000100070300018b5604000000008000045f5f5f5fec00feef000101000402000100070300018b3704000000008000045f5f5f5fec00feef000101000402000100070300018b1804000000008000045f5f5f5fec00feef000101000402000100070300018af904000000008000045f5f5f5fec00feef000101000402000100070300018ada04000000008000045f5f5f5fec00feef000101000402000100070300018abb04000000008000045f5f5f5fec00feef000101000402000100070300018a9c04000000008000045f5f5f5fec00feef000101000402000100070300018a7d04000000008000045f5f5f5fec00feef000101000402000100070300018a5e04000000008000045f5f5f5fec00feef000101000402000100070300018a3f04000000008000045f5f5f5fec00feef000101000402000100070300018a2004000000008000045f5f5f5fec00feef000101000402000100070300018a0104000000008000045f5f5f5fec00feef0001010004020001000703000189e204000000008000045f5f5f5fec00feef0001010004020001000703000189c304000000008000045f5f5f5fec00feef0001010004020001000703000189a404000000008000045f5f5f5fec00feef00010100040200010007030001898504000000008000045f5f5f5fec00feef00010100040200010007030001896604000000008000045f5f5f5fec00feef00010100040200010007030001894704000000008000045f5f5f5fec00feef00010100040200010007030001892804000000008000045f5f5f5fec00feef00010100040200010007030001890904000000008000045f5f5f5fec00feef0001010004020001000703000188ea04000000008000045f5f5f5fec00feef0001010004020001000703000188cb04000000008000045f5f5f5fec00feef0001010004020001000703000188ac04000000008000045f5f5f5fec00feef00010100040200010007030001888d04000000008000045f5f5f5fec00feef00010100040200010007030001886e04000000008000045f5f5f5fec00feef00010100040200010007030001884f04000000008000045f5f5f5fec00feef00010100040200010007030001883004000000008000045f5f5f5fec00feef00010100040200010007030001881104000000008000045f5f5f5fec00feef0001010004020001000703000187f204000000008000045f5f5f5fec00feef0001010004020001000703000187d304000000008000045f5f5f5fec00feef0001010004020001000703000187b404000000008000045f5f5f5fec00feef00010100040200010007030001879504000000008000045f5f5f5fec00feef00010100040200010007030001877604000000008000045f5f5f5fec00feef00010100040200010007030001875704000000008000045f5f5f5fec00feef00010100040200010007030001873804000000008000045f5f5f5fec00feef00010100040200010007030001871904000000008000045f5f5f5fec00feef0001010004020001000703000186fa04000000008000045f5f5f5fec00feef0001010004020001000703000186db04000000008000045f5f5f5fec00feef0001010004020001000703000186bc04000000008000045f5f5f5fec00feef00010100040200010007030001869d04000000008000045f5f5f5fec00feef00010100040200010007030001867e04000000008000045f5f5f5fec00feef00010100040200010007030001865f04000000008000045f5f5f5fec00feef00010100040200010007030001864004000000008000045f5f5f5fec00feef00010100040200010007030001862104000000008000045f5f5f5fec00feef00010100040200010007030001860204000000008000045f5f5f5fec00feef0001010004020001000703000185e304000000008000045f5f5f5fec00feef0001010004020001000703000185c404000000008000045f5f5f5fec00feef0001010004020001000703000185a504000000008000045f5f5f5fec00feef00010100040200010007030001858604000000008000045f5f5f5fec00feef00010100040200010007030001856704000000008000045f5f5f5fec00feef00010100040200010007030001854804000000008000045f5f5f5fec00feef00010100040200010007030001852904000000008000045f5f5f5fec00feef00010100040200010007030001850a04000000008000045f5f5f5fec00feef0001010004020001000703000184eb04000000008000045f5f5f5fec00feef0001010004020001000703000184cc04000000008000045f5f5f5fec00feef0001010004020001000703000184ad04000000008000045f5f5f5fec00feef00010100040200010007030001848e04000000008000045f5f5f5fec00feef00010100040200010007030001846f04000000008000045f5f5f5fec00feef00010100040200010007030001845004000000008000045f5f5f5fec00feef00010100040200010007030001843104000000008000045f5f5f5fec00feef00010100040200010007030001841204000000008000045f5f5f5fec00feef0001010004020001000703000183f304000000008000045f5f5f5fec00feef0001010004020001000703000183d404000000008000045f5f5f5fec00feef0001010004020001000703000183b504000000008000045f5f5f5fec00feef00010100040200010007030001839604000000008000045f5f5f5fec00feef00010100040200010007030001837704000000008000045f5f5f5fec00feef00010100040200010007030001835804000000008000045f5f5f5fec00feef00010100040200010007030001833904000000008000045f5f5f5fec00feef00010100040200010007030001831a04000000008000045f5f5f5fec00feef0001010004020001000703000182fb04000000008000045f5f5f5fec00feef0001010004020001000703000182dc04000000008000045f5f5f5fec00feef0001010004020001000703000182bd04000000008000045f5f5f5fec00feef00010100040200010007030001829e04000000008000045f5f5f5fec00feef00010100040200010007030001827f04000000008000045f5f5f5fec00feef00010100040200010007030001826004000000008000045f5f5f5fec00feef00010100040200010007030001824104000000008000045f5f5f5fec00feef00010100040200010007030001822204000000008000045f5f5f5fec00feef00010100040200010007030001820304000000008000045f5f5f5fec00feef0001010004020001000703000181e404000000008000045f5f5f5fec00feef0001010004020001000703000181c504000000008000045f5f5f5fec00feef0001010004020001000703000181a604000000008000045f5f5f5fec00feef00010100040200010007030001818704000000008000045f5f5f5fec00feef00010100040200010007030001816804000000008000045f5f5f5fec00feef00010100040200010007030001814904000000008000045f5f5f5fec00feef00010100040200010007030001812a04000000008000045f5f5f5fec00feef00010100040200010007030001810b04000000008000045f5f5f5fec00feef0001010004020001000703000180ec04000000008000045f5f5f5fec00feef0001010004020001000703000180cd04000000008000045f5f5f5fec00feef0001010004020001000703000180ae04000000008000045f5f5f5fec00feef00010100040200010007030001808f04000000008000045f5f5f5fec00feef00010100040200010007030001807004000000008000045f5f5f5fec00feef00010100040200010007030001805104000000008000045f5f5f5fec00feef00010100040200010007030001803204000000008000045f5f5f5fec00feef00010100040200010007030001801304000000008000045f5f5f5fec00feef000101000402000100070300017ff404000000008000045f5f5f5fec00feef000101000402000100070300017fd504000000008000045f5f5f5fec00feef000101000402000100070300017fb604000000008000045f5f5f5fec00feef000101000402000100070300017f9704000000008000045f5f5f5fec00feef000101000402000100070300017f7804000000008000045f5f5f5fec00feef000101000402000100070300017f5904000000008000045f5f5f5fec00feef000101000402000100070300017f3a04000000008000045f5f5f5fec00feef000101000402000100070300017f1b04000000008000045f5f5f5fec00feef000101000402000100070300017efc04000000008000045f5f5f5fec00feef000101000402000100070300017edd04000000008000045f5f5f5fec00feef000101000402000100070300017ebe04000000008000045f5f5f5fec00feef000101000402000100070300017e9f04000000008000045f5f5f5fec00feef000101000402000100070300017e8004000000008000045f5f5f5fec00feef000101000402000100070300017e6104000000008000045f5f5f5fec00feef000101000402000100070300017e4204000000008000045f5f5f5fec00feef000101000402000100070300017e2304000000008000045f5f5f5fec00feef000101000402000100070300017e0404000000008000045f5f5f5fec00feef000101000402000100070300017de504000000008000045f5f5f5fec00feef000101000402000100070300017dc604000000008000045f5f5f5fec00feef000101000402000100070300017da704000000008000045f5f5f5fec00feef000101000402000100070300017d8804000000008000045f5f5f5fec00feef000101000402000100070300017d6904000000008000045f5f5f5fec00feef000101000402000100070300017d4a04000000008000045f5f5f5fec00feef000101000402000100070300017d2b04000000008000045f5f5f5fec00feef000101000402000100070300017d0c04000000008000045f5f5f5fec00feef000101000402000100070300017ced04000000008000045f5f5f5fec00feef000101000402000100070300017cce04000000008000045f5f5f5fec00feef000101000402000100070300017caf04000000008000045f5f5f5fec00feef000101000402000100070300017c9004000000008000045f5f5f5fec00feef000101000402000100070300017c7104000000008000045f5f5f5fec00feef000101000402000100070300017c5204000000008000045f5f5f5fec00feef000101000402000100070300017c3304000000008000045f5f5f5fec00feef000101000402000100070300017c1404000000008000045f5f5f5fec00feef000101000402000100070300017bf504000000008000045f5f5f5fec00feef000101000402000100070300017bd604000000008000045f5f5f5fec00feef000101000402000100070300017bb704000000008000045f5f5f5fec00feef000101000402000100070300017b9804000000008000045f5f5f5fec00feef000101000402000100070300017b7904000000008000045f5f5f5fec00feef000101000402000100070300017b5a04000000008000045f5f5f5fec00feef000101000402000100070300017b3b04000000008000045f5f5f5fec00feef000101000402000100070300017b1c04000000008000045f5f5f5fec00feef000101000402000100070300017afd04000000008000045f5f5f5fec00feef000101000402000100070300017ade04000000008000045f5f5f5fec00feef000101000402000100070300017abf04000000008000045f5f5f5fec00feef000101000402000100070300017aa004000000008000045f5f5f5fec00feef000101000402000100070300017a8104000000008000045f5f5f5fec00feef000101000402000100070300017a6204000000008000045f5f5f5fec00feef000101000402000100070300017a4304000000008000045f5f5f5fec00feef000101000402000100070300017a2404000000008000045f5f5f5fec00feef000101000402000100070300017a0504000000008000045f5f5f5fec00feef0001010004020001000703000179e604000000008000045f5f5f5fec00feef0001010004020001000703000179c704000000008000045f5f5f5fec00feef0001010004020001000703000179a804000000008000045f5f5f5fec00feef00010100040200010007030001798904000000008000045f5f5f5fec00feef00010100040200010007030001796a04000000008000045f5f5f5fec00feef00010100040200010007030001794b04000000008000045f5f5f5fec00feef00010100040200010007030001792c04000000008000045f5f5f5fec00feef00010100040200010007030001790d04000000008000045f5f5f5fec00feef0001010004020001000703000178ee04000000008000045f5f5f5fec00feef0001010004020001000703000178cf04000000008000045f5f5f5fec00feef0001010004020001000703000178b004000000008000045f5f5f5fec00feef00010100040200010007030001789104000000008000045f5f5f5fec00feef00010100040200010007030001787204000000008000045f5f5f5fec00feef00010100040200010007030001785304000000008000045f5f5f5fec00feef00010100040200010007030001783404000000008000045f5f5f5fec00feef00010100040200010007030001781504000000008000045f5f5f5fec00feef0001010004020001000703000177f604000000008000045f5f5f5fec00feef0001010004020001000703000177d704000000008000045f5f5f5fec00feef0001010004020001000703000177b804000000008000045f5f5f5fec00feef00010100040200010007030001779904000000008000045f5f5f5fec00feef00010100040200010007030001777a04000000008000045f5f5f5fec00feef00010100040200010007030001775b04000000008000045f5f5f5fec00feef00010100040200010007030001773c04000000008000045f5f5f5fec00feef00010100040200010007030001771d04000000008000045f5f5f5fec00feef0001010004020001000703000176fe04000000008000045f5f5f5fec00feef0001010004020001000703000176df04000000008000045f5f5f5fec00feef0001010004020001000703000176c004000000008000045f5f5f5fec00feef0001010004020001000703000176a104000000008000045f5f5f5fec00feef00010100040200010007030001768204000000008000045f5f5f5fec00feef00010100040200010007030001766304000000008000045f5f5f5fec00feef00010100040200010007030001764404000000008000045f5f5f5fec00feef00010100040200010007030001762504000000008000045f5f5f5fec00feef00010100040200010007030001760604000000008000045f5f5f5fec00feef0001010004020001000703000175e704000000008000045f5f5f5fec00feef0001010004020001000703000175c804000000008000045f5f5f5fec00feef0001010004020001000703000175a904000000008000045f5f5f5fec00feef00010100040200010007030001758a04000000008000045f5f5f5fec00feef00010100040200010007030001756b04000000008000045f5f5f5fec00feef00010100040200010007030001754c04000000008000045f5f5f5fec00feef00010100040200010007030001752d04000000008000045f5f5f5fec00feef00010100040200010007030001750e04000000008000045f5f5f5fec00feef0001010004020001000703000174ef04000000008000045f5f5f5fec00feef0001010004020001000703000174d004000000008000045f5f5f5fec00feef0001010004020001000703000174b104000000008000045f5f5f5fec00feef00010100040200010007030001749204000000008000045f5f5f5fec00feef00010100040200010007030001747304000000008000045f5f5f5fec00feef00010100040200010007030001745404000000008000045f5f5f5fec00feef00010100040200010007030001743504000000008000045f5f5f5fec00feef00010100040200010007030001741604000000008000045f5f5f5fec00feef0001010004020001000703000173f704000000008000045f5f5f5fec00feef0001010004020001000703000173d804000000008000045f5f5f5fec00feef0001010004020001000703000173b904000000008000045f5f5f5fec00feef00010100040200010007030001739a04000000008000045f5f5f5fec00feef00010100040200010007030001737b04000000008000045f5f5f5fec00feef00010100040200010007030001735c04000000008000045f5f5f5fec00feef00010100040200010007030001733d04000000008000045f5f5f5fec00feef00010100040200010007030001731e04000000008000045f5f5f5fec00feef0001010004020001000703000172ff04000000008000045f5f5f5fec00feef0001010004020001000703000172e004000000008000045f5f5f5fec00feef0001010004020001000703000172c104000000008000045f5f5f5fec00feef0001010004020001000703000172a204000000008000045f5f5f5fec00feef00010100040200010007030001728304000000008000045f5f5f5fec00feef00010100040200010007030001726404000000008000045f5f5f5fec00feef00010100040200010007030001724504000000008000045f5f5f5fec00feef00010100040200010007030001722604000000008000045f5f5f5fec00feef00010100040200010007030001720704000000008000045f5f5f5fec00feef0001010004020001000703000171e804000000008000045f5f5f5fec00feef0001010004020001000703000171c904000000008000045f5f5f5fec00feef0001010004020001000703000171aa04000000008000045f5f5f5fec00feef00010100040200010007030001718b04000000008000045f5f5f5fec00feef00010100040200010007030001716c04000000008000045f5f5f5fec00feef00010100040200010007030001714d04000000008000045f5f5f5fec00feef00010100040200010007030001712e04000000008000045f5f5f5fec00feef00010100040200010007030001710f04000000008000045f5f5f5fec00feef0001010004020001000703000170f004000000008000045f5f5f5fec00feef0001010004020001000703000170d104000000008000045f5f5f5fec00feef0001010004020001000703000170b204000000008000045f5f5f5fec00feef00010100040200010007030001709304000000008000045f5f5f5fec00feef00010100040200010007030001707404000000008000045f5f5f5fec00feef00010100040200010007030001705504000000008000045f5f5f5fec00feef00010100040200010007030001703604000000008000045f5f5f5fec00feef00010100040200010007030001701704000000008000045f5f5f5fec00feef000101000402000100070300016ff804000000008000045f5f5f5fec00feef000101000402000100070300016fd904000000008000045f5f5f5fec00feef000101000402000100070300016fba04000000008000045f5f5f5fec00feef000101000402000100070300016f9b04000000008000045f5f5f5fec00feef000101000402000100070300016f7c04000000008000045f5f5f5fec00feef000101000402000100070300016f5d04000000008000045f5f5f5fec00feef000101000402000100070300016f3e04000000008000045f5f5f5fec00feef000101000402000100070300016f1f04000000008000045f5f5f5fec00feef000101000402000100070300016f0004000000008000045f5f5f5fec00feef000101000402000100070300016ee104000000008000045f5f5f5fec00feef000101000402000100070300016ec204000000008000045f5f5f5fec00feef000101000402000100070300016ea304000000008000045f5f5f5fec00feef000101000402000100070300016e8404000000008000045f5f5f5fec00feef000101000402000100070300016e6504000000008000045f5f5f5fec00feef000101000402000100070300016e4604000000008000045f5f5f5fec00feef000101000402000100070300016e2704000000008000045f5f5f5fec00feef000101000402000100070300016e0804000000008000045f5f5f5fec00feef000101000402000100070300016de904000000008000045f5f5f5fec00feef000101000402000100070300016dca04000000008000045f5f5f5fec00feef000101000402000100070300016dab04000000008000045f5f5f5fec00feef000101000402000100070300016d8c04000000008000045f5f5f5fec00feef000101000402000100070300016d6d04000000008000045f5f5f5fec00feef000101000402000100070300016d4e04000000008000045f5f5f5fec00feef000101000402000100070300016d2f04000000008000045f5f5f5fec00feef000101000402000100070300016d1004000000008000045f5f5f5fec00feef000101000402000100070300016cf104000000008000045f5f5f5fec00feef000101000402000100070300016cd204000000008000045f5f5f5fec00feef000101000402000100070300016cb304000000008000045f5f5f5fec00feef000101000402000100070300016c9404000000008000045f5f5f5fec00feef000101000402000100070300016c7504000000008000045f5f5f5fec00feef000101000402000100070300016c5604000000008000045f5f5f5fec00feef000101000402000100070300016c3704000000008000045f5f5f5fec00feef000101000402000100070300016c1804000000008000045f5f5f5fec00feef000101000402000100070300016bf904000000008000045f5f5f5fec00feef000101000402000100070300016bda04000000008000045f5f5f5fec00feef000101000402000100070300016bbb04000000008000045f5f5f5fec00feef000101000402000100070300016b9c04000000008000045f5f5f5fec00feef000101000402000100070300016b7d04000000008000045f5f5f5fec00feef000101000402000100070300016b5e04000000008000045f5f5f5fec00feef000101000402000100070300016b3f04000000008000045f5f5f5fec00feef000101000402000100070300016b2004000000008000045f5f5f5fec00feef000101000402000100070300016b0104000000008000045f5f5f5fec00feef000101000402000100070300016ae204000000008000045f5f5f5fec00feef000101000402000100070300016ac304000000008000045f5f5f5fec00feef000101000402000100070300016aa404000000008000045f5f5f5fec00feef000101000402000100070300016a8504000000008000045f5f5f5fec00feef000101000402000100070300016a6604000000008000045f5f5f5fec00feef000101000402000100070300016a4704000000008000045f5f5f5fec00feef000101000402000100070300016a2804000000008000045f5f5f5fec00feef000101000402000100070300016a0904000000008000045f5f5f5fec00feef0001010004020001000703000169ea04000000008000045f5f5f5fec00feef0001010004020001000703000169cb04000000008000045f5f5f5fec00feef0001010004020001000703000169ac04000000008000045f5f5f5fec00feef00010100040200010007030001698d04000000008000045f5f5f5fec00feef00010100040200010007030001696e04000000008000045f5f5f5fec00feef00010100040200010007030001694f04000000008000045f5f5f5fec00feef00010100040200010007030001693004000000008000045f5f5f5fec00feef00010100040200010007030001691104000000008000045f5f5f5fec00feef0001010004020001000703000168f204000000008000045f5f5f5fec00feef0001010004020001000703000168d304000000008000045f5f5f5fec00feef0001010004020001000703000168b404000000008000045f5f5f5fec00feef00010100040200010007030001689504000000008000045f5f5f5fec00feef00010100040200010007030001687604000000008000045f5f5f5fec00feef00010100040200010007030001685704000000008000045f5f5f5fec00feef00010100040200010007030001683804000000008000045f5f5f5fec00feef00010100040200010007030001681904000000008000045f5f5f5fec00feef0001010004020001000703000167fa04000000008000045f5f5f5fec00feef0001010004020001000703000167db04000000008000045f5f5f5fec00feef0001010004020001000703000167bc04000000008000045f5f5f5fec00feef00010100040200010007030001679d04000000008000045f5f5f5fec00feef00010100040200010007030001677e04000000008000045f5f5f5fec00feef00010100040200010007030001675f04000000008000045f5f5f5fec00feef00010100040200010007030001674004000000008000045f5f5f5fec00feef00010100040200010007030001672104000000008000045f5f5f5fec00feef00010100040200010007030001670204000000008000045f5f5f5fec00feef0001010004020001000703000166e304000000008000045f5f5f5fec00feef0001010004020001000703000166c404000000008000045f5f5f5fec00feef0001010004020001000703000166a504000000008000045f5f5f5fec00feef00010100040200010007030001668604000000008000045f5f5f5fec00feef00010100040200010007030001666704000000008000045f5f5f5fec00feef00010100040200010007030001664804000000008000045f5f5f5fec00feef00010100040200010007030001662904000000008000045f5f5f5fec00feef00010100040200010007030001660a04000000008000045f5f5f5fec00feef0001010004020001000703000165eb04000000008000045f5f5f5fec00feef0001010004020001000703000165cc04000000008000045f5f5f5fec00feef0001010004020001000703000165ad04000000008000045f5f5f5fec00feef00010100040200010007030001658e04000000008000045f5f5f5fec00feef00010100040200010007030001656f04000000008000045f5f5f5fec00feef00010100040200010007030001655004000000008000045f5f5f5fec00feef00010100040200010007030001653104000000008000045f5f5f5fec00feef00010100040200010007030001651204000000008000045f5f5f5fec00feef0001010004020001000703000164f304000000008000045f5f5f5fec00feef0001010004020001000703000164d404000000008000045f5f5f5fec00feef0001010004020001000703000164b504000000008000045f5f5f5fec00feef00010100040200010007030001649604000000008000045f5f5f5fec00feef00010100040200010007030001647704000000008000045f5f5f5fec00feef00010100040200010007030001645804000000008000045f5f5f5fec00feef00010100040200010007030001643904000000008000045f5f5f5fec00feef00010100040200010007030001641a04000000008000045f5f5f5fec00feef0001010004020001000703000163fb04000000008000045f5f5f5fec00feef0001010004020001000703000163dc04000000008000045f5f5f5fec00feef0001010004020001000703000163bd04000000008000045f5f5f5fec00feef00010100040200010007030001639e04000000008000045f5f5f5fec00feef00010100040200010007030001637f04000000008000045f5f5f5fec00feef00010100040200010007030001636004000000008000045f5f5f5fec00feef00010100040200010007030001634104000000008000045f5f5f5fec00feef00010100040200010007030001632204000000008000045f5f5f5fec00feef00010100040200010007030001630304000000008000045f5f5f5fec00feef0001010004020001000703000162e404000000008000045f5f5f5fec00feef0001010004020001000703000162c504000000008000045f5f5f5fec00feef0001010004020001000703000162a604000000008000045f5f5f5fec00feef00010100040200010007030001628704000000008000045f5f5f5fec00feef00010100040200010007030001626804000000008000045f5f5f5fec00feef00010100040200010007030001624904000000008000045f5f5f5fec00feef00010100040200010007030001622a04000000008000045f5f5f5fec00feef00010100040200010007030001620b04000000008000045f5f5f5fec00feef0001010004020001000703000161ec04000000008000045f5f5f5fec00feef0001010004020001000703000161cd04000000008000045f5f5f5fec00feef0001010004020001000703000161ae04000000008000045f5f5f5fec00feef00010100040200010007030001618f04000000008000045f5f5f5fec00feef00010100040200010007030001617004000000008000045f5f5f5fec00feef00010100040200010007030001615104000000008000045f5f5f5fec00feef00010100040200010007030001613204000000008000045f5f5f5fec00feef00010100040200010007030001611304000000008000045f5f5f5fec00feef0001010004020001000703000160f404000000008000045f5f5f5fec00feef0001010004020001000703000160d504000000008000045f5f5f5fec00feef0001010004020001000703000160b604000000008000045f5f5f5fec00feef00010100040200010007030001609704000000008000045f5f5f5fec00feef00010100040200010007030001607804000000008000045f5f5f5fec00feef00010100040200010007030001605904000000008000045f5f5f5fec00feef00010100040200010007030001603a04000000008000045f5f5f5fec00feef00010100040200010007030001601b04000000008000045f5f5f5fec00feef000101000402000100070300015ffc04000000008000045f5f5f5fec00feef000101000402000100070300015fdd04000000008000045f5f5f5fec00feef000101000402000100070300015fbe04000000008000045f5f5f5fec00feef000101000402000100070300015f9f04000000008000045f5f5f5fec00feef000101000402000100070300015f8004000000008000045f5f5f5fec00feef000101000402000100070300015f6104000000008000045f5f5f5fec00feef000101000402000100070300015f4204000000008000045f5f5f5fec00feef000101000402000100070300015f2304000000008000045f5f5f5fec00feef000101000402000100070300015f0404000000008000045f5f5f5fec00feef000101000402000100070300015ee504000000008000045f5f5f5fec00feef000101000402000100070300015ec604000000008000045f5f5f5fec00feef000101000402000100070300015ea704000000008000045f5f5f5fec00feef000101000402000100070300015e8804000000008000045f5f5f5fec00feef000101000402000100070300015e6904000000008000045f5f5f5fec00feef000101000402000100070300015e4a04000000008000045f5f5f5fec00feef000101000402000100070300015e2b04000000008000045f5f5f5fec00feef000101000402000100070300015e0c04000000008000045f5f5f5fec00feef000101000402000100070300015ded04000000008000045f5f5f5fec00feef000101000402000100070300015dce04000000008000045f5f5f5fec00feef000101000402000100070300015daf04000000008000045f5f5f5fec00feef000101000402000100070300015d9004000000008000045f5f5f5fec00feef000101000402000100070300015d7104000000008000045f5f5f5fec00feef000101000402000100070300015d5204000000008000045f5f5f5fec00feef000101000402000100070300015d3304000000008000045f5f5f5fec00feef000101000402000100070300015d1404000000008000045f5f5f5fec00feef000101000402000100070300015cf504000000008000045f5f5f5fec00feef000101000402000100070300015cd604000000008000045f5f5f5fec00feef000101000402000100070300015cb704000000008000045f5f5f5fec00feef000101000402000100070300015c9804000000008000045f5f5f5fec00feef000101000402000100070300015c7904000000008000045f5f5f5fec00feef000101000402000100070300015c5a04000000008000045f5f5f5fec00feef000101000402000100070300015c3b04000000008000045f5f5f5fec00feef000101000402000100070300015c1c04000000008000045f5f5f5fec00feef000101000402000100070300015bfd04000000008000045f5f5f5fec00feef000101000402000100070300015bde04000000008000045f5f5f5fec00feef000101000402000100070300015bbf04000000008000045f5f5f5fec00feef000101000402000100070300015ba004000000008000045f5f5f5fec00feef000101000402000100070300015b8104000000008000045f5f5f5fec00feef000101000402000100070300015b6204000000008000045f5f5f5fec00feef000101000402000100070300015b4304000000008000045f5f5f5fec00feef000101000402000100070300015b2404000000008000045f5f5f5fec00feef000101000402000100070300015b0504000000008000045f5f5f5fec00feef000101000402000100070300015ae604000000008000045f5f5f5fec00feef000101000402000100070300015ac704000000008000045f5f5f5fec00feef000101000402000100070300015aa804000000008000045f5f5f5fec00feef000101000402000100070300015a8904000000008000045f5f5f5fec00feef000101000402000100070300015a6a04000000008000045f5f5f5fec00feef000101000402000100070300015a4b04000000008000045f5f5f5fec00feef000101000402000100070300015a2c04000000008000045f5f5f5fec00feef000101000402000100070300015a0d04000000008000045f5f5f5fec00feef0001010004020001000703000159ee04000000008000045f5f5f5fec00feef0001010004020001000703000159cf04000000008000045f5f5f5fec00feef0001010004020001000703000159b004000000008000045f5f5f5fec00feef00010100040200010007030001599104000000008000045f5f5f5fec00feef00010100040200010007030001597204000000008000045f5f5f5fec00feef00010100040200010007030001595304000000008000045f5f5f5fec00feef00010100040200010007030001593404000000008000045f5f5f5fec00feef00010100040200010007030001591504000000008000045f5f5f5fec00feef0001010004020001000703000158f604000000008000045f5f5f5fec00feef0001010004020001000703000158d704000000008000045f5f5f5fec00feef0001010004020001000703000158b804000000008000045f5f5f5fec00feef00010100040200010007030001589904000000008000045f5f5f5fec00feef00010100040200010007030001587a04000000008000045f5f5f5fec00feef00010100040200010007030001585b04000000008000045f5f5f5fec00feef00010100040200010007030001583c04000000008000045f5f5f5fec00feef00010100040200010007030001581d04000000008000045f5f5f5fec00feef0001010004020001000703000157fe04000000008000045f5f5f5fec00feef0001010004020001000703000157df04000000008000045f5f5f5fec00feef0001010004020001000703000157c004000000008000045f5f5f5fec00feef0001010004020001000703000157a104000000008000045f5f5f5fec00feef00010100040200010007030001578204000000008000045f5f5f5fec00feef00010100040200010007030001576304000000008000045f5f5f5fec00feef00010100040200010007030001574404000000008000045f5f5f5fec00feef00010100040200010007030001572504000000008000045f5f5f5fec00feef00010100040200010007030001570604000000008000045f5f5f5fec00feef0001010004020001000703000156e704000000008000045f5f5f5fec00feef0001010004020001000703000156c804000000008000045f5f5f5fec00feef0001010004020001000703000156a904000000008000045f5f5f5fec00feef00010100040200010007030001568a04000000008000045f5f5f5fec00feef00010100040200010007030001566b04000000008000045f5f5f5fec00feef00010100040200010007030001564c04000000008000045f5f5f5fec00feef00010100040200010007030001562d04000000008000045f5f5f5fec00feef00010100040200010007030001560e04000000008000045f5f5f5fec00feef0001010004020001000703000155ef04000000008000045f5f5f5fec00feef0001010004020001000703000155d004000000008000045f5f5f5fec00feef0001010004020001000703000155b104000000008000045f5f5f5fec00feef00010100040200010007030001559204000000008000045f5f5f5fec00feef00010100040200010007030001557304000000008000045f5f5f5fec00feef00010100040200010007030001555404000000008000045f5f5f5fec00feef00010100040200010007030001553504000000008000045f5f5f5fec00feef00010100040200010007030001551604000000008000045f5f5f5fec00feef0001010004020001000703000154f704000000008000045f5f5f5fec00feef0001010004020001000703000154d804000000008000045f5f5f5fec00feef0001010004020001000703000154b904000000008000045f5f5f5fec00feef00010100040200010007030001549a04000000008000045f5f5f5fec00feef00010100040200010007030001547b04000000008000045f5f5f5fec00feef00010100040200010007030001545c04000000008000045f5f5f5fec00feef00010100040200010007030001543d04000000008000045f5f5f5fec00feef00010100040200010007030001541e04000000008000045f5f5f5fec00feef0001010004020001000703000153ff04000000008000045f5f5f5fec00feef0001010004020001000703000153e004000000008000045f5f5f5fec00feef0001010004020001000703000153c104000000008000045f5f5f5fec00feef0001010004020001000703000153a204000000008000045f5f5f5fec00feef00010100040200010007030001538304000000008000045f5f5f5fec00feef00010100040200010007030001536404000000008000045f5f5f5fec00feef00010100040200010007030001534504000000008000045f5f5f5fec00feef00010100040200010007030001532604000000008000045f5f5f5fec00feef00010100040200010007030001530704000000008000045f5f5f5fec00feef0001010004020001000703000152e804000000008000045f5f5f5fec00feef0001010004020001000703000152c904000000008000045f5f5f5fec00feef0001010004020001000703000152aa04000000008000045f5f5f5fec00feef00010100040200010007030001528b04000000008000045f5f5f5fec00feef00010100040200010007030001526c04000000008000045f5f5f5fec00feef00010100040200010007030001524d04000000008000045f5f5f5fec00feef00010100040200010007030001522e04000000008000045f5f5f5fec00feef00010100040200010007030001520f04000000008000045f5f5f5fec00feef0001010004020001000703000151f004000000008000045f5f5f5fec00feef0001010004020001000703000151d104000000008000045f5f5f5fec00feef0001010004020001000703000151b204000000008000045f5f5f5fec00feef00010100040200010007030001519304000000008000045f5f5f5fec00feef00010100040200010007030001517404000000008000045f5f5f5fec00feef00010100040200010007030001515504000000008000045f5f5f5fec00feef00010100040200010007030001513604000000008000045f5f5f5fec00feef00010100040200010007030001511704000000008000045f5f5f5fec00feef0001010004020001000703000150f804000000008000045f5f5f5fec00feef0001010004020001000703000150d904000000008000045f5f5f5fec00feef0001010004020001000703000150ba04000000008000045f5f5f5fec00feef00010100040200010007030001509b04000000008000045f5f5f5fec00feef00010100040200010007030001507c04000000008000045f5f5f5fec00feef00010100040200010007030001505d04000000008000045f5f5f5fec00feef00010100040200010007030001503e04000000008000045f5f5f5fec00feef00010100040200010007030001501f04000000008000045f5f5f5fec00feef00010100040200010007030001500004000000008000045f5f5f5fec00feef000101000402000100070300014fe104000000008000045f5f5f5fec00feef000101000402000100070300014fc204000000008000045f5f5f5fec00feef000101000402000100070300014fa304000000008000045f5f5f5fec00feef000101000402000100070300014f8404000000008000045f5f5f5fec00feef000101000402000100070300014f6504000000008000045f5f5f5fec00feef000101000402000100070300014f4604000000008000045f5f5f5fec00feef000101000402000100070300014f2704000000008000045f5f5f5fec00feef000101000402000100070300014f0804000000008000045f5f5f5fec00feef000101000402000100070300014ee904000000008000045f5f5f5fec00feef000101000402000100070300014eca04000000008000045f5f5f5fec00feef000101000402000100070300014eab04000000008000045f5f5f5fec00feef000101000402000100070300014e8c04000000008000045f5f5f5fec00feef000101000402000100070300014e6d04000000008000045f5f5f5fec00feef000101000402000100070300014e4e04000000008000045f5f5f5fec00feef000101000402000100070300014e2f04000000008000045f5f5f5fec00feef000101000402000100070300014e1004000000008000045f5f5f5fec00feef000101000402000100070300014df104000000008000045f5f5f5fec00feef000101000402000100070300014dd204000000008000045f5f5f5fec00feef000101000402000100070300014db304000000008000045f5f5f5fec00feef000101000402000100070300014d9404000000008000045f5f5f5fec00feef000101000402000100070300014d7504000000008000045f5f5f5fec00feef000101000402000100070300014d5604000000008000045f5f5f5fec00feef000101000402000100070300014d3704000000008000045f5f5f5fec00feef000101000402000100070300014d1804000000008000045f5f5f5fec00feef000101000402000100070300014cf904000000008000045f5f5f5fec00feef000101000402000100070300014cda04000000008000045f5f5f5fec00feef000101000402000100070300014cbb04000000008000045f5f5f5fec00feef000101000402000100070300014c9c04000000008000045f5f5f5fec00feef000101000402000100070300014c7d04000000008000045f5f5f5fec00feef000101000402000100070300014c5e04000000008000045f5f5f5fec00feef000101000402000100070300014c3f04000000008000045f5f5f5fec00feef000101000402000100070300014c2004000000008000045f5f5f5fec00feef000101000402000100070300014c0104000000008000045f5f5f5fec00feef000101000402000100070300014be204000000008000045f5f5f5fec00feef000101000402000100070300014bc304000000008000045f5f5f5fec00feef000101000402000100070300014ba404000000008000045f5f5f5fec00feef000101000402000100070300014b8504000000008000045f5f5f5fec00feef000101000402000100070300014b6604000000008000045f5f5f5fec00feef000101000402000100070300014b4704000000008000045f5f5f5fec00feef000101000402000100070300014b2804000000008000045f5f5f5fec00feef000101000402000100070300014b0904000000008000045f5f5f5fec00feef000101000402000100070300014aea04000000008000045f5f5f5fec00feef000101000402000100070300014acb04000000008000045f5f5f5fec00feef000101000402000100070300014aac04000000008000045f5f5f5fec00feef000101000402000100070300014a8d04000000008000045f5f5f5fec00feef000101000402000100070300014a6e04000000008000045f5f5f5fec00feef000101000402000100070300014a4f04000000008000045f5f5f5fec00feef000101000402000100070300014a3004000000008000045f5f5f5fec00feef000101000402000100070300014a1104000000008000045f5f5f5fec00feef0001010004020001000703000149f204000000008000045f5f5f5fec00feef0001010004020001000703000149d304000000008000045f5f5f5fec00feef0001010004020001000703000149b404000000008000045f5f5f5fec00feef00010100040200010007030001499504000000008000045f5f5f5fec00feef00010100040200010007030001497604000000008000045f5f5f5fec00feef00010100040200010007030001495704000000008000045f5f5f5fec00feef00010100040200010007030001493804000000008000045f5f5f5fec00feef00010100040200010007030001491904000000008000045f5f5f5fec00feef0001010004020001000703000148fa04000000008000045f5f5f5fec00feef0001010004020001000703000148db04000000008000045f5f5f5fec00feef0001010004020001000703000148bc04000000008000045f5f5f5fec00feef00010100040200010007030001489d04000000008000045f5f5f5fec00feef00010100040200010007030001487e04000000008000045f5f5f5fec00feef00010100040200010007030001485f04000000008000045f5f5f5fec00feef00010100040200010007030001484004000000008000045f5f5f5fec00feef00010100040200010007030001482104000000008000045f5f5f5fec00feef00010100040200010007030001480204000000008000045f5f5f5fec00feef0001010004020001000703000147e304000000008000045f5f5f5fec00feef0001010004020001000703000147c404000000008000045f5f5f5fec00feef0001010004020001000703000147a504000000008000045f5f5f5fec00feef00010100040200010007030001478604000000008000045f5f5f5fec00feef00010100040200010007030001476704000000008000045f5f5f5fec00feef00010100040200010007030001474804000000008000045f5f5f5fec00feef00010100040200010007030001472904000000008000045f5f5f5fec00feef00010100040200010007030001470a04000000008000045f5f5f5fec00feef0001010004020001000703000146eb04000000008000045f5f5f5fec00feef0001010004020001000703000146cc04000000008000045f5f5f5fec00feef0001010004020001000703000146ad04000000008000045f5f5f5fec00feef00010100040200010007030001468e04000000008000045f5f5f5fec00feef00010100040200010007030001466f04000000008000045f5f5f5fec00feef00010100040200010007030001465004000000008000045f5f5f5fec00feef00010100040200010007030001463104000000008000045f5f5f5fec00feef00010100040200010007030001461204000000008000045f5f5f5fec00feef0001010004020001000703000145f304000000008000045f5f5f5fec00feef0001010004020001000703000145d404000000008000045f5f5f5fec00feef0001010004020001000703000145b504000000008000045f5f5f5fec00feef00010100040200010007030001459604000000008000045f5f5f5fec00feef00010100040200010007030001457704000000008000045f5f5f5fec00feef00010100040200010007030001455804000000008000045f5f5f5fec00feef00010100040200010007030001453904000000008000045f5f5f5fec00feef00010100040200010007030001451a04000000008000045f5f5f5fec00feef0001010004020001000703000144fb04000000008000045f5f5f5fec00feef0001010004020001000703000144dc04000000008000045f5f5f5fec00feef0001010004020001000703000144bd04000000008000045f5f5f5fec00feef00010100040200010007030001449e04000000008000045f5f5f5fec00feef00010100040200010007030001447f04000000008000045f5f5f5fec00feef00010100040200010007030001446004000000008000045f5f5f5fec00feef00010100040200010007030001444104000000008000045f5f5f5fec00feef00010100040200010007030001442204000000008000045f5f5f5fec00feef00010100040200010007030001440304000000008000045f5f5f5fec00feef0001010004020001000703000143e404000000008000045f5f5f5fec00feef0001010004020001000703000143c504000000008000045f5f5f5fec00feef0001010004020001000703000143a604000000008000045f5f5f5fec00feef00010100040200010007030001438704000000008000045f5f5f5fec00feef00010100040200010007030001436804000000008000045f5f5f5fec00feef00010100040200010007030001434904000000008000045f5f5f5fec00feef00010100040200010007030001432a04000000008000045f5f5f5fec00feef00010100040200010007030001430b04000000008000045f5f5f5fec00feef0001010004020001000703000142ec04000000008000045f5f5f5fec00feef0001010004020001000703000142cd04000000008000045f5f5f5fec00feef0001010004020001000703000142ae04000000008000045f5f5f5fec00feef00010100040200010007030001428f04000000008000045f5f5f5fec00feef00010100040200010007030001427004000000008000045f5f5f5fec00feef00010100040200010007030001425104000000008000045f5f5f5fec00feef00010100040200010007030001423204000000008000045f5f5f5fec00feef00010100040200010007030001421304000000008000045f5f5f5fec00feef0001010004020001000703000141f404000000008000045f5f5f5fec00feef0001010004020001000703000141d504000000008000045f5f5f5fec00feef0001010004020001000703000141b604000000008000045f5f5f5fec00feef00010100040200010007030001419704000000008000045f5f5f5fec00feef00010100040200010007030001417804000000008000045f5f5f5fec00feef00010100040200010007030001415904000000008000045f5f5f5fec00feef00010100040200010007030001413a04000000008000045f5f5f5fec00feef00010100040200010007030001411b04000000008000045f5f5f5fec00feef0001010004020001000703000140fc04000000008000045f5f5f5fec00feef0001010004020001000703000140dd04000000008000045f5f5f5fec00feef0001010004020001000703000140be04000000008000045f5f5f5fec00feef00010100040200010007030001409f04000000008000045f5f5f5fec00feef00010100040200010007030001408004000000008000045f5f5f5fec00feef00010100040200010007030001406104000000008000045f5f5f5fec00feef00010100040200010007030001404204000000008000045f5f5f5fec00feef00010100040200010007030001402304000000008000045f5f5f5fec00feef00010100040200010007030001400404000000008000045f5f5f5fec00feef000101000402000100070300013fe504000000008000045f5f5f5fec00feef000101000402000100070300013fc604000000008000045f5f5f5fec00feef000101000402000100070300013fa704000000008000045f5f5f5fec00feef000101000402000100070300013f8804000000008000045f5f5f5fec00feef000101000402000100070300013f6904000000008000045f5f5f5fec00feef000101000402000100070300013f4a04000000008000045f5f5f5fec00feef000101000402000100070300013f2b04000000008000045f5f5f5fec00feef000101000402000100070300013f0c04000000008000045f5f5f5fec00feef000101000402000100070300013eed04000000008000045f5f5f5fec00feef000101000402000100070300013ece04000000008000045f5f5f5fec00feef000101000402000100070300013eaf04000000008000045f5f5f5fec00feef000101000402000100070300013e9004000000008000045f5f5f5fec00feef000101000402000100070300013e7104000000008000045f5f5f5fec00feef000101000402000100070300013e5204000000008000045f5f5f5fec00feef000101000402000100070300013e3304000000008000045f5f5f5fec00feef000101000402000100070300013e1404000000008000045f5f5f5fec00feef000101000402000100070300013df504000000008000045f5f5f5fec00feef000101000402000100070300013dd604000000008000045f5f5f5fec00feef000101000402000100070300013db704000000008000045f5f5f5fec00feef000101000402000100070300013d9804000000008000045f5f5f5fec00feef000101000402000100070300013d7904000000008000045f5f5f5fec00feef000101000402000100070300013d5a04000000008000045f5f5f5fec00feef000101000402000100070300013d3b04000000008000045f5f5f5fec00feef000101000402000100070300013d1c04000000008000045f5f5f5fec00feef000101000402000100070300013cfd04000000008000045f5f5f5fec00feef000101000402000100070300013cde04000000008000045f5f5f5fec00feef000101000402000100070300013cbf04000000008000045f5f5f5fec00feef000101000402000100070300013ca004000000008000045f5f5f5fec00feef000101000402000100070300013c8104000000008000045f5f5f5fec00feef000101000402000100070300013c6204000000008000045f5f5f5fec00feef000101000402000100070300013c4304000000008000045f5f5f5fec00feef000101000402000100070300013c2404000000008000045f5f5f5fec00feef000101000402000100070300013c0504000000008000045f5f5f5fec00feef000101000402000100070300013be604000000008000045f5f5f5fec00feef000101000402000100070300013bc704000000008000045f5f5f5fec00feef000101000402000100070300013ba804000000008000045f5f5f5fec00feef000101000402000100070300013b8904000000008000045f5f5f5fec00feef000101000402000100070300013b6a04000000008000045f5f5f5fec00feef000101000402000100070300013b4b04000000008000045f5f5f5fec00feef000101000402000100070300013b2c04000000008000045f5f5f5fec00feef000101000402000100070300013b0d04000000008000045f5f5f5fec00feef000101000402000100070300013aee04000000008000045f5f5f5fec00feef000101000402000100070300013acf04000000008000045f5f5f5fec00feef000101000402000100070300013ab004000000008000045f5f5f5fec00feef000101000402000100070300013a9104000000008000045f5f5f5fec00feef000101000402000100070300013a7204000000008000045f5f5f5fec00feef000101000402000100070300013a5304000000008000045f5f5f5fec00feef000101000402000100070300013a3404000000008000045f5f5f5fec00feef000101000402000100070300013a1504000000008000045f5f5f5fec00feef0001010004020001000703000139f604000000008000045f5f5f5fec00feef0001010004020001000703000139d704000000008000045f5f5f5fec00feef0001010004020001000703000139b804000000008000045f5f5f5fec00feef00010100040200010007030001399904000000008000045f5f5f5fec00feef00010100040200010007030001397a04000000008000045f5f5f5fec00feef00010100040200010007030001395b04000000008000045f5f5f5fec00feef00010100040200010007030001393c04000000008000045f5f5f5fec00feef00010100040200010007030001391d04000000008000045f5f5f5fec00feef0001010004020001000703000138fe04000000008000045f5f5f5fec00feef0001010004020001000703000138df04000000008000045f5f5f5fec00feef0001010004020001000703000138c004000000008000045f5f5f5fec00feef0001010004020001000703000138a104000000008000045f5f5f5fec00feef00010100040200010007030001388204000000008000045f5f5f5fec00feef00010100040200010007030001386304000000008000045f5f5f5fec00feef00010100040200010007030001384404000000008000045f5f5f5fec00feef00010100040200010007030001382504000000008000045f5f5f5fec00feef00010100040200010007030001380604000000008000045f5f5f5fec00feef0001010004020001000703000137e704000000008000045f5f5f5fec00feef0001010004020001000703000137c804000000008000045f5f5f5fec00feef0001010004020001000703000137a904000000008000045f5f5f5fec00feef00010100040200010007030001378a04000000008000045f5f5f5fec00feef00010100040200010007030001376b04000000008000045f5f5f5fec00feef00010100040200010007030001374c04000000008000045f5f5f5fec00feef00010100040200010007030001372d04000000008000045f5f5f5fec00feef00010100040200010007030001370e04000000008000045f5f5f5fec00feef0001010004020001000703000136ef04000000008000045f5f5f5fec00feef0001010004020001000703000136d004000000008000045f5f5f5fec00feef0001010004020001000703000136b104000000008000045f5f5f5fec00feef00010100040200010007030001369204000000008000045f5f5f5fec00feef00010100040200010007030001367304000000008000045f5f5f5fec00feef00010100040200010007030001365404000000008000045f5f5f5fec00feef00010100040200010007030001363504000000008000045f5f5f5fec00feef00010100040200010007030001361604000000008000045f5f5f5fec00feef0001010004020001000703000135f704000000008000045f5f5f5fec00feef0001010004020001000703000135d804000000008000045f5f5f5fec00feef0001010004020001000703000135b904000000008000045f5f5f5fec00feef00010100040200010007030001359a04000000008000045f5f5f5fec00feef00010100040200010007030001357b04000000008000045f5f5f5fec00feef00010100040200010007030001355c04000000008000045f5f5f5fec00feef00010100040200010007030001353d04000000008000045f5f5f5fec00feef00010100040200010007030001351e04000000008000045f5f5f5fec00feef0001010004020001000703000134ff04000000008000045f5f5f5fec00feef0001010004020001000703000134e004000000008000045f5f5f5fec00feef0001010004020001000703000134c104000000008000045f5f5f5fec00feef0001010004020001000703000134a204000000008000045f5f5f5fec00feef00010100040200010007030001348304000000008000045f5f5f5fec00feef00010100040200010007030001346404000000008000045f5f5f5fec00feef00010100040200010007030001344504000000008000045f5f5f5fec00feef00010100040200010007030001342604000000008000045f5f5f5fec00feef00010100040200010007030001340704000000008000045f5f5f5fec00feef0001010004020001000703000133e804000000008000045f5f5f5fec00feef0001010004020001000703000133c904000000008000045f5f5f5fec00feef0001010004020001000703000133aa04000000008000045f5f5f5fec00feef00010100040200010007030001338b04000000008000045f5f5f5fec00feef00010100040200010007030001336c04000000008000045f5f5f5fec00feef00010100040200010007030001334d04000000008000045f5f5f5fec00feef00010100040200010007030001332e04000000008000045f5f5f5fec00feef00010100040200010007030001330f04000000008000045f5f5f5fec00feef0001010004020001000703000132f004000000008000045f5f5f5fec00feef0001010004020001000703000132d104000000008000045f5f5f5fec00feef0001010004020001000703000132b204000000008000045f5f5f5fec00feef00010100040200010007030001329304000000008000045f5f5f5fec00feef00010100040200010007030001327404000000008000045f5f5f5fec00feef00010100040200010007030001325504000000008000045f5f5f5fec00feef00010100040200010007030001323604000000008000045f5f5f5fec00feef00010100040200010007030001321704000000008000045f5f5f5fec00feef0001010004020001000703000131f804000000008000045f5f5f5fec00feef0001010004020001000703000131d904000000008000045f5f5f5fec00feef0001010004020001000703000131ba04000000008000045f5f5f5fec00feef00010100040200010007030001319b04000000008000045f5f5f5fec00feef00010100040200010007030001317c04000000008000045f5f5f5fec00feef00010100040200010007030001315d04000000008000045f5f5f5fec00feef00010100040200010007030001313e04000000008000045f5f5f5fec00feef00010100040200010007030001311f04000000008000045f5f5f5fec00feef00010100040200010007030001310004000000008000045f5f5f5fec00feef0001010004020001000703000130e104000000008000045f5f5f5fec00feef0001010004020001000703000130c204000000008000045f5f5f5fec00feef0001010004020001000703000130a304000000008000045f5f5f5fec00feef00010100040200010007030001308404000000008000045f5f5f5fec00feef00010100040200010007030001306504000000008000045f5f5f5fec00feef00010100040200010007030001304604000000008000045f5f5f5fec00feef00010100040200010007030001302704000000008000045f5f5f5fec00feef00010100040200010007030001300804000000008000045f5f5f5fec00feef000101000402000100070300012fe904000000008000045f5f5f5fec00feef000101000402000100070300012fca04000000008000045f5f5f5fec00feef000101000402000100070300012fab04000000008000045f5f5f5fec00feef000101000402000100070300012f8c04000000008000045f5f5f5fec00feef000101000402000100070300012f6d04000000008000045f5f5f5fec00feef000101000402000100070300012f4e04000000008000045f5f5f5fec00feef000101000402000100070300012f2f04000000008000045f5f5f5fec00feef000101000402000100070300012f1004000000008000045f5f5f5fec00feef000101000402000100070300012ef104000000008000045f5f5f5fec00feef000101000402000100070300012ed204000000008000045f5f5f5fec00feef000101000402000100070300012eb304000000008000045f5f5f5fec00feef000101000402000100070300012e9404000000008000045f5f5f5fec00feef000101000402000100070300012e7504000000008000045f5f5f5fec00feef000101000402000100070300012e5604000000008000045f5f5f5fec00feef000101000402000100070300012e3704000000008000045f5f5f5fec00feef000101000402000100070300012e1804000000008000045f5f5f5fec00feef000101000402000100070300012df904000000008000045f5f5f5fec00feef000101000402000100070300012dda04000000008000045f5f5f5fec00feef000101000402000100070300012dbb04000000008000045f5f5f5fec00feef000101000402000100070300012d9c04000000008000045f5f5f5fec00feef000101000402000100070300012d7d04000000008000045f5f5f5fec00feef000101000402000100070300012d5e04000000008000045f5f5f5fec00feef000101000402000100070300012d3f04000000008000045f5f5f5fec00feef000101000402000100070300012d2004000000008000045f5f5f5fec00feef000101000402000100070300012d0104000000008000045f5f5f5fec00feef000101000402000100070300012ce204000000008000045f5f5f5fec00feef000101000402000100070300012cc304000000008000045f5f5f5fec00feef000101000402000100070300012ca404000000008000045f5f5f5fec00feef000101000402000100070300012c8504000000008000045f5f5f5fec00feef000101000402000100070300012c6604000000008000045f5f5f5fec00feef000101000402000100070300012c4704000000008000045f5f5f5fec00feef000101000402000100070300012c2804000000008000045f5f5f5fec00feef000101000402000100070300012c0904000000008000045f5f5f5fec00feef000101000402000100070300012bea04000000008000045f5f5f5fec00feef000101000402000100070300012bcb04000000008000045f5f5f5fec00feef000101000402000100070300012bac04000000008000045f5f5f5fec00feef000101000402000100070300012b8d04000000008000045f5f5f5fec00feef000101000402000100070300012b6e04000000008000045f5f5f5fec00feef000101000402000100070300012b4f04000000008000045f5f5f5fec00feef000101000402000100070300012b3004000000008000045f5f5f5fec00feef000101000402000100070300012b1104000000008000045f5f5f5fec00feef000101000402000100070300012af204000000008000045f5f5f5fec00feef000101000402000100070300012ad304000000008000045f5f5f5fec00feef000101000402000100070300012ab404000000008000045f5f5f5fec00feef000101000402000100070300012a9504000000008000045f5f5f5fec00feef000101000402000100070300012a7604000000008000045f5f5f5fec00feef000101000402000100070300012a5704000000008000045f5f5f5fec00feef000101000402000100070300012a3804000000008000045f5f5f5fec00feef000101000402000100070300012a1904000000008000045f5f5f5fec00feef0001010004020001000703000129fa04000000008000045f5f5f5fec00feef0001010004020001000703000129db04000000008000045f5f5f5fec00feef0001010004020001000703000129bc04000000008000045f5f5f5fec00feef00010100040200010007030001299d04000000008000045f5f5f5fec00feef00010100040200010007030001297e04000000008000045f5f5f5fec00feef00010100040200010007030001295f04000000008000045f5f5f5fec00feef00010100040200010007030001294004000000008000045f5f5f5fec00feef00010100040200010007030001292104000000008000045f5f5f5fec00feef00010100040200010007030001290204000000008000045f5f5f5fec00feef0001010004020001000703000128e304000000008000045f5f5f5fec00feef0001010004020001000703000128c404000000008000045f5f5f5fec00feef0001010004020001000703000128a504000000008000045f5f5f5fec00feef00010100040200010007030001288604000000008000045f5f5f5fec00feef00010100040200010007030001286704000000008000045f5f5f5fec00feef00010100040200010007030001284804000000008000045f5f5f5fec00feef00010100040200010007030001282904000000008000045f5f5f5fec00feef00010100040200010007030001280a04000000008000045f5f5f5fec00feef0001010004020001000703000127eb04000000008000045f5f5f5fec00feef0001010004020001000703000127cc04000000008000045f5f5f5fec00feef0001010004020001000703000127ad04000000008000045f5f5f5fec00feef00010100040200010007030001278e04000000008000045f5f5f5fec00feef00010100040200010007030001276f04000000008000045f5f5f5fec00feef00010100040200010007030001275004000000008000045f5f5f5fec00feef00010100040200010007030001273104000000008000045f5f5f5fec00feef00010100040200010007030001271204000000008000045f5f5f5fec00feef0001010004020001000703000126f304000000008000045f5f5f5fec00feef0001010004020001000703000126d404000000008000045f5f5f5fec00feef0001010004020001000703000126b504000000008000045f5f5f5fec00feef00010100040200010007030001269604000000008000045f5f5f5fec00feef00010100040200010007030001267704000000008000045f5f5f5fec00feef00010100040200010007030001265804000000008000045f5f5f5fec00feef00010100040200010007030001263904000000008000045f5f5f5fec00feef00010100040200010007030001261a04000000008000045f5f5f5fec00feef0001010004020001000703000125fb04000000008000045f5f5f5fec00feef0001010004020001000703000125dc04000000008000045f5f5f5fec00feef0001010004020001000703000125bd04000000008000045f5f5f5fec00feef00010100040200010007030001259e04000000008000045f5f5f5fec00feef00010100040200010007030001257f04000000008000045f5f5f5fec00feef00010100040200010007030001256004000000008000045f5f5f5fec00feef00010100040200010007030001254104000000008000045f5f5f5fec00feef00010100040200010007030001252204000000008000045f5f5f5fec00feef00010100040200010007030001250304000000008000045f5f5f5fec00feef0001010004020001000703000124e404000000008000045f5f5f5fec00feef0001010004020001000703000124c504000000008000045f5f5f5fec00feef0001010004020001000703000124a604000000008000045f5f5f5fec00feef00010100040200010007030001248704000000008000045f5f5f5fec00feef00010100040200010007030001246804000000008000045f5f5f5fec00feef00010100040200010007030001244904000000008000045f5f5f5fec00feef00010100040200010007030001242a04000000008000045f5f5f5fec00feef00010100040200010007030001240b04000000008000045f5f5f5fec00feef0001010004020001000703000123ec04000000008000045f5f5f5fec00feef0001010004020001000703000123cd04000000008000045f5f5f5fec00feef0001010004020001000703000123ae04000000008000045f5f5f5fec00feef00010100040200010007030001238f04000000008000045f5f5f5fec00feef00010100040200010007030001237004000000008000045f5f5f5fec00feef00010100040200010007030001235104000000008000045f5f5f5fec00feef00010100040200010007030001233204000000008000045f5f5f5fec00feef00010100040200010007030001231304000000008000045f5f5f5fec00feef0001010004020001000703000122f404000000008000045f5f5f5fec00feef0001010004020001000703000122d504000000008000045f5f5f5fec00feef0001010004020001000703000122b604000000008000045f5f5f5fec00feef00010100040200010007030001229704000000008000045f5f5f5fec00feef00010100040200010007030001227804000000008000045f5f5f5fec00feef00010100040200010007030001225904000000008000045f5f5f5fec00feef00010100040200010007030001223a04000000008000045f5f5f5fec00feef00010100040200010007030001221b04000000008000045f5f5f5fec00feef0001010004020001000703000121fc04000000008000045f5f5f5fec00feef0001010004020001000703000121dd04000000008000045f5f5f5fec00feef0001010004020001000703000121be04000000008000045f5f5f5fec00feef00010100040200010007030001219f04000000008000045f5f5f5fec00feef00010100040200010007030001218004000000008000045f5f5f5fec00feef00010100040200010007030001216104000000008000045f5f5f5fec00feef00010100040200010007030001214204000000008000045f5f5f5fec00feef00010100040200010007030001212304000000008000045f5f5f5fec00feef00010100040200010007030001210404000000008000045f5f5f5fec00feef0001010004020001000703000120e504000000008000045f5f5f5fec00feef0001010004020001000703000120c604000000008000045f5f5f5fec00feef0001010004020001000703000120a704000000008000045f5f5f5fec00feef00010100040200010007030001208804000000008000045f5f5f5fec00feef00010100040200010007030001206904000000008000045f5f5f5fec00feef00010100040200010007030001204a04000000008000045f5f5f5fec00feef00010100040200010007030001202b04000000008000045f5f5f5fec00feef00010100040200010007030001200c04000000008000045f5f5f5fec00feef000101000402000100070300011fed04000000008000045f5f5f5fec00feef000101000402000100070300011fce04000000008000045f5f5f5fec00feef000101000402000100070300011faf04000000008000045f5f5f5fec00feef000101000402000100070300011f9004000000008000045f5f5f5fec00feef000101000402000100070300011f7104000000008000045f5f5f5fec00feef000101000402000100070300011f5204000000008000045f5f5f5fec00feef000101000402000100070300011f3304000000008000045f5f5f5fec00feef000101000402000100070300011f1404000000008000045f5f5f5fec00feef000101000402000100070300011ef504000000008000045f5f5f5fec00feef000101000402000100070300011ed604000000008000045f5f5f5fec00feef000101000402000100070300011eb704000000008000045f5f5f5fec00feef000101000402000100070300011e9804000000008000045f5f5f5fec00feef000101000402000100070300011e7904000000008000045f5f5f5fec00feef000101000402000100070300011e5a04000000008000045f5f5f5fec00feef000101000402000100070300011e3b04000000008000045f5f5f5fec00feef000101000402000100070300011e1c04000000008000045f5f5f5fec00feef000101000402000100070300011dfd04000000008000045f5f5f5fec00feef000101000402000100070300011dde04000000008000045f5f5f5fec00feef000101000402000100070300011dbf04000000008000045f5f5f5fec00feef000101000402000100070300011da004000000008000045f5f5f5fec00feef000101000402000100070300011d8104000000008000045f5f5f5fec00feef000101000402000100070300011d6204000000008000045f5f5f5fec00feef000101000402000100070300011d4304000000008000045f5f5f5fec00feef000101000402000100070300011d2404000000008000045f5f5f5fec00feef000101000402000100070300011d0504000000008000045f5f5f5fec00feef000101000402000100070300011ce604000000008000045f5f5f5fec00feef000101000402000100070300011cc704000000008000045f5f5f5fec00feef000101000402000100070300011ca804000000008000045f5f5f5fec00feef000101000402000100070300011c8904000000008000045f5f5f5fec00feef000101000402000100070300011c6a04000000008000045f5f5f5fec00feef000101000402000100070300011c4b04000000008000045f5f5f5fec00feef000101000402000100070300011c2c04000000008000045f5f5f5fec00feef000101000402000100070300011c0d04000000008000045f5f5f5fec00feef000101000402000100070300011bee04000000008000045f5f5f5fec00feef000101000402000100070300011bcf04000000008000045f5f5f5fec00feef000101000402000100070300011bb004000000008000045f5f5f5fec00feef000101000402000100070300011b9104000000008000045f5f5f5fec00feef000101000402000100070300011b7204000000008000045f5f5f5fec00feef000101000402000100070300011b5304000000008000045f5f5f5fec00feef000101000402000100070300011b3404000000008000045f5f5f5fec00feef000101000402000100070300011b1504000000008000045f5f5f5fec00feef000101000402000100070300011af604000000008000045f5f5f5fec00feef000101000402000100070300011ad704000000008000045f5f5f5fec00feef000101000402000100070300011ab804000000008000045f5f5f5fec00feef000101000402000100070300011a9904000000008000045f5f5f5fec00feef000101000402000100070300011a7a04000000008000045f5f5f5fec00feef000101000402000100070300011a5b04000000008000045f5f5f5fec00feef000101000402000100070300011a3c04000000008000045f5f5f5fec00feef000101000402000100070300011a1d04000000008000045f5f5f5fec00feef0001010004020001000703000119fe04000000008000045f5f5f5fec00feef0001010004020001000703000119df04000000008000045f5f5f5fec00feef0001010004020001000703000119c004000000008000045f5f5f5fec00feef0001010004020001000703000119a104000000008000045f5f5f5fec00feef00010100040200010007030001198204000000008000045f5f5f5fec00feef00010100040200010007030001196304000000008000045f5f5f5fec00feef00010100040200010007030001194404000000008000045f5f5f5fec00feef00010100040200010007030001192504000000008000045f5f5f5fec00feef00010100040200010007030001190604000000008000045f5f5f5fec00feef0001010004020001000703000118e704000000008000045f5f5f5fec00feef0001010004020001000703000118c804000000008000045f5f5f5fec00feef0001010004020001000703000118a904000000008000045f5f5f5fec00feef00010100040200010007030001188a04000000008000045f5f5f5fec00feef00010100040200010007030001186b04000000008000045f5f5f5fec00feef00010100040200010007030001184c04000000008000045f5f5f5fec00feef00010100040200010007030001182d04000000008000045f5f5f5fec00feef00010100040200010007030001180e04000000008000045f5f5f5fec00feef0001010004020001000703000117ef04000000008000045f5f5f5fec00feef0001010004020001000703000117d004000000008000045f5f5f5fec00feef0001010004020001000703000117b104000000008000045f5f5f5fec00feef00010100040200010007030001179204000000008000045f5f5f5fec00feef00010100040200010007030001177304000000008000045f5f5f5fec00feef00010100040200010007030001175404000000008000045f5f5f5fec00feef00010100040200010007030001173504000000008000045f5f5f5fec00feef00010100040200010007030001171604000000008000045f5f5f5fec00feef0001010004020001000703000116f704000000008000045f5f5f5fec00feef0001010004020001000703000116d804000000008000045f5f5f5fec00feef0001010004020001000703000116b904000000008000045f5f5f5fec00feef00010100040200010007030001169a04000000008000045f5f5f5fec00feef00010100040200010007030001167b04000000008000045f5f5f5fec00feef00010100040200010007030001165c04000000008000045f5f5f5fec00feef00010100040200010007030001163d04000000008000045f5f5f5fec00feef00010100040200010007030001161e04000000008000045f5f5f5fec00feef0001010004020001000703000115ff04000000008000045f5f5f5fec00feef0001010004020001000703000115e004000000008000045f5f5f5fec00feef0001010004020001000703000115c104000000008000045f5f5f5fec00feef0001010004020001000703000115a204000000008000045f5f5f5fec00feef00010100040200010007030001158304000000008000045f5f5f5fec00feef00010100040200010007030001156404000000008000045f5f5f5fec00feef00010100040200010007030001154504000000008000045f5f5f5fec00feef00010100040200010007030001152604000000008000045f5f5f5fec00feef00010100040200010007030001150704000000008000045f5f5f5fec00feef0001010004020001000703000114e804000000008000045f5f5f5fec00feef0001010004020001000703000114c904000000008000045f5f5f5fec00feef0001010004020001000703000114aa04000000008000045f5f5f5fec00feef00010100040200010007030001148b04000000008000045f5f5f5fec00feef00010100040200010007030001146c04000000008000045f5f5f5fec00feef00010100040200010007030001144d04000000008000045f5f5f5fec00feef00010100040200010007030001142e04000000008000045f5f5f5fec00feef00010100040200010007030001140f04000000008000045f5f5f5fec00feef0001010004020001000703000113f004000000008000045f5f5f5fec00feef0001010004020001000703000113d104000000008000045f5f5f5fec00feef0001010004020001000703000113b204000000008000045f5f5f5fec00feef00010100040200010007030001139304000000008000045f5f5f5fec00feef00010100040200010007030001137404000000008000045f5f5f5fec00feef00010100040200010007030001135504000000008000045f5f5f5fec00feef00010100040200010007030001133604000000008000045f5f5f5fec00feef00010100040200010007030001131704000000008000045f5f5f5fec00feef0001010004020001000703000112f804000000008000045f5f5f5fec00feef0001010004020001000703000112d904000000008000045f5f5f5fec00feef0001010004020001000703000112ba04000000008000045f5f5f5fec00feef00010100040200010007030001129b04000000008000045f5f5f5fec00feef00010100040200010007030001127c04000000008000045f5f5f5fec00feef00010100040200010007030001125d04000000008000045f5f5f5fec00feef00010100040200010007030001123e04000000008000045f5f5f5fec00feef00010100040200010007030001121f04000000008000045f5f5f5fec00feef00010100040200010007030001120004000000008000045f5f5f5fec00feef0001010004020001000703000111e104000000008000045f5f5f5fec00feef0001010004020001000703000111c204000000008000045f5f5f5fec00feef0001010004020001000703000111a304000000008000045f5f5f5fec00feef00010100040200010007030001118404000000008000045f5f5f5fec00feef00010100040200010007030001116504000000008000045f5f5f5fec00feef00010100040200010007030001114604000000008000045f5f5f5fec00feef00010100040200010007030001112704000000008000045f5f5f5fec00feef00010100040200010007030001110804000000008000045f5f5f5fec00feef0001010004020001000703000110e904000000008000045f5f5f5fec00feef0001010004020001000703000110ca04000000008000045f5f5f5fec00feef0001010004020001000703000110ab04000000008000045f5f5f5fec00feef00010100040200010007030001108c04000000008000045f5f5f5fec00feef00010100040200010007030001106d04000000008000045f5f5f5fec00feef00010100040200010007030001104e04000000008000045f5f5f5fec00feef00010100040200010007030001102f04000000008000045f5f5f5fec00feef00010100040200010007030001101004000000008000045f5f5f5fec00feef000101000402000100070300010ff104000000008000045f5f5f5fec00feef000101000402000100070300010fd204000000008000045f5f5f5fec00feef000101000402000100070300010fb304000000008000045f5f5f5fec00feef000101000402000100070300010f9404000000008000045f5f5f5fec00feef000101000402000100070300010f7504000000008000045f5f5f5fec00feef000101000402000100070300010f5604000000008000045f5f5f5fec00feef000101000402000100070300010f3704000000008000045f5f5f5fec00feef000101000402000100070300010f1804000000008000045f5f5f5fec00feef000101000402000100070300010ef904000000008000045f5f5f5fec00feef000101000402000100070300010eda04000000008000045f5f5f5fec00feef000101000402000100070300010ebb04000000008000045f5f5f5fec00feef000101000402000100070300010e9c04000000008000045f5f5f5fec00feef000101000402000100070300010e7d04000000008000045f5f5f5fec00feef000101000402000100070300010e5e04000000008000045f5f5f5fec00feef000101000402000100070300010e3f04000000008000045f5f5f5fec00feef000101000402000100070300010e2004000000008000045f5f5f5fec00feef000101000402000100070300010e0104000000008000045f5f5f5fec00feef000101000402000100070300010de204000000008000045f5f5f5fec00feef000101000402000100070300010dc304000000008000045f5f5f5fec00feef000101000402000100070300010da404000000008000045f5f5f5fec00feef000101000402000100070300010d8504000000008000045f5f5f5fec00feef000101000402000100070300010d6604000000008000045f5f5f5fec00feef000101000402000100070300010d4704000000008000045f5f5f5fec00feef000101000402000100070300010d2804000000008000045f5f5f5fec00feef000101000402000100070300010d0904000000008000045f5f5f5fec00feef000101000402000100070300010cea04000000008000045f5f5f5fec00feef000101000402000100070300010ccb04000000008000045f5f5f5fec00feef000101000402000100070300010cac04000000008000045f5f5f5fec00feef000101000402000100070300010c8d04000000008000045f5f5f5fec00feef000101000402000100070300010c6e04000000008000045f5f5f5fec00feef000101000402000100070300010c4f04000000008000045f5f5f5fec00feef000101000402000100070300010c3004000000008000045f5f5f5fec00feef000101000402000100070300010c1104000000008000045f5f5f5fec00feef000101000402000100070300010bf204000000008000045f5f5f5fec00feef000101000402000100070300010bd304000000008000045f5f5f5fec00feef000101000402000100070300010bb404000000008000045f5f5f5fec00feef000101000402000100070300010b9504000000008000045f5f5f5fec00feef000101000402000100070300010b7604000000008000045f5f5f5fec00feef000101000402000100070300010b5704000000008000045f5f5f5fec00feef000101000402000100070300010b3804000000008000045f5f5f5fec00feef000101000402000100070300010b1904000000008000045f5f5f5fec00feef000101000402000100070300010afa04000000008000045f5f5f5fec00feef000101000402000100070300010adb04000000008000045f5f5f5fec00feef000101000402000100070300010abc04000000008000045f5f5f5fec00feef000101000402000100070300010a9d04000000008000045f5f5f5fec00feef000101000402000100070300010a7e04000000008000045f5f5f5fec00feef000101000402000100070300010a5f04000000008000045f5f5f5fec00feef000101000402000100070300010a4004000000008000045f5f5f5fec00feef000101000402000100070300010a2104000000008000045f5f5f5fec00feef000101000402000100070300010a0204000000008000045f5f5f5fec00feef0001010004020001000703000109e304000000008000045f5f5f5fec00feef0001010004020001000703000109c404000000008000045f5f5f5fec00feef0001010004020001000703000109a504000000008000045f5f5f5fec00feef00010100040200010007030001098604000000008000045f5f5f5fec00feef00010100040200010007030001096704000000008000045f5f5f5fec00feef00010100040200010007030001094804000000008000045f5f5f5fec00feef00010100040200010007030001092904000000008000045f5f5f5fec00feef00010100040200010007030001090a04000000008000045f5f5f5fec00feef0001010004020001000703000108eb04000000008000045f5f5f5fec00feef0001010004020001000703000108cc04000000008000045f5f5f5fec00feef0001010004020001000703000108ad04000000008000045f5f5f5fec00feef00010100040200010007030001088e04000000008000045f5f5f5fec00feef00010100040200010007030001086f04000000008000045f5f5f5fec00feef00010100040200010007030001085004000000008000045f5f5f5fec00feef00010100040200010007030001083104000000008000045f5f5f5fec00feef00010100040200010007030001081204000000008000045f5f5f5fec00feef0001010004020001000703000107f304000000008000045f5f5f5fec00feef0001010004020001000703000107d404000000008000045f5f5f5fec00feef0001010004020001000703000107b504000000008000045f5f5f5fec00feef00010100040200010007030001079604000000008000045f5f5f5fec00feef00010100040200010007030001077704000000008000045f5f5f5fec00feef00010100040200010007030001075804000000008000045f5f5f5fec00feef00010100040200010007030001073904000000008000045f5f5f5fec00feef00010100040200010007030001071a04000000008000045f5f5f5fec00feef0001010004020001000703000106fb04000000008000045f5f5f5fec00feef0001010004020001000703000106dc04000000008000045f5f5f5fec00feef0001010004020001000703000106bd04000000008000045f5f5f5fec00feef00010100040200010007030001069e04000000008000045f5f5f5fec00feef00010100040200010007030001067f04000000008000045f5f5f5fec00feef00010100040200010007030001066004000000008000045f5f5f5fec00feef00010100040200010007030001064104000000008000045f5f5f5fec00feef00010100040200010007030001062204000000008000045f5f5f5fec00feef00010100040200010007030001060304000000008000045f5f5f5fec00feef0001010004020001000703000105e404000000008000045f5f5f5fec00feef0001010004020001000703000105c504000000008000045f5f5f5fec00feef0001010004020001000703000105a604000000008000045f5f5f5fec00feef00010100040200010007030001058704000000008000045f5f5f5fec00feef00010100040200010007030001056804000000008000045f5f5f5fec00feef00010100040200010007030001054904000000008000045f5f5f5fec00feef00010100040200010007030001052a04000000008000045f5f5f5fec00feef00010100040200010007030001050b04000000008000045f5f5f5fec00feef0001010004020001000703000104ec04000000008000045f5f5f5fec00feef0001010004020001000703000104cd04000000008000045f5f5f5fec00feef0001010004020001000703000104ae04000000008000045f5f5f5fec00feef00010100040200010007030001048f04000000008000045f5f5f5fec00feef00010100040200010007030001047004000000008000045f5f5f5fec00feef00010100040200010007030001045104000000008000045f5f5f5fec00feef00010100040200010007030001043204000000008000045f5f5f5fec00feef00010100040200010007030001041304000000008000045f5f5f5fec00feef0001010004020001000703000103f404000000008000045f5f5f5fec00feef0001010004020001000703000103d504000000008000045f5f5f5fec00feef0001010004020001000703000103b604000000008000045f5f5f5fec00feef00010100040200010007030001039704000000008000045f5f5f5fec00feef00010100040200010007030001037804000000008000045f5f5f5fec00feef00010100040200010007030001035904000000008000045f5f5f5fec00feef00010100040200010007030001033a04000000008000045f5f5f5fec00feef00010100040200010007030001031b04000000008000045f5f5f5fec00feef0001010004020001000703000102fc04000000008000045f5f5f5fec00feef0001010004020001000703000102dd04000000008000045f5f5f5fec00feef0001010004020001000703000102be04000000008000045f5f5f5fec00feef00010100040200010007030001029f04000000008000045f5f5f5fec00feef00010100040200010007030001028004000000008000045f5f5f5fec00feef00010100040200010007030001026104000000008000045f5f5f5fec00feef00010100040200010007030001024204000000008000045f5f5f5fec00feef00010100040200010007030001022304000000008000045f5f5f5fec00feef00010100040200010007030001020404000000008000045f5f5f5fec00feef0001010004020001000703000101e504000000008000045f5f5f5fec00feef0001010004020001000703000101c604000000008000045f5f5f5fec00feef0001010004020001000703000101a704000000008000045f5f5f5fec00feef00010100040200010007030001018804000000008000045f5f5f5fec00feef00010100040200010007030001016904000000008000045f5f5f5fec00feef00010100040200010007030001014a04000000008000045f5f5f5fec00feef00010100040200010007030001012b04000000008000045f5f5f5fec00feef00010100040200010007030001010c04000000008000045f5f5f5fec00feef0001010004020001000703000100ed04000000008000045f5f5f5fec00feef0001010004020001000703000100ce04000000008000045f5f5f5fec00feef0001010004020001000703000100af04000000008000045f5f5f5fec00feef00010100040200010007030001009004000000008000045f5f5f5fec00feef00010100040200010007030001007104000000008000045f5f5f5fec00feef00010100040200010007030001005204000000008000045f5f5f5fec00feef00010100040200010007030001003304000000008000045f5f5f5fec00feef00010100040200010007030001001404000000008000045f5f5f5fec00feef000101000402000100010400000000800000fe", + None, + id="max_nested_containers_eofcreate_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_max_nested_containers_eofcreate_returncontract.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_max_nested_containers_eofcreate_returncontract.py new file mode 100644 index 0000000000..c29ee10fdc --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_max_nested_containers_eofcreate_returncontract.py @@ -0,0 +1,69 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section +from ethereum_test_types.eof.v1.constants import MAX_INITCODE_SIZE + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +# Maximum nested containers EOFCREATE/RETURNCONTRACT +code = None +nextcode = Container( + name="EOFV1_MINCONTAINER", + sections=[ + Section.Code(code=Op.INVALID), + ] +) + +while len(nextcode) < MAX_INITCODE_SIZE: + code = nextcode + initcode = Container( + sections=[ + Section.Code(code=Op.PUSH0 * 2 + Op.RETURNCONTRACT[0]), + Section.Container(container=nextcode), + ] + ) + if (len(initcode) > 0xffff): + break + nextcode = Container( + sections=[ + Section.Code(code=Op.PUSH0 * 4 + Op.EOFCREATE[0] + Op.INVALID), + Section.Container(container=initcode), + ] + ) + +max_nested_containers_eofcreate_returncontract_0 = code + + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + max_nested_containers_eofcreate_returncontract_0, + "ef00010100040200010007030001bfb504000000008000045f5f5f5fec00feef00010100040200010004030001bf9904000000008000025f5fee00ef00010100040200010007030001bf7a04000000008000045f5f5f5fec00feef00010100040200010004030001bf5e04000000008000025f5fee00ef00010100040200010007030001bf3f04000000008000045f5f5f5fec00feef00010100040200010004030001bf2304000000008000025f5fee00ef00010100040200010007030001bf0404000000008000045f5f5f5fec00feef00010100040200010004030001bee804000000008000025f5fee00ef00010100040200010007030001bec904000000008000045f5f5f5fec00feef00010100040200010004030001bead04000000008000025f5fee00ef00010100040200010007030001be8e04000000008000045f5f5f5fec00feef00010100040200010004030001be7204000000008000025f5fee00ef00010100040200010007030001be5304000000008000045f5f5f5fec00feef00010100040200010004030001be3704000000008000025f5fee00ef00010100040200010007030001be1804000000008000045f5f5f5fec00feef00010100040200010004030001bdfc04000000008000025f5fee00ef00010100040200010007030001bddd04000000008000045f5f5f5fec00feef00010100040200010004030001bdc104000000008000025f5fee00ef00010100040200010007030001bda204000000008000045f5f5f5fec00feef00010100040200010004030001bd8604000000008000025f5fee00ef00010100040200010007030001bd6704000000008000045f5f5f5fec00feef00010100040200010004030001bd4b04000000008000025f5fee00ef00010100040200010007030001bd2c04000000008000045f5f5f5fec00feef00010100040200010004030001bd1004000000008000025f5fee00ef00010100040200010007030001bcf104000000008000045f5f5f5fec00feef00010100040200010004030001bcd504000000008000025f5fee00ef00010100040200010007030001bcb604000000008000045f5f5f5fec00feef00010100040200010004030001bc9a04000000008000025f5fee00ef00010100040200010007030001bc7b04000000008000045f5f5f5fec00feef00010100040200010004030001bc5f04000000008000025f5fee00ef00010100040200010007030001bc4004000000008000045f5f5f5fec00feef00010100040200010004030001bc2404000000008000025f5fee00ef00010100040200010007030001bc0504000000008000045f5f5f5fec00feef00010100040200010004030001bbe904000000008000025f5fee00ef00010100040200010007030001bbca04000000008000045f5f5f5fec00feef00010100040200010004030001bbae04000000008000025f5fee00ef00010100040200010007030001bb8f04000000008000045f5f5f5fec00feef00010100040200010004030001bb7304000000008000025f5fee00ef00010100040200010007030001bb5404000000008000045f5f5f5fec00feef00010100040200010004030001bb3804000000008000025f5fee00ef00010100040200010007030001bb1904000000008000045f5f5f5fec00feef00010100040200010004030001bafd04000000008000025f5fee00ef00010100040200010007030001bade04000000008000045f5f5f5fec00feef00010100040200010004030001bac204000000008000025f5fee00ef00010100040200010007030001baa304000000008000045f5f5f5fec00feef00010100040200010004030001ba8704000000008000025f5fee00ef00010100040200010007030001ba6804000000008000045f5f5f5fec00feef00010100040200010004030001ba4c04000000008000025f5fee00ef00010100040200010007030001ba2d04000000008000045f5f5f5fec00feef00010100040200010004030001ba1104000000008000025f5fee00ef00010100040200010007030001b9f204000000008000045f5f5f5fec00feef00010100040200010004030001b9d604000000008000025f5fee00ef00010100040200010007030001b9b704000000008000045f5f5f5fec00feef00010100040200010004030001b99b04000000008000025f5fee00ef00010100040200010007030001b97c04000000008000045f5f5f5fec00feef00010100040200010004030001b96004000000008000025f5fee00ef00010100040200010007030001b94104000000008000045f5f5f5fec00feef00010100040200010004030001b92504000000008000025f5fee00ef00010100040200010007030001b90604000000008000045f5f5f5fec00feef00010100040200010004030001b8ea04000000008000025f5fee00ef00010100040200010007030001b8cb04000000008000045f5f5f5fec00feef00010100040200010004030001b8af04000000008000025f5fee00ef00010100040200010007030001b89004000000008000045f5f5f5fec00feef00010100040200010004030001b87404000000008000025f5fee00ef00010100040200010007030001b85504000000008000045f5f5f5fec00feef00010100040200010004030001b83904000000008000025f5fee00ef00010100040200010007030001b81a04000000008000045f5f5f5fec00feef00010100040200010004030001b7fe04000000008000025f5fee00ef00010100040200010007030001b7df04000000008000045f5f5f5fec00feef00010100040200010004030001b7c304000000008000025f5fee00ef00010100040200010007030001b7a404000000008000045f5f5f5fec00feef00010100040200010004030001b78804000000008000025f5fee00ef00010100040200010007030001b76904000000008000045f5f5f5fec00feef00010100040200010004030001b74d04000000008000025f5fee00ef00010100040200010007030001b72e04000000008000045f5f5f5fec00feef00010100040200010004030001b71204000000008000025f5fee00ef00010100040200010007030001b6f304000000008000045f5f5f5fec00feef00010100040200010004030001b6d704000000008000025f5fee00ef00010100040200010007030001b6b804000000008000045f5f5f5fec00feef00010100040200010004030001b69c04000000008000025f5fee00ef00010100040200010007030001b67d04000000008000045f5f5f5fec00feef00010100040200010004030001b66104000000008000025f5fee00ef00010100040200010007030001b64204000000008000045f5f5f5fec00feef00010100040200010004030001b62604000000008000025f5fee00ef00010100040200010007030001b60704000000008000045f5f5f5fec00feef00010100040200010004030001b5eb04000000008000025f5fee00ef00010100040200010007030001b5cc04000000008000045f5f5f5fec00feef00010100040200010004030001b5b004000000008000025f5fee00ef00010100040200010007030001b59104000000008000045f5f5f5fec00feef00010100040200010004030001b57504000000008000025f5fee00ef00010100040200010007030001b55604000000008000045f5f5f5fec00feef00010100040200010004030001b53a04000000008000025f5fee00ef00010100040200010007030001b51b04000000008000045f5f5f5fec00feef00010100040200010004030001b4ff04000000008000025f5fee00ef00010100040200010007030001b4e004000000008000045f5f5f5fec00feef00010100040200010004030001b4c404000000008000025f5fee00ef00010100040200010007030001b4a504000000008000045f5f5f5fec00feef00010100040200010004030001b48904000000008000025f5fee00ef00010100040200010007030001b46a04000000008000045f5f5f5fec00feef00010100040200010004030001b44e04000000008000025f5fee00ef00010100040200010007030001b42f04000000008000045f5f5f5fec00feef00010100040200010004030001b41304000000008000025f5fee00ef00010100040200010007030001b3f404000000008000045f5f5f5fec00feef00010100040200010004030001b3d804000000008000025f5fee00ef00010100040200010007030001b3b904000000008000045f5f5f5fec00feef00010100040200010004030001b39d04000000008000025f5fee00ef00010100040200010007030001b37e04000000008000045f5f5f5fec00feef00010100040200010004030001b36204000000008000025f5fee00ef00010100040200010007030001b34304000000008000045f5f5f5fec00feef00010100040200010004030001b32704000000008000025f5fee00ef00010100040200010007030001b30804000000008000045f5f5f5fec00feef00010100040200010004030001b2ec04000000008000025f5fee00ef00010100040200010007030001b2cd04000000008000045f5f5f5fec00feef00010100040200010004030001b2b104000000008000025f5fee00ef00010100040200010007030001b29204000000008000045f5f5f5fec00feef00010100040200010004030001b27604000000008000025f5fee00ef00010100040200010007030001b25704000000008000045f5f5f5fec00feef00010100040200010004030001b23b04000000008000025f5fee00ef00010100040200010007030001b21c04000000008000045f5f5f5fec00feef00010100040200010004030001b20004000000008000025f5fee00ef00010100040200010007030001b1e104000000008000045f5f5f5fec00feef00010100040200010004030001b1c504000000008000025f5fee00ef00010100040200010007030001b1a604000000008000045f5f5f5fec00feef00010100040200010004030001b18a04000000008000025f5fee00ef00010100040200010007030001b16b04000000008000045f5f5f5fec00feef00010100040200010004030001b14f04000000008000025f5fee00ef00010100040200010007030001b13004000000008000045f5f5f5fec00feef00010100040200010004030001b11404000000008000025f5fee00ef00010100040200010007030001b0f504000000008000045f5f5f5fec00feef00010100040200010004030001b0d904000000008000025f5fee00ef00010100040200010007030001b0ba04000000008000045f5f5f5fec00feef00010100040200010004030001b09e04000000008000025f5fee00ef00010100040200010007030001b07f04000000008000045f5f5f5fec00feef00010100040200010004030001b06304000000008000025f5fee00ef00010100040200010007030001b04404000000008000045f5f5f5fec00feef00010100040200010004030001b02804000000008000025f5fee00ef00010100040200010007030001b00904000000008000045f5f5f5fec00feef00010100040200010004030001afed04000000008000025f5fee00ef00010100040200010007030001afce04000000008000045f5f5f5fec00feef00010100040200010004030001afb204000000008000025f5fee00ef00010100040200010007030001af9304000000008000045f5f5f5fec00feef00010100040200010004030001af7704000000008000025f5fee00ef00010100040200010007030001af5804000000008000045f5f5f5fec00feef00010100040200010004030001af3c04000000008000025f5fee00ef00010100040200010007030001af1d04000000008000045f5f5f5fec00feef00010100040200010004030001af0104000000008000025f5fee00ef00010100040200010007030001aee204000000008000045f5f5f5fec00feef00010100040200010004030001aec604000000008000025f5fee00ef00010100040200010007030001aea704000000008000045f5f5f5fec00feef00010100040200010004030001ae8b04000000008000025f5fee00ef00010100040200010007030001ae6c04000000008000045f5f5f5fec00feef00010100040200010004030001ae5004000000008000025f5fee00ef00010100040200010007030001ae3104000000008000045f5f5f5fec00feef00010100040200010004030001ae1504000000008000025f5fee00ef00010100040200010007030001adf604000000008000045f5f5f5fec00feef00010100040200010004030001adda04000000008000025f5fee00ef00010100040200010007030001adbb04000000008000045f5f5f5fec00feef00010100040200010004030001ad9f04000000008000025f5fee00ef00010100040200010007030001ad8004000000008000045f5f5f5fec00feef00010100040200010004030001ad6404000000008000025f5fee00ef00010100040200010007030001ad4504000000008000045f5f5f5fec00feef00010100040200010004030001ad2904000000008000025f5fee00ef00010100040200010007030001ad0a04000000008000045f5f5f5fec00feef00010100040200010004030001acee04000000008000025f5fee00ef00010100040200010007030001accf04000000008000045f5f5f5fec00feef00010100040200010004030001acb304000000008000025f5fee00ef00010100040200010007030001ac9404000000008000045f5f5f5fec00feef00010100040200010004030001ac7804000000008000025f5fee00ef00010100040200010007030001ac5904000000008000045f5f5f5fec00feef00010100040200010004030001ac3d04000000008000025f5fee00ef00010100040200010007030001ac1e04000000008000045f5f5f5fec00feef00010100040200010004030001ac0204000000008000025f5fee00ef00010100040200010007030001abe304000000008000045f5f5f5fec00feef00010100040200010004030001abc704000000008000025f5fee00ef00010100040200010007030001aba804000000008000045f5f5f5fec00feef00010100040200010004030001ab8c04000000008000025f5fee00ef00010100040200010007030001ab6d04000000008000045f5f5f5fec00feef00010100040200010004030001ab5104000000008000025f5fee00ef00010100040200010007030001ab3204000000008000045f5f5f5fec00feef00010100040200010004030001ab1604000000008000025f5fee00ef00010100040200010007030001aaf704000000008000045f5f5f5fec00feef00010100040200010004030001aadb04000000008000025f5fee00ef00010100040200010007030001aabc04000000008000045f5f5f5fec00feef00010100040200010004030001aaa004000000008000025f5fee00ef00010100040200010007030001aa8104000000008000045f5f5f5fec00feef00010100040200010004030001aa6504000000008000025f5fee00ef00010100040200010007030001aa4604000000008000045f5f5f5fec00feef00010100040200010004030001aa2a04000000008000025f5fee00ef00010100040200010007030001aa0b04000000008000045f5f5f5fec00feef00010100040200010004030001a9ef04000000008000025f5fee00ef00010100040200010007030001a9d004000000008000045f5f5f5fec00feef00010100040200010004030001a9b404000000008000025f5fee00ef00010100040200010007030001a99504000000008000045f5f5f5fec00feef00010100040200010004030001a97904000000008000025f5fee00ef00010100040200010007030001a95a04000000008000045f5f5f5fec00feef00010100040200010004030001a93e04000000008000025f5fee00ef00010100040200010007030001a91f04000000008000045f5f5f5fec00feef00010100040200010004030001a90304000000008000025f5fee00ef00010100040200010007030001a8e404000000008000045f5f5f5fec00feef00010100040200010004030001a8c804000000008000025f5fee00ef00010100040200010007030001a8a904000000008000045f5f5f5fec00feef00010100040200010004030001a88d04000000008000025f5fee00ef00010100040200010007030001a86e04000000008000045f5f5f5fec00feef00010100040200010004030001a85204000000008000025f5fee00ef00010100040200010007030001a83304000000008000045f5f5f5fec00feef00010100040200010004030001a81704000000008000025f5fee00ef00010100040200010007030001a7f804000000008000045f5f5f5fec00feef00010100040200010004030001a7dc04000000008000025f5fee00ef00010100040200010007030001a7bd04000000008000045f5f5f5fec00feef00010100040200010004030001a7a104000000008000025f5fee00ef00010100040200010007030001a78204000000008000045f5f5f5fec00feef00010100040200010004030001a76604000000008000025f5fee00ef00010100040200010007030001a74704000000008000045f5f5f5fec00feef00010100040200010004030001a72b04000000008000025f5fee00ef00010100040200010007030001a70c04000000008000045f5f5f5fec00feef00010100040200010004030001a6f004000000008000025f5fee00ef00010100040200010007030001a6d104000000008000045f5f5f5fec00feef00010100040200010004030001a6b504000000008000025f5fee00ef00010100040200010007030001a69604000000008000045f5f5f5fec00feef00010100040200010004030001a67a04000000008000025f5fee00ef00010100040200010007030001a65b04000000008000045f5f5f5fec00feef00010100040200010004030001a63f04000000008000025f5fee00ef00010100040200010007030001a62004000000008000045f5f5f5fec00feef00010100040200010004030001a60404000000008000025f5fee00ef00010100040200010007030001a5e504000000008000045f5f5f5fec00feef00010100040200010004030001a5c904000000008000025f5fee00ef00010100040200010007030001a5aa04000000008000045f5f5f5fec00feef00010100040200010004030001a58e04000000008000025f5fee00ef00010100040200010007030001a56f04000000008000045f5f5f5fec00feef00010100040200010004030001a55304000000008000025f5fee00ef00010100040200010007030001a53404000000008000045f5f5f5fec00feef00010100040200010004030001a51804000000008000025f5fee00ef00010100040200010007030001a4f904000000008000045f5f5f5fec00feef00010100040200010004030001a4dd04000000008000025f5fee00ef00010100040200010007030001a4be04000000008000045f5f5f5fec00feef00010100040200010004030001a4a204000000008000025f5fee00ef00010100040200010007030001a48304000000008000045f5f5f5fec00feef00010100040200010004030001a46704000000008000025f5fee00ef00010100040200010007030001a44804000000008000045f5f5f5fec00feef00010100040200010004030001a42c04000000008000025f5fee00ef00010100040200010007030001a40d04000000008000045f5f5f5fec00feef00010100040200010004030001a3f104000000008000025f5fee00ef00010100040200010007030001a3d204000000008000045f5f5f5fec00feef00010100040200010004030001a3b604000000008000025f5fee00ef00010100040200010007030001a39704000000008000045f5f5f5fec00feef00010100040200010004030001a37b04000000008000025f5fee00ef00010100040200010007030001a35c04000000008000045f5f5f5fec00feef00010100040200010004030001a34004000000008000025f5fee00ef00010100040200010007030001a32104000000008000045f5f5f5fec00feef00010100040200010004030001a30504000000008000025f5fee00ef00010100040200010007030001a2e604000000008000045f5f5f5fec00feef00010100040200010004030001a2ca04000000008000025f5fee00ef00010100040200010007030001a2ab04000000008000045f5f5f5fec00feef00010100040200010004030001a28f04000000008000025f5fee00ef00010100040200010007030001a27004000000008000045f5f5f5fec00feef00010100040200010004030001a25404000000008000025f5fee00ef00010100040200010007030001a23504000000008000045f5f5f5fec00feef00010100040200010004030001a21904000000008000025f5fee00ef00010100040200010007030001a1fa04000000008000045f5f5f5fec00feef00010100040200010004030001a1de04000000008000025f5fee00ef00010100040200010007030001a1bf04000000008000045f5f5f5fec00feef00010100040200010004030001a1a304000000008000025f5fee00ef00010100040200010007030001a18404000000008000045f5f5f5fec00feef00010100040200010004030001a16804000000008000025f5fee00ef00010100040200010007030001a14904000000008000045f5f5f5fec00feef00010100040200010004030001a12d04000000008000025f5fee00ef00010100040200010007030001a10e04000000008000045f5f5f5fec00feef00010100040200010004030001a0f204000000008000025f5fee00ef00010100040200010007030001a0d304000000008000045f5f5f5fec00feef00010100040200010004030001a0b704000000008000025f5fee00ef00010100040200010007030001a09804000000008000045f5f5f5fec00feef00010100040200010004030001a07c04000000008000025f5fee00ef00010100040200010007030001a05d04000000008000045f5f5f5fec00feef00010100040200010004030001a04104000000008000025f5fee00ef00010100040200010007030001a02204000000008000045f5f5f5fec00feef00010100040200010004030001a00604000000008000025f5fee00ef000101000402000100070300019fe704000000008000045f5f5f5fec00feef000101000402000100040300019fcb04000000008000025f5fee00ef000101000402000100070300019fac04000000008000045f5f5f5fec00feef000101000402000100040300019f9004000000008000025f5fee00ef000101000402000100070300019f7104000000008000045f5f5f5fec00feef000101000402000100040300019f5504000000008000025f5fee00ef000101000402000100070300019f3604000000008000045f5f5f5fec00feef000101000402000100040300019f1a04000000008000025f5fee00ef000101000402000100070300019efb04000000008000045f5f5f5fec00feef000101000402000100040300019edf04000000008000025f5fee00ef000101000402000100070300019ec004000000008000045f5f5f5fec00feef000101000402000100040300019ea404000000008000025f5fee00ef000101000402000100070300019e8504000000008000045f5f5f5fec00feef000101000402000100040300019e6904000000008000025f5fee00ef000101000402000100070300019e4a04000000008000045f5f5f5fec00feef000101000402000100040300019e2e04000000008000025f5fee00ef000101000402000100070300019e0f04000000008000045f5f5f5fec00feef000101000402000100040300019df304000000008000025f5fee00ef000101000402000100070300019dd404000000008000045f5f5f5fec00feef000101000402000100040300019db804000000008000025f5fee00ef000101000402000100070300019d9904000000008000045f5f5f5fec00feef000101000402000100040300019d7d04000000008000025f5fee00ef000101000402000100070300019d5e04000000008000045f5f5f5fec00feef000101000402000100040300019d4204000000008000025f5fee00ef000101000402000100070300019d2304000000008000045f5f5f5fec00feef000101000402000100040300019d0704000000008000025f5fee00ef000101000402000100070300019ce804000000008000045f5f5f5fec00feef000101000402000100040300019ccc04000000008000025f5fee00ef000101000402000100070300019cad04000000008000045f5f5f5fec00feef000101000402000100040300019c9104000000008000025f5fee00ef000101000402000100070300019c7204000000008000045f5f5f5fec00feef000101000402000100040300019c5604000000008000025f5fee00ef000101000402000100070300019c3704000000008000045f5f5f5fec00feef000101000402000100040300019c1b04000000008000025f5fee00ef000101000402000100070300019bfc04000000008000045f5f5f5fec00feef000101000402000100040300019be004000000008000025f5fee00ef000101000402000100070300019bc104000000008000045f5f5f5fec00feef000101000402000100040300019ba504000000008000025f5fee00ef000101000402000100070300019b8604000000008000045f5f5f5fec00feef000101000402000100040300019b6a04000000008000025f5fee00ef000101000402000100070300019b4b04000000008000045f5f5f5fec00feef000101000402000100040300019b2f04000000008000025f5fee00ef000101000402000100070300019b1004000000008000045f5f5f5fec00feef000101000402000100040300019af404000000008000025f5fee00ef000101000402000100070300019ad504000000008000045f5f5f5fec00feef000101000402000100040300019ab904000000008000025f5fee00ef000101000402000100070300019a9a04000000008000045f5f5f5fec00feef000101000402000100040300019a7e04000000008000025f5fee00ef000101000402000100070300019a5f04000000008000045f5f5f5fec00feef000101000402000100040300019a4304000000008000025f5fee00ef000101000402000100070300019a2404000000008000045f5f5f5fec00feef000101000402000100040300019a0804000000008000025f5fee00ef0001010004020001000703000199e904000000008000045f5f5f5fec00feef0001010004020001000403000199cd04000000008000025f5fee00ef0001010004020001000703000199ae04000000008000045f5f5f5fec00feef00010100040200010004030001999204000000008000025f5fee00ef00010100040200010007030001997304000000008000045f5f5f5fec00feef00010100040200010004030001995704000000008000025f5fee00ef00010100040200010007030001993804000000008000045f5f5f5fec00feef00010100040200010004030001991c04000000008000025f5fee00ef0001010004020001000703000198fd04000000008000045f5f5f5fec00feef0001010004020001000403000198e104000000008000025f5fee00ef0001010004020001000703000198c204000000008000045f5f5f5fec00feef0001010004020001000403000198a604000000008000025f5fee00ef00010100040200010007030001988704000000008000045f5f5f5fec00feef00010100040200010004030001986b04000000008000025f5fee00ef00010100040200010007030001984c04000000008000045f5f5f5fec00feef00010100040200010004030001983004000000008000025f5fee00ef00010100040200010007030001981104000000008000045f5f5f5fec00feef0001010004020001000403000197f504000000008000025f5fee00ef0001010004020001000703000197d604000000008000045f5f5f5fec00feef0001010004020001000403000197ba04000000008000025f5fee00ef00010100040200010007030001979b04000000008000045f5f5f5fec00feef00010100040200010004030001977f04000000008000025f5fee00ef00010100040200010007030001976004000000008000045f5f5f5fec00feef00010100040200010004030001974404000000008000025f5fee00ef00010100040200010007030001972504000000008000045f5f5f5fec00feef00010100040200010004030001970904000000008000025f5fee00ef0001010004020001000703000196ea04000000008000045f5f5f5fec00feef0001010004020001000403000196ce04000000008000025f5fee00ef0001010004020001000703000196af04000000008000045f5f5f5fec00feef00010100040200010004030001969304000000008000025f5fee00ef00010100040200010007030001967404000000008000045f5f5f5fec00feef00010100040200010004030001965804000000008000025f5fee00ef00010100040200010007030001963904000000008000045f5f5f5fec00feef00010100040200010004030001961d04000000008000025f5fee00ef0001010004020001000703000195fe04000000008000045f5f5f5fec00feef0001010004020001000403000195e204000000008000025f5fee00ef0001010004020001000703000195c304000000008000045f5f5f5fec00feef0001010004020001000403000195a704000000008000025f5fee00ef00010100040200010007030001958804000000008000045f5f5f5fec00feef00010100040200010004030001956c04000000008000025f5fee00ef00010100040200010007030001954d04000000008000045f5f5f5fec00feef00010100040200010004030001953104000000008000025f5fee00ef00010100040200010007030001951204000000008000045f5f5f5fec00feef0001010004020001000403000194f604000000008000025f5fee00ef0001010004020001000703000194d704000000008000045f5f5f5fec00feef0001010004020001000403000194bb04000000008000025f5fee00ef00010100040200010007030001949c04000000008000045f5f5f5fec00feef00010100040200010004030001948004000000008000025f5fee00ef00010100040200010007030001946104000000008000045f5f5f5fec00feef00010100040200010004030001944504000000008000025f5fee00ef00010100040200010007030001942604000000008000045f5f5f5fec00feef00010100040200010004030001940a04000000008000025f5fee00ef0001010004020001000703000193eb04000000008000045f5f5f5fec00feef0001010004020001000403000193cf04000000008000025f5fee00ef0001010004020001000703000193b004000000008000045f5f5f5fec00feef00010100040200010004030001939404000000008000025f5fee00ef00010100040200010007030001937504000000008000045f5f5f5fec00feef00010100040200010004030001935904000000008000025f5fee00ef00010100040200010007030001933a04000000008000045f5f5f5fec00feef00010100040200010004030001931e04000000008000025f5fee00ef0001010004020001000703000192ff04000000008000045f5f5f5fec00feef0001010004020001000403000192e304000000008000025f5fee00ef0001010004020001000703000192c404000000008000045f5f5f5fec00feef0001010004020001000403000192a804000000008000025f5fee00ef00010100040200010007030001928904000000008000045f5f5f5fec00feef00010100040200010004030001926d04000000008000025f5fee00ef00010100040200010007030001924e04000000008000045f5f5f5fec00feef00010100040200010004030001923204000000008000025f5fee00ef00010100040200010007030001921304000000008000045f5f5f5fec00feef0001010004020001000403000191f704000000008000025f5fee00ef0001010004020001000703000191d804000000008000045f5f5f5fec00feef0001010004020001000403000191bc04000000008000025f5fee00ef00010100040200010007030001919d04000000008000045f5f5f5fec00feef00010100040200010004030001918104000000008000025f5fee00ef00010100040200010007030001916204000000008000045f5f5f5fec00feef00010100040200010004030001914604000000008000025f5fee00ef00010100040200010007030001912704000000008000045f5f5f5fec00feef00010100040200010004030001910b04000000008000025f5fee00ef0001010004020001000703000190ec04000000008000045f5f5f5fec00feef0001010004020001000403000190d004000000008000025f5fee00ef0001010004020001000703000190b104000000008000045f5f5f5fec00feef00010100040200010004030001909504000000008000025f5fee00ef00010100040200010007030001907604000000008000045f5f5f5fec00feef00010100040200010004030001905a04000000008000025f5fee00ef00010100040200010007030001903b04000000008000045f5f5f5fec00feef00010100040200010004030001901f04000000008000025f5fee00ef00010100040200010007030001900004000000008000045f5f5f5fec00feef000101000402000100040300018fe404000000008000025f5fee00ef000101000402000100070300018fc504000000008000045f5f5f5fec00feef000101000402000100040300018fa904000000008000025f5fee00ef000101000402000100070300018f8a04000000008000045f5f5f5fec00feef000101000402000100040300018f6e04000000008000025f5fee00ef000101000402000100070300018f4f04000000008000045f5f5f5fec00feef000101000402000100040300018f3304000000008000025f5fee00ef000101000402000100070300018f1404000000008000045f5f5f5fec00feef000101000402000100040300018ef804000000008000025f5fee00ef000101000402000100070300018ed904000000008000045f5f5f5fec00feef000101000402000100040300018ebd04000000008000025f5fee00ef000101000402000100070300018e9e04000000008000045f5f5f5fec00feef000101000402000100040300018e8204000000008000025f5fee00ef000101000402000100070300018e6304000000008000045f5f5f5fec00feef000101000402000100040300018e4704000000008000025f5fee00ef000101000402000100070300018e2804000000008000045f5f5f5fec00feef000101000402000100040300018e0c04000000008000025f5fee00ef000101000402000100070300018ded04000000008000045f5f5f5fec00feef000101000402000100040300018dd104000000008000025f5fee00ef000101000402000100070300018db204000000008000045f5f5f5fec00feef000101000402000100040300018d9604000000008000025f5fee00ef000101000402000100070300018d7704000000008000045f5f5f5fec00feef000101000402000100040300018d5b04000000008000025f5fee00ef000101000402000100070300018d3c04000000008000045f5f5f5fec00feef000101000402000100040300018d2004000000008000025f5fee00ef000101000402000100070300018d0104000000008000045f5f5f5fec00feef000101000402000100040300018ce504000000008000025f5fee00ef000101000402000100070300018cc604000000008000045f5f5f5fec00feef000101000402000100040300018caa04000000008000025f5fee00ef000101000402000100070300018c8b04000000008000045f5f5f5fec00feef000101000402000100040300018c6f04000000008000025f5fee00ef000101000402000100070300018c5004000000008000045f5f5f5fec00feef000101000402000100040300018c3404000000008000025f5fee00ef000101000402000100070300018c1504000000008000045f5f5f5fec00feef000101000402000100040300018bf904000000008000025f5fee00ef000101000402000100070300018bda04000000008000045f5f5f5fec00feef000101000402000100040300018bbe04000000008000025f5fee00ef000101000402000100070300018b9f04000000008000045f5f5f5fec00feef000101000402000100040300018b8304000000008000025f5fee00ef000101000402000100070300018b6404000000008000045f5f5f5fec00feef000101000402000100040300018b4804000000008000025f5fee00ef000101000402000100070300018b2904000000008000045f5f5f5fec00feef000101000402000100040300018b0d04000000008000025f5fee00ef000101000402000100070300018aee04000000008000045f5f5f5fec00feef000101000402000100040300018ad204000000008000025f5fee00ef000101000402000100070300018ab304000000008000045f5f5f5fec00feef000101000402000100040300018a9704000000008000025f5fee00ef000101000402000100070300018a7804000000008000045f5f5f5fec00feef000101000402000100040300018a5c04000000008000025f5fee00ef000101000402000100070300018a3d04000000008000045f5f5f5fec00feef000101000402000100040300018a2104000000008000025f5fee00ef000101000402000100070300018a0204000000008000045f5f5f5fec00feef0001010004020001000403000189e604000000008000025f5fee00ef0001010004020001000703000189c704000000008000045f5f5f5fec00feef0001010004020001000403000189ab04000000008000025f5fee00ef00010100040200010007030001898c04000000008000045f5f5f5fec00feef00010100040200010004030001897004000000008000025f5fee00ef00010100040200010007030001895104000000008000045f5f5f5fec00feef00010100040200010004030001893504000000008000025f5fee00ef00010100040200010007030001891604000000008000045f5f5f5fec00feef0001010004020001000403000188fa04000000008000025f5fee00ef0001010004020001000703000188db04000000008000045f5f5f5fec00feef0001010004020001000403000188bf04000000008000025f5fee00ef0001010004020001000703000188a004000000008000045f5f5f5fec00feef00010100040200010004030001888404000000008000025f5fee00ef00010100040200010007030001886504000000008000045f5f5f5fec00feef00010100040200010004030001884904000000008000025f5fee00ef00010100040200010007030001882a04000000008000045f5f5f5fec00feef00010100040200010004030001880e04000000008000025f5fee00ef0001010004020001000703000187ef04000000008000045f5f5f5fec00feef0001010004020001000403000187d304000000008000025f5fee00ef0001010004020001000703000187b404000000008000045f5f5f5fec00feef00010100040200010004030001879804000000008000025f5fee00ef00010100040200010007030001877904000000008000045f5f5f5fec00feef00010100040200010004030001875d04000000008000025f5fee00ef00010100040200010007030001873e04000000008000045f5f5f5fec00feef00010100040200010004030001872204000000008000025f5fee00ef00010100040200010007030001870304000000008000045f5f5f5fec00feef0001010004020001000403000186e704000000008000025f5fee00ef0001010004020001000703000186c804000000008000045f5f5f5fec00feef0001010004020001000403000186ac04000000008000025f5fee00ef00010100040200010007030001868d04000000008000045f5f5f5fec00feef00010100040200010004030001867104000000008000025f5fee00ef00010100040200010007030001865204000000008000045f5f5f5fec00feef00010100040200010004030001863604000000008000025f5fee00ef00010100040200010007030001861704000000008000045f5f5f5fec00feef0001010004020001000403000185fb04000000008000025f5fee00ef0001010004020001000703000185dc04000000008000045f5f5f5fec00feef0001010004020001000403000185c004000000008000025f5fee00ef0001010004020001000703000185a104000000008000045f5f5f5fec00feef00010100040200010004030001858504000000008000025f5fee00ef00010100040200010007030001856604000000008000045f5f5f5fec00feef00010100040200010004030001854a04000000008000025f5fee00ef00010100040200010007030001852b04000000008000045f5f5f5fec00feef00010100040200010004030001850f04000000008000025f5fee00ef0001010004020001000703000184f004000000008000045f5f5f5fec00feef0001010004020001000403000184d404000000008000025f5fee00ef0001010004020001000703000184b504000000008000045f5f5f5fec00feef00010100040200010004030001849904000000008000025f5fee00ef00010100040200010007030001847a04000000008000045f5f5f5fec00feef00010100040200010004030001845e04000000008000025f5fee00ef00010100040200010007030001843f04000000008000045f5f5f5fec00feef00010100040200010004030001842304000000008000025f5fee00ef00010100040200010007030001840404000000008000045f5f5f5fec00feef0001010004020001000403000183e804000000008000025f5fee00ef0001010004020001000703000183c904000000008000045f5f5f5fec00feef0001010004020001000403000183ad04000000008000025f5fee00ef00010100040200010007030001838e04000000008000045f5f5f5fec00feef00010100040200010004030001837204000000008000025f5fee00ef00010100040200010007030001835304000000008000045f5f5f5fec00feef00010100040200010004030001833704000000008000025f5fee00ef00010100040200010007030001831804000000008000045f5f5f5fec00feef0001010004020001000403000182fc04000000008000025f5fee00ef0001010004020001000703000182dd04000000008000045f5f5f5fec00feef0001010004020001000403000182c104000000008000025f5fee00ef0001010004020001000703000182a204000000008000045f5f5f5fec00feef00010100040200010004030001828604000000008000025f5fee00ef00010100040200010007030001826704000000008000045f5f5f5fec00feef00010100040200010004030001824b04000000008000025f5fee00ef00010100040200010007030001822c04000000008000045f5f5f5fec00feef00010100040200010004030001821004000000008000025f5fee00ef0001010004020001000703000181f104000000008000045f5f5f5fec00feef0001010004020001000403000181d504000000008000025f5fee00ef0001010004020001000703000181b604000000008000045f5f5f5fec00feef00010100040200010004030001819a04000000008000025f5fee00ef00010100040200010007030001817b04000000008000045f5f5f5fec00feef00010100040200010004030001815f04000000008000025f5fee00ef00010100040200010007030001814004000000008000045f5f5f5fec00feef00010100040200010004030001812404000000008000025f5fee00ef00010100040200010007030001810504000000008000045f5f5f5fec00feef0001010004020001000403000180e904000000008000025f5fee00ef0001010004020001000703000180ca04000000008000045f5f5f5fec00feef0001010004020001000403000180ae04000000008000025f5fee00ef00010100040200010007030001808f04000000008000045f5f5f5fec00feef00010100040200010004030001807304000000008000025f5fee00ef00010100040200010007030001805404000000008000045f5f5f5fec00feef00010100040200010004030001803804000000008000025f5fee00ef00010100040200010007030001801904000000008000045f5f5f5fec00feef000101000402000100040300017ffd04000000008000025f5fee00ef000101000402000100070300017fde04000000008000045f5f5f5fec00feef000101000402000100040300017fc204000000008000025f5fee00ef000101000402000100070300017fa304000000008000045f5f5f5fec00feef000101000402000100040300017f8704000000008000025f5fee00ef000101000402000100070300017f6804000000008000045f5f5f5fec00feef000101000402000100040300017f4c04000000008000025f5fee00ef000101000402000100070300017f2d04000000008000045f5f5f5fec00feef000101000402000100040300017f1104000000008000025f5fee00ef000101000402000100070300017ef204000000008000045f5f5f5fec00feef000101000402000100040300017ed604000000008000025f5fee00ef000101000402000100070300017eb704000000008000045f5f5f5fec00feef000101000402000100040300017e9b04000000008000025f5fee00ef000101000402000100070300017e7c04000000008000045f5f5f5fec00feef000101000402000100040300017e6004000000008000025f5fee00ef000101000402000100070300017e4104000000008000045f5f5f5fec00feef000101000402000100040300017e2504000000008000025f5fee00ef000101000402000100070300017e0604000000008000045f5f5f5fec00feef000101000402000100040300017dea04000000008000025f5fee00ef000101000402000100070300017dcb04000000008000045f5f5f5fec00feef000101000402000100040300017daf04000000008000025f5fee00ef000101000402000100070300017d9004000000008000045f5f5f5fec00feef000101000402000100040300017d7404000000008000025f5fee00ef000101000402000100070300017d5504000000008000045f5f5f5fec00feef000101000402000100040300017d3904000000008000025f5fee00ef000101000402000100070300017d1a04000000008000045f5f5f5fec00feef000101000402000100040300017cfe04000000008000025f5fee00ef000101000402000100070300017cdf04000000008000045f5f5f5fec00feef000101000402000100040300017cc304000000008000025f5fee00ef000101000402000100070300017ca404000000008000045f5f5f5fec00feef000101000402000100040300017c8804000000008000025f5fee00ef000101000402000100070300017c6904000000008000045f5f5f5fec00feef000101000402000100040300017c4d04000000008000025f5fee00ef000101000402000100070300017c2e04000000008000045f5f5f5fec00feef000101000402000100040300017c1204000000008000025f5fee00ef000101000402000100070300017bf304000000008000045f5f5f5fec00feef000101000402000100040300017bd704000000008000025f5fee00ef000101000402000100070300017bb804000000008000045f5f5f5fec00feef000101000402000100040300017b9c04000000008000025f5fee00ef000101000402000100070300017b7d04000000008000045f5f5f5fec00feef000101000402000100040300017b6104000000008000025f5fee00ef000101000402000100070300017b4204000000008000045f5f5f5fec00feef000101000402000100040300017b2604000000008000025f5fee00ef000101000402000100070300017b0704000000008000045f5f5f5fec00feef000101000402000100040300017aeb04000000008000025f5fee00ef000101000402000100070300017acc04000000008000045f5f5f5fec00feef000101000402000100040300017ab004000000008000025f5fee00ef000101000402000100070300017a9104000000008000045f5f5f5fec00feef000101000402000100040300017a7504000000008000025f5fee00ef000101000402000100070300017a5604000000008000045f5f5f5fec00feef000101000402000100040300017a3a04000000008000025f5fee00ef000101000402000100070300017a1b04000000008000045f5f5f5fec00feef0001010004020001000403000179ff04000000008000025f5fee00ef0001010004020001000703000179e004000000008000045f5f5f5fec00feef0001010004020001000403000179c404000000008000025f5fee00ef0001010004020001000703000179a504000000008000045f5f5f5fec00feef00010100040200010004030001798904000000008000025f5fee00ef00010100040200010007030001796a04000000008000045f5f5f5fec00feef00010100040200010004030001794e04000000008000025f5fee00ef00010100040200010007030001792f04000000008000045f5f5f5fec00feef00010100040200010004030001791304000000008000025f5fee00ef0001010004020001000703000178f404000000008000045f5f5f5fec00feef0001010004020001000403000178d804000000008000025f5fee00ef0001010004020001000703000178b904000000008000045f5f5f5fec00feef00010100040200010004030001789d04000000008000025f5fee00ef00010100040200010007030001787e04000000008000045f5f5f5fec00feef00010100040200010004030001786204000000008000025f5fee00ef00010100040200010007030001784304000000008000045f5f5f5fec00feef00010100040200010004030001782704000000008000025f5fee00ef00010100040200010007030001780804000000008000045f5f5f5fec00feef0001010004020001000403000177ec04000000008000025f5fee00ef0001010004020001000703000177cd04000000008000045f5f5f5fec00feef0001010004020001000403000177b104000000008000025f5fee00ef00010100040200010007030001779204000000008000045f5f5f5fec00feef00010100040200010004030001777604000000008000025f5fee00ef00010100040200010007030001775704000000008000045f5f5f5fec00feef00010100040200010004030001773b04000000008000025f5fee00ef00010100040200010007030001771c04000000008000045f5f5f5fec00feef00010100040200010004030001770004000000008000025f5fee00ef0001010004020001000703000176e104000000008000045f5f5f5fec00feef0001010004020001000403000176c504000000008000025f5fee00ef0001010004020001000703000176a604000000008000045f5f5f5fec00feef00010100040200010004030001768a04000000008000025f5fee00ef00010100040200010007030001766b04000000008000045f5f5f5fec00feef00010100040200010004030001764f04000000008000025f5fee00ef00010100040200010007030001763004000000008000045f5f5f5fec00feef00010100040200010004030001761404000000008000025f5fee00ef0001010004020001000703000175f504000000008000045f5f5f5fec00feef0001010004020001000403000175d904000000008000025f5fee00ef0001010004020001000703000175ba04000000008000045f5f5f5fec00feef00010100040200010004030001759e04000000008000025f5fee00ef00010100040200010007030001757f04000000008000045f5f5f5fec00feef00010100040200010004030001756304000000008000025f5fee00ef00010100040200010007030001754404000000008000045f5f5f5fec00feef00010100040200010004030001752804000000008000025f5fee00ef00010100040200010007030001750904000000008000045f5f5f5fec00feef0001010004020001000403000174ed04000000008000025f5fee00ef0001010004020001000703000174ce04000000008000045f5f5f5fec00feef0001010004020001000403000174b204000000008000025f5fee00ef00010100040200010007030001749304000000008000045f5f5f5fec00feef00010100040200010004030001747704000000008000025f5fee00ef00010100040200010007030001745804000000008000045f5f5f5fec00feef00010100040200010004030001743c04000000008000025f5fee00ef00010100040200010007030001741d04000000008000045f5f5f5fec00feef00010100040200010004030001740104000000008000025f5fee00ef0001010004020001000703000173e204000000008000045f5f5f5fec00feef0001010004020001000403000173c604000000008000025f5fee00ef0001010004020001000703000173a704000000008000045f5f5f5fec00feef00010100040200010004030001738b04000000008000025f5fee00ef00010100040200010007030001736c04000000008000045f5f5f5fec00feef00010100040200010004030001735004000000008000025f5fee00ef00010100040200010007030001733104000000008000045f5f5f5fec00feef00010100040200010004030001731504000000008000025f5fee00ef0001010004020001000703000172f604000000008000045f5f5f5fec00feef0001010004020001000403000172da04000000008000025f5fee00ef0001010004020001000703000172bb04000000008000045f5f5f5fec00feef00010100040200010004030001729f04000000008000025f5fee00ef00010100040200010007030001728004000000008000045f5f5f5fec00feef00010100040200010004030001726404000000008000025f5fee00ef00010100040200010007030001724504000000008000045f5f5f5fec00feef00010100040200010004030001722904000000008000025f5fee00ef00010100040200010007030001720a04000000008000045f5f5f5fec00feef0001010004020001000403000171ee04000000008000025f5fee00ef0001010004020001000703000171cf04000000008000045f5f5f5fec00feef0001010004020001000403000171b304000000008000025f5fee00ef00010100040200010007030001719404000000008000045f5f5f5fec00feef00010100040200010004030001717804000000008000025f5fee00ef00010100040200010007030001715904000000008000045f5f5f5fec00feef00010100040200010004030001713d04000000008000025f5fee00ef00010100040200010007030001711e04000000008000045f5f5f5fec00feef00010100040200010004030001710204000000008000025f5fee00ef0001010004020001000703000170e304000000008000045f5f5f5fec00feef0001010004020001000403000170c704000000008000025f5fee00ef0001010004020001000703000170a804000000008000045f5f5f5fec00feef00010100040200010004030001708c04000000008000025f5fee00ef00010100040200010007030001706d04000000008000045f5f5f5fec00feef00010100040200010004030001705104000000008000025f5fee00ef00010100040200010007030001703204000000008000045f5f5f5fec00feef00010100040200010004030001701604000000008000025f5fee00ef000101000402000100070300016ff704000000008000045f5f5f5fec00feef000101000402000100040300016fdb04000000008000025f5fee00ef000101000402000100070300016fbc04000000008000045f5f5f5fec00feef000101000402000100040300016fa004000000008000025f5fee00ef000101000402000100070300016f8104000000008000045f5f5f5fec00feef000101000402000100040300016f6504000000008000025f5fee00ef000101000402000100070300016f4604000000008000045f5f5f5fec00feef000101000402000100040300016f2a04000000008000025f5fee00ef000101000402000100070300016f0b04000000008000045f5f5f5fec00feef000101000402000100040300016eef04000000008000025f5fee00ef000101000402000100070300016ed004000000008000045f5f5f5fec00feef000101000402000100040300016eb404000000008000025f5fee00ef000101000402000100070300016e9504000000008000045f5f5f5fec00feef000101000402000100040300016e7904000000008000025f5fee00ef000101000402000100070300016e5a04000000008000045f5f5f5fec00feef000101000402000100040300016e3e04000000008000025f5fee00ef000101000402000100070300016e1f04000000008000045f5f5f5fec00feef000101000402000100040300016e0304000000008000025f5fee00ef000101000402000100070300016de404000000008000045f5f5f5fec00feef000101000402000100040300016dc804000000008000025f5fee00ef000101000402000100070300016da904000000008000045f5f5f5fec00feef000101000402000100040300016d8d04000000008000025f5fee00ef000101000402000100070300016d6e04000000008000045f5f5f5fec00feef000101000402000100040300016d5204000000008000025f5fee00ef000101000402000100070300016d3304000000008000045f5f5f5fec00feef000101000402000100040300016d1704000000008000025f5fee00ef000101000402000100070300016cf804000000008000045f5f5f5fec00feef000101000402000100040300016cdc04000000008000025f5fee00ef000101000402000100070300016cbd04000000008000045f5f5f5fec00feef000101000402000100040300016ca104000000008000025f5fee00ef000101000402000100070300016c8204000000008000045f5f5f5fec00feef000101000402000100040300016c6604000000008000025f5fee00ef000101000402000100070300016c4704000000008000045f5f5f5fec00feef000101000402000100040300016c2b04000000008000025f5fee00ef000101000402000100070300016c0c04000000008000045f5f5f5fec00feef000101000402000100040300016bf004000000008000025f5fee00ef000101000402000100070300016bd104000000008000045f5f5f5fec00feef000101000402000100040300016bb504000000008000025f5fee00ef000101000402000100070300016b9604000000008000045f5f5f5fec00feef000101000402000100040300016b7a04000000008000025f5fee00ef000101000402000100070300016b5b04000000008000045f5f5f5fec00feef000101000402000100040300016b3f04000000008000025f5fee00ef000101000402000100070300016b2004000000008000045f5f5f5fec00feef000101000402000100040300016b0404000000008000025f5fee00ef000101000402000100070300016ae504000000008000045f5f5f5fec00feef000101000402000100040300016ac904000000008000025f5fee00ef000101000402000100070300016aaa04000000008000045f5f5f5fec00feef000101000402000100040300016a8e04000000008000025f5fee00ef000101000402000100070300016a6f04000000008000045f5f5f5fec00feef000101000402000100040300016a5304000000008000025f5fee00ef000101000402000100070300016a3404000000008000045f5f5f5fec00feef000101000402000100040300016a1804000000008000025f5fee00ef0001010004020001000703000169f904000000008000045f5f5f5fec00feef0001010004020001000403000169dd04000000008000025f5fee00ef0001010004020001000703000169be04000000008000045f5f5f5fec00feef0001010004020001000403000169a204000000008000025f5fee00ef00010100040200010007030001698304000000008000045f5f5f5fec00feef00010100040200010004030001696704000000008000025f5fee00ef00010100040200010007030001694804000000008000045f5f5f5fec00feef00010100040200010004030001692c04000000008000025f5fee00ef00010100040200010007030001690d04000000008000045f5f5f5fec00feef0001010004020001000403000168f104000000008000025f5fee00ef0001010004020001000703000168d204000000008000045f5f5f5fec00feef0001010004020001000403000168b604000000008000025f5fee00ef00010100040200010007030001689704000000008000045f5f5f5fec00feef00010100040200010004030001687b04000000008000025f5fee00ef00010100040200010007030001685c04000000008000045f5f5f5fec00feef00010100040200010004030001684004000000008000025f5fee00ef00010100040200010007030001682104000000008000045f5f5f5fec00feef00010100040200010004030001680504000000008000025f5fee00ef0001010004020001000703000167e604000000008000045f5f5f5fec00feef0001010004020001000403000167ca04000000008000025f5fee00ef0001010004020001000703000167ab04000000008000045f5f5f5fec00feef00010100040200010004030001678f04000000008000025f5fee00ef00010100040200010007030001677004000000008000045f5f5f5fec00feef00010100040200010004030001675404000000008000025f5fee00ef00010100040200010007030001673504000000008000045f5f5f5fec00feef00010100040200010004030001671904000000008000025f5fee00ef0001010004020001000703000166fa04000000008000045f5f5f5fec00feef0001010004020001000403000166de04000000008000025f5fee00ef0001010004020001000703000166bf04000000008000045f5f5f5fec00feef0001010004020001000403000166a304000000008000025f5fee00ef00010100040200010007030001668404000000008000045f5f5f5fec00feef00010100040200010004030001666804000000008000025f5fee00ef00010100040200010007030001664904000000008000045f5f5f5fec00feef00010100040200010004030001662d04000000008000025f5fee00ef00010100040200010007030001660e04000000008000045f5f5f5fec00feef0001010004020001000403000165f204000000008000025f5fee00ef0001010004020001000703000165d304000000008000045f5f5f5fec00feef0001010004020001000403000165b704000000008000025f5fee00ef00010100040200010007030001659804000000008000045f5f5f5fec00feef00010100040200010004030001657c04000000008000025f5fee00ef00010100040200010007030001655d04000000008000045f5f5f5fec00feef00010100040200010004030001654104000000008000025f5fee00ef00010100040200010007030001652204000000008000045f5f5f5fec00feef00010100040200010004030001650604000000008000025f5fee00ef0001010004020001000703000164e704000000008000045f5f5f5fec00feef0001010004020001000403000164cb04000000008000025f5fee00ef0001010004020001000703000164ac04000000008000045f5f5f5fec00feef00010100040200010004030001649004000000008000025f5fee00ef00010100040200010007030001647104000000008000045f5f5f5fec00feef00010100040200010004030001645504000000008000025f5fee00ef00010100040200010007030001643604000000008000045f5f5f5fec00feef00010100040200010004030001641a04000000008000025f5fee00ef0001010004020001000703000163fb04000000008000045f5f5f5fec00feef0001010004020001000403000163df04000000008000025f5fee00ef0001010004020001000703000163c004000000008000045f5f5f5fec00feef0001010004020001000403000163a404000000008000025f5fee00ef00010100040200010007030001638504000000008000045f5f5f5fec00feef00010100040200010004030001636904000000008000025f5fee00ef00010100040200010007030001634a04000000008000045f5f5f5fec00feef00010100040200010004030001632e04000000008000025f5fee00ef00010100040200010007030001630f04000000008000045f5f5f5fec00feef0001010004020001000403000162f304000000008000025f5fee00ef0001010004020001000703000162d404000000008000045f5f5f5fec00feef0001010004020001000403000162b804000000008000025f5fee00ef00010100040200010007030001629904000000008000045f5f5f5fec00feef00010100040200010004030001627d04000000008000025f5fee00ef00010100040200010007030001625e04000000008000045f5f5f5fec00feef00010100040200010004030001624204000000008000025f5fee00ef00010100040200010007030001622304000000008000045f5f5f5fec00feef00010100040200010004030001620704000000008000025f5fee00ef0001010004020001000703000161e804000000008000045f5f5f5fec00feef0001010004020001000403000161cc04000000008000025f5fee00ef0001010004020001000703000161ad04000000008000045f5f5f5fec00feef00010100040200010004030001619104000000008000025f5fee00ef00010100040200010007030001617204000000008000045f5f5f5fec00feef00010100040200010004030001615604000000008000025f5fee00ef00010100040200010007030001613704000000008000045f5f5f5fec00feef00010100040200010004030001611b04000000008000025f5fee00ef0001010004020001000703000160fc04000000008000045f5f5f5fec00feef0001010004020001000403000160e004000000008000025f5fee00ef0001010004020001000703000160c104000000008000045f5f5f5fec00feef0001010004020001000403000160a504000000008000025f5fee00ef00010100040200010007030001608604000000008000045f5f5f5fec00feef00010100040200010004030001606a04000000008000025f5fee00ef00010100040200010007030001604b04000000008000045f5f5f5fec00feef00010100040200010004030001602f04000000008000025f5fee00ef00010100040200010007030001601004000000008000045f5f5f5fec00feef000101000402000100040300015ff404000000008000025f5fee00ef000101000402000100070300015fd504000000008000045f5f5f5fec00feef000101000402000100040300015fb904000000008000025f5fee00ef000101000402000100070300015f9a04000000008000045f5f5f5fec00feef000101000402000100040300015f7e04000000008000025f5fee00ef000101000402000100070300015f5f04000000008000045f5f5f5fec00feef000101000402000100040300015f4304000000008000025f5fee00ef000101000402000100070300015f2404000000008000045f5f5f5fec00feef000101000402000100040300015f0804000000008000025f5fee00ef000101000402000100070300015ee904000000008000045f5f5f5fec00feef000101000402000100040300015ecd04000000008000025f5fee00ef000101000402000100070300015eae04000000008000045f5f5f5fec00feef000101000402000100040300015e9204000000008000025f5fee00ef000101000402000100070300015e7304000000008000045f5f5f5fec00feef000101000402000100040300015e5704000000008000025f5fee00ef000101000402000100070300015e3804000000008000045f5f5f5fec00feef000101000402000100040300015e1c04000000008000025f5fee00ef000101000402000100070300015dfd04000000008000045f5f5f5fec00feef000101000402000100040300015de104000000008000025f5fee00ef000101000402000100070300015dc204000000008000045f5f5f5fec00feef000101000402000100040300015da604000000008000025f5fee00ef000101000402000100070300015d8704000000008000045f5f5f5fec00feef000101000402000100040300015d6b04000000008000025f5fee00ef000101000402000100070300015d4c04000000008000045f5f5f5fec00feef000101000402000100040300015d3004000000008000025f5fee00ef000101000402000100070300015d1104000000008000045f5f5f5fec00feef000101000402000100040300015cf504000000008000025f5fee00ef000101000402000100070300015cd604000000008000045f5f5f5fec00feef000101000402000100040300015cba04000000008000025f5fee00ef000101000402000100070300015c9b04000000008000045f5f5f5fec00feef000101000402000100040300015c7f04000000008000025f5fee00ef000101000402000100070300015c6004000000008000045f5f5f5fec00feef000101000402000100040300015c4404000000008000025f5fee00ef000101000402000100070300015c2504000000008000045f5f5f5fec00feef000101000402000100040300015c0904000000008000025f5fee00ef000101000402000100070300015bea04000000008000045f5f5f5fec00feef000101000402000100040300015bce04000000008000025f5fee00ef000101000402000100070300015baf04000000008000045f5f5f5fec00feef000101000402000100040300015b9304000000008000025f5fee00ef000101000402000100070300015b7404000000008000045f5f5f5fec00feef000101000402000100040300015b5804000000008000025f5fee00ef000101000402000100070300015b3904000000008000045f5f5f5fec00feef000101000402000100040300015b1d04000000008000025f5fee00ef000101000402000100070300015afe04000000008000045f5f5f5fec00feef000101000402000100040300015ae204000000008000025f5fee00ef000101000402000100070300015ac304000000008000045f5f5f5fec00feef000101000402000100040300015aa704000000008000025f5fee00ef000101000402000100070300015a8804000000008000045f5f5f5fec00feef000101000402000100040300015a6c04000000008000025f5fee00ef000101000402000100070300015a4d04000000008000045f5f5f5fec00feef000101000402000100040300015a3104000000008000025f5fee00ef000101000402000100070300015a1204000000008000045f5f5f5fec00feef0001010004020001000403000159f604000000008000025f5fee00ef0001010004020001000703000159d704000000008000045f5f5f5fec00feef0001010004020001000403000159bb04000000008000025f5fee00ef00010100040200010007030001599c04000000008000045f5f5f5fec00feef00010100040200010004030001598004000000008000025f5fee00ef00010100040200010007030001596104000000008000045f5f5f5fec00feef00010100040200010004030001594504000000008000025f5fee00ef00010100040200010007030001592604000000008000045f5f5f5fec00feef00010100040200010004030001590a04000000008000025f5fee00ef0001010004020001000703000158eb04000000008000045f5f5f5fec00feef0001010004020001000403000158cf04000000008000025f5fee00ef0001010004020001000703000158b004000000008000045f5f5f5fec00feef00010100040200010004030001589404000000008000025f5fee00ef00010100040200010007030001587504000000008000045f5f5f5fec00feef00010100040200010004030001585904000000008000025f5fee00ef00010100040200010007030001583a04000000008000045f5f5f5fec00feef00010100040200010004030001581e04000000008000025f5fee00ef0001010004020001000703000157ff04000000008000045f5f5f5fec00feef0001010004020001000403000157e304000000008000025f5fee00ef0001010004020001000703000157c404000000008000045f5f5f5fec00feef0001010004020001000403000157a804000000008000025f5fee00ef00010100040200010007030001578904000000008000045f5f5f5fec00feef00010100040200010004030001576d04000000008000025f5fee00ef00010100040200010007030001574e04000000008000045f5f5f5fec00feef00010100040200010004030001573204000000008000025f5fee00ef00010100040200010007030001571304000000008000045f5f5f5fec00feef0001010004020001000403000156f704000000008000025f5fee00ef0001010004020001000703000156d804000000008000045f5f5f5fec00feef0001010004020001000403000156bc04000000008000025f5fee00ef00010100040200010007030001569d04000000008000045f5f5f5fec00feef00010100040200010004030001568104000000008000025f5fee00ef00010100040200010007030001566204000000008000045f5f5f5fec00feef00010100040200010004030001564604000000008000025f5fee00ef00010100040200010007030001562704000000008000045f5f5f5fec00feef00010100040200010004030001560b04000000008000025f5fee00ef0001010004020001000703000155ec04000000008000045f5f5f5fec00feef0001010004020001000403000155d004000000008000025f5fee00ef0001010004020001000703000155b104000000008000045f5f5f5fec00feef00010100040200010004030001559504000000008000025f5fee00ef00010100040200010007030001557604000000008000045f5f5f5fec00feef00010100040200010004030001555a04000000008000025f5fee00ef00010100040200010007030001553b04000000008000045f5f5f5fec00feef00010100040200010004030001551f04000000008000025f5fee00ef00010100040200010007030001550004000000008000045f5f5f5fec00feef0001010004020001000403000154e404000000008000025f5fee00ef0001010004020001000703000154c504000000008000045f5f5f5fec00feef0001010004020001000403000154a904000000008000025f5fee00ef00010100040200010007030001548a04000000008000045f5f5f5fec00feef00010100040200010004030001546e04000000008000025f5fee00ef00010100040200010007030001544f04000000008000045f5f5f5fec00feef00010100040200010004030001543304000000008000025f5fee00ef00010100040200010007030001541404000000008000045f5f5f5fec00feef0001010004020001000403000153f804000000008000025f5fee00ef0001010004020001000703000153d904000000008000045f5f5f5fec00feef0001010004020001000403000153bd04000000008000025f5fee00ef00010100040200010007030001539e04000000008000045f5f5f5fec00feef00010100040200010004030001538204000000008000025f5fee00ef00010100040200010007030001536304000000008000045f5f5f5fec00feef00010100040200010004030001534704000000008000025f5fee00ef00010100040200010007030001532804000000008000045f5f5f5fec00feef00010100040200010004030001530c04000000008000025f5fee00ef0001010004020001000703000152ed04000000008000045f5f5f5fec00feef0001010004020001000403000152d104000000008000025f5fee00ef0001010004020001000703000152b204000000008000045f5f5f5fec00feef00010100040200010004030001529604000000008000025f5fee00ef00010100040200010007030001527704000000008000045f5f5f5fec00feef00010100040200010004030001525b04000000008000025f5fee00ef00010100040200010007030001523c04000000008000045f5f5f5fec00feef00010100040200010004030001522004000000008000025f5fee00ef00010100040200010007030001520104000000008000045f5f5f5fec00feef0001010004020001000403000151e504000000008000025f5fee00ef0001010004020001000703000151c604000000008000045f5f5f5fec00feef0001010004020001000403000151aa04000000008000025f5fee00ef00010100040200010007030001518b04000000008000045f5f5f5fec00feef00010100040200010004030001516f04000000008000025f5fee00ef00010100040200010007030001515004000000008000045f5f5f5fec00feef00010100040200010004030001513404000000008000025f5fee00ef00010100040200010007030001511504000000008000045f5f5f5fec00feef0001010004020001000403000150f904000000008000025f5fee00ef0001010004020001000703000150da04000000008000045f5f5f5fec00feef0001010004020001000403000150be04000000008000025f5fee00ef00010100040200010007030001509f04000000008000045f5f5f5fec00feef00010100040200010004030001508304000000008000025f5fee00ef00010100040200010007030001506404000000008000045f5f5f5fec00feef00010100040200010004030001504804000000008000025f5fee00ef00010100040200010007030001502904000000008000045f5f5f5fec00feef00010100040200010004030001500d04000000008000025f5fee00ef000101000402000100070300014fee04000000008000045f5f5f5fec00feef000101000402000100040300014fd204000000008000025f5fee00ef000101000402000100070300014fb304000000008000045f5f5f5fec00feef000101000402000100040300014f9704000000008000025f5fee00ef000101000402000100070300014f7804000000008000045f5f5f5fec00feef000101000402000100040300014f5c04000000008000025f5fee00ef000101000402000100070300014f3d04000000008000045f5f5f5fec00feef000101000402000100040300014f2104000000008000025f5fee00ef000101000402000100070300014f0204000000008000045f5f5f5fec00feef000101000402000100040300014ee604000000008000025f5fee00ef000101000402000100070300014ec704000000008000045f5f5f5fec00feef000101000402000100040300014eab04000000008000025f5fee00ef000101000402000100070300014e8c04000000008000045f5f5f5fec00feef000101000402000100040300014e7004000000008000025f5fee00ef000101000402000100070300014e5104000000008000045f5f5f5fec00feef000101000402000100040300014e3504000000008000025f5fee00ef000101000402000100070300014e1604000000008000045f5f5f5fec00feef000101000402000100040300014dfa04000000008000025f5fee00ef000101000402000100070300014ddb04000000008000045f5f5f5fec00feef000101000402000100040300014dbf04000000008000025f5fee00ef000101000402000100070300014da004000000008000045f5f5f5fec00feef000101000402000100040300014d8404000000008000025f5fee00ef000101000402000100070300014d6504000000008000045f5f5f5fec00feef000101000402000100040300014d4904000000008000025f5fee00ef000101000402000100070300014d2a04000000008000045f5f5f5fec00feef000101000402000100040300014d0e04000000008000025f5fee00ef000101000402000100070300014cef04000000008000045f5f5f5fec00feef000101000402000100040300014cd304000000008000025f5fee00ef000101000402000100070300014cb404000000008000045f5f5f5fec00feef000101000402000100040300014c9804000000008000025f5fee00ef000101000402000100070300014c7904000000008000045f5f5f5fec00feef000101000402000100040300014c5d04000000008000025f5fee00ef000101000402000100070300014c3e04000000008000045f5f5f5fec00feef000101000402000100040300014c2204000000008000025f5fee00ef000101000402000100070300014c0304000000008000045f5f5f5fec00feef000101000402000100040300014be704000000008000025f5fee00ef000101000402000100070300014bc804000000008000045f5f5f5fec00feef000101000402000100040300014bac04000000008000025f5fee00ef000101000402000100070300014b8d04000000008000045f5f5f5fec00feef000101000402000100040300014b7104000000008000025f5fee00ef000101000402000100070300014b5204000000008000045f5f5f5fec00feef000101000402000100040300014b3604000000008000025f5fee00ef000101000402000100070300014b1704000000008000045f5f5f5fec00feef000101000402000100040300014afb04000000008000025f5fee00ef000101000402000100070300014adc04000000008000045f5f5f5fec00feef000101000402000100040300014ac004000000008000025f5fee00ef000101000402000100070300014aa104000000008000045f5f5f5fec00feef000101000402000100040300014a8504000000008000025f5fee00ef000101000402000100070300014a6604000000008000045f5f5f5fec00feef000101000402000100040300014a4a04000000008000025f5fee00ef000101000402000100070300014a2b04000000008000045f5f5f5fec00feef000101000402000100040300014a0f04000000008000025f5fee00ef0001010004020001000703000149f004000000008000045f5f5f5fec00feef0001010004020001000403000149d404000000008000025f5fee00ef0001010004020001000703000149b504000000008000045f5f5f5fec00feef00010100040200010004030001499904000000008000025f5fee00ef00010100040200010007030001497a04000000008000045f5f5f5fec00feef00010100040200010004030001495e04000000008000025f5fee00ef00010100040200010007030001493f04000000008000045f5f5f5fec00feef00010100040200010004030001492304000000008000025f5fee00ef00010100040200010007030001490404000000008000045f5f5f5fec00feef0001010004020001000403000148e804000000008000025f5fee00ef0001010004020001000703000148c904000000008000045f5f5f5fec00feef0001010004020001000403000148ad04000000008000025f5fee00ef00010100040200010007030001488e04000000008000045f5f5f5fec00feef00010100040200010004030001487204000000008000025f5fee00ef00010100040200010007030001485304000000008000045f5f5f5fec00feef00010100040200010004030001483704000000008000025f5fee00ef00010100040200010007030001481804000000008000045f5f5f5fec00feef0001010004020001000403000147fc04000000008000025f5fee00ef0001010004020001000703000147dd04000000008000045f5f5f5fec00feef0001010004020001000403000147c104000000008000025f5fee00ef0001010004020001000703000147a204000000008000045f5f5f5fec00feef00010100040200010004030001478604000000008000025f5fee00ef00010100040200010007030001476704000000008000045f5f5f5fec00feef00010100040200010004030001474b04000000008000025f5fee00ef00010100040200010007030001472c04000000008000045f5f5f5fec00feef00010100040200010004030001471004000000008000025f5fee00ef0001010004020001000703000146f104000000008000045f5f5f5fec00feef0001010004020001000403000146d504000000008000025f5fee00ef0001010004020001000703000146b604000000008000045f5f5f5fec00feef00010100040200010004030001469a04000000008000025f5fee00ef00010100040200010007030001467b04000000008000045f5f5f5fec00feef00010100040200010004030001465f04000000008000025f5fee00ef00010100040200010007030001464004000000008000045f5f5f5fec00feef00010100040200010004030001462404000000008000025f5fee00ef00010100040200010007030001460504000000008000045f5f5f5fec00feef0001010004020001000403000145e904000000008000025f5fee00ef0001010004020001000703000145ca04000000008000045f5f5f5fec00feef0001010004020001000403000145ae04000000008000025f5fee00ef00010100040200010007030001458f04000000008000045f5f5f5fec00feef00010100040200010004030001457304000000008000025f5fee00ef00010100040200010007030001455404000000008000045f5f5f5fec00feef00010100040200010004030001453804000000008000025f5fee00ef00010100040200010007030001451904000000008000045f5f5f5fec00feef0001010004020001000403000144fd04000000008000025f5fee00ef0001010004020001000703000144de04000000008000045f5f5f5fec00feef0001010004020001000403000144c204000000008000025f5fee00ef0001010004020001000703000144a304000000008000045f5f5f5fec00feef00010100040200010004030001448704000000008000025f5fee00ef00010100040200010007030001446804000000008000045f5f5f5fec00feef00010100040200010004030001444c04000000008000025f5fee00ef00010100040200010007030001442d04000000008000045f5f5f5fec00feef00010100040200010004030001441104000000008000025f5fee00ef0001010004020001000703000143f204000000008000045f5f5f5fec00feef0001010004020001000403000143d604000000008000025f5fee00ef0001010004020001000703000143b704000000008000045f5f5f5fec00feef00010100040200010004030001439b04000000008000025f5fee00ef00010100040200010007030001437c04000000008000045f5f5f5fec00feef00010100040200010004030001436004000000008000025f5fee00ef00010100040200010007030001434104000000008000045f5f5f5fec00feef00010100040200010004030001432504000000008000025f5fee00ef00010100040200010007030001430604000000008000045f5f5f5fec00feef0001010004020001000403000142ea04000000008000025f5fee00ef0001010004020001000703000142cb04000000008000045f5f5f5fec00feef0001010004020001000403000142af04000000008000025f5fee00ef00010100040200010007030001429004000000008000045f5f5f5fec00feef00010100040200010004030001427404000000008000025f5fee00ef00010100040200010007030001425504000000008000045f5f5f5fec00feef00010100040200010004030001423904000000008000025f5fee00ef00010100040200010007030001421a04000000008000045f5f5f5fec00feef0001010004020001000403000141fe04000000008000025f5fee00ef0001010004020001000703000141df04000000008000045f5f5f5fec00feef0001010004020001000403000141c304000000008000025f5fee00ef0001010004020001000703000141a404000000008000045f5f5f5fec00feef00010100040200010004030001418804000000008000025f5fee00ef00010100040200010007030001416904000000008000045f5f5f5fec00feef00010100040200010004030001414d04000000008000025f5fee00ef00010100040200010007030001412e04000000008000045f5f5f5fec00feef00010100040200010004030001411204000000008000025f5fee00ef0001010004020001000703000140f304000000008000045f5f5f5fec00feef0001010004020001000403000140d704000000008000025f5fee00ef0001010004020001000703000140b804000000008000045f5f5f5fec00feef00010100040200010004030001409c04000000008000025f5fee00ef00010100040200010007030001407d04000000008000045f5f5f5fec00feef00010100040200010004030001406104000000008000025f5fee00ef00010100040200010007030001404204000000008000045f5f5f5fec00feef00010100040200010004030001402604000000008000025f5fee00ef00010100040200010007030001400704000000008000045f5f5f5fec00feef000101000402000100040300013feb04000000008000025f5fee00ef000101000402000100070300013fcc04000000008000045f5f5f5fec00feef000101000402000100040300013fb004000000008000025f5fee00ef000101000402000100070300013f9104000000008000045f5f5f5fec00feef000101000402000100040300013f7504000000008000025f5fee00ef000101000402000100070300013f5604000000008000045f5f5f5fec00feef000101000402000100040300013f3a04000000008000025f5fee00ef000101000402000100070300013f1b04000000008000045f5f5f5fec00feef000101000402000100040300013eff04000000008000025f5fee00ef000101000402000100070300013ee004000000008000045f5f5f5fec00feef000101000402000100040300013ec404000000008000025f5fee00ef000101000402000100070300013ea504000000008000045f5f5f5fec00feef000101000402000100040300013e8904000000008000025f5fee00ef000101000402000100070300013e6a04000000008000045f5f5f5fec00feef000101000402000100040300013e4e04000000008000025f5fee00ef000101000402000100070300013e2f04000000008000045f5f5f5fec00feef000101000402000100040300013e1304000000008000025f5fee00ef000101000402000100070300013df404000000008000045f5f5f5fec00feef000101000402000100040300013dd804000000008000025f5fee00ef000101000402000100070300013db904000000008000045f5f5f5fec00feef000101000402000100040300013d9d04000000008000025f5fee00ef000101000402000100070300013d7e04000000008000045f5f5f5fec00feef000101000402000100040300013d6204000000008000025f5fee00ef000101000402000100070300013d4304000000008000045f5f5f5fec00feef000101000402000100040300013d2704000000008000025f5fee00ef000101000402000100070300013d0804000000008000045f5f5f5fec00feef000101000402000100040300013cec04000000008000025f5fee00ef000101000402000100070300013ccd04000000008000045f5f5f5fec00feef000101000402000100040300013cb104000000008000025f5fee00ef000101000402000100070300013c9204000000008000045f5f5f5fec00feef000101000402000100040300013c7604000000008000025f5fee00ef000101000402000100070300013c5704000000008000045f5f5f5fec00feef000101000402000100040300013c3b04000000008000025f5fee00ef000101000402000100070300013c1c04000000008000045f5f5f5fec00feef000101000402000100040300013c0004000000008000025f5fee00ef000101000402000100070300013be104000000008000045f5f5f5fec00feef000101000402000100040300013bc504000000008000025f5fee00ef000101000402000100070300013ba604000000008000045f5f5f5fec00feef000101000402000100040300013b8a04000000008000025f5fee00ef000101000402000100070300013b6b04000000008000045f5f5f5fec00feef000101000402000100040300013b4f04000000008000025f5fee00ef000101000402000100070300013b3004000000008000045f5f5f5fec00feef000101000402000100040300013b1404000000008000025f5fee00ef000101000402000100070300013af504000000008000045f5f5f5fec00feef000101000402000100040300013ad904000000008000025f5fee00ef000101000402000100070300013aba04000000008000045f5f5f5fec00feef000101000402000100040300013a9e04000000008000025f5fee00ef000101000402000100070300013a7f04000000008000045f5f5f5fec00feef000101000402000100040300013a6304000000008000025f5fee00ef000101000402000100070300013a4404000000008000045f5f5f5fec00feef000101000402000100040300013a2804000000008000025f5fee00ef000101000402000100070300013a0904000000008000045f5f5f5fec00feef0001010004020001000403000139ed04000000008000025f5fee00ef0001010004020001000703000139ce04000000008000045f5f5f5fec00feef0001010004020001000403000139b204000000008000025f5fee00ef00010100040200010007030001399304000000008000045f5f5f5fec00feef00010100040200010004030001397704000000008000025f5fee00ef00010100040200010007030001395804000000008000045f5f5f5fec00feef00010100040200010004030001393c04000000008000025f5fee00ef00010100040200010007030001391d04000000008000045f5f5f5fec00feef00010100040200010004030001390104000000008000025f5fee00ef0001010004020001000703000138e204000000008000045f5f5f5fec00feef0001010004020001000403000138c604000000008000025f5fee00ef0001010004020001000703000138a704000000008000045f5f5f5fec00feef00010100040200010004030001388b04000000008000025f5fee00ef00010100040200010007030001386c04000000008000045f5f5f5fec00feef00010100040200010004030001385004000000008000025f5fee00ef00010100040200010007030001383104000000008000045f5f5f5fec00feef00010100040200010004030001381504000000008000025f5fee00ef0001010004020001000703000137f604000000008000045f5f5f5fec00feef0001010004020001000403000137da04000000008000025f5fee00ef0001010004020001000703000137bb04000000008000045f5f5f5fec00feef00010100040200010004030001379f04000000008000025f5fee00ef00010100040200010007030001378004000000008000045f5f5f5fec00feef00010100040200010004030001376404000000008000025f5fee00ef00010100040200010007030001374504000000008000045f5f5f5fec00feef00010100040200010004030001372904000000008000025f5fee00ef00010100040200010007030001370a04000000008000045f5f5f5fec00feef0001010004020001000403000136ee04000000008000025f5fee00ef0001010004020001000703000136cf04000000008000045f5f5f5fec00feef0001010004020001000403000136b304000000008000025f5fee00ef00010100040200010007030001369404000000008000045f5f5f5fec00feef00010100040200010004030001367804000000008000025f5fee00ef00010100040200010007030001365904000000008000045f5f5f5fec00feef00010100040200010004030001363d04000000008000025f5fee00ef00010100040200010007030001361e04000000008000045f5f5f5fec00feef00010100040200010004030001360204000000008000025f5fee00ef0001010004020001000703000135e304000000008000045f5f5f5fec00feef0001010004020001000403000135c704000000008000025f5fee00ef0001010004020001000703000135a804000000008000045f5f5f5fec00feef00010100040200010004030001358c04000000008000025f5fee00ef00010100040200010007030001356d04000000008000045f5f5f5fec00feef00010100040200010004030001355104000000008000025f5fee00ef00010100040200010007030001353204000000008000045f5f5f5fec00feef00010100040200010004030001351604000000008000025f5fee00ef0001010004020001000703000134f704000000008000045f5f5f5fec00feef0001010004020001000403000134db04000000008000025f5fee00ef0001010004020001000703000134bc04000000008000045f5f5f5fec00feef0001010004020001000403000134a004000000008000025f5fee00ef00010100040200010007030001348104000000008000045f5f5f5fec00feef00010100040200010004030001346504000000008000025f5fee00ef00010100040200010007030001344604000000008000045f5f5f5fec00feef00010100040200010004030001342a04000000008000025f5fee00ef00010100040200010007030001340b04000000008000045f5f5f5fec00feef0001010004020001000403000133ef04000000008000025f5fee00ef0001010004020001000703000133d004000000008000045f5f5f5fec00feef0001010004020001000403000133b404000000008000025f5fee00ef00010100040200010007030001339504000000008000045f5f5f5fec00feef00010100040200010004030001337904000000008000025f5fee00ef00010100040200010007030001335a04000000008000045f5f5f5fec00feef00010100040200010004030001333e04000000008000025f5fee00ef00010100040200010007030001331f04000000008000045f5f5f5fec00feef00010100040200010004030001330304000000008000025f5fee00ef0001010004020001000703000132e404000000008000045f5f5f5fec00feef0001010004020001000403000132c804000000008000025f5fee00ef0001010004020001000703000132a904000000008000045f5f5f5fec00feef00010100040200010004030001328d04000000008000025f5fee00ef00010100040200010007030001326e04000000008000045f5f5f5fec00feef00010100040200010004030001325204000000008000025f5fee00ef00010100040200010007030001323304000000008000045f5f5f5fec00feef00010100040200010004030001321704000000008000025f5fee00ef0001010004020001000703000131f804000000008000045f5f5f5fec00feef0001010004020001000403000131dc04000000008000025f5fee00ef0001010004020001000703000131bd04000000008000045f5f5f5fec00feef0001010004020001000403000131a104000000008000025f5fee00ef00010100040200010007030001318204000000008000045f5f5f5fec00feef00010100040200010004030001316604000000008000025f5fee00ef00010100040200010007030001314704000000008000045f5f5f5fec00feef00010100040200010004030001312b04000000008000025f5fee00ef00010100040200010007030001310c04000000008000045f5f5f5fec00feef0001010004020001000403000130f004000000008000025f5fee00ef0001010004020001000703000130d104000000008000045f5f5f5fec00feef0001010004020001000403000130b504000000008000025f5fee00ef00010100040200010007030001309604000000008000045f5f5f5fec00feef00010100040200010004030001307a04000000008000025f5fee00ef00010100040200010007030001305b04000000008000045f5f5f5fec00feef00010100040200010004030001303f04000000008000025f5fee00ef00010100040200010007030001302004000000008000045f5f5f5fec00feef00010100040200010004030001300404000000008000025f5fee00ef000101000402000100070300012fe504000000008000045f5f5f5fec00feef000101000402000100040300012fc904000000008000025f5fee00ef000101000402000100070300012faa04000000008000045f5f5f5fec00feef000101000402000100040300012f8e04000000008000025f5fee00ef000101000402000100070300012f6f04000000008000045f5f5f5fec00feef000101000402000100040300012f5304000000008000025f5fee00ef000101000402000100070300012f3404000000008000045f5f5f5fec00feef000101000402000100040300012f1804000000008000025f5fee00ef000101000402000100070300012ef904000000008000045f5f5f5fec00feef000101000402000100040300012edd04000000008000025f5fee00ef000101000402000100070300012ebe04000000008000045f5f5f5fec00feef000101000402000100040300012ea204000000008000025f5fee00ef000101000402000100070300012e8304000000008000045f5f5f5fec00feef000101000402000100040300012e6704000000008000025f5fee00ef000101000402000100070300012e4804000000008000045f5f5f5fec00feef000101000402000100040300012e2c04000000008000025f5fee00ef000101000402000100070300012e0d04000000008000045f5f5f5fec00feef000101000402000100040300012df104000000008000025f5fee00ef000101000402000100070300012dd204000000008000045f5f5f5fec00feef000101000402000100040300012db604000000008000025f5fee00ef000101000402000100070300012d9704000000008000045f5f5f5fec00feef000101000402000100040300012d7b04000000008000025f5fee00ef000101000402000100070300012d5c04000000008000045f5f5f5fec00feef000101000402000100040300012d4004000000008000025f5fee00ef000101000402000100070300012d2104000000008000045f5f5f5fec00feef000101000402000100040300012d0504000000008000025f5fee00ef000101000402000100070300012ce604000000008000045f5f5f5fec00feef000101000402000100040300012cca04000000008000025f5fee00ef000101000402000100070300012cab04000000008000045f5f5f5fec00feef000101000402000100040300012c8f04000000008000025f5fee00ef000101000402000100070300012c7004000000008000045f5f5f5fec00feef000101000402000100040300012c5404000000008000025f5fee00ef000101000402000100070300012c3504000000008000045f5f5f5fec00feef000101000402000100040300012c1904000000008000025f5fee00ef000101000402000100070300012bfa04000000008000045f5f5f5fec00feef000101000402000100040300012bde04000000008000025f5fee00ef000101000402000100070300012bbf04000000008000045f5f5f5fec00feef000101000402000100040300012ba304000000008000025f5fee00ef000101000402000100070300012b8404000000008000045f5f5f5fec00feef000101000402000100040300012b6804000000008000025f5fee00ef000101000402000100070300012b4904000000008000045f5f5f5fec00feef000101000402000100040300012b2d04000000008000025f5fee00ef000101000402000100070300012b0e04000000008000045f5f5f5fec00feef000101000402000100040300012af204000000008000025f5fee00ef000101000402000100070300012ad304000000008000045f5f5f5fec00feef000101000402000100040300012ab704000000008000025f5fee00ef000101000402000100070300012a9804000000008000045f5f5f5fec00feef000101000402000100040300012a7c04000000008000025f5fee00ef000101000402000100070300012a5d04000000008000045f5f5f5fec00feef000101000402000100040300012a4104000000008000025f5fee00ef000101000402000100070300012a2204000000008000045f5f5f5fec00feef000101000402000100040300012a0604000000008000025f5fee00ef0001010004020001000703000129e704000000008000045f5f5f5fec00feef0001010004020001000403000129cb04000000008000025f5fee00ef0001010004020001000703000129ac04000000008000045f5f5f5fec00feef00010100040200010004030001299004000000008000025f5fee00ef00010100040200010007030001297104000000008000045f5f5f5fec00feef00010100040200010004030001295504000000008000025f5fee00ef00010100040200010007030001293604000000008000045f5f5f5fec00feef00010100040200010004030001291a04000000008000025f5fee00ef0001010004020001000703000128fb04000000008000045f5f5f5fec00feef0001010004020001000403000128df04000000008000025f5fee00ef0001010004020001000703000128c004000000008000045f5f5f5fec00feef0001010004020001000403000128a404000000008000025f5fee00ef00010100040200010007030001288504000000008000045f5f5f5fec00feef00010100040200010004030001286904000000008000025f5fee00ef00010100040200010007030001284a04000000008000045f5f5f5fec00feef00010100040200010004030001282e04000000008000025f5fee00ef00010100040200010007030001280f04000000008000045f5f5f5fec00feef0001010004020001000403000127f304000000008000025f5fee00ef0001010004020001000703000127d404000000008000045f5f5f5fec00feef0001010004020001000403000127b804000000008000025f5fee00ef00010100040200010007030001279904000000008000045f5f5f5fec00feef00010100040200010004030001277d04000000008000025f5fee00ef00010100040200010007030001275e04000000008000045f5f5f5fec00feef00010100040200010004030001274204000000008000025f5fee00ef00010100040200010007030001272304000000008000045f5f5f5fec00feef00010100040200010004030001270704000000008000025f5fee00ef0001010004020001000703000126e804000000008000045f5f5f5fec00feef0001010004020001000403000126cc04000000008000025f5fee00ef0001010004020001000703000126ad04000000008000045f5f5f5fec00feef00010100040200010004030001269104000000008000025f5fee00ef00010100040200010007030001267204000000008000045f5f5f5fec00feef00010100040200010004030001265604000000008000025f5fee00ef00010100040200010007030001263704000000008000045f5f5f5fec00feef00010100040200010004030001261b04000000008000025f5fee00ef0001010004020001000703000125fc04000000008000045f5f5f5fec00feef0001010004020001000403000125e004000000008000025f5fee00ef0001010004020001000703000125c104000000008000045f5f5f5fec00feef0001010004020001000403000125a504000000008000025f5fee00ef00010100040200010007030001258604000000008000045f5f5f5fec00feef00010100040200010004030001256a04000000008000025f5fee00ef00010100040200010007030001254b04000000008000045f5f5f5fec00feef00010100040200010004030001252f04000000008000025f5fee00ef00010100040200010007030001251004000000008000045f5f5f5fec00feef0001010004020001000403000124f404000000008000025f5fee00ef0001010004020001000703000124d504000000008000045f5f5f5fec00feef0001010004020001000403000124b904000000008000025f5fee00ef00010100040200010007030001249a04000000008000045f5f5f5fec00feef00010100040200010004030001247e04000000008000025f5fee00ef00010100040200010007030001245f04000000008000045f5f5f5fec00feef00010100040200010004030001244304000000008000025f5fee00ef00010100040200010007030001242404000000008000045f5f5f5fec00feef00010100040200010004030001240804000000008000025f5fee00ef0001010004020001000703000123e904000000008000045f5f5f5fec00feef0001010004020001000403000123cd04000000008000025f5fee00ef0001010004020001000703000123ae04000000008000045f5f5f5fec00feef00010100040200010004030001239204000000008000025f5fee00ef00010100040200010007030001237304000000008000045f5f5f5fec00feef00010100040200010004030001235704000000008000025f5fee00ef00010100040200010007030001233804000000008000045f5f5f5fec00feef00010100040200010004030001231c04000000008000025f5fee00ef0001010004020001000703000122fd04000000008000045f5f5f5fec00feef0001010004020001000403000122e104000000008000025f5fee00ef0001010004020001000703000122c204000000008000045f5f5f5fec00feef0001010004020001000403000122a604000000008000025f5fee00ef00010100040200010007030001228704000000008000045f5f5f5fec00feef00010100040200010004030001226b04000000008000025f5fee00ef00010100040200010007030001224c04000000008000045f5f5f5fec00feef00010100040200010004030001223004000000008000025f5fee00ef00010100040200010007030001221104000000008000045f5f5f5fec00feef0001010004020001000403000121f504000000008000025f5fee00ef0001010004020001000703000121d604000000008000045f5f5f5fec00feef0001010004020001000403000121ba04000000008000025f5fee00ef00010100040200010007030001219b04000000008000045f5f5f5fec00feef00010100040200010004030001217f04000000008000025f5fee00ef00010100040200010007030001216004000000008000045f5f5f5fec00feef00010100040200010004030001214404000000008000025f5fee00ef00010100040200010007030001212504000000008000045f5f5f5fec00feef00010100040200010004030001210904000000008000025f5fee00ef0001010004020001000703000120ea04000000008000045f5f5f5fec00feef0001010004020001000403000120ce04000000008000025f5fee00ef0001010004020001000703000120af04000000008000045f5f5f5fec00feef00010100040200010004030001209304000000008000025f5fee00ef00010100040200010007030001207404000000008000045f5f5f5fec00feef00010100040200010004030001205804000000008000025f5fee00ef00010100040200010007030001203904000000008000045f5f5f5fec00feef00010100040200010004030001201d04000000008000025f5fee00ef000101000402000100070300011ffe04000000008000045f5f5f5fec00feef000101000402000100040300011fe204000000008000025f5fee00ef000101000402000100070300011fc304000000008000045f5f5f5fec00feef000101000402000100040300011fa704000000008000025f5fee00ef000101000402000100070300011f8804000000008000045f5f5f5fec00feef000101000402000100040300011f6c04000000008000025f5fee00ef000101000402000100070300011f4d04000000008000045f5f5f5fec00feef000101000402000100040300011f3104000000008000025f5fee00ef000101000402000100070300011f1204000000008000045f5f5f5fec00feef000101000402000100040300011ef604000000008000025f5fee00ef000101000402000100070300011ed704000000008000045f5f5f5fec00feef000101000402000100040300011ebb04000000008000025f5fee00ef000101000402000100070300011e9c04000000008000045f5f5f5fec00feef000101000402000100040300011e8004000000008000025f5fee00ef000101000402000100070300011e6104000000008000045f5f5f5fec00feef000101000402000100040300011e4504000000008000025f5fee00ef000101000402000100070300011e2604000000008000045f5f5f5fec00feef000101000402000100040300011e0a04000000008000025f5fee00ef000101000402000100070300011deb04000000008000045f5f5f5fec00feef000101000402000100040300011dcf04000000008000025f5fee00ef000101000402000100070300011db004000000008000045f5f5f5fec00feef000101000402000100040300011d9404000000008000025f5fee00ef000101000402000100070300011d7504000000008000045f5f5f5fec00feef000101000402000100040300011d5904000000008000025f5fee00ef000101000402000100070300011d3a04000000008000045f5f5f5fec00feef000101000402000100040300011d1e04000000008000025f5fee00ef000101000402000100070300011cff04000000008000045f5f5f5fec00feef000101000402000100040300011ce304000000008000025f5fee00ef000101000402000100070300011cc404000000008000045f5f5f5fec00feef000101000402000100040300011ca804000000008000025f5fee00ef000101000402000100070300011c8904000000008000045f5f5f5fec00feef000101000402000100040300011c6d04000000008000025f5fee00ef000101000402000100070300011c4e04000000008000045f5f5f5fec00feef000101000402000100040300011c3204000000008000025f5fee00ef000101000402000100070300011c1304000000008000045f5f5f5fec00feef000101000402000100040300011bf704000000008000025f5fee00ef000101000402000100070300011bd804000000008000045f5f5f5fec00feef000101000402000100040300011bbc04000000008000025f5fee00ef000101000402000100070300011b9d04000000008000045f5f5f5fec00feef000101000402000100040300011b8104000000008000025f5fee00ef000101000402000100070300011b6204000000008000045f5f5f5fec00feef000101000402000100040300011b4604000000008000025f5fee00ef000101000402000100070300011b2704000000008000045f5f5f5fec00feef000101000402000100040300011b0b04000000008000025f5fee00ef000101000402000100070300011aec04000000008000045f5f5f5fec00feef000101000402000100040300011ad004000000008000025f5fee00ef000101000402000100070300011ab104000000008000045f5f5f5fec00feef000101000402000100040300011a9504000000008000025f5fee00ef000101000402000100070300011a7604000000008000045f5f5f5fec00feef000101000402000100040300011a5a04000000008000025f5fee00ef000101000402000100070300011a3b04000000008000045f5f5f5fec00feef000101000402000100040300011a1f04000000008000025f5fee00ef000101000402000100070300011a0004000000008000045f5f5f5fec00feef0001010004020001000403000119e404000000008000025f5fee00ef0001010004020001000703000119c504000000008000045f5f5f5fec00feef0001010004020001000403000119a904000000008000025f5fee00ef00010100040200010007030001198a04000000008000045f5f5f5fec00feef00010100040200010004030001196e04000000008000025f5fee00ef00010100040200010007030001194f04000000008000045f5f5f5fec00feef00010100040200010004030001193304000000008000025f5fee00ef00010100040200010007030001191404000000008000045f5f5f5fec00feef0001010004020001000403000118f804000000008000025f5fee00ef0001010004020001000703000118d904000000008000045f5f5f5fec00feef0001010004020001000403000118bd04000000008000025f5fee00ef00010100040200010007030001189e04000000008000045f5f5f5fec00feef00010100040200010004030001188204000000008000025f5fee00ef00010100040200010007030001186304000000008000045f5f5f5fec00feef00010100040200010004030001184704000000008000025f5fee00ef00010100040200010007030001182804000000008000045f5f5f5fec00feef00010100040200010004030001180c04000000008000025f5fee00ef0001010004020001000703000117ed04000000008000045f5f5f5fec00feef0001010004020001000403000117d104000000008000025f5fee00ef0001010004020001000703000117b204000000008000045f5f5f5fec00feef00010100040200010004030001179604000000008000025f5fee00ef00010100040200010007030001177704000000008000045f5f5f5fec00feef00010100040200010004030001175b04000000008000025f5fee00ef00010100040200010007030001173c04000000008000045f5f5f5fec00feef00010100040200010004030001172004000000008000025f5fee00ef00010100040200010007030001170104000000008000045f5f5f5fec00feef0001010004020001000403000116e504000000008000025f5fee00ef0001010004020001000703000116c604000000008000045f5f5f5fec00feef0001010004020001000403000116aa04000000008000025f5fee00ef00010100040200010007030001168b04000000008000045f5f5f5fec00feef00010100040200010004030001166f04000000008000025f5fee00ef00010100040200010007030001165004000000008000045f5f5f5fec00feef00010100040200010004030001163404000000008000025f5fee00ef00010100040200010007030001161504000000008000045f5f5f5fec00feef0001010004020001000403000115f904000000008000025f5fee00ef0001010004020001000703000115da04000000008000045f5f5f5fec00feef0001010004020001000403000115be04000000008000025f5fee00ef00010100040200010007030001159f04000000008000045f5f5f5fec00feef00010100040200010004030001158304000000008000025f5fee00ef00010100040200010007030001156404000000008000045f5f5f5fec00feef00010100040200010004030001154804000000008000025f5fee00ef00010100040200010007030001152904000000008000045f5f5f5fec00feef00010100040200010004030001150d04000000008000025f5fee00ef0001010004020001000703000114ee04000000008000045f5f5f5fec00feef0001010004020001000403000114d204000000008000025f5fee00ef0001010004020001000703000114b304000000008000045f5f5f5fec00feef00010100040200010004030001149704000000008000025f5fee00ef00010100040200010007030001147804000000008000045f5f5f5fec00feef00010100040200010004030001145c04000000008000025f5fee00ef00010100040200010007030001143d04000000008000045f5f5f5fec00feef00010100040200010004030001142104000000008000025f5fee00ef00010100040200010007030001140204000000008000045f5f5f5fec00feef0001010004020001000403000113e604000000008000025f5fee00ef0001010004020001000703000113c704000000008000045f5f5f5fec00feef0001010004020001000403000113ab04000000008000025f5fee00ef00010100040200010007030001138c04000000008000045f5f5f5fec00feef00010100040200010004030001137004000000008000025f5fee00ef00010100040200010007030001135104000000008000045f5f5f5fec00feef00010100040200010004030001133504000000008000025f5fee00ef00010100040200010007030001131604000000008000045f5f5f5fec00feef0001010004020001000403000112fa04000000008000025f5fee00ef0001010004020001000703000112db04000000008000045f5f5f5fec00feef0001010004020001000403000112bf04000000008000025f5fee00ef0001010004020001000703000112a004000000008000045f5f5f5fec00feef00010100040200010004030001128404000000008000025f5fee00ef00010100040200010007030001126504000000008000045f5f5f5fec00feef00010100040200010004030001124904000000008000025f5fee00ef00010100040200010007030001122a04000000008000045f5f5f5fec00feef00010100040200010004030001120e04000000008000025f5fee00ef0001010004020001000703000111ef04000000008000045f5f5f5fec00feef0001010004020001000403000111d304000000008000025f5fee00ef0001010004020001000703000111b404000000008000045f5f5f5fec00feef00010100040200010004030001119804000000008000025f5fee00ef00010100040200010007030001117904000000008000045f5f5f5fec00feef00010100040200010004030001115d04000000008000025f5fee00ef00010100040200010007030001113e04000000008000045f5f5f5fec00feef00010100040200010004030001112204000000008000025f5fee00ef00010100040200010007030001110304000000008000045f5f5f5fec00feef0001010004020001000403000110e704000000008000025f5fee00ef0001010004020001000703000110c804000000008000045f5f5f5fec00feef0001010004020001000403000110ac04000000008000025f5fee00ef00010100040200010007030001108d04000000008000045f5f5f5fec00feef00010100040200010004030001107104000000008000025f5fee00ef00010100040200010007030001105204000000008000045f5f5f5fec00feef00010100040200010004030001103604000000008000025f5fee00ef00010100040200010007030001101704000000008000045f5f5f5fec00feef000101000402000100040300010ffb04000000008000025f5fee00ef000101000402000100070300010fdc04000000008000045f5f5f5fec00feef000101000402000100040300010fc004000000008000025f5fee00ef000101000402000100070300010fa104000000008000045f5f5f5fec00feef000101000402000100040300010f8504000000008000025f5fee00ef000101000402000100070300010f6604000000008000045f5f5f5fec00feef000101000402000100040300010f4a04000000008000025f5fee00ef000101000402000100070300010f2b04000000008000045f5f5f5fec00feef000101000402000100040300010f0f04000000008000025f5fee00ef000101000402000100070300010ef004000000008000045f5f5f5fec00feef000101000402000100040300010ed404000000008000025f5fee00ef000101000402000100070300010eb504000000008000045f5f5f5fec00feef000101000402000100040300010e9904000000008000025f5fee00ef000101000402000100070300010e7a04000000008000045f5f5f5fec00feef000101000402000100040300010e5e04000000008000025f5fee00ef000101000402000100070300010e3f04000000008000045f5f5f5fec00feef000101000402000100040300010e2304000000008000025f5fee00ef000101000402000100070300010e0404000000008000045f5f5f5fec00feef000101000402000100040300010de804000000008000025f5fee00ef000101000402000100070300010dc904000000008000045f5f5f5fec00feef000101000402000100040300010dad04000000008000025f5fee00ef000101000402000100070300010d8e04000000008000045f5f5f5fec00feef000101000402000100040300010d7204000000008000025f5fee00ef000101000402000100070300010d5304000000008000045f5f5f5fec00feef000101000402000100040300010d3704000000008000025f5fee00ef000101000402000100070300010d1804000000008000045f5f5f5fec00feef000101000402000100040300010cfc04000000008000025f5fee00ef000101000402000100070300010cdd04000000008000045f5f5f5fec00feef000101000402000100040300010cc104000000008000025f5fee00ef000101000402000100070300010ca204000000008000045f5f5f5fec00feef000101000402000100040300010c8604000000008000025f5fee00ef000101000402000100070300010c6704000000008000045f5f5f5fec00feef000101000402000100040300010c4b04000000008000025f5fee00ef000101000402000100070300010c2c04000000008000045f5f5f5fec00feef000101000402000100040300010c1004000000008000025f5fee00ef000101000402000100070300010bf104000000008000045f5f5f5fec00feef000101000402000100040300010bd504000000008000025f5fee00ef000101000402000100070300010bb604000000008000045f5f5f5fec00feef000101000402000100040300010b9a04000000008000025f5fee00ef000101000402000100070300010b7b04000000008000045f5f5f5fec00feef000101000402000100040300010b5f04000000008000025f5fee00ef000101000402000100070300010b4004000000008000045f5f5f5fec00feef000101000402000100040300010b2404000000008000025f5fee00ef000101000402000100070300010b0504000000008000045f5f5f5fec00feef000101000402000100040300010ae904000000008000025f5fee00ef000101000402000100070300010aca04000000008000045f5f5f5fec00feef000101000402000100040300010aae04000000008000025f5fee00ef000101000402000100070300010a8f04000000008000045f5f5f5fec00feef000101000402000100040300010a7304000000008000025f5fee00ef000101000402000100070300010a5404000000008000045f5f5f5fec00feef000101000402000100040300010a3804000000008000025f5fee00ef000101000402000100070300010a1904000000008000045f5f5f5fec00feef0001010004020001000403000109fd04000000008000025f5fee00ef0001010004020001000703000109de04000000008000045f5f5f5fec00feef0001010004020001000403000109c204000000008000025f5fee00ef0001010004020001000703000109a304000000008000045f5f5f5fec00feef00010100040200010004030001098704000000008000025f5fee00ef00010100040200010007030001096804000000008000045f5f5f5fec00feef00010100040200010004030001094c04000000008000025f5fee00ef00010100040200010007030001092d04000000008000045f5f5f5fec00feef00010100040200010004030001091104000000008000025f5fee00ef0001010004020001000703000108f204000000008000045f5f5f5fec00feef0001010004020001000403000108d604000000008000025f5fee00ef0001010004020001000703000108b704000000008000045f5f5f5fec00feef00010100040200010004030001089b04000000008000025f5fee00ef00010100040200010007030001087c04000000008000045f5f5f5fec00feef00010100040200010004030001086004000000008000025f5fee00ef00010100040200010007030001084104000000008000045f5f5f5fec00feef00010100040200010004030001082504000000008000025f5fee00ef00010100040200010007030001080604000000008000045f5f5f5fec00feef0001010004020001000403000107ea04000000008000025f5fee00ef0001010004020001000703000107cb04000000008000045f5f5f5fec00feef0001010004020001000403000107af04000000008000025f5fee00ef00010100040200010007030001079004000000008000045f5f5f5fec00feef00010100040200010004030001077404000000008000025f5fee00ef00010100040200010007030001075504000000008000045f5f5f5fec00feef00010100040200010004030001073904000000008000025f5fee00ef00010100040200010007030001071a04000000008000045f5f5f5fec00feef0001010004020001000403000106fe04000000008000025f5fee00ef0001010004020001000703000106df04000000008000045f5f5f5fec00feef0001010004020001000403000106c304000000008000025f5fee00ef0001010004020001000703000106a404000000008000045f5f5f5fec00feef00010100040200010004030001068804000000008000025f5fee00ef00010100040200010007030001066904000000008000045f5f5f5fec00feef00010100040200010004030001064d04000000008000025f5fee00ef00010100040200010007030001062e04000000008000045f5f5f5fec00feef00010100040200010004030001061204000000008000025f5fee00ef0001010004020001000703000105f304000000008000045f5f5f5fec00feef0001010004020001000403000105d704000000008000025f5fee00ef0001010004020001000703000105b804000000008000045f5f5f5fec00feef00010100040200010004030001059c04000000008000025f5fee00ef00010100040200010007030001057d04000000008000045f5f5f5fec00feef00010100040200010004030001056104000000008000025f5fee00ef00010100040200010007030001054204000000008000045f5f5f5fec00feef00010100040200010004030001052604000000008000025f5fee00ef00010100040200010007030001050704000000008000045f5f5f5fec00feef0001010004020001000403000104eb04000000008000025f5fee00ef0001010004020001000703000104cc04000000008000045f5f5f5fec00feef0001010004020001000403000104b004000000008000025f5fee00ef00010100040200010007030001049104000000008000045f5f5f5fec00feef00010100040200010004030001047504000000008000025f5fee00ef00010100040200010007030001045604000000008000045f5f5f5fec00feef00010100040200010004030001043a04000000008000025f5fee00ef00010100040200010007030001041b04000000008000045f5f5f5fec00feef0001010004020001000403000103ff04000000008000025f5fee00ef0001010004020001000703000103e004000000008000045f5f5f5fec00feef0001010004020001000403000103c404000000008000025f5fee00ef0001010004020001000703000103a504000000008000045f5f5f5fec00feef00010100040200010004030001038904000000008000025f5fee00ef00010100040200010007030001036a04000000008000045f5f5f5fec00feef00010100040200010004030001034e04000000008000025f5fee00ef00010100040200010007030001032f04000000008000045f5f5f5fec00feef00010100040200010004030001031304000000008000025f5fee00ef0001010004020001000703000102f404000000008000045f5f5f5fec00feef0001010004020001000403000102d804000000008000025f5fee00ef0001010004020001000703000102b904000000008000045f5f5f5fec00feef00010100040200010004030001029d04000000008000025f5fee00ef00010100040200010007030001027e04000000008000045f5f5f5fec00feef00010100040200010004030001026204000000008000025f5fee00ef00010100040200010007030001024304000000008000045f5f5f5fec00feef00010100040200010004030001022704000000008000025f5fee00ef00010100040200010007030001020804000000008000045f5f5f5fec00feef0001010004020001000403000101ec04000000008000025f5fee00ef0001010004020001000703000101cd04000000008000045f5f5f5fec00feef0001010004020001000403000101b104000000008000025f5fee00ef00010100040200010007030001019204000000008000045f5f5f5fec00feef00010100040200010004030001017604000000008000025f5fee00ef00010100040200010007030001015704000000008000045f5f5f5fec00feef00010100040200010004030001013b04000000008000025f5fee00ef00010100040200010007030001011c04000000008000045f5f5f5fec00feef00010100040200010004030001010004000000008000025f5fee00ef0001010004020001000703000100e104000000008000045f5f5f5fec00feef0001010004020001000403000100c504000000008000025f5fee00ef0001010004020001000703000100a604000000008000045f5f5f5fec00feef00010100040200010004030001008a04000000008000025f5fee00ef00010100040200010007030001006b04000000008000045f5f5f5fec00feef00010100040200010004030001004f04000000008000025f5fee00ef00010100040200010007030001003004000000008000045f5f5f5fec00feef00010100040200010004030001001404000000008000025f5fee00ef000101000402000100010400000000800000fe", + None, + id="max_nested_containers_eofcreate_returncontract_0" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_runtime_container_return.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_runtime_container_return.py new file mode 100644 index 0000000000..b531e3e356 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_runtime_container_return.py @@ -0,0 +1,91 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section, ContainerKind + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURN, max_stack_height=2), + ], + ) + , + "ef00010100040200010005040000000080000260006000f3", + None, + id="runtime_container_return_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container(container=Container( + name = 'EOFV1_0002_D1I0', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURN, max_stack_height=2), + ], + ) + ), + ], + kind=ContainerKind.INITCODE + ) + , + "ef000101000402000100060300010018040000000080000260006000ee00ef00010100040200010005040000000080000260006000f3", + None, + id="runtime_container_return_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0003_D1I0', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container(container=Container( + name = 'EOFV1_0003_D2I0', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURN, max_stack_height=2), + ], + ) + ), + ], + ) + ), + ], + ) + , + "ef0001010004020001000b030001003604000000008000046000600060006000ec0000ef000101000402000100060300010018040000000080000260006000ee00ef00010100040200010005040000000080000260006000f3", + None, + id="runtime_container_return_2" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_runtime_container_returncontract.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_runtime_container_returncontract.py new file mode 100644 index 0000000000..985a122ec7 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_runtime_container_returncontract.py @@ -0,0 +1,112 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section, ContainerKind + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container(container=Container( + name = 'EOFV1_0001_D1I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + ) + , + "ef000101000402000100060300010014040000000080000260006000ee00ef000101000402000100010400000000800000fe", + EOFException.INCOMPATIBLE_CONTAINER_KIND, + id="runtime_container_returncontract_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container(container=Container( + name = 'EOFV1_0002_D1I0', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container(container=Container( + name = 'EOFV1_0002_D2I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + ) + ), + ], + kind=ContainerKind.INITCODE + ) + , + "ef000101000402000100060300010032040000000080000260006000ee00ef000101000402000100060300010014040000000080000260006000ee00ef000101000402000100010400000000800000fe", + EOFException.INCOMPATIBLE_CONTAINER_KIND, + id="runtime_container_returncontract_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0003_D1I0', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container(container=Container( + name = 'EOFV1_0003_D2I0', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container(container=Container( + name = 'EOFV1_0003_D3I0', + sections = [ + Section.Code(code=Op.INVALID, max_stack_height=0), + ], + ) + ), + ], + ) + ), + ], + ) + ), + ], + ) + , + "ef0001010004020001000b030001005004000000008000046000600060006000ec0000ef000101000402000100060300010032040000000080000260006000ee00ef000101000402000100060300010014040000000080000260006000ee00ef000101000402000100010400000000800000fe", + EOFException.INCOMPATIBLE_CONTAINER_KIND, + id="runtime_container_returncontract_2" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_runtime_container_revert.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_runtime_container_revert.py new file mode 100644 index 0000000000..4998735b81 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_runtime_container_revert.py @@ -0,0 +1,91 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section, ContainerKind + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0001', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.REVERT, max_stack_height=2), + ], + ) + , + "ef00010100040200010005040000000080000260006000fd", + None, + id="runtime_container_revert_0" + ), + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container(container=Container( + name = 'EOFV1_0002_D1I0', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.REVERT, max_stack_height=2), + ], + ) + ), + ], + kind=ContainerKind.INITCODE + ) + , + "ef000101000402000100060300010018040000000080000260006000ee00ef00010100040200010005040000000080000260006000fd", + None, + id="runtime_container_revert_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0003_D1I0', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container(container=Container( + name = 'EOFV1_0003_D2I0', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.REVERT, max_stack_height=2), + ], + ) + ), + ], + ) + ), + ], + ) + , + "ef0001010004020001000b030001003604000000008000046000600060006000ec0000ef000101000402000100060300010018040000000080000260006000ee00ef00010100040200010005040000000080000260006000fd", + None, + id="runtime_container_revert_2" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + ) diff --git a/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_runtime_container_stop.py b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_runtime_container_stop.py new file mode 100644 index 0000000000..d91ed4a807 --- /dev/null +++ b/tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_runtime_container_stop.py @@ -0,0 +1,79 @@ +"""" +EOF v1 validation code - Exported from evmone unit tests +""" + +import pytest +from ethereum_test_tools import EOFTestFiller, EOFException, Opcodes as Op +from ethereum_test_tools.eof.v1 import Container, Section, ContainerKind + +REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7620.md" +REFERENCE_SPEC_VERSION = "7a664ec21843615efde4dae03205758f6569cdb7" + +@pytest.mark.parametrize( + "eof_code,expected_hex_bytecode,exception", + [ + pytest.param( + Container( + name = 'EOFV1_0002', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container(container=Container( + name = 'EOFV1_0002_D1I0', + sections = [ + Section.Code(code=Op.STOP, max_stack_height=0), + ], + ) + ), + ], + kind=ContainerKind.INITCODE + ) + , + "ef000101000402000100060300010014040000000080000260006000ee00ef00010100040200010001040000000080000000", + None, + id="runtime_container_stop_1" + ), + pytest.param( + Container( + name = 'EOFV1_0003', + sections = [ + Section.Code(code=Op.PUSH1[0] * 4 + Op.EOFCREATE[0] + Op.STOP, max_stack_height=4), + Section.Container(container=Container( + name = 'EOFV1_0003_D1I0', + sections = [ + Section.Code(code=Op.PUSH1[0] * 2 + Op.RETURNCONTRACT[0], max_stack_height=2), + Section.Container(container=Container( + name = 'EOFV1_0003_D2I0', + sections = [ + Section.Code(code=Op.STOP, max_stack_height=0), + ], + ) + ), + ], + ) + ), + ], + ) + , + "ef0001010004020001000b030001003204000000008000046000600060006000ec0000ef000101000402000100060300010014040000000080000260006000ee00ef00010100040200010001040000000080000000", + None, + id="runtime_container_stop_2" + ), + + ] +) + +def test_example_valid_invalid( + eof_test: EOFTestFiller, + eof_code: Container, + expected_hex_bytecode: str, + exception: EOFException | None, +): + """ + Verify eof container construction and exception + """ + assert bytes(eof_code) == bytes.fromhex(expected_hex_bytecode) + + eof_test( + data=eof_code, + expect_exception=exception, + )