@serfab/cadre-core 1.5.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/cadre-node.d.ts +206 -67
  2. package/dist/cadre-node.js +399 -98
  3. package/dist/cadre-node.js.map +1 -1
  4. package/dist/index.d.ts +6 -1
  5. package/dist/index.js +17 -1
  6. package/dist/index.js.map +1 -1
  7. package/dist/joined-strand-store.d.ts +112 -0
  8. package/dist/joined-strand-store.js +263 -0
  9. package/dist/joined-strand-store.js.map +1 -0
  10. package/dist/key-store.d.ts +6 -0
  11. package/dist/key-store.js.map +1 -1
  12. package/dist/link-budget.d.ts +95 -53
  13. package/dist/link-budget.js +97 -53
  14. package/dist/link-budget.js.map +1 -1
  15. package/dist/node-local-snapshot.d.ts +5 -4
  16. package/dist/node-local-snapshot.js +6 -3
  17. package/dist/node-local-snapshot.js.map +1 -1
  18. package/dist/peer-dial.d.ts +3 -3
  19. package/dist/peer-dial.js +3 -3
  20. package/dist/peer-join-backfill.d.ts +35 -16
  21. package/dist/peer-join-backfill.js +117 -57
  22. package/dist/peer-join-backfill.js.map +1 -1
  23. package/dist/relay-reservation.d.ts +2 -2
  24. package/dist/relay-reservation.js +2 -2
  25. package/dist/seed-bootstrap.js +1 -1
  26. package/dist/strand-first-sync-gate.d.ts +88 -43
  27. package/dist/strand-first-sync-gate.js +92 -46
  28. package/dist/strand-first-sync-gate.js.map +1 -1
  29. package/dist/strand-instance-manager.d.ts +39 -0
  30. package/dist/strand-instance-manager.js +80 -3
  31. package/dist/strand-instance-manager.js.map +1 -1
  32. package/dist/strand-peer-book-file.d.ts +12 -0
  33. package/dist/strand-peer-book-file.js +37 -0
  34. package/dist/strand-peer-book-file.js.map +1 -0
  35. package/dist/strand-peer-book-protocol.d.ts +159 -0
  36. package/dist/strand-peer-book-protocol.js +360 -0
  37. package/dist/strand-peer-book-protocol.js.map +1 -0
  38. package/dist/strand-peer-book-swap.d.ts +104 -0
  39. package/dist/strand-peer-book-swap.js +284 -0
  40. package/dist/strand-peer-book-swap.js.map +1 -0
  41. package/dist/strand-peer-book.d.ts +159 -0
  42. package/dist/strand-peer-book.js +354 -0
  43. package/dist/strand-peer-book.js.map +1 -0
  44. package/dist/strand-peer-observer.d.ts +88 -0
  45. package/dist/strand-peer-observer.js +180 -0
  46. package/dist/strand-peer-observer.js.map +1 -0
  47. package/dist/types.d.ts +84 -17
  48. package/dist/types.js +6 -0
  49. package/dist/types.js.map +1 -1
  50. package/package.json +11 -7
  51. package/src/cadre-node.ts +7776 -7445
  52. package/src/index.ts +68 -0
  53. package/src/joined-strand-store.ts +308 -0
  54. package/src/key-store.ts +6 -0
  55. package/src/link-budget.ts +100 -53
  56. package/src/node-local-snapshot.ts +293 -289
  57. package/src/peer-dial.ts +3 -3
  58. package/src/peer-join-backfill.ts +709 -647
  59. package/src/relay-reservation.ts +2 -2
  60. package/src/seed-bootstrap.ts +1 -1
  61. package/src/strand-first-sync-gate.ts +352 -306
  62. package/src/strand-instance-manager.ts +106 -3
  63. package/src/strand-peer-book-file.ts +39 -0
  64. package/src/strand-peer-book-protocol.ts +463 -0
  65. package/src/strand-peer-book-swap.ts +338 -0
  66. package/src/strand-peer-book.ts +468 -0
  67. package/src/strand-peer-observer.ts +235 -0
  68. package/src/types.ts +86 -17
@@ -1,14 +1,25 @@
1
1
  import debug from 'debug';
2
- import { BlockTransferClient } from '@optimystic/db-p2p';
2
+ import { BlockTransferClient, buildBlockTransferProtocol } from '@optimystic/db-p2p';
3
3
  import { peerJoinPushBudget } from './link-budget.js';
4
4
  // Peer-join whole-store block catch-up, shared by the STRAND networks and the CONTROL
5
- // network. On `connection:open` (debounced) it pushes every committed, materialized block
6
- // in the local raw store to the new peer, so a machine that joined after blocks were
5
+ // network. On a new peer's `peer:identify` result — libp2p's identify protocol runs once per
6
+ // connection and reports the protocols the remote supports — naming this network's own
7
+ // block-transfer protocol, it schedules a debounced push of every committed, materialized
8
+ // block in the local raw store to that peer, so a machine that joined after blocks were
7
9
  // committed still ends up physically holding them. Optimystic has no cohort-join catch-up
8
10
  // of its own; a block committed while its writer was alone has exactly one holder forever
9
11
  // without this (named collection-header blocks are written once, at collection creation,
10
12
  // and their revision never moves again — so no later commit ever carries them anywhere).
11
13
  //
14
+ // A peer whose identify does not name the protocol — a bare circuit relay, a bootstrap node,
15
+ // or (on the control network) a stranger the inbound gate admits without membership — is
16
+ // never scheduled at all: it cannot receive anything, since the protocol id is namespaced per
17
+ // network and the dial would simply fail. Before this filter existed, such a peer WAS
18
+ // scheduled, failed every dial, and after `PEER_JOIN_BACKFILL_WARN_AFTER_FAILURES` produced a
19
+ // `console.warn` naming it — gotchoices/sereus#18 is two relay-only parties restarting and
20
+ // printing exactly that warning about their own relay, forever, on every reconnect. See
21
+ // {@link speaksBlockTransfer}.
22
+ //
12
23
  // NOTE: this copies the WHOLE local store to every newly connected peer, which is right
13
24
  // while a network is one party's handful of machines (see docs/architecture.md →
14
25
  // Replication cluster size — the control network replicates to the whole party by intent,
@@ -23,12 +34,10 @@ import { peerJoinPushBudget } from './link-budget.js';
23
34
  // Membership — the one place the two networks differ, expressed as the optional
24
35
  // `authorizePeer` dep:
25
36
  //
26
- // - STRAND networks pass none. Anything connected on a strand's own libp2p network already
27
- // receives cohort replicas of new commits, so pushing older blocks to it exposes nothing
28
- // new; adding a gate would diverge from what ordinary replication already does there. A
29
- // peer that does NOT speak the strand's block-transfer protocol (a bare circuit relay or
30
- // bootstrap node the strand node also connects to) cannot receive anything: the protocol
31
- // id is namespaced per strand, so the dial fails and the push is dropped.
37
+ // - STRAND networks pass none. Anything that speaks the strand's own block-transfer protocol
38
+ // already receives cohort replicas of new commits, so pushing older blocks to it exposes
39
+ // nothing new; adding a gate would diverge from what ordinary replication already does
40
+ // there.
32
41
  // - The CONTROL network MUST pass one, because that argument does not carry over: its
33
42
  // inbound connection gate deliberately admits non-members in several states (an
34
43
  // un-enrolled node taking its seed, an open enrollment window, an outstanding
@@ -37,8 +46,8 @@ import { peerJoinPushBudget } from './link-budget.js';
37
46
  // peer would hand a stranger the party's entire membership, addresses and strand list.
38
47
  // `CadreNode` passes `isAuthorizedMember`; the gate is consulted at PUSH time, not at
39
48
  // schedule time, and fails closed on a thrown check. A denied run is not memoized, so
40
- // the peer is retried on its next `connection:open` — or sooner, via
41
- // `scheduleConnectedPeers()` on a membership change (the production join order is
49
+ // the peer is retried on its next `peer:identify` (a reconnect re-runs identify) — or
50
+ // sooner, via `scheduleConnectedPeers()` on a membership change (the production join order is
42
51
  // connect-then-authorize, so the denial at dial time is the expected first pass).
43
52
  //
44
53
  // Both per-push deadlines are DERIVED from the declared link round trip
@@ -50,22 +59,23 @@ import { peerJoinPushBudget } from './link-budget.js';
50
59
  // link slow enough to matter it had never once managed to. The reproduction is
51
60
  // `packages/integration-tests/src/scenarios/relayed-dial-cost-by-latency.integration.ts`.
52
61
  //
53
- // It does NOT work at every speed. Above roughly 1250 ms one-way, two libp2p budgets that
54
- // sereus cannot reach abandon the connection before any deadline here is consulted, and the
55
- // listener's one makes that failure look like an absent peer rather than a timeout — see
56
- // `link-budget.ts` ("The ceiling this does NOT lift") and
57
- // `tickets/blocked/how-slow-a-relayed-link-does-sereus-carry`.
62
+ // It does NOT work at every speed. Above the declared link, libp2p's own dial and
63
+ // inbound-upgrade limits — derived from the same declaration — abandon the connection before
64
+ // any deadline here is consulted, and the listener's one makes that failure look like an absent
65
+ // peer rather than a timeout. That is also what happens when the machine being caught up
66
+ // declared a FASTER link than this one, since its limit is the listener's. See
67
+ // `link-budget.ts` ("libp2p's own two limits", "What still fails at the supported link").
58
68
  //
59
69
  // RETRY, and why it backs off. A run whose PUSH FAILED — the transport threw, which is what
60
70
  // a dial or response deadline expiring looks like here — re-arms on a doubling backoff
61
- // (`retryBackoffMs` to `maxRetryBackoffMs`), and a `connection:open` arriving while that wait
71
+ // (`retryBackoffMs` to `maxRetryBackoffMs`), and a `peer:identify` arriving while that wait
62
72
  // is outstanding is DROPPED rather than collapsing it back to the debounce. Both halves are
63
73
  // load-bearing:
64
74
  //
65
75
  // - Without the re-arm, a transient push failure over a stable connection left the peer
66
76
  // partially copied until its next reconnect (read repair still covered reads meanwhile).
67
77
  // - Without dropping churn inside the wait, a peer that cannot be reached at all is
68
- // re-dialled on every `connection:open` forever. That is not hypothetical: the 2026-09-26
78
+ // re-dialled on every `peer:identify` forever. That is not hypothetical: the 2026-09-26
69
79
  // relayed reproduction shows one peer re-opening a connection about every 14.5 s for a
70
80
  // 200-second run, each event starting a catch-up whose dial could not possibly finish.
71
81
  // The connection kept re-appearing because Optimystic's own block-transfer push path
@@ -83,13 +93,13 @@ import { peerJoinPushBudget } from './link-budget.js';
83
93
  // {@link Chunk.proofs}). Re-arming on those would re-push the WHOLE store to that peer every
84
94
  // `maxRetryBackoffMs` for as long as the node runs, and report the failure below as a link
85
95
  // budget problem when nothing about the link is wrong. All three still leave the peer
86
- // un-memoized, so its next `connection:open` retries — the behaviour that predates the
96
+ // un-memoized, so its next `peer:identify` retries — the behaviour that predates the
87
97
  // backoff, and the right one for a verdict rather than a timeout. Denial in particular is
88
98
  // re-driven on purpose by `scheduleConnectedPeers()` the moment the membership commit lands,
89
99
  // because the control network's join order is connect-then-authorize.
90
100
  //
91
101
  // A re-arm is also skipped when the peer is no longer CONNECTED. This module's trigger is
92
- // `connection:open`, so a peer that went away already has one: re-arming instead would leave
102
+ // `peer:identify`, so a peer that went away already has one: re-arming instead would leave
93
103
  // a machine dialing a peer it cannot see once a minute for the rest of its uptime.
94
104
  //
95
105
  // After `PEER_JOIN_BACKFILL_WARN_AFTER_FAILURES` consecutive failures one `console.warn`
@@ -97,16 +107,25 @@ import { peerJoinPushBudget } from './link-budget.js';
97
107
  // nothing at all: the connection simply never appears and only a DEBUG log mentions a dial
98
108
  // timeout.
99
109
  //
100
- // NOTE: a failing dial to a non-speaking peer costs one dial timeout per attempt, and is
101
- // never memoized (only clean runs are). Bounded by the backoff above plus the
102
- // unreachable-peer bail in `runCatchUp` — one dial per attempt, not one per chunk. If a node
103
- // ever holds many such connections, or the enumeration ahead of the first chunk gets
104
- // expensive, pre-check `libp2p.peerStore` for this network's block-transfer protocol before
105
- // enumerating.
110
+ // NOTE: the protocol check happens once — either when a connection's `peer:identify` fires,
111
+ // or, for a peer already connected when this instance starts, when `scheduleConnectedPeers()`
112
+ // reads its protocols back from the peer store — and is never repeated once a peer is
113
+ // scheduled. A peer that stops speaking the protocol after being scheduled (should that ever
114
+ // happen) is not de-scheduled; `runCatchUp`'s own unreachable-peer bail is what would catch
115
+ // that case instead. `peer:identify` also fires on every identify-push from a connected peer
116
+ // (address or protocol changes), which only re-enters the debounce — cheap, and dropped
117
+ // outright for caught-up peers and peers inside a backoff wait.
118
+ //
119
+ // NOTE: a same-network peer whose identify never completes on a connection (the identify
120
+ // stream times out over a slow relayed link, say) is not caught up until a later identify
121
+ // succeeds — a reconnect, an identify-push, or on the control network a membership-change
122
+ // re-drive. Accepted: every db-p2p node runs identify, and read repair still covers reads
123
+ // meanwhile; if relayed links ever routinely outlast identify's timeout, raise that timeout
124
+ // in the node builder rather than scheduling unidentified peers here.
106
125
  //
107
126
  // NOTE: a peer that disconnects INSIDE a backoff wait still costs the one attempt that wait
108
127
  // was already armed for — the connectivity check is made when the re-arm is decided, not when
109
- // the timer fires, and this module subscribes to `connection:open` only. One dial, not a
128
+ // the timer fires, and this module subscribes to `peer:identify` only. One dial, not a
110
129
  // recurring one; if a node ever holds many transient peers, subscribe to `connection:close`
111
130
  // and clear the pending timer there.
112
131
  const log = debug('sereus:cadre:peer-join-backfill');
@@ -117,6 +136,17 @@ const log = debug('sereus:cadre:peer-join-backfill');
117
136
  * changes it or starts exporting it.
118
137
  */
119
138
  export const MAX_BLOCK_MESSAGE_BYTES = 8 * 1024 * 1024;
139
+ /**
140
+ * Whether an identified peer's protocol list names this network's own block-transfer
141
+ * protocol — the one gate that decides whether {@link PeerJoinBackfill} schedules a peer at
142
+ * all. A peer that lacks it (a bare circuit relay, a bootstrap node, a stranger the control
143
+ * network's inbound gate admitted without membership) cannot receive a push no matter how
144
+ * long it is dialed, since the protocol id is namespaced per network. Exported because a
145
+ * later strand peer-address ticket's identify-driven observation needs the identical test.
146
+ */
147
+ export function speaksBlockTransfer(protocols, protocolPrefix) {
148
+ return protocols.includes(buildBlockTransferProtocol(protocolPrefix));
149
+ }
120
150
  /**
121
151
  * Consecutive failed catch-up runs against ONE peer before the module says so on
122
152
  * `console.warn` rather than only in its DEBUG log. At the default backoff that is reached
@@ -158,7 +188,7 @@ function base64WireBytes(rawBytes) {
158
188
  * Best-effort throughout: nothing here throws into a libp2p event handler or into a
159
189
  * runtime bring-up; a failed chunk is logged and the run continues. A peer is marked
160
190
  * fully caught up ONLY after a run with no thrown chunk and an empty `missing` list, so
161
- * the next `connection:open` from a peer whose catch-up failed retries it.
191
+ * the next `peer:identify` from a peer whose catch-up failed retries it.
162
192
  */
163
193
  export class PeerJoinBackfill {
164
194
  constructor(deps, config) {
@@ -184,7 +214,7 @@ export class PeerJoinBackfill {
184
214
  this.failures = new Map();
185
215
  /**
186
216
  * Epoch ms before which a peer's catch-up must not be re-run, set alongside a backoff timer
187
- * that will run it. Its presence is what makes `connection:open` churn free: a schedule
217
+ * that will run it. Its presence is what makes `peer:identify` churn free: a schedule
188
218
  * arriving inside the wait is dropped, rather than collapsing the backoff to the debounce.
189
219
  */
190
220
  this.retryAfter = new Map();
@@ -194,18 +224,30 @@ export class PeerJoinBackfill {
194
224
  this.config = { ...DEFAULT_PEER_JOIN_BACKFILL, ...config };
195
225
  this.createPushClient = deps.createPushClient
196
226
  ?? ((peerId) => new BlockTransferClient(peerId, deps.peerNetwork, deps.protocolPrefix));
197
- this.onConnectionOpen = (evt) => this.schedulePeer(evt.detail.remotePeer);
227
+ this.onPeerIdentify = (evt) => {
228
+ const { peerId, protocols } = evt.detail;
229
+ if (speaksBlockTransfer(protocols, this.deps.protocolPrefix)) {
230
+ this.schedulePeer(peerId);
231
+ }
232
+ };
198
233
  }
199
- /** Subscribe to connection:open AND schedule a catch-up for peers already connected. */
234
+ /**
235
+ * Subscribe to `peer:identify` AND schedule a catch-up for already-connected peers whose
236
+ * stored protocols already name this network's block-transfer protocol — a peer that does
237
+ * not speak it (a bare circuit relay, a bootstrap node) is never scheduled at all. See
238
+ * {@link speaksBlockTransfer} and the module comment.
239
+ */
200
240
  start() {
201
241
  if (this.started || this.stopped || !this.config.enabled)
202
242
  return;
203
243
  this.started = true;
204
- this.deps.libp2p.addEventListener('connection:open', this.onConnectionOpen);
205
- // A runtime rebuilt over live connections (resumeStrand) never sees their
206
- // connection:open, so walk what is already connected once.
207
- const scheduled = this.scheduleConnectedPeers();
208
- log('[%s] started (%d peer(s) already connected)', this.deps.label, scheduled);
244
+ this.deps.libp2p.addEventListener('peer:identify', this.onPeerIdentify);
245
+ // A runtime rebuilt over live connections (resumeStrand) never sees their peer:identify —
246
+ // it already fired before this instance existed, but its result is persisted in the peer
247
+ // store — so walk what is already connected once.
248
+ void this.scheduleConnectedPeers().then((scheduled) => {
249
+ log('[%s] started (%d peer(s) already connected)', this.deps.label, scheduled);
250
+ });
209
251
  }
210
252
  /** Unsubscribe, clear timers; in-flight runs observe the stopped flag and bail. */
211
253
  stop() {
@@ -213,7 +255,7 @@ export class PeerJoinBackfill {
213
255
  return;
214
256
  this.stopped = true;
215
257
  if (this.started) {
216
- this.deps.libp2p.removeEventListener('connection:open', this.onConnectionOpen);
258
+ this.deps.libp2p.removeEventListener('peer:identify', this.onPeerIdentify);
217
259
  }
218
260
  for (const timer of this.timers.values()) {
219
261
  clearTimeout(timer);
@@ -224,28 +266,46 @@ export class PeerJoinBackfill {
224
266
  log('[%s] stopped', this.deps.label);
225
267
  }
226
268
  /**
227
- * (Re-)schedule a debounced catch-up for every currently-connected peer not yet caught
228
- * up. Idempotent and cheap (caught-up peers are skipped before any timer is set, and a
229
- * peer whose run is in flight is deferred to the end of that run rather than dropped).
230
- * Driven by {@link start}, and — on a gated network — by the embedder whenever
231
- * membership changes, so a peer whose first pass was denied (connected before it was
232
- * authorized: the production join order) is retried without waiting for a reconnect.
233
- * Returns how many distinct peers were considered (for the start() log) — a peer holding
234
- * several connections is one peer, and is scheduled once.
269
+ * (Re-)schedule a debounced catch-up for every currently-connected peer whose protocols, as
270
+ * already stored in the libp2p peer store, name this network's block-transfer protocol. A
271
+ * peer not yet in the peer store — its identify has not finished — is left to the
272
+ * `peer:identify` handler rather than dialed blind; one whose stored protocols are known
273
+ * and lack ours is skipped outright. Idempotent and cheap otherwise (caught-up peers are
274
+ * skipped before any timer is set, and a peer whose run is in flight is deferred to the end
275
+ * of that run rather than dropped). Driven by {@link start}, and — on a gated network — by
276
+ * the embedder whenever membership changes, so a peer whose first pass was denied (connected
277
+ * before it was authorized: the production join order) is retried without waiting for a
278
+ * reconnect. Returns how many distinct peers were considered (for the start() log) — a peer
279
+ * holding several connections is one peer, and is scheduled once.
235
280
  */
236
- scheduleConnectedPeers() {
281
+ async scheduleConnectedPeers() {
237
282
  if (this.stopped)
238
283
  return 0;
239
- const peers = new Set();
284
+ const peers = new Map();
240
285
  for (const connection of this.deps.libp2p.getConnections()) {
241
- const key = connection.remotePeer.toString();
242
- if (peers.has(key))
243
- continue;
244
- peers.add(key);
245
- this.schedulePeer(connection.remotePeer);
286
+ peers.set(connection.remotePeer.toString(), connection.remotePeer);
246
287
  }
288
+ await Promise.all([...peers.values()].map((peerId) => this.scheduleIfKnownToSpeak(peerId)));
247
289
  return peers.size;
248
290
  }
291
+ /** Schedules `peerId` only if the peer store already knows it speaks this network's protocol. */
292
+ async scheduleIfKnownToSpeak(peerId) {
293
+ let protocols;
294
+ try {
295
+ ({ protocols } = await this.deps.libp2p.peerStore.get(peerId));
296
+ }
297
+ catch (error) {
298
+ // NotFoundError: identify has not finished. Leave it to the `peer:identify` handler
299
+ // rather than dialing blind. Anything else is unexpected — log it and skip the peer.
300
+ if (error.name !== 'NotFoundError') {
301
+ log('[%s] peer store read for %s failed — not scheduling: %o', this.deps.label, peerId.toString(), error);
302
+ }
303
+ return;
304
+ }
305
+ if (speaksBlockTransfer(protocols, this.deps.protocolPrefix)) {
306
+ this.schedulePeer(peerId);
307
+ }
308
+ }
249
309
  /** Debounced entry point for connection churn: one run per peer per settle window. */
250
310
  schedulePeer(peerId) {
251
311
  const key = peerId.toString();
@@ -259,7 +319,7 @@ export class PeerJoinBackfill {
259
319
  }
260
320
  // A peer whose last run failed is already re-armed on a backoff timer that will run it, so
261
321
  // DROP this schedule instead of shortening the wait — otherwise a peer that cannot be
262
- // reached is re-dialled on every connection:open forever (see the module comment's retry
322
+ // reached is re-dialled on every peer:identify forever (see the module comment's retry
263
323
  // paragraph). A denied run never gets here: it does not set a backoff.
264
324
  const retryAt = this.retryAfter.get(key);
265
325
  if (retryAt !== undefined && Date.now() < retryAt)
@@ -301,7 +361,7 @@ export class PeerJoinBackfill {
301
361
  // rejection are all verdicts a retry cannot change, and re-arming on them would
302
362
  // re-push the whole store to that peer forever. See the module comment.
303
363
  //
304
- // Gated on `started` too: the re-arm exists to REPLACE a connection:open-driven retry,
364
+ // Gated on `started` too: the re-arm exists to REPLACE a peer:identify-driven retry,
305
365
  // so a caller driving `catchUpPeer` by hand against a backfill that was never started
306
366
  // owns its own retry policy and must not be left holding a background timer.
307
367
  this.scheduleRetryWithBackoff(peerId);
@@ -331,7 +391,7 @@ export class PeerJoinBackfill {
331
391
  /**
332
392
  * Re-arm one peer's catch-up after a run whose push failed, on a wait that doubles
333
393
  * per consecutive failure up to `maxRetryBackoffMs`. Sets {@link retryAfter} alongside the
334
- * timer, which is what makes `connection:open` churn inside the wait free.
394
+ * timer, which is what makes `peer:identify` churn inside the wait free.
335
395
  */
336
396
  scheduleRetryWithBackoff(peerId) {
337
397
  const key = peerId.toString();
@@ -363,8 +423,8 @@ export class PeerJoinBackfill {
363
423
  console.warn(`[cadre:${this.deps.label}] peer-join block catch-up to peer ${key} has failed ${failures} times in a row `
364
424
  + `(dial budget ${this.config.dialTimeoutMs}ms, response budget ${this.config.responseTimeoutMs}ms). `
365
425
  + 'That peer may not be holding blocks committed before it joined. If it is reachable only through a relay, '
366
- + 'these budgets are derived from network.linkRoundTripMs (see link-budget.ts); above about a 2.5-second '
367
- + 'round trip no relayed connection can be established at all, whatever they are set to.');
426
+ + 'these budgets and libp2p\'s own connection limits are derived from network.linkRoundTripMs (see link-budget.ts); '
427
+ + 'a link slower than that declaration, or a peer that declared a faster one, cannot open a relayed connection at all.');
368
428
  }
369
429
  /**
370
430
  * The actual copy. `clean` = every chunk pushed and the remote persisted every block.
@@ -1 +1 @@
1
- {"version":3,"file":"peer-join-backfill.js","sourceRoot":"","sources":["../src/peer-join-backfill.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,mBAAmB,EAA2C,MAAM,oBAAoB,CAAC;AAClG,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,sFAAsF;AACtF,0FAA0F;AAC1F,qFAAqF;AACrF,0FAA0F;AAC1F,0FAA0F;AAC1F,yFAAyF;AACzF,yFAAyF;AACzF,EAAE;AACF,wFAAwF;AACxF,iFAAiF;AACjF,0FAA0F;AAC1F,uFAAuF;AACvF,0FAA0F;AAC1F,sBAAsB;AACtB,EAAE;AACF,2FAA2F;AAC3F,wFAAwF;AACxF,oBAAoB;AACpB,EAAE;AACF,gFAAgF;AAChF,uBAAuB;AACvB,EAAE;AACF,2FAA2F;AAC3F,2FAA2F;AAC3F,0FAA0F;AAC1F,2FAA2F;AAC3F,2FAA2F;AAC3F,4EAA4E;AAC5E,sFAAsF;AACtF,kFAAkF;AAClF,gFAAgF;AAChF,iFAAiF;AACjF,wFAAwF;AACxF,yFAAyF;AACzF,wFAAwF;AACxF,wFAAwF;AACxF,uEAAuE;AACvE,oFAAoF;AACpF,oFAAoF;AACpF,EAAE;AACF,wEAAwE;AACxE,yFAAyF;AACzF,wFAAwF;AACxF,wFAAwF;AACxF,0FAA0F;AA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AM,CAAC,CAAC;YAC3B,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;YACrE,wFAAwF;YACxF,yFAAyF;YACzF,gEAAgE;YAChE,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;YAC/D,IAAI,KAAK,EAAE,CAAC;gBACV,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;YAChC,CAAC;YACD,KAAK,CAAC,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC;YAC7B,MAAM,CAAC,OAAO,IAAI,CAAC,CAAC;QACtB,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC;YACxC,MAAM,KAAK,EAAE,CAAC;QAChB,CAAC;QAED,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,GAAG,CAAC,yEAAyE,EAC3E,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QAC9E,CAAC;QAED,MAAM,KAAK,GAAG,CAAC,WAAW,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC;QAC3D,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC;IACpD,CAAC;CACF"}
@@ -132,12 +132,12 @@ export interface RelayReservationState {
132
132
  /**
133
133
  * How long {@link driveRelayReservation} waits for a reservation to appear, at the DEFAULT
134
134
  * declared link round trip: `RELAY_RESERVATION_ROUND_TRIPS` (4) x `DECLARED_LINK_ROUND_TRIP_MS`
135
- * (2000 ms) = 8000 ms, where it was a fixed 10_000 before.
135
+ * (3500 ms) = 14 000 ms, where it was a fixed 10_000 before it was derived.
136
136
  *
137
137
  * Counted rather than chosen because this one deadline bounds the whole drive — dial the relay,
138
138
  * request the reservation, wait — and each of those costs a fixed number of exchanges, not a
139
139
  * fixed number of milliseconds. `link-budget.ts` carries the counts, the measurement behind
140
- * them, and the ceiling above which no relayed connection can be established whatever this says.
140
+ * them, and what still fails at the supported link whatever this says.
141
141
  *
142
142
  * A host on a slower link moves it by declaring `NetworkConfig.linkRoundTripMs`, which both
143
143
  * call sites thread in (`CadreNode.reserveRelays` for the control node,
@@ -109,12 +109,12 @@ const log = debug('sereus:cadre:relay-reservation');
109
109
  /**
110
110
  * How long {@link driveRelayReservation} waits for a reservation to appear, at the DEFAULT
111
111
  * declared link round trip: `RELAY_RESERVATION_ROUND_TRIPS` (4) x `DECLARED_LINK_ROUND_TRIP_MS`
112
- * (2000 ms) = 8000 ms, where it was a fixed 10_000 before.
112
+ * (3500 ms) = 14 000 ms, where it was a fixed 10_000 before it was derived.
113
113
  *
114
114
  * Counted rather than chosen because this one deadline bounds the whole drive — dial the relay,
115
115
  * request the reservation, wait — and each of those costs a fixed number of exchanges, not a
116
116
  * fixed number of milliseconds. `link-budget.ts` carries the counts, the measurement behind
117
- * them, and the ceiling above which no relayed connection can be established whatever this says.
117
+ * them, and what still fails at the supported link whatever this says.
118
118
  *
119
119
  * A host on a slower link moves it by declaring `NetworkConfig.linkRoundTripMs`, which both
120
120
  * call sites thread in (`CadreNode.reserveRelays` for the control node,
@@ -593,7 +593,7 @@ export class SeedBootstrapService {
593
593
  // (`dialPeerAddrs`), so an owner whose first address never answers neither
594
594
  // stalls seed application nor goes undialed at its other addresses.
595
595
  // NOTE: `handleSeedStream` acks only after this loop, so an unreachable owner
596
- // can hold the ack for up to `dialBudget.totalMs` each — 32 s at the default declared link
596
+ // can hold the ack for up to `dialBudget.totalMs` each — 56 s at the default declared link
597
597
  // round trip, more on a host that declared a slower one (`link-budget.ts`) — past a sender's
598
598
  // 10 s `seedDeliverTimeoutMs`; the seed is still applied. If senders start
599
599
  // reporting accepted seeds as timed out, ack before dialing.