-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] improve(relayer): More robust fast relayer event ingestion (#1715)
The fast relayer currently imposes a finality overlay onto each indexer process, such that each process will wait for blocks, and will then forward events that have met quorum, or discard them. The actual number of blocks that is used for is the lowest MDC tier. For most chains this is 1 or 2 blocks, and for Polygon this is ~32. This is fragile on chains with very short block times and results in some events being dropped due to delayed delivery of events by some RPC providers. Additionally, on chains with a high number of MDCs, it imposes an a long delay on relaying the events. This can be meaningful in the case of FilledV3Relay events, which are now used by the relayer to track its origin chain commitments. With this change, retain events for a longer period and forward them if and when they reach the minimum configured quorum. This is much more robust and should result in a greater number of events making it through to the relayer. I thought about an ejection policy for events that are retained for a long period of time but didn't settle on anything yet. Perhaps some simple number like 64 blocks would be fine for all chains. A specific consideration with this change was the potential for events to be ingested by the SpokePoolClient "out of order". The impact of this seems to be very low or non-existent, with the observation that the SpokePoolClient tends to store deposit and fill events in mappings and sorts them on demand.
- Loading branch information
Showing
5 changed files
with
50 additions
and
86 deletions.
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
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