@serfab/cadre-core 1.5.0 → 1.6.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.
@@ -2390,7 +2390,7 @@ export declare class CadreNode implements SAppIdLookup {
2390
2390
  * NOTE: against a relay that is DOWN this hook costs up to two strand-addr
2391
2391
  * timeouts (10 s each: dial by peer id, then by addr) before the reservation drive even
2392
2392
  * starts, so one failed re-drive holds the supervisor `driving` for those 20 s plus the
2393
- * drive's own deadline — 28 s at the default declared link round trip, and longer on a host
2393
+ * drive's own deadline — 34 s at the default declared link round trip, and longer on a host
2394
2394
  * that declared a slower one (`link-budget.ts`).
2395
2395
  * Bounded and harmless while the relay is unreachable anyway; if recovery
2396
2396
  * latency after a relay comes back ever matters, skip the announce when the
@@ -2613,7 +2613,7 @@ export declare class CadreNode implements SAppIdLookup {
2613
2613
  *
2614
2614
  * BUDGET: the supervisor's first attempt is what `start()` waits on — deliberately the drive's
2615
2615
  * ordinary deadline rather than a boot-specific one. That deadline is now COUNTED, four link
2616
- * round trips at the declared `network.linkRoundTripMs` (8 s at its default, where it was a
2616
+ * round trips at the declared `network.linkRoundTripMs` (14 s at its default, where it was a
2617
2617
  * fixed 10 s): a healthy dial-plus-reserve is sub-second even over a WAN, so this is slack for
2618
2618
  * a slow link, while going much longer would make a dead relay indistinguishable from a hung
2619
2619
  * start and much shorter would fail nodes on links that were merely slow. A host that declares
@@ -28,7 +28,7 @@ import { PeerJoinBackfill } from './peer-join-backfill.js';
28
28
  import { deriveCohortMembers } from './strand-cohort.js';
29
29
  import { selectControlCohortDials, DEFAULT_CONTROL_COHORT_RECONCILE_MS, DEFAULT_CONTROL_COHORT_TARGET_DEGREE } from './control-cohort.js';
30
30
  import { dialPeerAddrs, CONTROL_COHORT_DIAL_ADDRESS_ATTEMPTS } from './peer-dial.js';
31
- import { peerJoinPushBudget, relayReservationBudgetMs, relayedDialBudgetMs, resolveLinkRoundTripMs } from './link-budget.js';
31
+ import { connectionManagerTimeouts, peerJoinPushBudget, relayReservationBudgetMs, relayedDialBudgetMs, resolveLinkRoundTripMs } from './link-budget.js';
32
32
  import { EnrollmentService } from './enrollment.js';
33
33
  import { HibernationManager } from './hibernation-manager.js';
34
34
  import { ControlDatabase, isStrandIdConflict } from './control-database.js';
@@ -1425,6 +1425,10 @@ export class CadreNode {
1425
1425
  // whose event loop is saturated by pure-JS Noise crypto. A configured value
1426
1426
  // replaces the default whole (see DEFAULT_CONNECTION_MONITOR).
1427
1427
  connectionMonitor: network?.connectionMonitor ?? DEFAULT_CONNECTION_MONITOR,
1428
+ // libp2p's own dial and inbound-upgrade limits, from the same declared link as every
1429
+ // cadre dial budget. Left to db-p2p, both stay at 10 s, which cannot open a relayed
1430
+ // connection above a 2.5 s round trip — and the listener's side of that fails silently.
1431
+ connectionManager: connectionManagerTimeouts(network?.linkRoundTripMs),
1428
1432
  // `{ wsPort }` when a listen entry names WebSocket, otherwise `{}` — and always
1429
1433
  // `{}` when `network.transports` is set, since the embedder owns transport policy
1430
1434
  // then. Spread NEXT to `transports` because the two answer the same question.
@@ -5176,7 +5180,7 @@ export class CadreNode {
5176
5180
  * NOTE: against a relay that is DOWN this hook costs up to two strand-addr
5177
5181
  * timeouts (10 s each: dial by peer id, then by addr) before the reservation drive even
5178
5182
  * starts, so one failed re-drive holds the supervisor `driving` for those 20 s plus the
5179
- * drive's own deadline — 28 s at the default declared link round trip, and longer on a host
5183
+ * drive's own deadline — 34 s at the default declared link round trip, and longer on a host
5180
5184
  * that declared a slower one (`link-budget.ts`).
5181
5185
  * Bounded and harmless while the relay is unreachable anyway; if recovery
5182
5186
  * latency after a relay comes back ever matters, skip the announce when the
@@ -5677,7 +5681,7 @@ export class CadreNode {
5677
5681
  *
5678
5682
  * BUDGET: the supervisor's first attempt is what `start()` waits on — deliberately the drive's
5679
5683
  * ordinary deadline rather than a boot-specific one. That deadline is now COUNTED, four link
5680
- * round trips at the declared `network.linkRoundTripMs` (8 s at its default, where it was a
5684
+ * round trips at the declared `network.linkRoundTripMs` (14 s at its default, where it was a
5681
5685
  * fixed 10 s): a healthy dial-plus-reserve is sub-second even over a WAN, so this is slack for
5682
5686
  * a slow link, while going much longer would make a dead relay indistinguishable from a hung
5683
5687
  * start and much shorter would fail nodes on links that were merely slow. A host that declares