-
Notifications
You must be signed in to change notification settings - Fork 207
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
Labels
Comments
warner
added a commit
that referenced
this issue
Jul 18, 2020
warner
added a commit
that referenced
this issue
Jul 19, 2020
warner
added a commit
that referenced
this issue
Jul 20, 2020
warner
added a commit
that referenced
this issue
Jul 21, 2020
warner
added a commit
that referenced
this issue
Jul 22, 2020
warner
added a commit
that referenced
this issue
Jul 22, 2020
warner
added a commit
that referenced
this issue
Jul 24, 2020
warner
added a commit
that referenced
this issue
Jul 24, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)
, andmetered: false
will be honored. If the option is omitted, it defaults tometered: true
. If metering is disabled, neither the transform nor thegetMeter
lexical will be added to the new vat's Compartment, nor will ameterRecord
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.The text was updated successfully, but these errors were encountered: