@agoric/solo 0.10.4-dev-7cc5def.0 → 0.10.4-dev-3ce0599.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 +20 -17
- package/public/main.js +2 -1
- package/src/captp.js +10 -3
- package/src/chain-cosmos-sdk.js +17 -11
- package/src/vat-http.js +3 -2
- package/test/captp-fixture.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/solo",
|
|
3
|
-
"version": "0.10.4-dev-
|
|
3
|
+
"version": "0.10.4-dev-3ce0599.0+3ce0599",
|
|
4
4
|
"description": "Agoric's Solo vat runner",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -22,20 +22,20 @@
|
|
|
22
22
|
"author": "Agoric",
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agoric/access-token": "0.4.22-dev-
|
|
26
|
-
"@agoric/assert": "0.6.1-dev-
|
|
27
|
-
"@agoric/cache": "0.3.3-dev-
|
|
28
|
-
"@agoric/cosmic-swingset": "0.41.4-dev-
|
|
29
|
-
"@agoric/internal": "0.3.3-dev-
|
|
30
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
31
|
-
"@agoric/spawner": "0.6.9-dev-
|
|
32
|
-
"@agoric/store": "0.9.3-dev-
|
|
33
|
-
"@agoric/swing-store": "0.9.2-dev-
|
|
34
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
35
|
-
"@agoric/telemetry": "0.6.3-dev-
|
|
36
|
-
"@agoric/time": "0.3.3-dev-
|
|
37
|
-
"@agoric/vats": "0.15.2-dev-
|
|
38
|
-
"@agoric/wallet": "0.18.4-dev-
|
|
25
|
+
"@agoric/access-token": "0.4.22-dev-3ce0599.0+3ce0599",
|
|
26
|
+
"@agoric/assert": "0.6.1-dev-3ce0599.0+3ce0599",
|
|
27
|
+
"@agoric/cache": "0.3.3-dev-3ce0599.0+3ce0599",
|
|
28
|
+
"@agoric/cosmic-swingset": "0.41.4-dev-3ce0599.0+3ce0599",
|
|
29
|
+
"@agoric/internal": "0.3.3-dev-3ce0599.0+3ce0599",
|
|
30
|
+
"@agoric/notifier": "0.6.3-dev-3ce0599.0+3ce0599",
|
|
31
|
+
"@agoric/spawner": "0.6.9-dev-3ce0599.0+3ce0599",
|
|
32
|
+
"@agoric/store": "0.9.3-dev-3ce0599.0+3ce0599",
|
|
33
|
+
"@agoric/swing-store": "0.9.2-dev-3ce0599.0+3ce0599",
|
|
34
|
+
"@agoric/swingset-vat": "0.32.3-dev-3ce0599.0+3ce0599",
|
|
35
|
+
"@agoric/telemetry": "0.6.3-dev-3ce0599.0+3ce0599",
|
|
36
|
+
"@agoric/time": "0.3.3-dev-3ce0599.0+3ce0599",
|
|
37
|
+
"@agoric/vats": "0.15.2-dev-3ce0599.0+3ce0599",
|
|
38
|
+
"@agoric/wallet": "0.18.4-dev-3ce0599.0+3ce0599",
|
|
39
39
|
"@endo/captp": "^3.1.2",
|
|
40
40
|
"@endo/eventual-send": "^0.17.3",
|
|
41
41
|
"@endo/import-bundle": "^0.3.5",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"ws": "^7.2.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
59
|
+
"@agoric/ertp": "0.16.3-dev-3ce0599.0+3ce0599",
|
|
60
60
|
"@endo/bundle-source": "^2.5.2",
|
|
61
61
|
"ava": "^5.3.0",
|
|
62
62
|
"c8": "^7.13.0"
|
|
@@ -71,8 +71,11 @@
|
|
|
71
71
|
"files": [
|
|
72
72
|
"test/**/test-*.js"
|
|
73
73
|
],
|
|
74
|
+
"require": [
|
|
75
|
+
"@endo/init/debug.js"
|
|
76
|
+
],
|
|
74
77
|
"timeout": "20m",
|
|
75
78
|
"workerThreads": false
|
|
76
79
|
},
|
|
77
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "3ce0599d5173b802598b5bedf57d3c30f016f789"
|
|
78
81
|
}
|
package/public/main.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* global setTimeout */
|
|
2
|
+
/* eslint @typescript-eslint/no-floating-promises: "warn" */
|
|
2
3
|
// NOTE: Runs outside SES
|
|
3
4
|
|
|
4
5
|
/* global WebSocket fetch document window walletFrame localStorage */
|
|
@@ -265,7 +266,7 @@ function run() {
|
|
|
265
266
|
commands[commands.length - 1] = inp.value;
|
|
266
267
|
commands[commands.length] = '';
|
|
267
268
|
inp.value = '';
|
|
268
|
-
call({ type: 'doEval', number, body: command });
|
|
269
|
+
void call({ type: 'doEval', number, body: command });
|
|
269
270
|
}
|
|
270
271
|
|
|
271
272
|
function inputKeyup(ev) {
|
package/src/captp.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
+
/* eslint @typescript-eslint/no-floating-promises: "warn" */
|
|
2
3
|
import { E, makeCapTP } from '@endo/captp';
|
|
3
4
|
import { Far } from '@endo/marshal';
|
|
4
5
|
|
|
@@ -42,7 +43,9 @@ export const getCapTPHandler = (send, getLocalBootstrap, fallback) => {
|
|
|
42
43
|
dispatch,
|
|
43
44
|
abort,
|
|
44
45
|
});
|
|
45
|
-
doFallback('onOpen', obj, meta)
|
|
46
|
+
doFallback('onOpen', obj, meta).catch(e => {
|
|
47
|
+
console.error(`Error in fallback onOpen`, e);
|
|
48
|
+
});
|
|
46
49
|
},
|
|
47
50
|
onClose(obj, meta) {
|
|
48
51
|
console.debug(`Finishing CapTP`, meta);
|
|
@@ -52,7 +55,9 @@ export const getCapTPHandler = (send, getLocalBootstrap, fallback) => {
|
|
|
52
55
|
abort();
|
|
53
56
|
}
|
|
54
57
|
chans.delete(meta.channelHandle);
|
|
55
|
-
doFallback('onClose', obj, meta)
|
|
58
|
+
doFallback('onClose', obj, meta).catch(e => {
|
|
59
|
+
console.error(`Error in fallback onClose`, e);
|
|
60
|
+
});
|
|
56
61
|
},
|
|
57
62
|
onError(obj, meta) {
|
|
58
63
|
console.debug(`Error in CapTP`, meta, obj.error);
|
|
@@ -61,7 +66,9 @@ export const getCapTPHandler = (send, getLocalBootstrap, fallback) => {
|
|
|
61
66
|
const { abort } = chan;
|
|
62
67
|
abort(obj.error);
|
|
63
68
|
}
|
|
64
|
-
doFallback('onError', obj, meta)
|
|
69
|
+
doFallback('onError', obj, meta).catch(e => {
|
|
70
|
+
console.error(`Error in fallback onError`, e);
|
|
71
|
+
});
|
|
65
72
|
},
|
|
66
73
|
async onMessage(obj, meta) {
|
|
67
74
|
console.debug('processing inbound', obj);
|
package/src/chain-cosmos-sdk.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* global clearTimeout setTimeout Buffer */
|
|
2
|
+
/* eslint @typescript-eslint/no-floating-promises: "warn" */
|
|
2
3
|
import path from 'path';
|
|
3
4
|
import fs from 'fs';
|
|
4
5
|
import url from 'url';
|
|
@@ -257,7 +258,7 @@ export async function connectToChain(
|
|
|
257
258
|
*/
|
|
258
259
|
const getMailboxNotifier = () => {
|
|
259
260
|
const { notifier, updater } = makeNotifierKit();
|
|
260
|
-
retryRpcHref(async rpcHref => {
|
|
261
|
+
void retryRpcHref(async rpcHref => {
|
|
261
262
|
// Every time we enter this function, we are establishing a
|
|
262
263
|
// new websocket to a potentially different RPC server.
|
|
263
264
|
//
|
|
@@ -485,7 +486,7 @@ export async function connectToChain(
|
|
|
485
486
|
|
|
486
487
|
waitForTxHash = subscribeAndWaitForTxHash;
|
|
487
488
|
if (postponedTxHash) {
|
|
488
|
-
subscribeAndWaitForTxHash(postponedTxHash);
|
|
489
|
+
void subscribeAndWaitForTxHash(postponedTxHash);
|
|
489
490
|
}
|
|
490
491
|
|
|
491
492
|
subscribeToStorage(`mailbox.${clientAddr}`, (err, storageValue) => {
|
|
@@ -691,15 +692,20 @@ ${chainID} chain does not yet know of address ${clientAddr}${adviseEgress(
|
|
|
691
692
|
// Wait for the transaction to be included in a block.
|
|
692
693
|
const txHash = out.txhash;
|
|
693
694
|
|
|
694
|
-
waitForTxHash(txHash)
|
|
695
|
-
|
|
696
|
-
|
|
695
|
+
waitForTxHash(txHash)
|
|
696
|
+
.then(txResult => {
|
|
697
|
+
// The result had an error code (not 0 or undefined for success).
|
|
698
|
+
if (txResult.code) {
|
|
699
|
+
// eslint-disable-next-line no-use-before-define
|
|
700
|
+
failedSend(
|
|
701
|
+
assert.error(`Error in tx processing: ${txResult.log}`),
|
|
702
|
+
);
|
|
703
|
+
}
|
|
704
|
+
})
|
|
705
|
+
.catch(err =>
|
|
697
706
|
// eslint-disable-next-line no-use-before-define
|
|
698
|
-
failedSend(
|
|
699
|
-
|
|
700
|
-
);
|
|
701
|
-
}
|
|
702
|
-
});
|
|
707
|
+
failedSend(assert.error(`Error in tx processing: ${err}`)),
|
|
708
|
+
);
|
|
703
709
|
|
|
704
710
|
// We submitted the transaction to the mempool successfully.
|
|
705
711
|
// Preemptively increment our sequence number to avoid needing to
|
|
@@ -777,7 +783,7 @@ ${chainID} chain does not yet know of address ${clientAddr}${adviseEgress(
|
|
|
777
783
|
updateCount || Fail`Sending unexpectedly finished!`;
|
|
778
784
|
|
|
779
785
|
await sendFromMessagePool().then(successfulSend, failedSend);
|
|
780
|
-
recurseEachSend(updateCount);
|
|
786
|
+
void recurseEachSend(updateCount);
|
|
781
787
|
};
|
|
782
788
|
|
|
783
789
|
// Begin the sender when we get the first (empty) mailbox update.
|
package/src/vat-http.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint @typescript-eslint/no-floating-promises: "warn" */
|
|
1
2
|
import { makeNotifierKit } from '@agoric/notifier';
|
|
2
3
|
import { makeCache } from '@agoric/cache';
|
|
3
4
|
import { E } from '@endo/eventual-send';
|
|
@@ -107,7 +108,7 @@ export function buildRootObject(vatPowers) {
|
|
|
107
108
|
commandDevice = d;
|
|
108
109
|
|
|
109
110
|
const replHandler = getReplHandler(replObjects, send);
|
|
110
|
-
registerURLHandler(replHandler, '/private/repl');
|
|
111
|
+
void registerURLHandler(replHandler, '/private/repl');
|
|
111
112
|
|
|
112
113
|
// Assign the captp handler.
|
|
113
114
|
const captpHandler = Far('captpHandler', {
|
|
@@ -126,7 +127,7 @@ export function buildRootObject(vatPowers) {
|
|
|
126
127
|
return harden(exported);
|
|
127
128
|
},
|
|
128
129
|
});
|
|
129
|
-
registerURLHandler(captpHandler, '/private/captp');
|
|
130
|
+
void registerURLHandler(captpHandler, '/private/captp');
|
|
130
131
|
},
|
|
131
132
|
|
|
132
133
|
registerURLHandler,
|
package/test/captp-fixture.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* global process setTimeout */
|
|
2
|
+
/* eslint @typescript-eslint/no-floating-promises: "warn" */
|
|
2
3
|
import { spawn } from 'child_process';
|
|
3
4
|
import WebSocket from 'ws';
|
|
4
5
|
import { makeCapTP, E } from '@endo/captp';
|
|
@@ -108,7 +109,7 @@ export async function makeFixture(PORT, noisy = false) {
|
|
|
108
109
|
// We only reject if the child exits before CapTP is established.
|
|
109
110
|
reject(Error(`CapTP fixture exited with ${code}`));
|
|
110
111
|
});
|
|
111
|
-
tryConnect(resolve, reject);
|
|
112
|
+
void tryConnect(resolve, reject);
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
115
|
|