Add more FCR tests - #5400
Merged
Merged
Conversation
jtraglia
approved these changes
Jun 29, 2026
jtraglia
left a comment
Member
There was a problem hiding this comment.
I skimmed over the changes and the changes look good to me!
jtraglia
enabled auto-merge (squash)
June 29, 2026 20:08
This was referenced Jul 28, 2026
This was referenced Jul 30, 2026
Draft
mkalinin
added a commit
that referenced
this pull request
Aug 4, 2026
Share similar problem (FCR should run **once** per slot) with #5498, but this PR actually *deduplicates* FCR run unlike #5498. - `test_fcr_no_restart_if_head_gu_is_stale` This test runs FCR twice when slot number is 24. Line 459-463 advances the store and updates FCR variables until slot 24 (`3 * S`). After that, the store never advances, but at line 483 it runs FCR update *again* which makes `previous_slot_head == current_slot_head` because: ```python def update_fast_confirmation_variables(fcr_store: FastConfirmationStore) -> None: # Update prev and curr slot head store = fcr_store.store fcr_store.previous_slot_head = fcr_store.current_slot_head fcr_store.current_slot_head = get_head(store).root # omit after... ``` which is not a state we want: ``` Slot 23 FCR: previous=A, current=B Slot 24 FCR: previous=B, current=HEAD Slot 24 again: previous=HEAD, current=HEAD ``` Related to #5400 as this test was added there. Co-authored-by: Mikhail Kalinin <noblesse.knight@gmail.com>
mkalinin
added a commit
that referenced
this pull request
Aug 4, 2026
This PR fixes the following test regarding FCR: - `test_is_one_confirmed_passes_with_empty_slot_and_attester_in_two_consecutive` as it doesn't run `on_fast_confirmation` in **56**. Test flow: 1. Process FCR to the target slot (= 55) by applying block AND `on_fast_confirmation`. 2. Advance one more slot (Line 1470) - Current slot is now 56. 3. Advance one more slot again (Line 1482) after setting the condition (Only validator V attests to the parent block) - Current slot is now 57. Between step 2 and 3, we need to update FCR store as per spec, which means `update_fast_confirmation_variables` was omitted for slot 56 (which is the first slot of the epoch). Prysm fails to pass this test by complaining `previous_epoch_observed_justified_checkpoint epoch mismatch, want 4 got 5`, and I believe this is a bug when generating test vectors. Related to #5400 as this test is added there. Co-authored-by: Mikhail Kalinin <noblesse.knight@gmail.com>
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.
Introduces more FCR tests, focused on edge case testing:
current_slot_headheadblock doesn’t haveGUin its chain of justified checkpointsmaximum_supportandsupportparent_slot + 1) preceding a block that is about to be confirmedbalance_sourcebut already active in the head’s state and supporting a block about to be confirmedThe following changes are introduced to the testing framework:
payload_indexadded toget_valid_attestations_for_block_at_slothelper, otherwise, post-Gloas attesters always support empty payload status when there is an empty slot following the block they vote forstate.payload_expected_withdrawalsare assigned topaylod.withdrawalsinbuild_signed_execution_payload_envelope, this fixes the case when envelope cannot be processed because withdrawals don’t match