Skip to content

Wait for LightClientFinalityUpdate exceeding LightClientUpdate#37

Merged
yoshidan merged 4 commits intomainfrom
feature/wait_strict
Feb 12, 2026
Merged

Wait for LightClientFinalityUpdate exceeding LightClientUpdate#37
yoshidan merged 4 commits intomainfrom
feature/wait_strict

Conversation

@yoshidan
Copy link
Collaborator

@yoshidan yoshidan commented Feb 11, 2026

Summary

Fix data consistency issues between preimage-maker and relayer when fetching light client data from Beacon API.

Problem

When fetching light_client/finality_update and light_client/updates at different times, the following
inconsistencies could occur:

  1. Period boundary mismatch: signature_slot and finalized_header.beacon.slot can belong to different periods
  2. Passing slot: Finality can progress between the two API calls, causing updates.finalized_slot > finality_update.finalized_slot

Solution

  • Add retry logic for the following conditions:
    • updates.finalized_slot > finality.finalized_slot (race condition)
    • signature_period != finalized_period (period boundary)

Naohiro Yoshida added 4 commits February 11, 2026 11:21
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
@yoshidan yoshidan marked this pull request as ready for review February 11, 2026 12:54
@yoshidan yoshidan requested a review from siburu February 12, 2026 09:29
@yoshidan yoshidan merged commit 3649e29 into main Feb 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant