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

fix: add liveslots-provided globals to vat Compartments #1895

Merged
merged 2 commits into from
Oct 21, 2020

Conversation

warner
Copy link
Member

@warner warner commented Oct 21, 2020

Liveslots does not yet provide any vatGlobals, but this ensures that any
ones it does provide in the future will be added to the endowments on the
vat's Compartment. We'll use this to populate makeExternalStore -type
functions, which want to be globals (because threading them from vatPowers
into modules that need them would be too annoying), but must also be in
cahoots with closely-held WeakMaps and "Representative" state management code
from liveslots, as described in #455 and #1846.

closes #1867

@FUDCo reviewer note: the first commit is pure refactoring, the only behavioral changes are in the second commit, feel free to review them separately

This just rearranges the order in which vat workers operate, so they do
`makeLiveslots` first, and `importBundle` second, to faciliate an upcoming
change that takes `vatGlobals` from liveslots and adds them into the
`importBundle` call. This should not change any visible behavior.
Liveslots does not yet provide any `vatGlobals`, but this ensures that any
ones it does provide in the future will be added to the `endowments` on the
vat's Compartment. We'll use this to populate `makeExternalStore` -type
functions, which want to be globals (because threading them from `vatPowers`
into modules that need them would be too annoying), but must also be in
cahoots with closely-held WeakMaps and "Representative" state management code
from liveslots, as described in #455 and #1846.

closes #1867
@warner warner added the SwingSet package: SwingSet label Oct 21, 2020
@warner warner requested a review from FUDCo October 21, 2020 18:59
@warner warner self-assigned this Oct 21, 2020
Copy link
Contributor

@FUDCo FUDCo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@warner warner merged commit df5703d into master Oct 21, 2020
@warner warner deleted the 1867-add-globals branch October 21, 2020 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SwingSet package: SwingSet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

liveslots+vatManager must provide secondary-storage API to vats as global
2 participants