@agoric/cosmic-swingset 0.41.4-dev-1b5e57f.0 → 0.41.4-dev-241c60a.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/export-kernel-db.js +2 -7
- package/src/import-kernel-db.js +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/cosmic-swingset",
|
|
3
|
-
"version": "0.41.4-dev-
|
|
3
|
+
"version": "0.41.4-dev-241c60a.0+241c60a",
|
|
4
4
|
"description": "Agoric's Cosmos blockchain integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"author": "Agoric",
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agoric/assert": "0.6.1-dev-
|
|
26
|
-
"@agoric/builders": "0.1.1-dev-
|
|
27
|
-
"@agoric/cosmos": "0.34.2-dev-
|
|
28
|
-
"@agoric/deploy-script-support": "0.10.4-dev-
|
|
29
|
-
"@agoric/internal": "0.3.3-dev-
|
|
30
|
-
"@agoric/store": "0.9.3-dev-
|
|
31
|
-
"@agoric/swing-store": "0.9.2-dev-
|
|
32
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
33
|
-
"@agoric/telemetry": "0.6.3-dev-
|
|
34
|
-
"@agoric/vm-config": "0.1.1-dev-
|
|
25
|
+
"@agoric/assert": "0.6.1-dev-241c60a.0+241c60a",
|
|
26
|
+
"@agoric/builders": "0.1.1-dev-241c60a.0+241c60a",
|
|
27
|
+
"@agoric/cosmos": "0.34.2-dev-241c60a.0+241c60a",
|
|
28
|
+
"@agoric/deploy-script-support": "0.10.4-dev-241c60a.0+241c60a",
|
|
29
|
+
"@agoric/internal": "0.3.3-dev-241c60a.0+241c60a",
|
|
30
|
+
"@agoric/store": "0.9.3-dev-241c60a.0+241c60a",
|
|
31
|
+
"@agoric/swing-store": "0.9.2-dev-241c60a.0+241c60a",
|
|
32
|
+
"@agoric/swingset-vat": "0.32.3-dev-241c60a.0+241c60a",
|
|
33
|
+
"@agoric/telemetry": "0.6.3-dev-241c60a.0+241c60a",
|
|
34
|
+
"@agoric/vm-config": "0.1.1-dev-241c60a.0+241c60a",
|
|
35
35
|
"@endo/bundle-source": "^2.7.0",
|
|
36
36
|
"@endo/far": "^0.2.21",
|
|
37
37
|
"@endo/import-bundle": "^0.4.1",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"typeCoverage": {
|
|
70
70
|
"atLeast": 79.4
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "241c60a3deb1ab4cbac43b44d11438a80bb0aba5"
|
|
73
73
|
}
|
package/src/export-kernel-db.js
CHANGED
|
@@ -14,7 +14,7 @@ import { makePromiseKit } from '@endo/promise-kit';
|
|
|
14
14
|
import { Fail, q } from '@agoric/assert';
|
|
15
15
|
import { makeAggregateError } from '@agoric/internal';
|
|
16
16
|
import { makeShutdown } from '@agoric/internal/src/node/shutdown.js';
|
|
17
|
-
import {
|
|
17
|
+
import { makeSwingStoreExporter } from '@agoric/swing-store';
|
|
18
18
|
|
|
19
19
|
import { isEntrypoint } from './helpers/is-entrypoint.js';
|
|
20
20
|
import { makeProcessValue } from './helpers/process-value.js';
|
|
@@ -144,7 +144,6 @@ export const validateExporterOptions = options => {
|
|
|
144
144
|
* @param {Pick<import('fs/promises'), 'open' | 'writeFile'>} powers.fs
|
|
145
145
|
* @param {import('path')['resolve']} powers.pathResolve
|
|
146
146
|
* @param {typeof import('@agoric/swing-store')['makeSwingStoreExporter']} [powers.makeSwingStoreExporter]
|
|
147
|
-
* @param {typeof import('@agoric/swing-store')['openSwingStore']} [powers.openSwingStore]
|
|
148
147
|
* @param {null | ((...args: any[]) => void)} [powers.log]
|
|
149
148
|
* @returns {StateSyncExporter}
|
|
150
149
|
*/
|
|
@@ -154,7 +153,6 @@ export const initiateSwingStoreExport = (
|
|
|
154
153
|
fs: { open, writeFile },
|
|
155
154
|
pathResolve,
|
|
156
155
|
makeSwingStoreExporter: makeExporter = makeSwingStoreExporter,
|
|
157
|
-
openSwingStore: openDB = openSwingStore,
|
|
158
156
|
log = console.log,
|
|
159
157
|
},
|
|
160
158
|
) => {
|
|
@@ -183,10 +181,7 @@ export const initiateSwingStoreExport = (
|
|
|
183
181
|
});
|
|
184
182
|
cleanup.push(async () => swingStoreExporter.close());
|
|
185
183
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
savedBlockHeight = Number(hostStorage.kvStore.get('host.height')) || 0;
|
|
189
|
-
await hostStorage.close();
|
|
184
|
+
savedBlockHeight = Number(swingStoreExporter.getHostKV('host.height')) || 0;
|
|
190
185
|
|
|
191
186
|
if (blockHeight) {
|
|
192
187
|
blockHeight === savedBlockHeight ||
|
package/src/import-kernel-db.js
CHANGED
|
@@ -145,6 +145,9 @@ export const performStateSyncImport = async (
|
|
|
145
145
|
// Represent the data in `exportDir` as a SwingSetExporter object.
|
|
146
146
|
/** @type {import('@agoric/swing-store').SwingStoreExporter} */
|
|
147
147
|
const exporter = harden({
|
|
148
|
+
getHostKV(_key) {
|
|
149
|
+
return undefined;
|
|
150
|
+
},
|
|
148
151
|
async *getExportData() {
|
|
149
152
|
log?.('importing export data');
|
|
150
153
|
const exportData = createReadStream(
|