execution-spec-tests icon indicating copy to clipboard operation
execution-spec-tests copied to clipboard

feat(exception mapper): class to verify exception strings

Open winsvega opened this issue 5 months ago • 1 comments

🗒️ Description

Extent exception mapper with base class so that any t8n can define exception string maps for any exception types

I put transaction exception validation into exception mapper for convinience atm. Example exception message:

src/ethereum_test_exceptions/exception_mapper.py:84: in check_transaction
    raise Exception(
E   Exception: TransactionException (pos=1, nonce=0x1)
E   Error: exception mismatch:
E    want = 'Undefined' (TransactionException.TYPE_3_TX_INVALID_BLOB_VERSIONED_HASH),
E    got  = 'blob 0 has invalid hash version' (UndefinedException.UNDEFINED_EXCEPTION)
E    No message defined for TransactionException.TYPE_3_TX_INVALID_BLOB_VERSIONED_HASH, please add it to GethExceptionMapper
E    No exception defined for error message got, please add it to GethExceptionMapper

🔗 Related Issues

✅ Checklist

  • [ ] All: Set appropriate labels for the changes.
  • [ ] All: Considered squashing commits to improve commit history.
  • [ ] All: Added an entry to CHANGELOG.md.
  • [ ] All: Considered updating the online docs in the ./docs/ directory.
  • [ ] Tests: All converted JSON/YML tests from ethereum/tests have been added to converted-ethereum-tests.txt.
  • [ ] Tests: A PR with removal of converted JSON/YML tests from ethereum/tests have been opened.
  • [ ] Tests: Included the type and version of evm t8n tool used to locally execute test cases: e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
  • [ ] Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

winsvega avatar Sep 12 '24 09:09 winsvega