-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
support new heads polling over http rpc client #14373
Merged
dimriou
merged 31 commits into
develop
from
BCFR-706/rpc-client-polling-implementation-of-head-subscriptions
Sep 23, 2024
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
bdb7eed
add functions for newHead polling
huangzhen1997 e40616f
add new flag, NewHeadsPollInterval
huangzhen1997 42c48ae
fix test
huangzhen1997 f6dba0b
Merge branch 'develop' into BCFR-706/rpc-client-polling-implementatio…
huangzhen1997 c51e82c
Merge branch 'develop' into BCFR-706/adding-a-new-flag-for-NewHeadsPo…
huangzhen1997 035b085
fix test
huangzhen1997 d58fe13
Merge pull request #14378 from smartcontractkit/BCFR-706/adding-a-new…
huangzhen1997 5090efc
step for adding polling new head impelmentation and sync+outOfSync lo…
huangzhen1997 1cd3f4c
fix lint
huangzhen1997 d595351
add unit test
huangzhen1997 7280eae
update changeset
huangzhen1997 309499f
update comments
huangzhen1997 70c5666
simplify step 1, need to fix test
huangzhen1997 b819f89
remove tests, no longer needed
huangzhen1997 4e8e35f
fix lint
huangzhen1997 22f90f0
fix mock
huangzhen1997 87f3148
fix simulated client
huangzhen1997 9f60dc8
update interface
huangzhen1997 aa4a030
rm more
huangzhen1997 5d22045
temp update for testing log level
huangzhen1997 c98f850
temp update
huangzhen1997 ec63fca
revert modification to polygon toml
huangzhen1997 f0d25ce
enable heap monitoring
huangzhen1997 612c560
enable for testing
huangzhen1997 6a45eee
revert
huangzhen1997 d8e5911
Dmytro's comments
huangzhen1997 8476135
make func private
huangzhen1997 a354ce5
Merge branch 'develop' into BCFR-706/rpc-client-polling-implementatio…
huangzhen1997 45f18e4
fix test
huangzhen1997 2752555
add polling support for SubscribeNewHeaddocke
huangzhen1997 4ccae14
update log level
huangzhen1997 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
"chainlink": minor | ||
--- | ||
|
||
This PR introduce few changes: | ||
- Add a new config option `EVM.NodePool.NewHeadsPollInterval` (0 by default indicate disabled), which is an interval for polling new block periodically using http client rather than subscribe to ws feed. | ||
- Updated new head handler for polling new head over http, and register the subscription in node lifecycle logic. | ||
- If the polling new heads is enabled, WS new heads subscription will be replaced with the new http based polling. | ||
|
||
Note: There will be another PR for making WS URL optional with some extra condition. | ||
#added |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Why copy
r.newHeadsPollInterval
twice? Not a big deal either way I guess, just wondering why not just:or even:
?
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.
It makes the line 499 more readable, so it's not looking like passing the same parameter twice. And it's more configurable if we decided to update the timeout value later. And it's consistent with the
SubscribeToFinalizedHeads
function