@agoric/swingset-liveslots 0.10.3-ymax-v0.2-alpha-dev-8e37faa.0 → 0.11.0-upgrade-22-dev-6fad137.0.6fad137
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 +17 -17
- package/src/vatstore-usage.md +2 -1
- package/test/collections.test.js +25 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/swingset-liveslots",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0-upgrade-22-dev-6fad137.0.6fad137",
|
|
4
4
|
"description": "SwingSet ocap support layer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -19,22 +19,22 @@
|
|
|
19
19
|
"postpack": "git clean -f ':!src/types-index.d.ts' '*.d.ts*' '*.tsbuildinfo'"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@agoric/internal": "
|
|
23
|
-
"@agoric/store": "
|
|
24
|
-
"@endo/env-options": "^1.1.
|
|
25
|
-
"@endo/errors": "^1.2.
|
|
26
|
-
"@endo/eventual-send": "^1.3.
|
|
27
|
-
"@endo/exo": "^1.5.
|
|
28
|
-
"@endo/far": "^1.1.
|
|
29
|
-
"@endo/init": "^1.1.
|
|
30
|
-
"@endo/marshal": "^1.
|
|
31
|
-
"@endo/nat": "^5.1.
|
|
32
|
-
"@endo/pass-style": "^1.
|
|
33
|
-
"@endo/patterns": "^1.
|
|
34
|
-
"@endo/promise-kit": "^1.1.
|
|
22
|
+
"@agoric/internal": "0.4.0-upgrade-22-dev-6fad137.0.6fad137",
|
|
23
|
+
"@agoric/store": "0.10.0-upgrade-22-dev-6fad137.0.6fad137",
|
|
24
|
+
"@endo/env-options": "^1.1.11",
|
|
25
|
+
"@endo/errors": "^1.2.13",
|
|
26
|
+
"@endo/eventual-send": "^1.3.4",
|
|
27
|
+
"@endo/exo": "^1.5.12",
|
|
28
|
+
"@endo/far": "^1.1.14",
|
|
29
|
+
"@endo/init": "^1.1.12",
|
|
30
|
+
"@endo/marshal": "^1.8.0",
|
|
31
|
+
"@endo/nat": "^5.1.3",
|
|
32
|
+
"@endo/pass-style": "^1.6.3",
|
|
33
|
+
"@endo/patterns": "^1.7.0",
|
|
34
|
+
"@endo/promise-kit": "^1.1.13"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@agoric/kmarshal": "
|
|
37
|
+
"@agoric/kmarshal": "0.2.0-upgrade-22-dev-6fad137.0.6fad137",
|
|
38
38
|
"ava": "^5.3.0"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
68
|
"typeCoverage": {
|
|
69
|
-
"atLeast": 75.
|
|
69
|
+
"atLeast": 75.22
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "6fad137fde8808d0bed3e53e3897b3a8d2622b03"
|
|
72
72
|
}
|
package/src/vatstore-usage.md
CHANGED
|
@@ -103,12 +103,13 @@ The KindHandle is a durable virtual object of a special internal Kind. This is t
|
|
|
103
103
|
|
|
104
104
|
# Kind Metadata
|
|
105
105
|
|
|
106
|
-
For each virtual object kind that is defined, we store a metadata record for purposes of scanning directly through the defined kinds when a vat is stopped or upgraded. For durable kinds this record is stored in `vom.dkind.${kindID}`; for non-durable kinds it is stored in `vom.vkind.${kindID}`. Currently this metadata takes the form of a JSON-serialized record with the following properties:
|
|
106
|
+
For each virtual object kind that is defined, we store a metadata record for purposes of scanning directly through the defined kinds when a vat is stopped or upgraded. For durable kinds this record is stored in `vom.dkind.${kindID}.descriptor`; for non-durable kinds it is stored in `vom.vkind.${kindID}.descriptor`. Currently this metadata takes the form of a JSON-serialized record with the following properties:
|
|
107
107
|
* `kindID`, the kind ID as a numeric string (redundantly with the storage key)
|
|
108
108
|
* `tag`, the tag string as provided in the `defineKind` or `makeKindHandle` call
|
|
109
109
|
* `nextInstanceID`, an integer that is present only for durable kinds. It ensures that all versions share a single sequence of unique instance IDs. `nextInstanceID` is added to the metadata record upon allocation of the first instance of the kind and updated after each subsequent allocation.
|
|
110
110
|
* `unfaceted`, a property with boolean value `true` that is present only for single-facet durable kinds.
|
|
111
111
|
* `facets`, an array that is present only for multi-facet durable kinds. Its elements are the names of the kind's facets, in the same order as the assignment of facet indices within the cohort record.
|
|
112
|
+
* `stateShapeCapData`, a property with a `{ body, slots }` CapData record that decodes into `undefined`, or else into a CopyRecord [Pattern](https://www.npmjs.com/package/@endo/patterns) for constraining instance `state` records.
|
|
112
113
|
|
|
113
114
|
`unfaceted` and `facets` are required so that kind definitions in upgraded versions of the containing vat are maintained in a backwards compatible manner over time.
|
|
114
115
|
|
package/test/collections.test.js
CHANGED
|
@@ -326,7 +326,7 @@ test('constrain map key shape', t => {
|
|
|
326
326
|
t.throws(
|
|
327
327
|
() => noStrings.init('foo', 'string not ok?'),
|
|
328
328
|
m(
|
|
329
|
-
|
|
329
|
+
/^invalid key type for collection "map key no strings": "foo" - Must fail negated pattern: (.*)$/,
|
|
330
330
|
),
|
|
331
331
|
);
|
|
332
332
|
t.is(noStrings.get(47), 'number ok');
|
|
@@ -335,7 +335,14 @@ test('constrain map key shape', t => {
|
|
|
335
335
|
t.throws(
|
|
336
336
|
() => noStrings.get('foo'),
|
|
337
337
|
m(
|
|
338
|
-
|
|
338
|
+
// TODO https://github.com/Agoric/agoric-sdk/issues/11605
|
|
339
|
+
// This is a golden error message test. We're currently in transition
|
|
340
|
+
// from having pattern error messages quote nested patterns using
|
|
341
|
+
// `q` to quoting them using `qp`. In order to tolerate both during
|
|
342
|
+
// this transition at reasonable cost, this golden error message
|
|
343
|
+
// pattern accepts anything in the position of the quoted nested
|
|
344
|
+
// pattern.
|
|
345
|
+
/^invalid key type for collection "map key no strings": "foo" - Must fail negated pattern: (.*)$/,
|
|
339
346
|
),
|
|
340
347
|
);
|
|
341
348
|
|
|
@@ -397,7 +404,14 @@ test('constrain map value shape', t => {
|
|
|
397
404
|
t.throws(
|
|
398
405
|
() => noStrings.init('skey', 'string not ok?'),
|
|
399
406
|
m(
|
|
400
|
-
|
|
407
|
+
// TODO https://github.com/Agoric/agoric-sdk/issues/11605
|
|
408
|
+
// This is a golden error message test. We're currently in transition
|
|
409
|
+
// from having pattern error messages quote nested patterns using
|
|
410
|
+
// `q` to quoting them using `qp`. In order to tolerate both during
|
|
411
|
+
// this transition at reasonable cost, this golden error message
|
|
412
|
+
// pattern accepts anything in the position of the quoted nested
|
|
413
|
+
// pattern.
|
|
414
|
+
/^invalid value type for collection "map value no strings": "string not ok\?" - Must fail negated pattern: (.*)$/,
|
|
401
415
|
),
|
|
402
416
|
);
|
|
403
417
|
t.is(noStrings.get('nkey'), 47);
|
|
@@ -458,7 +472,14 @@ test('constrain set key shape', t => {
|
|
|
458
472
|
t.throws(
|
|
459
473
|
() => noStrings.add('foo?'),
|
|
460
474
|
m(
|
|
461
|
-
|
|
475
|
+
// TODO https://github.com/Agoric/agoric-sdk/issues/11605
|
|
476
|
+
// This is a golden error message test. We're currently in transition
|
|
477
|
+
// from having pattern error messages quote nested patterns using
|
|
478
|
+
// `q` to quoting them using `qp`. In order to tolerate both during
|
|
479
|
+
// this transition at reasonable cost, this golden error message
|
|
480
|
+
// pattern accepts anything in the position of the quoted nested
|
|
481
|
+
// pattern.
|
|
482
|
+
/^invalid key type for collection "no strings set": "foo\?" - Must fail negated pattern: (.*)$/,
|
|
462
483
|
),
|
|
463
484
|
);
|
|
464
485
|
t.truthy(noStrings.has(47));
|