-
Notifications
You must be signed in to change notification settings - Fork 220
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
retry helper to durably watch idempotent promises #9541
Comments
refs: #9449 ## Description This makes ChainHub return durable vows. The underlying lookup functions are not durable but they made so by the `retriable` helper. So this also introduces a stub version of #9541 pulled from @dtribble 's #9657 ### Security Considerations none ### Scaling Considerations none ### Documentation Considerations none ### Testing Considerations CI ### Upgrade Considerations not yet upgradable. Communicated by https://github.com/Agoric/agoric-sdk/blob/a267ba20db0eeb2082c287ca7b69e37d6f272eb9/packages/vow/src/tools.js#L37-L38
#9685 added the API for one but it doesn't support upgrade |
I'm thinking that OTOH, |
Would it be better for these to be rejected with UpgradeDisconnection as well? |
possibly something similar, but we likely need the ability to differentiate between the target being abandoned and the pending operation on the target being disconnected. In #9582 we discuss in the future using a chain of |
Recent discussions and audit of use cases highlights the following:
|
refs: #9541, #9322, #9519 ## Description add `getVBankAssetInfo()` method on agoric chain object. DRAFT until - [x] how to add chain-specific methods to return type of `getChain()`? - [x] refactor uses of `makeResumableAgoricNamesHack` to use this ### Documentation Considerations change is visible via `orchestration-api.d.ts` cc @dtribble ### Security Considerations none? ### Scaling Considerations returns O(n) data from O(1) args ### Testing Considerations perhaps not independently tested ### Upgrade Considerations not yet deployed
A wish: rather than moving the method name to a string argument: const lookupAsset = retry(privateArgs.agoricNames, 'lookup', 'vbankAsset'); keep it in the method position, so that we could preserve types: const lookupAsset = retryE(privateArgs.agoricNames).lookup('vbankAsset'); but that reminds me of |
I believe preserving types is an orthogonal concern. There may be a way to maintain typing with the current form. The suggested
I really do not understand this. |
refs: #9541 ## Description Extracted the chain hub changes from #9785 Changed `makeChainHub` to accept a zone instead of it implicitly creating a heap zone. A durable zone is required for `retriable`. ### Security Considerations None ### Scaling Considerations This store the map in durable storage instead of keeping it in the heap, which uses more persistent storage. ### Documentation Considerations Not sure if any docs need to be updated besides the JS doc for `makeChainHub` ### Testing Considerations Updated tests and examples ### Upgrade Considerations This moves into durable storage some info that was heap only before, effectively commiting ourselves to the shape of the data in these maps.
refs: #9541 ## Description Adds a `retryable` helper which retries an idempotent function on upgrade disconnection reasons. Update the upgrade disconnection `isRetryableReason` predicate to accept `vat terminated` errors created by liveslots when trying to message an ephemeral object disconnected by an upgrade (until #9582 is addressed) Remove the stub `retriable` helper, and use the `retryable` implementation. ### Security Considerations To avoid infinite loops, the `vat terminated` detection logic does not allow retrying such consecutive reasons. ### Scaling Considerations None ### Documentation Considerations JSDoc for `retryable` ### Testing Considerations Full unit test and liveslots upgrade test coverage ### Upgrade Considerations The current `retriable` implementation was just a stub that was advertised as not actually working with upgrades. This introduces the actual implementation, which can be picked up by contract authors by simply updating to the next NPM release containing this change. Going forward, defined retryable flows will need to be redefined on upgrade like any other durable exo defined by a contract.
What is the Problem Being Solved?
Vows that wrap promises risk having the promise sever. E.g. a remote call to
agoricNames
could sever upon upgrade. Fortunately, in that case simply retrying is safe.Description of the Design
A helper that makes a remote call that will retry upon upgrade failure.
Security Considerations
Scaling Considerations
Test Plan
Upgrade Considerations
The text was updated successfully, but these errors were encountered: