-
Notifications
You must be signed in to change notification settings - Fork 167
feat(consume): add ExceptionMapper
support to the consume-engine simulator
#1416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ExceptionMapper
support to the consume-engine simulator
I found there are some issue with refactored exception mapper. perhaps this can be address in here in this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waut the complexity of exception mapper is growing. I need to study python again.
f1c23d2
to
5427517
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this, few suggestions, also in #1464.
src/pytest_plugins/consume/hive_simulators/engine/test_via_engine.py
Outdated
Show resolved
Hide resolved
27845aa
to
ce47dbb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…only affects generated block tests)
35239db
to
4963923
Compare
Temporarily increase failure threshold. Failures because of mismatch in error mappings or sequence. Some of these are nice to have but not urgent: ethereum/execution-spec-tests#1416
…mulator (ethereum#1416) * fix(exceptions): UndefinedException return on new * feat(rpc,plugins/consume): Support exception mapper * fix(exceptions): Allow undefined mapper * feat(plugins/consume): Add more mappers * fix(logging): don't use newlines within log messages * refactor(exceptions,specs): ExceptionWithMessage contains a list * new(exceptions): Add `INVALID_BLOCK_HASH` exception * feat(clis): Add ethjs exceptions * feat(clis): Add geth exceptions * feat(plugins/consume): Add besu exceptions * feat(plugins/consume): Add nethermind exceptions * feat(plugins/consume): Add reth exceptions * feat(consume): add `--strict-exception-matching` parameter * more reth exceptions * refactor mappers * add ethjs exception * fix(tests): EIP-7685: Add expected exception to `test_invalid_multi_type_requests_engine` * add reth exception * fix(plugins/consume): log failure * feat(clis): Add Erigon Exception Mapper * feat(specs): Allow setting expected block exception for state tests (only affects generated block tests) * fix(tests): Add block exceltion to test_blob_type_tx_pre_fork * fix(clis): Exceptions in mappers * change(plugins/consume): Enable strict exception matching by default * fix(specs): Exception message check on strict match * docs: changelog * chore(clis): update exception mappers for TYPE_4_TX_PRE_FORK * refactor(consume): cache exception mappers in session-scoped fixture * refactor(consume): make string match more robust by applying `lower()` * feat(consume): allow disabling of strict exception checking per fork * refactor(consume/hive): create `strict_exception_matching` fixture * fix: whitelist * changelog: Add exception * changelog: Invalid versioned hashes exception * refactor(consume/engine): Better error logging * fix(clis/reth): Exception mapper * fix(clis/besu): Exception mapper * fix(clis/geth): Exception mapper * fix(clis/ethereumjs): Exception mapper * fix(clis/erigon): Exception mapper --------- Co-authored-by: danceratopz <[email protected]>
…mulator (ethereum#1416) * fix(exceptions): UndefinedException return on new * feat(rpc,plugins/consume): Support exception mapper * fix(exceptions): Allow undefined mapper * feat(plugins/consume): Add more mappers * fix(logging): don't use newlines within log messages * refactor(exceptions,specs): ExceptionWithMessage contains a list * new(exceptions): Add `INVALID_BLOCK_HASH` exception * feat(clis): Add ethjs exceptions * feat(clis): Add geth exceptions * feat(plugins/consume): Add besu exceptions * feat(plugins/consume): Add nethermind exceptions * feat(plugins/consume): Add reth exceptions * feat(consume): add `--strict-exception-matching` parameter * more reth exceptions * refactor mappers * add ethjs exception * fix(tests): EIP-7685: Add expected exception to `test_invalid_multi_type_requests_engine` * add reth exception * fix(plugins/consume): log failure * feat(clis): Add Erigon Exception Mapper * feat(specs): Allow setting expected block exception for state tests (only affects generated block tests) * fix(tests): Add block exceltion to test_blob_type_tx_pre_fork * fix(clis): Exceptions in mappers * change(plugins/consume): Enable strict exception matching by default * fix(specs): Exception message check on strict match * docs: changelog * chore(clis): update exception mappers for TYPE_4_TX_PRE_FORK * refactor(consume): cache exception mappers in session-scoped fixture * refactor(consume): make string match more robust by applying `lower()` * feat(consume): allow disabling of strict exception checking per fork * refactor(consume/hive): create `strict_exception_matching` fixture * fix: whitelist * changelog: Add exception * changelog: Invalid versioned hashes exception * refactor(consume/engine): Better error logging * fix(clis/reth): Exception mapper * fix(clis/besu): Exception mapper * fix(clis/geth): Exception mapper * fix(clis/ethereumjs): Exception mapper * fix(clis/erigon): Exception mapper --------- Co-authored-by: danceratopz <[email protected]>
🗒️ Description
Adds support of the exception mapper to consume-engine:
consume engine
now checks exceptions returned by the execution clients in their Engine API responses, specifically in thevalidationError
field of theengine_newPayloadVX
method.Exception mappers of all current mainnet clients have been added to the
ethereum_clis
library.The feature can be disabled by using
--disable-strict-exception-matching
for specific clients or forks.🔗 Related Issues
✅ Checklist
mkdocs serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.