-
Notifications
You must be signed in to change notification settings - Fork 15
PLEX-2391: MultiNode: reduce duration of FinalizedOutOfSync #324
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
PLEX-2391: MultiNode: reduce duration of FinalizedOutOfSync #324
Conversation
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.
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
SubscribeToHeadsto 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.
✅ API Diff Results - No breaking changes |
Jira: https://smartcontract-it.atlassian.net/browse/PLEX-2391