-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Helper to resolve the block number for a fill (#488)
Given the valid relayData that can be constructed from a Deposit, resolve whether the deposit was ever filled on the destination chain without relying on events. This can be used as a sanity check on RPC responses that sometimes drop logs. The "left-most" variant of a binary search is implemented. The logic is very simple and has been repeatedly tested to resolve in ~20 iterations with a fill made randomly within a range of 1M blocks. This can be verified locally by adjusting the nBlocks variable within the accompanying test case (remember also to bump the test timeout via this.timeout(ms) in the relevant test case). The criteria for determining when the fill was made is the block at which is was considered complete. This effectively ignores partial fills entirely, but that's fortunately forwards-compatible with the direction of Across.
- Loading branch information
Showing
3 changed files
with
146 additions
and
2 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