Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(swingset)!: make dynamic vats unmetered by default
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 the number 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, and then 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` to their `createVat` options. Such callers will need to create a Meter object once #3308 is done. The commit also updates swingset metering tests to add `metered: true`. refs #3308
- Loading branch information