@cello-protocol/daemon 0.0.23 → 0.0.25
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/dist/bin/cello-daemon.js +16 -65
- package/dist/bin/cello-daemon.js.map +1 -1
- package/dist/bundled-consortium-manifest.d.ts +45 -0
- package/dist/bundled-consortium-manifest.d.ts.map +1 -0
- package/dist/bundled-consortium-manifest.js +79 -0
- package/dist/bundled-consortium-manifest.js.map +1 -0
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +176 -12
- package/dist/daemon.js.map +1 -1
- package/dist/directory-bootstrap.d.ts +65 -0
- package/dist/directory-bootstrap.d.ts.map +1 -1
- package/dist/directory-bootstrap.js +105 -2
- package/dist/directory-bootstrap.js.map +1 -1
- package/dist/file-manifest-provider.d.ts +19 -0
- package/dist/file-manifest-provider.d.ts.map +1 -1
- package/dist/file-manifest-provider.js +32 -0
- package/dist/file-manifest-provider.js.map +1 -1
- package/dist/manifest-deps.d.ts +36 -0
- package/dist/manifest-deps.d.ts.map +1 -0
- package/dist/manifest-deps.js +111 -0
- package/dist/manifest-deps.js.map +1 -0
- package/dist/seal-frontier-verify.d.ts +45 -0
- package/dist/seal-frontier-verify.d.ts.map +1 -1
- package/dist/seal-frontier-verify.js +49 -0
- package/dist/seal-frontier-verify.js.map +1 -1
- package/dist/seal-receipt-upgrade.d.ts +30 -0
- package/dist/seal-receipt-upgrade.d.ts.map +1 -0
- package/dist/seal-receipt-upgrade.js +49 -0
- package/dist/seal-receipt-upgrade.js.map +1 -0
- package/dist/session-node-manager.d.ts +11 -0
- package/dist/session-node-manager.d.ts.map +1 -1
- package/dist/session-node-manager.js +21 -0
- package/dist/session-node-manager.js.map +1 -1
- package/package.json +3 -3
|
@@ -86,6 +86,17 @@ export interface DirectoryEndpointResolverOptions {
|
|
|
86
86
|
directoryUrl?: string;
|
|
87
87
|
/** Injectable fetch for testing. */
|
|
88
88
|
fetchFn?: typeof fetch;
|
|
89
|
+
/**
|
|
90
|
+
* Whether a fresh /bootstrap failure falls back to the last known-good endpoint (default true).
|
|
91
|
+
*
|
|
92
|
+
* FINDING-4: set FALSE when this resolver is used as the PRIMARY probe inside
|
|
93
|
+
* createRosterAwareEndpointResolver. There, the stale-last-known-good fallback is HARMFUL — it
|
|
94
|
+
* masks a dead primary (a fresh failure returns the cached dead endpoint, so the wrapper never
|
|
95
|
+
* observes the primary as "down" and never fails over to the roster). With staleFallback:false a
|
|
96
|
+
* fresh failure returns null, and the roster becomes the real (and only) fallback. The default
|
|
97
|
+
* (true) preserves the M6/single-node backward-compat behavior for callers that are NOT wrapped.
|
|
98
|
+
*/
|
|
99
|
+
staleFallback?: boolean;
|
|
89
100
|
}
|
|
90
101
|
/**
|
|
91
102
|
* Build an async `getDirectoryEndpoint` for createSignalingConnect.
|
|
@@ -97,4 +108,58 @@ export interface DirectoryEndpointResolverOptions {
|
|
|
97
108
|
* known-good endpoint so a transient /bootstrap blip doesn't strand a working daemon.
|
|
98
109
|
*/
|
|
99
110
|
export declare function createDirectoryEndpointResolver(opts: DirectoryEndpointResolverOptions): () => Promise<DirectoryEndpoint | null>;
|
|
111
|
+
export interface RosterAwareResolverOptions {
|
|
112
|
+
/**
|
|
113
|
+
* Resolve the PRIMARY (configured) directory endpoint — typically the result of
|
|
114
|
+
* createDirectoryEndpointResolver (probes CELLO_DIRECTORY_URL's /bootstrap).
|
|
115
|
+
*/
|
|
116
|
+
primaryResolver: () => Promise<DirectoryEndpoint | null>;
|
|
117
|
+
/**
|
|
118
|
+
* Resolve the CURRENTLY-REACHABLE consortium roster. Each member returned has already
|
|
119
|
+
* had its /bootstrap probed (manifestNodesToEndpoints skips unreachable nodes), so a
|
|
120
|
+
* member's presence in the returned array IS its reachability. NULL on the M6/M7
|
|
121
|
+
* back-compat path (no consortium manifest configured) → no failover, primary-only.
|
|
122
|
+
*/
|
|
123
|
+
getConsortiumRoster: () => Promise<ConsortiumEndpoint[] | null>;
|
|
124
|
+
logger: Logger;
|
|
125
|
+
/**
|
|
126
|
+
* Test seam: order the fallback candidates. Production defaults to a Fisher-Yates
|
|
127
|
+
* shuffle so clients don't stampede one node when the primary goes down (CLAUDE.md
|
|
128
|
+
* redundancy invariant). Tests inject an identity shuffle for deterministic ordering.
|
|
129
|
+
*/
|
|
130
|
+
shuffle?: <T>(items: T[]) => T[];
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Wrap a single-node primary resolver with the consortium roster so the signaling
|
|
134
|
+
* dialer (and the ceremony endpoint that shares this instance) route AROUND a down
|
|
135
|
+
* primary directory node instead of retrying the single primary URL forever — the
|
|
136
|
+
* FINDING-4 bootstrap SPOF fix, honoring the sovereign-node REDUNDANCY invariant.
|
|
137
|
+
*
|
|
138
|
+
* Selection policy, per getDirectoryEndpoint() call:
|
|
139
|
+
* 1. Sticky-until-fail — while riding a non-primary fallback, KEEP it as long as it's
|
|
140
|
+
* still in the reachable roster. Do NOT churn back to the primary when it recovers
|
|
141
|
+
* (no flapping / reconnect storm). The fallback's multiaddr is refreshed from the
|
|
142
|
+
* fresh roster match each call.
|
|
143
|
+
* 2. Primary-first — otherwise try the configured node. This is also the healthy
|
|
144
|
+
* steady state: when the primary resolves, we return WITHOUT probing the roster
|
|
145
|
+
* (no per-connect roster cost while everything is nominal).
|
|
146
|
+
* 3. Fallback — if the primary is down, fail over to a reachable roster member. The
|
|
147
|
+
* order is randomized (across the members other than the dead primary) so clients
|
|
148
|
+
* spread across the survivors. Emits directory.bootstrap.failover on a change so an
|
|
149
|
+
* operator sees the client is now running on a non-home node.
|
|
150
|
+
* 4. Return null only when NOTHING resolves (primary down AND roster empty/absent) —
|
|
151
|
+
* the unchanged all-nodes-down failure mode, no crash.
|
|
152
|
+
*
|
|
153
|
+
* ONE instance is shared across the daemon's signaling connect and its ceremony
|
|
154
|
+
* getDirectoryEndpoint so signaling + ceremonies stay on the SAME directory node and
|
|
155
|
+
* fail over together (a coherent per-daemon directory selection).
|
|
156
|
+
*
|
|
157
|
+
* Scope note (FINDING-4 sufficiency, unproven): stickiness here is by ROSTER
|
|
158
|
+
* REACHABILITY, not by observed connect success — the resolver is not told whether a
|
|
159
|
+
* dial/auth against the returned endpoint actually succeeded. A node whose /bootstrap
|
|
160
|
+
* resolves is served by that same node, so resolvable ≈ connectable in practice; the
|
|
161
|
+
* live kill-primary failover test is the real proof that presence resolution, relay
|
|
162
|
+
* assignment, and the FROST ceremony all work against a non-home directory.
|
|
163
|
+
*/
|
|
164
|
+
export declare function createRosterAwareEndpointResolver(opts: RosterAwareResolverOptions): () => Promise<DirectoryEndpoint | null>;
|
|
100
165
|
//# sourceMappingURL=directory-bootstrap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directory-bootstrap.d.ts","sourceRoot":"","sources":["../src/directory-bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,8FAA8F;AAC9F,eAAO,MAAM,wBAAwB,2CAA2C,CAAC;AAEjF;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GAAG,MAAM,CAEjG;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE,OAAO,KAAa,GAC5B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAiBxB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKzE;AAID,0FAA0F;AAC1F,MAAM,WAAW,kBAAkB;IACjC,mEAAmE;IACnE,MAAM,EAAE,MAAM,CA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mBAAmB,EAAE,MAAM,OAAO,CAAC,kBAAkB,EAAE,GAAG,IAAI,CAAC,CAAC;IAChE,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;CAClC;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,0BAA0B,GAC/B,MAAM,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CA8DzC"}
|
|
@@ -136,6 +136,7 @@ export async function manifestNodesToEndpoints(nodes, opts) {
|
|
|
136
136
|
export function createDirectoryEndpointResolver(opts) {
|
|
137
137
|
const directoryUrl = opts.directoryUrl ?? resolveDirectoryUrl();
|
|
138
138
|
const fetchFn = opts.fetchFn ?? fetch;
|
|
139
|
+
const staleFallback = opts.staleFallback ?? true;
|
|
139
140
|
let lastGood = null;
|
|
140
141
|
return async function getDirectoryEndpoint() {
|
|
141
142
|
const multiaddr = await fetchBootstrapMultiaddr(directoryUrl, fetchFn);
|
|
@@ -154,12 +155,114 @@ export function createDirectoryEndpointResolver(opts) {
|
|
|
154
155
|
else {
|
|
155
156
|
opts.logger.warn("directory.bootstrap.unavailable", { directoryUrl });
|
|
156
157
|
}
|
|
157
|
-
// Fresh resolution failed — reuse the last known-good endpoint if we have one
|
|
158
|
-
|
|
158
|
+
// Fresh resolution failed — reuse the last known-good endpoint if we have one AND stale fallback
|
|
159
|
+
// is enabled. When disabled (the failover-wrapper's primary probe), a fresh failure is reported
|
|
160
|
+
// as null so the roster can take over instead of the caller looping on a dead endpoint.
|
|
161
|
+
if (staleFallback && lastGood) {
|
|
159
162
|
opts.logger.warn("directory.bootstrap.using_last_known", { directoryUrl, peerId: lastGood.peerId });
|
|
160
163
|
return lastGood;
|
|
161
164
|
}
|
|
162
165
|
return null;
|
|
163
166
|
};
|
|
164
167
|
}
|
|
168
|
+
/** In-place-safe Fisher-Yates shuffle returning a NEW array (never mutates the input). */
|
|
169
|
+
function fisherYatesShuffle(items) {
|
|
170
|
+
const out = items.slice();
|
|
171
|
+
for (let i = out.length - 1; i > 0; i--) {
|
|
172
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
173
|
+
[out[i], out[j]] = [out[j], out[i]];
|
|
174
|
+
}
|
|
175
|
+
return out;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Wrap a single-node primary resolver with the consortium roster so the signaling
|
|
179
|
+
* dialer (and the ceremony endpoint that shares this instance) route AROUND a down
|
|
180
|
+
* primary directory node instead of retrying the single primary URL forever — the
|
|
181
|
+
* FINDING-4 bootstrap SPOF fix, honoring the sovereign-node REDUNDANCY invariant.
|
|
182
|
+
*
|
|
183
|
+
* Selection policy, per getDirectoryEndpoint() call:
|
|
184
|
+
* 1. Sticky-until-fail — while riding a non-primary fallback, KEEP it as long as it's
|
|
185
|
+
* still in the reachable roster. Do NOT churn back to the primary when it recovers
|
|
186
|
+
* (no flapping / reconnect storm). The fallback's multiaddr is refreshed from the
|
|
187
|
+
* fresh roster match each call.
|
|
188
|
+
* 2. Primary-first — otherwise try the configured node. This is also the healthy
|
|
189
|
+
* steady state: when the primary resolves, we return WITHOUT probing the roster
|
|
190
|
+
* (no per-connect roster cost while everything is nominal).
|
|
191
|
+
* 3. Fallback — if the primary is down, fail over to a reachable roster member. The
|
|
192
|
+
* order is randomized (across the members other than the dead primary) so clients
|
|
193
|
+
* spread across the survivors. Emits directory.bootstrap.failover on a change so an
|
|
194
|
+
* operator sees the client is now running on a non-home node.
|
|
195
|
+
* 4. Return null only when NOTHING resolves (primary down AND roster empty/absent) —
|
|
196
|
+
* the unchanged all-nodes-down failure mode, no crash.
|
|
197
|
+
*
|
|
198
|
+
* ONE instance is shared across the daemon's signaling connect and its ceremony
|
|
199
|
+
* getDirectoryEndpoint so signaling + ceremonies stay on the SAME directory node and
|
|
200
|
+
* fail over together (a coherent per-daemon directory selection).
|
|
201
|
+
*
|
|
202
|
+
* Scope note (FINDING-4 sufficiency, unproven): stickiness here is by ROSTER
|
|
203
|
+
* REACHABILITY, not by observed connect success — the resolver is not told whether a
|
|
204
|
+
* dial/auth against the returned endpoint actually succeeded. A node whose /bootstrap
|
|
205
|
+
* resolves is served by that same node, so resolvable ≈ connectable in practice; the
|
|
206
|
+
* live kill-primary failover test is the real proof that presence resolution, relay
|
|
207
|
+
* assignment, and the FROST ceremony all work against a non-home directory.
|
|
208
|
+
*/
|
|
209
|
+
export function createRosterAwareEndpointResolver(opts) {
|
|
210
|
+
const shuffle = opts.shuffle ?? fisherYatesShuffle;
|
|
211
|
+
// The endpoint we last returned, and whether it is a non-primary fallback we're riding.
|
|
212
|
+
let current = null;
|
|
213
|
+
let stuckToFallback = false;
|
|
214
|
+
// The primary's own identity, learned whenever the primary last resolved. Used to EXCLUDE the
|
|
215
|
+
// primary from the fallback set even when `current` no longer points at it — a flapping primary
|
|
216
|
+
// whose independent roster probe still lists it must never be re-picked as its own fallback.
|
|
217
|
+
let primaryPeerId = null;
|
|
218
|
+
return async function getDirectoryEndpoint() {
|
|
219
|
+
// 1. Sticky-until-fail: keep the current fallback while it is still reachable.
|
|
220
|
+
if (stuckToFallback && current) {
|
|
221
|
+
const roster = await opts.getConsortiumRoster();
|
|
222
|
+
const match = roster?.find((e) => e.peerId === current.peerId);
|
|
223
|
+
if (match) {
|
|
224
|
+
// Refresh the multiaddr from the fresh roster resolution; identity is unchanged.
|
|
225
|
+
current = { peerId: match.peerId, multiaddr: match.multiaddr };
|
|
226
|
+
return current;
|
|
227
|
+
}
|
|
228
|
+
// The fallback fell out of the reachable roster → re-select below.
|
|
229
|
+
opts.logger.warn("directory.bootstrap.failover.lost", { peerId: current.peerId });
|
|
230
|
+
}
|
|
231
|
+
// 2. Primary-first (and the healthy steady state — no roster probe when it resolves).
|
|
232
|
+
const primary = await opts.primaryResolver();
|
|
233
|
+
if (primary) {
|
|
234
|
+
if (stuckToFallback) {
|
|
235
|
+
opts.logger.info("directory.bootstrap.failover", { to: primary.peerId, restored: true });
|
|
236
|
+
}
|
|
237
|
+
current = primary;
|
|
238
|
+
primaryPeerId = primary.peerId;
|
|
239
|
+
stuckToFallback = false;
|
|
240
|
+
return primary;
|
|
241
|
+
}
|
|
242
|
+
// 3. Primary is down → fail over to a reachable roster member (randomized order).
|
|
243
|
+
const roster = await opts.getConsortiumRoster();
|
|
244
|
+
if (roster && roster.length > 0) {
|
|
245
|
+
// Exclude the (now-dead/flapping) primary and the current pointer; any OTHER reachable member
|
|
246
|
+
// is valid. Falls back to the full roster only if excluding leaves nothing (all members are
|
|
247
|
+
// the excluded ones — e.g. the roster is just the primary itself).
|
|
248
|
+
const excluded = new Set([current?.peerId, primaryPeerId].filter((p) => !!p));
|
|
249
|
+
const others = roster.filter((e) => !excluded.has(e.peerId));
|
|
250
|
+
const ordered = shuffle(others.length > 0 ? others : roster);
|
|
251
|
+
const chosen = ordered[0];
|
|
252
|
+
const next = { peerId: chosen.peerId, multiaddr: chosen.multiaddr };
|
|
253
|
+
if (!current || current.peerId !== chosen.peerId) {
|
|
254
|
+
opts.logger.warn("directory.bootstrap.failover", {
|
|
255
|
+
from: current?.peerId ?? null,
|
|
256
|
+
to: chosen.peerId,
|
|
257
|
+
nodeId: chosen.nodeId,
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
current = next;
|
|
261
|
+
stuckToFallback = true;
|
|
262
|
+
return next;
|
|
263
|
+
}
|
|
264
|
+
// 4. Nothing resolves.
|
|
265
|
+
return null;
|
|
266
|
+
};
|
|
267
|
+
}
|
|
165
268
|
//# sourceMappingURL=directory-bootstrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directory-bootstrap.js","sourceRoot":"","sources":["../src/directory-bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,8FAA8F;AAC9F,MAAM,CAAC,MAAM,wBAAwB,GA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@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ConsortiumManifest } from "@cello-protocol/protocol-types";
|
|
2
|
+
import { type ConsortiumManifestInput } from "@cello-protocol/crypto";
|
|
2
3
|
import type { IManifestProvider } from "@cello-protocol/transport";
|
|
3
4
|
export declare class ManifestLoadError extends Error {
|
|
4
5
|
readonly reason: string;
|
|
@@ -15,4 +16,22 @@ export declare class FileManifestProvider implements IManifestProvider {
|
|
|
15
16
|
getCurrentManifest(): ConsortiumManifest | null;
|
|
16
17
|
updateManifest(manifest: ConsortiumManifest): void;
|
|
17
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* EmbeddedManifestProvider — the production provider for the COMPILED-IN consortium roster
|
|
21
|
+
* (FINDING-4). Identical trust gate to FileManifestProvider (threshold officer-signature
|
|
22
|
+
* verification via `verifyManifest`, rejects an empty node set) but the manifest is an in-memory
|
|
23
|
+
* constant compiled into the client rather than a file on disk. This is what the daemon wires by
|
|
24
|
+
* default (no CELLO_CONSORTIUM_MANIFEST override), so the roster and step-6 directory-auth anchor
|
|
25
|
+
* are always present — they cannot be lost by a missing package file or a skipped build-copy step,
|
|
26
|
+
* and a corrupt/mis-signed embedded manifest fails CLOSED at load (ADV-002) rather than silently
|
|
27
|
+
* degrading. Expiry / version monotonicity remain the daemon's policy layer, exactly as for
|
|
28
|
+
* FileManifestProvider (see that class's note) — this provider does structure + signatures only.
|
|
29
|
+
*/
|
|
30
|
+
export declare class EmbeddedManifestProvider implements IManifestProvider {
|
|
31
|
+
#private;
|
|
32
|
+
constructor(input: ConsortiumManifestInput);
|
|
33
|
+
loadAndVerify(rootKeys: readonly string[], threshold: number): Promise<ConsortiumManifest>;
|
|
34
|
+
getCurrentManifest(): ConsortiumManifest | null;
|
|
35
|
+
updateManifest(manifest: ConsortiumManifest): void;
|
|
36
|
+
}
|
|
18
37
|
//# sourceMappingURL=file-manifest-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-manifest-provider.d.ts","sourceRoot":"","sources":["../src/file-manifest-provider.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"file-manifest-provider.d.ts","sourceRoot":"","sources":["../src/file-manifest-provider.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAkB,KAAK,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBACZ,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;CAK5C;AAED,MAAM,WAAW,wBAAwB;IACvC,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,oBAAqB,YAAW,iBAAiB;;gBAIhD,IAAI,EAAE,wBAAwB;IAIpC,aAAa,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA2BhG,kBAAkB,IAAI,kBAAkB,GAAG,IAAI;IAI/C,cAAc,CAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI;CAGnD;AAED;;;;;;;;;;GAUG;AACH,qBAAa,wBAAyB,YAAW,iBAAiB;;gBAIpD,KAAK,EAAE,uBAAuB;IAI1C,aAAa,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAS1F,kBAAkB,IAAI,kBAAkB,GAAG,IAAI;IAI/C,cAAc,CAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI;CAGnD"}
|
|
@@ -69,4 +69,36 @@ export class FileManifestProvider {
|
|
|
69
69
|
this.#manifest = manifest;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* EmbeddedManifestProvider — the production provider for the COMPILED-IN consortium roster
|
|
74
|
+
* (FINDING-4). Identical trust gate to FileManifestProvider (threshold officer-signature
|
|
75
|
+
* verification via `verifyManifest`, rejects an empty node set) but the manifest is an in-memory
|
|
76
|
+
* constant compiled into the client rather than a file on disk. This is what the daemon wires by
|
|
77
|
+
* default (no CELLO_CONSORTIUM_MANIFEST override), so the roster and step-6 directory-auth anchor
|
|
78
|
+
* are always present — they cannot be lost by a missing package file or a skipped build-copy step,
|
|
79
|
+
* and a corrupt/mis-signed embedded manifest fails CLOSED at load (ADV-002) rather than silently
|
|
80
|
+
* degrading. Expiry / version monotonicity remain the daemon's policy layer, exactly as for
|
|
81
|
+
* FileManifestProvider (see that class's note) — this provider does structure + signatures only.
|
|
82
|
+
*/
|
|
83
|
+
export class EmbeddedManifestProvider {
|
|
84
|
+
#input;
|
|
85
|
+
#manifest = null;
|
|
86
|
+
constructor(input) {
|
|
87
|
+
this.#input = input;
|
|
88
|
+
}
|
|
89
|
+
loadAndVerify(rootKeys, threshold) {
|
|
90
|
+
const result = verifyManifest(this.#input, rootKeys, threshold);
|
|
91
|
+
if (!result.ok) {
|
|
92
|
+
return Promise.reject(new ManifestLoadError("manifest_signature_invalid", result.detail));
|
|
93
|
+
}
|
|
94
|
+
this.#manifest = this.#input;
|
|
95
|
+
return Promise.resolve(this.#manifest);
|
|
96
|
+
}
|
|
97
|
+
getCurrentManifest() {
|
|
98
|
+
return this.#manifest;
|
|
99
|
+
}
|
|
100
|
+
updateManifest(manifest) {
|
|
101
|
+
this.#manifest = manifest;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
72
104
|
//# sourceMappingURL=file-manifest-provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-manifest-provider.js","sourceRoot":"","sources":["../src/file-manifest-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;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GAA8B,IAAI,CAAC;IAE5C,YAAY,KAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,aAAa,CAAC,QAA2B,EAAE,SAAiB;QAC1D,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;QAChE,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,iBAAiB,CAAC,4BAA4B,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QAC5F,CAAC;QACD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAuC,CAAC;QAC9D,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;IAED,kBAAkB;QAChB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,cAAc,CAAC,QAA4B;QACzC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composition helper for the daemon's consortium-manifest dependencies (M7 J-AUTH / FINDING-4).
|
|
3
|
+
*
|
|
4
|
+
* Extracted from bin/cello-daemon.ts so it can be unit-tested without triggering the bin's
|
|
5
|
+
* top-level main() (which spawns a live daemon on import).
|
|
6
|
+
*
|
|
7
|
+
* Two modes:
|
|
8
|
+
* - DEFAULT (no CELLO_CONSORTIUM_MANIFEST): load the COMPILED-IN consortium roster
|
|
9
|
+
* (bundled-consortium-manifest.ts) with step-6 directory identity auth ON — the full production
|
|
10
|
+
* posture that makes cold-boot directory failover possible (FINDING-4 redundancy invariant).
|
|
11
|
+
* - OVERRIDE (CELLO_CONSORTIUM_MANIFEST set): operator-supplied manifest FILE + env root keys /
|
|
12
|
+
* threshold, plus the optional background /manifest poll. The pre-FINDING-4 opt-in path.
|
|
13
|
+
*/
|
|
14
|
+
import { type IManifestProvider, type IDirectoryChallengeVerifier, type IManifestVersionStore, type IManifestPollScheduler } from "@cello-protocol/transport";
|
|
15
|
+
import type { Logger } from "./types.js";
|
|
16
|
+
export interface ManifestDeps {
|
|
17
|
+
manifestProvider?: IManifestProvider;
|
|
18
|
+
manifestRootKeys?: readonly string[];
|
|
19
|
+
manifestThreshold?: number;
|
|
20
|
+
challengeVerifier?: IDirectoryChallengeVerifier;
|
|
21
|
+
manifestVersionStore?: IManifestVersionStore;
|
|
22
|
+
manifestPollScheduler?: IManifestPollScheduler;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Build the consortium-manifest deps.
|
|
26
|
+
*
|
|
27
|
+
* CELLO_CONSORTIUM_MANIFEST absolute path to an override manifest JSON (opt-in)
|
|
28
|
+
* CELLO_CONSORTIUM_ROOT_KEYS comma-separated officer root pubkeys (hex) — override path only
|
|
29
|
+
* CELLO_CONSORTIUM_THRESHOLD minimum officer signatures (integer) — override path only
|
|
30
|
+
* CELLO_MANIFEST_POLL_MIN_MS / _MAX_MS optional background poll window — override path only
|
|
31
|
+
*
|
|
32
|
+
* The single manifestProvider instance is shared between startDaemon's loadAndVerify call and the
|
|
33
|
+
* ManifestDirectoryChallengeVerifier, so step-6 reads the same cached, verified manifest.
|
|
34
|
+
*/
|
|
35
|
+
export declare function buildManifestDeps(logger: Logger): ManifestDeps;
|
|
36
|
+
//# sourceMappingURL=manifest-deps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-deps.d.ts","sourceRoot":"","sources":["../src/manifest-deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC5B,MAAM,2BAA2B,CAAC;AASnC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAYzC,MAAM,WAAW,YAAY;IAC3B,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,2BAA2B,CAAC;IAChD,oBAAoB,CAAC,EAAE,qBAAqB,CAAC;IAC7C,qBAAqB,CAAC,EAAE,sBAAsB,CAAC;CAChD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CAgF9D"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composition helper for the daemon's consortium-manifest dependencies (M7 J-AUTH / FINDING-4).
|
|
3
|
+
*
|
|
4
|
+
* Extracted from bin/cello-daemon.ts so it can be unit-tested without triggering the bin's
|
|
5
|
+
* top-level main() (which spawns a live daemon on import).
|
|
6
|
+
*
|
|
7
|
+
* Two modes:
|
|
8
|
+
* - DEFAULT (no CELLO_CONSORTIUM_MANIFEST): load the COMPILED-IN consortium roster
|
|
9
|
+
* (bundled-consortium-manifest.ts) with step-6 directory identity auth ON — the full production
|
|
10
|
+
* posture that makes cold-boot directory failover possible (FINDING-4 redundancy invariant).
|
|
11
|
+
* - OVERRIDE (CELLO_CONSORTIUM_MANIFEST set): operator-supplied manifest FILE + env root keys /
|
|
12
|
+
* threshold, plus the optional background /manifest poll. The pre-FINDING-4 opt-in path.
|
|
13
|
+
*/
|
|
14
|
+
import { ManifestDirectoryChallengeVerifier, } from "@cello-protocol/transport";
|
|
15
|
+
import { FileManifestProvider, EmbeddedManifestProvider } from "./file-manifest-provider.js";
|
|
16
|
+
import { BUNDLED_CONSORTIUM_MANIFEST, BUNDLED_CONSORTIUM_ROOT_KEYS, BUNDLED_CONSORTIUM_THRESHOLD, } from "./bundled-consortium-manifest.js";
|
|
17
|
+
import { resolveDirectoryUrl } from "./directory-bootstrap.js";
|
|
18
|
+
import { RandomizedPollScheduler } from "./manifest-poll-scheduler.js";
|
|
19
|
+
/** Normalize a directory URL for comparison (trim, drop trailing slashes, lowercase). */
|
|
20
|
+
function normalizeUrl(u) {
|
|
21
|
+
return u.trim().replace(/\/+$/, "").toLowerCase();
|
|
22
|
+
}
|
|
23
|
+
/** The set of directory endpoints the bundled roster describes (normalized). */
|
|
24
|
+
const BUNDLED_ENDPOINTS = new Set(BUNDLED_CONSORTIUM_MANIFEST.nodes.map((n) => normalizeUrl(String(n["endpoint"]))));
|
|
25
|
+
/**
|
|
26
|
+
* Build the consortium-manifest deps.
|
|
27
|
+
*
|
|
28
|
+
* CELLO_CONSORTIUM_MANIFEST absolute path to an override manifest JSON (opt-in)
|
|
29
|
+
* CELLO_CONSORTIUM_ROOT_KEYS comma-separated officer root pubkeys (hex) — override path only
|
|
30
|
+
* CELLO_CONSORTIUM_THRESHOLD minimum officer signatures (integer) — override path only
|
|
31
|
+
* CELLO_MANIFEST_POLL_MIN_MS / _MAX_MS optional background poll window — override path only
|
|
32
|
+
*
|
|
33
|
+
* The single manifestProvider instance is shared between startDaemon's loadAndVerify call and the
|
|
34
|
+
* ManifestDirectoryChallengeVerifier, so step-6 reads the same cached, verified manifest.
|
|
35
|
+
*/
|
|
36
|
+
export function buildManifestDeps(logger) {
|
|
37
|
+
const manifestPath = process.env.CELLO_CONSORTIUM_MANIFEST;
|
|
38
|
+
if (!manifestPath) {
|
|
39
|
+
// FINDING-4 default: load the COMPILED-IN consortium roster so the daemon already knows every
|
|
40
|
+
// sovereign directory — and can fail over to a reachable one — even when its primary is down
|
|
41
|
+
// (the redundancy invariant), AND enforces step-6 directory identity auth against the bundled
|
|
42
|
+
// node pubkeys (defeats a /bootstrap MITM redirecting failover to a rogue directory). This is
|
|
43
|
+
// the full production posture with zero operator config. The manifest is re-verified against the
|
|
44
|
+
// pinned root keys at load by startDaemon (ADV-002 — a corrupt embedded manifest fails CLOSED,
|
|
45
|
+
// never a silent downgrade). No poll scheduler: the bundled roster is static; adopting runtime
|
|
46
|
+
// manifest updates via the /manifest poll is a separate opt-in reachable through the env path.
|
|
47
|
+
//
|
|
48
|
+
// GATE (do NOT enable step-6 against a directory the bundle can't authenticate): the bundled
|
|
49
|
+
// manifest is the trust anchor for the PRODUCTION consortium ONLY (the mygentic.ai directories
|
|
50
|
+
// it lists). When the operator has pointed CELLO_DIRECTORY_URL at a directory that is NOT in the
|
|
51
|
+
// bundle — local dev (`CELLO_ENV=local`) and the e2e spine harness both run their own local
|
|
52
|
+
// directory on 127.0.0.1 — the bundled node pubkeys don't describe it, so enforcing step-6 would
|
|
53
|
+
// wrongly reject every connection (key_not_in_manifest). In that case fall through to the M6
|
|
54
|
+
// backward-compat path (no roster, no step-6); those deployments opt into step-6 explicitly by
|
|
55
|
+
// supplying a matching manifest via CELLO_CONSORTIUM_MANIFEST. Unset URL → the production default
|
|
56
|
+
// (directory-us1.cello.mygentic.ai), which IS in the bundle, so real operators get the full posture.
|
|
57
|
+
const directoryUrl = normalizeUrl(resolveDirectoryUrl());
|
|
58
|
+
if (!BUNDLED_ENDPOINTS.has(directoryUrl)) {
|
|
59
|
+
logger.info("daemon.manifest.bundled.skipped", { directoryUrl, reason: "directory_not_in_bundled_roster" });
|
|
60
|
+
return {};
|
|
61
|
+
}
|
|
62
|
+
const manifestProvider = new EmbeddedManifestProvider(BUNDLED_CONSORTIUM_MANIFEST);
|
|
63
|
+
const challengeVerifier = new ManifestDirectoryChallengeVerifier(manifestProvider);
|
|
64
|
+
logger.info("daemon.manifest.bundled", {
|
|
65
|
+
version: BUNDLED_CONSORTIUM_MANIFEST.version,
|
|
66
|
+
nodeCount: BUNDLED_CONSORTIUM_MANIFEST.nodes.length,
|
|
67
|
+
rootKeyCount: BUNDLED_CONSORTIUM_ROOT_KEYS.length,
|
|
68
|
+
threshold: BUNDLED_CONSORTIUM_THRESHOLD,
|
|
69
|
+
});
|
|
70
|
+
return {
|
|
71
|
+
manifestProvider,
|
|
72
|
+
manifestRootKeys: BUNDLED_CONSORTIUM_ROOT_KEYS,
|
|
73
|
+
manifestThreshold: BUNDLED_CONSORTIUM_THRESHOLD,
|
|
74
|
+
challengeVerifier,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
const rootKeysRaw = process.env.CELLO_CONSORTIUM_ROOT_KEYS ?? "";
|
|
78
|
+
const manifestRootKeys = rootKeysRaw.split(",").map((k) => k.trim()).filter((k) => k.length > 0);
|
|
79
|
+
const manifestThreshold = Number.parseInt(process.env.CELLO_CONSORTIUM_THRESHOLD ?? "", 10);
|
|
80
|
+
if (manifestRootKeys.length === 0 || Number.isNaN(manifestThreshold)) {
|
|
81
|
+
throw new Error("CELLO_CONSORTIUM_MANIFEST is set but CELLO_CONSORTIUM_ROOT_KEYS / CELLO_CONSORTIUM_THRESHOLD are missing or invalid");
|
|
82
|
+
}
|
|
83
|
+
const manifestProvider = new FileManifestProvider({ path: manifestPath });
|
|
84
|
+
const challengeVerifier = new ManifestDirectoryChallengeVerifier(manifestProvider);
|
|
85
|
+
// DOD-AUTH-2: background manifest poll. The directory is re-polled on a randomized 6–12h interval
|
|
86
|
+
// (thundering-herd avoidance) and a newer signed manifest is adopted. The interval is env-injectable
|
|
87
|
+
// so the live binary test can poll sub-second instead of waiting hours; production leaves these
|
|
88
|
+
// unset → the 6–12h default window. Both-or-neither, positive, min <= max — a partial/invalid
|
|
89
|
+
// override fails LOUDLY rather than silently reverting or producing a negative (tight-loop) delay.
|
|
90
|
+
const rawPollMin = process.env.CELLO_MANIFEST_POLL_MIN_MS;
|
|
91
|
+
const rawPollMax = process.env.CELLO_MANIFEST_POLL_MAX_MS;
|
|
92
|
+
let pollOpts;
|
|
93
|
+
if (rawPollMin !== undefined || rawPollMax !== undefined) {
|
|
94
|
+
const minMs = Number.parseInt(rawPollMin ?? "", 10);
|
|
95
|
+
const maxMs = Number.parseInt(rawPollMax ?? "", 10);
|
|
96
|
+
if (Number.isNaN(minMs) || Number.isNaN(maxMs) || minMs <= 0 || maxMs < minMs) {
|
|
97
|
+
throw new Error("CELLO_MANIFEST_POLL_MIN_MS / _MAX_MS must BOTH be set to positive integers with min <= max");
|
|
98
|
+
}
|
|
99
|
+
pollOpts = { minMs, maxMs };
|
|
100
|
+
}
|
|
101
|
+
const manifestPollScheduler = new RandomizedPollScheduler(pollOpts);
|
|
102
|
+
logger.info("daemon.manifest.configured", {
|
|
103
|
+
manifestPath,
|
|
104
|
+
rootKeyCount: manifestRootKeys.length,
|
|
105
|
+
threshold: manifestThreshold,
|
|
106
|
+
pollMinMs: pollOpts?.minMs ?? null,
|
|
107
|
+
pollMaxMs: pollOpts?.maxMs ?? null,
|
|
108
|
+
});
|
|
109
|
+
return { manifestProvider, manifestRootKeys, manifestThreshold, challengeVerifier, manifestPollScheduler };
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=manifest-deps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-deps.js","sourceRoot":"","sources":["../src/manifest-deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,kCAAkC,GAKnC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAGvE,yFAAyF;AACzF,SAAS,YAAY,CAAC,CAAS;IAC7B,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AACpD,CAAC;AAED,gFAAgF;AAChF,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAC/B,2BAA2B,CAAC,KAAK,CAAC,GAAG,CAA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AC,UAAU,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QACpD,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,KAAK,EAAE,CAAC;YAC9E,MAAM,IAAI,KAAK,CACb,4FAA4F,CAC7F,CAAC;QACJ,CAAC;QACD,QAAQ,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAC9B,CAAC;IACD,MAAM,qBAAqB,GAAG,IAAI,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IACpE,MAAM,CAAC,IAAI,CAAC,4BAA4B,EAAE;QACxC,YAAY;QACZ,YAAY,EAAE,gBAAgB,CAAC,MAAM;QACrC,SAAS,EAAE,iBAAiB;QAC5B,SAAS,EAAE,QAAQ,EAAE,KAAK,IAAI,IAAI;QAClC,SAAS,EAAE,QAAQ,EAAE,KAAK,IAAI,IAAI;KACnC,CAAC,CAAC;IACH,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,CAAC;AAC7G,CAAC"}
|
|
@@ -55,4 +55,49 @@ export declare function findInflatedFrontier(participants: ReadonlyArray<{
|
|
|
55
55
|
publishedFrontier: number;
|
|
56
56
|
derivedFrontier: number;
|
|
57
57
|
} | null;
|
|
58
|
+
export interface UnilateralFrontierParticipant {
|
|
59
|
+
pubkey: string;
|
|
60
|
+
content_frontier_seq: number;
|
|
61
|
+
attestation_mode: string;
|
|
62
|
+
}
|
|
63
|
+
export interface UnilateralFrontierCheck {
|
|
64
|
+
/**
|
|
65
|
+
* - verified: leaves present, no CLIENT-VERIFIABLE ('live') frontier exceeded its leaves.
|
|
66
|
+
* - corrected: leaves present, one or more 'live' frontiers were inflated and overridden
|
|
67
|
+
* DOWN to the re-derived value (see `corrections`).
|
|
68
|
+
* - directory_attested: no frontier_leaves shipped (a pre-FINDING-5 directory) — the cert stays
|
|
69
|
+
* directory-attested (FINDING-3 behavior). No correction possible.
|
|
70
|
+
* - leaves_invalid: frontier_leaves are forged / cross-session (reDeriveFrontiers failed) — a
|
|
71
|
+
* tamper signal; persist the directory-attested frontiers, log loudly. NEVER
|
|
72
|
+
* rejected (the unilateral dedup guard makes rejection an unrecoverable
|
|
73
|
+
* dead-end — cascade-2 reviewer Critical 2).
|
|
74
|
+
*/
|
|
75
|
+
status: "verified" | "corrected" | "directory_attested" | "leaves_invalid";
|
|
76
|
+
/** lowercased pubkey → corrected content_frontier_seq, for inflated 'live' parties. The caller
|
|
77
|
+
* lowers the persisted frontier to this before recording the receipt. Empty unless status is 'corrected'. */
|
|
78
|
+
corrections: Map<string, number>;
|
|
79
|
+
reason?: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* FINDING-5 — the present party independently re-verifies (and CORRECTS) the UNILATERAL receipt's
|
|
83
|
+
* frontiers. OVERRIDE, never reject.
|
|
84
|
+
*
|
|
85
|
+
* The unilateral legibility is FROST-notarized by the directory but the frontier VALUES are NOT bound
|
|
86
|
+
* into the seal signature (unlike the bilateral seal, whose signer binds the legibility hash), so the
|
|
87
|
+
* client must not trust them blindly. Because the directory-side dedup guard makes a client REJECTION
|
|
88
|
+
* of a unilateral cert unrecoverable (a retry close is silently ignored — no receipt ever produced,
|
|
89
|
+
* worse than FINDING-3), the client CORRECTS rather than rejects:
|
|
90
|
+
* - CLIENT-VERIFIABLE ('live') party: the present (submitting) party carries all its own signed
|
|
91
|
+
* leaves, so its content_frontier_seq is fully re-derivable. The directory cannot forge signed
|
|
92
|
+
* leaves, so the re-derived value is the provable truth → an inflated published value is OVERRIDDEN
|
|
93
|
+
* DOWN to it (inflation neutralized, receipt still persisted).
|
|
94
|
+
* - DIRECTORY-ATTESTED ('absent' / anything not 'live') party: its received-frontier remainder
|
|
95
|
+
* (acks of the present party's content) lives with the absent party and was never provided, so a
|
|
96
|
+
* published value ABOVE what the present party can derive is not provably inflation — left
|
|
97
|
+
* untouched, directory-attested (already marked per-participant).
|
|
98
|
+
*
|
|
99
|
+
* The caller applies `corrections` to the persisted legibility and logs per `status`; it ALWAYS
|
|
100
|
+
* persists a receipt (never dead-ends the close).
|
|
101
|
+
*/
|
|
102
|
+
export declare function checkUnilateralFrontier(participants: ReadonlyArray<UnilateralFrontierParticipant>, frontierLeaves: SealFrontierLeaf[] | undefined, sessionId: Uint8Array): UnilateralFrontierCheck;
|
|
58
103
|
//# sourceMappingURL=seal-frontier-verify.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seal-frontier-verify.d.ts","sourceRoot":"","sources":["../src/seal-frontier-verify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAKH,MAAM,WAAW,gBAAgB;IAC/B,eAAe,EAAE,UAAU,CAAC;IAC5B,aAAa,EAAE,UAAU,CAAC;IAC1B,gBAAgB,EAAE,UAAU,CAAC;CAC9B;AAED,MAAM,MAAM,cAAc,GACtB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GAC5C;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,wBAAwB,GAAG,gBAAgB,GAAG,uBAAuB,CAAA;CAAE,CAAC;AAQjG;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,EAAE,EAAE,iBAAiB,EAAE,UAAU,GAAG,cAAc,CA0B3G;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,aAAa,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,oBAAoB,EAAE,MAAM,CAAA;CAAE,CAAC,EAC7E,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3B;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,M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oB,GAAG,gBAAgB,CAAC;IAC3E;kHAC8G;IAC9G,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,aAAa,CAAC,6BAA6B,CAAC,EAC1D,cAAc,EAAE,gBAAgB,EAAE,GAAG,SAAS,EAC9C,SAAS,EAAE,UAAU,GACpB,uBAAuB,CAyBzB"}
|
|
@@ -84,4 +84,53 @@ export function findInflatedFrontier(participants, derived) {
|
|
|
84
84
|
}
|
|
85
85
|
return null;
|
|
86
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* FINDING-5 — the present party independently re-verifies (and CORRECTS) the UNILATERAL receipt's
|
|
89
|
+
* frontiers. OVERRIDE, never reject.
|
|
90
|
+
*
|
|
91
|
+
* The unilateral legibility is FROST-notarized by the directory but the frontier VALUES are NOT bound
|
|
92
|
+
* into the seal signature (unlike the bilateral seal, whose signer binds the legibility hash), so the
|
|
93
|
+
* client must not trust them blindly. Because the directory-side dedup guard makes a client REJECTION
|
|
94
|
+
* of a unilateral cert unrecoverable (a retry close is silently ignored — no receipt ever produced,
|
|
95
|
+
* worse than FINDING-3), the client CORRECTS rather than rejects:
|
|
96
|
+
* - CLIENT-VERIFIABLE ('live') party: the present (submitting) party carries all its own signed
|
|
97
|
+
* leaves, so its content_frontier_seq is fully re-derivable. The directory cannot forge signed
|
|
98
|
+
* leaves, so the re-derived value is the provable truth → an inflated published value is OVERRIDDEN
|
|
99
|
+
* DOWN to it (inflation neutralized, receipt still persisted).
|
|
100
|
+
* - DIRECTORY-ATTESTED ('absent' / anything not 'live') party: its received-frontier remainder
|
|
101
|
+
* (acks of the present party's content) lives with the absent party and was never provided, so a
|
|
102
|
+
* published value ABOVE what the present party can derive is not provably inflation — left
|
|
103
|
+
* untouched, directory-attested (already marked per-participant).
|
|
104
|
+
*
|
|
105
|
+
* The caller applies `corrections` to the persisted legibility and logs per `status`; it ALWAYS
|
|
106
|
+
* persists a receipt (never dead-ends the close).
|
|
107
|
+
*/
|
|
108
|
+
export function checkUnilateralFrontier(participants, frontierLeaves, sessionId) {
|
|
109
|
+
const corrections = new Map();
|
|
110
|
+
const haveLeaves = Array.isArray(frontierLeaves) && frontierLeaves.length > 0;
|
|
111
|
+
// Pre-FINDING-5 directory (no leaves): keep FINDING-3's directory-attested behavior. Never reject —
|
|
112
|
+
// rejecting would regress the shipped FINDING-3 receipt and break unilateral seals against a
|
|
113
|
+
// not-yet-upgraded directory during rollout.
|
|
114
|
+
if (!haveLeaves)
|
|
115
|
+
return { status: "directory_attested", corrections };
|
|
116
|
+
const rederived = reDeriveFrontiers(frontierLeaves, sessionId);
|
|
117
|
+
// Forged / cross-session leaves are the STRONGEST tamper evidence, so they get the strongest
|
|
118
|
+
// correction — treat them as ZERO trustworthy evidence (an empty derived map), which drives any
|
|
119
|
+
// 'live' frontier > 0 down to 0. (Leaving the published value untouched would make malformed leaves
|
|
120
|
+
// an EASIER inflation bypass than shipping none — cascade-2 re-review.) We still never REJECT
|
|
121
|
+
// (the directory dedup guard makes rejection an unrecoverable dead-end); the caller logs loudly.
|
|
122
|
+
const derived = rederived.ok ? rederived.frontiers : new Map();
|
|
123
|
+
// Only CLIENT-VERIFIABLE ('live') parties are re-derivable; override any value above the provable
|
|
124
|
+
// one DOWN to it. The absent party is directory-attested (its remainder is not re-derivable here).
|
|
125
|
+
for (const p of participants) {
|
|
126
|
+
if (p.attestation_mode !== "live")
|
|
127
|
+
continue;
|
|
128
|
+
const d = derived.get(p.pubkey.toLowerCase()) ?? 0;
|
|
129
|
+
if (p.content_frontier_seq > d)
|
|
130
|
+
corrections.set(p.pubkey.toLowerCase(), d);
|
|
131
|
+
}
|
|
132
|
+
if (!rederived.ok)
|
|
133
|
+
return { status: "leaves_invalid", corrections, reason: rederived.reason };
|
|
134
|
+
return { status: corrections.size > 0 ? "corrected" : "verified", corrections };
|
|
135
|
+
}
|
|
87
136
|
//# sourceMappingURL=seal-frontier-verify.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seal-frontier-verify.js","sourceRoot":"","sources":["../src/seal-frontier-verify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAYhC,SAAS,UAAU,CAAC,CAAa,EAAE,CAAa;IAC9C,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,KAAK,CAAC;IACnE,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAA0B,EAAE,iBAA6B;IACzF,MAAM,SAAS,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC5C,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QAC1B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC7E,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,wBAAwB,EAAE,CAAC;QACzD,CAAC;QACD,IAAI,GAAY,CAAC;QACjB,IAAI,CAAC;YACH,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACrC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,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