-
Notifications
You must be signed in to change notification settings - Fork 1k
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
test: add light client sync test for forced update before update timeout #4127
base: dev
Are you sure you want to change the base?
Conversation
Might I trouble @etan-status for a review again since the PR covers light client spec? 😅 |
yield from emit_force_update(test, spec, state) | ||
# Store should remain unchanged since timeout wasn't reached | ||
assert test.store.finalized_header.beacon.slot == finalized_state.slot | ||
|
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.
# Finish test | |
yield from finish_lc_sync_test(test) |
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.
This is to ensure that yaml
files are created for client implementations to be tested against this.
@with_light_client | ||
@spec_state_test_with_matching_config | ||
@with_presets([MINIMAL], reason="too slow") | ||
def test_light_client_sync_no_force_update(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.
Would recommend moving this up by a function (above run_lc_sync_test_upgraded_store_with_legacy_data
), so that the test_..._with_legacy_data
wrappers are located next to the run_...
definition.
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.
Thanks for adding the test to also cover the test of force update before timeout is reached.
PR generally looks good to me once the comments are addressed. If you could upload the generated test zip I can cross-check against Nimbus implementation.
This PR adds a test case
test_light_client_sync_no_force_update
that verifies light client force update behavior before timeout threshold is reached. The test:This complements existing timeout tests by explicitly covering the following negative case (first branch in process_light_client_store_force_update evaluates to False because current slot is at the timeout threshold) that was previously uncovered