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

Liveslots fails with virtual watchers in watchPromise #9333

Open
mhofman opened this issue May 7, 2024 · 0 comments
Open

Liveslots fails with virtual watchers in watchPromise #9333

mhofman opened this issue May 7, 2024 · 0 comments
Labels
bug Something isn't working liveslots requires vat-upgrade to deploy changes

Comments

@mhofman
Copy link
Member

mhofman commented May 7, 2024

Describe the bug

Providing a virtual watcher to watchPromise is asserted to be supported but will in fact fail because storing a virtual reference in a durable collection will throw.

virtual ||
durable ||
// separate line so easy to breakpoint on
Fail`promise watcher must be a virtual object`;

watchedPromiseTable.init(vpid, harden([[watcher, ...args]]));

watchedPromiseTable = makeScalarBigMapStore('watchedPromises', {

To Reproduce

No test coverage, derived from auditing the code

Expected behavior

A virtual watcher should indeed be supported, but the collection used should be a virtual one, recreated for each incarnation.

Additional context

The watcher wouldn't be invoked in future incarnations, but that is not worse than a heap E.when that this is substituting. With a virtual watcher the program could avoid keeping the watcher in the heap.

See #9321 (comment)_

@mhofman mhofman added bug Something isn't working liveslots requires vat-upgrade to deploy changes labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working liveslots requires vat-upgrade to deploy changes
Projects
None yet
Development

No branches or pull requests

1 participant