@agoric/swingset-vat 0.32.3-dev-ad7ac3c.0 → 0.32.3-dev-9c73ae4.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 +12 -12
- package/src/kernel/kernel.js +2 -0
- package/src/kernel/state/kernelKeeper.js +18 -2
- package/src/types-external.js +1 -0
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-9c73ae4.0+9c73ae4",
|
|
4
4
|
"description": "Vat/Container Launcher",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -27,16 +27,16 @@
|
|
|
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": "0.14.3-dev-
|
|
39
|
-
"@agoric/xsnap-lockdown": "0.14.1-dev-
|
|
30
|
+
"@agoric/internal": "0.3.3-dev-9c73ae4.0+9c73ae4",
|
|
31
|
+
"@agoric/kmarshal": "0.1.1-dev-9c73ae4.0+9c73ae4",
|
|
32
|
+
"@agoric/store": "0.9.3-dev-9c73ae4.0+9c73ae4",
|
|
33
|
+
"@agoric/swing-store": "0.9.2-dev-9c73ae4.0+9c73ae4",
|
|
34
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-9c73ae4.0+9c73ae4",
|
|
35
|
+
"@agoric/swingset-xsnap-supervisor": "0.10.3-dev-9c73ae4.0+9c73ae4",
|
|
36
|
+
"@agoric/time": "0.3.3-dev-9c73ae4.0+9c73ae4",
|
|
37
|
+
"@agoric/vat-data": "0.5.3-dev-9c73ae4.0+9c73ae4",
|
|
38
|
+
"@agoric/xsnap": "0.14.3-dev-9c73ae4.0+9c73ae4",
|
|
39
|
+
"@agoric/xsnap-lockdown": "0.14.1-dev-9c73ae4.0+9c73ae4",
|
|
40
40
|
"@endo/base64": "^1.0.8",
|
|
41
41
|
"@endo/bundle-source": "^3.4.2",
|
|
42
42
|
"@endo/captp": "^4.4.2",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"typeCoverage": {
|
|
104
104
|
"atLeast": 75.82
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "9c73ae4bfa7d48114690e694b065ee0a1ce99e30"
|
|
107
107
|
}
|
package/src/kernel/kernel.js
CHANGED
|
@@ -710,6 +710,7 @@ export default function buildKernel(
|
|
|
710
710
|
total:
|
|
711
711
|
work.exports +
|
|
712
712
|
work.imports +
|
|
713
|
+
work.promises +
|
|
713
714
|
work.kv +
|
|
714
715
|
work.snapshots +
|
|
715
716
|
work.transcripts,
|
|
@@ -1851,6 +1852,7 @@ export default function buildKernel(
|
|
|
1851
1852
|
{
|
|
1852
1853
|
exports: M.number(),
|
|
1853
1854
|
imports: M.number(),
|
|
1855
|
+
promises: M.number(),
|
|
1854
1856
|
kv: M.number(),
|
|
1855
1857
|
snapshots: M.number(),
|
|
1856
1858
|
transcripts: M.number(),
|
|
@@ -1021,6 +1021,7 @@ export default function makeKernelKeeper(
|
|
|
1021
1021
|
const work = {
|
|
1022
1022
|
exports: 0,
|
|
1023
1023
|
imports: 0,
|
|
1024
|
+
promises: 0,
|
|
1024
1025
|
kv: 0,
|
|
1025
1026
|
snapshots: 0,
|
|
1026
1027
|
transcripts: 0,
|
|
@@ -1045,6 +1046,7 @@ export default function makeKernelKeeper(
|
|
|
1045
1046
|
const clistPrefix = `${vatID}.c.`;
|
|
1046
1047
|
const exportPrefix = `${clistPrefix}o+`;
|
|
1047
1048
|
const importPrefix = `${clistPrefix}o-`;
|
|
1049
|
+
const promisePrefix = `${clistPrefix}p`;
|
|
1048
1050
|
|
|
1049
1051
|
// Note: ASCII order is "+,-./", and we rely upon this to split the
|
|
1050
1052
|
// keyspace into the various o+NN/o-NN/etc spaces. If we were using a
|
|
@@ -1097,8 +1099,22 @@ export default function makeKernelKeeper(
|
|
|
1097
1099
|
}
|
|
1098
1100
|
}
|
|
1099
1101
|
|
|
1100
|
-
//
|
|
1101
|
-
// so they already
|
|
1102
|
+
// The caller used enumeratePromisesByDecider() before calling us,
|
|
1103
|
+
// so they have already rejected the orphan promises, but those
|
|
1104
|
+
// kpids are still present in the dead vat's c-list. Clean those
|
|
1105
|
+
// up now.
|
|
1106
|
+
remaining = budget.promises ?? budget.default;
|
|
1107
|
+
for (const k of enumeratePrefixedKeys(kvStore, promisePrefix)) {
|
|
1108
|
+
const kref = kvStore.get(k) || Fail`getNextKey ensures get`;
|
|
1109
|
+
const vref = stripPrefix(clistPrefix, k);
|
|
1110
|
+
vatKeeper.deleteCListEntry(kref, vref);
|
|
1111
|
+
// that will also delete both db keys
|
|
1112
|
+
work.promises += 1;
|
|
1113
|
+
remaining -= 1;
|
|
1114
|
+
if (remaining <= 0) {
|
|
1115
|
+
return { done: false, work };
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1102
1118
|
|
|
1103
1119
|
// now loop back through everything and delete it all
|
|
1104
1120
|
remaining = budget.kv ?? budget.default;
|