-
Notifications
You must be signed in to change notification settings - Fork 997
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
Enable test generation for phase1 #1957
Conversation
It might be relevant for testnets or simulations that are starting from |
@mkalinin Sounds good, but we'll need the spec to define what that phase-1 genesis looks like (I see you are working on that and shared details in the discord, thanks). Right now I'm afraid a bare phase-0 genesis test that runs with phase-1 spec will break other phase-1 spec assumptions. |
Totally agree. I currently use pretty naive way to get phase-1 genesis: genesis_state = initialize_beacon_state_from_eth1(eth1_block_hash, eth1_timestamp, deposits)
phase_1_genesis_state = upgrade_to_phase1(genesis_state) But this approach works well in my case. |
The error message, for example:
A quick workaround is skipping the test case if |
1. Add `with_configs` decorator to assign available configs 2. Add `only_full_crosslink` decorator to detect if the configuation can do full crosslinking 3. Add `context.is_pytest` flag: True if calling via pytest. False if calling from test generator.
…OCHS_PER_CUSTODY_PERIOD`-long transition
Add new decorators to skip tests and handle it in testgen
Skip the too-slow custody tests and turn on the generators
…back to the spec function for other test cases afterwards
Add `disable_process_reveal_deadlines` decorator and `reveal_deadlines_setting` meta tag
@hwwhww great work on all the phase 1 changes. Testing PRs were merged into this PR, and I just resolved a small merge conflict with |
… instead of List
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.
@protolambda
I pushed some commits:
- Remove redundant keys in the rewards test generator.
- Use
Dict
forphase_0_mods
,phase_1_mods
instead ofList
. - Add
make lint_generators
command for test generators flake8 checks. Also added it to the CI.
LGTM now. :)
Changes to the phase 0 test vectors outputs:
|
skip large_validator_set tests if too large (mainnet config)
Was it intentional to remove |
No, thanks for reporting, just heard from Terence too. It was meant to be disabled just for phase1 mainnet I think (and at first all mainnet tests were disabled, to testrun the changes in this PR quicker). We'll re-introduce them. The types have not changed, so you can keep running the v0.12.2 SSZ tests. Sorry for the inconvenience. |
random/basic/leak
, instead of all incore
. We can change that back, but it seemed more consistentBefore merge:
CC @mkalinin @djrtwo @hwwhww Let me know if you like to change anything for phase 1 test generation.