0xPolygonHermez / zkevm-node

Go implementation of a node that operates the Polygon zkEVM Network
Other
539 stars 699 forks source link

Add delay when getting storedFlushId from the executor/hashdb #3625

Closed agnusmor closed 5 months ago

agnusmor commented 6 months ago

What does this PR do?

Adds a delay (sleep) when getting storedFlushId from the executor/hashdb. Today updateProverIdAndFlushId function when it needs to get the storedFlushId from executor/hashdb, it loops continously sending the request to executor/hashdb to get the last storedFlushid, but that polling is without any delay between retries, therefore can have some impact in the executor/hashdb performance. This PR adds configurable delay between retries to avoid to overhead executor/hashdb with these requests.

New configuration parameter has been added:

[Sequencer.Finalizer] FlushIdCheckInterval = "50ms"

Reviewers

Main reviewers:

@ToniRamirezM