@mikeargento/bitgraph 1.9.1 → 1.10.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/README.md +21 -21
- package/dist/fuse-cli.js +2 -2
- package/dist/fuse-cli.js.map +1 -1
- package/dist/fuse.d.ts +15 -1
- package/dist/fuse.d.ts.map +1 -1
- package/dist/fuse.js +29 -12
- package/dist/fuse.js.map +1 -1
- package/package.json +12 -8
- package/src/fuse-cli.ts +2 -2
- package/src/fuse.ts +46 -13
- package/dist/__tests__/audit-anchors.test.d.ts +0 -2
- package/dist/__tests__/audit-anchors.test.d.ts.map +0 -1
- package/dist/__tests__/audit-anchors.test.js +0 -152
- package/dist/__tests__/audit-anchors.test.js.map +0 -1
- package/dist/__tests__/audit-anomalies.test.d.ts +0 -2
- package/dist/__tests__/audit-anomalies.test.d.ts.map +0 -1
- package/dist/__tests__/audit-anomalies.test.js +0 -663
- package/dist/__tests__/audit-anomalies.test.js.map +0 -1
- package/dist/__tests__/audit-attestation.test.d.ts +0 -2
- package/dist/__tests__/audit-attestation.test.d.ts.map +0 -1
- package/dist/__tests__/audit-attestation.test.js +0 -403
- package/dist/__tests__/audit-attestation.test.js.map +0 -1
- package/dist/__tests__/audit-bench-smoke.test.d.ts +0 -2
- package/dist/__tests__/audit-bench-smoke.test.d.ts.map +0 -1
- package/dist/__tests__/audit-bench-smoke.test.js +0 -87
- package/dist/__tests__/audit-bench-smoke.test.js.map +0 -1
- package/dist/__tests__/audit-boundary.test.d.ts +0 -20
- package/dist/__tests__/audit-boundary.test.d.ts.map +0 -1
- package/dist/__tests__/audit-boundary.test.js +0 -84
- package/dist/__tests__/audit-boundary.test.js.map +0 -1
- package/dist/__tests__/audit-cli.test.d.ts +0 -2
- package/dist/__tests__/audit-cli.test.d.ts.map +0 -1
- package/dist/__tests__/audit-cli.test.js +0 -239
- package/dist/__tests__/audit-cli.test.js.map +0 -1
- package/dist/__tests__/audit-dependencies.test.d.ts +0 -2
- package/dist/__tests__/audit-dependencies.test.d.ts.map +0 -1
- package/dist/__tests__/audit-dependencies.test.js +0 -116
- package/dist/__tests__/audit-dependencies.test.js.map +0 -1
- package/dist/__tests__/audit-fixtures.d.ts +0 -265
- package/dist/__tests__/audit-fixtures.d.ts.map +0 -1
- package/dist/__tests__/audit-fixtures.js +0 -511
- package/dist/__tests__/audit-fixtures.js.map +0 -1
- package/dist/__tests__/audit-ingest.test.d.ts +0 -2
- package/dist/__tests__/audit-ingest.test.d.ts.map +0 -1
- package/dist/__tests__/audit-ingest.test.js +0 -473
- package/dist/__tests__/audit-ingest.test.js.map +0 -1
- package/dist/__tests__/audit-memory-ingest.test.d.ts +0 -12
- package/dist/__tests__/audit-memory-ingest.test.d.ts.map +0 -1
- package/dist/__tests__/audit-memory-ingest.test.js +0 -135
- package/dist/__tests__/audit-memory-ingest.test.js.map +0 -1
- package/dist/__tests__/audit-property.test.d.ts +0 -2
- package/dist/__tests__/audit-property.test.d.ts.map +0 -1
- package/dist/__tests__/audit-property.test.js +0 -771
- package/dist/__tests__/audit-property.test.js.map +0 -1
- package/dist/__tests__/audit-real-fixtures.test.d.ts +0 -2
- package/dist/__tests__/audit-real-fixtures.test.d.ts.map +0 -1
- package/dist/__tests__/audit-real-fixtures.test.js +0 -132
- package/dist/__tests__/audit-real-fixtures.test.js.map +0 -1
- package/dist/__tests__/audit-real-live.test.d.ts +0 -2
- package/dist/__tests__/audit-real-live.test.d.ts.map +0 -1
- package/dist/__tests__/audit-real-live.test.js +0 -107
- package/dist/__tests__/audit-real-live.test.js.map +0 -1
- package/dist/__tests__/audit-reconstruct.test.d.ts +0 -2
- package/dist/__tests__/audit-reconstruct.test.d.ts.map +0 -1
- package/dist/__tests__/audit-reconstruct.test.js +0 -287
- package/dist/__tests__/audit-reconstruct.test.js.map +0 -1
- package/dist/__tests__/audit-report.test.d.ts +0 -2
- package/dist/__tests__/audit-report.test.d.ts.map +0 -1
- package/dist/__tests__/audit-report.test.js +0 -186
- package/dist/__tests__/audit-report.test.js.map +0 -1
- package/dist/__tests__/audit-roundtrip.test.d.ts +0 -2
- package/dist/__tests__/audit-roundtrip.test.d.ts.map +0 -1
- package/dist/__tests__/audit-roundtrip.test.js +0 -368
- package/dist/__tests__/audit-roundtrip.test.js.map +0 -1
- package/dist/__tests__/audit-temporal.test.d.ts +0 -2
- package/dist/__tests__/audit-temporal.test.d.ts.map +0 -1
- package/dist/__tests__/audit-temporal.test.js +0 -364
- package/dist/__tests__/audit-temporal.test.js.map +0 -1
- package/dist/__tests__/audit-tiers.test.d.ts +0 -2
- package/dist/__tests__/audit-tiers.test.d.ts.map +0 -1
- package/dist/__tests__/audit-tiers.test.js +0 -282
- package/dist/__tests__/audit-tiers.test.js.map +0 -1
- package/dist/__tests__/audit-witness-real.test.d.ts +0 -19
- package/dist/__tests__/audit-witness-real.test.d.ts.map +0 -1
- package/dist/__tests__/audit-witness-real.test.js +0 -82
- package/dist/__tests__/audit-witness-real.test.js.map +0 -1
- package/dist/__tests__/audit-witness.test.d.ts +0 -2
- package/dist/__tests__/audit-witness.test.d.ts.map +0 -1
- package/dist/__tests__/audit-witness.test.js +0 -308
- package/dist/__tests__/audit-witness.test.js.map +0 -1
- package/dist/__tests__/canonical.test.d.ts +0 -2
- package/dist/__tests__/canonical.test.d.ts.map +0 -1
- package/dist/__tests__/canonical.test.js +0 -162
- package/dist/__tests__/canonical.test.js.map +0 -1
- package/dist/__tests__/chain-hash-anchor.test.d.ts +0 -22
- package/dist/__tests__/chain-hash-anchor.test.d.ts.map +0 -1
- package/dist/__tests__/chain-hash-anchor.test.js +0 -55
- package/dist/__tests__/chain-hash-anchor.test.js.map +0 -1
- package/dist/__tests__/commit-service.integration.test.d.ts +0 -2
- package/dist/__tests__/commit-service.integration.test.d.ts.map +0 -1
- package/dist/__tests__/commit-service.integration.test.js +0 -95
- package/dist/__tests__/commit-service.integration.test.js.map +0 -1
- package/dist/__tests__/constructor.test.d.ts +0 -2
- package/dist/__tests__/constructor.test.d.ts.map +0 -1
- package/dist/__tests__/constructor.test.js +0 -267
- package/dist/__tests__/constructor.test.js.map +0 -1
- package/dist/__tests__/declared-proof-fixture.d.ts +0 -66
- package/dist/__tests__/declared-proof-fixture.d.ts.map +0 -1
- package/dist/__tests__/declared-proof-fixture.js +0 -66
- package/dist/__tests__/declared-proof-fixture.js.map +0 -1
- package/dist/__tests__/fuse-inline.test.d.ts +0 -2
- package/dist/__tests__/fuse-inline.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-inline.test.js +0 -181
- package/dist/__tests__/fuse-inline.test.js.map +0 -1
- package/dist/__tests__/fuse-placement.test.d.ts +0 -2
- package/dist/__tests__/fuse-placement.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-placement.test.js +0 -31
- package/dist/__tests__/fuse-placement.test.js.map +0 -1
- package/dist/__tests__/fuse-roundtrip.test.d.ts +0 -2
- package/dist/__tests__/fuse-roundtrip.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-roundtrip.test.js +0 -241
- package/dist/__tests__/fuse-roundtrip.test.js.map +0 -1
- package/dist/__tests__/fuse-sdk.test.d.ts +0 -2
- package/dist/__tests__/fuse-sdk.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-sdk.test.js +0 -117
- package/dist/__tests__/fuse-sdk.test.js.map +0 -1
- package/dist/__tests__/fuse-set-sdk.test.d.ts +0 -2
- package/dist/__tests__/fuse-set-sdk.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-set-sdk.test.js +0 -721
- package/dist/__tests__/fuse-set-sdk.test.js.map +0 -1
- package/dist/__tests__/fuse-set.test.d.ts +0 -2
- package/dist/__tests__/fuse-set.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-set.test.js +0 -889
- package/dist/__tests__/fuse-set.test.js.map +0 -1
- package/dist/__tests__/fuse-set2.test.d.ts +0 -2
- package/dist/__tests__/fuse-set2.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-set2.test.js +0 -294
- package/dist/__tests__/fuse-set2.test.js.map +0 -1
- package/dist/__tests__/fuse-vectors.test.d.ts +0 -2
- package/dist/__tests__/fuse-vectors.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-vectors.test.js +0 -175
- package/dist/__tests__/fuse-vectors.test.js.map +0 -1
- package/dist/__tests__/fuse-verify.test.d.ts +0 -2
- package/dist/__tests__/fuse-verify.test.d.ts.map +0 -1
- package/dist/__tests__/fuse-verify.test.js +0 -250
- package/dist/__tests__/fuse-verify.test.js.map +0 -1
- package/dist/__tests__/hello-world.test.d.ts +0 -2
- package/dist/__tests__/hello-world.test.d.ts.map +0 -1
- package/dist/__tests__/hello-world.test.js +0 -9
- package/dist/__tests__/hello-world.test.js.map +0 -1
- package/dist/__tests__/mock-proof-fixture.d.ts +0 -15
- package/dist/__tests__/mock-proof-fixture.d.ts.map +0 -1
- package/dist/__tests__/mock-proof-fixture.js +0 -34
- package/dist/__tests__/mock-proof-fixture.js.map +0 -1
- package/dist/__tests__/policy-enforcement.test.d.ts +0 -2
- package/dist/__tests__/policy-enforcement.test.d.ts.map +0 -1
- package/dist/__tests__/policy-enforcement.test.js +0 -188
- package/dist/__tests__/policy-enforcement.test.js.map +0 -1
- package/dist/__tests__/proof-hash-regression.test.d.ts +0 -2
- package/dist/__tests__/proof-hash-regression.test.d.ts.map +0 -1
- package/dist/__tests__/proof-hash-regression.test.js +0 -95
- package/dist/__tests__/proof-hash-regression.test.js.map +0 -1
- package/dist/__tests__/proof-hash.test.d.ts +0 -2
- package/dist/__tests__/proof-hash.test.d.ts.map +0 -1
- package/dist/__tests__/proof-hash.test.js +0 -116
- package/dist/__tests__/proof-hash.test.js.map +0 -1
- package/dist/__tests__/proof-integrity.test.d.ts +0 -2
- package/dist/__tests__/proof-integrity.test.d.ts.map +0 -1
- package/dist/__tests__/proof-integrity.test.js +0 -454
- package/dist/__tests__/proof-integrity.test.js.map +0 -1
- package/dist/__tests__/realistic-proof-fixture.d.ts +0 -56
- package/dist/__tests__/realistic-proof-fixture.d.ts.map +0 -1
- package/dist/__tests__/realistic-proof-fixture.js +0 -57
- package/dist/__tests__/realistic-proof-fixture.js.map +0 -1
- package/dist/__tests__/run.test.d.ts +0 -2
- package/dist/__tests__/run.test.d.ts.map +0 -1
- package/dist/__tests__/run.test.js +0 -178
- package/dist/__tests__/run.test.js.map +0 -1
- package/dist/__tests__/verifier.test.d.ts +0 -2
- package/dist/__tests__/verifier.test.d.ts.map +0 -1
- package/dist/__tests__/verifier.test.js +0 -531
- package/dist/__tests__/verifier.test.js.map +0 -1
- package/dist/canonical.d.ts +0 -54
- package/dist/canonical.d.ts.map +0 -1
- package/dist/canonical.js +0 -119
- package/dist/canonical.js.map +0 -1
- package/dist/proof-hash.d.ts +0 -9
- package/dist/proof-hash.d.ts.map +0 -1
- package/dist/proof-hash.js +0 -75
- package/dist/proof-hash.js.map +0 -1
- package/dist/types.d.ts +0 -705
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
- package/dist/verifier.d.ts +0 -27
- package/dist/verifier.d.ts.map +0 -1
- package/dist/verifier.js +0 -844
- package/dist/verifier.js.map +0 -1
- package/src/__tests__/audit-anchors.test.ts +0 -188
- package/src/__tests__/audit-anomalies.test.ts +0 -815
- package/src/__tests__/audit-attestation.test.ts +0 -529
- package/src/__tests__/audit-bench-smoke.test.ts +0 -108
- package/src/__tests__/audit-boundary.test.ts +0 -96
- package/src/__tests__/audit-cli.test.ts +0 -288
- package/src/__tests__/audit-dependencies.test.ts +0 -141
- package/src/__tests__/audit-fixtures.ts +0 -736
- package/src/__tests__/audit-ingest.test.ts +0 -575
- package/src/__tests__/audit-memory-ingest.test.ts +0 -156
- package/src/__tests__/audit-property.test.ts +0 -892
- package/src/__tests__/audit-real-fixtures.test.ts +0 -153
- package/src/__tests__/audit-real-live.test.ts +0 -128
- package/src/__tests__/audit-reconstruct.test.ts +0 -353
- package/src/__tests__/audit-report.test.ts +0 -222
- package/src/__tests__/audit-roundtrip.test.ts +0 -464
- package/src/__tests__/audit-temporal.test.ts +0 -446
- package/src/__tests__/audit-tiers.test.ts +0 -343
- package/src/__tests__/audit-witness-real.test.ts +0 -92
- package/src/__tests__/audit-witness.test.ts +0 -345
- package/src/__tests__/canonical.test.ts +0 -253
- package/src/__tests__/chain-hash-anchor.test.ts +0 -67
- package/src/__tests__/commit-service.integration.test.ts +0 -117
- package/src/__tests__/constructor.test.ts +0 -340
- package/src/__tests__/declared-proof-fixture.ts +0 -65
- package/src/__tests__/fuse-inline.test.ts +0 -211
- package/src/__tests__/fuse-placement.test.ts +0 -32
- package/src/__tests__/fuse-roundtrip.test.ts +0 -243
- package/src/__tests__/fuse-sdk.test.ts +0 -142
- package/src/__tests__/fuse-set-sdk.test.ts +0 -852
- package/src/__tests__/fuse-set.test.ts +0 -1027
- package/src/__tests__/fuse-set2.test.ts +0 -343
- package/src/__tests__/fuse-vectors.test.ts +0 -218
- package/src/__tests__/fuse-verify.test.ts +0 -278
- package/src/__tests__/hello-world.test.ts +0 -10
- package/src/__tests__/mock-proof-fixture.ts +0 -36
- package/src/__tests__/policy-enforcement.test.ts +0 -226
- package/src/__tests__/proof-hash-regression.test.ts +0 -107
- package/src/__tests__/proof-hash.test.ts +0 -129
- package/src/__tests__/proof-integrity.test.ts +0 -576
- package/src/__tests__/real-fixtures/anchor-after-112762.json +0 -47
- package/src/__tests__/real-fixtures/anchor-with-ethereum-112758.json +0 -47
- package/src/__tests__/real-fixtures/live-proof-0.json +0 -42
- package/src/__tests__/real-fixtures/live-proof-1.json +0 -43
- package/src/__tests__/real-fixtures/live-proof-2.json +0 -43
- package/src/__tests__/real-fixtures/successor-112760.json +0 -38
- package/src/__tests__/real-fixtures/witness-25525146.json +0 -6
- package/src/__tests__/real-fixtures/witness-25525147.json +0 -6
- package/src/__tests__/realistic-proof-fixture.ts +0 -57
- package/src/__tests__/verifier.test.ts +0 -624
package/src/fuse-cli.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
import { readFile, writeFile, mkdir } from "node:fs/promises";
|
|
22
22
|
import { basename, extname, join, resolve } from "node:path";
|
|
23
23
|
import { sha256 } from "@noble/hashes/sha256";
|
|
24
|
-
import { parseFrame, verifyFuse, verifyFuseMember, bytesToBase64 } from "@mikeargento/bitgraph-verify";
|
|
24
|
+
import { parseFrame, verifyFuse, verifyFuseMember, bytesToBase64, isFuseMarkerName } from "@mikeargento/bitgraph-verify";
|
|
25
25
|
import type { BitGraphProof, PlacementId, FuseVerifyResult, FuseMemberResult } from "@mikeargento/bitgraph-verify";
|
|
26
26
|
import { fuse, fuseSet, builderFor, placementForBytes, fusedNamesFor, FuseError } from "./fuse.js";
|
|
27
27
|
import type { FuseTransport } from "./fuse.js";
|
|
@@ -219,7 +219,7 @@ async function runCheck(args: Args): Promise<number> {
|
|
|
219
219
|
const policy = typeof max === "string" ? { maxPositions: BigInt(max) } : {};
|
|
220
220
|
// A set proof and a file that is not its manifest: the member verifier answers.
|
|
221
221
|
const a = proof.attribution;
|
|
222
|
-
if (a?.name
|
|
222
|
+
if (isFuseMarkerName(a?.name) && a?.title === "set/1" && bytesToBase64(sha256(bytes)) !== proof.artifact.digestB64) {
|
|
223
223
|
const manifestArg = args.flags.get("manifest");
|
|
224
224
|
const manifest = typeof manifestArg === "string" ? new Uint8Array(await readFile(resolve(manifestArg))) : undefined;
|
|
225
225
|
const r = await verifyFuseMember({ proof, bytes, ...(manifest !== undefined ? { manifest } : {}), ...policy });
|
package/src/fuse.ts
CHANGED
|
@@ -51,6 +51,7 @@ import {
|
|
|
51
51
|
bytesToBase64,
|
|
52
52
|
bytesToHex,
|
|
53
53
|
computeSlotCommitment,
|
|
54
|
+
producerCommitment,
|
|
54
55
|
computeSlotRecordHash,
|
|
55
56
|
fuseAttribution,
|
|
56
57
|
getPlacement,
|
|
@@ -86,11 +87,22 @@ export async function digest(bytes: Uint8Array): Promise<Uint8Array> {
|
|
|
86
87
|
|
|
87
88
|
export type { FuseFrame, PlacementId, SlotAllocation, BitGraphProof, SetManifest, FuseMemberResult, FuseVerifyResult } from "@mikeargento/bitgraph-verify";
|
|
88
89
|
|
|
90
|
+
/** The floor anchor an enclave v9 allocation hands back: the one it signs at commit as commit.slotAnchor. */
|
|
91
|
+
export interface AnchorMark {
|
|
92
|
+
counter: string;
|
|
93
|
+
blockNumber: number;
|
|
94
|
+
blockHash: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
89
97
|
/** What the builder receives. The raw nonce is deliberately absent. */
|
|
90
98
|
export interface BuilderInput {
|
|
91
|
-
/** 32-byte commitment to the signed slot record. Write this into the artifact. */
|
|
99
|
+
/** 32-byte commitment to the signed slot record (bitgraph-fuse/2 also binds the floor block). Write this into the artifact. */
|
|
92
100
|
commitment: Uint8Array;
|
|
93
101
|
commitmentHex: string;
|
|
102
|
+
/** Which commitment this is: 2 when the boundary returned its floor anchor (enclave v9 and later), else 1. */
|
|
103
|
+
fuseVersion: 1 | 2;
|
|
104
|
+
/** The floor bound into a fuse/2 commitment, when there is one. */
|
|
105
|
+
floor?: AnchorMark;
|
|
94
106
|
/** The origin digest, when the fused artifact names a source. */
|
|
95
107
|
originDigest?: Uint8Array;
|
|
96
108
|
/** The signed slot record, for producers that want to embed its fields. Contains the nonce: do not copy it into the artifact. */
|
|
@@ -321,8 +333,21 @@ async function recover(
|
|
|
321
333
|
return null;
|
|
322
334
|
}
|
|
323
335
|
|
|
324
|
-
|
|
325
|
-
|
|
336
|
+
function isAnchorMark(x: unknown): x is AnchorMark {
|
|
337
|
+
if (x === null || typeof x !== "object" || Array.isArray(x)) return false;
|
|
338
|
+
const a = x as Record<string, unknown>;
|
|
339
|
+
return typeof a.counter === "string" && /^(0|[1-9][0-9]*)$/.test(a.counter)
|
|
340
|
+
&& typeof a.blockNumber === "number" && Number.isSafeInteger(a.blockNumber) && a.blockNumber >= 0
|
|
341
|
+
&& typeof a.blockHash === "string" && /^0x[0-9a-f]{64}$/.test(a.blockHash);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* 1. nonce. The signed slot record from the boundary; it must sit on the
|
|
346
|
+
* anchored chain. Since enclave v9 the response also carries the floor anchor
|
|
347
|
+
* the boundary will sign at commit; with it the producer makes a
|
|
348
|
+
* bitgraph-fuse/2 commitment, without it a fuse/1 one.
|
|
349
|
+
*/
|
|
350
|
+
async function allocateSlot(t: BoundTransport): Promise<{ slot: SlotAllocation; anchor: AnchorMark | null }> {
|
|
326
351
|
const alloc = await request(t, t.allocatePath, { method: "POST", body: {} });
|
|
327
352
|
if (alloc.status === 503 && codeOf(alloc.json) === "tee-restarting") throw new FuseError("tee-restarting", messageOf(alloc.json, "the boundary is restarting"), 503);
|
|
328
353
|
if (alloc.status !== 200) throw new FuseError("allocate-failed", messageOf(alloc.json, `allocation failed (${alloc.status})`), alloc.status);
|
|
@@ -330,7 +355,8 @@ async function allocateSlot(t: BoundTransport): Promise<SlotAllocation> {
|
|
|
330
355
|
const slot = (alloc.json as { slot?: unknown } | null)?.slot;
|
|
331
356
|
if (!isSlotRecord(slot) || slotId !== slot.nonceB64) throw new FuseError("allocate-failed", "the allocation response is not a slot record", alloc.status);
|
|
332
357
|
if (slot.chainId !== "bitgraph:main") throw new FuseError("allocate-failed", "the slot is not on the anchored chain; a fused floor needs bitgraph:main");
|
|
333
|
-
|
|
358
|
+
const anchorRaw = (alloc.json as { anchor?: unknown } | null)?.anchor;
|
|
359
|
+
return { slot, anchor: isAnchorMark(anchorRaw) ? anchorRaw : null };
|
|
334
360
|
}
|
|
335
361
|
|
|
336
362
|
/**
|
|
@@ -407,13 +433,13 @@ export async function fuse(builder: FuseBuilder, options: FuseOptions): Promise<
|
|
|
407
433
|
const originDigestB64 = originDigest !== undefined ? bytesToBase64(originDigest) : null;
|
|
408
434
|
|
|
409
435
|
// 1. nonce
|
|
410
|
-
const slot = await allocateSlot(t);
|
|
436
|
+
const { slot, anchor } = await allocateSlot(t);
|
|
411
437
|
|
|
412
438
|
// 2. fuse
|
|
413
|
-
const commitment =
|
|
439
|
+
const { commitment, version } = producerCommitment(slot, anchor);
|
|
414
440
|
let fused: Uint8Array;
|
|
415
441
|
try {
|
|
416
|
-
fused = await builder({ commitment, commitmentHex: bytesToHex(commitment), ...(originDigest !== undefined ? { originDigest } : {}), slot });
|
|
442
|
+
fused = await builder({ commitment, commitmentHex: bytesToHex(commitment), fuseVersion: version, ...(anchor !== null ? { floor: anchor } : {}), ...(originDigest !== undefined ? { originDigest } : {}), slot });
|
|
417
443
|
} catch (err) {
|
|
418
444
|
throw new FuseError("builder-failed", `the builder threw: ${err instanceof Error ? err.message : String(err)}`);
|
|
419
445
|
}
|
|
@@ -425,13 +451,15 @@ export async function fuse(builder: FuseBuilder, options: FuseOptions): Promise<
|
|
|
425
451
|
const artifactDigestB64 = bytesToBase64(artifactDigest);
|
|
426
452
|
|
|
427
453
|
// 4. fill
|
|
428
|
-
const attribution = fuseAttribution(placement.id, originDigest);
|
|
454
|
+
const attribution = fuseAttribution(placement.id, originDigest, version);
|
|
429
455
|
const body: Record<string, unknown> = {
|
|
430
456
|
digests: [{ digestB64: artifactDigestB64, hashAlg: "sha256" }],
|
|
431
457
|
slotId: slot.nonceB64,
|
|
432
458
|
slot,
|
|
433
459
|
chainId: "bitgraph:main",
|
|
434
460
|
attribution,
|
|
461
|
+
// fuse/2: the boundary checks the bound floor against its ledger before spending the slot.
|
|
462
|
+
...(version === 2 ? { anchor } : {}),
|
|
435
463
|
};
|
|
436
464
|
if (options.agency !== undefined) body.agency = options.agency;
|
|
437
465
|
const { proof, recovered } = await commitUnderSlot(t, body, artifactDigestB64, slot);
|
|
@@ -482,6 +510,10 @@ export type SetMemberPlacement = "trailer/1" | "container/1" | "container/2";
|
|
|
482
510
|
|
|
483
511
|
/** What a hashed member's fused digest is computed for: the held slot and its commitment. */
|
|
484
512
|
export interface FusedDigestInput {
|
|
513
|
+
/** Which commitment this is: 2 when the boundary returned its floor anchor, else 1. */
|
|
514
|
+
fuseVersion: 1 | 2;
|
|
515
|
+
/** The floor bound into a fuse/2 commitment, when there is one. */
|
|
516
|
+
floor?: AnchorMark;
|
|
485
517
|
commitment: Uint8Array;
|
|
486
518
|
commitmentHex: string;
|
|
487
519
|
slot: SlotAllocation;
|
|
@@ -721,7 +753,7 @@ export async function fuseSet(members: readonly FuseSetMember[], options: FuseSe
|
|
|
721
753
|
const t: BoundTransport = { ...DEFAULTS, ...(options.transport ?? {}) };
|
|
722
754
|
|
|
723
755
|
// 1. nonce: one slot for the whole set
|
|
724
|
-
const slot = await allocateSlot(t);
|
|
756
|
+
const { slot, anchor } = await allocateSlot(t);
|
|
725
757
|
|
|
726
758
|
// 2. fuse: the commitment once, every member's digest under it. The slot
|
|
727
759
|
// is held and its TTL is running; a throw here burns it but commits
|
|
@@ -729,7 +761,7 @@ export async function fuseSet(members: readonly FuseSetMember[], options: FuseSe
|
|
|
729
761
|
// and released in turn, so memory holds one member's bytes at a time.
|
|
730
762
|
// They are held only for a caller who keeps them or asks the full
|
|
731
763
|
// verifier to read them.
|
|
732
|
-
const commitment =
|
|
764
|
+
const { commitment, version } = producerCommitment(slot, anchor);
|
|
733
765
|
const commitmentHex = bytesToHex(commitment);
|
|
734
766
|
const fusedBytes: (Uint8Array | null)[] = [];
|
|
735
767
|
const rows: SetMember[] = [];
|
|
@@ -741,7 +773,7 @@ export async function fuseSet(members: readonly FuseSetMember[], options: FuseSe
|
|
|
741
773
|
if (c.kind === "hashed") {
|
|
742
774
|
let d: unknown;
|
|
743
775
|
try {
|
|
744
|
-
d = await c.fusedDigest!({ commitment, commitmentHex, slot });
|
|
776
|
+
d = await c.fusedDigest!({ commitment, commitmentHex, fuseVersion: version, ...(anchor !== null ? { floor: anchor } : {}), slot });
|
|
745
777
|
} catch (err) {
|
|
746
778
|
throw new FuseError("builder-failed", `member ${i}: fusedDigest threw: ${err instanceof Error ? err.message : String(err)}; ${expiring}`, null, i);
|
|
747
779
|
}
|
|
@@ -766,7 +798,7 @@ export async function fuseSet(members: readonly FuseSetMember[], options: FuseSe
|
|
|
766
798
|
const builder = c.builder ?? builderFor(c.id, original);
|
|
767
799
|
let fused: Uint8Array;
|
|
768
800
|
try {
|
|
769
|
-
fused = await builder({ commitment, commitmentHex, originDigest: c.originDigest, slot });
|
|
801
|
+
fused = await builder({ commitment, commitmentHex, fuseVersion: version, ...(anchor !== null ? { floor: anchor } : {}), originDigest: c.originDigest, slot });
|
|
770
802
|
} catch (err) {
|
|
771
803
|
throw new FuseError("builder-failed", `member ${i}: the builder threw: ${err instanceof Error ? err.message : String(err)}`, null, i);
|
|
772
804
|
}
|
|
@@ -817,8 +849,9 @@ export async function fuseSet(members: readonly FuseSetMember[], options: FuseSe
|
|
|
817
849
|
slotId: slot.nonceB64,
|
|
818
850
|
slot,
|
|
819
851
|
chainId: "bitgraph:main",
|
|
820
|
-
attribution: fuseAttribution(setKind === "set/1" ? SET_PLACEMENT_ID_LOCAL : SET2_PLACEMENT_ID),
|
|
852
|
+
attribution: fuseAttribution(setKind === "set/1" ? SET_PLACEMENT_ID_LOCAL : SET2_PLACEMENT_ID, undefined, version),
|
|
821
853
|
metadata: { [SET_METADATA_KEY]: manifest },
|
|
854
|
+
...(version === 2 ? { anchor } : {}),
|
|
822
855
|
};
|
|
823
856
|
if (options.agency !== undefined) body.agency = options.agency;
|
|
824
857
|
report("commit", 0, 1);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"audit-anchors.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/audit-anchors.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Argento Computing Inc. All rights reserved. See LICENSE.
|
|
2
|
-
/**
|
|
3
|
-
* Anchor identification tests (G5): the SIGNED attribution.name is the
|
|
4
|
-
* discriminator; unsigned metadata.type is corroboration only, recorded
|
|
5
|
-
* but never trusted; the block number comes only from the signed
|
|
6
|
-
* Etherscan URL; no wall-clock time is ever derived from anything here.
|
|
7
|
-
*/
|
|
8
|
-
import { describe, it } from "node:test";
|
|
9
|
-
import * as assert from "node:assert/strict";
|
|
10
|
-
import { identifyAnchors, ingestBundle, verifyObservedProofs, } from "@mikeargento/bitgraph-audit";
|
|
11
|
-
import { makeAnchorProof, makeChainIdProof, makeTempDir, proofJson, writeBundleDir, } from "./audit-fixtures.js";
|
|
12
|
-
const BLOCK_HASH = "0x28ed3639cd705fb8cb2b915c1991e9f808b40e775bc8eb540702942729fec2c0";
|
|
13
|
-
async function ingestAndVerify(files) {
|
|
14
|
-
const dir = await makeTempDir("bg-audit-anchors-");
|
|
15
|
-
await writeBundleDir(dir, files);
|
|
16
|
-
const ingest = await ingestBundle(dir);
|
|
17
|
-
await verifyObservedProofs(ingest);
|
|
18
|
-
return ingest;
|
|
19
|
-
}
|
|
20
|
-
describe("audit anchors: identification by signed attribution", () => {
|
|
21
|
-
it("identifies an anchor by attribution.name and extracts the signed facts", async () => {
|
|
22
|
-
const anchor = await makeAnchorProof({
|
|
23
|
-
blockHash: BLOCK_HASH,
|
|
24
|
-
blockNumber: "24800448",
|
|
25
|
-
epochId: "EPOCH-A",
|
|
26
|
-
counter: "4",
|
|
27
|
-
slotCounter: "3",
|
|
28
|
-
chainId: "bitgraph:main",
|
|
29
|
-
metadata: {
|
|
30
|
-
type: "ethereum-anchor",
|
|
31
|
-
anchor: { blockNumber: 24800448, blockHash: BLOCK_HASH, blockTime: 1750000000 },
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
const user = await makeChainIdProof({ chainId: "bitgraph:main", counter: "6", epochId: "EPOCH-A" });
|
|
35
|
-
const ingest = await ingestAndVerify({
|
|
36
|
-
"proofs/anchor.json": proofJson(anchor.proof),
|
|
37
|
-
"proofs/user.json": proofJson(user.proof),
|
|
38
|
-
});
|
|
39
|
-
const result = identifyAnchors(ingest);
|
|
40
|
-
assert.equal(result.anchors.length, 1);
|
|
41
|
-
const record = result.anchors[0];
|
|
42
|
-
assert.equal(record.proofHash, anchor.proofHash);
|
|
43
|
-
assert.equal(record.epochId, "EPOCH-A");
|
|
44
|
-
assert.equal(record.chainId, "bitgraph:main");
|
|
45
|
-
assert.equal(record.counter, "4");
|
|
46
|
-
assert.equal(record.slotCounter, "3");
|
|
47
|
-
assert.equal(record.blockHash, BLOCK_HASH);
|
|
48
|
-
assert.equal(record.blockNumber, "24800448");
|
|
49
|
-
assert.equal(record.metadataCorroboration, "agrees");
|
|
50
|
-
// The unsigned metadata carries a blockTime; no time field of any kind
|
|
51
|
-
// may appear on the record.
|
|
52
|
-
assert.ok(!("timestamp" in record));
|
|
53
|
-
assert.ok(!("blockTime" in record));
|
|
54
|
-
assert.equal(result.findings.length, 0);
|
|
55
|
-
});
|
|
56
|
-
it("copies the run verification status onto the record", async () => {
|
|
57
|
-
const good = await makeAnchorProof({ blockHash: BLOCK_HASH, blockNumber: "1", epochId: "E", counter: "2" });
|
|
58
|
-
const bad = await makeAnchorProof({ blockHash: BLOCK_HASH.replace("28", "29"), blockNumber: "2", epochId: "E", counter: "4" });
|
|
59
|
-
// Tamper the signature after signing: identification still works (it
|
|
60
|
-
// reads the signed body fields), and the failed status is copied.
|
|
61
|
-
bad.proof.signer.signatureB64 = `AA${bad.proof.signer.signatureB64.slice(2)}`;
|
|
62
|
-
const ingest = await ingestAndVerify({
|
|
63
|
-
"proofs/good.json": proofJson(good.proof),
|
|
64
|
-
"proofs/bad.json": proofJson(bad.proof),
|
|
65
|
-
});
|
|
66
|
-
const result = identifyAnchors(ingest);
|
|
67
|
-
assert.equal(result.anchors.length, 2);
|
|
68
|
-
const goodRecord = result.anchors.find((a) => a.proofHash === good.proofHash);
|
|
69
|
-
assert.equal(goodRecord.verificationTier, "integrity");
|
|
70
|
-
assert.equal(goodRecord.verificationStatus, "artifact-unavailable");
|
|
71
|
-
const badRecord = result.anchors.find((a) => a.proofHash !== good.proofHash);
|
|
72
|
-
assert.equal(badRecord.verificationStatus, "failed");
|
|
73
|
-
assert.ok(badRecord.verificationReason !== undefined);
|
|
74
|
-
});
|
|
75
|
-
it("never identifies an anchor from unsigned metadata alone", async () => {
|
|
76
|
-
const user = await makeChainIdProof({ counter: "2", epochId: "E-META" });
|
|
77
|
-
user.proof["metadata"] = { type: "ethereum-anchor" };
|
|
78
|
-
const ingest = await ingestAndVerify({ "proofs/claimant.json": proofJson(user.proof) });
|
|
79
|
-
const result = identifyAnchors(ingest);
|
|
80
|
-
assert.equal(result.anchors.length, 0);
|
|
81
|
-
assert.equal(result.metadataOnlyProofHashes.length, 1);
|
|
82
|
-
const finding = result.findings.find((f) => f.code === "anchor-metadata-only-claim");
|
|
83
|
-
assert.ok(finding !== undefined);
|
|
84
|
-
assert.match(finding.message, /not treated as an anchor/);
|
|
85
|
-
});
|
|
86
|
-
it("records disagreement between the signed attribution and unsigned metadata", async () => {
|
|
87
|
-
const anchor = await makeAnchorProof({
|
|
88
|
-
blockHash: BLOCK_HASH,
|
|
89
|
-
blockNumber: "7",
|
|
90
|
-
epochId: "E-DIS",
|
|
91
|
-
counter: "2",
|
|
92
|
-
metadata: { type: "something-else" },
|
|
93
|
-
});
|
|
94
|
-
const ingest = await ingestAndVerify({ "proofs/anchor.json": proofJson(anchor.proof) });
|
|
95
|
-
const result = identifyAnchors(ingest);
|
|
96
|
-
assert.equal(result.anchors.length, 1, "the signed field governs: still an anchor");
|
|
97
|
-
assert.equal(result.anchors[0].metadataCorroboration, "disagrees");
|
|
98
|
-
assert.ok(result.findings.some((f) => f.code === "anchor-metadata-disagreement"));
|
|
99
|
-
});
|
|
100
|
-
it("treats absent metadata as absent corroboration, not disagreement", async () => {
|
|
101
|
-
const anchor = await makeAnchorProof({ blockHash: BLOCK_HASH, blockNumber: "9", epochId: "E-ABS", counter: "2" });
|
|
102
|
-
const ingest = await ingestAndVerify({ "proofs/anchor.json": proofJson(anchor.proof) });
|
|
103
|
-
const result = identifyAnchors(ingest);
|
|
104
|
-
assert.equal(result.anchors[0].metadataCorroboration, "absent");
|
|
105
|
-
assert.equal(result.findings.filter((f) => f.code === "anchor-metadata-disagreement").length, 0);
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
describe("audit anchors: block number from the signed title URL", () => {
|
|
109
|
-
it("parses the number only from a strict Etherscan block URL", async () => {
|
|
110
|
-
const good = await makeAnchorProof({ blockHash: BLOCK_HASH, blockNumber: "24800448", epochId: "E-URL", counter: "2" });
|
|
111
|
-
const foreign = await makeAnchorProof({
|
|
112
|
-
blockHash: BLOCK_HASH.replace("28", "30"),
|
|
113
|
-
title: "https://example.com/block/99",
|
|
114
|
-
epochId: "E-URL",
|
|
115
|
-
counter: "4",
|
|
116
|
-
});
|
|
117
|
-
const missing = await makeAnchorProof({
|
|
118
|
-
blockHash: BLOCK_HASH.replace("28", "31"),
|
|
119
|
-
noTitle: true,
|
|
120
|
-
epochId: "E-URL",
|
|
121
|
-
counter: "6",
|
|
122
|
-
});
|
|
123
|
-
const ingest = await ingestAndVerify({
|
|
124
|
-
"proofs/good.json": proofJson(good.proof),
|
|
125
|
-
"proofs/foreign.json": proofJson(foreign.proof),
|
|
126
|
-
"proofs/missing.json": proofJson(missing.proof),
|
|
127
|
-
});
|
|
128
|
-
const result = identifyAnchors(ingest);
|
|
129
|
-
const byHash = new Map(result.anchors.map((a) => [a.proofHash, a]));
|
|
130
|
-
assert.equal(byHash.get(good.proofHash).blockNumber, "24800448");
|
|
131
|
-
assert.equal(byHash.get(foreign.proofHash).blockNumber, undefined);
|
|
132
|
-
assert.equal(byHash.get(missing.proofHash).blockNumber, undefined);
|
|
133
|
-
assert.equal(result.findings.filter((f) => f.code === "anchor-title-unparseable").length, 2);
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
describe("audit anchors: non-anchor proofs are untouched", () => {
|
|
137
|
-
it("produces no records or findings for ordinary proofs and mutates nothing", async () => {
|
|
138
|
-
const a = await makeChainIdProof({ counter: "2", epochId: "E-PLAIN" });
|
|
139
|
-
const b = await makeChainIdProof({ counter: "4", epochId: "E-PLAIN" });
|
|
140
|
-
const ingest = await ingestAndVerify({
|
|
141
|
-
"proofs/a.json": proofJson(a.proof),
|
|
142
|
-
"proofs/b.json": proofJson(b.proof),
|
|
143
|
-
});
|
|
144
|
-
const statusesBefore = ingest.proofs.map((p) => p.verification?.status);
|
|
145
|
-
const result = identifyAnchors(ingest);
|
|
146
|
-
assert.equal(result.anchors.length, 0);
|
|
147
|
-
assert.equal(result.metadataOnlyProofHashes.length, 0);
|
|
148
|
-
assert.equal(result.findings.length, 0);
|
|
149
|
-
assert.deepEqual(ingest.proofs.map((p) => p.verification?.status), statusesBefore, "identification is read-only");
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
//# sourceMappingURL=audit-anchors.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"audit-anchors.test.js","sourceRoot":"","sources":["../../src/__tests__/audit-anchors.test.ts"],"names":[],"mappings":"AAAA,yEAAyE;AAEzE;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EACL,eAAe,EACf,YAAY,EACZ,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,cAAc,GACf,MAAM,qBAAqB,CAAC;AAE7B,MAAM,UAAU,GAAG,oEAAoE,CAAC;AAExF,KAAK,UAAU,eAAe,CAAC,KAA0C;IACvE,MAAM,GAAG,GAAG,MAAM,WAAW,CAAC,mBAAmB,CAAC,CAAC;IACnD,MAAM,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACjC,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,GAAG,CAAC,CAAC;IACvC,MAAM,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACnC,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,QAAQ,CAAC,qDAAqD,EAAE,GAAG,EAAE;IACnE,EAAE,CAAC,wEAAwE,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