electra: Add pending deposit and consolidation tests#4024
Merged
Conversation
hwwhww
approved these changes
Nov 28, 2024
| deposit_1 = prepare_pending_deposit(spec, validator_index=index, amount=amount, signed=True) | ||
| pending_deposits = [deposit_0, deposit_1] | ||
|
|
||
| yield from run_epoch_processing(spec, state, pending_deposits) |
Contributor
There was a problem hiding this comment.
Suggested change
| yield from run_epoch_processing(spec, state, pending_deposits) | |
| yield from run_epoch_processing(spec, state, pending_deposits=pending_deposits) |
nflaig
reviewed
Nov 28, 2024
Member
There was a problem hiding this comment.
I had issues generating spec tests with the changes in this PR
when running make gen_sanity I get the following error
Traceback (most recent call last):
File "/home/nico/projects/ethereum/consensus-specs/tests/generators/sanity/main.py", line 48, in <module>
check_mods(all_mods, "sanity")
File "/home/nico/projects/ethereum/consensus-specs/tests/generators/sanity/venv/lib/python3.10/site-packages/eth2spec/gen_helpers/gen_from_tests/gen.py", line 203, in check_mods
raise Exception('[ERROR] module problems:\n ' + '\n '.join(problems))
Exception: [ERROR] module problems:
missing: eth2spec.test.electra.sanity.test_slots
generator sanity finished
which seems to happen because the module name is eth2spec.test.electra.sanity.slots as per change below
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces tests for the entire
process_epochroutine that cover the following scenarios:process_pending_depositsare correctly handled byprocess_effective_balance_updatesprocess_pending_consolidationsis handled correctly byprocess_effective_balance_updatesResolves #4021