From 4df25f3f7321621397e1fc9949d45ea059acb90a Mon Sep 17 00:00:00 2001 From: Mario Vega Date: Mon, 27 May 2024 21:36:13 +0000 Subject: [PATCH] fix(fw): EOF: exceptions --- src/ethereum_test_tools/exceptions/evmone_exceptions.py | 4 ++++ src/ethereum_test_tools/exceptions/exceptions.py | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/src/ethereum_test_tools/exceptions/evmone_exceptions.py b/src/ethereum_test_tools/exceptions/evmone_exceptions.py index 9965a78044..a51d65c995 100644 --- a/src/ethereum_test_tools/exceptions/evmone_exceptions.py +++ b/src/ethereum_test_tools/exceptions/evmone_exceptions.py @@ -48,7 +48,11 @@ class EvmoneExceptionMapper: ExceptionMessage(EOFException.INCOMPLETE_SECTION_NUMBER, "err: incomplete_section_number"), ExceptionMessage(EOFException.TOO_MANY_CODE_SECTIONS, "err: too_many_code_sections"), ExceptionMessage(EOFException.ZERO_SECTION_SIZE, "err: zero_section_size"), + ExceptionMessage(EOFException.MISSING_DATA_SECTION, "err: data_section_missing"), ExceptionMessage(EOFException.UNDEFINED_INSTRUCTION, "err: undefined_instruction"), + ExceptionMessage( + EOFException.INPUTS_OUTPUTS_NUM_ABOVE_LIMIT, "err: inputs_outputs_num_above_limit" + ), ExceptionMessage(EOFException.UNREACHABLE_INSTRUCTIONS, "err: unreachable_instructions"), ExceptionMessage(EOFException.INVALID_RJUMP_DESTINATION, "err: invalid_rjump_destination"), ExceptionMessage(EOFException.UNREACHABLE_CODE_SECTIONS, "err: unreachable_code_sections"), diff --git a/src/ethereum_test_tools/exceptions/exceptions.py b/src/ethereum_test_tools/exceptions/exceptions.py index 01be8b5397..4e8a80c1dc 100644 --- a/src/ethereum_test_tools/exceptions/exceptions.py +++ b/src/ethereum_test_tools/exceptions/exceptions.py @@ -259,6 +259,10 @@ class EOFException(ExceptionBase): """ EOF container data header construction is wrong """ + MISSING_DATA_SECTION = auto() + """ + EOF container missing data section + """ INCOMPLETE_CONTAINER = auto() """ EOF container bytes are incomplete @@ -299,6 +303,10 @@ class EOFException(ExceptionBase): """ EOF container's code missing STOP bytecode at it's end """ + INPUTS_OUTPUTS_NUM_ABOVE_LIMIT = auto() + """ + EOF container code section inputs/outputs number is above the limit + """ UNREACHABLE_INSTRUCTIONS = auto() """ EOF container's code have instructions that are unreachable