Repository navigation
fix(truapi): retry native preimage lookups after a miss #1673
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
fa9c6ef
fix(truapi): ask the native host again after a preimage lookup misses
Mikelle 675f170
docs(truapi): plainer comments on the native preimage retry
Mikelle 93d64bd
refactor(truapi): name the hash-check argument in the preimage retry
Mikelle 6a0557a
fix(truapi): retry missed preimage lookups every 6 seconds for 30 sec…
Mikelle 088581d
test(truapi): cover the native preimage retry over the WebSocket bridge
Mikelle 999ba50
Merge branch 'main' into fix/native-preimage-lookup-retry
Mikelle 327615f
Merge branch 'main' into fix/native-preimage-lookup-retry
Mikelle a49ee23
refactor(truapi): decide the preimage retry on the host's own error type
Mikelle 157ca8e
refactor(truapi): pass PreimageHost a 32-byte key
Mikelle 0cde382
Merge remote-tracking branch 'origin/main' into fix/native-preimage-l…
Mikelle 9fdd492
Merge branch 'main' into fix/native-preimage-lookup-retry
Mikelle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@parity/truapi": patch | ||
| --- | ||
|
|
||
| On native hosts, a preimage lookup that misses keeps calling the app's `lookup_preimage` until it returns the value, so a lookup whose first fetch failed still resolves without the app calling `notifyPreimageChanged`. Retries run every 6 seconds for the first 30 seconds, then every 30 seconds. They stop when the app returns the value or an error, or when the product unsubscribes. Keys that are not 32 bytes are not retried. Retries log `truapi.native.preimage.retrying` and `truapi.native.preimage.found`. |
This file contains hidden or 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 hidden or 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.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.