@agoric/swingset-vat 0.32.3-dev-1645d7e.0 → 0.32.3-dev-56d1c14.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 +11 -11
- package/src/kernel/vat-warehouse.js +22 -14
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-56d1c14.0+56d1c14",
|
|
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-56d1c14.0+56d1c14",
|
|
31
|
+
"@agoric/kmarshal": "0.1.1-dev-56d1c14.0+56d1c14",
|
|
32
|
+
"@agoric/store": "0.9.3-dev-56d1c14.0+56d1c14",
|
|
33
|
+
"@agoric/swing-store": "0.9.2-dev-56d1c14.0+56d1c14",
|
|
34
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-56d1c14.0+56d1c14",
|
|
35
|
+
"@agoric/swingset-xsnap-supervisor": "0.10.3-dev-56d1c14.0+56d1c14",
|
|
36
|
+
"@agoric/time": "0.3.3-dev-56d1c14.0+56d1c14",
|
|
37
|
+
"@agoric/vat-data": "0.5.3-dev-56d1c14.0+56d1c14",
|
|
38
|
+
"@agoric/xsnap-lockdown": "0.14.1-dev-56d1c14.0+56d1c14",
|
|
39
39
|
"@endo/base64": "^1.0.9",
|
|
40
40
|
"@endo/bundle-source": "^3.5.0",
|
|
41
41
|
"@endo/captp": "^4.4.3",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"typeCoverage": {
|
|
104
104
|
"atLeast": 76.28
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "56d1c14ed1d0cf6e9a806c21b62c90a16974c9bb"
|
|
107
107
|
}
|
|
@@ -97,6 +97,7 @@ export function makeSyscallSimulator(
|
|
|
97
97
|
deliveryNum,
|
|
98
98
|
transcriptEntry,
|
|
99
99
|
) {
|
|
100
|
+
const context = `anachrophobia in ${vatID} delivery d${deliveryNum}`;
|
|
100
101
|
const syscallsExpected = [...transcriptEntry.sc]; // copy
|
|
101
102
|
const syscallsMade = [];
|
|
102
103
|
// syscallStatus's length will be max(syscallsExpected,
|
|
@@ -107,31 +108,36 @@ export function makeSyscallSimulator(
|
|
|
107
108
|
let replayError; // sticky
|
|
108
109
|
|
|
109
110
|
const explain = () => {
|
|
110
|
-
console.log(
|
|
111
|
+
console.log(
|
|
112
|
+
`anachrophobia strikes ${vatID} delivery d${deliveryNum} syscalls`,
|
|
113
|
+
);
|
|
111
114
|
for (const [idx, status] of syscallStatus.entries()) {
|
|
112
115
|
const expected = syscallsExpected[idx];
|
|
113
116
|
const got = syscallsMade[idx];
|
|
114
117
|
switch (status) {
|
|
115
118
|
case 'ok': {
|
|
116
|
-
console.log(`sc
|
|
119
|
+
console.log(`sc${idx}: ok: ${djson.stringify(got)}`);
|
|
117
120
|
break;
|
|
118
121
|
}
|
|
119
122
|
case 'wrong': {
|
|
120
|
-
console.log(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
console.log(
|
|
124
|
+
`
|
|
125
|
+
sc${idx}: WRONG
|
|
126
|
+
expected: ${djson.stringify(expected.s)}
|
|
127
|
+
got : ${djson.stringify(got)}`.trimStart(),
|
|
128
|
+
);
|
|
123
129
|
break;
|
|
124
130
|
}
|
|
125
131
|
case 'extra': {
|
|
126
|
-
console.log(`sc
|
|
132
|
+
console.log(`sc${idx}: EXTRA: ${djson.stringify(got)}`);
|
|
127
133
|
break;
|
|
128
134
|
}
|
|
129
135
|
case 'missing': {
|
|
130
|
-
console.log(`sc
|
|
136
|
+
console.log(`sc${idx}: MISSING: ${djson.stringify(expected.s)}`);
|
|
131
137
|
break;
|
|
132
138
|
}
|
|
133
139
|
default:
|
|
134
|
-
Fail`bad ${status}`;
|
|
140
|
+
Fail`sc${idx}: bad status ${status}`;
|
|
135
141
|
}
|
|
136
142
|
}
|
|
137
143
|
};
|
|
@@ -140,16 +146,16 @@ export function makeSyscallSimulator(
|
|
|
140
146
|
// slog entries have no kernel-translated kso/ksr
|
|
141
147
|
const finish = kernelSlog.syscall(vatID, undefined, vso);
|
|
142
148
|
const expected = syscallsExpected[syscallsMade.length];
|
|
143
|
-
syscallsMade.push(vso);
|
|
149
|
+
const idx = syscallsMade.push(vso) - 1;
|
|
144
150
|
if (!expected) {
|
|
145
151
|
syscallStatus.push('extra');
|
|
146
|
-
const error = Error(
|
|
152
|
+
const error = Error(`${context}: extra syscall at index sc${idx}`);
|
|
147
153
|
replayError ||= error;
|
|
148
154
|
throw error;
|
|
149
155
|
}
|
|
150
156
|
if (!syscallsAreIdentical(expected.s, vso)) {
|
|
151
157
|
syscallStatus.push('wrong');
|
|
152
|
-
const error = Error(
|
|
158
|
+
const error = Error(`${context}: wrong syscall at index sc${idx}`);
|
|
153
159
|
replayError ||= error;
|
|
154
160
|
throw error;
|
|
155
161
|
}
|
|
@@ -159,12 +165,14 @@ export function makeSyscallSimulator(
|
|
|
159
165
|
};
|
|
160
166
|
|
|
161
167
|
const finishSimulation = () => {
|
|
162
|
-
|
|
163
|
-
|
|
168
|
+
const missing = syscallsExpected.length - syscallsMade.length;
|
|
169
|
+
if (missing > 0) {
|
|
164
170
|
for (let i = 0; i < missing; i += 1) {
|
|
165
171
|
syscallStatus.push('missing');
|
|
166
172
|
}
|
|
167
|
-
const error = Error(
|
|
173
|
+
const error = Error(
|
|
174
|
+
`${context}: missing ${missing} syscall(s) at index sc${syscallsMade.length}`,
|
|
175
|
+
);
|
|
168
176
|
replayError ||= error;
|
|
169
177
|
}
|
|
170
178
|
|