@agoric/swingset-vat 0.32.3-dev-7ffae88.0 → 0.32.3-dev-32c4d68.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 +30 -30
- package/src/kernel/slogger.js +4 -0
- package/src/types-external.js +5 -3
- package/src/vats/vat-admin/vat-vat-admin.js +1 -1
- package/tools/run-utils.js +16 -21
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-32c4d68.0+32c4d68",
|
|
4
4
|
"description": "Vat/Container Launcher",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -27,33 +27,33 @@
|
|
|
27
27
|
"@types/yargs-parser": "^21.0.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@agoric/assert": "0.6.1-dev-
|
|
31
|
-
"@agoric/internal": "0.3.3-dev-
|
|
32
|
-
"@agoric/kmarshal": "0.1.1-dev-
|
|
33
|
-
"@agoric/store": "0.9.3-dev-
|
|
34
|
-
"@agoric/swing-store": "0.9.2-dev-
|
|
35
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
36
|
-
"@agoric/swingset-xsnap-supervisor": "0.10.3-dev-
|
|
37
|
-
"@agoric/time": "0.3.3-dev-
|
|
38
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
39
|
-
"@agoric/xsnap": "0.14.3-dev-
|
|
40
|
-
"@agoric/xsnap-lockdown": "0.14.1-dev-
|
|
41
|
-
"@endo/base64": "^1.0.
|
|
42
|
-
"@endo/bundle-source": "^3.0
|
|
43
|
-
"@endo/captp": "^4.0.
|
|
44
|
-
"@endo/check-bundle": "^1.0.
|
|
45
|
-
"@endo/compartment-mapper": "^1.1.
|
|
46
|
-
"@endo/eventual-send": "^1.1.
|
|
47
|
-
"@endo/far": "^1.0.
|
|
48
|
-
"@endo/import-bundle": "^1.0.
|
|
49
|
-
"@endo/init": "^1.0.
|
|
50
|
-
"@endo/marshal": "^1.
|
|
51
|
-
"@endo/nat": "^5.0.
|
|
52
|
-
"@endo/patterns": "^1.
|
|
53
|
-
"@endo/promise-kit": "^1.0.
|
|
54
|
-
"@endo/ses-ava": "^1.1.
|
|
55
|
-
"@endo/stream": "^1.0
|
|
56
|
-
"@endo/zip": "^1.0.
|
|
30
|
+
"@agoric/assert": "0.6.1-dev-32c4d68.0+32c4d68",
|
|
31
|
+
"@agoric/internal": "0.3.3-dev-32c4d68.0+32c4d68",
|
|
32
|
+
"@agoric/kmarshal": "0.1.1-dev-32c4d68.0+32c4d68",
|
|
33
|
+
"@agoric/store": "0.9.3-dev-32c4d68.0+32c4d68",
|
|
34
|
+
"@agoric/swing-store": "0.9.2-dev-32c4d68.0+32c4d68",
|
|
35
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-32c4d68.0+32c4d68",
|
|
36
|
+
"@agoric/swingset-xsnap-supervisor": "0.10.3-dev-32c4d68.0+32c4d68",
|
|
37
|
+
"@agoric/time": "0.3.3-dev-32c4d68.0+32c4d68",
|
|
38
|
+
"@agoric/vat-data": "0.5.3-dev-32c4d68.0+32c4d68",
|
|
39
|
+
"@agoric/xsnap": "0.14.3-dev-32c4d68.0+32c4d68",
|
|
40
|
+
"@agoric/xsnap-lockdown": "0.14.1-dev-32c4d68.0+32c4d68",
|
|
41
|
+
"@endo/base64": "^1.0.2",
|
|
42
|
+
"@endo/bundle-source": "^3.1.0",
|
|
43
|
+
"@endo/captp": "^4.0.4",
|
|
44
|
+
"@endo/check-bundle": "^1.0.4",
|
|
45
|
+
"@endo/compartment-mapper": "^1.1.2",
|
|
46
|
+
"@endo/eventual-send": "^1.1.2",
|
|
47
|
+
"@endo/far": "^1.0.4",
|
|
48
|
+
"@endo/import-bundle": "^1.0.4",
|
|
49
|
+
"@endo/init": "^1.0.4",
|
|
50
|
+
"@endo/marshal": "^1.3.0",
|
|
51
|
+
"@endo/nat": "^5.0.4",
|
|
52
|
+
"@endo/patterns": "^1.2.0",
|
|
53
|
+
"@endo/promise-kit": "^1.0.4",
|
|
54
|
+
"@endo/ses-ava": "^1.1.2",
|
|
55
|
+
"@endo/stream": "^1.1.0",
|
|
56
|
+
"@endo/zip": "^1.0.2",
|
|
57
57
|
"ansi-styles": "^6.2.1",
|
|
58
58
|
"anylogger": "^0.21.0",
|
|
59
59
|
"better-sqlite3": "^9.1.1",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"access": "public"
|
|
101
101
|
},
|
|
102
102
|
"typeCoverage": {
|
|
103
|
-
"atLeast": 75.
|
|
103
|
+
"atLeast": 75.05
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "32c4d68c5f675f1e8fea1a8bc08621816e7b491e"
|
|
106
106
|
}
|
package/src/kernel/slogger.js
CHANGED
|
@@ -138,6 +138,10 @@ export function makeSlogger(slogCallbacks, writeObj) {
|
|
|
138
138
|
const vc = {};
|
|
139
139
|
for (const level of ['debug', 'log', 'info', 'warn', 'error']) {
|
|
140
140
|
vc[level] = (sourceTag, ...args) => {
|
|
141
|
+
if (replay) {
|
|
142
|
+
// Don't duplicate stale console output.
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
141
145
|
sourcedConsole[level](sourceTag, ...args);
|
|
142
146
|
const when = { state, crankNum, vatID, deliveryNum };
|
|
143
147
|
const source = sourceTag === 'ls' ? 'liveslots' : sourceTag;
|
package/src/types-external.js
CHANGED
|
@@ -134,12 +134,14 @@ export {};
|
|
|
134
134
|
* dynamic?: boolean,
|
|
135
135
|
* description?: string,
|
|
136
136
|
* name?: string,
|
|
137
|
-
* vatSourceBundle?:
|
|
137
|
+
* vatSourceBundle?: unknown,
|
|
138
138
|
* managerType?: string,
|
|
139
|
-
* vatParameters?:
|
|
139
|
+
* vatParameters?: unknown) => { vatSlog: VatSlog },
|
|
140
140
|
* terminateVat: (vatID: string, shouldReject: boolean, info: SwingSetCapData) => void,
|
|
141
141
|
* } } KernelSlog
|
|
142
|
-
* @typedef {
|
|
142
|
+
* @typedef {{
|
|
143
|
+
* delivery: (crankNum: bigint, deliveryNum: bigint, kd: KernelDeliveryObject, vd: VatDeliveryObject) => SlogFinishDelivery,
|
|
144
|
+
* }} VatSlog
|
|
143
145
|
*
|
|
144
146
|
* @typedef { () => Promise<void> } WaitUntilQuiescent
|
|
145
147
|
*/
|
|
@@ -174,7 +174,7 @@ export function buildRootObject(vatPowers, _vatParameters, baggage) {
|
|
|
174
174
|
|
|
175
175
|
function pauseService() {
|
|
176
176
|
if (!quiescentP) {
|
|
177
|
-
[quiescentP, quiescentRR] = producePRR();
|
|
177
|
+
void ([quiescentP, quiescentRR] = producePRR());
|
|
178
178
|
}
|
|
179
179
|
checkForQuiescence();
|
|
180
180
|
return quiescentP;
|
package/tools/run-utils.js
CHANGED
|
@@ -2,35 +2,30 @@ import { Fail, q } from '@agoric/assert';
|
|
|
2
2
|
import { kunser } from '@agoric/kmarshal';
|
|
3
3
|
import { makeQueue } from '@endo/stream';
|
|
4
4
|
|
|
5
|
-
const sink = () => {};
|
|
6
|
-
|
|
7
5
|
/**
|
|
8
6
|
* @param {import('../src/controller/controller.js').SwingsetController} controller
|
|
9
7
|
*/
|
|
10
8
|
export const makeRunUtils = controller => {
|
|
11
9
|
const mutex = makeQueue();
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
const logRunFailure = reason =>
|
|
11
|
+
console.log('controller.run() failure', reason);
|
|
12
|
+
mutex.put(controller.run().catch(logRunFailure));
|
|
14
13
|
|
|
15
14
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* Wait for exclusive access to the controller, then before relinquishing that access,
|
|
16
|
+
* enqueue and process a delivery and return the result.
|
|
17
|
+
*
|
|
18
|
+
* @param {() => import('@endo/far').ERef<void | ReturnType<controller['queueToVatObject']>>} deliveryThunk
|
|
19
|
+
* function for enqueueing a delivery and returning the result kpid (if any)
|
|
20
|
+
* @param {boolean} [voidResult] whether to ignore the result
|
|
21
|
+
* @returns {Promise<any>}
|
|
19
22
|
*/
|
|
20
|
-
const runThunk = async thunk => {
|
|
21
|
-
// this promise for the last lock may fail
|
|
22
|
-
// sink because the result will resolve for the previous runMethod return
|
|
23
|
-
await mutex.get().catch(sink);
|
|
24
|
-
|
|
25
|
-
const thunkResult = await thunk();
|
|
26
|
-
|
|
27
|
-
const result = controller.run().then(() => thunkResult);
|
|
28
|
-
mutex.put(result.then(sink, sink));
|
|
29
|
-
return result;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
23
|
const queueAndRun = async (deliveryThunk, voidResult = false) => {
|
|
33
|
-
|
|
24
|
+
await mutex.get();
|
|
25
|
+
const kpid = await deliveryThunk();
|
|
26
|
+
const runResultP = controller.run();
|
|
27
|
+
mutex.put(runResultP.catch(logRunFailure));
|
|
28
|
+
await runResultP;
|
|
34
29
|
|
|
35
30
|
if (voidResult) {
|
|
36
31
|
return undefined;
|
|
@@ -146,7 +141,7 @@ export const makeRunUtils = controller => {
|
|
|
146
141
|
}),
|
|
147
142
|
},
|
|
148
143
|
);
|
|
149
|
-
return harden({
|
|
144
|
+
return harden({ queueAndRun, EV });
|
|
150
145
|
};
|
|
151
146
|
|
|
152
147
|
/**
|