-
Notifications
You must be signed in to change notification settings - Fork 521
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
Introduce block tracker poll interval #1887
Merged
Merged
Conversation
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
goran-ethernal
force-pushed
the
Block-tracker-poll-intervall
branch
from
September 7, 2023 13:10
a09b579
to
0ee95f2
Compare
igorcrevar
reviewed
Sep 7, 2023
igorcrevar
approved these changes
Sep 7, 2023
Stefan-Ethernal
approved these changes
Sep 8, 2023
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.
Generally LGTM
goran-ethernal
force-pushed
the
Block-tracker-poll-intervall
branch
2 times, most recently
from
September 12, 2023 07:11
dd26e6d
to
792a197
Compare
goran-ethernal
force-pushed
the
Block-tracker-poll-intervall
branch
from
September 13, 2023 07:55
792a197
to
52c81ea
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Some of the clients experienced an issue with block tracker (which is a part of
ethgo
third party library), where on all validator nodes, it polled rootchain rpc endpointseth_getBlockByNumber
andeth_getBlockByHash
each second, causing them to spend all their allowed limit for querying rpc points on a main net such as Ethereum. This sequentially caused all other bridge actions to fail such as state sync events for deposits, or checkpointing. This issue only persisted for block trackers on validator nodes that track the state sync events (which transfer data from L1 to L2).Block tracker in
ethgo
has aPollInterval
(intime.Duration
), which determines how often it calls given rpc endpoints, but it's configuration was not exposed explicitly, so we needed to expand ourevent_tracker
to receive an interval, which then is set to the block tracker through its field.This PR introduces two new flags:
genesis
command - we introduced a new flag--block-tracker-poll-interval
, which is defined in time duration (for example,--block-tracker-poll-interval "1s"
orblock-tracker-poll-interval "12s"
). This is part of thegenesis
command andgenesis.json
file because, all validator nodes are tracking state sync events. Block proposers are the ones that add state sync commitment transactions at the end of a sprint, while the rest of the validators validate the given transaction, hence all validators need to track state sync events from rootchain. For a state sync commitment transaction to be valid, quorum of validators must be reached, meaning at lest 2/3+1 validators must have the same state sync events tracked. So if we are to set this flag on a server level, that means that each validator can have a different poll time, and will have different number of state sync events tracked at a point of time, which is not a desired behavior.server
command - we introduced a new flag--relayer-poll-interval
, which is defined in time duration (for example, example,--relayer-poll-interval "1s"
or--relayer-poll-interval "12s"
). Sincerelayer
node uses block tracker as well, but for child chain (tracking when a state sync commitment is submitted to child contract), we added this flag, so that the user can configure theirrelayer
nodes as well to poll given rpc endpoints on child chain at desired intervals.Tagging @DannyS03 to update the documentation.
Changes include
Checklist
Testing