@serfab/cadre-core 1.22.0 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +216 -294
- package/dist/arachnode-stub.d.ts +12 -4
- package/dist/arachnode-stub.js +15 -8
- package/dist/arachnode-stub.js.map +1 -1
- package/dist/cadre-invite-protocol.js +5 -4
- package/dist/cadre-invite-protocol.js.map +1 -1
- package/dist/cadre-node.d.ts +159 -53
- package/dist/cadre-node.js +276 -89
- package/dist/cadre-node.js.map +1 -1
- package/dist/control-authorization.d.ts +14 -2
- package/dist/control-authorization.js +8 -3
- package/dist/control-authorization.js.map +1 -1
- package/dist/control-cohort.d.ts +27 -13
- package/dist/control-cohort.js +21 -14
- package/dist/control-cohort.js.map +1 -1
- package/dist/control-database.d.ts +18 -16
- package/dist/control-database.js +57 -22
- package/dist/control-database.js.map +1 -1
- package/dist/control-protocol-guard.d.ts +1 -1
- package/dist/control-protocol-guard.js +7 -3
- package/dist/control-protocol-guard.js.map +1 -1
- package/dist/control-read-retry.d.ts +49 -11
- package/dist/control-read-retry.js +56 -15
- package/dist/control-read-retry.js.map +1 -1
- package/dist/control-retry.d.ts +32 -3
- package/dist/control-retry.js +35 -4
- package/dist/control-retry.js.map +1 -1
- package/dist/control-schema-version.d.ts +5 -5
- package/dist/control-schema-version.js +5 -5
- package/dist/control-schema-version.js.map +1 -1
- package/dist/control-schema.d.ts +5 -5
- package/dist/control-schema.js +1032 -1011
- package/dist/control-schema.js.map +1 -1
- package/dist/control-write-retry.d.ts +54 -65
- package/dist/control-write-retry.js +134 -158
- package/dist/control-write-retry.js.map +1 -1
- package/dist/delegate-admission.d.ts +1 -1
- package/dist/delegate-admission.js +1 -1
- package/dist/edge-node/config.d.ts +4 -3
- package/dist/edge-node/config.js +11 -9
- package/dist/edge-node/config.js.map +1 -1
- package/dist/edge-node/dissolve.d.ts +4 -4
- package/dist/edge-node/dissolve.js +4 -4
- package/dist/edge-node/edge-join.d.ts +1 -1
- package/dist/edge-node/edge-join.js +1 -1
- package/dist/edge-node/edge-node.js +2 -2
- package/dist/edge-node/edge-node.js.map +1 -1
- package/dist/edge-node/index.d.ts +1 -0
- package/dist/edge-node/index.js +1 -0
- package/dist/edge-node/index.js.map +1 -1
- package/dist/edge-node/join-credential.d.ts +1 -1
- package/dist/edge-node/join-credential.js +1 -1
- package/dist/edge-node/lazy-raw-storage.js +12 -0
- package/dist/edge-node/lazy-raw-storage.js.map +1 -1
- package/dist/edge-node/listen-addrs.d.ts +21 -0
- package/dist/edge-node/listen-addrs.js +25 -0
- package/dist/edge-node/listen-addrs.js.map +1 -0
- package/dist/edge-node/owner-grant.d.ts +1 -1
- package/dist/edge-node/owner-grant.js +1 -1
- package/dist/edge-node/platform.d.ts +5 -4
- package/dist/edge-node/platform.js.map +1 -1
- package/dist/edge-node/strand-move.d.ts +1 -1
- package/dist/edge-node/strand-move.js +1 -1
- package/dist/edge-node/strands.js +27 -11
- package/dist/edge-node/strands.js.map +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.js +18 -7
- package/dist/index.js.map +1 -1
- package/dist/invitation-bootstrap.d.ts +28 -5
- package/dist/invitation-bootstrap.js +41 -8
- package/dist/invitation-bootstrap.js.map +1 -1
- package/dist/link-budget.d.ts +53 -4
- package/dist/link-budget.js +58 -5
- package/dist/link-budget.js.map +1 -1
- package/dist/machine-removal.d.ts +2 -2
- package/dist/machine-removal.js +4 -3
- package/dist/machine-removal.js.map +1 -1
- package/dist/membership-connection-gater.d.ts +2 -2
- package/dist/membership-connection-gater.js +2 -2
- package/dist/membership-view.d.ts +2 -2
- package/dist/membership-view.js +6 -3
- package/dist/membership-view.js.map +1 -1
- package/dist/node-claim-payload.d.ts +15 -7
- package/dist/node-claim-payload.js +25 -9
- package/dist/node-claim-payload.js.map +1 -1
- package/dist/node-class.d.ts +36 -0
- package/dist/node-class.js +26 -0
- package/dist/node-class.js.map +1 -0
- package/dist/node-default-transports.d.ts +50 -3
- package/dist/node-default-transports.js +48 -3
- package/dist/node-default-transports.js.map +1 -1
- package/dist/node-roles.d.ts +118 -0
- package/dist/node-roles.js +142 -0
- package/dist/node-roles.js.map +1 -0
- package/dist/node-transports.d.ts +6 -2
- package/dist/node-transports.js +39 -7
- package/dist/node-transports.js.map +1 -1
- package/dist/owner-anchor-sync.js +1 -1
- package/dist/owner-key-export.js +1 -1
- package/dist/owner-key-flows.d.ts +1 -1
- package/dist/owner-key-store.js +1 -1
- package/dist/owner-signer.js +1 -1
- package/dist/peer-authorization.d.ts +3 -1
- package/dist/peer-authorization.js +3 -1
- package/dist/peer-authorization.js.map +1 -1
- package/dist/peer-dial.d.ts +74 -10
- package/dist/peer-dial.js +89 -17
- package/dist/peer-dial.js.map +1 -1
- package/dist/peer-join-backfill.js +4 -4
- package/dist/peer-join-backfill.js.map +1 -1
- package/dist/peer-record.d.ts +34 -9
- package/dist/peer-record.js +66 -13
- package/dist/peer-record.js.map +1 -1
- package/dist/pending-join-runner.d.ts +1 -1
- package/dist/pending-join-runner.js +1 -1
- package/dist/provider/client.d.ts +6 -5
- package/dist/provider/client.js +3 -3
- package/dist/provider/client.js.map +1 -1
- package/dist/provider/descriptor.d.ts +1 -1
- package/dist/provider/descriptor.js +1 -1
- package/dist/provider/oauth.d.ts +1 -1
- package/dist/provider/oauth.js +1 -1
- package/dist/provider/rent-node.d.ts +4 -3
- package/dist/provider/rent-node.js +3 -3
- package/dist/provider/rent-node.js.map +1 -1
- package/dist/relay-addrs.d.ts +62 -7
- package/dist/relay-addrs.js +74 -11
- package/dist/relay-addrs.js.map +1 -1
- package/dist/relay-reservation.d.ts +1 -1
- package/dist/relay-reservation.js +1 -1
- package/dist/relay-server.d.ts +6 -5
- package/dist/relay-server.js +5 -5
- package/dist/relay-server.js.map +1 -1
- package/dist/schema-verification.d.ts +13 -10
- package/dist/schema-verification.js +32 -24
- package/dist/schema-verification.js.map +1 -1
- package/dist/sealed-party-key.js +1 -1
- package/dist/seed-bootstrap.d.ts +4 -3
- package/dist/seed-bootstrap.js +6 -7
- package/dist/seed-bootstrap.js.map +1 -1
- package/dist/strand-addr-protocol.d.ts +8 -6
- package/dist/strand-addr-protocol.js +12 -10
- package/dist/strand-addr-protocol.js.map +1 -1
- package/dist/strand-app-schema-report.d.ts +16 -2
- package/dist/strand-app-schema-report.js +15 -0
- package/dist/strand-app-schema-report.js.map +1 -1
- package/dist/strand-cohort.d.ts +1 -4
- package/dist/strand-cohort.js.map +1 -1
- package/dist/strand-commit-durability.d.ts +1 -1
- package/dist/strand-database.d.ts +13 -6
- package/dist/strand-database.js +17 -9
- package/dist/strand-database.js.map +1 -1
- package/dist/strand-first-sync-gate.d.ts +3 -2
- package/dist/strand-first-sync-gate.js +3 -2
- package/dist/strand-first-sync-gate.js.map +1 -1
- package/dist/strand-formation-deadlines.d.ts +2 -2
- package/dist/strand-formation-deadlines.js +2 -2
- package/dist/strand-formation-protocol.d.ts +1 -1
- package/dist/strand-formation-protocol.js +51 -16
- package/dist/strand-formation-protocol.js.map +1 -1
- package/dist/strand-instance-manager.d.ts +134 -42
- package/dist/strand-instance-manager.js +331 -76
- package/dist/strand-instance-manager.js.map +1 -1
- package/dist/strand-membership-reconciler.d.ts +8 -3
- package/dist/strand-membership-reconciler.js +8 -3
- package/dist/strand-membership-reconciler.js.map +1 -1
- package/dist/strand-membership-writer.d.ts +2 -2
- package/dist/strand-membership-writer.js +41 -39
- package/dist/strand-membership-writer.js.map +1 -1
- package/dist/strand-move.js +1 -1
- package/dist/strand-network-config.d.ts +15 -5
- package/dist/strand-network-config.js +7 -6
- package/dist/strand-network-config.js.map +1 -1
- package/dist/strand-party-key-rotation.d.ts +7 -3
- package/dist/strand-party-key-rotation.js +7 -3
- package/dist/strand-party-key-rotation.js.map +1 -1
- package/dist/strand-party-machines.d.ts +19 -8
- package/dist/strand-party-machines.js +26 -11
- package/dist/strand-party-machines.js.map +1 -1
- package/dist/strand-party-peers.d.ts +36 -14
- package/dist/strand-party-peers.js +24 -15
- package/dist/strand-party-peers.js.map +1 -1
- package/dist/strand-peer-redial.d.ts +1 -1
- package/dist/strand-peer-redial.js +1 -1
- package/dist/strand-reactivity.d.ts +20 -17
- package/dist/strand-reactivity.js +31 -18
- package/dist/strand-reactivity.js.map +1 -1
- package/dist/strand-revocation-enforcer.d.ts +3 -3
- package/dist/strand-revocation-enforcer.js +3 -3
- package/dist/strand-wake-protocol.d.ts +19 -7
- package/dist/strand-wake-protocol.js +22 -10
- package/dist/strand-wake-protocol.js.map +1 -1
- package/dist/strand-watcher.d.ts +1 -1
- package/dist/strand-watcher.js +1 -1
- package/dist/table-change-watch.js +1 -1
- package/dist/types.d.ts +127 -57
- package/dist/types.js.map +1 -1
- package/dist/webrtc-upgrade.d.ts +254 -0
- package/dist/webrtc-upgrade.js +355 -0
- package/dist/webrtc-upgrade.js.map +1 -0
- package/package.json +9 -9
- package/src/announce-addrs.ts +93 -93
- package/src/arachnode-stub.ts +18 -10
- package/src/bootstrap-peer-store-file.ts +44 -44
- package/src/bootstrap-peer-store.ts +214 -214
- package/src/cadre-invite-protocol.ts +741 -740
- package/src/cadre-node.ts +12462 -12252
- package/src/claim-proof.ts +147 -147
- package/src/control-authorization.ts +290 -276
- package/src/control-cohort.ts +223 -204
- package/src/control-database.ts +72 -28
- package/src/control-formation-recorder.ts +359 -359
- package/src/control-protocol-guard.ts +370 -366
- package/src/control-read-retry.ts +222 -180
- package/src/control-retry.ts +36 -4
- package/src/control-schema-version.ts +301 -301
- package/src/control-schema.ts +1108 -1087
- package/src/control-write-retry.ts +639 -669
- package/src/delegate-admission.ts +351 -351
- package/src/describe-thrown.ts +60 -60
- package/src/ed25519-key.ts +185 -185
- package/src/edge-node/config.ts +13 -10
- package/src/edge-node/dissolve.ts +252 -252
- package/src/edge-node/edge-join.ts +320 -320
- package/src/edge-node/edge-node.ts +1095 -1095
- package/src/edge-node/index.ts +60 -59
- package/src/edge-node/join-credential.ts +16 -16
- package/src/edge-node/lazy-raw-storage.ts +194 -178
- package/src/edge-node/listen-addrs.ts +26 -0
- package/src/edge-node/node-local.ts +84 -84
- package/src/edge-node/options.ts +195 -195
- package/src/edge-node/owner-grant.ts +63 -63
- package/src/edge-node/platform.ts +5 -4
- package/src/edge-node/strand-move.ts +266 -266
- package/src/edge-node/strands.ts +27 -12
- package/src/enrolled-machine-store-file.ts +43 -43
- package/src/enrolled-machine-store.ts +280 -280
- package/src/fetch-impl.ts +23 -23
- package/src/file-durable-slot.ts +64 -64
- package/src/file-safe-name.ts +32 -32
- package/src/formation-approval.ts +604 -604
- package/src/formation-token.ts +63 -63
- package/src/fs-atomic.ts +92 -92
- package/src/index.ts +987 -957
- package/src/invitation-bootstrap.ts +152 -118
- package/src/joined-strand-store.ts +553 -553
- package/src/key-store-file.ts +142 -142
- package/src/link-budget.ts +61 -5
- package/src/machine-removal.ts +211 -210
- package/src/member-redemption.ts +643 -643
- package/src/membership-connection-gater.ts +650 -650
- package/src/membership-view.ts +147 -144
- package/src/node-claim-payload.ts +34 -12
- package/src/node-class.ts +47 -0
- package/src/node-default-transports.ts +65 -3
- package/src/node-roles.ts +220 -0
- package/src/node-transports.ts +86 -49
- package/src/owner-anchor-sync.ts +172 -172
- package/src/owner-grant-protocol.ts +547 -547
- package/src/owner-key-export.ts +348 -348
- package/src/owner-key-flows.ts +109 -109
- package/src/owner-key-store.ts +1 -1
- package/src/owner-keys.ts +179 -179
- package/src/owner-signer.ts +92 -92
- package/src/peer-addr-book.ts +252 -252
- package/src/peer-authorization.ts +584 -582
- package/src/peer-dial.ts +698 -605
- package/src/peer-join-backfill.ts +961 -961
- package/src/peer-record.ts +71 -16
- package/src/pending-join-runner.ts +798 -798
- package/src/primary-lan-address.ts +47 -47
- package/src/provider/client.ts +327 -326
- package/src/provider/descriptor.ts +129 -129
- package/src/provider/index.ts +59 -59
- package/src/provider/oauth.ts +285 -285
- package/src/provider/rent-node.ts +276 -275
- package/src/relay-addrs.ts +90 -12
- package/src/relay-reservation.ts +1 -1
- package/src/relay-server.ts +99 -98
- package/src/schema-verification.ts +38 -23
- package/src/sealed-party-key.ts +190 -190
- package/src/seed-bootstrap.ts +8 -11
- package/src/seed-trust-policy.ts +353 -353
- package/src/self-address-update.ts +19 -19
- package/src/strand-addr-protocol.ts +17 -14
- package/src/strand-app-schema-report.ts +147 -122
- package/src/strand-cohort.ts +1 -5
- package/src/strand-commit-durability.ts +165 -165
- package/src/strand-database.ts +522 -510
- package/src/strand-first-sync-gate.ts +3 -2
- package/src/strand-formation-deadlines.ts +227 -227
- package/src/strand-formation-manager.ts +731 -731
- package/src/strand-formation-protocol.ts +1174 -1138
- package/src/strand-fret-addrs.ts +179 -179
- package/src/strand-instance-manager.ts +381 -85
- package/src/strand-membership-reconciler.ts +1315 -1310
- package/src/strand-membership-writer.ts +2152 -2150
- package/src/strand-move.ts +1 -1
- package/src/strand-network-config.ts +16 -6
- package/src/strand-offline.ts +178 -178
- package/src/strand-party-key-rotation.ts +440 -436
- package/src/strand-party-machines.ts +308 -293
- package/src/strand-party-peers.ts +151 -129
- package/src/strand-peer-redial.ts +1 -1
- package/src/strand-reactivity.ts +36 -19
- package/src/strand-revocation-enforcer.ts +758 -758
- package/src/strand-wake-protocol.ts +406 -394
- package/src/strand-watcher.ts +1 -1
- package/src/table-change-watch.ts +285 -285
- package/src/timed-step.ts +28 -28
- package/src/timeout-scheduler.ts +29 -29
- package/src/trusted-owner-store.ts +242 -242
- package/src/types.ts +3182 -3112
- package/src/webrtc-upgrade.ts +439 -0
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,cAAc,YAAY,CAAC;AAE3B,+DAA+D;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,gGAAgG;AAChG,uEAAuE;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,uBAAuB;AACvB,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Ae,EAAwB,MAAM,4BAA4B,CAAC;AACnF,yFAAyF;AACzF,8DAA8D;AAC9D,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAmB,MAAM,iBAAiB,CAAC;AACrG,2FAA2F;AAC3F,8FAA8F;AAC9F,+EAA+E;AAC/E,OAAO,EACL,kBAAkB,EAClB,4BAA4B,EAC5B,8BAA8B,EAG/B,MAAM,mBAAmB,CAAC;AAE3B,gFAAgF;AAChF,0EAA0E;AAC1E,6BAA6B;AAC7B,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,gCAAgC,EAChC,6BAA6B,EAC7B,sBAAsB,EACtB,4BAA4B,EAC5B,4BAA4B,EAM7B,MAAM,wBAAwB,CAAC;AAEhC,2EAA2E;AAC3E,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EAMzB,MAAM,kCAAkC,CAAC"}
|
|
@@ -14,9 +14,10 @@ import type { CadreInvitationReach } from './types.js';
|
|
|
14
14
|
* NOTE: a cadre invitation, which may be carried in a QR code, is capped harder
|
|
15
15
|
* ({@link CADRE_INVITATION_MAX_ADDRS}); an open strand invitation keeps these caps. If open
|
|
16
16
|
* invitations are ever carried in a QR code too, cap them the same way.
|
|
17
|
-
* NOTE: for an open strand invitation the per-machine cap keeps the record's order (
|
|
18
|
-
* then direct addresses as the machine published them, loopback included
|
|
19
|
-
*
|
|
17
|
+
* NOTE: for an open strand invitation the per-machine cap keeps the record's order (relayed
|
|
18
|
+
* first, then direct addresses as the machine published them, loopback included, then any that
|
|
19
|
+
* needs ICE after its relay hop — `orderRelayedFirst` in `peer-record.ts`); a cadre invitation
|
|
20
|
+
* ranks them itself. If an open invitation's sibling is seen to have its reachable address cut,
|
|
20
21
|
* rank the same way.
|
|
21
22
|
*/
|
|
22
23
|
export declare const INVITATION_SIBLING_MACHINES = 3;
|
|
@@ -28,6 +29,11 @@ export declare const INVITATION_ADDRS_PER_SIBLING = 4;
|
|
|
28
29
|
* and direct WebSocket addresses alternating, against 2,331 bytes in the largest QR code at
|
|
29
30
|
* error-correction level M (2,953 at L). Each further address costs about 170 characters, each
|
|
30
31
|
* further owner key about 60.
|
|
32
|
+
*
|
|
33
|
+
* What the cap drops first follows from {@link PHONE_DIAL_RANK}: a machine's WebRTC address
|
|
34
|
+
* goes before its plain relayed one, because a WebRTC address connects only if ICE finds a path
|
|
35
|
+
* between the two networks — the case an invitation exists to cover is the one where it does
|
|
36
|
+
* not.
|
|
31
37
|
*/
|
|
32
38
|
export declare const CADRE_INVITATION_MAX_ADDRS = 6;
|
|
33
39
|
/** Most addresses a cadre invitation names for each of the party's other machines. */
|
|
@@ -37,7 +43,7 @@ export interface InvitationSibling {
|
|
|
37
43
|
peerId: string;
|
|
38
44
|
/** The record's `UpdatedAt`: when the machine last published its addresses. */
|
|
39
45
|
updatedAt: number;
|
|
40
|
-
/**
|
|
46
|
+
/** As the machine's record carries them — relayed first, WebRTC last — each ending in `/p2p/<peerId>`. */
|
|
41
47
|
addrs: string[];
|
|
42
48
|
}
|
|
43
49
|
/**
|
|
@@ -58,7 +64,18 @@ export declare function selectInvitationSiblingAddrs(siblings: InvitationSibling
|
|
|
58
64
|
* NOTE: accepted tradeoff — with two or more other machines, only the best two addresses of
|
|
59
65
|
* each survive, connected machines first, so a reachable address of a sibling can be cut. Size
|
|
60
66
|
* was weighed over completeness, so the text fits a QR code; revisit if redemptions are seen
|
|
61
|
-
* failing for want of a sibling address the record held.
|
|
67
|
+
* failing for want of a sibling address the record held. The decision stands; what has changed
|
|
68
|
+
* since it was taken is which address the cap cuts — {@link PHONE_DIAL_RANK} now ranks a
|
|
69
|
+
* machine's WebRTC address below its plain relayed one, so the cap drops the WebRTC address
|
|
70
|
+
* first and a machine offering WebRTC no longer fills half an invitation with addresses that
|
|
71
|
+
* connect only when ICE finds a path.
|
|
72
|
+
*
|
|
73
|
+
* NOTE: the ranking is per machine, and the machines keep their own order (the minting one, then
|
|
74
|
+
* siblings by how likely each is to be up), so the minting machine's WebRTC address can still
|
|
75
|
+
* sit ahead of a sibling's relayed one. A redeemer dials the list in order, so when the minting
|
|
76
|
+
* machine is down that costs about 23 s before the siblings are tried. Left as is because the
|
|
77
|
+
* machine order carries information an address-kind sort would discard; if redemptions are seen
|
|
78
|
+
* paying that, interleave every machine's relayed addresses ahead of any WebRTC one.
|
|
62
79
|
*/
|
|
63
80
|
export declare function selectCadreInvitationMembers(own: readonly string[], siblings: InvitationSibling[], connected: ReadonlySet<string>): string[];
|
|
64
81
|
/**
|
|
@@ -66,5 +83,11 @@ export declare function selectCadreInvitationMembers(own: readonly string[], sib
|
|
|
66
83
|
* than `issuerPeerId`: in the app flows the minting app is the one closed or in the background
|
|
67
84
|
* when the other app redeems, and two apps on one phone cannot reach each other. An address
|
|
68
85
|
* names its machine by its last `/p2p/`.
|
|
86
|
+
*
|
|
87
|
+
* The three answers are about network scope, so a WebRTC address counts as `anywhere` alongside
|
|
88
|
+
* `relay`, `name` and `public`: it is not a local-network address, and its relay carries its
|
|
89
|
+
* signalling from any network. Whether ICE then finds a path is a separate matter this does not
|
|
90
|
+
* judge — and since {@link PHONE_DIAL_RANK} ranks a WebRTC address below the plain relayed one,
|
|
91
|
+
* such an address takes a slot only once every relayed address of that machine already has one.
|
|
69
92
|
*/
|
|
70
93
|
export declare function cadreInvitationReach(members: readonly string[], issuerPeerId: string): CadreInvitationReach;
|
|
@@ -14,9 +14,10 @@ import { classifyDialAddress, destinationPeerIdOf } from './node-claim-payload.j
|
|
|
14
14
|
* NOTE: a cadre invitation, which may be carried in a QR code, is capped harder
|
|
15
15
|
* ({@link CADRE_INVITATION_MAX_ADDRS}); an open strand invitation keeps these caps. If open
|
|
16
16
|
* invitations are ever carried in a QR code too, cap them the same way.
|
|
17
|
-
* NOTE: for an open strand invitation the per-machine cap keeps the record's order (
|
|
18
|
-
* then direct addresses as the machine published them, loopback included
|
|
19
|
-
*
|
|
17
|
+
* NOTE: for an open strand invitation the per-machine cap keeps the record's order (relayed
|
|
18
|
+
* first, then direct addresses as the machine published them, loopback included, then any that
|
|
19
|
+
* needs ICE after its relay hop — `orderRelayedFirst` in `peer-record.ts`); a cadre invitation
|
|
20
|
+
* ranks them itself. If an open invitation's sibling is seen to have its reachable address cut,
|
|
20
21
|
* rank the same way.
|
|
21
22
|
*/
|
|
22
23
|
export const INVITATION_SIBLING_MACHINES = 3;
|
|
@@ -28,6 +29,11 @@ export const INVITATION_ADDRS_PER_SIBLING = 4;
|
|
|
28
29
|
* and direct WebSocket addresses alternating, against 2,331 bytes in the largest QR code at
|
|
29
30
|
* error-correction level M (2,953 at L). Each further address costs about 170 characters, each
|
|
30
31
|
* further owner key about 60.
|
|
32
|
+
*
|
|
33
|
+
* What the cap drops first follows from {@link PHONE_DIAL_RANK}: a machine's WebRTC address
|
|
34
|
+
* goes before its plain relayed one, because a WebRTC address connects only if ICE finds a path
|
|
35
|
+
* between the two networks — the case an invitation exists to cover is the one where it does
|
|
36
|
+
* not.
|
|
31
37
|
*/
|
|
32
38
|
export const CADRE_INVITATION_MAX_ADDRS = 6;
|
|
33
39
|
/** Most addresses a cadre invitation names for each of the party's other machines. */
|
|
@@ -55,7 +61,18 @@ export function selectInvitationSiblingAddrs(siblings, connected, perSibling = I
|
|
|
55
61
|
* NOTE: accepted tradeoff — with two or more other machines, only the best two addresses of
|
|
56
62
|
* each survive, connected machines first, so a reachable address of a sibling can be cut. Size
|
|
57
63
|
* was weighed over completeness, so the text fits a QR code; revisit if redemptions are seen
|
|
58
|
-
* failing for want of a sibling address the record held.
|
|
64
|
+
* failing for want of a sibling address the record held. The decision stands; what has changed
|
|
65
|
+
* since it was taken is which address the cap cuts — {@link PHONE_DIAL_RANK} now ranks a
|
|
66
|
+
* machine's WebRTC address below its plain relayed one, so the cap drops the WebRTC address
|
|
67
|
+
* first and a machine offering WebRTC no longer fills half an invitation with addresses that
|
|
68
|
+
* connect only when ICE finds a path.
|
|
69
|
+
*
|
|
70
|
+
* NOTE: the ranking is per machine, and the machines keep their own order (the minting one, then
|
|
71
|
+
* siblings by how likely each is to be up), so the minting machine's WebRTC address can still
|
|
72
|
+
* sit ahead of a sibling's relayed one. A redeemer dials the list in order, so when the minting
|
|
73
|
+
* machine is down that costs about 23 s before the siblings are tried. Left as is because the
|
|
74
|
+
* machine order carries information an address-kind sort would discard; if redemptions are seen
|
|
75
|
+
* paying that, interleave every machine's relayed addresses ahead of any WebRTC one.
|
|
59
76
|
*/
|
|
60
77
|
export function selectCadreInvitationMembers(own, siblings, connected) {
|
|
61
78
|
const ranked = siblings.map((sibling) => ({ ...sibling, addrs: rankForPhone(sibling.addrs) }));
|
|
@@ -64,13 +81,23 @@ export function selectCadreInvitationMembers(own, siblings, connected) {
|
|
|
64
81
|
...selectInvitationSiblingAddrs(ranked, connected, CADRE_INVITATION_ADDRS_PER_SIBLING),
|
|
65
82
|
].slice(0, CADRE_INVITATION_MAX_ADDRS);
|
|
66
83
|
}
|
|
67
|
-
/**
|
|
68
|
-
|
|
84
|
+
/**
|
|
85
|
+
* How widely a phone can reach an address: from anywhere, from anywhere when ICE finds a path,
|
|
86
|
+
* on its own network, on that machine alone, not at all.
|
|
87
|
+
*
|
|
88
|
+
* `webrtc` sits between the kinds that reach from anywhere and the LAN-only ones on that one
|
|
89
|
+
* axis: the relay carries its signalling from any network, but the connection opens only if ICE
|
|
90
|
+
* finds a path between the two networks, which is less than always and more than one network
|
|
91
|
+
* only. See `docs/network/relay.md` → "Direct connections over WebRTC".
|
|
92
|
+
*/
|
|
93
|
+
const PHONE_DIAL_RANK = { relay: 0, name: 0, public: 0, webrtc: 1, private: 2, loopback: 3 };
|
|
94
|
+
/** Rank of an address no phone can dial at all (plain TCP), so it sorts behind every classified kind. */
|
|
95
|
+
const PHONE_DIAL_RANK_UNREACHABLE = Math.max(...Object.values(PHONE_DIAL_RANK)) + 1;
|
|
69
96
|
/** `addrs` best first for a phone dialing them ({@link PHONE_DIAL_RANK}), ties in their given order; one a phone cannot dial (plain TCP) last. */
|
|
70
97
|
function rankForPhone(addrs) {
|
|
71
98
|
const rankOf = (addr) => {
|
|
72
99
|
const kind = classifyDialAddress(addr);
|
|
73
|
-
return kind === undefined ?
|
|
100
|
+
return kind === undefined ? PHONE_DIAL_RANK_UNREACHABLE : PHONE_DIAL_RANK[kind];
|
|
74
101
|
};
|
|
75
102
|
return addrs.map((addr) => ({ addr, rank: rankOf(addr) })).sort((a, b) => a.rank - b.rank).map(({ addr }) => addr);
|
|
76
103
|
}
|
|
@@ -79,6 +106,12 @@ function rankForPhone(addrs) {
|
|
|
79
106
|
* than `issuerPeerId`: in the app flows the minting app is the one closed or in the background
|
|
80
107
|
* when the other app redeems, and two apps on one phone cannot reach each other. An address
|
|
81
108
|
* names its machine by its last `/p2p/`.
|
|
109
|
+
*
|
|
110
|
+
* The three answers are about network scope, so a WebRTC address counts as `anywhere` alongside
|
|
111
|
+
* `relay`, `name` and `public`: it is not a local-network address, and its relay carries its
|
|
112
|
+
* signalling from any network. Whether ICE then finds a path is a separate matter this does not
|
|
113
|
+
* judge — and since {@link PHONE_DIAL_RANK} ranks a WebRTC address below the plain relayed one,
|
|
114
|
+
* such an address takes a slot only once every relayed address of that machine already has one.
|
|
82
115
|
*/
|
|
83
116
|
export function cadreInvitationReach(members, issuerPeerId) {
|
|
84
117
|
const others = members.flatMap((addr) => {
|
|
@@ -86,7 +119,7 @@ export function cadreInvitationReach(members, issuerPeerId) {
|
|
|
86
119
|
// Classified, so it parses and `destinationPeerIdOf` cannot throw.
|
|
87
120
|
return kind === undefined || destinationPeerIdOf(addr) === issuerPeerId ? [] : [kind];
|
|
88
121
|
});
|
|
89
|
-
if (others.some((kind) => kind === 'relay' || kind === 'name' || kind === 'public'))
|
|
122
|
+
if (others.some((kind) => kind === 'relay' || kind === 'webrtc' || kind === 'name' || kind === 'public'))
|
|
90
123
|
return 'anywhere';
|
|
91
124
|
return others.length > 0 ? 'local-network' : 'issuer-only';
|
|
92
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitation-bootstrap.js","sourceRoot":"","sources":["../src/invitation-bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAwB,MAAM,yBAAyB,CAAC;AAGzG
|
|
1
|
+
{"version":3,"file":"invitation-bootstrap.js","sourceRoot":"","sources":["../src/invitation-bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAwB,MAAM,yBAAyB,CAAC;AAGzG;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC;AAC7C,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAE9C;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAE5C,sFAAsF;AACtF,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC;AAWpD;;;;;GAKG;AACH,MAAM,UAAU,4BAA4B,CAC3C,QAA6B,EAC7B,SAA8B,EAC9B,aAAqB,4BAA4B;IAEjD,OAAO,CAAC,GAAG,QAAQ,CAAC;SAClB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,CAAC;SAC9G,KAAK,CAAC,CAAC,EAAE,2BAA2B,CAAC;SACrC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,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,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;AACpH,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAA0B,EAAE,YAAoB;IACpF,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACvC,MAAM,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACvC,mEAAmE;QACnE,OAAO,IAAI,KAAK,SAAS,IAAI,mBAAmB,CAAC,IAAI,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACvF,CAAC,CAAC,CAAC;IACH,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,QAAQ,CAAC;QAAE,OAAO,UAAU,CAAC;IAC5H,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa,CAAC;AAC5D,CAAC"}
|
package/dist/link-budget.d.ts
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* deadline that never waits on the link; `-- link-bound, not yet derived: <ticket slug>` marks
|
|
19
19
|
* one that does and names the ticket that owns converting it. Grep for the second to list the
|
|
20
20
|
* deadlines this module does not yet cover. `-- cuts off by design: <why>; see
|
|
21
|
-
* docs/
|
|
21
|
+
* docs/network/deadlines.md → "Deadlines over Optimystic's reads and commits"` keeps a deadline
|
|
22
22
|
* that does wait on the link, through an Optimystic read or commit, but whose value is what its
|
|
23
23
|
* caller can tolerate: it gives up on purpose and must not grow with the link. That doc section
|
|
24
24
|
* lists every such site. `-- measured, not derived: <where the measurement lives>` keeps a
|
|
@@ -150,8 +150,8 @@
|
|
|
150
150
|
* to a peer that never completes a connection waits up to the 42 500 ms dial deadline, each of
|
|
151
151
|
* that peer's addresses up to 39 000 ms inside it, and one that connects and never answers
|
|
152
152
|
* waits 10 500. A control write against a connected, silent member fails after about 84 s
|
|
153
|
-
* (one pend round and three cancel rounds; `docs/
|
|
154
|
-
* Optimystic's
|
|
153
|
+
* (one pend round and three cancel rounds; `docs/network/deadlines.md` → "Deadlines over
|
|
154
|
+
* Optimystic's reads and commits"). The dial case was not measured. cadre's cut-off budgets
|
|
155
155
|
* (`CONTROL_WRITE_RETRY_BUDGET_MS`, `CONTROL_READ_RETRY_BUDGET_MS`) are checked between
|
|
156
156
|
* attempts, so one attempt can outlast them by that much. If writes on a fast link are seen
|
|
157
157
|
* waiting out the dial deadline against an unreachable machine, declare that deployment's real
|
|
@@ -208,7 +208,7 @@ import { type Libp2pConnectionTimeouts, type RpcDeadlineDefaults } from '@optimy
|
|
|
208
208
|
*
|
|
209
209
|
* **Why 3 500.** Sereus supports two machines that reach each other only through a relay up to
|
|
210
210
|
* a **3-second link round trip** (1 500 ms each way — a congested mobile or satellite link;
|
|
211
|
-
* `docs/
|
|
211
|
+
* `docs/network/deadlines.md` → "The declared link"). The worst relayed dial measured at that link,
|
|
212
212
|
* opening the relay connection first, was 15 113 ms, above the 15 000 ms a declaration of
|
|
213
213
|
* exactly 3 000 would derive, so the declaration rounds the supported link up to the next half
|
|
214
214
|
* second. 3 500 derives 17 500 ms of link time and leaves about 2.4 s over that dial: room for a
|
|
@@ -334,6 +334,24 @@ export declare const COMMIT_ROUND_TRIPS = 20;
|
|
|
334
334
|
* {@link relayedRequestBudgetMs} adds the dial's admission allowances on top.
|
|
335
335
|
*/
|
|
336
336
|
export declare const RELAYED_REQUEST_ROUND_TRIPS: number;
|
|
337
|
+
/**
|
|
338
|
+
* Link round trips the SIGNALLING half of a WebRTC upgrade dial costs, over the relay that
|
|
339
|
+
* carries it ({@link webrtcUpgradeDialBudgetMs}): {@link RELAYED_DIAL_ROUND_TRIPS} to open the
|
|
340
|
+
* connection the signalling runs on, then two request-and-answer exchanges over it
|
|
341
|
+
* ({@link CIRCUIT_REQUEST_ROUND_TRIPS} each) — the offer and its answer, then the ICE candidates
|
|
342
|
+
* each side trickles to the other.
|
|
343
|
+
*
|
|
344
|
+
* Counted from `@libp2p/webrtc`'s `initiateConnection`, which opens ONE signalling stream and
|
|
345
|
+
* writes those messages on it. The dial leg is normally not spent at all: an upgrade is
|
|
346
|
+
* attempted only for a peer already reachable over a relay, and that function reuses an open
|
|
347
|
+
* connection to the peer rather than dialing. It is counted because an upgrade attempt races
|
|
348
|
+
* the connection it was triggered by, which can close first.
|
|
349
|
+
*
|
|
350
|
+
* The ICE connectivity checks that follow cross the two networks' own candidate addresses
|
|
351
|
+
* rather than the relay, so they are not link time counted here; they get a flat allowance
|
|
352
|
+
* ({@link ICE_NEGOTIATION_ALLOWANCE_MS}).
|
|
353
|
+
*/
|
|
354
|
+
export declare const WEBRTC_SIGNALING_ROUND_TRIPS: number;
|
|
337
355
|
/**
|
|
338
356
|
* What a block-transfer push message's BYTES get to cross, on top of the latency
|
|
339
357
|
* {@link CIRCUIT_REQUEST_ROUND_TRIPS} covers, in milliseconds.
|
|
@@ -350,6 +368,23 @@ export declare const RELAYED_REQUEST_ROUND_TRIPS: number;
|
|
|
350
368
|
* not the declared round trip.
|
|
351
369
|
*/
|
|
352
370
|
export declare const PUSH_TRANSFER_ALLOWANCE_MS = 6000;
|
|
371
|
+
/**
|
|
372
|
+
* What ICE — WebRTC's connectivity check — gets on top of the signalling exchanges
|
|
373
|
+
* {@link WEBRTC_SIGNALING_ROUND_TRIPS} covers, in milliseconds: gathering each side's candidates
|
|
374
|
+
* (which includes asking a STUN server for the address it is seen at outside its NAT —
|
|
375
|
+
* `ops/docs/ice-servers.md`) and then the checks between candidate pairs. Those checks cross the
|
|
376
|
+
* two networks' own paths, not the relay, so this part does not scale with the declared relay
|
|
377
|
+
* round trip, any more than a push's bytes do.
|
|
378
|
+
*
|
|
379
|
+
* 25 000 ms is deliberately LONGER than the roughly 23 s the WebRTC stack takes to give up by
|
|
380
|
+
* itself when no candidate pair works (gotchoices/sereus#61), so the upgrade dial's deadline is
|
|
381
|
+
* a backstop rather than the thing that normally ends an attempt. That is the right way round
|
|
382
|
+
* here because nothing waits on an upgrade dial — it runs in the background while the relayed
|
|
383
|
+
* connection carries everything (`docs/network/relay.md` → "Direct connections over WebRTC") —
|
|
384
|
+
* so cutting a slow but working negotiation off would lose a direct path for nothing, while
|
|
385
|
+
* erring long costs one timer.
|
|
386
|
+
*/
|
|
387
|
+
export declare const ICE_NEGOTIATION_ALLOWANCE_MS = 25000;
|
|
353
388
|
/**
|
|
354
389
|
* Deadline for one admission decision, after which the fail-open outcome is
|
|
355
390
|
* used (connection admitted / reservation admitted). Both inbound gaters use
|
|
@@ -497,6 +532,20 @@ export declare function circuitRequestBudgetMs(linkRoundTripMs?: number, transfe
|
|
|
497
532
|
* side (`membership-connection-gater.ts`, `PROVISIONAL_ADMISSION_DEADLINE_MS`).
|
|
498
533
|
*/
|
|
499
534
|
export declare function relayedRequestBudgetMs(linkRoundTripMs?: number): number;
|
|
535
|
+
/**
|
|
536
|
+
* Deadline for ONE background WebRTC upgrade dial of a peer this node already reaches through a
|
|
537
|
+
* relay (`webrtc-upgrade.ts`): the signalling over that relay
|
|
538
|
+
* ({@link WEBRTC_SIGNALING_ROUND_TRIPS} at the declared link round trip, plus one
|
|
539
|
+
* {@link ADMISSION_DECISION_TIMEOUT_MS} for each of the {@link DIAL_ADMISSION_DECISIONS} gates
|
|
540
|
+
* the signalling connection can pass) and then {@link ICE_NEGOTIATION_ALLOWANCE_MS} for ICE.
|
|
541
|
+
* 9 x 3 500 + 2 x 2 000 + 25 000 = 60 500 ms at the default declaration.
|
|
542
|
+
*
|
|
543
|
+
* The longest budget in this module and the one with the least riding on it: no caller waits for
|
|
544
|
+
* an upgrade dial, and while it runs the relayed connection carries everything. The two
|
|
545
|
+
* constants say why each half is shaped the way it is — in particular why erring long is right
|
|
546
|
+
* here and wrong for every other budget above.
|
|
547
|
+
*/
|
|
548
|
+
export declare function webrtcUpgradeDialBudgetMs(linkRoundTripMs?: number): number;
|
|
500
549
|
/**
|
|
501
550
|
* How long ONE cohort peer gets to answer ONE read-path request — Optimystic's
|
|
502
551
|
* `clusterPolicy.cohortQueryTimeoutMs`, which bounds the latest-revision query a read runs when
|
package/dist/link-budget.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* deadline that never waits on the link; `-- link-bound, not yet derived: <ticket slug>` marks
|
|
19
19
|
* one that does and names the ticket that owns converting it. Grep for the second to list the
|
|
20
20
|
* deadlines this module does not yet cover. `-- cuts off by design: <why>; see
|
|
21
|
-
* docs/
|
|
21
|
+
* docs/network/deadlines.md → "Deadlines over Optimystic's reads and commits"` keeps a deadline
|
|
22
22
|
* that does wait on the link, through an Optimystic read or commit, but whose value is what its
|
|
23
23
|
* caller can tolerate: it gives up on purpose and must not grow with the link. That doc section
|
|
24
24
|
* lists every such site. `-- measured, not derived: <where the measurement lives>` keeps a
|
|
@@ -150,8 +150,8 @@
|
|
|
150
150
|
* to a peer that never completes a connection waits up to the 42 500 ms dial deadline, each of
|
|
151
151
|
* that peer's addresses up to 39 000 ms inside it, and one that connects and never answers
|
|
152
152
|
* waits 10 500. A control write against a connected, silent member fails after about 84 s
|
|
153
|
-
* (one pend round and three cancel rounds; `docs/
|
|
154
|
-
* Optimystic's
|
|
153
|
+
* (one pend round and three cancel rounds; `docs/network/deadlines.md` → "Deadlines over
|
|
154
|
+
* Optimystic's reads and commits"). The dial case was not measured. cadre's cut-off budgets
|
|
155
155
|
* (`CONTROL_WRITE_RETRY_BUDGET_MS`, `CONTROL_READ_RETRY_BUDGET_MS`) are checked between
|
|
156
156
|
* attempts, so one attempt can outlast them by that much. If writes on a fast link are seen
|
|
157
157
|
* waiting out the dial deadline against an unreachable machine, declare that deployment's real
|
|
@@ -208,7 +208,7 @@ import { resolveLinkDeadlines } from '@optimystic/db-p2p';
|
|
|
208
208
|
*
|
|
209
209
|
* **Why 3 500.** Sereus supports two machines that reach each other only through a relay up to
|
|
210
210
|
* a **3-second link round trip** (1 500 ms each way — a congested mobile or satellite link;
|
|
211
|
-
* `docs/
|
|
211
|
+
* `docs/network/deadlines.md` → "The declared link"). The worst relayed dial measured at that link,
|
|
212
212
|
* opening the relay connection first, was 15 113 ms, above the 15 000 ms a declaration of
|
|
213
213
|
* exactly 3 000 would derive, so the declaration rounds the supported link up to the next half
|
|
214
214
|
* second. 3 500 derives 17 500 ms of link time and leaves about 2.4 s over that dial: room for a
|
|
@@ -334,6 +334,24 @@ export const COMMIT_ROUND_TRIPS = 20;
|
|
|
334
334
|
* {@link relayedRequestBudgetMs} adds the dial's admission allowances on top.
|
|
335
335
|
*/
|
|
336
336
|
export const RELAYED_REQUEST_ROUND_TRIPS = RELAYED_DIAL_ROUND_TRIPS + CIRCUIT_REQUEST_ROUND_TRIPS;
|
|
337
|
+
/**
|
|
338
|
+
* Link round trips the SIGNALLING half of a WebRTC upgrade dial costs, over the relay that
|
|
339
|
+
* carries it ({@link webrtcUpgradeDialBudgetMs}): {@link RELAYED_DIAL_ROUND_TRIPS} to open the
|
|
340
|
+
* connection the signalling runs on, then two request-and-answer exchanges over it
|
|
341
|
+
* ({@link CIRCUIT_REQUEST_ROUND_TRIPS} each) — the offer and its answer, then the ICE candidates
|
|
342
|
+
* each side trickles to the other.
|
|
343
|
+
*
|
|
344
|
+
* Counted from `@libp2p/webrtc`'s `initiateConnection`, which opens ONE signalling stream and
|
|
345
|
+
* writes those messages on it. The dial leg is normally not spent at all: an upgrade is
|
|
346
|
+
* attempted only for a peer already reachable over a relay, and that function reuses an open
|
|
347
|
+
* connection to the peer rather than dialing. It is counted because an upgrade attempt races
|
|
348
|
+
* the connection it was triggered by, which can close first.
|
|
349
|
+
*
|
|
350
|
+
* The ICE connectivity checks that follow cross the two networks' own candidate addresses
|
|
351
|
+
* rather than the relay, so they are not link time counted here; they get a flat allowance
|
|
352
|
+
* ({@link ICE_NEGOTIATION_ALLOWANCE_MS}).
|
|
353
|
+
*/
|
|
354
|
+
export const WEBRTC_SIGNALING_ROUND_TRIPS = RELAYED_DIAL_ROUND_TRIPS + 2 * CIRCUIT_REQUEST_ROUND_TRIPS;
|
|
337
355
|
/**
|
|
338
356
|
* What a block-transfer push message's BYTES get to cross, on top of the latency
|
|
339
357
|
* {@link CIRCUIT_REQUEST_ROUND_TRIPS} covers, in milliseconds.
|
|
@@ -350,6 +368,23 @@ export const RELAYED_REQUEST_ROUND_TRIPS = RELAYED_DIAL_ROUND_TRIPS + CIRCUIT_RE
|
|
|
350
368
|
* not the declared round trip.
|
|
351
369
|
*/
|
|
352
370
|
export const PUSH_TRANSFER_ALLOWANCE_MS = 6000;
|
|
371
|
+
/**
|
|
372
|
+
* What ICE — WebRTC's connectivity check — gets on top of the signalling exchanges
|
|
373
|
+
* {@link WEBRTC_SIGNALING_ROUND_TRIPS} covers, in milliseconds: gathering each side's candidates
|
|
374
|
+
* (which includes asking a STUN server for the address it is seen at outside its NAT —
|
|
375
|
+
* `ops/docs/ice-servers.md`) and then the checks between candidate pairs. Those checks cross the
|
|
376
|
+
* two networks' own paths, not the relay, so this part does not scale with the declared relay
|
|
377
|
+
* round trip, any more than a push's bytes do.
|
|
378
|
+
*
|
|
379
|
+
* 25 000 ms is deliberately LONGER than the roughly 23 s the WebRTC stack takes to give up by
|
|
380
|
+
* itself when no candidate pair works (gotchoices/sereus#61), so the upgrade dial's deadline is
|
|
381
|
+
* a backstop rather than the thing that normally ends an attempt. That is the right way round
|
|
382
|
+
* here because nothing waits on an upgrade dial — it runs in the background while the relayed
|
|
383
|
+
* connection carries everything (`docs/network/relay.md` → "Direct connections over WebRTC") —
|
|
384
|
+
* so cutting a slow but working negotiation off would lose a direct path for nothing, while
|
|
385
|
+
* erring long costs one timer.
|
|
386
|
+
*/
|
|
387
|
+
export const ICE_NEGOTIATION_ALLOWANCE_MS = 25000;
|
|
353
388
|
/**
|
|
354
389
|
* Deadline for one admission decision, after which the fail-open outcome is
|
|
355
390
|
* used (connection admitted / reservation admitted). Both inbound gaters use
|
|
@@ -405,7 +440,7 @@ export const PUSH_TRANSFER_ALLOWANCE_MS = 6000;
|
|
|
405
440
|
* `CONTROL_READ_RETRY_BUDGET_MS` must stay below this, which
|
|
406
441
|
* `control-read-retry.spec.ts` pins.
|
|
407
442
|
*/
|
|
408
|
-
// eslint-disable-next-line no-restricted-syntax -- cuts off by design: an expired decision admits a connection only, and the dial budgets add it as a flat allowance; see docs/
|
|
443
|
+
// eslint-disable-next-line no-restricted-syntax -- cuts off by design: an expired decision admits a connection only, and the dial budgets add it as a flat allowance; see docs/network/deadlines.md → "Deadlines over Optimystic's reads and commits"
|
|
409
444
|
export const ADMISSION_DECISION_TIMEOUT_MS = 2000;
|
|
410
445
|
/**
|
|
411
446
|
* Resolve a host's declared link round trip, falling back to
|
|
@@ -518,6 +553,24 @@ export function circuitRequestBudgetMs(linkRoundTripMs, transferAllowanceMs = PU
|
|
|
518
553
|
export function relayedRequestBudgetMs(linkRoundTripMs) {
|
|
519
554
|
return relayedDialBudgetMs(linkRoundTripMs) + CIRCUIT_REQUEST_ROUND_TRIPS * resolveLinkRoundTripMs(linkRoundTripMs);
|
|
520
555
|
}
|
|
556
|
+
/**
|
|
557
|
+
* Deadline for ONE background WebRTC upgrade dial of a peer this node already reaches through a
|
|
558
|
+
* relay (`webrtc-upgrade.ts`): the signalling over that relay
|
|
559
|
+
* ({@link WEBRTC_SIGNALING_ROUND_TRIPS} at the declared link round trip, plus one
|
|
560
|
+
* {@link ADMISSION_DECISION_TIMEOUT_MS} for each of the {@link DIAL_ADMISSION_DECISIONS} gates
|
|
561
|
+
* the signalling connection can pass) and then {@link ICE_NEGOTIATION_ALLOWANCE_MS} for ICE.
|
|
562
|
+
* 9 x 3 500 + 2 x 2 000 + 25 000 = 60 500 ms at the default declaration.
|
|
563
|
+
*
|
|
564
|
+
* The longest budget in this module and the one with the least riding on it: no caller waits for
|
|
565
|
+
* an upgrade dial, and while it runs the relayed connection carries everything. The two
|
|
566
|
+
* constants say why each half is shaped the way it is — in particular why erring long is right
|
|
567
|
+
* here and wrong for every other budget above.
|
|
568
|
+
*/
|
|
569
|
+
export function webrtcUpgradeDialBudgetMs(linkRoundTripMs) {
|
|
570
|
+
return WEBRTC_SIGNALING_ROUND_TRIPS * resolveLinkRoundTripMs(linkRoundTripMs)
|
|
571
|
+
+ DIAL_ADMISSION_DECISIONS * ADMISSION_DECISION_TIMEOUT_MS
|
|
572
|
+
+ ICE_NEGOTIATION_ALLOWANCE_MS;
|
|
573
|
+
}
|
|
521
574
|
/**
|
|
522
575
|
* How long ONE cohort peer gets to answer ONE read-path request — Optimystic's
|
|
523
576
|
* `clusterPolicy.cohortQueryTimeoutMs`, which bounds the latest-revision query a read runs when
|
package/dist/link-budget.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-budget.js","sourceRoot":"","sources":["../src/link-budget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0MG;AAEH,OAAO,EAAE,oBAAoB,EAA2D,MAAM,oBAAoB,CAAC;AAEnH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAE1C;;;;;GA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AAW,EAAE,OAAO,CAAC,mBAAmB,GAAG,WAAW;SACtD;QACD,YAAY,EAAE,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,GAAG,WAAW,EAAE;KACpE,CAAC;AACH,CAAC"}
|
|
@@ -28,7 +28,7 @@ export interface MachineListingInput {
|
|
|
28
28
|
trusted: (row: CadrePeerRow) => boolean;
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* One entry per live `CadrePeer` row. `
|
|
31
|
+
* One entry per live `CadrePeer` row. `alwaysOn` and `lastPublishedAt` are reported only when
|
|
32
32
|
* the row's self-signature verifies under the key behind its peer id, as
|
|
33
33
|
* `CadreNode.resolvePeerAddrs` judges the same record: no insert rule constrains `Profile`, and
|
|
34
34
|
* an owner re-vouch may bump `UpdatedAt` without re-signing.
|
|
@@ -85,7 +85,7 @@ export declare function planMachineRemoval(input: MachineRemovalPlanInput): Mach
|
|
|
85
85
|
* `here` when the strand runs here with a manager seat, or hibernates here (the removal wakes it
|
|
86
86
|
* and learns the seat then); `another-party` when it runs here without one, so the new key is
|
|
87
87
|
* seated by the strand's host re-inviting the party, or its manager admitting the key by hand
|
|
88
|
-
* (docs/strands.md → "Replacing the party's key"); `later` when it does not run here.
|
|
88
|
+
* (docs/strands/keys.md → "Replacing the party's key"); `later` when it does not run here.
|
|
89
89
|
*/
|
|
90
90
|
export declare function planStrandKeyRotations(strands: readonly ClosedStrandState[]): StrandKeyRotationPlan[];
|
|
91
91
|
/**
|
package/dist/machine-removal.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { ed25519PublicKeyB64FromPeerId } from './ed25519-key.js';
|
|
12
12
|
import { verifyPeerRecordSignature } from './peer-record.js';
|
|
13
|
+
import { decodeAlwaysOn } from './node-class.js';
|
|
13
14
|
/**
|
|
14
15
|
* `CadreNode.removeMachine` refused by name, before any write. `code` says which rule
|
|
15
16
|
* (`MachineRemovalRefusal`), for an app to switch on; the message is for a log.
|
|
@@ -27,7 +28,7 @@ const MACHINE_REMOVAL_REFUSAL_REASON = {
|
|
|
27
28
|
'self': 'it is this node; leaving a cadre is stopping the node and deleting its data',
|
|
28
29
|
};
|
|
29
30
|
/**
|
|
30
|
-
* One entry per live `CadrePeer` row. `
|
|
31
|
+
* One entry per live `CadrePeer` row. `alwaysOn` and `lastPublishedAt` are reported only when
|
|
31
32
|
* the row's self-signature verifies under the key behind its peer id, as
|
|
32
33
|
* `CadreNode.resolvePeerAddrs` judges the same record: no insert rule constrains `Profile`, and
|
|
33
34
|
* an owner re-vouch may bump `UpdatedAt` without re-signing.
|
|
@@ -51,7 +52,7 @@ function describeMemberRow(input, row) {
|
|
|
51
52
|
publicKey,
|
|
52
53
|
isSelf: row.peerId === input.selfPeerId,
|
|
53
54
|
trusted: input.trusted(row),
|
|
54
|
-
|
|
55
|
+
alwaysOn: selfPublished ? decodeAlwaysOn(row.profile) : null,
|
|
55
56
|
lastPublishedAt: selfPublished ? row.updatedAt : null,
|
|
56
57
|
vouchedBy: row.vouchOwner,
|
|
57
58
|
};
|
|
@@ -85,7 +86,7 @@ export function planMachineRemoval(input) {
|
|
|
85
86
|
* `here` when the strand runs here with a manager seat, or hibernates here (the removal wakes it
|
|
86
87
|
* and learns the seat then); `another-party` when it runs here without one, so the new key is
|
|
87
88
|
* seated by the strand's host re-inviting the party, or its manager admitting the key by hand
|
|
88
|
-
* (docs/strands.md → "Replacing the party's key"); `later` when it does not run here.
|
|
89
|
+
* (docs/strands/keys.md → "Replacing the party's key"); `later` when it does not run here.
|
|
89
90
|
*/
|
|
90
91
|
export function planStrandKeyRotations(strands) {
|
|
91
92
|
return strands.map((strand) => ({ strandId: strand.strandId, rotation: rotationSite(strand) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine-removal.js","sourceRoot":"","sources":["../src/machine-removal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CA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AE,CAAC,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IACxH,OAAO,KAAK,CAAC,OAAO;SACjB,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,IAAI,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;SAC7G,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -108,8 +108,8 @@
|
|
|
108
108
|
* provisionally admitted stranger can open or advertise the party's protocols;
|
|
109
109
|
* what keeps it out of the control-database cohort is the control node's
|
|
110
110
|
* membership predicate (`CadreNode.isControlNetworkMember`, wired as Optimystic's
|
|
111
|
-
* `isNetworkMember`). FRET's ring still counts it: `docs/
|
|
112
|
-
* "
|
|
111
|
+
* `isNetworkMember`). FRET's ring still counts it: `docs/cadre/control-security.md` →
|
|
112
|
+
* "Limits and accepted tradeoffs".
|
|
113
113
|
*
|
|
114
114
|
* ## The relay-reservation seam
|
|
115
115
|
*
|
|
@@ -108,8 +108,8 @@
|
|
|
108
108
|
* provisionally admitted stranger can open or advertise the party's protocols;
|
|
109
109
|
* what keeps it out of the control-database cohort is the control node's
|
|
110
110
|
* membership predicate (`CadreNode.isControlNetworkMember`, wired as Optimystic's
|
|
111
|
-
* `isNetworkMember`). FRET's ring still counts it: `docs/
|
|
112
|
-
* "
|
|
111
|
+
* `isNetworkMember`). FRET's ring still counts it: `docs/cadre/control-security.md` →
|
|
112
|
+
* "Limits and accepted tradeoffs".
|
|
113
113
|
*
|
|
114
114
|
* ## The relay-reservation seam
|
|
115
115
|
*
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* membership, owner, peer-record and admission-chain reads that every flow repeats cost nothing
|
|
4
4
|
* after the first.
|
|
5
5
|
* `ControlDatabase` keeps one per cached table and drops it from its table-change subscription
|
|
6
|
-
* (`docs/
|
|
7
|
-
* they are testable without a database.
|
|
6
|
+
* (`docs/cadre/control-convergence.md` → "Membership rows view"); this class holds only the
|
|
7
|
+
* caching rules, so they are testable without a database.
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* How long installed rows are served before the next read reloads them, change or no change.
|
package/dist/membership-view.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* membership, owner, peer-record and admission-chain reads that every flow repeats cost nothing
|
|
4
4
|
* after the first.
|
|
5
5
|
* `ControlDatabase` keeps one per cached table and drops it from its table-change subscription
|
|
6
|
-
* (`docs/
|
|
7
|
-
* they are testable without a database.
|
|
6
|
+
* (`docs/cadre/control-convergence.md` → "Membership rows view"); this class holds only the
|
|
7
|
+
* caching rules, so they are testable without a database.
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* How long installed rows are served before the next read reloads them, change or no change.
|
|
@@ -29,7 +29,10 @@ export const MEMBERSHIP_VIEW_MAX_AGE_MS = 15000;
|
|
|
29
29
|
* Optimystic's lazy read-repair window (`clusterPolicy.readRepairWindowMs`, which cadre does
|
|
30
30
|
* not set, so this is Optimystic's default): a read of a held block checked less than this
|
|
31
31
|
* long ago is served from the local copy without asking the cohort. A read after it is
|
|
32
|
-
* served locally too, but starts a cohort consult whose landing raises a table change
|
|
32
|
+
* served locally too, but starts a cohort consult whose landing raises a table change, unless
|
|
33
|
+
* a cohort of two or three has stayed connected to this node since that block's last consult
|
|
34
|
+
* (Optimystic's quiet span). A sibling's new connection ends the span, so the reload below
|
|
35
|
+
* still consults.
|
|
33
36
|
*
|
|
34
37
|
* NOTE: a copy, since db-p2p exports no default for it. If cadre ever sets
|
|
35
38
|
* `readRepairWindowMs` in its cluster policy, derive this from that value.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"membership-view.js","sourceRoot":"","sources":["../src/membership-view.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAM,CAAC;AAEjD
|
|
1
|
+
{"version":3,"file":"membership-view.js","sourceRoot":"","sources":["../src/membership-view.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAM,CAAC;AAEjD;;;;;;;;;;;GAWG;AACH,MAAM,gCAAgC,GAAG,KAAM,CAAC;AAEhD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,gCAAgC,GAAG,IAAK,CAAC;AA0B5F,MAAM,OAAO,cAAc;IAc1B,YAA6B,MAAiC,EAAE,UAAiC,EAAE;QAAtE,WAAM,GAAN,MAAM,CAA2B;QAZ9D,yFAAyF;QACjF,aAAQ,GAAG,CAAC,CAAC;QACrB,wGAAwG;QAChG,eAAU,GAAG,CAAC,CAAC;QACvB;;;WAGG;QACc,aAAQ,GAAG,IAAI,GAAG,EAAoC,CAAC;QAKvE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,0BAA0B,CAAC;QAC/D,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC;IACrD,CAAC;IAED;;;;;OAKG;IACH,IAAI,CAAC,KAAc;QAClB,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC3E,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnC,CAA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