@optimystic/db-p2p 1.0.0-beta.3 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/dist/src/cluster/block-transfer-service.d.ts +73 -1
  2. package/dist/src/cluster/block-transfer-service.d.ts.map +1 -1
  3. package/dist/src/cluster/block-transfer-service.js +70 -3
  4. package/dist/src/cluster/block-transfer-service.js.map +1 -1
  5. package/dist/src/cluster/block-transfer.d.ts +16 -1
  6. package/dist/src/cluster/block-transfer.d.ts.map +1 -1
  7. package/dist/src/cluster/block-transfer.js +73 -72
  8. package/dist/src/cluster/block-transfer.js.map +1 -1
  9. package/dist/src/cluster/client.d.ts +4 -6
  10. package/dist/src/cluster/client.d.ts.map +1 -1
  11. package/dist/src/cluster/client.js +8 -13
  12. package/dist/src/cluster/client.js.map +1 -1
  13. package/dist/src/cluster/cluster-policy.d.ts +2 -1
  14. package/dist/src/cluster/cluster-policy.d.ts.map +1 -1
  15. package/dist/src/cluster/cluster-policy.js.map +1 -1
  16. package/dist/src/cluster/cluster-repo.d.ts +155 -9
  17. package/dist/src/cluster/cluster-repo.d.ts.map +1 -1
  18. package/dist/src/cluster/cluster-repo.js +446 -58
  19. package/dist/src/cluster/cluster-repo.js.map +1 -1
  20. package/dist/src/cluster/commit-proof.js +2 -2
  21. package/dist/src/cluster/race-resolution.d.ts +51 -7
  22. package/dist/src/cluster/race-resolution.d.ts.map +1 -1
  23. package/dist/src/cluster/race-resolution.js +71 -7
  24. package/dist/src/cluster/race-resolution.js.map +1 -1
  25. package/dist/src/cluster/rebalance-monitor.d.ts +67 -5
  26. package/dist/src/cluster/rebalance-monitor.d.ts.map +1 -1
  27. package/dist/src/cluster/rebalance-monitor.js +120 -26
  28. package/dist/src/cluster/rebalance-monitor.js.map +1 -1
  29. package/dist/src/cluster/spread-on-churn.d.ts.map +1 -1
  30. package/dist/src/cluster/spread-on-churn.js +34 -47
  31. package/dist/src/cluster/spread-on-churn.js.map +1 -1
  32. package/dist/src/cohort-topic/host.d.ts.map +1 -1
  33. package/dist/src/cohort-topic/host.js +8 -6
  34. package/dist/src/cohort-topic/host.js.map +1 -1
  35. package/dist/src/cohort-topic/membership-source.js +1 -1
  36. package/dist/src/cohort-topic/membership-source.js.map +1 -1
  37. package/dist/src/cohort-topic/peer-codec.d.ts.map +1 -1
  38. package/dist/src/cohort-topic/peer-codec.js +5 -2
  39. package/dist/src/cohort-topic/peer-codec.js.map +1 -1
  40. package/dist/src/cohort-topic/stream-util.d.ts +24 -3
  41. package/dist/src/cohort-topic/stream-util.d.ts.map +1 -1
  42. package/dist/src/cohort-topic/stream-util.js +36 -3
  43. package/dist/src/cohort-topic/stream-util.js.map +1 -1
  44. package/dist/src/cohort-topic/topic-router.d.ts +9 -0
  45. package/dist/src/cohort-topic/topic-router.d.ts.map +1 -1
  46. package/dist/src/cohort-topic/topic-router.js +12 -2
  47. package/dist/src/cohort-topic/topic-router.js.map +1 -1
  48. package/dist/src/dispute/client.d.ts.map +1 -1
  49. package/dist/src/dispute/client.js +15 -3
  50. package/dist/src/dispute/client.js.map +1 -1
  51. package/dist/src/index.d.ts +5 -0
  52. package/dist/src/index.d.ts.map +1 -1
  53. package/dist/src/index.js +5 -0
  54. package/dist/src/index.js.map +1 -1
  55. package/dist/src/libp2p-key-network.d.ts +78 -17
  56. package/dist/src/libp2p-key-network.d.ts.map +1 -1
  57. package/dist/src/libp2p-key-network.js +234 -147
  58. package/dist/src/libp2p-key-network.js.map +1 -1
  59. package/dist/src/libp2p-node-base.d.ts +35 -1
  60. package/dist/src/libp2p-node-base.d.ts.map +1 -1
  61. package/dist/src/libp2p-node-base.js +151 -26
  62. package/dist/src/libp2p-node-base.js.map +1 -1
  63. package/dist/src/libp2p-node-rn.d.ts +2 -2
  64. package/dist/src/libp2p-node-rn.d.ts.map +1 -1
  65. package/dist/src/libp2p-node-rn.js.map +1 -1
  66. package/dist/src/libp2p-node.d.ts +2 -2
  67. package/dist/src/libp2p-node.d.ts.map +1 -1
  68. package/dist/src/libp2p-node.js.map +1 -1
  69. package/dist/src/logger.d.ts.map +1 -1
  70. package/dist/src/logger.js +6 -1
  71. package/dist/src/logger.js.map +1 -1
  72. package/dist/src/matchmaking/query-transport.d.ts +3 -4
  73. package/dist/src/matchmaking/query-transport.d.ts.map +1 -1
  74. package/dist/src/matchmaking/query-transport.js +9 -9
  75. package/dist/src/matchmaking/query-transport.js.map +1 -1
  76. package/dist/src/network/network-manager-service.d.ts +10 -5
  77. package/dist/src/network/network-manager-service.d.ts.map +1 -1
  78. package/dist/src/network/network-manager-service.js +11 -2
  79. package/dist/src/network/network-manager-service.js.map +1 -1
  80. package/dist/src/network/relay-reservation.d.ts +170 -0
  81. package/dist/src/network/relay-reservation.d.ts.map +1 -0
  82. package/dist/src/network/relay-reservation.js +527 -0
  83. package/dist/src/network/relay-reservation.js.map +1 -0
  84. package/dist/src/pend-validation.d.ts +3 -2
  85. package/dist/src/pend-validation.d.ts.map +1 -1
  86. package/dist/src/pend-validation.js +3 -2
  87. package/dist/src/pend-validation.js.map +1 -1
  88. package/dist/src/protocol-client.d.ts +8 -1
  89. package/dist/src/protocol-client.d.ts.map +1 -1
  90. package/dist/src/protocol-client.js +11 -0
  91. package/dist/src/protocol-client.js.map +1 -1
  92. package/dist/src/reactivity/forwarder-host.d.ts +2 -1
  93. package/dist/src/reactivity/forwarder-host.d.ts.map +1 -1
  94. package/dist/src/reactivity/forwarder-host.js +2 -1
  95. package/dist/src/reactivity/forwarder-host.js.map +1 -1
  96. package/dist/src/reactivity/origination-manager.d.ts +3 -3
  97. package/dist/src/reactivity/origination-manager.js +3 -3
  98. package/dist/src/reactivity/recover-transport.d.ts +22 -14
  99. package/dist/src/reactivity/recover-transport.d.ts.map +1 -1
  100. package/dist/src/reactivity/recover-transport.js +32 -19
  101. package/dist/src/reactivity/recover-transport.js.map +1 -1
  102. package/dist/src/reactivity/subscription-manager.d.ts +2 -2
  103. package/dist/src/reactivity/topic-bytes.d.ts +6 -7
  104. package/dist/src/reactivity/topic-bytes.d.ts.map +1 -1
  105. package/dist/src/reactivity/topic-bytes.js +8 -9
  106. package/dist/src/reactivity/topic-bytes.js.map +1 -1
  107. package/dist/src/repo/client.d.ts +5 -2
  108. package/dist/src/repo/client.d.ts.map +1 -1
  109. package/dist/src/repo/client.js +49 -40
  110. package/dist/src/repo/client.js.map +1 -1
  111. package/dist/src/repo/cluster-coordinator.d.ts +96 -11
  112. package/dist/src/repo/cluster-coordinator.d.ts.map +1 -1
  113. package/dist/src/repo/cluster-coordinator.js +164 -25
  114. package/dist/src/repo/cluster-coordinator.js.map +1 -1
  115. package/dist/src/repo/coordinator-repo.d.ts +240 -122
  116. package/dist/src/repo/coordinator-repo.d.ts.map +1 -1
  117. package/dist/src/repo/coordinator-repo.js +627 -473
  118. package/dist/src/repo/coordinator-repo.js.map +1 -1
  119. package/dist/src/repo/i-under-replication-ledger.d.ts +87 -0
  120. package/dist/src/repo/i-under-replication-ledger.d.ts.map +1 -0
  121. package/dist/src/repo/i-under-replication-ledger.js +2 -0
  122. package/dist/src/repo/i-under-replication-ledger.js.map +1 -0
  123. package/dist/src/repo/kv-under-replication-ledger.d.ts +91 -0
  124. package/dist/src/repo/kv-under-replication-ledger.d.ts.map +1 -0
  125. package/dist/src/repo/kv-under-replication-ledger.js +287 -0
  126. package/dist/src/repo/kv-under-replication-ledger.js.map +1 -0
  127. package/dist/src/repo/responsibility.d.ts +37 -0
  128. package/dist/src/repo/responsibility.d.ts.map +1 -0
  129. package/dist/src/repo/responsibility.js +37 -0
  130. package/dist/src/repo/responsibility.js.map +1 -0
  131. package/dist/src/repo/service.d.ts +44 -15
  132. package/dist/src/repo/service.d.ts.map +1 -1
  133. package/dist/src/repo/service.js +64 -27
  134. package/dist/src/repo/service.js.map +1 -1
  135. package/dist/src/repo/stuck-reservation.d.ts +127 -0
  136. package/dist/src/repo/stuck-reservation.d.ts.map +1 -0
  137. package/dist/src/repo/stuck-reservation.js +179 -0
  138. package/dist/src/repo/stuck-reservation.js.map +1 -0
  139. package/dist/src/repo/under-replication-drain.d.ts +208 -0
  140. package/dist/src/repo/under-replication-drain.d.ts.map +1 -0
  141. package/dist/src/repo/under-replication-drain.js +461 -0
  142. package/dist/src/repo/under-replication-drain.js.map +1 -0
  143. package/dist/src/rn.d.ts +5 -0
  144. package/dist/src/rn.d.ts.map +1 -1
  145. package/dist/src/rn.js +5 -0
  146. package/dist/src/rn.js.map +1 -1
  147. package/dist/src/storage/block-latch.d.ts +3 -2
  148. package/dist/src/storage/block-latch.d.ts.map +1 -1
  149. package/dist/src/storage/block-latch.js +7 -4
  150. package/dist/src/storage/block-latch.js.map +1 -1
  151. package/dist/src/storage/block-storage.d.ts +45 -3
  152. package/dist/src/storage/block-storage.d.ts.map +1 -1
  153. package/dist/src/storage/block-storage.js +156 -9
  154. package/dist/src/storage/block-storage.js.map +1 -1
  155. package/dist/src/storage/i-block-storage.d.ts +57 -5
  156. package/dist/src/storage/i-block-storage.d.ts.map +1 -1
  157. package/dist/src/storage/i-block-storage.js.map +1 -1
  158. package/dist/src/storage/pending-claim.d.ts +167 -0
  159. package/dist/src/storage/pending-claim.d.ts.map +1 -0
  160. package/dist/src/storage/pending-claim.js +156 -0
  161. package/dist/src/storage/pending-claim.js.map +1 -0
  162. package/dist/src/storage/raw-store-codec.d.ts +13 -0
  163. package/dist/src/storage/raw-store-codec.d.ts.map +1 -1
  164. package/dist/src/storage/raw-store-codec.js +24 -3
  165. package/dist/src/storage/raw-store-codec.js.map +1 -1
  166. package/dist/src/storage/restoration-coordinator.d.ts.map +1 -1
  167. package/dist/src/storage/restoration-coordinator.js +2 -1
  168. package/dist/src/storage/restoration-coordinator.js.map +1 -1
  169. package/dist/src/storage/ring-shift-coordinator.d.ts.map +1 -1
  170. package/dist/src/storage/ring-shift-coordinator.js +3 -3
  171. package/dist/src/storage/ring-shift-coordinator.js.map +1 -1
  172. package/dist/src/storage/storage-repo.d.ts +122 -5
  173. package/dist/src/storage/storage-repo.d.ts.map +1 -1
  174. package/dist/src/storage/storage-repo.js +245 -68
  175. package/dist/src/storage/storage-repo.js.map +1 -1
  176. package/dist/src/storage/struct.d.ts +58 -0
  177. package/dist/src/storage/struct.d.ts.map +1 -1
  178. package/dist/src/testing/mesh-harness.d.ts +77 -11
  179. package/dist/src/testing/mesh-harness.d.ts.map +1 -1
  180. package/dist/src/testing/mesh-harness.js +226 -100
  181. package/dist/src/testing/mesh-harness.js.map +1 -1
  182. package/package.json +2 -2
  183. package/readme.md +27 -3
  184. package/src/cluster/block-transfer-service.ts +132 -4
  185. package/src/cluster/block-transfer.ts +79 -84
  186. package/src/cluster/client.ts +115 -119
  187. package/src/cluster/cluster-policy.ts +2 -1
  188. package/src/cluster/cluster-repo.ts +493 -65
  189. package/src/cluster/commit-proof.ts +2 -2
  190. package/src/cluster/race-resolution.ts +76 -7
  191. package/src/cluster/rebalance-monitor.ts +677 -539
  192. package/src/cluster/spread-on-churn.ts +34 -54
  193. package/src/cohort-topic/host.ts +8 -6
  194. package/src/cohort-topic/membership-source.ts +1 -1
  195. package/src/cohort-topic/peer-codec.ts +34 -31
  196. package/src/cohort-topic/stream-util.ts +39 -4
  197. package/src/cohort-topic/topic-router.ts +12 -2
  198. package/src/dispute/client.ts +17 -7
  199. package/src/index.ts +64 -59
  200. package/src/libp2p-key-network.ts +1377 -1260
  201. package/src/libp2p-node-base.ts +186 -27
  202. package/src/libp2p-node-rn.ts +31 -30
  203. package/src/libp2p-node.ts +37 -36
  204. package/src/logger.ts +6 -1
  205. package/src/matchmaking/query-transport.ts +9 -9
  206. package/src/network/network-manager-service.ts +16 -5
  207. package/src/network/relay-reservation.ts +636 -0
  208. package/src/pend-validation.ts +3 -2
  209. package/src/protocol-client.ts +13 -1
  210. package/src/reactivity/forwarder-host.ts +2 -1
  211. package/src/reactivity/origination-manager.ts +3 -3
  212. package/src/reactivity/recover-transport.ts +39 -22
  213. package/src/reactivity/subscription-manager.ts +2 -2
  214. package/src/reactivity/topic-bytes.ts +35 -37
  215. package/src/repo/client.ts +172 -173
  216. package/src/repo/cluster-coordinator.ts +183 -25
  217. package/src/repo/coordinator-repo.ts +656 -506
  218. package/src/repo/i-under-replication-ledger.ts +89 -0
  219. package/src/repo/kv-under-replication-ledger.ts +302 -0
  220. package/src/repo/responsibility.ts +48 -0
  221. package/src/repo/service.ts +76 -39
  222. package/src/repo/stuck-reservation.ts +224 -0
  223. package/src/repo/under-replication-drain.ts +582 -0
  224. package/src/rn.ts +74 -69
  225. package/src/storage/block-latch.ts +7 -4
  226. package/src/storage/block-storage.ts +161 -10
  227. package/src/storage/i-block-storage.ts +60 -5
  228. package/src/storage/pending-claim.ts +200 -0
  229. package/src/storage/raw-store-codec.ts +26 -3
  230. package/src/storage/restoration-coordinator.ts +212 -211
  231. package/src/storage/ring-shift-coordinator.ts +271 -271
  232. package/src/storage/storage-repo.ts +280 -72
  233. package/src/storage/struct.ts +58 -0
  234. package/src/testing/mesh-harness.ts +293 -112
@@ -1,4 +1,4 @@
1
- import { blockIdToBytes, blockIdsForTransforms } from '@optimystic/db-core';
1
+ import { blockIdsForTransforms } from '@optimystic/db-core';
2
2
  import { ProtocolClient } from '../protocol-client.js';
3
3
  import { peerIdFromString } from '@libp2p/peer-id';
4
4
  import { isClusterErrorEnvelope, clusterErrorFromEnvelope } from './cluster-error.js';
@@ -55,7 +55,7 @@ export class ClusterClient extends ProtocolClient {
55
55
  // notice we get that this peer matters, and if it is relay-only we have no address
56
56
  // for it at all. Merging after the dial would help only some later hop.
57
57
  this.peerNetwork.recordPeerAddresses?.(nextId, next.addrs ?? []);
58
- await this.recordCoordinatorForRecordIfSupported(record, nextId);
58
+ this.recordCoordinatorForRecordIfSupported(record, nextId);
59
59
  const nextClient = ClusterClient.create(nextId, this.peerNetwork, this.protocolPrefix);
60
60
  // Thread the caller's *original* options through the redirect hop (the
61
61
  // recursive call re-applies its own defaults) so the deadline survives a redirect.
@@ -91,14 +91,12 @@ export class ClusterClient extends ProtocolClient {
91
91
  * Reading `record.message.commit`/`.pend` (the old code) always saw
92
92
  * `undefined`, so this hint was dead code and never recorded anything.
93
93
  *
94
- * The key is `blockIdToBytes(<the coordinated block id>)` — the sha256 digest
95
- * findCoordinator/recordCoordinator key the cache on NOT raw utf8 of the id
96
- * (which would never be retrieved). Commit anchors on blockIds[0] (where
97
- * CoordinatorRepo runs consensus + verifyResponsibility), not tailId. Pend
98
- * anchors on a real block id (blockIdsForTransforms), not a structural
99
- * transforms field name. ClusterClient only ever carries commit/pend.
94
+ * Commit anchors on blockIds[0] (where CoordinatorRepo runs consensus +
95
+ * verifyResponsibility), not tailId. Pend anchors on a real block id
96
+ * (blockIdsForTransforms), not a structural transforms field name.
97
+ * ClusterClient only ever carries commit/pend.
100
98
  */
101
- async recordCoordinatorForRecordIfSupported(record, peerId) {
99
+ recordCoordinatorForRecordIfSupported(record, peerId) {
102
100
  const op = record.message.operations[0];
103
101
  if (!op)
104
102
  return;
@@ -109,10 +107,7 @@ export class ClusterClient extends ProtocolClient {
109
107
  id = blockIdsForTransforms(op.pend.transforms)[0];
110
108
  if (id == null)
111
109
  return;
112
- const kbytes = await blockIdToBytes(id);
113
- const pn = this.peerNetwork;
114
- if (typeof pn?.recordCoordinator === 'function')
115
- pn.recordCoordinator(kbytes, peerId);
110
+ this.recordCoordinatorHint(id, peerId);
116
111
  }
117
112
  }
118
113
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/cluster/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEtF,OAAO,EAAE,wBAAwB,EAAE,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MAAM,CAAC,CAAA;IACxC,CAAC;CACF"}
@@ -142,7 +142,8 @@ export interface ClusterPolicyOptions {
142
142
  repairCorroborationClusterSize?: number;
143
143
  /**
144
144
  * What a validator-configured member does with a pend that carries no `validation` payload
145
- * (nothing to re-execute — the single-collection `Collection.sync` shape). Default 'accept';
145
+ * (nothing to re-execute — a single-collection `Collection.sync` pend, or the Quereus
146
+ * adapter's legacy multi-tree commit, which pends through an unvalidated coordinator). Default 'accept';
146
147
  * see {@link UnvalidatablePendPolicy}.
147
148
  */
148
149
  unvalidatablePendPolicy?: UnvalidatablePendPolicy;
@@ -1 +1 @@
1
- {"version":3,"file":"cluster-policy.d.ts","sourceRoot":"","sources":["../../../src/cluster/cluster-policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,sBAAsB,EAAE,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAMlI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACpC;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE;QACf,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,0DAA0D;QAC1D,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,sGAAsG;QACtG,sBAAsB,CAAC,EAAE,MAAM,CAAC;QAChC;;;;;WAKG;QACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;QACvC;;;;;;;;;;;WAWG;QACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B;;;;;;;;;;;;;;;;;;;;;;;;;WAyBG;QACH,8BAA8B,CAAC,EAAE,MAAM,CAAC;QACxC;;;;WAIG;QACH,uBAAuB,CAAC,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,8BAA8B;KAC9B,CAAC;AACH,CAAC"}
@@ -8,6 +8,7 @@ import type { FretService } from "p2p-fret";
8
8
  import type { IPeerReputation } from "../reputation/types.js";
9
9
  import type { ITransactionStateStore } from "./i-transaction-state-store.js";
10
10
  import { type BlockCommitProof } from "./commit-proof.js";
11
+ import type { CommittedHolders } from "./rebalance-monitor.js";
11
12
  /**
12
13
  * Actively reconciles a block this member committed without having seen the matching
13
14
  * pend (cohort drift between the independent pend and commit cluster-transactions).
@@ -29,6 +30,14 @@ export type ReconcileBlockCallback = (blockId: BlockId, committed: ActionRev, co
29
30
  * isolated + logged (it must never break consensus).
30
31
  */
31
32
  export type CommitCertificateSink = (actionId: ActionId, cert: CommitCert) => void;
33
+ /**
34
+ * Sink for who is known to hold a commit this node's own storage durably holds — fed to the rebalance
35
+ * monitor so it does not push freshly committed blocks back to the members that stored them (see
36
+ * `RebalanceMonitor.recordCommittedHolders`). Fired by the member after applying a consensus commit,
37
+ * and by `CoordinatorRepo.commit` when it acknowledges one. Optional; a throwing sink is isolated +
38
+ * logged (it must never break consensus or the writer's answer).
39
+ */
40
+ export type CommittedHoldersSink = (committed: CommittedHolders) => void;
32
41
  /**
33
42
  * Applies a consensus-ordered {@link InvalidateRequest} to local storage — the deterministic
34
43
  * reversal every member runs once consensus on the invalidation is reached. The implementation
@@ -88,6 +97,13 @@ export declare const MEMBERSHIP_NOT_ADMITTED = "membership-not-admitted";
88
97
  * so the rejection itself is integrity-protected.
89
98
  */
90
99
  export declare const CONTENT_DIGEST_MISMATCH = "content-digest-mismatch";
100
+ /**
101
+ * Stable reject reason a member emits when a commit declares, for a block, a base revision
102
+ * (`CommitRequest.blockDigests[id].baseRev`) other than the one the same action's pend carried to
103
+ * this member (`PendRequest.baseRevs`, kept with the pending record) — see
104
+ * `ClusterMember.validateCommitBaseDeclarations`. Signed like its sibling above.
105
+ */
106
+ export declare const BASE_DECLARATION_DISAGREES = "base-declaration-disagrees";
91
107
  /**
92
108
  * The two stable reject reasons a validator-configured member emits from the shared
93
109
  * {@link checkPendValidation}: `PEND_NOT_VALIDATABLE` for a pend carrying no `validation` payload
@@ -112,6 +128,8 @@ interface ClusterMemberComponents {
112
128
  reconcileBlock?: ReconcileBlockCallback;
113
129
  /** Receives the consensus commit cert per committed action; see {@link CommitCertificateSink}. */
114
130
  onCommitCertificate?: CommitCertificateSink;
131
+ /** Receives who holds each consensus commit this member durably applied; see {@link CommittedHoldersSink}. */
132
+ onCommittedHolders?: CommittedHoldersSink;
115
133
  /** Applies a consensus-ordered invalidation to local storage; see {@link InvalidationApplySink}. */
116
134
  onInvalidate?: InvalidationApplySink;
117
135
  /** Layer-2 arbitrator-set recompute for invalidation verification; see {@link RecomputeArbitratorSetCapability}. */
@@ -159,12 +177,22 @@ export declare class ClusterMember implements ICluster {
159
177
  private readonly onInvalidate?;
160
178
  private readonly recomputeArbitratorSet?;
161
179
  private readonly deriveExpectedCluster?;
180
+ private readonly onCommittedHolders?;
162
181
  private activeTransactions;
163
182
  private executedTransactions;
164
183
  private executedPendResults;
165
184
  private executedCommitResults;
185
+ private behindCommitRefusals;
166
186
  private refusedPendActions;
167
187
  private appliedInvalidations;
188
+ /**
189
+ * Per block, what this member's own `held` votes have added up to — the member-side instance of
190
+ * the counter `CoordinatorRepo.noteStuckReservation` keeps from the coordinator's vantage. Fed by
191
+ * every `held` verdict {@link validatePendOperations} casts, so a reservation only THIS member
192
+ * holds (one the coordinator's storage cannot corroborate) is still named, once, where the record
193
+ * lives. Forgotten for a block the moment a vote finds it no longer reserved.
194
+ */
195
+ private readonly stuckReservations;
168
196
  private cleanupQueue;
169
197
  private pendingUpdates;
170
198
  private readonly expirationInterval;
@@ -193,7 +221,7 @@ export declare class ClusterMember implements ICluster {
193
221
  private readonly unvalidatablePendPolicy;
194
222
  /** Clock behind the reservation table's `lastUpdate` — see {@link ClusterMemberComponents.now}. */
195
223
  private readonly now;
196
- constructor(storageRepo: IRepo, peerNetwork: IPeerNetwork, peerId: PeerId, privateKey: PrivateKey, protocolPrefix?: string | undefined, _partitionDetector?: PartitionDetector, fretService?: FretService | undefined, validator?: ITransactionValidator | undefined, reputation?: IPeerReputation | undefined, consensusConfig?: ClusterConsensusConfig, stateStore?: ITransactionStateStore | undefined, reconcileBlock?: ReconcileBlockCallback | undefined, onCommitCertificate?: CommitCertificateSink | undefined, onInvalidate?: InvalidationApplySink | undefined, recomputeArbitratorSet?: RecomputeArbitratorSetCapability | undefined, deriveExpectedCluster?: DeriveExpectedClusterCallback | undefined, now?: () => number);
224
+ constructor(storageRepo: IRepo, peerNetwork: IPeerNetwork, peerId: PeerId, privateKey: PrivateKey, protocolPrefix?: string | undefined, _partitionDetector?: PartitionDetector, fretService?: FretService | undefined, validator?: ITransactionValidator | undefined, reputation?: IPeerReputation | undefined, consensusConfig?: ClusterConsensusConfig, stateStore?: ITransactionStateStore | undefined, reconcileBlock?: ReconcileBlockCallback | undefined, onCommitCertificate?: CommitCertificateSink | undefined, onInvalidate?: InvalidationApplySink | undefined, recomputeArbitratorSet?: RecomputeArbitratorSetCapability | undefined, deriveExpectedCluster?: DeriveExpectedClusterCallback | undefined, now?: () => number, onCommittedHolders?: CommittedHoldersSink | undefined);
197
225
  /**
198
226
  * The resolved super-majority threshold this member runs on. Exposed so the composition root can
199
227
  * fail-fast if the member and the coordinator would run different thresholds (see the coupling
@@ -266,8 +294,9 @@ export declare class ClusterMember implements ICluster {
266
294
  private mergeRecords;
267
295
  /**
268
296
  * Compares existing vs incoming signatures for the same peers.
269
- * If a peer's vote type changed (approve↔reject), that's equivocation:
270
- * report a penalty and keep the first-seen signature.
297
+ * ANY change of vote type is equivocation — the comparison is over `Signature['type']`, so it
298
+ * covers every kind without enumerating them (a new kind joins the check by existing): report a
299
+ * penalty and keep the first-seen signature.
271
300
  * New peers are accepted normally.
272
301
  */
273
302
  private detectEquivocation;
@@ -306,6 +335,13 @@ export declare class ClusterMember implements ICluster {
306
335
  private getTransactionPhase;
307
336
  private hasMajority;
308
337
  private handlePromiseNeeded;
338
+ /**
339
+ * Turn a {@link PromiseVerdict} into this member's signed promise vote — one vote kind per refusal
340
+ * kind. The single place the mapping lives, so a new refusal kind cannot reach the wire as the
341
+ * wrong vote: the coordinator's thresholds read only `Signature.type`, and until `held` existed the
342
+ * transient refusal had nowhere to go but `reject`.
343
+ */
344
+ private signPromiseVerdict;
309
345
  /**
310
346
  * Answer a record that lost the deterministic race to a transaction this member already holds
311
347
  * (`docs/correctness.md` Theorems 1 & 9: the loser is TOLD it lost, not ignored — an unanswered
@@ -318,8 +354,10 @@ export declare class ClusterMember implements ICluster {
318
354
  private handleConflictVoteNeeded;
319
355
  /**
320
356
  * The full promise-phase decision for a record: admit the declared membership FIRST, then (only if
321
- * admitted) validate its pend operations, then its commit operations. Failing any yields a
322
- * `{ valid:false, reason }` the caller turns into a `reject` vote. Keeping the three separate keeps
357
+ * admitted) validate its pend operations, then its commit operations. Failing any yields a refusal
358
+ * the caller turns into a vote — a `reject` for every validity judgement here, and a `held` for the
359
+ * one transient refusal {@link validatePendOperations} can make (see {@link PromiseVerdict}).
360
+ * Keeping the checks separate keeps
323
361
  * the reason strings distinct — a `membership-not-admitted` reject is a different signal (feeds the
324
362
  * dispute path) than a stale-revision / custom-validator reject, which is different again from a
325
363
  * `content-digest-mismatch` (see {@link validateCommitOperations}). A record carries pend OR commit
@@ -399,11 +437,47 @@ export declare class ClusterMember implements ICluster {
399
437
  private static symmetricDifferenceSize;
400
438
  /**
401
439
  * Validates pend operations in a cluster record using the transaction validator.
402
- * Also checks for stale revisions, and for blocks held by a different unresolved pending
440
+ * Also checks for stale revisions, and for blocks RESERVED by a different unresolved pending
403
441
  * action, to prevent consensus on operations that storage would refuse at apply.
404
442
  * Returns success if no validator is configured (backwards compatibility).
443
+ *
444
+ * Every refusal here is a validity judgement EXCEPT the pending-conflict one, which is transient by
445
+ * construction and returns the `held` kind — see {@link PromiseVerdict}. Transient means the
446
+ * reservation it answers is one its holder is still going to commit or cancel: a record claiming
447
+ * the slot this pend wants, or a later one. A record claiming a slot the collection has already
448
+ * moved past is NOT a reservation against this pend and is not refused on — see
449
+ * {@link reservingRivals} — because its holder is never going to remove it: the holder either
450
+ * committed at that slot on the rest of the cohort (this member missed the commit) or lost the
451
+ * slot, and in both cases the record would otherwise refuse every later write to the block, from
452
+ * every writer, for as long as this member lives.
405
453
  */
406
454
  private validatePendOperations;
455
+ /**
456
+ * Of the rival pending records `get` listed on `blockId`, the ones that RESERVE the block against
457
+ * `pendRequest` — see `isReservationAgainst` for the rule, fed the pend's revision and the base it
458
+ * declares for this block (`reservationRequestFor`, the same reading storage applies at apply).
459
+ * Asks storage's {@link IPendingClaimReader} for the slot each record claims; a repo without that
460
+ * capability (a plain `IRepo` mock) or a read that fails degrades to "every rival reserves", which
461
+ * is the refusal this member cast before claims were recorded — never to silently admitting one. A
462
+ * rival that `get` listed but that is gone by the time the claims are read has resolved in
463
+ * between, and is not a rival any more.
464
+ */
465
+ private reservingRivals;
466
+ /** `pendRequest`'s {@link ReservationRequest} for `blockId`, logging a base the rule cannot read —
467
+ * never a refusal: `baseRevs` is untrusted wire data, and a malformed entry only drops that block
468
+ * back to the revision rule. The base is read only when `record`'s cohort can reach its promise
469
+ * super-majority without one of its members (`cohortCanMissAPend`); in a cohort that needs every
470
+ * member, a stray record on one member (a cancel that never reached it) would otherwise refuse
471
+ * every later writer for good, and no member can have missed the pend the base arm guards against. */
472
+ private reservationRequestOf;
473
+ /**
474
+ * Feed this member's own `held` vote to its {@link stuckReservations} counter and say, once per
475
+ * episode and in words, when a block is wedged behind a reservation that is not going to clear —
476
+ * the member-side twin of `CoordinatorRepo.noteStuckReservation`, for the reservations that
477
+ * node cannot corroborate from its own storage. `peerId` is carried because this logger is not
478
+ * suffixed with one and several members can share a process.
479
+ */
480
+ private nameStuckReservation;
407
481
  /**
408
482
  * Promise-round check that a commit record's requested revision is not already committed HERE
409
483
  * under a different action. This is the member-side arm that keeps a DEAD rival's re-broadcast
@@ -495,6 +569,43 @@ export declare class ClusterMember implements ICluster {
495
569
  * it, or `undefined` for "no longer corroborated — abstain" (which a read fault also yields).
496
570
  */
497
571
  private refusedPendConflictsWithLocalState;
572
+ /**
573
+ * Promise-round check that a commit declares, for each block, the base revision the same action's
574
+ * PEND carried to this member. The author says the base twice — `PendRequest.baseRevs[id]`, kept
575
+ * with this member's pending record as `PendingClaim.baseRev`, and
576
+ * `CommitRequest.blockDigests[id].baseRev` — and an honest author says the same thing both times
577
+ * (`Tracker` pins the base at staging; the pend and the digest both read that pin). When they
578
+ * differ, this member's record holds operations computed against a base other than the one the
579
+ * commit is about to be applied as, so vote reject with {@link BASE_DECLARATION_DISAGREES}.
580
+ * `StorageRepo.internalCommit` refuses the same shape at apply (`guardCommitBase`); refusing here
581
+ * too puts a signed verdict on the record one round earlier, and when the cohort's records agree
582
+ * with each other but not with the commit (a writer whose commit contradicts its own pend) the
583
+ * whole cohort refuses at the vote, where the apply-time refusal alone would have every member
584
+ * refuse after consensus and reconcile against a revision nobody holds.
585
+ *
586
+ * Needs no preview, so it runs on a repo that can read one record's claim
587
+ * ({@link IPendingClaimReader}`.pendingClaimOf`) whether or not it can materialize. Abstains — votes
588
+ * as it would without the check — whenever it cannot compare: the commit declares nothing, an entry
589
+ * is surplus to `blockIds` or carries no numeric `baseRev` (untrusted wire data, same posture as the
590
+ * digest check), this member holds no record for the action on the block, the record carries no
591
+ * base (an inserted or deleted block, a base-less sender, or a record written before bases were
592
+ * kept), the read fails — or this member does not hold the declared base as its latest.
593
+ *
594
+ * That last abstain is what keeps an HONEST retry off this reject. The one disagreement an honest
595
+ * writer can meet here is a stale record from an earlier attempt of a retried action (same action
596
+ * id) meeting the retry's commit, when the retry's pend — which would have overwritten the record
597
+ * — never reached this member. Such a member is typically behind: it missed a pend, and the retry
598
+ * declares a base the rest of the cohort moved to. At three members one reject sinks the commit
599
+ * record (the default super-majority allows none), where abstaining lets the others commit and
600
+ * leaves this member to `guardCommitBase`, which refuses to apply the stale record and reconciles.
601
+ * When this member's latest IS the declared base, the stale operations are exactly what it would
602
+ * apply over it, and the digest check below rejects the same shape whenever they materialize
603
+ * differently; rejecting here names the cause instead.
604
+ */
605
+ private validateCommitBaseDeclarations;
606
+ /** This member's own committed revision of `blockId` (raw storage, no cluster recursion), or
607
+ * `undefined` when it holds none or the read fails — a fault reads as "cannot judge". */
608
+ private latestRevOf;
498
609
  /**
499
610
  * Promise-round check of a commit record's declared content digests
500
611
  * (`CommitRequest.blockDigests`) against what this member's OWN pended copy of each transform
@@ -599,12 +710,37 @@ export declare class ClusterMember implements ICluster {
599
710
  /**
600
711
  * Apply one consensus commit to local storage, tolerating every divergence shape the way the
601
712
  * doc comment on {@link applyConsensusOperation} describes and reconciling the behind ones.
602
- * Returns storage's own result — or, for the thrown missing-pend shape, which produces no
713
+ * `applied` is storage's own result — or, for the thrown missing-pend shape, which produces no
603
714
  * `CommitResult` at all, a refusal built from the throw — so {@link durableCommitVerdict} works
604
- * from one uniform shape. Genuine faults (a bare-reason returned failure, an unrecognized throw)
605
- * propagate so {@link handleConsensus} rolls back the executed marker and rethrows.
715
+ * from one uniform shape. `behind` is true exactly when one of the two behind branches ran, which
716
+ * is what makes a refusal eligible for {@link reconcileRefusedCommit}. Genuine faults (a
717
+ * bare-reason returned failure, an unrecognized throw) propagate so {@link handleConsensus} rolls
718
+ * back the executed marker and rethrows.
606
719
  */
607
720
  private applyCommitToStorage;
721
+ /**
722
+ * Retain `verdict` as this member's durable verdict for `record`'s commit (see
723
+ * {@link executedCommitResults}), remember whether a refusal was the behind shape, and — once the
724
+ * verdict is a success — report the committed holders. Shared by the consensus apply and
725
+ * {@link reconcileRefusedCommit} so both leave the same state behind.
726
+ */
727
+ private retainCommitVerdict;
728
+ /**
729
+ * One more reconcile for a commit this member already applied at consensus but could not hold:
730
+ * its retained verdict is a BEHIND-shaped refusal (missing pend or missing base), and the
731
+ * reconcile that ran during the apply found no cohort peer holding the revision yet. The
732
+ * coordinating node calls this for its own member once the remote members have applied and at
733
+ * least one reported holding the revision. Its own delivery goes first (see
734
+ * `ClusterCoordinator.broadcastMergedRecord`), so that first reconcile ran before anyone else
735
+ * held anything. The remote holder's copy carries the cohort's commit proof, so the existing
736
+ * certified single-holder path adopts it; no new trust is involved.
737
+ *
738
+ * Does nothing unless the retained verdict for `record.messageHash` is a behind refusal; in
739
+ * particular an ahead-shaped refusal (`missing`) is never reconciled downward. Recomputes and
740
+ * re-retains the durable verdict afterwards, so `getExecutedCommitResult` then answers a success
741
+ * when the revision landed. Bounded by the same per-block reconcile timeout and never throws.
742
+ */
743
+ reconcileRefusedCommit(record: ClusterRecord): Promise<void>;
608
744
  /**
609
745
  * The durable verdict for a consensus commit: `applied` itself when storage landed it (a
610
746
  * success from `StorageRepo.commit` means every block is committed, or already was, under this
@@ -646,6 +782,16 @@ export declare class ClusterMember implements ICluster {
646
782
  * it can never break consensus.
647
783
  */
648
784
  private captureCommitCert;
785
+ /**
786
+ * Tell the {@link CommittedHoldersSink} which cohort members hold a commit this member just
787
+ * durably applied. A member learns nothing about the others' storage at apply time, so the
788
+ * evidence is the record's approving commit signers: each is a cohort member that signed to apply
789
+ * this commit. A signer that then failed to apply is wrongly recorded, which only spares it a
790
+ * rebalance push; its own reconcile, read-repair, and — on the coordinating node — the
791
+ * coordinator's durability-checked report (which lands after this one and overrides it) still
792
+ * reach it.
793
+ */
794
+ private reportCommittedHolders;
649
795
  /**
650
796
  * After tolerating a "behind" commit divergence, pull the committed revision of
651
797
  * each block from a cohort peer that holds it and restore it locally. Best-effort:
@@ -1 +1 @@
1
- {"version":3,"file":"cluster-repo.d.ts","sourceRoot":"","sources":["../../../src/cluster/cluster-repo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,YAAY,EAAa,WAAW,EAAE,qBAAqB,EAAE,sBAAsB,EAA2B,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAiB,UAAU,EAAE,iBAAiB,EAAsB,MAAM,qBAA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