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

add option to make non-metered dynamic vats #1307

Closed
warner opened this issue Jul 17, 2020 · 0 comments
Closed

add option to make non-metered dynamic vats #1307

warner opened this issue Jul 17, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request SwingSet package: SwingSet

Comments

@warner
Copy link
Member

warner commented Jul 17, 2020

What is the Problem Being Solved?

For the performance checks that @FUDCo is doing, it would be convenient to allow the creation of non-metered dynamic vats.

This will also help a pattern where the only static vat is the bootstrap vat, and it creates all the other long-lived initial "vat payload" vats as dynamic vats. In that world, these initial dynamic vats should be every bit as powerful as the ones created later for contracts, and if we don't intend to meter some of them, we shouldn't have to pay the overhead of applying the metering transform to their code.

Description of the Design

The E(vatAdminService).createVat(bundle) call will change to take (bundle, options), and metered: false will be honored. If the option is omitted, it defaults to metered: true. If metering is disabled, neither the transform nor the getMeter lexical will be added to the new vat's Compartment, nor will a meterRecord be created for it.

Security Considerations

The ability to create unmetered dynamic vats is a way to escape metering, so it should not be granted to vats which are themselves metered. We currently only give the vatAdminService reference to Zoe, which is not metered. In the future, we might want to create a separate facet for create-metered vs create-unmetered, rather than expressing it as an option, but I think we can wait until we have a need for it.

Test Plan

I'll add unit tests to packages/SwingSet/test/metering/ to cover this new case.

@warner warner added enhancement New feature or request SwingSet package: SwingSet labels Jul 17, 2020
@warner warner self-assigned this Jul 17, 2020
@warner warner closed this as completed in 8078ef0 Jul 24, 2020
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

1 participant