Skip to content
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

Implement Vows for upgrade-tolerant promise behaviour #8906

Closed
Tracked by #5696 ...
michaelfig opened this issue Feb 13, 2024 · 1 comment · Fixed by #8742
Closed
Tracked by #5696 ...

Implement Vows for upgrade-tolerant promise behaviour #8906

michaelfig opened this issue Feb 13, 2024 · 1 comment · Fixed by #8742
Assignees
Labels
enhancement New feature or request

Comments

@michaelfig
Copy link
Member

What is the Problem Being Solved?

Inter-vat promises are sensitive to vat upgrades. If a regular platform promise is created in Alice's vat and sent to Bob's vat, two main cases can cause mayhem:

  1. Alice's vat upgrades before the promise is settled, then Bob receives a "vat upgraded" rejection, and has no clear way to recover since Bob doesn't know how much of the request was completed.
  2. Bob's vat upgrades before the promise is settled, then Bob's promise reactions are forgotten, and his vat is in an inconsistent state.

Description of the Design

We introduce a form of pseudo-promise, a Vow, (also called PromiseStep in an eventual-send APi redesign slide deck. To make both Vows and their resolvers durable, vows are compatible with Zones.

For case 1, we introduce a when operation and a specialized form of E Bob can use that retries the vow-shortening operation on upgrade failures or intermediate vow objects, resulting eventually in a terminal fulfilment. If Alice creates a durable vow, it can be stored alongside its resolver to be resilient to Alice's upgrades.

For case 2, there already exists a solution for platform promises, watchPromise, but we need to extend its implementation to accommodate Vows by introducing a watch operation Bob can use.

Security Considerations

Vows are not implicitly subscribed to by liveslots, so they cause less implicit behaviour and using them in place of promises may reduce load if adopted at the system level.

Scaling Considerations

A when or watch of a vow that simply rejects all shortening attempts with "vat upgraded" can cause chattiness between vats and never resolving.

Test Plan

Upgrade Considerations

@dckc
Copy link
Member

dckc commented Feb 13, 2024

re Scaling Considerations - using the mechanism in case 2 introduces a round-trip, right?

#8742 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants