@agoric/swingset-vat 0.32.3-dev-d19b293.0 → 0.32.3-dev-596ebab.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/swingset-vat",
|
|
3
|
-
"version": "0.32.3-dev-
|
|
3
|
+
"version": "0.32.3-dev-596ebab.0+596ebab",
|
|
4
4
|
"description": "Vat/Container Launcher",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
"@types/yargs-parser": "^21.0.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@agoric/internal": "0.3.3-dev-
|
|
31
|
-
"@agoric/kmarshal": "0.1.1-dev-
|
|
32
|
-
"@agoric/store": "0.9.3-dev-
|
|
33
|
-
"@agoric/swing-store": "0.9.2-dev-
|
|
34
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
35
|
-
"@agoric/swingset-xsnap-supervisor": "0.10.3-dev-
|
|
36
|
-
"@agoric/time": "0.3.3-dev-
|
|
37
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
38
|
-
"@agoric/xsnap-lockdown": "0.14.1-dev-
|
|
30
|
+
"@agoric/internal": "0.3.3-dev-596ebab.0+596ebab",
|
|
31
|
+
"@agoric/kmarshal": "0.1.1-dev-596ebab.0+596ebab",
|
|
32
|
+
"@agoric/store": "0.9.3-dev-596ebab.0+596ebab",
|
|
33
|
+
"@agoric/swing-store": "0.9.2-dev-596ebab.0+596ebab",
|
|
34
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-596ebab.0+596ebab",
|
|
35
|
+
"@agoric/swingset-xsnap-supervisor": "0.10.3-dev-596ebab.0+596ebab",
|
|
36
|
+
"@agoric/time": "0.3.3-dev-596ebab.0+596ebab",
|
|
37
|
+
"@agoric/vat-data": "0.5.3-dev-596ebab.0+596ebab",
|
|
38
|
+
"@agoric/xsnap-lockdown": "0.14.1-dev-596ebab.0+596ebab",
|
|
39
39
|
"@endo/base64": "^1.0.8",
|
|
40
40
|
"@endo/bundle-source": "^3.4.2",
|
|
41
41
|
"@endo/captp": "^4.4.2",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"typeCoverage": {
|
|
104
104
|
"atLeast": 76.24
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "596ebab7e12e0fe6f2e0e64b83fd956b180031d5"
|
|
107
107
|
}
|
|
@@ -15,6 +15,7 @@ import { initSwingStore } from '@agoric/swing-store';
|
|
|
15
15
|
|
|
16
16
|
import { mustMatch, M } from '@endo/patterns';
|
|
17
17
|
import { checkBundle } from '@endo/check-bundle/lite.js';
|
|
18
|
+
import { deepCopyJsonable } from '@agoric/internal/src/js-utils.js';
|
|
18
19
|
import engineGC from '@agoric/internal/src/lib-nodejs/engine-gc.js';
|
|
19
20
|
import { startSubprocessWorker } from '@agoric/internal/src/lib-nodejs/spawnSubprocessWorker.js';
|
|
20
21
|
import { waitUntilQuiescent } from '@agoric/internal/src/lib-nodejs/waitUntilQuiescent.js';
|
|
@@ -263,13 +264,6 @@ export async function makeSwingsetController(
|
|
|
263
264
|
|
|
264
265
|
await kernel.start();
|
|
265
266
|
|
|
266
|
-
/**
|
|
267
|
-
* @param {T} x
|
|
268
|
-
* @returns {T}
|
|
269
|
-
* @template T
|
|
270
|
-
*/
|
|
271
|
-
const defensiveCopy = x => JSON.parse(JSON.stringify(x));
|
|
272
|
-
|
|
273
267
|
/**
|
|
274
268
|
* Validate and install a code bundle.
|
|
275
269
|
*
|
|
@@ -304,7 +298,7 @@ export async function makeSwingsetController(
|
|
|
304
298
|
writeSlogObject,
|
|
305
299
|
|
|
306
300
|
dump() {
|
|
307
|
-
return
|
|
301
|
+
return deepCopyJsonable(kernel.dump());
|
|
308
302
|
},
|
|
309
303
|
|
|
310
304
|
verboseDebugMode(flag) {
|
|
@@ -340,11 +334,11 @@ export async function makeSwingsetController(
|
|
|
340
334
|
},
|
|
341
335
|
|
|
342
336
|
getStats() {
|
|
343
|
-
return
|
|
337
|
+
return deepCopyJsonable(kernel.getStats());
|
|
344
338
|
},
|
|
345
339
|
|
|
346
340
|
getStatus() {
|
|
347
|
-
return
|
|
341
|
+
return deepCopyJsonable(kernel.getStatus());
|
|
348
342
|
},
|
|
349
343
|
|
|
350
344
|
getActivityhash() {
|
|
@@ -3,7 +3,7 @@ import fs from 'fs';
|
|
|
3
3
|
import path from 'path';
|
|
4
4
|
|
|
5
5
|
import { assert, b, Fail } from '@endo/errors';
|
|
6
|
-
import { makeTracer } from '@agoric/internal';
|
|
6
|
+
import { deepCopyJsonable, makeTracer } from '@agoric/internal';
|
|
7
7
|
import { mustMatch } from '@agoric/store';
|
|
8
8
|
import bundleSource from '@endo/bundle-source';
|
|
9
9
|
import { resolve as resolveModuleSpecifier } from 'import-meta-resolve';
|
|
@@ -323,7 +323,7 @@ export async function initializeSwingset(
|
|
|
323
323
|
} = runtimeOptions;
|
|
324
324
|
|
|
325
325
|
// copy config so we can safely mess with it even if it's shared or hardened
|
|
326
|
-
config =
|
|
326
|
+
config = deepCopyJsonable(config);
|
|
327
327
|
if (!config.bundles) {
|
|
328
328
|
config.bundles = {};
|
|
329
329
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Fail } from '@endo/errors';
|
|
2
2
|
import { Far } from '@endo/far';
|
|
3
|
+
import { deepCopyJsonable } from '@agoric/internal/src/js-utils.js';
|
|
3
4
|
|
|
4
5
|
function sanitize(data) {
|
|
5
6
|
if (data === undefined) {
|
|
@@ -8,7 +9,7 @@ function sanitize(data) {
|
|
|
8
9
|
if (data instanceof Error) {
|
|
9
10
|
data = data.stack;
|
|
10
11
|
}
|
|
11
|
-
return
|
|
12
|
+
return deepCopyJsonable(data);
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -32,7 +33,7 @@ export function buildRootDeviceNode(tools) {
|
|
|
32
33
|
|
|
33
34
|
function inboundCallback(...args) {
|
|
34
35
|
inboundHandler || Fail`inboundHandler not yet registered`;
|
|
35
|
-
const safeArgs =
|
|
36
|
+
const safeArgs = deepCopyJsonable(args);
|
|
36
37
|
try {
|
|
37
38
|
SO(inboundHandler).inbound(...harden(safeArgs));
|
|
38
39
|
} catch (e) {
|