-
Notifications
You must be signed in to change notification settings - Fork 169
feat(tests): EIP-6110 DepositEvent
layout+topic tests
#1371
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
feat(tests): EIP-6110 DepositEvent
layout+topic tests
#1371
Conversation
DepositEvent
layout+topic tests
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.
Thanks for these!
I think it looks pretty good overall, and just some minor linting issues to get to calm down ruff and mypy :)
If you need help with anything please just ping me and I can help out, but basically once we fix the comments we should be able to go ahead and merge 👍
71b9c65
to
75391a6
Compare
Co-authored-by: Mario Vega <marioevz@gmail.com>
Co-authored-by: Mario Vega <marioevz@gmail.com>
Co-authored-by: Mario Vega <marioevz@gmail.com>
Co-authored-by: Mario Vega <marioevz@gmail.com>
Co-authored-by: Mario Vega <marioevz@gmail.com>
Co-authored-by: Mario Vega <marioevz@gmail.com>
ca41b73
to
4f5cc55
Compare
CI passes, ready for review! NOTE: the current tests will check for the "failed transaction error" for the invalid deposit logs. This will fail on client implementations which check the deposit contract logs after ALL transactions (EthJS) and not after EACH transaction (EELS). Any client which has this bug likely implements it the "EthJS" way and is therefore not suitable to fill the tests. Note that EIP-6110 specs parsing the deposit logs after all transactions, not after each transaction. |
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.
Looks great, thanks so much for these!
* new(tests): Add EIP-6110 Sepolia Variant Contract test * fix(tests): Log code * fix(tests): Log code * fix: ABI encoding optional * fix: parametrize for ABI (No-ABI test disabled) * fix(docs): add docs to helper * fix(tests): lint modified_contract (?) * feat(tests): add DEPOSIT_EVENT_SIGNATURE_HASH EIP-6110 * tmp: add sepolia deposit log data * change test and helper methods * convert back to little-endian encoding * feat(helpers): add helper method to construct modified deposit logs * feat(tests): use new helper in modified contract tests * update test modified contract * fix test filler to produce the correct requests hash * feat(tests): add EIP6110 invalid event layout tests * feat(tests): add exception to transaction * cleanup(tests): use DEFAULTs where appropriate * feat(tests): add invalid log length test * chore(tests) lint * Update tests/prague/eip6110_deposits/helpers.py Co-authored-by: Mario Vega <marioevz@gmail.com> * Update tests/prague/eip6110_deposits/helpers.py Co-authored-by: Mario Vega <marioevz@gmail.com> * Update tests/prague/eip6110_deposits/test_modified_contract.py Co-authored-by: Mario Vega <marioevz@gmail.com> * Update tests/prague/eip6110_deposits/test_modified_contract.py Co-authored-by: Mario Vega <marioevz@gmail.com> * Update tests/prague/eip6110_deposits/helpers.py Co-authored-by: Mario Vega <marioevz@gmail.com> * Update tests/prague/eip6110_deposits/helpers.py Co-authored-by: Mario Vega <marioevz@gmail.com> * chore(tests): lint * chore(tests): make typecheck say "congratulations" * chore(tests): add pytestmark * chore(tests): remove TODO * Update tests/prague/eip6110_deposits/test_modified_contract.py --------- Co-authored-by: Mario Vega <marioevz@gmail.com>
* new(tests): Add EIP-6110 Sepolia Variant Contract test * fix(tests): Log code * fix(tests): Log code * fix: ABI encoding optional * fix: parametrize for ABI (No-ABI test disabled) * fix(docs): add docs to helper * fix(tests): lint modified_contract (?) * feat(tests): add DEPOSIT_EVENT_SIGNATURE_HASH EIP-6110 * tmp: add sepolia deposit log data * change test and helper methods * convert back to little-endian encoding * feat(helpers): add helper method to construct modified deposit logs * feat(tests): use new helper in modified contract tests * update test modified contract * fix test filler to produce the correct requests hash * feat(tests): add EIP6110 invalid event layout tests * feat(tests): add exception to transaction * cleanup(tests): use DEFAULTs where appropriate * feat(tests): add invalid log length test * chore(tests) lint * Update tests/prague/eip6110_deposits/helpers.py Co-authored-by: Mario Vega <marioevz@gmail.com> * Update tests/prague/eip6110_deposits/helpers.py Co-authored-by: Mario Vega <marioevz@gmail.com> * Update tests/prague/eip6110_deposits/test_modified_contract.py Co-authored-by: Mario Vega <marioevz@gmail.com> * Update tests/prague/eip6110_deposits/test_modified_contract.py Co-authored-by: Mario Vega <marioevz@gmail.com> * Update tests/prague/eip6110_deposits/helpers.py Co-authored-by: Mario Vega <marioevz@gmail.com> * Update tests/prague/eip6110_deposits/helpers.py Co-authored-by: Mario Vega <marioevz@gmail.com> * chore(tests): lint * chore(tests): make typecheck say "congratulations" * chore(tests): add pytestmark * chore(tests): remove TODO * Update tests/prague/eip6110_deposits/test_modified_contract.py --------- Co-authored-by: Mario Vega <marioevz@gmail.com>
🗒️ Description
PR built on top of #1280 to add EIP-6110
DepositEvent
log layout tests as described in ethereum/EIPs#9460It tests:
Transfer
event (Sepolia-like case) (VALID)For each param (
pubkey
,withdrawal_credentials
,amount
,signature
,index
)🔗 Related Issues
Closes #1360
✅ Checklist
mkdocs serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.