@mikeargento/bitgraph-verify 1.16.0 → 1.17.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 +24 -3
- package/dist/__tests__/carrier2.test.js +1 -1
- package/dist/__tests__/carrier2.test.js.map +1 -1
- package/dist/carrier-assemble.d.ts +12 -2
- package/dist/carrier-assemble.d.ts.map +1 -1
- package/dist/carrier-assemble.js +14 -3
- package/dist/carrier-assemble.js.map +1 -1
- package/dist/carrier-verify.d.ts +5 -2
- package/dist/carrier-verify.d.ts.map +1 -1
- package/dist/carrier-verify.js +110 -43
- package/dist/carrier-verify.js.map +1 -1
- package/dist/carrier.d.ts +44 -11
- package/dist/carrier.d.ts.map +1 -1
- package/dist/carrier.js +74 -16
- package/dist/carrier.js.map +1 -1
- package/dist/ceiling.d.ts +82 -3
- package/dist/ceiling.d.ts.map +1 -1
- package/dist/ceiling.js +137 -20
- package/dist/ceiling.js.map +1 -1
- package/dist/export.d.ts +10 -0
- package/dist/export.d.ts.map +1 -1
- package/dist/export.js +89 -30
- package/dist/export.js.map +1 -1
- package/dist/fuse.d.ts +43 -11
- package/dist/fuse.d.ts.map +1 -1
- package/dist/fuse.js +85 -18
- package/dist/fuse.js.map +1 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/measurements.d.ts.map +1 -1
- package/dist/measurements.js +1 -0
- package/dist/measurements.js.map +1 -1
- package/dist/tree.d.ts +15 -3
- package/dist/tree.d.ts.map +1 -1
- package/dist/tree.js +41 -12
- package/dist/tree.js.map +1 -1
- package/dist/types.d.ts +21 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/carrier2.test.ts +1 -1
- package/src/carrier-assemble.ts +21 -3
- package/src/carrier-verify.ts +107 -45
- package/src/carrier.ts +91 -25
- package/src/ceiling.ts +150 -24
- package/src/export.ts +94 -31
- package/src/fuse.ts +114 -23
- package/src/index.ts +18 -2
- package/src/measurements.ts +1 -0
- package/src/tree.ts +42 -10
- package/src/types.ts +22 -0
package/README.md
CHANGED
|
@@ -6,6 +6,27 @@ The records these proofs are about are often AI audit records: a trust record, a
|
|
|
6
6
|
|
|
7
7
|
Verification of BitGraph proofs is permissionless by design. This package is MIT-licensed so that anyone, including parties adverse to the proof's issuer, can verify a proof without asking permission, online or offline, forever.
|
|
8
8
|
|
|
9
|
+
```bash
|
|
10
|
+
npm install @mikeargento/bitgraph-verify
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
A BitGraph made today is a tree/1 position: one Merkle tree of files under one proof, one file a tree of one. Its holder keeps an **export** (bitgraph-export/1) beside the files, with `SPEC.md`, the exact text the proof pins. `verifyExport` checks an export with the file it is about and answers one claim per line, each saying what it rests on:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { verifyExport, parseExport } from "@mikeargento/bitgraph-verify";
|
|
17
|
+
|
|
18
|
+
const result = await verifyExport(exportJson, { bytes }); // or { source } to stream a file of any size
|
|
19
|
+
result.verdict; // TRUE, FALSE or UNDETERMINED
|
|
20
|
+
result.claims; // proof, attestation, spec pin, tree root, this file's leaf, floor, Base ceiling, Ethereum settlement
|
|
21
|
+
result.times; // floor, ceilingBase, ceilingEthereum: three time claims, never merged
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The three time claims are kept apart. The floor is in time: the committed bytes were finished after floor block N, the Base block signed into the proof as `commit.slotFloor` (an Ethereum block, `commit.slotAnchor`, on proofs made before the switch). The ceiling on Base is in time: the record existed by Base block B, provisional until B is confirmed as Base's own. Settlement is Ethereum's record of that Base block through Base's output root (`bitgraph-output-root/1`). A pending section reads NOT_CARRIED, never FALSE. A part in a format this version does not know is UNDETERMINED. The spec hash a proof pins must be one this verifier knows: `KNOWN_TREE_SPEC_HASHES` holds SPEC.md version 1, `QazdIR0JYtHQwQuIISo7bvH1gxUvTS2cY+tW6BjUIRs=`, frozen 2026-10-04 and never changed; a later version is added beside it.
|
|
25
|
+
|
|
26
|
+
`verifyTreeMember` checks one leaf and path against a tree/1 proof. `verifyCarrier` judges a BitGraphed file (carrier/2), the single-file form that carries its own proof. `verifyCeiling` checks a ceiling in time, `verifyOutputRootSettlement` its settlement, `verifyNitroAttestation` the attestation to the AWS Nitro root. `PUBLISHED_PCR0S` is the default measurement policy: a proof from any other enclave image is not a BitGraph.
|
|
27
|
+
|
|
28
|
+
A bare bitgraph/1 proof is checked against its bytes with `verify`:
|
|
29
|
+
|
|
9
30
|
```ts
|
|
10
31
|
import { verify } from "@mikeargento/bitgraph-verify";
|
|
11
32
|
|
|
@@ -31,11 +52,11 @@ const context = createVerificationContext();
|
|
|
31
52
|
await verify({ proof, bytes, context });
|
|
32
53
|
```
|
|
33
54
|
|
|
34
|
-
The proof schema (`bitgraph/1`), canonical serialization, and proofHash computation live here as well, so independent implementations can be checked against this one.
|
|
55
|
+
The proof schema (`bitgraph/1`), canonical serialization, and proofHash computation live here as well, so independent implementations can be checked against this one. The normative text is `spec/SPEC.md` in the repository; earlier formats (plain recordings, single fused files, set/1, set/2, carrier/1) keep verifying.
|
|
35
56
|
|
|
36
|
-
See [bitgraph.ing/docs/verification](https://bitgraph.ing/docs/verification) for the verification checklist and attestation handling.
|
|
57
|
+
See [bitgraph.ing/docs/verification](https://bitgraph.ing/docs/verification) for the verification checklist and attestation handling, and [CHANGELOG.md](./CHANGELOG.md) for what 1.16.0 added.
|
|
37
58
|
|
|
38
|
-
|
|
59
|
+
Making a BitGraph is separate and proprietary: [`@mikeargento/bitgraph-sdk`](https://www.npmjs.com/package/@mikeargento/bitgraph-sdk) for software, built on [`@mikeargento/bitgraph`](https://www.npmjs.com/package/@mikeargento/bitgraph).
|
|
39
60
|
|
|
40
61
|
## License
|
|
41
62
|
|
|
@@ -189,7 +189,7 @@ test("a v1 reader's view of a v2 block: an unknown version is UNDETERMINED, neve
|
|
|
189
189
|
// A reader from before /2 rejects the version string in payloadShapeError; the same
|
|
190
190
|
// path is taken here for any version this reader does not know.
|
|
191
191
|
const p = golden();
|
|
192
|
-
p["carrier"] = "bitgraph-carrier/
|
|
192
|
+
p["carrier"] = "bitgraph-carrier/4"; // /3 exists since 2026-10-06 (a Base floor); /4 does not
|
|
193
193
|
const r = await verifyCarrier(buildCarrier(inner, p));
|
|
194
194
|
assert.equal(r.verdict, "UNDETERMINED");
|
|
195
195
|
assert.equal(r.carrier, "corrupt");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carrier2.test.js","sourceRoot":"","sources":["../../src/__tests__/carrier2.test.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAE9F;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EACL,wBAAwB,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EACrF,qBAAqB,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,uBAAuB,GAE7F,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACxH,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,GAAG,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,YAAY,CAAC,IAAI,GAAG,CAAC,yCAAyC,IAAI,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9H,MAAM,IAAI,GAAG,CAA8B,IAAY,EAAK,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAA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AC,CAAC,CAAC"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Assemble a bitgraph-carrier/2 payload from vetted parts. The caller has
|
|
2
|
+
* Assemble a bitgraph-carrier/2 or /3 payload from vetted parts. The caller has
|
|
3
3
|
* already verified every part (the anchors over their messages, the headers
|
|
4
4
|
* by hash, the Base sidecar with verifyCeiling); this lays them out, derives
|
|
5
5
|
* the attestation witness from the proof's own document, and declares the
|
|
6
6
|
* pins the file was made under. It computes nothing that a verifier would
|
|
7
7
|
* later trust: the witness is recomputed on read, the pins compared.
|
|
8
|
+
*
|
|
9
|
+
* /3 is for a proof whose floor is a Base block (commit.slotFloor): the floor
|
|
10
|
+
* is its header (checked by the caller with checkFloorHeader), and the block
|
|
11
|
+
* states that no ceiling in position exists, since order is the chain of
|
|
12
|
+
* proof hashes. /2 stays the format for Ethereum-floor proofs.
|
|
8
13
|
*/
|
|
9
|
-
import { type CarrierPayload, type CarrierFloor, type CarrierCeiling, type CarrierCeilingInTime, type CarrierSettlement, type CarrierPins, type CarrierProof } from "./carrier.js";
|
|
14
|
+
import { type CarrierPayload, type CarrierFloor, type CarrierBaseFloor, type CarrierCeiling, type CarrierCeilingInTime, type CarrierSettlement, type CarrierPins, type CarrierProof } from "./carrier.js";
|
|
10
15
|
export interface CarrierV2Parts {
|
|
11
16
|
proof: CarrierProof;
|
|
12
17
|
floor: CarrierFloor;
|
|
@@ -27,7 +32,12 @@ export interface CarrierV2Parts {
|
|
|
27
32
|
* from the proof) and refusing the carrier otherwise.
|
|
28
33
|
*/
|
|
29
34
|
export declare const CARRIER_BLOCK_ZIP_LIMIT = 60000;
|
|
35
|
+
/** The parts of a /3 block: a Base floor header, and no ceiling in position (there is none). */
|
|
36
|
+
export interface CarrierV3Parts extends Omit<CarrierV2Parts, "floor" | "ceiling"> {
|
|
37
|
+
floor: CarrierBaseFloor;
|
|
38
|
+
}
|
|
30
39
|
export declare function assembleCarrierV2Payload(parts: CarrierV2Parts): CarrierPayload;
|
|
40
|
+
export declare function assembleCarrierV3Payload(parts: CarrierV3Parts): CarrierPayload;
|
|
31
41
|
/** The size the block will have on disk for this payload. */
|
|
32
42
|
export declare function carrierBlockSize(payload: CarrierPayload): number;
|
|
33
43
|
//# sourceMappingURL=carrier-assemble.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carrier-assemble.d.ts","sourceRoot":"","sources":["../src/carrier-assemble.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"carrier-assemble.d.ts","sourceRoot":"","sources":["../src/carrier-assemble.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAA4D,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAE,KAAK,oBAAoB,EAAE,KAAK,iBAAiB,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAMpQ,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,cAAc,CAAC;IACxB,aAAa,EAAE,oBAAoB,CAAC;IACpC,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,0IAA0I;IAC1I,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5B,qKAAqK;IACrK,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,QAAS,CAAC;AAE9C,gGAAgG;AAChG,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/E,KAAK,EAAE,gBAAgB,CAAC;CACzB;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,cAAc,GAAG,cAAc,CAE9E;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,cAAc,GAAG,cAAc,CAE9E;AAiCD,6DAA6D;AAC7D,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAEhE"}
|
package/dist/carrier-assemble.js
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
// Copyright (c) 2024-2026 Argento Computing Inc. Licensed under the MIT License. See LICENSE.
|
|
2
2
|
/**
|
|
3
|
-
* Assemble a bitgraph-carrier/2 payload from vetted parts. The caller has
|
|
3
|
+
* Assemble a bitgraph-carrier/2 or /3 payload from vetted parts. The caller has
|
|
4
4
|
* already verified every part (the anchors over their messages, the headers
|
|
5
5
|
* by hash, the Base sidecar with verifyCeiling); this lays them out, derives
|
|
6
6
|
* the attestation witness from the proof's own document, and declares the
|
|
7
7
|
* pins the file was made under. It computes nothing that a verifier would
|
|
8
8
|
* later trust: the witness is recomputed on read, the pins compared.
|
|
9
|
+
*
|
|
10
|
+
* /3 is for a proof whose floor is a Base block (commit.slotFloor): the floor
|
|
11
|
+
* is its header (checked by the caller with checkFloorHeader), and the block
|
|
12
|
+
* states that no ceiling in position exists, since order is the chain of
|
|
13
|
+
* proof hashes. /2 stays the format for Ethereum-floor proofs.
|
|
9
14
|
*/
|
|
10
|
-
import { CARRIER_VERSION_2, encodeCarrierBlock } from "./carrier.js";
|
|
15
|
+
import { CARRIER_VERSION_2, CARRIER_VERSION_3, encodeCarrierBlock } from "./carrier.js";
|
|
11
16
|
import { attestationWitness } from "./nitro.js";
|
|
12
17
|
import { computeProofHash, computeSignedBodyHash } from "./proof-hash.js";
|
|
13
18
|
import { BITGRAPH_CEILING_WRITER, BASE_MAINNET_CHAIN_ID } from "./carrier-verify.js";
|
|
@@ -21,6 +26,12 @@ import { BITGRAPH_CEILING_WRITER, BASE_MAINNET_CHAIN_ID } from "./carrier-verify
|
|
|
21
26
|
*/
|
|
22
27
|
export const CARRIER_BLOCK_ZIP_LIMIT = 60_000;
|
|
23
28
|
export function assembleCarrierV2Payload(parts) {
|
|
29
|
+
return assemble(CARRIER_VERSION_2, parts);
|
|
30
|
+
}
|
|
31
|
+
export function assembleCarrierV3Payload(parts) {
|
|
32
|
+
return assemble(CARRIER_VERSION_3, { ...parts, ceiling: { status: "none", basis: "hash-chain" } });
|
|
33
|
+
}
|
|
34
|
+
function assemble(version, parts) {
|
|
24
35
|
const proof = parts.proof;
|
|
25
36
|
const att = proof.environment?.attestation;
|
|
26
37
|
const wantWitness = parts.withAttestationWitness ?? (att?.format === "aws-nitro" && typeof att.reportB64 === "string");
|
|
@@ -31,7 +42,7 @@ export function assembleCarrierV2Payload(parts) {
|
|
|
31
42
|
...(parts.pins ?? {}),
|
|
32
43
|
};
|
|
33
44
|
const payload = {
|
|
34
|
-
carrier:
|
|
45
|
+
carrier: version,
|
|
35
46
|
proof: parts.proof,
|
|
36
47
|
floor: parts.floor,
|
|
37
48
|
ceiling: parts.ceiling,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carrier-assemble.js","sourceRoot":"","sources":["../src/carrier-assemble.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAE9F
|
|
1
|
+
{"version":3,"file":"carrier-assemble.js","sourceRoot":"","sources":["../src/carrier-assemble.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAE9F;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,kBAAkB,EAA8K,MAAM,cAAc,CAAC;AACpQ,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAerF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAO9C,MAAM,UAAU,wBAAwB,CAAC,KAAqB;IAC5D,OAAO,QAAQ,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;AAC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CAAC;QACvD,MAAM,YAAY,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,CAAC,WAAW,GAAG,kBAAkB,CAAC,GAAG,CAAC,SAAS,EAAE;YACtD,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,WAAW;YACnC,iBAAiB;YACjB,GAAG,CAAC,YAAY,KAAK,iBAAiB,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAChE,CAAuC,CAAC;IAC3C,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,gBAAgB,CAAC,OAAuB;IACtD,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC;AAC5C,CAAC"}
|
package/dist/carrier-verify.d.ts
CHANGED
|
@@ -43,14 +43,17 @@ export interface CarrierVerifyResult {
|
|
|
43
43
|
verdict: "TRUE" | "FALSE" | "UNDETERMINED";
|
|
44
44
|
/** Why the Base block's time is not stated as a bound, when it is not (see baseTimeIsBound). */
|
|
45
45
|
baseTimeWithheld?: string | null;
|
|
46
|
+
/** Why the floor block's time is not stated as a bound, when it is not: it is stamped after the attestation document (see floorTimeIsBound). */
|
|
47
|
+
floorTimeWithheld?: string | null;
|
|
46
48
|
/** "ok" | "none" | "corrupt" — whether the bytes carried a readable block at all. */
|
|
47
49
|
carrier: "ok" | "none" | "corrupt";
|
|
48
|
-
version: 1 | 2 | null;
|
|
50
|
+
version: 1 | 2 | 3 | null;
|
|
49
51
|
/** Every failed or undetermined check, in the order met. Empty on a clean TRUE. */
|
|
50
52
|
reasons: string[];
|
|
51
53
|
/** Stated only when the block was readable. notAfter null = NOT FETCHED, in those words. */
|
|
52
54
|
bounds: CarrierBounds | null;
|
|
53
|
-
ceiling: "
|
|
55
|
+
/** The ceiling in position: "none" on v3, where none exists (order is the chain of proof hashes). */
|
|
56
|
+
ceiling: "present" | "unfetched" | "none" | null;
|
|
54
57
|
claims: CarrierClaim[];
|
|
55
58
|
/** Plain language, written from the claims. */
|
|
56
59
|
reading: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carrier-verify.d.ts","sourceRoot":"","sources":["../src/carrier-verify.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"carrier-verify.d.ts","sourceRoot":"","sources":["../src/carrier-verify.ts"],"names":[],"mappings":"AAiDA,OAAO,EAAwG,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAG5J,OAAO,EAGL,KAAK,aAAa,EAAE,KAAK,cAAc,EACxC,MAAM,cAAc,CAAC;AAEtB,qGAAqG;AACrG,eAAO,MAAM,uBAAuB,+CAA+C,CAAC;AACpF,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAE1C,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc,GAAG,aAAa,CAAC;AAE5E,MAAM,WAAW,YAAY;IAC3B,gJAAgJ;IAChJ,EAAE,EAAE,MAAM,CAAC;IACX,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;IACpB,0IAA0I;IAC1I,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,SAAS,GAAG,WAAW,CAAC;CAChC;AAED,MAAM,WAAW,cAAc;IAC7B,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACpE,iEAAiE;IACjE,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACjE;AAED,MAAM,WAAW,oBAAoB;IACnC,+HAA+H;IAC/H,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,sGAAsG;IACtG,IAAI,CAAC,EAAE;QACL;;;;WAIG;QACH,IAAI,CA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.js
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
// Copyright (c) 2024-2026 Argento Computing Inc. Licensed under the MIT License. See LICENSE.
|
|
2
2
|
/**
|
|
3
|
-
* verifyCarrier
|
|
4
|
-
* or /
|
|
3
|
+
* verifyCarrier: the offline read path for a BitGraphed file (bitgraph-carrier/1,
|
|
4
|
+
* /2 or /3), one result per claim, each saying what it rests on.
|
|
5
5
|
*
|
|
6
6
|
* Given the file and nothing else, it strips the block by structure and checks:
|
|
7
7
|
*
|
|
8
8
|
* the bytes SHA-256 of the committed bytes is the digest the proof names
|
|
9
9
|
* the proof Ed25519 signature, the position record and its bindings, the
|
|
10
|
-
* fused commitment rebuilt (bitgraph-fuse/1 or /
|
|
10
|
+
* fused commitment rebuilt (bitgraph-fuse/1, /2 or /3), proofHash
|
|
11
11
|
* the attestation ES384 signature, the certificate chain to the AWS Nitro root
|
|
12
12
|
* (641A0321…), validity at the document's own instant, PCR0 against
|
|
13
13
|
* the proof's measurement, user_data against the signed body; and,
|
|
14
14
|
* on a v2 block, the openssl-checkable witness against the document
|
|
15
|
-
* the floor the anchor proof named by the signed slotAnchor, verified over
|
|
16
|
-
* own message, matched by identity; its Ethereum header recomputed
|
|
17
|
-
*
|
|
15
|
+
* the floor v1, v2: the anchor proof named by the signed slotAnchor, verified over
|
|
16
|
+
* its own message, matched by identity; its Ethereum header recomputed.
|
|
17
|
+
* v3: the Base header, checked against the signed slotFloor (hash,
|
|
18
|
+
* number, time, Base mainnet's schedule). Either way the floor's time
|
|
19
|
+
* is a bound only when no later than the attestation document.
|
|
20
|
+
* the ceilings in position (v1, v2): the next anchor, same checks; v3 has none, its
|
|
21
|
+
* order is the chain of proof hashes; in time (v2, v3): the Base
|
|
18
22
|
* sidecar's whole chain of custody (verifyCeiling); settled (v2): the
|
|
19
23
|
* Ethereum block that committed the batch data (verifySettlementPointer)
|
|
20
24
|
* the pins what the file declares it was made under, against the verifier's own
|
|
@@ -35,10 +39,11 @@
|
|
|
35
39
|
*/
|
|
36
40
|
import { verify, verifyProofIntegrity, createVerificationContext } from "./verifier.js";
|
|
37
41
|
import { verifyFuse } from "./fuse-verify.js";
|
|
38
|
-
import { readFuseAttribution } from "./fuse.js";
|
|
42
|
+
import { readFuseAttribution, signedFloorOf } from "./fuse.js";
|
|
39
43
|
import { computeProofHash, computeSignedBodyHash } from "./proof-hash.js";
|
|
40
44
|
import { verifyNitroAttestation, witnessMatchesAttestation, awsNitroRootSha256 } from "./nitro.js";
|
|
41
|
-
import { baseTimeIsBound, verifyCeiling, checkCeilingOnline } from "./ceiling.js";
|
|
45
|
+
import { baseTimeIsBound, checkFloorHeader, floorTimeIsBound, verifyCeiling, checkCeilingOnline } from "./ceiling.js";
|
|
46
|
+
import { hexToBytes as evmHex } from "./ceiling-evm.js";
|
|
42
47
|
import { PUBLISHED_PCR0S, publishedMeasurement } from "./measurements.js";
|
|
43
48
|
import { verifySettlementPointer, checkSettlementOnline, BASE_MAINNET_SETTLEMENT_PINS } from "./settlement.js";
|
|
44
49
|
import { sha256 } from "@noble/hashes/sha256";
|
|
@@ -101,7 +106,7 @@ export async function verifyCarrierPayload(payload, inner, opts = {}) {
|
|
|
101
106
|
version,
|
|
102
107
|
reasons: claims.filter((c) => c.result === "FALSE").map((c) => `${c.name}: ${c.detail}`),
|
|
103
108
|
bounds: null,
|
|
104
|
-
ceiling: ceilingStatus === "present" || ceilingStatus === "unfetched" ? ceilingStatus : null,
|
|
109
|
+
ceiling: ceilingStatus === "present" || ceilingStatus === "unfetched" || ceilingStatus === "none" ? ceilingStatus : null,
|
|
105
110
|
claims,
|
|
106
111
|
reading: `This file does not verify: ${detail}. Nothing here is a verdict on what the bytes say, only that the evidence does not hold together.`,
|
|
107
112
|
payload,
|
|
@@ -136,7 +141,7 @@ async function verifyCarrierPayloadChecks(payload, inner, opts, claims, add) {
|
|
|
136
141
|
const ok = computeProofHash(proof) === ph;
|
|
137
142
|
add("proof.hash", "The ledger's proofHash is this proof's", ok ? "TRUE" : "FALSE", "SHA-256", ok ? "recomputed over the signed-body subset and equal" : "the proofHash field is not the hash of this proof's signed-body subset");
|
|
138
143
|
}
|
|
139
|
-
// 3. Fused: the commitment inside the bytes, rebuilt from the signed record (fuse/2: and the signed floor block).
|
|
144
|
+
// 3. Fused: the commitment inside the bytes, rebuilt from the signed record (fuse/2 and fuse/3: and the signed floor block).
|
|
140
145
|
const marker = readFuseAttribution(proof);
|
|
141
146
|
if (marker !== null && inner === null) {
|
|
142
147
|
add("proof.fused", "The bytes carry the position commitment", "NOT_CARRIED", "", `the file is not in hand; its bytes carry a bitgraph-fuse/${marker.version ?? 1} commitment to check`);
|
|
@@ -144,7 +149,7 @@ async function verifyCarrierPayloadChecks(payload, inner, opts, claims, add) {
|
|
|
144
149
|
else if (marker !== null && inner !== null) {
|
|
145
150
|
const f = await verifyFuse({ proof, bytes: inner });
|
|
146
151
|
const good = f.category === "FUSED_DIRECT" || f.category === "CARRIED_INLINE";
|
|
147
|
-
add("proof.fused", "The bytes carry the position commitment", good ? "TRUE" : "FALSE", marker.version
|
|
152
|
+
add("proof.fused", "The bytes carry the position commitment", good ? "TRUE" : "FALSE", (marker.version ?? 1) >= 2 ? "SHA-256 over the signed position record, its nonce and the signed floor block hash" : "SHA-256 over the signed position record and its nonce", good ? `${f.category}: ${(marker.version ?? 1) >= 2 ? "the commitment binds the floor block, so the bytes could not have been finished before that block existed" : "the commitment was made from the position record before the bytes were finished"}` : `${f.category}${f.reason ? `: ${f.reason}` : ""}`);
|
|
148
153
|
}
|
|
149
154
|
else {
|
|
150
155
|
add("proof.fused", "The bytes carry the position commitment", "NOT_CARRIED", "", "an ordinary recording: the position was taken after the bytes existed, and no commitment is inside them");
|
|
@@ -194,7 +199,7 @@ async function verifyCarrierPayloadChecks(payload, inner, opts, claims, add) {
|
|
|
194
199
|
? usingDefault && pub ? `PCR0 ${measured.slice(0, 16)}… is BitGraph's published ${pub.version} image (since ${pub.since})` : `PCR0 ${measured.slice(0, 16)}… is on the verifier's list`
|
|
195
200
|
: usingDefault ? `PCR0 ${measured.slice(0, 16)}… is not an image BitGraph published, so this proof is not BitGraph's` : `PCR0 ${measured.slice(0, 16)}… is not on the verifier's list`);
|
|
196
201
|
}
|
|
197
|
-
if (version
|
|
202
|
+
if (version >= 2 && payload.attestation) {
|
|
198
203
|
const w = witnessMatchesAttestation(payload.attestation, att.reportB64);
|
|
199
204
|
add("attestation.witness", "The openssl witness is what the document decodes to", w.ok ? "TRUE" : "FALSE", "recomputed from the attestation document", w.detail);
|
|
200
205
|
}
|
|
@@ -202,21 +207,69 @@ async function verifyCarrierPayloadChecks(payload, inner, opts, claims, add) {
|
|
|
202
207
|
else {
|
|
203
208
|
add("attestation.signature", "AWS hardware signed the attestation", "NOT_CARRIED", "", "the proof carries no aws-nitro attestation");
|
|
204
209
|
}
|
|
205
|
-
// 5. The floor
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
+
// 5. The floor. One floor per proof (signedFloorOf); a proof that signs two is ambiguous and floors nothing.
|
|
211
|
+
let signed = null;
|
|
212
|
+
let ambiguous = null;
|
|
213
|
+
try {
|
|
214
|
+
signed = signedFloorOf(proof);
|
|
215
|
+
}
|
|
216
|
+
catch (e) {
|
|
217
|
+
ambiguous = e.message;
|
|
218
|
+
}
|
|
219
|
+
let floorTs = null;
|
|
220
|
+
let floorChain = "ethereum";
|
|
221
|
+
if (payload.floor.basis === "base-header") {
|
|
222
|
+
// v3: the Base header itself, checked against the signed slotFloor. No anchor proof stands under it.
|
|
223
|
+
floorChain = "base";
|
|
224
|
+
const header = payload.floor.header;
|
|
225
|
+
let raw = null;
|
|
226
|
+
try {
|
|
227
|
+
raw = evmHex(header);
|
|
228
|
+
}
|
|
229
|
+
catch {
|
|
230
|
+
raw = null;
|
|
231
|
+
}
|
|
232
|
+
const fh = ambiguous !== null || signed === null || raw === null ? null : checkFloorHeader(signed, raw, "base");
|
|
233
|
+
const why = ambiguous ?? (signed === null ? "the proof signs no floor block (commit.slotFloor)" : raw === null ? "the floor header is not hex" : fh && !fh.ok ? fh.reason : "");
|
|
234
|
+
add("floor.binding", "The floor is the Base block the enclave fixed for this position", fh?.ok ? "TRUE" : "FALSE", "the proof's signed commit.slotFloor", fh?.ok ? "the header's block number, hash and time equal the signed slotFloor, on Base mainnet's schedule" : why);
|
|
235
|
+
if (fh?.ok) {
|
|
236
|
+
floorTs = fh.header.timestamp;
|
|
237
|
+
add("floor.header", "The floor block's header is the one with that hash", "TRUE", `Base block ${fh.header.number}, header as given`, `keccak-256 of the header equals the signed block hash; its time is ${iso(fh.header.timestamp)}`);
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
add("floor.header", "The floor block's header is the one with that hash", "FALSE", "", `floor header: ${why}`);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
210
243
|
else {
|
|
211
|
-
|
|
212
|
-
|
|
244
|
+
// v1, v2: the anchor proof verifies over its own signed message, and it
|
|
245
|
+
// is the anchor the enclave fixed at allocation, matched by identity.
|
|
246
|
+
const floorMsg = anchorMessageBytes(payload.floor.anchor);
|
|
247
|
+
if (floorMsg.error !== null)
|
|
248
|
+
add("floor.anchor", "The floor anchor is a genuine anchor proof", "FALSE", "", `floor anchor: ${floorMsg.error}`);
|
|
249
|
+
else {
|
|
250
|
+
const floorResult = await verify({ proof: payload.floor.anchor, bytes: floorMsg.bytes, context: createVerificationContext() });
|
|
251
|
+
add("floor.anchor", "The floor anchor is a genuine anchor proof", floorResult.valid ? "TRUE" : "FALSE", "Ed25519", floorResult.valid ? "the anchor proof verifies over its own signed block-hash message, under the same key" : `the floor anchor proof does not verify: ${floorResult.reason ?? "unspecified"}`);
|
|
252
|
+
}
|
|
253
|
+
const floorBind = ambiguous !== null ? [ambiguous]
|
|
254
|
+
: signed?.chain === "base" ? ["the proof signs a Base floor (commit.slotFloor), and this block carries an Ethereum anchor as its floor"]
|
|
255
|
+
: checkFloorBinding(payload.proof, payload.floor);
|
|
256
|
+
add("floor.binding", "The floor is the anchor the enclave fixed for this position", floorBind.length === 0 ? "TRUE" : "FALSE", "the proof's signed commit.slotAnchor", floorBind.length === 0 ? "the anchor's counter, block number and block hash equal the signed slotAnchor" : floorBind.join("; "));
|
|
257
|
+
const floorWitness = verifyWitnessHeader(payload.floor.witness);
|
|
258
|
+
floorTs = floorWitness.ok ? floorWitness.timestamp : null;
|
|
259
|
+
add("floor.header", "The floor block's header is the one with that hash", floorWitness.ok ? "TRUE" : "FALSE", `Ethereum block ${payload.floor.witness.blockNumber}, header as given`, floorWitness.ok ? `keccak-256 of the header equals the signed block hash; its time is ${iso(floorWitness.timestamp)}` : `floor witness: ${floorWitness.error}`);
|
|
260
|
+
}
|
|
261
|
+
// The floor's time is a bound only when it is no later than the attestation document (review, 2026-10-06).
|
|
262
|
+
let floorTimeWithheld = null;
|
|
263
|
+
if (floorTs !== null) {
|
|
264
|
+
const bound = floorTimeIsBound(floorTs, attestedAtMs);
|
|
265
|
+
if (!bound.ok)
|
|
266
|
+
floorTimeWithheld = bound.reason;
|
|
267
|
+
}
|
|
268
|
+
// 6. The ceiling in position: v1 and v2 when the carrier claims one; v3 has none.
|
|
269
|
+
if (payload.ceiling.status === "none") {
|
|
270
|
+
add("ceiling.position", "A closing anchor follows the record", "NOT_CARRIED", "", "none exists for a Base-floor BitGraph: anchors ended with the cutover, and its order among BitGraphs is the chain of proof hashes");
|
|
213
271
|
}
|
|
214
|
-
|
|
215
|
-
add("floor.binding", "The floor is the anchor the enclave fixed for this position", floorBind.length === 0 ? "TRUE" : "FALSE", "the proof's signed commit.slotAnchor", floorBind.length === 0 ? "the anchor's counter, block number and block hash equal the signed slotAnchor" : floorBind.join("; "));
|
|
216
|
-
const floorWitness = verifyWitnessHeader(payload.floor.witness);
|
|
217
|
-
add("floor.header", "The floor block's header is the one with that hash", floorWitness.ok ? "TRUE" : "FALSE", `Ethereum block ${payload.floor.witness.blockNumber}, header as given`, floorWitness.ok ? `keccak-256 of the header equals the signed block hash; its time is ${iso(floorWitness.timestamp)}` : `floor witness: ${floorWitness.error}`);
|
|
218
|
-
// 6. The ceiling in position, only when the carrier claims one.
|
|
219
|
-
if (payload.ceiling.status === "present") {
|
|
272
|
+
else if (payload.ceiling.status === "present") {
|
|
220
273
|
const ceilMsg = anchorMessageBytes(payload.ceiling.anchor);
|
|
221
274
|
if (ceilMsg.error !== null)
|
|
222
275
|
add("ceiling.position.anchor", "The closing anchor is a genuine anchor proof", "FALSE", "", `ceiling anchor: ${ceilMsg.error}`);
|
|
@@ -232,11 +285,11 @@ async function verifyCarrierPayloadChecks(payload, inner, opts, claims, add) {
|
|
|
232
285
|
else {
|
|
233
286
|
add("ceiling.position.binding", "The record was committed before the closing anchor", "NOT_CARRIED", "", "closing anchor not fetched: the floor stands on its own");
|
|
234
287
|
}
|
|
235
|
-
// 7. v2: the ceiling in time, the Base block the record existed by.
|
|
288
|
+
// 7. v2 and v3: the ceiling in time, the Base block the record existed by.
|
|
236
289
|
let ceilingTime = null;
|
|
237
290
|
let baseTimeWithheld = null;
|
|
238
291
|
let sidecar = null;
|
|
239
|
-
if (version
|
|
292
|
+
if (version >= 2) {
|
|
240
293
|
const ct = payload.ceilingInTime;
|
|
241
294
|
if (ct && ct.status === "present") {
|
|
242
295
|
sidecar = ct.sidecar;
|
|
@@ -247,11 +300,11 @@ async function verifyCarrierPayloadChecks(payload, inner, opts, claims, add) {
|
|
|
247
300
|
add("ceiling.time.payload", "The transaction carries that root", r(byName("payload")), "the 84-byte BGC1 payload", byName("payload")?.detail ?? c.reason ?? "not reached");
|
|
248
301
|
add("ceiling.time.sender", "The transaction was signed by the ceiling writer", r(byName("sender")), `secp256k1; the writer pin ${pinnedWriter.slice(0, 8)}…`, byName("sender")?.detail ?? c.reason ?? "not reached");
|
|
249
302
|
add("ceiling.time.inclusion", "The transaction is in the Base block", r(byName("inclusion")), `Merkle-Patricia proof; Base block ${sidecar.anchor?.blockNumber ?? "?"}, header as given`, byName("inclusion")?.detail ?? c.reason ?? "not reached");
|
|
250
|
-
add("ceiling.time.floor", "The floor header the ceiling carries is the signed floor", r(byName("floor")), "the proof's signed commit.slotAnchor", byName("floor")?.detail ?? "the sidecar carries no floor header");
|
|
303
|
+
add("ceiling.time.floor", "The floor header the ceiling carries is the signed floor", r(byName("floor")), floorChain === "base" ? "the proof's signed commit.slotFloor" : "the proof's signed commit.slotAnchor", byName("floor")?.detail ?? "the sidecar carries no floor header");
|
|
251
304
|
const win = c.ok ? c.window?.ceiling : undefined;
|
|
252
305
|
if (win) {
|
|
253
306
|
// The inclusion holds either way; a stamp that cannot be a bound is withheld as a time.
|
|
254
|
-
const stamp = baseTimeIsBound(win.blockTimestamp, { floorTimestampSec:
|
|
307
|
+
const stamp = baseTimeIsBound(win.blockTimestamp, { floorTimestampSec: floorTs ?? c.window?.floor.blockTimestamp ?? null, attestedAtMs });
|
|
255
308
|
if (stamp.ok)
|
|
256
309
|
ceilingTime = { blockNumber: win.blockNumber, blockHash: win.blockHash, blockTimestamp: win.blockTimestamp, status: c.status ?? "included" };
|
|
257
310
|
else
|
|
@@ -264,7 +317,7 @@ async function verifyCarrierPayloadChecks(payload, inner, opts, claims, add) {
|
|
|
264
317
|
else {
|
|
265
318
|
add("ceiling.time.record", "The record existed by a Base block", "NOT_CARRIED", "", ct?.status === "unfetched" ? "the ceiling in time was not fetched when this file was made" : "no ceiling in time is stated");
|
|
266
319
|
}
|
|
267
|
-
// 8. v2: settlement on Ethereum, when carried.
|
|
320
|
+
// 8. v2 and v3: settlement on Ethereum, when carried.
|
|
268
321
|
const st = payload.settlement;
|
|
269
322
|
if (st && st.status === "present") {
|
|
270
323
|
const pointer = st.pointer;
|
|
@@ -294,12 +347,22 @@ async function verifyCarrierPayloadChecks(payload, inner, opts, claims, add) {
|
|
|
294
347
|
add("pins", "What the file says it was made under agrees with this verifier's pins", notes.length === 0 ? "TRUE" : "FALSE", "the verifier's own pins", notes.length === 0 ? "declared pins match; they were never used as authority" : notes.join("; "));
|
|
295
348
|
}
|
|
296
349
|
}
|
|
297
|
-
// 10. Confirmed: the block hashes against nodes the caller named.
|
|
350
|
+
// 10. Confirmed: the block hashes against nodes the caller named. The floor
|
|
351
|
+
// is asked of its own chain, by height: the chain's block at N must be
|
|
352
|
+
// the one the header hashes to.
|
|
298
353
|
const lk = opts.lookups;
|
|
354
|
+
const nb = carrierBounds(payload).notBefore;
|
|
355
|
+
const floorAsk = floorChain === "base" ? lk?.baseBlockHash : lk?.ethereumBlockHash;
|
|
356
|
+
const floorChainName = floorChain === "base" ? "Base" : "Ethereum";
|
|
357
|
+
if (floorAsk) {
|
|
358
|
+
const h = (await safe(() => floorAsk(nb.blockNumber)))?.toLowerCase();
|
|
359
|
+
const ok = h === nb.blockHash;
|
|
360
|
+
add("confirmed.floor", `The floor block is ${floorChainName}'s own`, h ? (ok ? "TRUE" : "FALSE") : "UNDETERMINED", `the ${floorChainName} node the caller named`, h ? (ok ? `${floorChainName} block ${nb.blockNumber} matches the node` : `the node's block ${nb.blockNumber} is ${h}, not this header`) : "the node did not answer", "confirmed");
|
|
361
|
+
}
|
|
362
|
+
else {
|
|
363
|
+
add("confirmed.floor", `The floor block is ${floorChainName}'s own`, "UNDETERMINED", "", `no ${floorChainName} node given: the header is taken as the one matching its hash; confirm block ${nb.blockNumber} against any node or explorer`, "confirmed");
|
|
364
|
+
}
|
|
299
365
|
if (lk?.ethereumBlockHash) {
|
|
300
|
-
const h = (await safe(() => lk.ethereumBlockHash(payload.floor.witness.blockNumber)))?.toLowerCase();
|
|
301
|
-
const ok = h === payload.floor.witness.blockHash.toLowerCase();
|
|
302
|
-
add("confirmed.floor", "The floor block is Ethereum's own", h ? (ok ? "TRUE" : "FALSE") : "UNDETERMINED", "the Ethereum node the caller named", h ? (ok ? `Ethereum block ${payload.floor.witness.blockNumber} matches the node` : `the node's block ${payload.floor.witness.blockNumber} is ${h}, not this header`) : "the node did not answer", "confirmed");
|
|
303
366
|
const pc = payload.ceiling;
|
|
304
367
|
if (pc.status === "present") {
|
|
305
368
|
const h2 = (await safe(() => lk.ethereumBlockHash(pc.witness.blockNumber)))?.toLowerCase();
|
|
@@ -312,9 +375,6 @@ async function verifyCarrierPayloadChecks(payload, inner, opts, claims, add) {
|
|
|
312
375
|
add("confirmed.settlement", "The settling Ethereum block is Ethereum's own", r.ok ? "TRUE" : "FALSE", "the Ethereum node the caller named", r.detail, "confirmed");
|
|
313
376
|
}
|
|
314
377
|
}
|
|
315
|
-
else {
|
|
316
|
-
add("confirmed.floor", "The floor block is Ethereum's own", "UNDETERMINED", "", "no Ethereum node given: the header is taken as the one matching its hash; confirm block " + payload.floor.witness.blockNumber + " against any node or explorer", "confirmed");
|
|
317
|
-
}
|
|
318
378
|
if (sidecar) {
|
|
319
379
|
if (lk?.baseBlockHash) {
|
|
320
380
|
const r = await checkCeilingOnline(sidecar, lk.baseBlockHash);
|
|
@@ -334,16 +394,19 @@ async function verifyCarrierPayloadChecks(payload, inner, opts, claims, add) {
|
|
|
334
394
|
const bounds = carrierBounds(payload);
|
|
335
395
|
// The ceiling in time reaches callers only as verified here, and only when its stamp is a bound.
|
|
336
396
|
bounds.existedBy = ceilingTime ? { chain: "base", blockNumber: ceilingTime.blockNumber, blockHash: ceilingTime.blockHash, timestamp: ceilingTime.blockTimestamp } : null;
|
|
397
|
+
// So does the floor's time: from a verified header, and only when it is a bound.
|
|
398
|
+
bounds.notBefore.timestamp = floorTimeWithheld === null ? floorTs : null;
|
|
337
399
|
return {
|
|
338
400
|
verdict,
|
|
339
401
|
baseTimeWithheld,
|
|
402
|
+
floorTimeWithheld,
|
|
340
403
|
carrier: "ok",
|
|
341
404
|
version,
|
|
342
405
|
reasons,
|
|
343
406
|
bounds,
|
|
344
407
|
ceiling: payload.ceiling.status,
|
|
345
408
|
claims,
|
|
346
|
-
reading: writeReading(verdict, claims, bounds, proof, ceilingTime,
|
|
409
|
+
reading: writeReading(verdict, claims, bounds, proof, ceilingTime, bounds.notBefore.timestamp, baseTimeWithheld, floorTimeWithheld),
|
|
347
410
|
payload,
|
|
348
411
|
inner,
|
|
349
412
|
};
|
|
@@ -363,7 +426,7 @@ function iso(ts) {
|
|
|
363
426
|
* The reading, from the results. It names what the file proves and what that
|
|
364
427
|
* rests on, and says what removes each reliance. Never stored in the file.
|
|
365
428
|
*/
|
|
366
|
-
function writeReading(verdict, claims, bounds, proof, ceilingTime, floorTs, baseTimeWithheld = null) {
|
|
429
|
+
function writeReading(verdict, claims, bounds, proof, ceilingTime, floorTs, baseTimeWithheld = null, floorTimeWithheld = null) {
|
|
367
430
|
const get = (id) => claims.find((c) => c.id === id);
|
|
368
431
|
if (verdict === "FALSE") {
|
|
369
432
|
const failed = claims.filter((c) => c.result === "FALSE").map((c) => c.name.toLowerCase());
|
|
@@ -372,10 +435,13 @@ function writeReading(verdict, claims, bounds, proof, ceilingTime, floorTs, base
|
|
|
372
435
|
const position = proof.commit?.counter ?? "?";
|
|
373
436
|
const epoch = (proof.commit?.epochId ?? "").replace(/=+$/, "").slice(0, 8);
|
|
374
437
|
const fused = get("proof.fused");
|
|
375
|
-
const
|
|
438
|
+
const floorChain = bounds.notBefore.chain === "base" ? "Base" : "Ethereum";
|
|
439
|
+
const after = floorTs !== null ? `Recorded after ${floorChain} block ${bounds.notBefore.blockNumber} (${iso(floorTs)})` : `Recorded after ${floorChain} block ${bounds.notBefore.blockNumber}`;
|
|
376
440
|
const by = ceilingTime ? `, and existed by Base block ${ceilingTime.blockNumber} (${iso(ceilingTime.blockTimestamp)})` : "";
|
|
377
441
|
const settled = bounds.settledBy ? `, whose batch data Ethereum committed in block ${bounds.settledBy.blockNumber} (${iso(bounds.settledBy.timestamp)})` : "";
|
|
378
|
-
const before = bounds.notAfter
|
|
442
|
+
const before = bounds.notAfter
|
|
443
|
+
? `; committed before the anchoring of Ethereum block ${bounds.notAfter.blockNumber}, a bound in position`
|
|
444
|
+
: get("ceiling.position") ? "; its order among BitGraphs is the chain of proof hashes" : "";
|
|
379
445
|
const digest = get("bytes.digest");
|
|
380
446
|
// Two floors (SPEC 8.6): every record has the record floor; only bytes that
|
|
381
447
|
// carry the commitment have the content floor. Without it, the bytes
|
|
@@ -389,7 +455,7 @@ function writeReading(verdict, claims, bounds, proof, ceilingTime, floorTs, base
|
|
|
389
455
|
const rests = ["SHA-256", "Ed25519"];
|
|
390
456
|
if (att?.result === "TRUE")
|
|
391
457
|
rests.push(`the AWS Nitro root (${awsNitroRootSha256().slice(0, 8)}…)`);
|
|
392
|
-
rests.push(
|
|
458
|
+
rests.push(`${floorChain} block ${bounds.notBefore.blockNumber}`);
|
|
393
459
|
if (ceilingTime)
|
|
394
460
|
rests.push(`Base block ${ceilingTime.blockNumber}`);
|
|
395
461
|
if (bounds.settledBy)
|
|
@@ -401,7 +467,8 @@ function writeReading(verdict, claims, bounds, proof, ceilingTime, floorTs, base
|
|
|
401
467
|
: "Offline, the blocks are taken from their headers, each of which hashes to the hash the evidence names; confirm them against any node or explorer to remove that reliance.";
|
|
402
468
|
const pins = get("attestation.pins");
|
|
403
469
|
const pinLine = pins?.result === "TRUE" ? ` ${pins.detail.replace(/^PCR0 [0-9a-f]+… is /, "The enclave image is ")}.` : pins?.result === "UNDETERMINED" ? ` ${pins.detail}.` : !pins ? " The proof carries no attestation, so which enclave image signed it is not established." : "";
|
|
404
|
-
const withheld =
|
|
470
|
+
const withheld = (floorTimeWithheld ? ` The floor block's time is not used as a bound: ${floorTimeWithheld}.` : "")
|
|
471
|
+
+ (baseTimeWithheld ? ` The record is in a Base block, but its time is not used as a bound: ${baseTimeWithheld}.` : "");
|
|
405
472
|
const lead = verdict === "UNDETERMINED" ? "Not judged in full. " : "";
|
|
406
473
|
return `${lead}${subject} ${after}${by}${settled}${before}. Position ${position} of epoch ${epoch}…. Rests on: ${rests.join(", ")}. ${tail}${withheld}${pinLine}`;
|
|
407
474
|
}
|