@inversealtruism/cairnx-core 0.1.16 → 0.1.18
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/CONVENTION.md +281 -8
- package/dist/index.cjs +38 -50
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +38 -50
- package/package.json +1 -1
- package/test/vectors/VECTORS.md +16 -6
- package/test/vectors/cases.json +2031 -0
- package/test/vectors/replay-hashes.json +10 -3
package/test/vectors/VECTORS.md
CHANGED
|
@@ -3,13 +3,23 @@
|
|
|
3
3
|
**`cases.json`** — language-neutral replay vectors: `{name, events, tipHeight, expectedState}`.
|
|
4
4
|
A third-party resolver is conformant iff, for every case, replaying `events` (already
|
|
5
5
|
consensus-normalized: height/pos/proposer/attester/paidTo as the chain provides them) at
|
|
6
|
-
`tipHeight` produces a canonical state JSON-equal to `expectedState`.
|
|
7
|
-
|
|
6
|
+
`tipHeight` produces a canonical state JSON-equal to `expectedState`. This is the CI-enforced
|
|
7
|
+
bar (no live node needed): `test/vectors.test.ts` asserts JS==expectedState, and
|
|
8
|
+
`conformance/crosscheck-resolve.mjs` asserts JS==Python==expectedState. Coverage spans v1.0–v2.1
|
|
9
|
+
incl. nprofile, the V20 claim grace/late-fill, the V21 offer-cap, name ops, lapsed-premium reclaim,
|
|
10
|
+
and rejection paths. Regenerate the height-gated families from the SHIPPING resolver with the
|
|
11
|
+
generators in `conformance/`: `node conformance/gen-v18-vectors.mjs` (v1.8 name fee) and
|
|
12
|
+
`node conformance/gen-post-v18-vectors.mjs` (v1.9–v2.1) — each derives `expectedState` from the
|
|
13
|
+
built `dist/` and rewrites only its own `*-` prefixed cases. Run all: `npx tsx test/vectors.test.ts`.
|
|
8
14
|
|
|
9
|
-
**`replay-hashes.json`** — sha256 of the canonical state of the REAL chain at each activation
|
|
10
|
-
height (+ a dated tip, informational).
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
**`replay-hashes.json`** — sha256 of the canonical state of the **REAL chain** at each activation
|
|
16
|
+
height (+ a dated tip, informational). This file (csd-sdk copy) is the published/static anchor;
|
|
17
|
+
the operator-maintained copy with the current pin set lives in the `cairnx` repo
|
|
18
|
+
(`cairnx/test/vectors/replay-hashes.json`) and is what the real-chain co-sign verifies. The
|
|
19
|
+
real-chain tools require a live indexer (CI has none → they skip): in the `cairnx` repo run
|
|
20
|
+
`tsx scripts/conformance.mjs` to verify the resolver against the live chain (`--update` re-pins —
|
|
21
|
+
only legitimate after an intentional canonical-format change, documented below), and
|
|
22
|
+
`tsx scripts/conformance-crosslang.mjs` for the JS⇄Python⇄pinned-hash co-sign over real on-chain data.
|
|
13
23
|
|
|
14
24
|
| format | what changed |
|
|
15
25
|
|---|---|
|