-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add more get_expected_withdrawals tests
#4762
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
Add more get_expected_withdrawals tests
#4762
Conversation
get_expected_withdrawals tests for Gloas
get_expected_withdrawals tests for Gloasget_expected_withdrawals tests
jtraglia
left a comment
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.
Hey @leolara I'm not sure unit tests (that don't produce reference tests) are that valuable here.
This function is tested in run_withdrawals_processing helper:
consensus-specs/tests/core/pyspec/eth2spec/test/helpers/withdrawals.py
Lines 223 to 226 in adf5648
| expected_withdrawals = get_expected_withdrawals(spec, state) | |
| assert len(expected_withdrawals) <= spec.MAX_WITHDRAWALS_PER_PAYLOAD | |
| if num_expected_withdrawals is not None: | |
| assert len(expected_withdrawals) == num_expected_withdrawals |
It would be better to review/extend the existing withdrawals tests.
- https://github.com/ethereum/consensus-specs/blob/master/tests/core/pyspec/eth2spec/test/capella/block_processing/test_process_withdrawals.py
- https://github.com/ethereum/consensus-specs/blob/master/tests/core/pyspec/eth2spec/test/electra/block_processing/test_process_withdrawals.py
- #4468
For Gloas, maybe help Terence get this PR merged?
|
I think those are for tests of I don't think to restrict our tests to only check |
|
Admittedly the tracing framework takes a while to polish and fully integrate into reftests system but we are getting there and it is already basically functional and tracing these tests (for example) is just a matter of adding a single decorator (I tested compatibility, can show some traces) |
This PR adds more tests that are needed for
get_expected_withdrawals.This part of the spec is non-trivial and have evolved 3 times. In EIP7732 it is changed significantly. More tests are needed.
Currently they don't produce tests vectors, but this will be archived with #4755