-
Notifications
You must be signed in to change notification settings - Fork 998
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 ex-ante fork choice test cases #2752
Conversation
tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py
Outdated
Show resolved
Hide resolved
Discussion: about the test vector releaseThis PR now sets configuration Reasons:
|
I'm okay not releasing proposer_score_boost 0. But it's good to just write a helper that allows for creating attestations as a function of (Which is like our tests when score boost = 0 and there is 1 conflicting attstaiton) |
@djrtwo good points. I made if we can release separately, I won't have to change the test format & do deeper refactoring since half of these cases will be deleted. |
…-issue Update per-test config to be unique per-test in `spec_configured_state_test`
Add sandwich test scenarios
I deleted
|
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.
Mostly on formatting consistency
tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py
Outdated
Show resolved
Hide resolved
tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py
Outdated
Show resolved
Hide resolved
tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py
Outdated
Show resolved
Hide resolved
tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py
Outdated
Show resolved
Hide resolved
tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py
Outdated
Show resolved
Hide resolved
tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py
Outdated
Show resolved
Hide resolved
@with_all_phases | ||
@with_presets([MAINNET], reason="to create non-duplicate committee") | ||
@spec_state_test | ||
def test_ex_ante_attestations_is_greater_than_proposer_boost_with_boost(spec, state): |
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.
Given that we only have tests with boost now, I propose to remove the with_boost naming convention.
def test_ex_ante_attestations_is_greater_than_proposer_boost_with_boost(spec, state): | |
def test_ex_ante_attestations_is_greater_than_proposer_boost(spec, state): |
tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py
Outdated
Show resolved
Hide resolved
tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py
Outdated
Show resolved
Hide resolved
tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Caspar Schwarz-Schilling <31305984+casparschwa@users.noreply.github.com>
Thank @casparschwa @djrtwo for the testing plan: https://notes.ethereum.org/m1upI_XcRpSskeG4UvgNtA?view
Differences:
proposer_boost + 1
votes.It's still verbose. Will think about refactoring tomorrow.
TODOs:
spec_configured_state_test
probably is not thread-safe and madetest_proposer_boost_correct_head
failed in CI. Need to check it.Spec
objects for each test case #2755, Update per-test config to be unique per-test inspec_configured_state_test
#2765PROPOSER_SCORE_BOOST
tometa.yaml
or try to dump the full changed config. I'm inclined to the former now.Update test format[DRY] Clean up the test script.