@agoric/solo 0.10.4-dev-228f08b.0 → 0.10.4-dev-4054171.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/solo",
3
- "version": "0.10.4-dev-228f08b.0+228f08b",
3
+ "version": "0.10.4-dev-4054171.0+4054171",
4
4
  "description": "Agoric's Solo vat runner",
5
5
  "type": "module",
6
6
  "bin": {
@@ -22,19 +22,21 @@
22
22
  "author": "Agoric",
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@agoric/access-token": "0.4.22-dev-228f08b.0+228f08b",
26
- "@agoric/cache": "0.3.3-dev-228f08b.0+228f08b",
27
- "@agoric/cosmic-swingset": "0.41.4-dev-228f08b.0+228f08b",
28
- "@agoric/internal": "0.3.3-dev-228f08b.0+228f08b",
29
- "@agoric/notifier": "0.6.3-dev-228f08b.0+228f08b",
30
- "@agoric/spawner": "0.6.9-dev-228f08b.0+228f08b",
31
- "@agoric/store": "0.9.3-dev-228f08b.0+228f08b",
32
- "@agoric/swing-store": "0.9.2-dev-228f08b.0+228f08b",
33
- "@agoric/swingset-vat": "0.32.3-dev-228f08b.0+228f08b",
34
- "@agoric/telemetry": "0.6.3-dev-228f08b.0+228f08b",
35
- "@agoric/time": "0.3.3-dev-228f08b.0+228f08b",
36
- "@agoric/vats": "0.15.2-dev-228f08b.0+228f08b",
37
- "@agoric/wallet": "0.18.4-dev-228f08b.0+228f08b",
25
+ "@agoric/access-token": "0.4.22-dev-4054171.0+4054171",
26
+ "@agoric/cache": "0.3.3-dev-4054171.0+4054171",
27
+ "@agoric/cosmic-proto": "0.4.1-dev-4054171.0+4054171",
28
+ "@agoric/cosmic-swingset": "0.41.4-dev-4054171.0+4054171",
29
+ "@agoric/internal": "0.3.3-dev-4054171.0+4054171",
30
+ "@agoric/notifier": "0.6.3-dev-4054171.0+4054171",
31
+ "@agoric/spawner": "0.6.9-dev-4054171.0+4054171",
32
+ "@agoric/store": "0.9.3-dev-4054171.0+4054171",
33
+ "@agoric/swing-store": "0.9.2-dev-4054171.0+4054171",
34
+ "@agoric/swingset-vat": "0.32.3-dev-4054171.0+4054171",
35
+ "@agoric/telemetry": "0.6.3-dev-4054171.0+4054171",
36
+ "@agoric/time": "0.3.3-dev-4054171.0+4054171",
37
+ "@agoric/vats": "0.15.2-dev-4054171.0+4054171",
38
+ "@agoric/wallet": "0.18.4-dev-4054171.0+4054171",
39
+ "@endo/base64": "^1.0.9",
38
40
  "@endo/captp": "^4.4.5",
39
41
  "@endo/errors": "^1.2.10",
40
42
  "@endo/eventual-send": "^1.3.1",
@@ -55,7 +57,7 @@
55
57
  "ws": "^7.2.0"
56
58
  },
57
59
  "devDependencies": {
58
- "@agoric/ertp": "0.16.3-dev-228f08b.0+228f08b",
60
+ "@agoric/ertp": "0.16.3-dev-4054171.0+4054171",
59
61
  "@endo/bundle-source": "^4.0.0",
60
62
  "ava": "^5.3.0",
61
63
  "c8": "^10.1.2"
@@ -79,5 +81,5 @@
79
81
  "typeCoverage": {
80
82
  "atLeast": 74.02
81
83
  },
82
- "gitHead": "228f08bb97e0f237e67e0d98115713770f25926a"
84
+ "gitHead": "4054171a6a562a8bad1824b0151d103b8fe2f502"
83
85
  }
@@ -1,4 +1,4 @@
1
- /* global clearTimeout setTimeout Buffer */
1
+ /* global clearTimeout setTimeout */
2
2
  import path from 'path';
3
3
  import fs from 'fs';
4
4
  import url from 'url';
@@ -8,15 +8,22 @@ import { open as tempOpen } from 'temp';
8
8
  import WebSocket from 'ws';
9
9
 
10
10
  import anylogger from 'anylogger';
11
+ import { decodeBase64, encodeBase64 } from '@endo/base64';
11
12
  import { Fail, makeError } from '@endo/errors';
12
13
  import { makePromiseKit } from '@endo/promise-kit';
13
14
 
15
+ import {
16
+ QueryDataRequest,
17
+ QueryDataResponse,
18
+ } from '@agoric/cosmic-proto/vstorage/query.js';
19
+
14
20
  import { makeNotifierKit } from '@agoric/notifier';
15
21
  import {
16
22
  DEFAULT_BATCH_TIMEOUT_MS,
17
23
  makeBatchedDeliver,
18
24
  } from '@agoric/internal/src/batched-deliver.js';
19
25
  import { forever, whileTrue } from '@agoric/internal';
26
+ import { decodeHex, encodeHex } from '@agoric/internal/src/hex.js';
20
27
 
21
28
  const console = anylogger('chain-cosmos-sdk');
22
29
 
@@ -300,7 +307,8 @@ export async function connectToChain(
300
307
  const subscribeToTxHash = (txHash, cb) => {
301
308
  const txQuery = `tm.event = 'Tx' and tx.hash = '${txHash}'`;
302
309
 
303
- const b64Hash = Buffer.from(txHash, 'hex').toString('base64');
310
+ const bufHash = decodeHex(txHash);
311
+ const b64Hash = encodeBase64(bufHash);
304
312
  const txSubscriptionId = sendRPC('subscribe', { query: txQuery });
305
313
  const queryId = sendRPC('tx', { hash: b64Hash });
306
314
  const cleanup = () => {
@@ -353,7 +361,8 @@ export async function connectToChain(
353
361
  const blockSubscriptionId = sendRPC('subscribe', { query: blockQuery });
354
362
  const txSubscriptionId = sendRPC('subscribe', { query: txQuery });
355
363
  const queryId = sendRPC('abci_query', {
356
- path: `/custom/swingset/storage/${storagePath}`,
364
+ path: `/agoric.vstorage.Query/Data`,
365
+ data: encodeHex(QueryDataRequest.toProto({ path: storagePath })),
357
366
  });
358
367
 
359
368
  const cleanup = () => {
@@ -380,10 +389,8 @@ export async function connectToChain(
380
389
  // Decode the layers up to the actual storage value.
381
390
  const { value: b64JsonStorage, height: heightString } =
382
391
  obj.result.response;
383
- const jsonStorage = Buffer.from(b64JsonStorage, 'base64').toString(
384
- 'utf8',
385
- );
386
- const { value: storageValue } = JSON.parse(jsonStorage);
392
+ const buf = decodeBase64(b64JsonStorage);
393
+ const { value: storageValue } = QueryDataResponse.decode(buf);
387
394
  guardedCb(BigInt(heightString), storageValue);
388
395
  } else if (
389
396
  obj.result &&