feat(swingset)!: make dynamic vats unmetered by default #3522
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When #3308 lands, the definition of "metering" will change. Previously, a
"metered dynamic vat" just meant that 1: each crank was limited to some fixed
amount of computrons, and 2: the low-level
deliveryResult
included thenumber of computrons consumed by that delivery (but nobody paid attention to
the value).
In the new system, metering requires a Meter: an object with a
remaining
capacity, which is deducted by the consumption of each delivery. Each metered
vat is associated with (exactly one) Meter. The presence of a Meter still
implies a per-crank limit: unmetered vats do not have a per-crank limit
either.
Previously, all dynamic vats were metered by default. Since the new metering
needs a Meter, it would be awkward to retain this default: we'd have to
allocate a new Meter during
createVat
without the caller's awareness, andthen there would be nobody to pay attention to it (or refill it when it runs
low).
So this commit changes the default to "false". Dynamic vats will be
unmetered (neither per-crank limits nor cumulative limits) by default.
Callers who want to retain the per-crank limits should add
metered: true
totheir
createVat
options. Such callers will need to create a Meter objectonce #3308 is done.
The commit also updates swingset metering tests to add
metered: true
.refs #3308