@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/swingset-vat",
3
- "version": "0.32.3-dev-1645d7e.0+1645d7e",
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-1645d7e.0+1645d7e",
31
- "@agoric/kmarshal": "0.1.1-dev-1645d7e.0+1645d7e",
32
- "@agoric/store": "0.9.3-dev-1645d7e.0+1645d7e",
33
- "@agoric/swing-store": "0.9.2-dev-1645d7e.0+1645d7e",
34
- "@agoric/swingset-liveslots": "0.10.3-dev-1645d7e.0+1645d7e",
35
- "@agoric/swingset-xsnap-supervisor": "0.10.3-dev-1645d7e.0+1645d7e",
36
- "@agoric/time": "0.3.3-dev-1645d7e.0+1645d7e",
37
- "@agoric/vat-data": "0.5.3-dev-1645d7e.0+1645d7e",
38
- "@agoric/xsnap-lockdown": "0.14.1-dev-1645d7e.0+1645d7e",
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": "1645d7e8a3194f56889e91df38a31c1a900905bb"
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(`anachrophobia strikes ${vatID} on delivery ${deliveryNum}`);
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[${idx}]: ok: ${djson.stringify(got)}`);
119
+ console.log(`sc${idx}: ok: ${djson.stringify(got)}`);
117
120
  break;
118
121
  }
119
122
  case 'wrong': {
120
- console.log(`sc[${idx}]: wrong`);
121
- console.log(` expected: ${djson.stringify(expected.s)}`);
122
- console.log(` got : ${djson.stringify(got)}`);
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[${idx}]: extra: ${djson.stringify(got)}`);
132
+ console.log(`sc${idx}: EXTRA: ${djson.stringify(got)}`);
127
133
  break;
128
134
  }
129
135
  case 'missing': {
130
- console.log(`sc[${idx}]: missing: ${djson.stringify(expected.s)}`);
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(`anachrophobia in ${vatID}: extra syscall`);
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(`anachrophobia in ${vatID}: wrong syscall`);
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
- if (syscallsMade.length < syscallsExpected.length) {
163
- const missing = syscallsExpected.length - syscallsMade.length;
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(`anachrophobia in ${vatID}: missing syscalls`);
173
+ const error = Error(
174
+ `${context}: missing ${missing} syscall(s) at index sc${syscallsMade.length}`,
175
+ );
168
176
  replayError ||= error;
169
177
  }
170
178