feat(swingset)!: remove support for non-XS metering #3523
Merged
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.
We no longer care about injected (Node.js) -based metering: XS is the only
platform where we can reasonably+efficiently meter code.
This removes support for passing
{ managerType: 'local', metered: true }
tocreateVat()
. Doing so will throw an exception when the vatManager isinvoked. Using just
{ metered: true }
is also an error when the swingsetconfig.defaultManagerType
is not set toxs-worker
. Applications that wantmetered dynamic vats (i.e. all of them) should set
config.defaultManagerType = 'xs-worker'
to avoid this.This commit removes support throughout swingset:
transformMetering
is no longer passed from controller to kernel to thelocal vatManager, and the transform is no longer applied to
inescapableTransforms
to ensure sub-Compartments are also transformedgetMeter
is no longer placed oninescapableLexicals
replaceGlobalMeter
is no longer passed through tosupervisor-helper
,where it was used to disable metering at the end of each crank
meterManager
facilities were removedexercised sub-Compartments (which was specific to the injection approach)
Some tests have been modernized slightly, to use
controller.kpResolution
instead of appending strings to testLog, and to use
prepare-test-env-ava
instead of
@agoric/install-ses
.Dependency updates:
Swingset no longer uses
@agoric/install-metering-and-ses
, or thetame-metering
/transform-metering
packages. A vestigal dependency onbabel-parser
(left over from the transform-tildot days) was removed.Swingset still depends upon
babel-standalone
, to pre-load beforelockdown
in
prepare-test-env-ava
.closes #3518