@optimystic/db-p2p 0.24.2 → 0.25.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 (249) hide show
  1. package/{readme.md → README.md} +688 -668
  2. package/dist/src/cluster/block-transfer-service.d.ts +133 -10
  3. package/dist/src/cluster/block-transfer-service.d.ts.map +1 -1
  4. package/dist/src/cluster/block-transfer-service.js +155 -9
  5. package/dist/src/cluster/block-transfer-service.js.map +1 -1
  6. package/dist/src/cluster/block-transfer.d.ts +67 -7
  7. package/dist/src/cluster/block-transfer.d.ts.map +1 -1
  8. package/dist/src/cluster/block-transfer.js +127 -24
  9. package/dist/src/cluster/block-transfer.js.map +1 -1
  10. package/dist/src/cluster/certified-claims.d.ts +170 -0
  11. package/dist/src/cluster/certified-claims.d.ts.map +1 -0
  12. package/dist/src/cluster/certified-claims.js +200 -0
  13. package/dist/src/cluster/certified-claims.js.map +1 -0
  14. package/dist/src/cluster/client-signature-verifier.d.ts +23 -0
  15. package/dist/src/cluster/client-signature-verifier.d.ts.map +1 -0
  16. package/dist/src/cluster/client-signature-verifier.js +33 -0
  17. package/dist/src/cluster/client-signature-verifier.js.map +1 -0
  18. package/dist/src/cluster/cluster-policy.d.ts +9 -3
  19. package/dist/src/cluster/cluster-policy.d.ts.map +1 -1
  20. package/dist/src/cluster/cluster-policy.js +111 -27
  21. package/dist/src/cluster/cluster-policy.js.map +1 -1
  22. package/dist/src/cluster/cluster-repo.d.ts +140 -11
  23. package/dist/src/cluster/cluster-repo.d.ts.map +1 -1
  24. package/dist/src/cluster/cluster-repo.js +485 -29
  25. package/dist/src/cluster/cluster-repo.js.map +1 -1
  26. package/dist/src/cluster/commit-proof.d.ts +134 -0
  27. package/dist/src/cluster/commit-proof.d.ts.map +1 -0
  28. package/dist/src/cluster/commit-proof.js +263 -0
  29. package/dist/src/cluster/commit-proof.js.map +1 -0
  30. package/dist/src/cluster/quorum-restore.d.ts +95 -8
  31. package/dist/src/cluster/quorum-restore.d.ts.map +1 -1
  32. package/dist/src/cluster/quorum-restore.js +113 -14
  33. package/dist/src/cluster/quorum-restore.js.map +1 -1
  34. package/dist/src/cluster/rebalance-monitor.d.ts +84 -0
  35. package/dist/src/cluster/rebalance-monitor.d.ts.map +1 -1
  36. package/dist/src/cluster/rebalance-monitor.js +207 -5
  37. package/dist/src/cluster/rebalance-monitor.js.map +1 -1
  38. package/dist/src/cluster/reconcile-block.d.ts +27 -7
  39. package/dist/src/cluster/reconcile-block.d.ts.map +1 -1
  40. package/dist/src/cluster/reconcile-block.js +179 -38
  41. package/dist/src/cluster/reconcile-block.js.map +1 -1
  42. package/dist/src/cluster/service.d.ts +13 -4
  43. package/dist/src/cluster/service.d.ts.map +1 -1
  44. package/dist/src/cluster/service.js +17 -18
  45. package/dist/src/cluster/service.js.map +1 -1
  46. package/dist/src/cluster/spread-on-churn.d.ts +8 -2
  47. package/dist/src/cluster/spread-on-churn.d.ts.map +1 -1
  48. package/dist/src/cluster/spread-on-churn.js +7 -7
  49. package/dist/src/cluster/spread-on-churn.js.map +1 -1
  50. package/dist/src/cohort-topic/host.d.ts.map +1 -1
  51. package/dist/src/cohort-topic/host.js +8 -7
  52. package/dist/src/cohort-topic/host.js.map +1 -1
  53. package/dist/src/cohort-topic/stream-util.d.ts +7 -6
  54. package/dist/src/cohort-topic/stream-util.d.ts.map +1 -1
  55. package/dist/src/cohort-topic/stream-util.js +14 -41
  56. package/dist/src/cohort-topic/stream-util.js.map +1 -1
  57. package/dist/src/dispute/cascade.d.ts +7 -8
  58. package/dist/src/dispute/cascade.d.ts.map +1 -1
  59. package/dist/src/dispute/cascade.js +24 -7
  60. package/dist/src/dispute/cascade.js.map +1 -1
  61. package/dist/src/dispute/dispute-service.d.ts +5 -0
  62. package/dist/src/dispute/dispute-service.d.ts.map +1 -1
  63. package/dist/src/dispute/dispute-service.js +13 -3
  64. package/dist/src/dispute/dispute-service.js.map +1 -1
  65. package/dist/src/dispute/invalidation.d.ts +33 -15
  66. package/dist/src/dispute/invalidation.d.ts.map +1 -1
  67. package/dist/src/dispute/invalidation.js +127 -34
  68. package/dist/src/dispute/invalidation.js.map +1 -1
  69. package/dist/src/dispute/service.d.ts.map +1 -1
  70. package/dist/src/dispute/service.js +2 -1
  71. package/dist/src/dispute/service.js.map +1 -1
  72. package/dist/src/index.d.ts +7 -0
  73. package/dist/src/index.d.ts.map +1 -1
  74. package/dist/src/index.js +7 -0
  75. package/dist/src/index.js.map +1 -1
  76. package/dist/src/libp2p-key-network.d.ts +14 -10
  77. package/dist/src/libp2p-key-network.d.ts.map +1 -1
  78. package/dist/src/libp2p-key-network.js +28 -58
  79. package/dist/src/libp2p-key-network.js.map +1 -1
  80. package/dist/src/libp2p-node-base.d.ts +38 -7
  81. package/dist/src/libp2p-node-base.d.ts.map +1 -1
  82. package/dist/src/libp2p-node-base.js +148 -63
  83. package/dist/src/libp2p-node-base.js.map +1 -1
  84. package/dist/src/network/open-protocol-stream.d.ts +56 -0
  85. package/dist/src/network/open-protocol-stream.d.ts.map +1 -0
  86. package/dist/src/network/open-protocol-stream.js +60 -0
  87. package/dist/src/network/open-protocol-stream.js.map +1 -0
  88. package/dist/src/network/register-protocol-handler.d.ts +66 -0
  89. package/dist/src/network/register-protocol-handler.d.ts.map +1 -0
  90. package/dist/src/network/register-protocol-handler.js +51 -0
  91. package/dist/src/network/register-protocol-handler.js.map +1 -0
  92. package/dist/src/peer-address-book.d.ts +60 -2
  93. package/dist/src/peer-address-book.d.ts.map +1 -1
  94. package/dist/src/peer-address-book.js +89 -1
  95. package/dist/src/peer-address-book.js.map +1 -1
  96. package/dist/src/pend-validation.d.ts +65 -0
  97. package/dist/src/pend-validation.d.ts.map +1 -0
  98. package/dist/src/pend-validation.js +69 -0
  99. package/dist/src/pend-validation.js.map +1 -0
  100. package/dist/src/reactivity/notify-transport.d.ts.map +1 -1
  101. package/dist/src/reactivity/notify-transport.js +2 -1
  102. package/dist/src/reactivity/notify-transport.js.map +1 -1
  103. package/dist/src/reactivity/push-state-gossip.d.ts.map +1 -1
  104. package/dist/src/reactivity/push-state-gossip.js +2 -1
  105. package/dist/src/reactivity/push-state-gossip.js.map +1 -1
  106. package/dist/src/repo/cluster-coordinator.d.ts +32 -6
  107. package/dist/src/repo/cluster-coordinator.d.ts.map +1 -1
  108. package/dist/src/repo/cluster-coordinator.js +44 -10
  109. package/dist/src/repo/cluster-coordinator.js.map +1 -1
  110. package/dist/src/repo/coordinator-repo.d.ts +181 -25
  111. package/dist/src/repo/coordinator-repo.d.ts.map +1 -1
  112. package/dist/src/repo/coordinator-repo.js +650 -62
  113. package/dist/src/repo/coordinator-repo.js.map +1 -1
  114. package/dist/src/repo/served-repo-proxy.d.ts +30 -0
  115. package/dist/src/repo/served-repo-proxy.d.ts.map +1 -0
  116. package/dist/src/repo/served-repo-proxy.js +50 -0
  117. package/dist/src/repo/served-repo-proxy.js.map +1 -0
  118. package/dist/src/repo/service.d.ts +16 -1
  119. package/dist/src/repo/service.d.ts.map +1 -1
  120. package/dist/src/repo/service.js +18 -16
  121. package/dist/src/repo/service.js.map +1 -1
  122. package/dist/src/reputation/types.d.ts +3 -1
  123. package/dist/src/reputation/types.d.ts.map +1 -1
  124. package/dist/src/reputation/types.js +3 -1
  125. package/dist/src/reputation/types.js.map +1 -1
  126. package/dist/src/rn.d.ts +24 -2
  127. package/dist/src/rn.d.ts.map +1 -1
  128. package/dist/src/rn.js +33 -4
  129. package/dist/src/rn.js.map +1 -1
  130. package/dist/src/storage/block-archive.d.ts +153 -0
  131. package/dist/src/storage/block-archive.d.ts.map +1 -0
  132. package/dist/src/storage/block-archive.js +194 -0
  133. package/dist/src/storage/block-archive.js.map +1 -0
  134. package/dist/src/storage/block-latch.d.ts +92 -0
  135. package/dist/src/storage/block-latch.d.ts.map +1 -0
  136. package/dist/src/storage/block-latch.js +132 -0
  137. package/dist/src/storage/block-latch.js.map +1 -0
  138. package/dist/src/storage/block-storage.d.ts +169 -12
  139. package/dist/src/storage/block-storage.d.ts.map +1 -1
  140. package/dist/src/storage/block-storage.js +415 -152
  141. package/dist/src/storage/block-storage.js.map +1 -1
  142. package/dist/src/storage/cached-raw-storage.d.ts +5 -1
  143. package/dist/src/storage/cached-raw-storage.d.ts.map +1 -1
  144. package/dist/src/storage/cached-raw-storage.js +16 -1
  145. package/dist/src/storage/cached-raw-storage.js.map +1 -1
  146. package/dist/src/storage/cached-store-driver.d.ts +14 -4
  147. package/dist/src/storage/cached-store-driver.d.ts.map +1 -1
  148. package/dist/src/storage/cached-store-driver.js +39 -5
  149. package/dist/src/storage/cached-store-driver.js.map +1 -1
  150. package/dist/src/storage/i-block-storage.d.ts +70 -19
  151. package/dist/src/storage/i-block-storage.d.ts.map +1 -1
  152. package/dist/src/storage/i-block-storage.js +21 -1
  153. package/dist/src/storage/i-block-storage.js.map +1 -1
  154. package/dist/src/storage/i-raw-storage.d.ts +38 -0
  155. package/dist/src/storage/i-raw-storage.d.ts.map +1 -1
  156. package/dist/src/storage/kv-raw-storage.d.ts +14 -8
  157. package/dist/src/storage/kv-raw-storage.d.ts.map +1 -1
  158. package/dist/src/storage/kv-raw-storage.js +29 -9
  159. package/dist/src/storage/kv-raw-storage.js.map +1 -1
  160. package/dist/src/storage/memory-store-driver.d.ts +4 -1
  161. package/dist/src/storage/memory-store-driver.d.ts.map +1 -1
  162. package/dist/src/storage/memory-store-driver.js +22 -2
  163. package/dist/src/storage/memory-store-driver.js.map +1 -1
  164. package/dist/src/storage/raw-store-codec.js +2 -2
  165. package/dist/src/storage/raw-store-driver.d.ts +44 -3
  166. package/dist/src/storage/raw-store-driver.d.ts.map +1 -1
  167. package/dist/src/storage/shared-cache-pool.d.ts +60 -3
  168. package/dist/src/storage/shared-cache-pool.d.ts.map +1 -1
  169. package/dist/src/storage/shared-cache-pool.js +68 -4
  170. package/dist/src/storage/shared-cache-pool.js.map +1 -1
  171. package/dist/src/storage/storage-repo.d.ts +204 -26
  172. package/dist/src/storage/storage-repo.d.ts.map +1 -1
  173. package/dist/src/storage/storage-repo.js +422 -119
  174. package/dist/src/storage/storage-repo.js.map +1 -1
  175. package/dist/src/storage/store-identity.d.ts +21 -0
  176. package/dist/src/storage/store-identity.d.ts.map +1 -0
  177. package/dist/src/storage/store-identity.js +33 -0
  178. package/dist/src/storage/store-identity.js.map +1 -0
  179. package/dist/src/storage/struct.d.ts +15 -0
  180. package/dist/src/storage/struct.d.ts.map +1 -1
  181. package/dist/src/storage/with-read-cache.d.ts +92 -0
  182. package/dist/src/storage/with-read-cache.d.ts.map +1 -0
  183. package/dist/src/storage/with-read-cache.js +132 -0
  184. package/dist/src/storage/with-read-cache.js.map +1 -0
  185. package/dist/src/sync/service.d.ts +13 -3
  186. package/dist/src/sync/service.d.ts.map +1 -1
  187. package/dist/src/sync/service.js +7 -30
  188. package/dist/src/sync/service.js.map +1 -1
  189. package/dist/src/testing/mesh-harness.d.ts +75 -2
  190. package/dist/src/testing/mesh-harness.d.ts.map +1 -1
  191. package/dist/src/testing/mesh-harness.js +193 -81
  192. package/dist/src/testing/mesh-harness.js.map +1 -1
  193. package/dist/src/testing/raw-storage-conformance.d.ts +8 -0
  194. package/dist/src/testing/raw-storage-conformance.d.ts.map +1 -1
  195. package/dist/src/testing/raw-storage-conformance.js +97 -2
  196. package/dist/src/testing/raw-storage-conformance.js.map +1 -1
  197. package/package.json +5 -6
  198. package/src/cluster/block-transfer-service.ts +528 -312
  199. package/src/cluster/block-transfer.ts +547 -424
  200. package/src/cluster/certified-claims.ts +319 -0
  201. package/src/cluster/client-signature-verifier.ts +34 -0
  202. package/src/cluster/cluster-policy.ts +294 -203
  203. package/src/cluster/cluster-repo.ts +2501 -2034
  204. package/src/cluster/commit-proof.ts +344 -0
  205. package/src/cluster/quorum-restore.ts +348 -223
  206. package/src/cluster/rebalance-monitor.ts +539 -254
  207. package/src/cluster/reconcile-block.ts +404 -203
  208. package/src/cluster/service.ts +23 -20
  209. package/src/cluster/spread-on-churn.ts +352 -346
  210. package/src/cohort-topic/host.ts +8 -7
  211. package/src/cohort-topic/stream-util.ts +14 -43
  212. package/src/dispute/cascade.ts +31 -15
  213. package/src/dispute/dispute-service.ts +706 -696
  214. package/src/dispute/invalidation.ts +162 -52
  215. package/src/dispute/service.ts +126 -125
  216. package/src/index.ts +7 -0
  217. package/src/libp2p-key-network.ts +1204 -1235
  218. package/src/libp2p-node-base.ts +185 -70
  219. package/src/network/open-protocol-stream.ts +87 -0
  220. package/src/network/register-protocol-handler.ts +85 -0
  221. package/src/peer-address-book.ts +96 -2
  222. package/src/pend-validation.ts +89 -0
  223. package/src/reactivity/notify-transport.ts +2 -1
  224. package/src/reactivity/push-state-gossip.ts +2 -1
  225. package/src/repo/cluster-coordinator.ts +65 -11
  226. package/src/repo/coordinator-repo.ts +729 -71
  227. package/src/repo/served-repo-proxy.ts +55 -0
  228. package/src/repo/service.ts +25 -16
  229. package/src/reputation/types.ts +3 -1
  230. package/src/rn.ts +34 -4
  231. package/src/storage/block-archive.ts +242 -0
  232. package/src/storage/block-latch.ts +144 -0
  233. package/src/storage/block-storage.ts +787 -498
  234. package/src/storage/cached-raw-storage.ts +21 -1
  235. package/src/storage/cached-store-driver.ts +898 -859
  236. package/src/storage/i-block-storage.ts +172 -116
  237. package/src/storage/i-raw-storage.ts +40 -0
  238. package/src/storage/kv-raw-storage.ts +34 -9
  239. package/src/storage/memory-store-driver.ts +26 -2
  240. package/src/storage/raw-store-codec.ts +42 -42
  241. package/src/storage/raw-store-driver.ts +45 -3
  242. package/src/storage/shared-cache-pool.ts +516 -452
  243. package/src/storage/storage-repo.ts +1421 -1014
  244. package/src/storage/store-identity.ts +41 -0
  245. package/src/storage/struct.ts +52 -34
  246. package/src/storage/with-read-cache.ts +182 -0
  247. package/src/sync/service.ts +178 -198
  248. package/src/testing/mesh-harness.ts +524 -344
  249. package/src/testing/raw-storage-conformance.ts +114 -2
@@ -1,9 +1,11 @@
1
- import type { PendRequest, ActionBlocks, IRepo, MessageOptions, CommitResult, GetBlockResults, PendResult, BlockGets, CommitRequest, IKeyNetwork, ICluster, ClusterConsensusConfig, BlockId, ActionRev, ActionContext } from "@optimystic/db-core";
1
+ import type { PendRequest, ActionBlocks, IRepo, MessageOptions, CommitResult, GetBlockResults, PendResult, BlockGets, CommitRequest, IKeyNetwork, ICluster, ClusterConsensusConfig, BlockId, ActionContext } from "@optimystic/db-core";
2
2
  import type { PeerId } from "@libp2p/interface";
3
3
  import type { FretService } from "p2p-fret";
4
4
  import type { IPeerReputation } from "../reputation/types.js";
5
5
  import type { ITransactionStateStore } from "../cluster/i-transaction-state-store.js";
6
+ import { type ProofAnchoring } from "../cluster/certified-claims.js";
6
7
  import type { ReconcileBlockCallback } from "../cluster/cluster-repo.js";
8
+ import type { CertifiedActionRev } from "../storage/block-archive.js";
7
9
  /**
8
10
  * Acquire a block's content for a cohort-corroborated revision, from the cohort, and persist it.
9
11
  *
@@ -21,10 +23,21 @@ export type AcquireBlockCallback = ReconcileBlockCallback;
21
23
  */
22
24
  interface LocalClusterWithExecutionTracking extends ICluster {
23
25
  wasTransactionExecuted?(messageHash: string): boolean;
26
+ /** Local storage's verdict for a pend applied during consensus; see ClusterMember.getExecutedPendResult. */
27
+ getExecutedPendResult?(messageHash: string): PendResult | undefined;
28
+ /** Local storage's verdict for a commit applied during consensus; see ClusterMember.getExecutedCommitResult. */
29
+ getExecutedCommitResult?(messageHash: string): CommitResult | undefined;
24
30
  }
31
+ /**
32
+ * A cohort peer's answer to the latest-revision consult. Defined with the archive shape it is
33
+ * projected from (`storage/block-archive.ts`) and re-exported here so it reads next to the callback
34
+ * that returns it; see {@link CertifiedActionRev} there for what the optional proof does and does
35
+ * not mean.
36
+ */
37
+ export type { CertifiedActionRev } from "../storage/block-archive.js";
25
38
  /**
26
39
  * Callback to query a cluster peer for their latest revision of a block. Three-way contract:
27
- * - resolves an `ActionRev` — the peer answered and holds the block at that revision;
40
+ * - resolves a `CertifiedActionRev` — the peer answered and holds the block at that revision;
28
41
  * - resolves `undefined` — the peer answered and holds NOTHING (an absent claim);
29
42
  * - REJECTS — the peer could not be asked at all (dial failure, protocol error).
30
43
  *
@@ -36,7 +49,7 @@ interface LocalClusterWithExecutionTracking extends ICluster {
36
49
  * harness's `silentPeers` failure knob). Slowness needs no handling here — the caller deadlines
37
50
  * each query and treats expiry as silence.
38
51
  */
39
- export type ClusterLatestCallback = (peerId: PeerId, blockId: BlockId, context?: ActionContext) => Promise<ActionRev | undefined>;
52
+ export type ClusterLatestCallback = (peerId: PeerId, blockId: BlockId, context?: ActionContext) => Promise<CertifiedActionRev | undefined>;
40
53
  interface CoordinatorRepoComponents {
41
54
  storageRepo: IRepo;
42
55
  localCluster?: LocalClusterWithExecutionTracking;
@@ -53,6 +66,14 @@ interface CoordinatorRepoComponents {
53
66
  * holds the corroborated action as a promotable pending. See {@link AcquireBlockCallback}.
54
67
  */
55
68
  acquireBlockFromCohort?: AcquireBlockCallback;
69
+ /**
70
+ * Optional layer-2 anchoring for the cohort commit proofs the latest-revision consult verifies
71
+ * (`cluster/certified-claims.ts`): re-derive the block's cohort and LOG the overlap with the
72
+ * proof's signers, plus surface proofs accepted without that comparison. Purely observational —
73
+ * never a gate — and absent in production wiring today; `certifyClaim` logs unanchored
74
+ * acceptance internally regardless.
75
+ */
76
+ proofAnchoring?: ProofAnchoring;
56
77
  }
57
78
  /**
58
79
  * Consensus config for the coordinator side, plus the repair yardstick the read-repair path measures
@@ -73,18 +94,19 @@ export declare class CoordinatorRepo implements IRepo {
73
94
  private readonly storageRepo;
74
95
  private readonly clusterLatestCallback?;
75
96
  private readonly acquireBlockFromCohort?;
97
+ private readonly proofAnchoring?;
76
98
  private coordinator;
77
99
  private readonly DEFAULT_TIMEOUT;
78
100
  private readonly localPeerId?;
79
101
  private readonly responsibilityCache;
80
102
  private static readonly RESPONSIBILITY_TTL_MS;
81
103
  private readonly lastSeenCommitMs;
82
- /** Per block, the cohort-claimed revision the last freshness consult could not settle — the
83
- * doubt {@link flagUnconfirmedCurrency} stamps onto reads served below it. Outlives the
84
- * consult on purpose: the read-repair window skips consults for blocks checked recently, and
85
- * a doubt dropped there is a stale answer served as confirmed again.
104
+ /** Per block, what earlier repair passes left unresolved see {@link AheadClaimState}.
105
+ * Outlives the consult on purpose: the read-repair window skips consults for blocks checked
106
+ * recently, and a doubt dropped there is a stale answer served as confirmed again.
86
107
  * NOTE: LRU-bounded like `lastSeenCommitMs`; an eviction under >1000 doubted blocks loses the
87
- * doubt until the next consult re-derives it (one read-repair window later, at worst). */
108
+ * doubt until the next consult re-derives it (one read-repair window later, at worst) and lets
109
+ * {@link reportRepairDeadlock} say its piece a second time. */
88
110
  private readonly unsettledAheadClaims;
89
111
  private readonly readRepairMode;
90
112
  private readonly readRepairWindowMs;
@@ -107,7 +129,7 @@ export declare class CoordinatorRepo implements IRepo {
107
129
  now: () => number;
108
130
  /** Test seam: overridable RNG (0..1) for sample-rate gating. */
109
131
  rand: () => number;
110
- constructor(keyNetwork: IKeyNetwork, createClusterClient: (peerId: PeerId) => ICluster, storageRepo: IRepo, cfg?: CoordinatorRepoConfig, localCluster?: LocalClusterWithExecutionTracking, localPeerId?: PeerId, fretService?: FretService, clusterLatestCallback?: ClusterLatestCallback | undefined, reputation?: IPeerReputation, stateStore?: ITransactionStateStore, acquireBlockFromCohort?: AcquireBlockCallback | undefined);
132
+ constructor(keyNetwork: IKeyNetwork, createClusterClient: (peerId: PeerId) => ICluster, storageRepo: IRepo, cfg?: CoordinatorRepoConfig, localCluster?: LocalClusterWithExecutionTracking, localPeerId?: PeerId, fretService?: FretService, clusterLatestCallback?: ClusterLatestCallback | undefined, reputation?: IPeerReputation, stateStore?: ITransactionStateStore, acquireBlockFromCohort?: AcquireBlockCallback | undefined, proofAnchoring?: ProofAnchoring | undefined);
111
133
  /**
112
134
  * The resolved super-majority threshold this coordinator commits on. Exposed so the composition root
113
135
  * can fail-fast if the coordinator and the cluster member would run different thresholds (see the
@@ -180,7 +202,7 @@ export declare class CoordinatorRepo implements IRepo {
180
202
  * from the tail block's `latest.rev`, and `syncInternal` commits every block of an action at
181
203
  * `context.rev + 1` — so `context.rev >= claimedRev` is a well-defined comparison. `state.latest`
182
204
  * is this node's newest revision for the block even on a pinned read (StorageRepo reports the
183
- * content's own revision separately as `materializedRev`), which is exactly the number "is this
205
+ * content's own revision separately as `materialized`), which is exactly the number "is this
184
206
  * node behind the claim?" asks about.
185
207
  */
186
208
  private flagUnconfirmedCurrency;
@@ -244,7 +266,8 @@ export declare class CoordinatorRepo implements IRepo {
244
266
  * the repair. Returns the local revision afterwards.
245
267
  *
246
268
  * A pending-only block (metadata seeded by `savePendingTransaction`, no committed revision) asked
247
- * for a forward revision no promotion can reach used to throw out of `BlockStorage.ensureRevision`.
269
+ * for a forward revision no promotion can reach used to throw out of the restore step (now
270
+ * `BlockStorage.restoreRevision`, driven by `StorageRepo.get`'s healing helper).
248
271
  * It no longer does: "no committed base here" is an absence, so that read comes back as a plain
249
272
  * unflagged `{ state: {} }` and this method simply returns `undefined` — acquisition then supplies
250
273
  * the revision. The `unavailable` arm below still fires for the shapes that ARE a guess (a `latest`
@@ -272,25 +295,109 @@ export declare class CoordinatorRepo implements IRepo {
272
295
  * repair. It is returned separately so the caller can compare, not vote.
273
296
  *
274
297
  * NOTE: the quorum is corroboration-of-a-claim, NOT Sybil-resistant cohort
275
- * membership — a peer minting fresh keypairs still casts a vote, and the claims
276
- * themselves are bare assertions (a `BlockArchive` carries no commit certificate, so
277
- * there is nothing here to verify a `(rev, actionId)` against). Commit-cert +
278
- * membership anchoring is deferred to backlog
279
- * `debt-read-repair-commit-cert-verification`.
298
+ * membership — a peer minting fresh keypairs still casts a vote. A claim that arrives
299
+ * with a cohort commit proof is additionally VERIFIED here (`certifyClaim`,
300
+ * `cluster/certified-claims.ts`); when the proof holds, the claim is certified and
301
+ * {@link selectQuorumRev} accepts it without a second voter — the cohort's signature set
302
+ * is its corroboration. What a passing proof does NOT prove is that its signers are the
303
+ * block's responsible cohort (anyone controlling N keys can sign their own N-peer
304
+ * proof); anchoring the signer set to topology is the optional, observational-only
305
+ * {@link ProofAnchoring} layer, unwired in production today.
280
306
  */
281
307
  private queryClusterForLatest;
282
308
  /**
283
- * Report peers whose reported latest contradicts the quorum-corroborated pair. Best-effort.
309
+ * Say ONCE per block, in words, when a corroboration decline is provably PERMANENT rather than a
310
+ * transient shortage of answers. There are exactly TWO permanent shapes, and they send the operator
311
+ * to different places, so each gets its own `reason` and its own wording:
312
+ *
313
+ * - `cohort-too-small` — this node's cohort has fewer peers than the quorum would demand even if
314
+ * every one of them answered and agreed. The remedy is machines or an honest declared size.
315
+ * - `sole-holder` — the cohort is big enough, but exactly ONE of its peers holds the block at all
316
+ * and every other peer answered that it holds nothing. The remedy is another cohort peer
317
+ * holding the block; machines and configuration are both irrelevant. Note the scope: this node's
318
+ * own copy is excluded from the claim set, so a reader that holds the block itself still sees
319
+ * `sole-holder` — the message says "cohort peer", never "machine in the deployment".
320
+ *
321
+ * **What makes `cohort-too-small` provable.** Not "this pass fell short" — a pass falls short
322
+ * whenever some peer simply does not hold the block *yet*. The decisive question is whether the
323
+ * cohort could supply the quorum AT ALL: ask what would be required if every cohort peer answered
324
+ * and agreed — the best case any later pass can reach without new machines — and compare it to how
325
+ * many peers the cohort has. Short of that best case the shortfall is not the machine count, and
326
+ * saying PERMANENT would send the operator to change a number that was never the problem. Twelve
327
+ * days of log archaeology went into re-deriving the real condition from a thousand identical
328
+ * `cluster-fetch:no-quorum` lines; the node knows it at the moment of each decline.
284
329
  *
285
- * NOTE: the `rev > selected.rev` branch is NOT provable misbehavior an honest
286
- * peer legitimately ahead of the sampled quorum (an in-flight commit it durably
287
- * stored, or other honest holders dropped from the sample by the 1s per-peer
288
- * timeout) reports a higher rev and gets penalized (weight 30 immediate
289
- * deprioritize at threshold 20). Distinguishing a liar from an honest leader
290
- * needs the commit-cert verification tracked in backlog
291
- * `debt-read-repair-penalty-provable-only` / `debt-read-repair-commit-cert-verification`.
330
+ * **What makes `sole-holder` provable.** Note it is only reachable for a lone UNCERTIFIED holder:
331
+ * a lone holder whose cohort commit proof verified is selected by the certified path and converges
332
+ * before any decline so the wording's "a lone holder cannot second itself" stays accurate for
333
+ * every claim that gets here. "That peer will hold it later" is an assumption, and for a
334
+ * peer that ANSWERED "I hold nothing" it is false: the only two mechanisms that would turn a
335
+ * non-holder into a holder `queryClusterForLatest` (read-repair) and `createReconcileBlock`
336
+ * (reconcile) consume this very decision, so they decline for exactly the same reason on that
337
+ * peer. Every peer answered, one holds the block, the rest hold nothing, and no later pass changes
338
+ * any of that. What DOES change it is a new copy: a commit that writes the block again pushes it to
339
+ * the current cohort. (Sibling work `replicate-owned-blocks-when-the-cohort-grows` makes that
340
+ * automatic; until it lands the operator has to cause the write.)
341
+ *
342
+ * **What is deliberately NOT reported.** A cohort that answers unanimously "I hold nothing" — an
343
+ * agreed absence is an answer, not a failed repair. A pass with any silent peer: silence cannot
344
+ * change the arithmetic (`cohortPeers` counts silent peers too), but it does mean this node saw less
345
+ * than the whole picture, and the next clean pass says the same thing at no cost. Note there is
346
+ * deliberately NO "the claims disagreed" exemption for `cohort-too-small`: a cohort too small to
347
+ * reach quorum stays too small whether its peers agree or not, so disagreement would suppress a line
348
+ * that is still true. Two or more disagreeing holders DO suppress `sole-holder`, because that is a
349
+ * cohort with two copies whose peers have not settled yet — a later pass can settle it.
350
+ *
351
+ * **Never a lever.** This only classifies and logs; it never relaxes a floor. Which is also why the
352
+ * `cohort-too-small` message names *two* readings of the same numbers — a deployment that genuinely
353
+ * runs this few machines, or a cohort view shrunk below the real deployment by a partition or by an
354
+ * attacker with routing influence. `corroboratorCapacity` keeps the shrunken view out of the relaxed
355
+ * branch, but this node cannot tell the two apart from the inside, and an operator sent to fix the
356
+ * wrong one is the failure this line exists to end.
357
+ *
358
+ * NOTE: the reader is still told only "this may be stale" — `BlockPossiblyStaleError` implies a
359
+ * retry might help, which is wrong advice for a block whose repair is deadlocked as configured.
360
+ * Carrying this condition into the error needs a new field on `GetBlockResult` plus a change to
361
+ * that error's documented contract; deliberately out of scope here (see the ticket
362
+ * `repair-deadlock-is-never-named`, *Not this ticket*).
363
+ */
364
+ private reportRepairDeadlock;
365
+ /**
366
+ * Report peers whose reported latest PROVABLY contradicts a CORROBORATED selection: the same
367
+ * revision under a different actionId. Two actions cannot both be the commit at one revision,
368
+ * and the pair a quorum of distinct peers agreed on is the one this node can stand behind, so
369
+ * the disagreeing claimant is wrong. Best-effort.
370
+ *
371
+ * A CERTIFIED selection is deliberately excluded — no claim is penalized against it. A passing
372
+ * proof shows the cohort it names signed the commit, never that those signers are the block's
373
+ * responsible cohort: anyone holding N keys can mint a proof that verifies (see caller
374
+ * obligation #1 in `cluster/commit-proof.ts`, and the unwired {@link ProofAnchoring} layer).
375
+ * Penalizing here would therefore hand one forged proof a lever it must not have — every honest
376
+ * peer holding the real action at that revision reported for InvalidRestoration (weight 30,
377
+ * above the deprioritize threshold of 20), on every consult. Losing the selection to the proof
378
+ * is already the accepted cost of the certified path; deprioritizing the honest cohort on top of
379
+ * it is not. Revisit when certification is anchored to the block's derived cohort
380
+ * (`feat-cluster-membership-threshold-cert-anchoring`): a gated proof makes the contradiction
381
+ * provable again.
382
+ *
383
+ * A claim at a HIGHER rev than the selection is deliberately NOT penalized: a peer can honestly
384
+ * be ahead of the sampled quorum — an in-flight commit it durably stored before the rest of the
385
+ * cohort, or other honest holders dropped from the sample by the 1s per-peer consult deadline —
386
+ * and the InvalidRestoration weight (30) sits above the deprioritize threshold (20), so a single
387
+ * false hit used to deprioritize an honest, up-to-date peer. Declining to RESTORE from the
388
+ * uncorroborated higher claim already happens in selection; the affirmative penalty on that
389
+ * ambiguous evidence is what this method no longer applies. Provably-bad proof SERVICE is
390
+ * penalized at verification time instead (the certifyClaim pass in
391
+ * {@link queryClusterForLatest}).
292
392
  */
293
393
  private penalizeContradictingRevClaims;
394
+ /**
395
+ * Best-effort penalty for a peer whose SERVED PROOF provably lies or provably does not cover the
396
+ * claim it was attached to (see the attributability classification in
397
+ * `cluster/certified-claims.ts`). Never throws — mirrors
398
+ * {@link penalizeContradictingRevClaims}.
399
+ */
400
+ private penalizeProofService;
294
401
  pend(request: PendRequest, options?: MessageOptions): Promise<PendResult>;
295
402
  /**
296
403
  * Decide whether a cluster validator rejection was an optimistic-concurrency loss — the block
@@ -312,8 +419,58 @@ export declare class CoordinatorRepo implements IRepo {
312
419
  * genuine validation faults.
313
420
  */
314
421
  private classifyStaleRejection;
422
+ /**
423
+ * Sibling of {@link classifyStaleRejection} for the OTHER optimistic-concurrency refusal shape:
424
+ * the promise-phase pending-conflict vote (`validatePendOperations` rejecting a pend whose
425
+ * blocks are held by a different unresolved pending action). That vote surfaces here as a
426
+ * {@link ValidatorRejectionError}, and without classification it would escape as a throw —
427
+ * splitting multi-tree pends mid-batch instead of taking the retry path a lost race deserves.
428
+ *
429
+ * Same confirmation discipline as the stale classifier: purely local. Re-read the affected
430
+ * blocks from our own storage and require some block's `state.pendings` to carry a rival
431
+ * actionId; the signed reject text is never consulted. A confirmed rival returns a
432
+ * {@link StaleFailure} with `conflict: true` and the rivals as `pending` (`ActionPending`
433
+ * without `transform` — the type allows it, and no consumer rebases from it). Unconfirmed —
434
+ * including read errors during confirmation — stays a throw, preserving fail-fast for genuine
435
+ * validation faults. Checked after `classifyStaleRejection` so a confirmed committed loss
436
+ * (which carries the sharper `staleAt`) wins when both hold.
437
+ */
438
+ private classifyPendingConflictRejection;
315
439
  cancel(actionRef: ActionBlocks, options?: MessageOptions): Promise<void>;
316
440
  commit(request: CommitRequest, options?: MessageOptions): Promise<CommitResult>;
441
+ /**
442
+ * Commit-shaped sibling of {@link classifyStaleRejection}: decide whether a cluster validator
443
+ * rejection of a COMMIT was an optimistic-concurrency loss — the requested revision is already
444
+ * committed under a different action — rather than a genuine validation fault. A confirmed loss
445
+ * returns a {@link StaleFailure} with `conflict: true` so db-core's `commitCollection` surfaces
446
+ * it immediately as a stale loss (no verbatim retry) and the writer re-drives at a fresh
447
+ * revision.
448
+ *
449
+ * Same confirmation discipline as the pend classifiers: purely local re-read; the signed reject
450
+ * text is never consulted. One commit-specific delta — confirmation must EXCLUDE the
451
+ * own-action-at-rev case: a block whose requested revision is held by THIS action is already
452
+ * durable, and answering `conflict` for it would make the writer rebase and re-append an
453
+ * already-committed action at a new revision — a duplicate entry. So:
454
+ * - `latest.rev === request.rev` → compare `latest.actionId`: ours ⇒ bail (stays a throw),
455
+ * a rival's ⇒ confirmed loss;
456
+ * - `latest.rev > request.rev` → ask the {@link IRevisionActionReader} capability who holds
457
+ * `request.rev`: ours ⇒ bail, a rival's ⇒ confirmed loss, unknown/absent/fault ⇒ unconfirmed;
458
+ * - anything unconfirmed (including read errors) stays a throw — fail-fast for genuine faults.
459
+ */
460
+ private classifyCommitStaleRejection;
461
+ /**
462
+ * Shared confirmation core for the two commit-tier conversion sites ({@link classifyCommitStaleRejection}
463
+ * and the locally-executed refusal check in {@link commit}): decide, from LOCAL storage only, who
464
+ * holds the requested revision.
465
+ * - a confirmed RIVAL → the {@link StaleFailure} conflict answer (with `staleAt` = highest
466
+ * confirmed holder);
467
+ * - our OWN action durable at the requested revision → `'own-durable'` (callers must not answer
468
+ * `conflict` — the writer would rebase an already-landed action into a duplicate entry);
469
+ * - anything else (behind, truncated history, read faults, capability absent) → `undefined`,
470
+ * unconfirmed.
471
+ * The signed reject text / retained verdict prose is never consulted.
472
+ */
473
+ private confirmCommitRivalAgainstLocal;
317
474
  /**
318
475
  * Report success for a commit the cluster carried but this peer could not apply locally. The
319
476
  * blocks are marked seen so the read path treats them as freshness-checked; convergence comes
@@ -321,5 +478,4 @@ export declare class CoordinatorRepo implements IRepo {
321
478
  */
322
479
  private tolerateLocalCommitDivergence;
323
480
  }
324
- export {};
325
481
  //# sourceMappingURL=coordinator-repo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"coordinator-repo.d.ts","sourceRoot":"","sources":["../../../src/repo/coordinator-repo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,KAA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