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

createVat should take bundlecap, not bundle #4373

Closed
warner opened this issue Jan 25, 2022 · 0 comments
Closed

createVat should take bundlecap, not bundle #4373

warner opened this issue Jan 25, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request SwingSet package: SwingSet
Milestone

Comments

@warner
Copy link
Member

warner commented Jan 25, 2022

What is the Problem Being Solved?

To support #3269 and moving large bundle objects out of userspace messages, we need the vatAdminService's createVat() to take a bundlecap instead of an actual bundle.

We might want a transition period in which createVat() accepts either a bundlecap or a bundle, while we track down the code that still passes in a bundle. I expect that only swingset unit tests do this: I think Zoe uses createVatByName (see #4374).

Description of the Design

For now, the createVat() method should accept a bundlecap, use D(bundlecap).getBundleID() to fetch the bundleID, then pass the bundleID to devices.vatAdmin, which can pass it along to the kernel endowment. Internally, the kernel vat-creation code can then look up the bundle by ID.

Later, I'd like to avoid having the bundleID exposed in userspace, even if it's vatAdmin. I think this will require an additional entrypoint on devices.bundle that the kernel can call to convert the bundlecap into a bundleID. OTOH, that would also require going through the device's clist to convert the bundlecap's kref into a vref that the device can look up. So I might defer this step for a while, until/unless bundlecaps acquire first-class representation within the kernel (e.g. kbNN?).

Security Considerations

Test Plan

unit tests

@warner warner added enhancement New feature or request SwingSet package: SwingSet labels Jan 25, 2022
@warner warner self-assigned this Jan 25, 2022
@warner warner changed the title createVat should take bundlecap, not bundle; handle named bundles in config createVat should take bundlecap, not bundle Jan 25, 2022
@warner warner added the MN-1 label Jan 25, 2022
@Tartuffo Tartuffo removed the MN-1 label Feb 7, 2022
@mergify mergify bot closed this as completed in 1c39ebd Feb 9, 2022
@Tartuffo Tartuffo added this to the Mainnet 1 milestone Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SwingSet package: SwingSet
Projects
None yet
Development

No branches or pull requests

2 participants