@cello-protocol/transport 0.0.64 → 0.0.66
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/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/manifest-stubs.d.ts +9 -1
- package/dist/manifest-stubs.d.ts.map +1 -1
- package/dist/manifest-stubs.js +75 -2
- package/dist/manifest-stubs.js.map +1 -1
- package/dist/node.d.ts +144 -1
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +349 -3
- package/dist/node.js.map +1 -1
- package/dist/types.d.ts +112 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { createNode, isValidMultiaddr, buildConfiguredHosts } from "./node.js";
|
|
7
7
|
export { resolveConnectionMonitorConfig, WAN_PING_TIMEOUT_FLOOR_MS } from "./node.js";
|
|
8
|
+
export { resolveConnectionLimits, selectIdleConnections, recordStreamActivity, IDLE_CONNECTION_GRACE_MS, IDLE_CONNECTION_SWEEP_MS, DECLARED_MAX_CONNECTIONS, DECLARED_INBOUND_CONNECTION_THRESHOLD, DECLARED_MAX_INCOMING_PENDING, DECLARED_INBOUND_UPGRADE_TIMEOUT_MS, } from "./node.js";
|
|
9
|
+
export type { ResolvedConnectionLimits, IdleConnectionCandidate, IdleReapEvent, ConnectionCounts, } from "./node.js";
|
|
8
10
|
export type { ResolvedConnectionMonitorConfig } from "./node.js";
|
|
9
11
|
export type { CelloNode, CreateNodeOptions, CelloStreamHandler } from "./types.js";
|
|
10
12
|
export type { CelloTransportError, ProtocolNotSupportedError, ConnectionLostError, NodeStoppedError, ListenFailedError, } from "./types.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.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AyB,GAC1B,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D,YAAY,EACV,qBAAqB,EACrB,iBAAiB,EACjB,2BAA2B,EAC3B,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,8BAA8B,EAC9B,kCAAkC,EAClC,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,gBAAgB,EAChB,8BAA8B,EAC9B,aAAa,GACd,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,eAAe,EACf,MAAM,IAAI,yBAAyB,EACnC,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,8 @@ export { createNode, isValidMultiaddr, buildConfiguredHosts } from "./node.js";
|
|
|
8
8
|
// capability marker a consumer can test for — the relay refuses to start on a transport that
|
|
9
9
|
// predates the policy, because there the connectionMonitor option is silently ignored.
|
|
10
10
|
export { resolveConnectionMonitorConfig, WAN_PING_TIMEOUT_FLOOR_MS } from "./node.js";
|
|
11
|
+
// DOD-M15-IDLE-CONNS-1 — the declared connection posture and the idle-connection judgement.
|
|
12
|
+
export { resolveConnectionLimits, selectIdleConnections, recordStreamActivity, IDLE_CONNECTION_GRACE_MS, IDLE_CONNECTION_SWEEP_MS, DECLARED_MAX_CONNECTIONS, DECLARED_INBOUND_CONNECTION_THRESHOLD, DECLARED_MAX_INCOMING_PENDING, DECLARED_INBOUND_UPGRADE_TIMEOUT_MS, } from "./node.js";
|
|
11
13
|
export { CELLO_PROTOCOL_ID, CIRCUIT_RELAY_V2_HOP_PROTOCOL_ID, CELLO_CONTENT_PROTOCOL_ID, AUTONAT_PROTOCOL_ID } from "./protocols.js";
|
|
12
14
|
export { LocalAutoNatStub, DEFAULT_DIALABILITY } from "./autonat.js";
|
|
13
15
|
// CELLO-M7-TRANSPORT-001: real IAutoNatService over a live CelloNode (emits the
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAC/E,iGAAiG;AACjG,6FAA6F;AAC7F,uFAAuF;AACvF,OAAO,EAAE,8BAA8B,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAC/E,iGAAiG;AACjG,6FAA6F;AAC7F,uFAAuF;AACvF,OAAO,EAAE,8BAA8B,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AACtF,4FAA4F;AAC5F,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,qCAAqC,EACrC,6BAA6B,EAC7B,mCAAmC,GACpC,MAAM,WAAW,CAAC;AAgBnB,OAAO,EAAE,iBAAiB,EAAE,gCAAgC,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrI,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACrE,gFAAgF;AAChF,kFAAkF;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAO1D,yDAAyD;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAgB1D,iDAAiD;AACjD,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,8BAA8B,EAC9B,kCAAkC,EAClC,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAE7B,8EAA8E;AAC9E,OAAO,EACL,gBAAgB,EAChB,8BAA8B,EAC9B,aAAa,GACd,MAAM,wBAAwB,CAAC"}
|
package/dist/manifest-stubs.d.ts
CHANGED
|
@@ -51,9 +51,17 @@ export declare class TestDirectoryChallengeVerifier implements IDirectoryChallen
|
|
|
51
51
|
* 4. Call ed25519.verify(sigBytes, tbsBytes, pubkeyBytes).
|
|
52
52
|
* 5. Return the result; catch all errors and return false.
|
|
53
53
|
*/
|
|
54
|
+
/**
|
|
55
|
+
* ⚠️ NOT A STUB, despite the filename. Wired in production twice by `manifest-deps.ts`. Anyone
|
|
56
|
+
* reading `manifest-stubs.ts` and assuming test-only is wrong about this one class.
|
|
57
|
+
*/
|
|
54
58
|
export declare class ManifestDirectoryChallengeVerifier implements IDirectoryChallengeVerifier {
|
|
55
59
|
#private;
|
|
56
|
-
constructor(manifestProvider: IManifestProvider
|
|
60
|
+
constructor(manifestProvider: IManifestProvider, onExpiredManifest?: (info: {
|
|
61
|
+
nodeId: string;
|
|
62
|
+
version: number;
|
|
63
|
+
expires: string;
|
|
64
|
+
}) => void);
|
|
57
65
|
verifyChallenge(nodeId: string, tbsBytes: Uint8Array, signatureHex: string): ChallengeVerifyResult;
|
|
58
66
|
}
|
|
59
67
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-stubs.d.ts","sourceRoot":"","sources":["../src/manifest-stubs.ts"],"names":[],"mappings":"A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,OAAO,SAAI;IAIvB,YAAY,CAAC,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAWnD,MAAM,IAAI,IAAI;CAMf;AAID;;;;GAIG;AACH,qBAAa,wBAAyB,YAAW,oBAAoB;;gBAIvD,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE;IAQ3D,SAAS,IAAI,MAAM;IAInB,qFAAqF;IAC/E,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAIrD,sEAAsE;IACtE,eAAe,IAAI,MAAM;CAG1B;AAID;;GAEG;AACH,qBAAa,0BAA2B,YAAW,sBAAsB;;gBAG3D,QAAQ,EAAE,kBAAkB;IAIxC,kBAAkB,IAAI,kBAAkB;CAGzC"}
|
package/dist/manifest-stubs.js
CHANGED
|
@@ -81,10 +81,27 @@ export class TestDirectoryChallengeVerifier {
|
|
|
81
81
|
* 4. Call ed25519.verify(sigBytes, tbsBytes, pubkeyBytes).
|
|
82
82
|
* 5. Return the result; catch all errors and return false.
|
|
83
83
|
*/
|
|
84
|
+
/**
|
|
85
|
+
* ⚠️ NOT A STUB, despite the filename. Wired in production twice by `manifest-deps.ts`. Anyone
|
|
86
|
+
* reading `manifest-stubs.ts` and assuming test-only is wrong about this one class.
|
|
87
|
+
*/
|
|
84
88
|
export class ManifestDirectoryChallengeVerifier {
|
|
85
89
|
#manifestProvider;
|
|
86
|
-
|
|
90
|
+
/**
|
|
91
|
+
* DOD-M15-EXPIRY-CONSUMER-POLICY-1. Called once per (manifest version, nodeId) when a directory
|
|
92
|
+
* has been SUCCESSFULLY authenticated against a manifest whose validity window has closed — so
|
|
93
|
+
* `nodeId` is a verified identity, never the peer's unchecked claim.
|
|
94
|
+
*
|
|
95
|
+
* Optional only because seven existing test constructions do not pass it; every production wiring
|
|
96
|
+
* does. **Absent means silence**, which is the old defect — so a new caller that omits it is
|
|
97
|
+
* choosing that, and should not.
|
|
98
|
+
*/
|
|
99
|
+
#onExpiredManifest;
|
|
100
|
+
/** `${version}\u001f${nodeId}` already reported — per challenge would flood; per node does not. */
|
|
101
|
+
#reportedLapsed = new Set();
|
|
102
|
+
constructor(manifestProvider, onExpiredManifest) {
|
|
87
103
|
this.#manifestProvider = manifestProvider;
|
|
104
|
+
this.#onExpiredManifest = onExpiredManifest;
|
|
88
105
|
}
|
|
89
106
|
verifyChallenge(nodeId, tbsBytes, signatureHex) {
|
|
90
107
|
try {
|
|
@@ -106,7 +123,63 @@ export class ManifestDirectoryChallengeVerifier {
|
|
|
106
123
|
const sigBytes = hexToBytes(signatureHex);
|
|
107
124
|
// RFC 8032: ed25519.verify(signature, message, publicKey)
|
|
108
125
|
const ok = ed25519.verify(sigBytes, tbsBytes, pubkeyBytes);
|
|
109
|
-
|
|
126
|
+
if (!ok)
|
|
127
|
+
return { valid: false, reason: "signature_invalid" };
|
|
128
|
+
/**
|
|
129
|
+
* DOD-M15-EXPIRY-CONSUMER-POLICY-1 — this consumer PERMITS on a lapsed manifest, deliberately,
|
|
130
|
+
* and now says so instead of being silent about it.
|
|
131
|
+
*
|
|
132
|
+
* **Why not refuse.** This authenticates a directory node on the signaling path. Refuse here
|
|
133
|
+
* and a long-running daemon whose manifest lapsed cannot authenticate ANY directory — it goes
|
|
134
|
+
* effectively offline, every agent with it, for a manifest that was valid when the process
|
|
135
|
+
* started. The residual risk needs a node REMOVED or ROTATED since the lapse.
|
|
136
|
+
*
|
|
137
|
+
* ─── WHY THIS SITS AFTER THE VERIFY, AND NOT WHERE I FIRST PUT IT ────────────────────────
|
|
138
|
+
*
|
|
139
|
+
* The first version ran BEFORE the node lookup and the signature check, and all three
|
|
140
|
+
* consequences were wrong:
|
|
141
|
+
* 1. **The message was false in the failure case.** It says a directory *was authenticated*;
|
|
142
|
+
* from up there the very next line can return `key_not_in_manifest`.
|
|
143
|
+
* 2. **`nodeId` was unauthenticated remote input** — the peer's own claim, verified after.
|
|
144
|
+
* 3. **The once-per-version budget was BURNABLE BY THE ADVERSARY.** A rogue directory — the
|
|
145
|
+
* exact threat this check exists for — sends any `nodeId`, spends the budget, and every
|
|
146
|
+
* genuine authentication against the lapsed anchor is silent for that manifest version.
|
|
147
|
+
* A security signal an attacker can switch off is worse than none, because its absence
|
|
148
|
+
* reads as safety.
|
|
149
|
+
* On the success path all three vanish: the text is true, `nodeId` is a verified identity, and
|
|
150
|
+
* only a real directory can spend the budget.
|
|
151
|
+
*
|
|
152
|
+
* Keyed on (version, nodeId): a per-manifest condition, reported once per node rather than per
|
|
153
|
+
* challenge. Challenges are continuous; N nodes give N events per manifest lifetime, not a
|
|
154
|
+
* flood.
|
|
155
|
+
*/
|
|
156
|
+
const expiresMs = Date.parse(manifest.expires);
|
|
157
|
+
if (!Number.isFinite(expiresMs) || expiresMs <= Date.now()) {
|
|
158
|
+
const seen = `${manifest.version}\u001f${nodeId}`;
|
|
159
|
+
if (!this.#reportedLapsed.has(seen)) {
|
|
160
|
+
/**
|
|
161
|
+
* ─── The inner catch is what holds the property, not this block's POSITION ────────────
|
|
162
|
+
*
|
|
163
|
+
* This code is lexically INSIDE the outer `try`, whose handler returns `signature_invalid`
|
|
164
|
+
* — so without the catch below, a throwing logger would report that this directory FORGED
|
|
165
|
+
* ITS IDENTITY PROOF. A reporting failure must never fail an authentication, and must
|
|
166
|
+
* never be described as one. (Said precisely because an earlier version of this comment
|
|
167
|
+
* claimed the position did the work; it does not.)
|
|
168
|
+
*
|
|
169
|
+
* ⚠️ AND THE BUDGET IS SPENT ONLY IF THE REPORT ACTUALLY LANDED — pass 2. `add(seen)` used
|
|
170
|
+
* to run BEFORE the call, so one transient sink failure burned the key for the process
|
|
171
|
+
* lifetime and the signal went permanently silent for that (version, node). That is the
|
|
172
|
+
* same "absence reads as safety" argument accepted for the adversary, with a flaky logger
|
|
173
|
+
* as the actor instead.
|
|
174
|
+
*/
|
|
175
|
+
try {
|
|
176
|
+
this.#onExpiredManifest?.({ nodeId, version: manifest.version, expires: manifest.expires });
|
|
177
|
+
this.#reportedLapsed.add(seen);
|
|
178
|
+
}
|
|
179
|
+
catch { /* a report is not a verdict — and a failed one does not count as reported */ }
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return { valid: true };
|
|
110
183
|
}
|
|
111
184
|
catch {
|
|
112
185
|
return { valid: false, reason: "signature_invalid" };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-stubs.js","sourceRoot":"","sources":["../src/manifest-stubs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAYnD,gFAAgF;AAEhF;;;;GAIG;AACH,MAAM,OAAO,4BAA4B;IACvC,gBAAgB,GAAkB,IAAI,CAAC;IAEvC,KAAK,CAAC,kBAAkB;QACtB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,OAAe;QAClC,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC;IAClC,CAAC;CACF;AAED,gFAAgF;AAEhF;;;;GAIG;AACH,MAAM,OAAO,oBAAoB;IAC/B,SAAS,CAAqB;IAC9B,OAAO,GAA8B,IAAI,CAAC;IAE1C,YAAY,QAA4B;QACtC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,SAA4B,EAAE,UAAkB;QAClE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC;QAC9B,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,kBAAkB;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,cAAc,CAAC,QAA4B;QACzC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC;IAC1B,CAAC;CACF;AAED,gFAAgF;AAEhF;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* receiver) it probes connected directory nodes for dial-back to determine
|
|
59
59
|
* dialability; on directory nodes it serves the responder role, answering
|
|
60
60
|
* dial-back requests. Protocol: /libp2p/autonat/1.0.0.
|
|
61
|
-
* - dcutr() is included on
|
|
61
|
+
* - dcutr() is included on every node type BY DEFAULT (DOD-NAT-REACHABILITY-1). The
|
|
62
62
|
* protocol's inbound peer is the one that STARTS the hole-punch upgrade
|
|
63
63
|
* (@libp2p/dcutr ignores connections with direction !== 'inbound'), and the
|
|
64
64
|
* inbound peer of a relayed connection is precisely the standing receiver.
|
|
65
|
+
* ⚠️ `opts.holePunch: { enabled: false }` OMITS it (DOD-M15-RELAYONLY-1), and the sentence
|
|
66
|
+
* directly above is the reason it had to become optional: if the inbound side starts the
|
|
67
|
+
* upgrade, a node whose operator asked never to be directly reachable would hole-punch itself
|
|
68
|
+
* into exactly the direct connection they switched the setting on to avoid. Suppressing the
|
|
69
|
+
* published address does not cover this — the address a peer cannot be TOLD, a hole-punch
|
|
70
|
+
* still REVEALS.
|
|
65
71
|
* - circuitRelayServer (HOP) is a SERVICE-node capability: included when
|
|
66
72
|
* nodeType is undefined (directory, relay) or when opts.relayServer.enabled
|
|
67
73
|
* is set. Client nodes (session / standing_receiver) no longer advertise
|
|
@@ -120,6 +126,143 @@ export interface ResolvedConnectionMonitorConfig {
|
|
|
120
126
|
* the unilateral-seal gate. Only a node with no liveness duty toward its peers — the relay,
|
|
121
127
|
* whose client liveness is the reservation TTL's job — should turn it off.
|
|
122
128
|
*/
|
|
129
|
+
/**
|
|
130
|
+
* ─── DOD-M15-IDLE-CONNS-1 — the connection posture is DECLARED HERE, not inherited ─────────────
|
|
131
|
+
*
|
|
132
|
+
* `createNode` passed no `connectionManager` block at all, so every one of these came from
|
|
133
|
+
* libp2p's own constants. They were correct; nobody had chosen them. A minor version bump
|
|
134
|
+
* re-prices what an unauthenticated peer can spend on an operator's machine, and no test in this
|
|
135
|
+
* repo would go red.
|
|
136
|
+
*
|
|
137
|
+
* The four values below are libp2p@3.3.2's defaults, adopted deliberately rather than changed. The
|
|
138
|
+
* DoD line is explicit that caps must not be guessed — *"a cap set without measurement breaks
|
|
139
|
+
* REACHABILITY, the one property this milestone must not trade away"* — and there is no
|
|
140
|
+
* measurement yet, because until this unit nothing reported a connection count at all. So the
|
|
141
|
+
* change here is **authorship, not tuning**: pin what runs today, make it visible, and let
|
|
142
|
+
* `getConnectionLimits()` supply the number a later tuning pass needs.
|
|
143
|
+
*/
|
|
144
|
+
/** Total connections before libp2p prunes. libp2p@3.3.2 `MAX_CONNECTIONS`. */
|
|
145
|
+
export declare const DECLARED_MAX_CONNECTIONS = 300;
|
|
146
|
+
/** Inbound connections per remote host per window before refusal. `INBOUND_CONNECTION_THRESHOLD`. */
|
|
147
|
+
export declare const DECLARED_INBOUND_CONNECTION_THRESHOLD = 5;
|
|
148
|
+
/** Inbound connections mid-upgrade before new ones are refused. `MAX_INCOMING_PENDING_CONNECTIONS`. */
|
|
149
|
+
export declare const DECLARED_MAX_INCOMING_PENDING = 10;
|
|
150
|
+
/** How long an inbound connection may sit un-upgraded. `INBOUND_UPGRADE_TIMEOUT`. */
|
|
151
|
+
export declare const DECLARED_INBOUND_UPGRADE_TIMEOUT_MS = 10000;
|
|
152
|
+
/**
|
|
153
|
+
* How long an inbound connection that has NEVER carried a stream may live.
|
|
154
|
+
*
|
|
155
|
+
* ─── THIS MEASURES "NEVER SPOKE", NOT "IS QUIET RIGHT NOW" ─────────────────────────────────────
|
|
156
|
+
*
|
|
157
|
+
* The first version compared `now - openedAt` and ANDed it with `streamCount === 0` at the instant
|
|
158
|
+
* of the sweep — i.e. it measured connection AGE and sampled business. Review flagged that as
|
|
159
|
+
* fatal on the grounds that CELLO content streams are per-message and ephemeral, so a busy session
|
|
160
|
+
* would sit at zero streams almost all of the time and be reaped mid-conversation.
|
|
161
|
+
*
|
|
162
|
+
* **MEASURED BEFORE ACCEPTING IT, and the stated mechanism does NOT reproduce on libp2p@3.3.2.**
|
|
163
|
+
* A stream closed by the dialer stays in the listener's `connection.streams` — `streamCount` was
|
|
164
|
+
* still 1 after 10s (25 samples, 400ms apart), and under the reviewer's own scenario (a stream
|
|
165
|
+
* every 400ms, 1000ms grace) it CLIMBED 1→8 across 3.2s and nothing was reaped. So the specific
|
|
166
|
+
* claim "a busy session sits at zero streams" is false here, and the reported hang-up at t≈1200ms
|
|
167
|
+
* did not occur when the scenario was re-run against that predicate.
|
|
168
|
+
*
|
|
169
|
+
* **The fix stays anyway, and the reason is the honest one:** the old predicate was correct only
|
|
170
|
+
* BECAUSE libp2p happens to retain closed streams. That is an implementation detail of a
|
|
171
|
+
* dependency, undocumented and free to change in a patch release — precisely the kind of inherited
|
|
172
|
+
* behaviour the other half of this unit exists to stop relying on. `hasEverCarriedStream` is the
|
|
173
|
+
* literal reading of the DoD's "authenticates to nothing" and it holds whatever libp2p does with
|
|
174
|
+
* closed streams.
|
|
175
|
+
*/
|
|
176
|
+
export declare const IDLE_CONNECTION_GRACE_MS = 90000;
|
|
177
|
+
/** How often the sweep runs. A third of the grace period, so nothing lives much past it. */
|
|
178
|
+
export declare const IDLE_CONNECTION_SWEEP_MS = 30000;
|
|
179
|
+
/** What the sweep reports when it acts, or fails to. Consumed by the daemon's logger. */
|
|
180
|
+
export interface IdleReapEvent {
|
|
181
|
+
peerId: string;
|
|
182
|
+
ageMs: number;
|
|
183
|
+
reason: "never_carried_a_stream" | "hangup_failed" | "sweep_failed";
|
|
184
|
+
error?: string;
|
|
185
|
+
}
|
|
186
|
+
/** The connection census, emitted every sweep — the measurement the DoD line demands. */
|
|
187
|
+
export interface ConnectionCounts {
|
|
188
|
+
total: number;
|
|
189
|
+
inbound: number;
|
|
190
|
+
/** Inbound connections that have not carried a stream since they opened. */
|
|
191
|
+
neverSpoke: number;
|
|
192
|
+
maxConnections: number;
|
|
193
|
+
}
|
|
194
|
+
/** The connection-manager block handed to libp2p, resolved once. */
|
|
195
|
+
export interface ResolvedConnectionLimits {
|
|
196
|
+
maxConnections: number;
|
|
197
|
+
inboundConnectionThreshold: number;
|
|
198
|
+
maxIncomingPendingConnections: number;
|
|
199
|
+
inboundUpgradeTimeout: number;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Resolve the declared limits, honouring per-node overrides.
|
|
203
|
+
*
|
|
204
|
+
* Spreads the declared block FIRST so an override that names one key keeps the other three. An
|
|
205
|
+
* override that returned only what it was given would re-inherit the rest from libp2p — this
|
|
206
|
+
* unit's own defect, reintroduced by its fix.
|
|
207
|
+
*/
|
|
208
|
+
export declare function resolveConnectionLimits(opts: {
|
|
209
|
+
connectionLimits?: Partial<ResolvedConnectionLimits>;
|
|
210
|
+
}): ResolvedConnectionLimits;
|
|
211
|
+
/** What the reaper needs to judge one connection. */
|
|
212
|
+
export interface IdleConnectionCandidate {
|
|
213
|
+
/** libp2p's per-CONNECTION id. A peer may hold several; the activity bit is per connection. */
|
|
214
|
+
id: string;
|
|
215
|
+
peerId: string;
|
|
216
|
+
direction: "inbound" | "outbound";
|
|
217
|
+
streamCount: number;
|
|
218
|
+
openedAt: number;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Which connections should be hung up — pure, so the judgement is testable apart from the sweep.
|
|
222
|
+
*
|
|
223
|
+
* FOUR THINGS ARE SPARED, and each is spared for a reason that costs something real if forgotten:
|
|
224
|
+
*
|
|
225
|
+
* - **Anything carrying a stream.** That is the definition of in use.
|
|
226
|
+
* - **Anything inside the grace period.** A connection is silent for a moment on every dial.
|
|
227
|
+
* - **Every INBOUND connection that has ever carried a stream** (see the grace constant). A peer
|
|
228
|
+
* that has spoken is not "authenticating to nothing", however quiet it is now.
|
|
229
|
+
* - **Every OUTBOUND connection** — as a SELECTION rule. This node chose those: the content-park
|
|
230
|
+
* deposit and pull, the restart-seal submission to a prior session's relay. Reaping one cancels
|
|
231
|
+
* our own errand to bound someone else's connection. **Note the honest bound:** `hangUp` is
|
|
232
|
+
* PEER-scoped and drops every connection to that peer, so a peer holding one idle inbound AND
|
|
233
|
+
* one live outbound connection loses both. Nothing reaches that state today (the gater denies
|
|
234
|
+
* inbound from any peer that is not the named counterparty or the reserved relay, and both are
|
|
235
|
+
* spared), but the rule is "outbound connections are never SELECTED", not "outbound connections
|
|
236
|
+
* are never closed". This project has already paid once for a comment claiming the stronger
|
|
237
|
+
* version — `session-node-manager.ts` records a sweep that hung up the content-park dials and
|
|
238
|
+
* surfaced as `relay_unavailable`, a transport label for a local decision.
|
|
239
|
+
* - **Whatever `isSpared` names.** In production: the relay this node holds a live reservation
|
|
240
|
+
* with, and the counterparty the gate currently names. A relay reservation is IDLE BY NATURE
|
|
241
|
+
* between refreshes, which is exactly the shape hunted here — a reaper without it takes an
|
|
242
|
+
* agent's inbound reachability away and reports nothing.
|
|
243
|
+
*/
|
|
244
|
+
/**
|
|
245
|
+
* Fold this sweep's observation into the activity set: mark anything carrying a stream, and forget
|
|
246
|
+
* connections that have gone.
|
|
247
|
+
*
|
|
248
|
+
* EXTRACTED so it can be attacked directly. Mutation testing showed that deleting the recording
|
|
249
|
+
* left every test green, because no live test can reach the state where it matters — libp2p retains
|
|
250
|
+
* closed streams, so `streamCount` does not fall back to 0 within any window a test can wait for.
|
|
251
|
+
* The bit is still the thing that makes the judgement independent of that libp2p behaviour, so it
|
|
252
|
+
* needs coverage that does not depend on it.
|
|
253
|
+
*/
|
|
254
|
+
export declare function recordStreamActivity(seen: Set<string>, connections: readonly {
|
|
255
|
+
id: string;
|
|
256
|
+
streamCount: number;
|
|
257
|
+
}[]): void;
|
|
258
|
+
export declare function selectIdleConnections(args: {
|
|
259
|
+
connections: readonly IdleConnectionCandidate[];
|
|
260
|
+
now: number;
|
|
261
|
+
isSpared: (peerId: string) => boolean;
|
|
262
|
+
/** Has this CONNECTION carried a stream at any point since it opened? Never a candidate if so. */
|
|
263
|
+
hasEverCarriedStream: (connectionId: string) => boolean;
|
|
264
|
+
graceMs?: number;
|
|
265
|
+
}): string[];
|
|
123
266
|
export declare function resolveConnectionMonitorConfig(opts: {
|
|
124
267
|
keepAliveIntervalMs?: number;
|
|
125
268
|
connectionMonitor?: {
|
package/dist/node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAqBH,OAAO,KAAK,EACV,SAAS,EAET,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAiDpB;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAAC,eAAe,EAAE,MAAM,EAAE,EAAE,iBAAiB,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAOzG;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAOtD;AAupBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,WAAW,+BAA+B;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IACrC,4BAA4B,CAAC,EAAE,OAAO,CAAC;CACxC;AAED;;;;;;;;;;;;;GAaG;AACH;;;;;;;;;;;;;;GAcG;AAEH,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAC5C,qGAAqG;AACrG,eAAO,MAAM,qCAAqC,IAAI,CAAC;AACvD,uGAAuG;AACvG,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAChD,qFAAqF;AACrF,eAAO,MAAM,mCAAmC,QAAS,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;GAuBG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,GAC1D,IAAI,CAIN;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,WAAW,EAAE,SAAS,uBAAuB,EAAE,CAAC;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IACtC,kGAAkG;IAClG,oBAAoB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,EAAE,CAgBX;AAED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE;IACnD,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE;QAAE,4BAA4B,CAAC,EAAE,OAAO,CAAC;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3F,GAAG,+BAA+B,CAOlC;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,SAAS,CAAC,CAoI5E"}
|
package/dist/node.js
CHANGED
|
@@ -182,6 +182,26 @@ class CelloNodeImpl {
|
|
|
182
182
|
// zero-listener refusal in start()).
|
|
183
183
|
#hasCircuitListen;
|
|
184
184
|
#dropAutonatResponder;
|
|
185
|
+
/**
|
|
186
|
+
* DOD-M15-IDLE-CONNS-1. Set once by createNode from the SAME object libp2p was given, so the
|
|
187
|
+
* reported policy cannot drift from the configured one — the discipline
|
|
188
|
+
* `resolveConnectionMonitorConfig` already states: what libp2p is configured with is what the
|
|
189
|
+
* node reports, by construction rather than by two call sites agreeing.
|
|
190
|
+
*/
|
|
191
|
+
#connectionLimits = resolveConnectionLimits({});
|
|
192
|
+
/** The idle-connection sweep, when this node runs one. Cleared in stop() so it cannot outlive it. */
|
|
193
|
+
#idleReaperTimer = null;
|
|
194
|
+
#idleReaperConfig = null;
|
|
195
|
+
/** Peers the reaper must never hang up — the reserved relay and the named counterparty. */
|
|
196
|
+
#idleReaperSpared = () => false;
|
|
197
|
+
/**
|
|
198
|
+
* Connection ids observed carrying at least one stream. The activity bit F1 was missing.
|
|
199
|
+
*
|
|
200
|
+
* Keyed on CONNECTION id, not peer id: a peer may hold several connections and the question is
|
|
201
|
+
* about this one. Pruned to live connections on every sweep so a long-lived node does not
|
|
202
|
+
* accumulate ids for connections that closed months ago.
|
|
203
|
+
*/
|
|
204
|
+
#everCarriedStream = new Set();
|
|
185
205
|
constructor(libp2p, keyProvider, configuredHosts, expectsDirectListener, hasCircuitListen, dropAutonatResponder = false) {
|
|
186
206
|
this.#libp2p = libp2p;
|
|
187
207
|
this.keyProvider = keyProvider;
|
|
@@ -257,10 +277,122 @@ class CelloNodeImpl {
|
|
|
257
277
|
message: "no listener of any kind materialised for a circuit-only listen set (every relay unreachable)",
|
|
258
278
|
};
|
|
259
279
|
}
|
|
280
|
+
// Armed by createNode; started here so the interval's lifetime is exactly the node's running
|
|
281
|
+
// lifetime, and a node that was built but never started leaves nothing behind.
|
|
282
|
+
this.#startIdleReaper();
|
|
260
283
|
}
|
|
261
284
|
async stop() {
|
|
285
|
+
// Before libp2p, so a sweep cannot fire against a stopping node and log a hangUp failure that
|
|
286
|
+
// reads like a fault. A timer that outlives its node is how a "stopped" daemon keeps working.
|
|
287
|
+
if (this.#idleReaperTimer !== null) {
|
|
288
|
+
clearInterval(this.#idleReaperTimer);
|
|
289
|
+
this.#idleReaperTimer = null;
|
|
290
|
+
}
|
|
262
291
|
await this.#libp2p.stop();
|
|
263
292
|
}
|
|
293
|
+
/** The connection-manager policy libp2p was actually given. */
|
|
294
|
+
getConnectionLimits() {
|
|
295
|
+
return this.#connectionLimits;
|
|
296
|
+
}
|
|
297
|
+
/** Set by createNode with the resolved object — never a second copy. */
|
|
298
|
+
setConnectionLimits(limits) {
|
|
299
|
+
this.#connectionLimits = limits;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* DOD-M15-IDLE-CONNS-1 — name the peers the idle reaper must never hang up.
|
|
303
|
+
*
|
|
304
|
+
* The daemon calls this with the gater's reserved-relay slot and the directory peers. Left as a
|
|
305
|
+
* setter rather than a constructor argument because the reserved relay CHANGES: a reservation is
|
|
306
|
+
* lost and retaken against a different relay, and a predicate captured once at construction would
|
|
307
|
+
* go on sparing a relay this node no longer talks to while reaping the one it does.
|
|
308
|
+
*/
|
|
309
|
+
setIdleReaperSpared(isSpared) {
|
|
310
|
+
this.#idleReaperSpared = isSpared;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Arm the idle sweep. The TIMER does not start here — `start()` starts it, so a node that is
|
|
314
|
+
* built and never started leaves no interval behind, and a stop()/start() cycle gets a fresh one.
|
|
315
|
+
*/
|
|
316
|
+
enableIdleReaper(config) {
|
|
317
|
+
this.#idleReaperConfig = config;
|
|
318
|
+
}
|
|
319
|
+
#startIdleReaper() {
|
|
320
|
+
const config = this.#idleReaperConfig;
|
|
321
|
+
if (config === null || this.#idleReaperTimer !== null)
|
|
322
|
+
return;
|
|
323
|
+
this.#idleReaperTimer = setInterval(() => {
|
|
324
|
+
// Review F5: `getConnections()` and `isSpared` both sit outside the try below, and `isSpared`
|
|
325
|
+
// reaches into the daemon's gater. An unhandled rejection here takes the whole daemon down —
|
|
326
|
+
// a hazard `session-node-manager.ts` already names in exactly those words.
|
|
327
|
+
void this.#sweepIdleConnections().catch((err) => {
|
|
328
|
+
config.onReaped?.({
|
|
329
|
+
peerId: "",
|
|
330
|
+
ageMs: 0,
|
|
331
|
+
reason: "sweep_failed",
|
|
332
|
+
error: err instanceof Error ? err.message : String(err),
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
}, config.sweepIntervalMs);
|
|
336
|
+
// Node keeps the event loop alive for a pending interval; a daemon that has stopped serving
|
|
337
|
+
// must still be able to exit.
|
|
338
|
+
this.#idleReaperTimer.unref?.();
|
|
339
|
+
}
|
|
340
|
+
async #sweepIdleConnections() {
|
|
341
|
+
const config = this.#idleReaperConfig;
|
|
342
|
+
if (config === null)
|
|
343
|
+
return;
|
|
344
|
+
const now = Date.now();
|
|
345
|
+
const connections = this.getConnections();
|
|
346
|
+
// Record activity BEFORE judging. A connection seen carrying a stream even once is never a
|
|
347
|
+
// candidate again, whatever libp2p later does with its closed streams.
|
|
348
|
+
recordStreamActivity(this.#everCarriedStream, connections);
|
|
349
|
+
// C4: the count the DoD asks for, reported every sweep. Emitted BEFORE any hang-up so the
|
|
350
|
+
// number describes what was observed, not what survived.
|
|
351
|
+
config.onObserved?.({
|
|
352
|
+
total: connections.length,
|
|
353
|
+
inbound: connections.filter((c) => c.direction === "inbound").length,
|
|
354
|
+
neverSpoke: connections.filter((c) => c.direction === "inbound" && !this.#everCarriedStream.has(c.id)).length,
|
|
355
|
+
maxConnections: this.#connectionLimits.maxConnections,
|
|
356
|
+
});
|
|
357
|
+
const oldestByPeer = new Map();
|
|
358
|
+
for (const c of connections) {
|
|
359
|
+
const prior = oldestByPeer.get(c.peerId);
|
|
360
|
+
if (prior === undefined || c.openedAt < prior)
|
|
361
|
+
oldestByPeer.set(c.peerId, c.openedAt);
|
|
362
|
+
}
|
|
363
|
+
const doomed = selectIdleConnections({
|
|
364
|
+
connections,
|
|
365
|
+
now,
|
|
366
|
+
isSpared: this.#idleReaperSpared,
|
|
367
|
+
hasEverCarriedStream: (id) => this.#everCarriedStream.has(id),
|
|
368
|
+
graceMs: config.graceMs,
|
|
369
|
+
});
|
|
370
|
+
for (const peerId of doomed) {
|
|
371
|
+
try {
|
|
372
|
+
await this.hangUp(peerId);
|
|
373
|
+
// Review F3: a hang-up that tells nobody is indistinguishable from the thing simply not
|
|
374
|
+
// happening — which is what the operator concludes when their next send returns
|
|
375
|
+
// `no_connection` and nothing anywhere names the local sweep.
|
|
376
|
+
config.onReaped?.({
|
|
377
|
+
peerId,
|
|
378
|
+
ageMs: now - (oldestByPeer.get(peerId) ?? now),
|
|
379
|
+
reason: "never_carried_a_stream",
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
catch (err) {
|
|
383
|
+
// NOT swallowed. `hangUp` throws a NAMED `invalid_peer_id` written precisely so a malformed
|
|
384
|
+
// id is not read as a connection problem; an empty catch destroys that distinction and
|
|
385
|
+
// returns this code to the error substitution it was written to prevent. Reported and the
|
|
386
|
+
// loop continues, so one bad peer does not cancel the sweep for every other connection.
|
|
387
|
+
config.onReaped?.({
|
|
388
|
+
peerId,
|
|
389
|
+
ageMs: now - (oldestByPeer.get(peerId) ?? now),
|
|
390
|
+
reason: "hangup_failed",
|
|
391
|
+
error: err instanceof Error ? err.message : String(err),
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
264
396
|
listenAddresses() {
|
|
265
397
|
return this.#libp2p.getMultiaddrs().map((ma) => ma.toString());
|
|
266
398
|
}
|
|
@@ -349,8 +481,17 @@ class CelloNodeImpl {
|
|
|
349
481
|
}
|
|
350
482
|
getConnections() {
|
|
351
483
|
return this.#libp2p.getConnections().map((c) => ({
|
|
484
|
+
// Per-CONNECTION id. A peer may hold several and the activity bit is about one of them.
|
|
485
|
+
id: c.id,
|
|
352
486
|
peerId: c.remotePeer.toString(),
|
|
353
487
|
encryption: c.encryption,
|
|
488
|
+
// DOD-M15-IDLE-CONNS-1: the three fields a reaper needs, and the three an operator needs to
|
|
489
|
+
// see a flood instead of inferring one. Nothing reported a connection count before this —
|
|
490
|
+
// which is why the DoD's own instruction to "measure a healthy daemon's connection count
|
|
491
|
+
// first" could not be followed: the measurement did not exist.
|
|
492
|
+
direction: c.direction,
|
|
493
|
+
openedAt: c.timeline.open,
|
|
494
|
+
streamCount: c.streams.length,
|
|
354
495
|
// DOD-M12-CONN-OBSERVE-1: the SOCKET status, which is not the muxer's. libp2p checks the two
|
|
355
496
|
// separately in `newStream` — muxer first — so a stream failing with
|
|
356
497
|
// `The connection muxer is "closed" and not "open"` returns before the socket is looked at,
|
|
@@ -402,6 +543,46 @@ class CelloNodeImpl {
|
|
|
402
543
|
* connection may already be gone, and throwing there would turn a recoverable stale handle into
|
|
403
544
|
* a failure of the repair itself.
|
|
404
545
|
*/
|
|
546
|
+
/**
|
|
547
|
+
* DOD-M15-RELAYSLOTS-1 — release the circuit reservation held for `peerId`. See the interface
|
|
548
|
+
* declaration for why `hangUp` is not enough and what it cost.
|
|
549
|
+
*
|
|
550
|
+
* Reached through the relay service's PUBLIC `reservations` getter (a `PeerMap`), not through the
|
|
551
|
+
* private reservation store — no cast through a private field, so a libp2p upgrade that changes
|
|
552
|
+
* the internals cannot silently turn this into a no-op; it would fail to compile.
|
|
553
|
+
*/
|
|
554
|
+
releaseRelayReservation(peerIdStr) {
|
|
555
|
+
let peerId;
|
|
556
|
+
try {
|
|
557
|
+
peerId = peerIdFromString(peerIdStr);
|
|
558
|
+
}
|
|
559
|
+
catch {
|
|
560
|
+
// Same reasoning as hangUp: name it rather than letting a parse error read as a relay fault.
|
|
561
|
+
return false;
|
|
562
|
+
}
|
|
563
|
+
const relay = this.#libp2p.services["relay"];
|
|
564
|
+
const reservations = relay?.reservations;
|
|
565
|
+
// A node with no relay service (every client node) holds no reservations to release.
|
|
566
|
+
if (!reservations)
|
|
567
|
+
return false;
|
|
568
|
+
if (!reservations.has(peerId))
|
|
569
|
+
return false;
|
|
570
|
+
/**
|
|
571
|
+
* ⚠️ **ABORT THE EXPIRY SIGNAL, NOT JUST THE MAP ENTRY.** libp2p keeps a per-reservation timer
|
|
572
|
+
* whose abort listener deletes the entry, and deleting the entry does not cancel the timer. Left
|
|
573
|
+
* running, it fires later and deletes whatever reservation that peer holds AT THAT MOMENT — so
|
|
574
|
+
* a peer that reconnects and reserves again silently loses the NEW slot mid-TTL, and its client
|
|
575
|
+
* does not notice until it refreshes against an expiry that no longer exists.
|
|
576
|
+
*/
|
|
577
|
+
try {
|
|
578
|
+
reservations.get(peerId)?.signal?.abort?.();
|
|
579
|
+
}
|
|
580
|
+
catch {
|
|
581
|
+
// An older shape with no signal: the delete below is still correct, there is just no orphan.
|
|
582
|
+
}
|
|
583
|
+
reservations.delete(peerId);
|
|
584
|
+
return true;
|
|
585
|
+
}
|
|
405
586
|
async hangUp(peerIdStr) {
|
|
406
587
|
let peerId;
|
|
407
588
|
try {
|
|
@@ -538,10 +719,16 @@ function mapStreamError(err, peerId, protocolId) {
|
|
|
538
719
|
* receiver) it probes connected directory nodes for dial-back to determine
|
|
539
720
|
* dialability; on directory nodes it serves the responder role, answering
|
|
540
721
|
* dial-back requests. Protocol: /libp2p/autonat/1.0.0.
|
|
541
|
-
* - dcutr() is included on
|
|
722
|
+
* - dcutr() is included on every node type BY DEFAULT (DOD-NAT-REACHABILITY-1). The
|
|
542
723
|
* protocol's inbound peer is the one that STARTS the hole-punch upgrade
|
|
543
724
|
* (@libp2p/dcutr ignores connections with direction !== 'inbound'), and the
|
|
544
725
|
* inbound peer of a relayed connection is precisely the standing receiver.
|
|
726
|
+
* ⚠️ `opts.holePunch: { enabled: false }` OMITS it (DOD-M15-RELAYONLY-1), and the sentence
|
|
727
|
+
* directly above is the reason it had to become optional: if the inbound side starts the
|
|
728
|
+
* upgrade, a node whose operator asked never to be directly reachable would hole-punch itself
|
|
729
|
+
* into exactly the direct connection they switched the setting on to avoid. Suppressing the
|
|
730
|
+
* published address does not cover this — the address a peer cannot be TOLD, a hole-punch
|
|
731
|
+
* still REVEALS.
|
|
545
732
|
* - circuitRelayServer (HOP) is a SERVICE-node capability: included when
|
|
546
733
|
* nodeType is undefined (directory, relay) or when opts.relayServer.enabled
|
|
547
734
|
* is set. Client nodes (session / standing_receiver) no longer advertise
|
|
@@ -586,6 +773,129 @@ export const WAN_PING_TIMEOUT_FLOOR_MS = 30_000;
|
|
|
586
773
|
* the unilateral-seal gate. Only a node with no liveness duty toward its peers — the relay,
|
|
587
774
|
* whose client liveness is the reservation TTL's job — should turn it off.
|
|
588
775
|
*/
|
|
776
|
+
/**
|
|
777
|
+
* ─── DOD-M15-IDLE-CONNS-1 — the connection posture is DECLARED HERE, not inherited ─────────────
|
|
778
|
+
*
|
|
779
|
+
* `createNode` passed no `connectionManager` block at all, so every one of these came from
|
|
780
|
+
* libp2p's own constants. They were correct; nobody had chosen them. A minor version bump
|
|
781
|
+
* re-prices what an unauthenticated peer can spend on an operator's machine, and no test in this
|
|
782
|
+
* repo would go red.
|
|
783
|
+
*
|
|
784
|
+
* The four values below are libp2p@3.3.2's defaults, adopted deliberately rather than changed. The
|
|
785
|
+
* DoD line is explicit that caps must not be guessed — *"a cap set without measurement breaks
|
|
786
|
+
* REACHABILITY, the one property this milestone must not trade away"* — and there is no
|
|
787
|
+
* measurement yet, because until this unit nothing reported a connection count at all. So the
|
|
788
|
+
* change here is **authorship, not tuning**: pin what runs today, make it visible, and let
|
|
789
|
+
* `getConnectionLimits()` supply the number a later tuning pass needs.
|
|
790
|
+
*/
|
|
791
|
+
/** Total connections before libp2p prunes. libp2p@3.3.2 `MAX_CONNECTIONS`. */
|
|
792
|
+
export const DECLARED_MAX_CONNECTIONS = 300;
|
|
793
|
+
/** Inbound connections per remote host per window before refusal. `INBOUND_CONNECTION_THRESHOLD`. */
|
|
794
|
+
export const DECLARED_INBOUND_CONNECTION_THRESHOLD = 5;
|
|
795
|
+
/** Inbound connections mid-upgrade before new ones are refused. `MAX_INCOMING_PENDING_CONNECTIONS`. */
|
|
796
|
+
export const DECLARED_MAX_INCOMING_PENDING = 10;
|
|
797
|
+
/** How long an inbound connection may sit un-upgraded. `INBOUND_UPGRADE_TIMEOUT`. */
|
|
798
|
+
export const DECLARED_INBOUND_UPGRADE_TIMEOUT_MS = 10_000;
|
|
799
|
+
/**
|
|
800
|
+
* How long an inbound connection that has NEVER carried a stream may live.
|
|
801
|
+
*
|
|
802
|
+
* ─── THIS MEASURES "NEVER SPOKE", NOT "IS QUIET RIGHT NOW" ─────────────────────────────────────
|
|
803
|
+
*
|
|
804
|
+
* The first version compared `now - openedAt` and ANDed it with `streamCount === 0` at the instant
|
|
805
|
+
* of the sweep — i.e. it measured connection AGE and sampled business. Review flagged that as
|
|
806
|
+
* fatal on the grounds that CELLO content streams are per-message and ephemeral, so a busy session
|
|
807
|
+
* would sit at zero streams almost all of the time and be reaped mid-conversation.
|
|
808
|
+
*
|
|
809
|
+
* **MEASURED BEFORE ACCEPTING IT, and the stated mechanism does NOT reproduce on libp2p@3.3.2.**
|
|
810
|
+
* A stream closed by the dialer stays in the listener's `connection.streams` — `streamCount` was
|
|
811
|
+
* still 1 after 10s (25 samples, 400ms apart), and under the reviewer's own scenario (a stream
|
|
812
|
+
* every 400ms, 1000ms grace) it CLIMBED 1→8 across 3.2s and nothing was reaped. So the specific
|
|
813
|
+
* claim "a busy session sits at zero streams" is false here, and the reported hang-up at t≈1200ms
|
|
814
|
+
* did not occur when the scenario was re-run against that predicate.
|
|
815
|
+
*
|
|
816
|
+
* **The fix stays anyway, and the reason is the honest one:** the old predicate was correct only
|
|
817
|
+
* BECAUSE libp2p happens to retain closed streams. That is an implementation detail of a
|
|
818
|
+
* dependency, undocumented and free to change in a patch release — precisely the kind of inherited
|
|
819
|
+
* behaviour the other half of this unit exists to stop relying on. `hasEverCarriedStream` is the
|
|
820
|
+
* literal reading of the DoD's "authenticates to nothing" and it holds whatever libp2p does with
|
|
821
|
+
* closed streams.
|
|
822
|
+
*/
|
|
823
|
+
export const IDLE_CONNECTION_GRACE_MS = 90_000;
|
|
824
|
+
/** How often the sweep runs. A third of the grace period, so nothing lives much past it. */
|
|
825
|
+
export const IDLE_CONNECTION_SWEEP_MS = 30_000;
|
|
826
|
+
/**
|
|
827
|
+
* Resolve the declared limits, honouring per-node overrides.
|
|
828
|
+
*
|
|
829
|
+
* Spreads the declared block FIRST so an override that names one key keeps the other three. An
|
|
830
|
+
* override that returned only what it was given would re-inherit the rest from libp2p — this
|
|
831
|
+
* unit's own defect, reintroduced by its fix.
|
|
832
|
+
*/
|
|
833
|
+
export function resolveConnectionLimits(opts) {
|
|
834
|
+
return {
|
|
835
|
+
maxConnections: DECLARED_MAX_CONNECTIONS,
|
|
836
|
+
inboundConnectionThreshold: DECLARED_INBOUND_CONNECTION_THRESHOLD,
|
|
837
|
+
maxIncomingPendingConnections: DECLARED_MAX_INCOMING_PENDING,
|
|
838
|
+
inboundUpgradeTimeout: DECLARED_INBOUND_UPGRADE_TIMEOUT_MS,
|
|
839
|
+
...(opts.connectionLimits ?? {}),
|
|
840
|
+
};
|
|
841
|
+
}
|
|
842
|
+
/**
|
|
843
|
+
* Which connections should be hung up — pure, so the judgement is testable apart from the sweep.
|
|
844
|
+
*
|
|
845
|
+
* FOUR THINGS ARE SPARED, and each is spared for a reason that costs something real if forgotten:
|
|
846
|
+
*
|
|
847
|
+
* - **Anything carrying a stream.** That is the definition of in use.
|
|
848
|
+
* - **Anything inside the grace period.** A connection is silent for a moment on every dial.
|
|
849
|
+
* - **Every INBOUND connection that has ever carried a stream** (see the grace constant). A peer
|
|
850
|
+
* that has spoken is not "authenticating to nothing", however quiet it is now.
|
|
851
|
+
* - **Every OUTBOUND connection** — as a SELECTION rule. This node chose those: the content-park
|
|
852
|
+
* deposit and pull, the restart-seal submission to a prior session's relay. Reaping one cancels
|
|
853
|
+
* our own errand to bound someone else's connection. **Note the honest bound:** `hangUp` is
|
|
854
|
+
* PEER-scoped and drops every connection to that peer, so a peer holding one idle inbound AND
|
|
855
|
+
* one live outbound connection loses both. Nothing reaches that state today (the gater denies
|
|
856
|
+
* inbound from any peer that is not the named counterparty or the reserved relay, and both are
|
|
857
|
+
* spared), but the rule is "outbound connections are never SELECTED", not "outbound connections
|
|
858
|
+
* are never closed". This project has already paid once for a comment claiming the stronger
|
|
859
|
+
* version — `session-node-manager.ts` records a sweep that hung up the content-park dials and
|
|
860
|
+
* surfaced as `relay_unavailable`, a transport label for a local decision.
|
|
861
|
+
* - **Whatever `isSpared` names.** In production: the relay this node holds a live reservation
|
|
862
|
+
* with, and the counterparty the gate currently names. A relay reservation is IDLE BY NATURE
|
|
863
|
+
* between refreshes, which is exactly the shape hunted here — a reaper without it takes an
|
|
864
|
+
* agent's inbound reachability away and reports nothing.
|
|
865
|
+
*/
|
|
866
|
+
/**
|
|
867
|
+
* Fold this sweep's observation into the activity set: mark anything carrying a stream, and forget
|
|
868
|
+
* connections that have gone.
|
|
869
|
+
*
|
|
870
|
+
* EXTRACTED so it can be attacked directly. Mutation testing showed that deleting the recording
|
|
871
|
+
* left every test green, because no live test can reach the state where it matters — libp2p retains
|
|
872
|
+
* closed streams, so `streamCount` does not fall back to 0 within any window a test can wait for.
|
|
873
|
+
* The bit is still the thing that makes the judgement independent of that libp2p behaviour, so it
|
|
874
|
+
* needs coverage that does not depend on it.
|
|
875
|
+
*/
|
|
876
|
+
export function recordStreamActivity(seen, connections) {
|
|
877
|
+
const live = new Set(connections.map((c) => c.id));
|
|
878
|
+
for (const id of seen)
|
|
879
|
+
if (!live.has(id))
|
|
880
|
+
seen.delete(id);
|
|
881
|
+
for (const c of connections)
|
|
882
|
+
if (c.streamCount > 0)
|
|
883
|
+
seen.add(c.id);
|
|
884
|
+
}
|
|
885
|
+
export function selectIdleConnections(args) {
|
|
886
|
+
const grace = args.graceMs ?? IDLE_CONNECTION_GRACE_MS;
|
|
887
|
+
const doomed = args.connections
|
|
888
|
+
.filter((c) => c.direction === "inbound" &&
|
|
889
|
+
c.streamCount === 0 &&
|
|
890
|
+
!args.hasEverCarriedStream(c.id) &&
|
|
891
|
+
args.now - c.openedAt >= grace &&
|
|
892
|
+
!args.isSpared(c.peerId))
|
|
893
|
+
.map((c) => c.peerId);
|
|
894
|
+
// DEDUPLICATED because `hangUp` is PEER-scoped: two idle connections to one peer would otherwise
|
|
895
|
+
// yield the same id twice and hang it up twice. Harmless but noisy, and it would double-count in
|
|
896
|
+
// whatever the caller reports.
|
|
897
|
+
return [...new Set(doomed)];
|
|
898
|
+
}
|
|
589
899
|
export function resolveConnectionMonitorConfig(opts) {
|
|
590
900
|
const override = opts.connectionMonitor;
|
|
591
901
|
return {
|
|
@@ -618,18 +928,33 @@ export async function createNode(opts) {
|
|
|
618
928
|
// Resolved ONCE and shared: what libp2p is configured with is what the node reports, by
|
|
619
929
|
// construction rather than by two call sites agreeing.
|
|
620
930
|
const connectionMonitorPolicy = resolveConnectionMonitorConfig(opts);
|
|
931
|
+
// Same discipline, same reason: resolved ONCE and handed to both libp2p and the node.
|
|
932
|
+
const connectionLimits = resolveConnectionLimits(opts);
|
|
621
933
|
const libp2p = await createLibp2p({
|
|
622
934
|
start: false,
|
|
623
935
|
privateKey: transportKey,
|
|
624
936
|
addresses: {
|
|
625
937
|
listen: opts.listenAddresses,
|
|
626
938
|
...(opts.announceAddresses?.length ? { announce: opts.announceAddresses } : {}),
|
|
939
|
+
// ⚠️ DOD-M15-RELAYONLY-1: THE OTHER HALF OF THE HOLE-PUNCH FIX, and without it the whole
|
|
940
|
+
// control is theatre. Turning dcutr off stops us UPGRADING to a direct connection; it does
|
|
941
|
+
// nothing about `identify`, which hands a peer our full listen-address set on the FIRST
|
|
942
|
+
// relayed connection — LAN addresses always, and the AutoNAT-confirmed public one once it is
|
|
943
|
+
// promoted. So the counterparty would simply be TOLD the address they could not reach by
|
|
944
|
+
// punching.
|
|
945
|
+
//
|
|
946
|
+
// `announceFilter` is libp2p's own seam for this: it decides what we advertise. Under
|
|
947
|
+
// relay-only we advertise circuit addresses and nothing else, which is exactly what
|
|
948
|
+
// `publishableEndpoint` does for the directory — the same rule applied on the peer-to-peer
|
|
949
|
+
// side, where the directory's filter has no reach.
|
|
950
|
+
...(opts.holePunch?.enabled === false
|
|
951
|
+
? { announceFilter: (addrs) => addrs.filter((a) => a.toString().split("/").includes("p2p-circuit")) }
|
|
952
|
+
: {}),
|
|
627
953
|
},
|
|
628
954
|
...(hasCircuitListen ? { transportManager: { faultTolerance: FaultTolerance.NO_FATAL } } : {}),
|
|
629
955
|
transports: [
|
|
630
956
|
tcp(),
|
|
631
957
|
webSockets(),
|
|
632
|
-
// Circuit relay transport enables dialing via relay addresses
|
|
633
958
|
circuitRelayTransport(),
|
|
634
959
|
],
|
|
635
960
|
connectionEncrypters: [
|
|
@@ -667,9 +992,17 @@ export async function createNode(opts) {
|
|
|
667
992
|
// DOD-NAT-REACHABILITY-1: dcutr on every node — the standing receiver is
|
|
668
993
|
// the inbound side of a relayed connection, and the inbound side starts
|
|
669
994
|
// the upgrade. See the header note.
|
|
670
|
-
|
|
995
|
+
//
|
|
996
|
+
// ⚠️ DOD-M15-RELAYONLY-1 made this OPTIONAL, and the reason is the sentence directly above:
|
|
997
|
+
// if the inbound side starts the upgrade, then a node that must never be directly reachable
|
|
998
|
+
// will hole-punch itself into exactly the direct connection its operator switched a privacy
|
|
999
|
+
// setting on to avoid. Suppressing the published address does not help — the address a peer
|
|
1000
|
+
// cannot be TOLD, a hole-punch still REVEALS. Default stays enabled for every other caller.
|
|
1001
|
+
...(opts.holePunch?.enabled === false ? {} : { dcutr: dcutr() }),
|
|
671
1002
|
},
|
|
672
1003
|
...(opts.connectionGater ? { connectionGater: opts.connectionGater } : {}),
|
|
1004
|
+
// DOD-M15-IDLE-CONNS-1: declared, not inherited. Same object the node reports.
|
|
1005
|
+
connectionManager: connectionLimits,
|
|
673
1006
|
// DOD-RELAY-KEEPALIVE-1: the monitor's policy is ours now, not libp2p's defaults.
|
|
674
1007
|
// Keepalive pings still detect a peer that vanished without a clean close, but the deadline
|
|
675
1008
|
// a ping must meet is a WAN deadline rather than 5 seconds.
|
|
@@ -683,6 +1016,19 @@ export async function createNode(opts) {
|
|
|
683
1016
|
const expectsDirectListener = hasCircuitListen && opts.listenAddresses.some((a) => !a.includes("/p2p-circuit"));
|
|
684
1017
|
const node = new CelloNodeImpl(libp2p, opts.keyProvider, configuredHosts, expectsDirectListener, hasCircuitListen, !includeAutonatResponder);
|
|
685
1018
|
node.setConnectionMonitorPolicy(connectionMonitorPolicy);
|
|
1019
|
+
node.setConnectionLimits(connectionLimits);
|
|
1020
|
+
if (opts.idleConnectionReaper) {
|
|
1021
|
+
node.enableIdleReaper({
|
|
1022
|
+
graceMs: opts.idleConnectionReaper.graceMs ?? IDLE_CONNECTION_GRACE_MS,
|
|
1023
|
+
sweepIntervalMs: opts.idleConnectionReaper.sweepIntervalMs ?? IDLE_CONNECTION_SWEEP_MS,
|
|
1024
|
+
// Forwarded EXPLICITLY. The first version of this call built the config from the two numbers
|
|
1025
|
+
// and silently dropped both callbacks, so the daemon's logging and its connection census were
|
|
1026
|
+
// declared, honoured by the node, and reachable by nobody — the same shape as `wait_for_seal`
|
|
1027
|
+
// being declared, honoured and never forwarded by the shim.
|
|
1028
|
+
...(opts.idleConnectionReaper.onReaped ? { onReaped: opts.idleConnectionReaper.onReaped } : {}),
|
|
1029
|
+
...(opts.idleConnectionReaper.onObserved ? { onObserved: opts.idleConnectionReaper.onObserved } : {}),
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
686
1032
|
return node;
|
|
687
1033
|
}
|
|
688
1034
|
//# sourceMappingURL=node.js.map
|
package/dist/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACrF,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,+FAA+F;AAC/F,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,E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AE,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/F,GAAG,CAAC,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,oBAAoB,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACtG,CAAC,CAAC;IACL,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import type { KeyProvider } from "@cello-protocol/crypto";
|
|
|
16
16
|
import type { ConnectionGater, Stream } from "@libp2p/interface";
|
|
17
17
|
import type { Dialability, Unsubscribe } from "./autonat.js";
|
|
18
18
|
import type { ResolvedConnectionMonitorConfig as ConnectionMonitorPolicy } from "./node.js";
|
|
19
|
+
import type { IdleReapEvent, ConnectionCounts } from "./node.js";
|
|
19
20
|
export interface CreateNodeOptions {
|
|
20
21
|
/**
|
|
21
22
|
* The CELLO KeyProvider holding K_local (Ed25519 signing key).
|
|
@@ -63,6 +64,25 @@ export interface CreateNodeOptions {
|
|
|
63
64
|
autonatResponder?: {
|
|
64
65
|
enabled: boolean;
|
|
65
66
|
};
|
|
67
|
+
/**
|
|
68
|
+
* DOD-M15-RELAYONLY-1: NAT hole-punching (dcutr). Defaults to ENABLED, which is every existing
|
|
69
|
+
* caller's behaviour and the right default — a direct connection is faster and cheaper than a
|
|
70
|
+
* relayed one.
|
|
71
|
+
*
|
|
72
|
+
* ⚠️ Set `{ enabled: false }` on a node whose whole purpose is NOT to be directly reachable.
|
|
73
|
+
* dcutr's job is to UPGRADE a relayed connection to a direct one, and the note beside its
|
|
74
|
+
* registration says the standing receiver is *"the inbound side of a relayed connection, and the
|
|
75
|
+
* inbound side starts the upgrade"*. So a relay-only agent would route its session over the relay
|
|
76
|
+
* exactly as asked, and then hole-punch its way to a direct connection anyway — **disclosing the
|
|
77
|
+
* very address the setting exists to hide, with no test able to see it, because nothing observes a
|
|
78
|
+
* live upgrade.**
|
|
79
|
+
*
|
|
80
|
+
* Suppressing the published address is therefore not sufficient on its own: the address a peer
|
|
81
|
+
* cannot be told, a hole-punch can still reveal.
|
|
82
|
+
*/
|
|
83
|
+
holePunch?: {
|
|
84
|
+
enabled: boolean;
|
|
85
|
+
};
|
|
66
86
|
/**
|
|
67
87
|
* CELLO-M7-TRANSPORT-001 / DOD-NAT-REACHABILITY-1: the role of this node,
|
|
68
88
|
* which tunes the libp2p service set:
|
|
@@ -145,6 +165,47 @@ export interface CreateNodeOptions {
|
|
|
145
165
|
*/
|
|
146
166
|
pingTimeoutMinMs?: number;
|
|
147
167
|
};
|
|
168
|
+
/**
|
|
169
|
+
* DOD-M15-IDLE-CONNS-1 — override the DECLARED connection-manager limits for this node.
|
|
170
|
+
*
|
|
171
|
+
* Omit it and the declared block applies. Values live in `resolveConnectionLimits`; they are
|
|
172
|
+
* libp2p's own defaults adopted deliberately, so this changes nothing today and makes a future
|
|
173
|
+
* libp2p bump visible instead of silent. A relay legitimately carries far more connections than
|
|
174
|
+
* an operator's laptop, which is what the override is for.
|
|
175
|
+
*/
|
|
176
|
+
connectionLimits?: {
|
|
177
|
+
maxConnections?: number;
|
|
178
|
+
inboundConnectionThreshold?: number;
|
|
179
|
+
maxIncomingPendingConnections?: number;
|
|
180
|
+
inboundUpgradeTimeout?: number;
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* DOD-M15-IDLE-CONNS-1 — run the idle-connection sweep on this node.
|
|
184
|
+
*
|
|
185
|
+
* OPT-IN, and deliberately so: the node that needs it is the one accepting inbound dials from
|
|
186
|
+
* peers it did not choose (the standing receiver). A directory-signaling node's connections are
|
|
187
|
+
* ones it dialled, and a relay's clients are governed by the reservation TTL — sweeping either
|
|
188
|
+
* would hang up links their own subsystem is responsible for.
|
|
189
|
+
*/
|
|
190
|
+
idleConnectionReaper?: {
|
|
191
|
+
/**
|
|
192
|
+
* How long a connection that has NEVER carried a stream may live. Default
|
|
193
|
+
* `IDLE_CONNECTION_GRACE_MS`. NOT an idle timer: a connection that has ever spoken is never a
|
|
194
|
+
* candidate again, because CELLO's per-message streams leave a busy session at zero streams
|
|
195
|
+
* almost all of the time.
|
|
196
|
+
*/
|
|
197
|
+
graceMs?: number;
|
|
198
|
+
/** How often to look. Default `IDLE_CONNECTION_SWEEP_MS`. */
|
|
199
|
+
sweepIntervalMs?: number;
|
|
200
|
+
/**
|
|
201
|
+
* Told when a connection is hung up, and when a sweep or a hang-up FAILS. Without it the reaper
|
|
202
|
+
* is a guard nobody hears — the operator's next send returns `no_connection` and nothing names
|
|
203
|
+
* the local timer that caused it.
|
|
204
|
+
*/
|
|
205
|
+
onReaped?: (event: IdleReapEvent) => void;
|
|
206
|
+
/** Told the connection census every sweep — the count the DoD line requires before any tuning. */
|
|
207
|
+
onObserved?: (counts: ConnectionCounts) => void;
|
|
208
|
+
};
|
|
148
209
|
}
|
|
149
210
|
/**
|
|
150
211
|
* Handler called when a remote peer opens a stream on a registered protocol.
|
|
@@ -222,6 +283,8 @@ export interface CelloNode {
|
|
|
222
283
|
* tell "dead muxer on a live socket" from "dead through" — see hangUp (DOD-M12-CONN-EVICT-1).
|
|
223
284
|
*/
|
|
224
285
|
getConnections(): Array<{
|
|
286
|
+
/** libp2p's per-CONNECTION id — a peer may hold several, and the activity bit is per connection. */
|
|
287
|
+
id: string;
|
|
225
288
|
peerId: string;
|
|
226
289
|
encryption: string | undefined;
|
|
227
290
|
remoteAddr?: string;
|
|
@@ -233,7 +296,38 @@ export interface CelloNode {
|
|
|
233
296
|
* defaulted, because inventing "open" here would recreate the blindness it exists to remove.
|
|
234
297
|
*/
|
|
235
298
|
muxerStatus?: string;
|
|
299
|
+
/**
|
|
300
|
+
* DOD-M15-IDLE-CONNS-1. Who dialled whom. The reaper only ever touches `inbound`: an outbound
|
|
301
|
+
* connection is an errand this agent started, and hanging one up cancels our own work.
|
|
302
|
+
*/
|
|
303
|
+
direction: "inbound" | "outbound";
|
|
304
|
+
/** Epoch-ms the connection opened, from libp2p's own timeline. The reaper's clock. */
|
|
305
|
+
openedAt: number;
|
|
306
|
+
/** Live streams on this connection. Zero is what "authenticates to nothing" actually looks like. */
|
|
307
|
+
streamCount: number;
|
|
236
308
|
}>;
|
|
309
|
+
/**
|
|
310
|
+
* The connection-manager limits libp2p was given — the SAME object, not a rebuilt copy.
|
|
311
|
+
*
|
|
312
|
+
* Answerable at runtime for the reason the DoD line insists on: a cap set without measurement
|
|
313
|
+
* breaks reachability, and until this existed there was no way to measure a healthy daemon's
|
|
314
|
+
* connection count at all.
|
|
315
|
+
*/
|
|
316
|
+
getConnectionLimits(): {
|
|
317
|
+
maxConnections: number;
|
|
318
|
+
inboundConnectionThreshold: number;
|
|
319
|
+
maxIncomingPendingConnections: number;
|
|
320
|
+
inboundUpgradeTimeout: number;
|
|
321
|
+
};
|
|
322
|
+
/**
|
|
323
|
+
* Name the peers the idle sweep must never hang up — the relay this node holds a live reservation
|
|
324
|
+
* with, and the peer the gate currently names (the admitted dialer, then the counterparty).
|
|
325
|
+
*
|
|
326
|
+
* A reservation connection is idle BY NATURE between refreshes, which is precisely the shape the
|
|
327
|
+
* sweep hunts. And the node is REUSED across promotion, so without the second the sweep reaps the
|
|
328
|
+
* counterparty mid-conversation. Settable rather than fixed at construction because both change.
|
|
329
|
+
*/
|
|
330
|
+
setIdleReaperSpared(isSpared: (peerId: string) => boolean): void;
|
|
237
331
|
/**
|
|
238
332
|
* DOD-M12-CONN-EVICT-1: drop every connection to this peer.
|
|
239
333
|
*
|
|
@@ -246,6 +340,24 @@ export interface CelloNode {
|
|
|
246
340
|
* Fails with { reason: 'invalid_peer_id' } if peerId does not parse.
|
|
247
341
|
*/
|
|
248
342
|
hangUp(peerId: string): Promise<void>;
|
|
343
|
+
/**
|
|
344
|
+
* DOD-M15-RELAYSLOTS-1 — release the circuit RESERVATION this relay is holding for `peerId`.
|
|
345
|
+
* Returns true if one was held and is now gone.
|
|
346
|
+
*
|
|
347
|
+
* ⚠️ **`hangUp` DOES NOT DO THIS, AND THAT IS THE WHOLE REASON THIS EXISTS.** Verified against
|
|
348
|
+
* `@libp2p/circuit-relay-v2@4.2.3`: the server's `removeReservation` is called from exactly one
|
|
349
|
+
* place — the catch when writing the confirmation frame fails — and there is no connection-close
|
|
350
|
+
* or disconnect listener anywhere in its server. A reservation therefore survives its holder's
|
|
351
|
+
* disconnect for the full `reservationTtl`, which defaults to TWO HOURS.
|
|
352
|
+
*
|
|
353
|
+
* The consequence, measured rather than assumed: a relay could evict a peer, watch its own ledger
|
|
354
|
+
* drop, report itself well under capacity, and still be holding that reservation against libp2p's
|
|
355
|
+
* 4096 limit for two hours. Every reclaim path the relay has — the grace-window revoke, the
|
|
356
|
+
* reaper, the unproven-budget eviction — was freeing bookkeeping and not capacity.
|
|
357
|
+
*
|
|
358
|
+
* No-op on a node with no relay service, and on a peer holding no reservation.
|
|
359
|
+
*/
|
|
360
|
+
releaseRelayReservation(peerId: string): boolean;
|
|
249
361
|
/**
|
|
250
362
|
* CELLO-M7-TRANSPORT-001: true if there is at least one OPEN, non-relayed
|
|
251
363
|
* (direct) connection to peerId. Used by the transport selector's dcutr path to
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EAAE,+BAA+B,IAAI,uBAAuB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;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ACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,eAAe,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,mBAAmB,GAC3B,yBAAyB,GACzB,mBAAmB,GACnB,gBAAgB,GAChB,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cello-protocol/transport",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.66",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"it-pipe": "^3.0.1",
|
|
40
40
|
"libp2p": "^3.2.3",
|
|
41
41
|
"uint8arrays": "^5.1.1",
|
|
42
|
-
"@cello-protocol/crypto": "0.0.
|
|
43
|
-
"@cello-protocol/protocol-types": "0.0.
|
|
42
|
+
"@cello-protocol/crypto": "0.0.60",
|
|
43
|
+
"@cello-protocol/protocol-types": "0.0.64"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@claude-flow/testing": "3.0.0-alpha.6",
|