@optimystic/db-p2p 1.0.0-beta.2 → 1.0.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/dist/src/cluster/block-transfer-service.d.ts +73 -1
- package/dist/src/cluster/block-transfer-service.d.ts.map +1 -1
- package/dist/src/cluster/block-transfer-service.js +70 -3
- package/dist/src/cluster/block-transfer-service.js.map +1 -1
- package/dist/src/cluster/block-transfer.d.ts +16 -1
- package/dist/src/cluster/block-transfer.d.ts.map +1 -1
- package/dist/src/cluster/block-transfer.js +73 -72
- package/dist/src/cluster/block-transfer.js.map +1 -1
- package/dist/src/cluster/client.d.ts +4 -6
- package/dist/src/cluster/client.d.ts.map +1 -1
- package/dist/src/cluster/client.js +8 -13
- package/dist/src/cluster/client.js.map +1 -1
- package/dist/src/cluster/cluster-policy.d.ts +2 -1
- package/dist/src/cluster/cluster-policy.d.ts.map +1 -1
- package/dist/src/cluster/cluster-policy.js.map +1 -1
- package/dist/src/cluster/cluster-repo.d.ts +172 -17
- package/dist/src/cluster/cluster-repo.d.ts.map +1 -1
- package/dist/src/cluster/cluster-repo.js +553 -149
- package/dist/src/cluster/cluster-repo.js.map +1 -1
- package/dist/src/cluster/commit-proof.js +2 -2
- package/dist/src/cluster/race-resolution.d.ts +51 -7
- package/dist/src/cluster/race-resolution.d.ts.map +1 -1
- package/dist/src/cluster/race-resolution.js +71 -7
- package/dist/src/cluster/race-resolution.js.map +1 -1
- package/dist/src/cluster/rebalance-monitor.d.ts +67 -5
- package/dist/src/cluster/rebalance-monitor.d.ts.map +1 -1
- package/dist/src/cluster/rebalance-monitor.js +120 -26
- package/dist/src/cluster/rebalance-monitor.js.map +1 -1
- package/dist/src/cluster/spread-on-churn.d.ts.map +1 -1
- package/dist/src/cluster/spread-on-churn.js +34 -47
- package/dist/src/cluster/spread-on-churn.js.map +1 -1
- package/dist/src/cohort-topic/host.d.ts.map +1 -1
- package/dist/src/cohort-topic/host.js +8 -6
- package/dist/src/cohort-topic/host.js.map +1 -1
- package/dist/src/cohort-topic/membership-source.js +1 -1
- package/dist/src/cohort-topic/membership-source.js.map +1 -1
- package/dist/src/cohort-topic/peer-codec.d.ts.map +1 -1
- package/dist/src/cohort-topic/peer-codec.js +5 -2
- package/dist/src/cohort-topic/peer-codec.js.map +1 -1
- package/dist/src/cohort-topic/stream-util.d.ts +24 -3
- package/dist/src/cohort-topic/stream-util.d.ts.map +1 -1
- package/dist/src/cohort-topic/stream-util.js +36 -3
- package/dist/src/cohort-topic/stream-util.js.map +1 -1
- package/dist/src/cohort-topic/topic-router.d.ts +9 -0
- package/dist/src/cohort-topic/topic-router.d.ts.map +1 -1
- package/dist/src/cohort-topic/topic-router.js +12 -2
- package/dist/src/cohort-topic/topic-router.js.map +1 -1
- package/dist/src/dispute/client.d.ts.map +1 -1
- package/dist/src/dispute/client.js +15 -3
- package/dist/src/dispute/client.js.map +1 -1
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/libp2p-key-network.d.ts +78 -17
- package/dist/src/libp2p-key-network.d.ts.map +1 -1
- package/dist/src/libp2p-key-network.js +241 -147
- package/dist/src/libp2p-key-network.js.map +1 -1
- package/dist/src/libp2p-node-base.d.ts +35 -1
- package/dist/src/libp2p-node-base.d.ts.map +1 -1
- package/dist/src/libp2p-node-base.js +151 -26
- package/dist/src/libp2p-node-base.js.map +1 -1
- package/dist/src/libp2p-node-rn.d.ts +2 -2
- package/dist/src/libp2p-node-rn.d.ts.map +1 -1
- package/dist/src/libp2p-node-rn.js.map +1 -1
- package/dist/src/libp2p-node.d.ts +2 -2
- package/dist/src/libp2p-node.d.ts.map +1 -1
- package/dist/src/libp2p-node.js.map +1 -1
- package/dist/src/logger.d.ts.map +1 -1
- package/dist/src/logger.js +19 -7
- package/dist/src/logger.js.map +1 -1
- package/dist/src/matchmaking/query-transport.d.ts +3 -4
- package/dist/src/matchmaking/query-transport.d.ts.map +1 -1
- package/dist/src/matchmaking/query-transport.js +9 -9
- package/dist/src/matchmaking/query-transport.js.map +1 -1
- package/dist/src/network/network-manager-service.d.ts +10 -5
- package/dist/src/network/network-manager-service.d.ts.map +1 -1
- package/dist/src/network/network-manager-service.js +11 -2
- package/dist/src/network/network-manager-service.js.map +1 -1
- package/dist/src/network/relay-reservation.d.ts +170 -0
- package/dist/src/network/relay-reservation.d.ts.map +1 -0
- package/dist/src/network/relay-reservation.js +527 -0
- package/dist/src/network/relay-reservation.js.map +1 -0
- package/dist/src/pend-validation.d.ts +3 -2
- package/dist/src/pend-validation.d.ts.map +1 -1
- package/dist/src/pend-validation.js +3 -2
- package/dist/src/pend-validation.js.map +1 -1
- package/dist/src/protocol-client.d.ts +8 -1
- package/dist/src/protocol-client.d.ts.map +1 -1
- package/dist/src/protocol-client.js +11 -0
- package/dist/src/protocol-client.js.map +1 -1
- package/dist/src/reactivity/forwarder-host.d.ts +2 -1
- package/dist/src/reactivity/forwarder-host.d.ts.map +1 -1
- package/dist/src/reactivity/forwarder-host.js +2 -1
- package/dist/src/reactivity/forwarder-host.js.map +1 -1
- package/dist/src/reactivity/origination-manager.d.ts +3 -3
- package/dist/src/reactivity/origination-manager.js +3 -3
- package/dist/src/reactivity/recover-transport.d.ts +22 -14
- package/dist/src/reactivity/recover-transport.d.ts.map +1 -1
- package/dist/src/reactivity/recover-transport.js +32 -19
- package/dist/src/reactivity/recover-transport.js.map +1 -1
- package/dist/src/reactivity/subscription-manager.d.ts +2 -2
- package/dist/src/reactivity/topic-bytes.d.ts +6 -7
- package/dist/src/reactivity/topic-bytes.d.ts.map +1 -1
- package/dist/src/reactivity/topic-bytes.js +8 -9
- package/dist/src/reactivity/topic-bytes.js.map +1 -1
- package/dist/src/repo/client.d.ts +5 -2
- package/dist/src/repo/client.d.ts.map +1 -1
- package/dist/src/repo/client.js +49 -40
- package/dist/src/repo/client.js.map +1 -1
- package/dist/src/repo/cluster-coordinator.d.ts +119 -5
- package/dist/src/repo/cluster-coordinator.d.ts.map +1 -1
- package/dist/src/repo/cluster-coordinator.js +181 -29
- package/dist/src/repo/cluster-coordinator.js.map +1 -1
- package/dist/src/repo/coordinator-repo.d.ts +259 -76
- package/dist/src/repo/coordinator-repo.d.ts.map +1 -1
- package/dist/src/repo/coordinator-repo.js +716 -328
- package/dist/src/repo/coordinator-repo.js.map +1 -1
- package/dist/src/repo/i-under-replication-ledger.d.ts +87 -0
- package/dist/src/repo/i-under-replication-ledger.d.ts.map +1 -0
- package/dist/src/repo/i-under-replication-ledger.js +2 -0
- package/dist/src/repo/i-under-replication-ledger.js.map +1 -0
- package/dist/src/repo/kv-under-replication-ledger.d.ts +91 -0
- package/dist/src/repo/kv-under-replication-ledger.d.ts.map +1 -0
- package/dist/src/repo/kv-under-replication-ledger.js +287 -0
- package/dist/src/repo/kv-under-replication-ledger.js.map +1 -0
- package/dist/src/repo/responsibility.d.ts +37 -0
- package/dist/src/repo/responsibility.d.ts.map +1 -0
- package/dist/src/repo/responsibility.js +37 -0
- package/dist/src/repo/responsibility.js.map +1 -0
- package/dist/src/repo/service.d.ts +44 -15
- package/dist/src/repo/service.d.ts.map +1 -1
- package/dist/src/repo/service.js +64 -27
- package/dist/src/repo/service.js.map +1 -1
- package/dist/src/repo/stuck-reservation.d.ts +127 -0
- package/dist/src/repo/stuck-reservation.d.ts.map +1 -0
- package/dist/src/repo/stuck-reservation.js +179 -0
- package/dist/src/repo/stuck-reservation.js.map +1 -0
- package/dist/src/repo/under-replication-drain.d.ts +208 -0
- package/dist/src/repo/under-replication-drain.d.ts.map +1 -0
- package/dist/src/repo/under-replication-drain.js +461 -0
- package/dist/src/repo/under-replication-drain.js.map +1 -0
- package/dist/src/rn.d.ts +5 -0
- package/dist/src/rn.d.ts.map +1 -1
- package/dist/src/rn.js +5 -0
- package/dist/src/rn.js.map +1 -1
- package/dist/src/storage/block-latch.d.ts +3 -2
- package/dist/src/storage/block-latch.d.ts.map +1 -1
- package/dist/src/storage/block-latch.js +7 -4
- package/dist/src/storage/block-latch.js.map +1 -1
- package/dist/src/storage/block-storage.d.ts +45 -3
- package/dist/src/storage/block-storage.d.ts.map +1 -1
- package/dist/src/storage/block-storage.js +156 -9
- package/dist/src/storage/block-storage.js.map +1 -1
- package/dist/src/storage/i-block-storage.d.ts +57 -5
- package/dist/src/storage/i-block-storage.d.ts.map +1 -1
- package/dist/src/storage/i-block-storage.js.map +1 -1
- package/dist/src/storage/pending-claim.d.ts +167 -0
- package/dist/src/storage/pending-claim.d.ts.map +1 -0
- package/dist/src/storage/pending-claim.js +156 -0
- package/dist/src/storage/pending-claim.js.map +1 -0
- package/dist/src/storage/raw-store-codec.d.ts +13 -0
- package/dist/src/storage/raw-store-codec.d.ts.map +1 -1
- package/dist/src/storage/raw-store-codec.js +24 -3
- package/dist/src/storage/raw-store-codec.js.map +1 -1
- package/dist/src/storage/restoration-coordinator.d.ts.map +1 -1
- package/dist/src/storage/restoration-coordinator.js +2 -1
- package/dist/src/storage/restoration-coordinator.js.map +1 -1
- package/dist/src/storage/ring-shift-coordinator.d.ts.map +1 -1
- package/dist/src/storage/ring-shift-coordinator.js +3 -3
- package/dist/src/storage/ring-shift-coordinator.js.map +1 -1
- package/dist/src/storage/storage-repo.d.ts +137 -5
- package/dist/src/storage/storage-repo.d.ts.map +1 -1
- package/dist/src/storage/storage-repo.js +273 -68
- package/dist/src/storage/storage-repo.js.map +1 -1
- package/dist/src/storage/struct.d.ts +58 -0
- package/dist/src/storage/struct.d.ts.map +1 -1
- package/dist/src/testing/mesh-harness.d.ts +92 -11
- package/dist/src/testing/mesh-harness.d.ts.map +1 -1
- package/dist/src/testing/mesh-harness.js +246 -103
- package/dist/src/testing/mesh-harness.js.map +1 -1
- package/package.json +2 -2
- package/readme.md +27 -3
- package/src/cluster/block-transfer-service.ts +132 -4
- package/src/cluster/block-transfer.ts +79 -84
- package/src/cluster/client.ts +115 -119
- package/src/cluster/cluster-policy.ts +2 -1
- package/src/cluster/cluster-repo.ts +3115 -2671
- package/src/cluster/commit-proof.ts +2 -2
- package/src/cluster/race-resolution.ts +76 -7
- package/src/cluster/rebalance-monitor.ts +677 -539
- package/src/cluster/spread-on-churn.ts +34 -54
- package/src/cohort-topic/host.ts +8 -6
- package/src/cohort-topic/membership-source.ts +1 -1
- package/src/cohort-topic/peer-codec.ts +34 -31
- package/src/cohort-topic/stream-util.ts +39 -4
- package/src/cohort-topic/topic-router.ts +12 -2
- package/src/dispute/client.ts +17 -7
- package/src/index.ts +64 -59
- package/src/libp2p-key-network.ts +1377 -1253
- package/src/libp2p-node-base.ts +186 -27
- package/src/libp2p-node-rn.ts +31 -30
- package/src/libp2p-node.ts +37 -36
- package/src/logger.ts +20 -7
- package/src/matchmaking/query-transport.ts +9 -9
- package/src/network/network-manager-service.ts +16 -5
- package/src/network/relay-reservation.ts +636 -0
- package/src/pend-validation.ts +3 -2
- package/src/protocol-client.ts +13 -1
- package/src/reactivity/forwarder-host.ts +2 -1
- package/src/reactivity/origination-manager.ts +3 -3
- package/src/reactivity/recover-transport.ts +39 -22
- package/src/reactivity/subscription-manager.ts +2 -2
- package/src/reactivity/topic-bytes.ts +35 -37
- package/src/repo/client.ts +172 -173
- package/src/repo/cluster-coordinator.ts +1296 -1113
- package/src/repo/coordinator-repo.ts +3087 -2687
- package/src/repo/i-under-replication-ledger.ts +89 -0
- package/src/repo/kv-under-replication-ledger.ts +302 -0
- package/src/repo/responsibility.ts +48 -0
- package/src/repo/service.ts +76 -39
- package/src/repo/stuck-reservation.ts +224 -0
- package/src/repo/under-replication-drain.ts +582 -0
- package/src/rn.ts +74 -69
- package/src/storage/block-latch.ts +7 -4
- package/src/storage/block-storage.ts +161 -10
- package/src/storage/i-block-storage.ts +60 -5
- package/src/storage/pending-claim.ts +200 -0
- package/src/storage/raw-store-codec.ts +26 -3
- package/src/storage/restoration-coordinator.ts +212 -211
- package/src/storage/ring-shift-coordinator.ts +271 -271
- package/src/storage/storage-repo.ts +311 -73
- package/src/storage/struct.ts +58 -0
- package/src/testing/mesh-harness.ts +329 -115
package/dist/src/repo/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { blockIdsForTransforms
|
|
1
|
+
import { blockIdsForTransforms } from "@optimystic/db-core";
|
|
2
2
|
import { ProtocolClient } from "../protocol-client.js";
|
|
3
3
|
import { MAX_BLOCK_MESSAGE_BYTES } from "../protocol-limits.js";
|
|
4
4
|
import { peerIdFromString } from "@libp2p/peer-id";
|
|
@@ -59,9 +59,28 @@ export class RepoClient extends ProtocolClient {
|
|
|
59
59
|
// ResponseTimeoutError and mask the caller-facing 'RepoClient timeout' message.
|
|
60
60
|
const deadlineController = new AbortController();
|
|
61
61
|
const timer = setTimeout(() => deadlineController.abort(new Error('RepoClient timeout')), deadlineMs);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
// Explicit combinator rather than the native `AbortSignal.any`, which Hermes
|
|
63
|
+
// (React Native's JS engine) does not provide. This has to forward whichever
|
|
64
|
+
// source signal's *reason* fired — that's how the caller-facing 'RepoClient
|
|
65
|
+
// timeout' message above (and any reason a caller's own `options.signal` carries)
|
|
66
|
+
// survives the combine. `any-signal` (the package libp2p itself uses for this) was
|
|
67
|
+
// tried and rejected here: it calls the composite `AbortController.abort()` with no
|
|
68
|
+
// argument, which discards the source reason and replaces it with a generic
|
|
69
|
+
// AbortError — confirmed against both Node's native `AbortSignal.any` and
|
|
70
|
+
// `any-signal@4.1.1` directly. Listeners are removed in the `finally` below so a
|
|
71
|
+
// long-lived caller `options.signal` never accumulates one per call.
|
|
72
|
+
const abortController = new AbortController();
|
|
73
|
+
const forwardAbort = (source) => () => abortController.abort(source.reason);
|
|
74
|
+
const onCallerAbort = options?.signal ? forwardAbort(options.signal) : undefined;
|
|
75
|
+
const onDeadlineAbort = forwardAbort(deadlineController.signal);
|
|
76
|
+
deadlineController.signal.addEventListener('abort', onDeadlineAbort, { once: true });
|
|
77
|
+
if (options?.signal) {
|
|
78
|
+
if (options.signal.aborted)
|
|
79
|
+
abortController.abort(options.signal.reason);
|
|
80
|
+
else
|
|
81
|
+
options.signal.addEventListener('abort', onCallerAbort, { once: true });
|
|
82
|
+
}
|
|
83
|
+
const combinedSignal = abortController.signal;
|
|
65
84
|
let response;
|
|
66
85
|
try {
|
|
67
86
|
response = await super.processMessage(message, preferred, {
|
|
@@ -74,6 +93,9 @@ export class RepoClient extends ProtocolClient {
|
|
|
74
93
|
}
|
|
75
94
|
finally {
|
|
76
95
|
clearTimeout(timer);
|
|
96
|
+
deadlineController.signal.removeEventListener('abort', onDeadlineAbort);
|
|
97
|
+
if (onCallerAbort)
|
|
98
|
+
options?.signal?.removeEventListener('abort', onCallerAbort);
|
|
77
99
|
}
|
|
78
100
|
// Type the redirect branch against the payload the service actually produces
|
|
79
101
|
// (`RedirectPayload`) rather than reading it off the `any` response — the untyped read
|
|
@@ -94,50 +116,37 @@ export class RepoClient extends ProtocolClient {
|
|
|
94
116
|
// notice we get that this peer matters, and if it is relay-only we have no address
|
|
95
117
|
// for it at all. Merging after the dial would help only some later hop.
|
|
96
118
|
this.peerNetwork.recordPeerAddresses?.(nextId, next.addrs ?? []);
|
|
97
|
-
//
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
119
|
+
// Cache hint: a follow-up op on this block can dial the target directly.
|
|
120
|
+
const coordinated = this.coordinatedBlockId(operations);
|
|
121
|
+
if (coordinated)
|
|
122
|
+
this.recordCoordinatorHint(coordinated, nextId);
|
|
101
123
|
// single-hop retry against target peer using repo protocol
|
|
102
124
|
const nextClient = RepoClient.create(nextId, this.peerNetwork, this.protocolPrefix);
|
|
103
125
|
return await nextClient.processRepoMessage(operations, options, hop + 1);
|
|
104
126
|
}
|
|
105
127
|
return response;
|
|
106
128
|
}
|
|
107
|
-
|
|
129
|
+
/**
|
|
130
|
+
* The block a redirected op is coordinated on — the block `RepoService.deriveBlockKey` redirected
|
|
131
|
+
* it by, and so the block its coordinator hint belongs to.
|
|
132
|
+
*/
|
|
133
|
+
coordinatedBlockId(ops) {
|
|
108
134
|
const op = ops[0];
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
if ('commit' in op) {
|
|
124
|
-
// Anchor on blockIds[0] (where CoordinatorRepo.commit runs consensus +
|
|
125
|
-
// verifyResponsibility), NOT tailId — they differ for a non-tail batch.
|
|
126
|
-
const id = op.commit.blockIds[0];
|
|
127
|
-
return id ? await blockIdToBytes(id) : undefined;
|
|
128
|
-
}
|
|
129
|
-
if ('cancel' in op) {
|
|
130
|
-
const id = op.cancel.actionRef.blockIds[0];
|
|
131
|
-
return id ? await blockIdToBytes(id) : undefined;
|
|
132
|
-
}
|
|
135
|
+
if (!op)
|
|
136
|
+
return undefined;
|
|
137
|
+
if ('get' in op)
|
|
138
|
+
return op.get.blockIds[0];
|
|
139
|
+
// Key on a real block id the pend touches, NOT a structural transforms field
|
|
140
|
+
// name ('inserts'/'updates'/'deletes'); see RepoService.deriveBlockKey.
|
|
141
|
+
if ('pend' in op)
|
|
142
|
+
return blockIdsForTransforms(op.pend.transforms)[0];
|
|
143
|
+
// Anchor on blockIds[0] (where CoordinatorRepo.commit runs consensus +
|
|
144
|
+
// verifyResponsibility), NOT tailId — they differ for a non-tail batch.
|
|
145
|
+
if ('commit' in op)
|
|
146
|
+
return op.commit.blockIds[0];
|
|
147
|
+
if ('cancel' in op)
|
|
148
|
+
return op.cancel.actionRef.blockIds[0];
|
|
133
149
|
return undefined;
|
|
134
150
|
}
|
|
135
|
-
async recordCoordinatorForOpsIfSupported(ops, peerId) {
|
|
136
|
-
const keyBytes = await this.extractKeyFromOperations(ops);
|
|
137
|
-
const pn = this.peerNetwork;
|
|
138
|
-
if (keyBytes != null && typeof pn?.recordCoordinator === 'function') {
|
|
139
|
-
pn.recordCoordinator(keyBytes, peerId);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
151
|
}
|
|
143
152
|
//# sourceMappingURL=client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/repo/client.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/repo/client.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,OAAO,UAAW,SAAQ,cAAc;IAC2B;IAAxE,YAAoB,MAAc,EAAE,WAAyB,EAAW,cAAuB;QAC9F,KAAK,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAD4C,mBAAc,GAAd,cAAc,CAAS;IAE/F,CAAC;IAED,mCAAmC;IAC5B,MAAM,CAAC,MAAM,CAAC,MAAc,EAAE,WAAyB,EAAE,cAAuB;QACtF,OAAO,IAAI,UAAU,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;IAC5D,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,SAAoB,EAAE,OAAuB;QACtD,OAAO,IAAI,CAAC,kBAAkB,CAC7B,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,EACpB,OAAO,CACP,CAAC;IACH,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAAoB,EAAE,OAAuB;QACvD,OAAO,IAAI,CAAC,kBAAkB,CAC7B,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EACnB,OAAO,CACP,CAAC;IACH,CAAC;IAED,KAAK,CAAC,MAAM,CA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,CAAC,CAAC;QACjD,IAAI,QAAQ,IAAI,EAAE;YAAE,OAAO,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC3D,OAAO,SAAS,CAAC;IAClB,CAAC;CAED"}
|
|
@@ -43,6 +43,29 @@ export declare class ConflictRaceLostError extends Error {
|
|
|
43
43
|
/** peerId → messageHash of the rival transaction that member holds as the race winner. */
|
|
44
44
|
conflicts: Record<string, string>);
|
|
45
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* The transaction's pend could not proceed because one or more members answered with a signed `held`
|
|
48
|
+
* vote: the requested blocks are reserved by a different unresolved action in that member's durable
|
|
49
|
+
* storage. Sibling of {@link ConflictRaceLostError} and retryable for the same reason — nobody judged
|
|
50
|
+
* this write invalid; it queued behind a reservation that disappears when the holder commits or
|
|
51
|
+
* cancels.
|
|
52
|
+
*
|
|
53
|
+
* The two are separate because they name different things. A conflict vote names the winning rival's
|
|
54
|
+
* `messageHash`, which the member holds whole; a held vote can only name the rival's **action id**,
|
|
55
|
+
* because it fires in the window where the rival has left the member's in-memory table but not yet its
|
|
56
|
+
* storage. `CoordinatorRepo.pend` converts this into a `StaleFailure` with `conflict: true` so the
|
|
57
|
+
* normal retry machinery (`isConflictFailure`) absorbs it, exactly as it does a lost race.
|
|
58
|
+
*
|
|
59
|
+
* Only a PEND record can produce it: `held` votes come from `ClusterMember.validatePendOperations`,
|
|
60
|
+
* which inspects pend operations only, so `CoordinatorRepo.commit` never meets one.
|
|
61
|
+
*/
|
|
62
|
+
export declare class BlocksHeldError extends Error {
|
|
63
|
+
/** peerId → actionId of the unresolved action that member's storage says holds the blocks. */
|
|
64
|
+
readonly heldBy: Record<string, string>;
|
|
65
|
+
constructor(message: string,
|
|
66
|
+
/** peerId → actionId of the unresolved action that member's storage says holds the blocks. */
|
|
67
|
+
heldBy: Record<string, string>);
|
|
68
|
+
}
|
|
46
69
|
/** Cancel handle for an injected timer; cancels a not-yet-fired timer (safe no-op after fire/cancel). */
|
|
47
70
|
export type TimerCancel = () => void;
|
|
48
71
|
/**
|
|
@@ -57,6 +80,19 @@ export interface ClusterCoordinatorClock {
|
|
|
57
80
|
setTimer?: (fn: () => void, delayMs: number) => TimerCancel;
|
|
58
81
|
}
|
|
59
82
|
/** Manages distributed transactions across clusters */
|
|
83
|
+
/**
|
|
84
|
+
* What a cohort lookup established about a block's cohort. `resolved: false` covers BOTH a lookup
|
|
85
|
+
* that threw and one that answered with nobody: neither names a destination for a write, and the
|
|
86
|
+
* durability class both produce is the same (`unrouted`). `reason` is for logs only — never branch
|
|
87
|
+
* on it.
|
|
88
|
+
*/
|
|
89
|
+
export type CohortResolution = {
|
|
90
|
+
readonly resolved: true;
|
|
91
|
+
readonly peerIds: readonly string[];
|
|
92
|
+
} | {
|
|
93
|
+
readonly resolved: false;
|
|
94
|
+
readonly reason: string;
|
|
95
|
+
};
|
|
60
96
|
export declare class ClusterCoordinator {
|
|
61
97
|
private readonly keyNetwork;
|
|
62
98
|
/** Factory for a per-peer cluster RPC handle; only `update` is ever called, hence `ICluster`. */
|
|
@@ -116,9 +152,45 @@ export declare class ClusterCoordinator {
|
|
|
116
152
|
*/
|
|
117
153
|
private createMessageHash;
|
|
118
154
|
/**
|
|
119
|
-
*
|
|
155
|
+
* The ONE cohort lookup every accessor on this class derives from: the raw peer map when the key
|
|
156
|
+
* network answered, otherwise the reason it did not. A thrown `findCluster` is logged here and
|
|
157
|
+
* nowhere else. Callers that need the map (`executeClusterTransaction`, which builds the record's
|
|
158
|
+
* `peers`) go through {@link getClusterForBlock}; callers that need to know whether the cohort
|
|
159
|
+
* RESOLVED go through {@link resolveCohort}.
|
|
160
|
+
*/
|
|
161
|
+
private lookupCluster;
|
|
162
|
+
/**
|
|
163
|
+
* Gets all peers in the cluster for a specific block ID. Empty when the lookup failed — the
|
|
164
|
+
* consensus path treats "no cohort" and "lookup failed" alike (there is nobody to run consensus
|
|
165
|
+
* with either way); a caller that must tell them apart uses {@link resolveCohort}.
|
|
120
166
|
*/
|
|
121
167
|
private getClusterForBlock;
|
|
168
|
+
/**
|
|
169
|
+
* Whether the block's cohort could be established, and who it is. The primitive behind
|
|
170
|
+
* {@link getClusterPeerIds} and {@link getClusterSize}: a lookup that threw and a lookup that named
|
|
171
|
+
* nobody used to reach every caller as the same empty list, and `CoordinatorRepo`'s solo
|
|
172
|
+
* short-circuit then acknowledged a write it had no idea where to send exactly as it acknowledged a
|
|
173
|
+
* write to a genuine cohort of one (GitHub #19). Both shapes are still `resolved: false` here —
|
|
174
|
+
* neither names a destination — but they are distinguishable from a resolved cohort, which is what
|
|
175
|
+
* the write's durability class needs (`unrouted` vs `local`).
|
|
176
|
+
*/
|
|
177
|
+
resolveCohort(blockId: BlockId): Promise<CohortResolution>;
|
|
178
|
+
/**
|
|
179
|
+
* A node never runs a cluster transaction for a cohort it is not in. Behind members reconcile from the
|
|
180
|
+
* coordinator's own proof-carrying copy (its member applies before the merged record fans out), and a
|
|
181
|
+
* coordinator outside `record.peers` is not a reconcile target — so a cohort with no holder would stay
|
|
182
|
+
* behind and the commit durability gate would refuse, having first put this node's vote and storage
|
|
183
|
+
* where the cohort does not look. The invariant is held here, at the one place a record's `peers` is
|
|
184
|
+
* chosen, rather than left to the routing convention.
|
|
185
|
+
*
|
|
186
|
+
* Fires only on a RESOLVED cohort (at least one peer) that excludes the wired local member. An empty
|
|
187
|
+
* cohort is a failed lookup, not a cohort this node is outside of, so it is left to `executeTransaction`'s
|
|
188
|
+
* size checks; `CoordinatorRepo`'s solo short-circuit keeps unresolved and single-peer cohorts away from
|
|
189
|
+
* this method altogether in any case. After its responsibility check, what remains is a multi-member
|
|
190
|
+
* cohort that changed inside the responsibility cache's staleness window. With no local member wired the guard does not apply: that
|
|
191
|
+
* bypass exists for wiring without an identity (direct constructors, some tests), never for production.
|
|
192
|
+
*/
|
|
193
|
+
private assertLocalMemberInCohort;
|
|
122
194
|
private makeRecord;
|
|
123
195
|
/**
|
|
124
196
|
* Initiates a 2-phase transaction for a specific block ID.
|
|
@@ -157,16 +229,34 @@ export declare class ClusterCoordinator {
|
|
|
157
229
|
cohortPendRefusals?: {
|
|
158
230
|
[peerId: string]: StaleFailure;
|
|
159
231
|
};
|
|
232
|
+
/**
|
|
233
|
+
* What OTHER cohort members reported about durably holding a commit after applying it at
|
|
234
|
+
* consensus (`ClusterRecord.applyOutcomes[peer].commit`), keyed by peer id — successes AND
|
|
235
|
+
* refusals, because `CoordinatorRepo.commit`'s durability gate counts the successes against
|
|
236
|
+
* the cohort the commit ran on and acknowledges only a majority. Each member's verdict is
|
|
237
|
+
* measured after its own reconcile, so a member that pulled the revision from a cohort peer
|
|
238
|
+
* reports success. Self is excluded for the same reason as `cohortPendRefusals` (its verdict
|
|
239
|
+
* travels as `localCommitResult`). Unsigned advisory data: a false success is one holder the
|
|
240
|
+
* member's signed approve vote already admitted to the majority; a false refusal is retry
|
|
241
|
+
* pressure. Absent when nobody reported one (a pend message, or pre-upgrade members).
|
|
242
|
+
*
|
|
243
|
+
* Same residual as `cohortPendRefusals`: a member reached only by the scheduled commit-retry
|
|
244
|
+
* timer applies after this method has resolved, and its report arrives too late to count —
|
|
245
|
+
* the gate then refuses honestly and the writer re-drives.
|
|
246
|
+
*/
|
|
247
|
+
cohortCommitOutcomes?: {
|
|
248
|
+
[peerId: string]: CommitResult;
|
|
249
|
+
};
|
|
160
250
|
}>;
|
|
161
251
|
/**
|
|
162
252
|
* Executes the full transaction process
|
|
163
253
|
*/
|
|
164
254
|
private executeTransaction;
|
|
165
255
|
/**
|
|
166
|
-
* The block's cohort peer ids as currently derivable. Empty when
|
|
167
|
-
* (
|
|
168
|
-
* the degraded-routing branch
|
|
169
|
-
*
|
|
256
|
+
* The block's cohort peer ids as currently derivable. Empty when the cohort did not resolve
|
|
257
|
+
* ({@link resolveCohort}: `findCluster` threw, or named nobody), so a caller branching on
|
|
258
|
+
* `length <= 1` is also taking the degraded-routing branch. Derived from `resolveCohort` rather
|
|
259
|
+
* than re-deriving the cohort, so there is exactly one lookup rule.
|
|
170
260
|
*/
|
|
171
261
|
getClusterPeerIds(blockId: BlockId): Promise<string[]>;
|
|
172
262
|
/** {@link getClusterPeerIds}, counted. Derived from it rather than re-deriving the cohort, so the
|
|
@@ -191,6 +281,30 @@ export declare class ClusterCoordinator {
|
|
|
191
281
|
* the prior commit phase is typically still warm, so a single immediate retry recovers
|
|
192
282
|
* most transient stream errors without falling back to the scheduled retry timer.
|
|
193
283
|
* Local cluster is invoked exactly once — local failures are fatal, not transient.
|
|
284
|
+
*
|
|
285
|
+
* **Delivery order is load-bearing: this node's own member first, awaited, then the remote
|
|
286
|
+
* members in parallel.** This broadcast is where members apply the commit, and a member that is
|
|
287
|
+
* behind (it never saw the pend, or holds no base for the block) reconciles the committed
|
|
288
|
+
* revision from `record.peers` DURING its apply. The coordinator's own member is the one peer
|
|
289
|
+
* guaranteed to hold the revision by then — provided it has actually applied, which a single
|
|
290
|
+
* `Promise.all` over every peer did not guarantee: the remote members' reconciles raced the
|
|
291
|
+
* local apply and found no holder. Its copy also carries the cohort's commit proof
|
|
292
|
+
* (`buildBlockCommitProof`), which `createReconcileBlock` accepts from a single holder, so a
|
|
293
|
+
* whole cohort of behind members can heal from it. The cost is one in-process apply before the
|
|
294
|
+
* network fan-out; no extra round trip. The commit round in `commitTransaction` may stay
|
|
295
|
+
* parallel: on the first pass the record it carries has no commit signatures yet, so no member
|
|
296
|
+
* can reach consensus (and apply) there. The scheduled retry (`retryCommits`) does re-send a
|
|
297
|
+
* record that already carries them, in parallel — but by then this node's member applied in the
|
|
298
|
+
* first broadcast unless it was itself among the failed deliveries, which is the retry residual
|
|
299
|
+
* documented on `executeClusterTransaction`. A coordinator outside `record.peers` is not a
|
|
300
|
+
* reconcile target and gains nothing from this ordering; the durability gate in
|
|
301
|
+
* `CoordinatorRepo.commit` is what makes that shape refuse rather than acknowledge.
|
|
302
|
+
*
|
|
303
|
+
* NOTE: when the coordinating member is ITSELF behind (it never saw the pend), its reconcile
|
|
304
|
+
* runs here before any remote member has applied, finds no holder, and reports not-durable; the
|
|
305
|
+
* remote members then apply and may carry the majority on their own. Fine while the coordinator
|
|
306
|
+
* ordinarily saw the pend; if coordinators are routinely picked after the pend phase, deliver
|
|
307
|
+
* local-first only when the local member holds the pend, or reconcile it once more afterwards.
|
|
194
308
|
*/
|
|
195
309
|
private broadcastMergedRecord;
|
|
196
310
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cluster-coordinator.d.ts","sourceRoot":"","sources":["../../../src/repo/cluster-coordinator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAgB,cAAc,EAAE,sBAAsB,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGpM,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"cluster-coordinator.d.ts","sourceRoot":"","sources":["../../../src/repo/cluster-coordinator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAgB,cAAc,EAAE,sBAAsB,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGpM,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,KAAK,EAAE,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