Skip to content

Commit

Permalink
Merge pull request #3393 from Agoric/3373-remove-global-metering
Browse files Browse the repository at this point in the history
remove install-metering-and-ses from apps and most unit tests

closes #3373
  • Loading branch information
warner authored Jun 22, 2021
2 parents 79a888e + ea19295 commit f3f299b
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion packages/cosmic-swingset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@agoric/cosmos": "^0.26.4",
"@agoric/dapp-svelte-wallet": "^0.10.4",
"@agoric/import-bundle": "^0.2.16",
"@agoric/install-metering-and-ses": "^0.2.15",
"@agoric/install-ses": "^0.5.15",
"@agoric/store": "^0.4.16",
"@agoric/swing-store-lmdb": "^0.5.1",
"@agoric/swingset-vat": "^0.18.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/cosmic-swingset/src/entrypoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import '@agoric/babel-standalone';

// we need to enable Math.random as a workaround for 'brace-expansion' module
// (dep chain: temp->glob->minimatch->brace-expansion)
import '@agoric/install-metering-and-ses';
import '@agoric/install-ses';

import os from 'os';
import path from 'path';
Expand Down
2 changes: 1 addition & 1 deletion packages/solo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@agoric/dapp-svelte-wallet": "^0.10.4",
"@agoric/eventual-send": "^0.13.16",
"@agoric/import-bundle": "^0.2.16",
"@agoric/install-metering-and-ses": "^0.2.15",
"@agoric/install-ses": "^0.5.15",
"@agoric/marshal": "^0.4.13",
"@agoric/notifier": "^0.3.16",
"@agoric/promise-kit": "^0.2.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/solo/solo-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"bootstrap": "bootstrap",
"defaultManagerType": "local",
"defaultManagerType": "xs-worker",
"vats": {
"spawner": {
"sourceSpec": "./src/vat-spawner.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/solo/src/entrypoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import '@agoric/babel-standalone';

// we need to enable Math.random as a workaround for 'brace-expansion' module
// (dep chain: temp->glob->minimatch->brace-expansion)
import '@agoric/install-metering-and-ses';
import '@agoric/install-ses';

import process from 'process';
import path from 'path';
Expand Down
2 changes: 1 addition & 1 deletion packages/solo/src/init-basedir.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function initBasedir(
const { env = process.environment } = opts;
const {
wallet = DEFAULT_WALLET,
defaultManagerType = env.SWINGSET_WORKER_TYPE || 'local',
defaultManagerType = env.SWINGSET_WORKER_TYPE || 'xs-worker',
...options
} = opts;
options.wallet = wallet;
Expand Down
2 changes: 1 addition & 1 deletion packages/solo/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ start
webport: '8000',
webhost: '127.0.0.1',
egresses: DEFAULT_EGRESSES,
defaultManagerType: process.env.SWINGSET_WORKER_TYPE || 'local',
defaultManagerType: process.env.SWINGSET_WORKER_TYPE || 'xs-worker',
},
});
const webport = Number(subOpts.webport);
Expand Down
1 change: 0 additions & 1 deletion packages/spawner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"devDependencies": {
"@agoric/babel-standalone": "^7.14.3",
"@agoric/bundle-source": "^1.3.9",
"@agoric/install-metering-and-ses": "^0.2.15",
"@agoric/install-ses": "^0.5.15",
"@agoric/swingset-vat": "^0.18.0",
"ava": "^3.12.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// TODO Remove babel-standalone preinitialization
// https://github.com/endojs/endo/issues/768
import '@agoric/babel-standalone';
import '@agoric/install-metering-and-ses';
import '@agoric/install-ses';
import test from 'ava';
import path from 'path';
import bundleSource from '@agoric/bundle-source';
Expand All @@ -19,8 +19,9 @@ test.before(async t => {
t.context.data = { kernelBundles, trivialBundle };
});

async function main(t, mode) {
async function main(t, mode, defaultManagerType = 'local') {
const config = await loadBasedir(__dirname);
config.defaultManagerType = defaultManagerType;
const { kernelBundles, trivialBundle } = t.context.data;
const argv = [mode, trivialBundle];
const controller = await buildVatController(config, argv, { kernelBundles });
Expand All @@ -47,6 +48,6 @@ const contractExhaustedGolden = [
];

test('exhaustion', async t => {
const dump = await main(t, 'exhaust');
const dump = await main(t, 'exhaust', 'xs-worker');
t.deepEqual(dump.log, contractExhaustedGolden);
});
1 change: 0 additions & 1 deletion packages/zoe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
},
"devDependencies": {
"@agoric/babel-standalone": "^7.14.3",
"@agoric/install-metering-and-ses": "^0.2.15",
"@agoric/install-ses": "^0.5.15",
"ava": "^3.12.1",
"esm": "agoric-labs/esm#Agoric-built",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// https://github.com/endojs/endo/issues/768
import '@agoric/babel-standalone';
// eslint-disable-next-line import/no-extraneous-dependencies
import '@agoric/install-metering-and-ses';
import '@agoric/install-ses';
// eslint-disable-next-line import/no-extraneous-dependencies
import test from 'ava';

Expand All @@ -28,6 +28,7 @@ const generateBundlesP = Promise.all(

async function main(argv) {
const config = await loadBasedir(__dirname);
config.defaultManagerType = 'xs-worker';
await generateBundlesP;
const controller = await buildVatController(config, argv);
await controller.run();
Expand Down
2 changes: 1 addition & 1 deletion packages/zoe/test/swingsetTests/makeKind/test-makeKind.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// https://github.com/endojs/endo/issues/768
import '@agoric/babel-standalone';
// eslint-disable-next-line import/no-extraneous-dependencies
import '@agoric/install-metering-and-ses';
import '@agoric/install-ses';
// eslint-disable-next-line import/no-extraneous-dependencies
import test from 'ava';
// eslint-disable-next-line import/no-extraneous-dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// https://github.com/endojs/endo/issues/768
import '@agoric/babel-standalone';
// eslint-disable-next-line import/no-extraneous-dependencies
import '@agoric/install-metering-and-ses';
import '@agoric/install-ses';
// eslint-disable-next-line import/no-extraneous-dependencies
import test from 'ava';
import { loadBasedir, buildVatController } from '@agoric/swingset-vat';
Expand Down Expand Up @@ -33,6 +33,7 @@ const generateBundlesP = Promise.all(

async function main(argv) {
const config = await loadBasedir(__dirname);
config.defaultManagerType = 'xs-worker';
await generateBundlesP;
const controller = await buildVatController(config, argv);
await controller.run();
Expand Down
2 changes: 1 addition & 1 deletion packages/zoe/test/swingsetTests/zoe/test-zoe.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// https://github.com/endojs/endo/issues/768
import '@agoric/babel-standalone';
// eslint-disable-next-line import/no-extraneous-dependencies
import '@agoric/install-metering-and-ses';
import '@agoric/install-ses';
// eslint-disable-next-line import/no-extraneous-dependencies
import test from 'ava';
import { buildVatController, buildKernelBundles } from '@agoric/swingset-vat';
Expand Down

0 comments on commit f3f299b

Please sign in to comment.