Add optional HeimdallWSAddress configuration and refactor handler_bor methods#1481
Merged
lucca30 merged 11 commits intoheimdall-v2from Mar 12, 2025
Merged
Add optional HeimdallWSAddress configuration and refactor handler_bor methods#1481lucca30 merged 11 commits intoheimdall-v2from
lucca30 merged 11 commits intoheimdall-v2from
Conversation
…lmartins/milestone-ws-events
avalkov
reviewed
Mar 10, 2025
avalkov
reviewed
Mar 10, 2025
avalkov
reviewed
Mar 10, 2025
avalkov
approved these changes
Mar 10, 2025
Member
|
Can you also update the config files? |
Contributor
Author
Since we currently not apply this for any other Heimdall configuration, even for heimdall url. I decided not to include this one and lefting as an optional flag. |
Member
|
Makes sense. Thanks! |
pratikspatil024
approved these changes
Mar 12, 2025
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.
Description
This PR introduces the optional configuration parameter
HeimdallWSAddress, which enables the application to establish a WebSocket connection with Heimdall for event listening rather than relying on polling. This enhancement aims to provide more efficient and real-time event handling.Changes:
New Config:
Added HeimdallWSAddress as an optional configuration setting to allow connecting via WebSocket to Heimdall.
WebSocket Integration:
Updated the subscription logic to support event listening over a WebSocket connection. This change has been tested on a deployed devnet node, including a scenario where the connection is recovered after stopping bor.
Code Refactor:
In handler_bor.go, refactored the handle and fetch methods to better segregate their roles, improving code clarity and maintainability.
Changes
Checklist
Cross repository changes
Testing