-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add to epoch processing tests generation states before and after full epoch processing #4155
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
Merged
jtraglia
merged 13 commits into
ethereum:dev
from
leolara:leolara/epoch_processing_full_states
May 19, 2025
Merged
Changes from 7 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c2b14f6
Add to epoch processing tests generation states before and after full…
leolara d34e261
Fix mispelling
leolara dd54f49
Update tests/formats/epoch_processing/README.md
leolara 56be483
Update tests/formats/epoch_processing/README.md
leolara 0012cdd
Change _full to _epoch
leolara 33052cc
Merge branch 'dev' into leolara/epoch_processing_full_states
leolara 9398e33
Merge branch 'dev' into leolara/epoch_processing_full_states
leolara 4c875c5
Change run_pending_deposit_applying to new format
leolara 96f90a6
Change run_test_effective_balance_hysteresis format
leolara c9b2a26
Fix lint
leolara 152df38
Merge remote-tracking branch 'upstream/dev' into leolara/epoch_proces…
jtraglia 68a5a1b
Add mikhail's suggestion
jtraglia 12f6f0a
Fix mistake
jtraglia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,14 @@ An SSZ-snappy encoded `BeaconState`, the state before running the epoch sub-tran | |
|
|
||
| An SSZ-snappy encoded `BeaconState`, the state after applying the epoch sub-transition. No value if the sub-transition processing is aborted. | ||
|
|
||
| ### `pre_epoch.ssz_snappy` | ||
|
|
||
| An SSZ-snappy encoded `BeaconState`, the state before running the epoch transition. | ||
|
|
||
| ### `post_epoch.ssz_snappy` | ||
|
|
||
| An SSZ-snappy encoded `BeaconState`, the state after applying the epoch transition. No value if the transition processing is aborted. | ||
|
|
||
| ## Condition | ||
|
|
||
| A handler of the `epoch_processing` test-runner should process these cases, | ||
|
|
@@ -50,3 +58,15 @@ Sub-transitions: | |
| - `pending_deposits` (>=Electra) | ||
|
|
||
| The resulting state should match the expected `post` state. | ||
|
|
||
| ## Condition (alternative) | ||
|
|
||
| Instead of having a different handler for each sub-transition, a single handler for all cases should load `pre_full` state, call `process_epoch` and then assert that the result state should match `post_full` state. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why it should be instead and couldn't be in addition to the |
||
|
|
||
| This has the advantages: | ||
|
|
||
| - Less code to maintain for the epoch processing handler. | ||
| - Works with single pass epoch processing. | ||
| - Can detect bugs related to data dependencies between different sub-transitions. | ||
|
|
||
| As a disadvantage this condition takes more resources to compute, but just a constant amount per test vector. | ||
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.
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.
I think it would be better to put it this way: