-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Relayer): Correct deposit lookback (#787)
fix(Relayer): Correct deposit lookback The MAX_RELAYER_DEPOSIT_LOOKBACK config item is currently intended to be specified in units of seconds, but was previously configured with a number of blocks. The Relayer class however passed MAX_RELAYER_DEPOSIT_LOOKBACK directly in to the getUnfilledDeposits() helper function, where it is compared directly against a block number. This should to be translated from seconds to a block number first. The effect of this misalignment in units is probably that the relayer looks back further than anticipated on mainnet, where 1 block is ~12 seconds, and potentially less than anticipated on some L2s, where block production might occur multiple times per second. For larger lookback configurations this potentially imposes a hefty time penalty in looping mode when searching for unfilled deposits originating on mainnet. This may resolve an issue that we've received vague reports about in the past from the relayer community. Feedback has been that the relayer is less likely to capture fills if it runs in looping mode, so many from the community choose to run in serverless mode and loop their bot externally. Thanks to James for the quick SDK update that was needed in this PR.
- Loading branch information
Showing
11 changed files
with
89 additions
and
125 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
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.