Skip to content

Conversation

@fernandezlautaro
Copy link
Collaborator

dhaidashenko
dhaidashenko previously approved these changes Jan 14, 2026
@fernandezlautaro fernandezlautaro marked this pull request as ready for review January 14, 2026 12:27
@fernandezlautaro fernandezlautaro requested a review from a team as a code owner January 14, 2026 12:27
Copilot AI review requested due to automatic review settings January 14, 2026 12:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces the duration of the FinalizedOutOfSync condition in multi-node setups by pre-fetching the latest block during health-check requests before establishing WebSocket subscriptions. This ensures the node's latest observation is current even if WebSocket head delivery is delayed.

Changes:

  • Added pre-fetch logic in SubscribeToHeads to fetch the latest block before WS subscription when handling health-check requests
  • Added test coverage to verify that health-check pre-fetch updates latest block info before any WS messages arrive
  • Fixed typo in comment: "SubscribeToheads" → "SubscribeToHeads"

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pkg/client/rpc_client.go Added pre-fetch block logic for health-check requests and corrected method name typo in comment
pkg/client/rpc_client_test.go Added test case verifying pre-fetch behavior updates latest block before WS messages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 14, 2026

✅ API Diff Results - No breaking changes


📄 View full apidiff report

dhaidashenko
dhaidashenko previously approved these changes Jan 14, 2026
@fernandezlautaro fernandezlautaro enabled auto-merge (squash) January 14, 2026 15:37
@fernandezlautaro fernandezlautaro merged commit d591d75 into develop Jan 14, 2026
33 checks passed
@fernandezlautaro fernandezlautaro deleted the PLEX-2391_FinalizedOutOfSync_improvement branch January 14, 2026 16:23
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.

3 participants