@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.
- package/{readme.md → README.md} +688 -668
- package/dist/src/cluster/block-transfer-service.d.ts +133 -10
- package/dist/src/cluster/block-transfer-service.d.ts.map +1 -1
- package/dist/src/cluster/block-transfer-service.js +155 -9
- package/dist/src/cluster/block-transfer-service.js.map +1 -1
- package/dist/src/cluster/block-transfer.d.ts +67 -7
- package/dist/src/cluster/block-transfer.d.ts.map +1 -1
- package/dist/src/cluster/block-transfer.js +127 -24
- package/dist/src/cluster/block-transfer.js.map +1 -1
- package/dist/src/cluster/certified-claims.d.ts +170 -0
- package/dist/src/cluster/certified-claims.d.ts.map +1 -0
- package/dist/src/cluster/certified-claims.js +200 -0
- package/dist/src/cluster/certified-claims.js.map +1 -0
- package/dist/src/cluster/client-signature-verifier.d.ts +23 -0
- package/dist/src/cluster/client-signature-verifier.d.ts.map +1 -0
- package/dist/src/cluster/client-signature-verifier.js +33 -0
- package/dist/src/cluster/client-signature-verifier.js.map +1 -0
- package/dist/src/cluster/cluster-policy.d.ts +9 -3
- package/dist/src/cluster/cluster-policy.d.ts.map +1 -1
- package/dist/src/cluster/cluster-policy.js +111 -27
- package/dist/src/cluster/cluster-policy.js.map +1 -1
- package/dist/src/cluster/cluster-repo.d.ts +140 -11
- package/dist/src/cluster/cluster-repo.d.ts.map +1 -1
- package/dist/src/cluster/cluster-repo.js +485 -29
- package/dist/src/cluster/cluster-repo.js.map +1 -1
- package/dist/src/cluster/commit-proof.d.ts +134 -0
- package/dist/src/cluster/commit-proof.d.ts.map +1 -0
- package/dist/src/cluster/commit-proof.js +263 -0
- package/dist/src/cluster/commit-proof.js.map +1 -0
- package/dist/src/cluster/quorum-restore.d.ts +95 -8
- package/dist/src/cluster/quorum-restore.d.ts.map +1 -1
- package/dist/src/cluster/quorum-restore.js +113 -14
- package/dist/src/cluster/quorum-restore.js.map +1 -1
- package/dist/src/cluster/rebalance-monitor.d.ts +84 -0
- package/dist/src/cluster/rebalance-monitor.d.ts.map +1 -1
- package/dist/src/cluster/rebalance-monitor.js +207 -5
- package/dist/src/cluster/rebalance-monitor.js.map +1 -1
- package/dist/src/cluster/reconcile-block.d.ts +27 -7
- package/dist/src/cluster/reconcile-block.d.ts.map +1 -1
- package/dist/src/cluster/reconcile-block.js +179 -38
- package/dist/src/cluster/reconcile-block.js.map +1 -1
- package/dist/src/cluster/service.d.ts +13 -4
- package/dist/src/cluster/service.d.ts.map +1 -1
- package/dist/src/cluster/service.js +17 -18
- package/dist/src/cluster/service.js.map +1 -1
- package/dist/src/cluster/spread-on-churn.d.ts +8 -2
- package/dist/src/cluster/spread-on-churn.d.ts.map +1 -1
- package/dist/src/cluster/spread-on-churn.js +7 -7
- 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 -7
- package/dist/src/cohort-topic/host.js.map +1 -1
- package/dist/src/cohort-topic/stream-util.d.ts +7 -6
- package/dist/src/cohort-topic/stream-util.d.ts.map +1 -1
- package/dist/src/cohort-topic/stream-util.js +14 -41
- package/dist/src/cohort-topic/stream-util.js.map +1 -1
- package/dist/src/dispute/cascade.d.ts +7 -8
- package/dist/src/dispute/cascade.d.ts.map +1 -1
- package/dist/src/dispute/cascade.js +24 -7
- package/dist/src/dispute/cascade.js.map +1 -1
- package/dist/src/dispute/dispute-service.d.ts +5 -0
- package/dist/src/dispute/dispute-service.d.ts.map +1 -1
- package/dist/src/dispute/dispute-service.js +13 -3
- package/dist/src/dispute/dispute-service.js.map +1 -1
- package/dist/src/dispute/invalidation.d.ts +33 -15
- package/dist/src/dispute/invalidation.d.ts.map +1 -1
- package/dist/src/dispute/invalidation.js +127 -34
- package/dist/src/dispute/invalidation.js.map +1 -1
- package/dist/src/dispute/service.d.ts.map +1 -1
- package/dist/src/dispute/service.js +2 -1
- package/dist/src/dispute/service.js.map +1 -1
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +7 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/libp2p-key-network.d.ts +14 -10
- package/dist/src/libp2p-key-network.d.ts.map +1 -1
- package/dist/src/libp2p-key-network.js +28 -58
- package/dist/src/libp2p-key-network.js.map +1 -1
- package/dist/src/libp2p-node-base.d.ts +38 -7
- package/dist/src/libp2p-node-base.d.ts.map +1 -1
- package/dist/src/libp2p-node-base.js +148 -63
- package/dist/src/libp2p-node-base.js.map +1 -1
- package/dist/src/network/open-protocol-stream.d.ts +56 -0
- package/dist/src/network/open-protocol-stream.d.ts.map +1 -0
- package/dist/src/network/open-protocol-stream.js +60 -0
- package/dist/src/network/open-protocol-stream.js.map +1 -0
- package/dist/src/network/register-protocol-handler.d.ts +66 -0
- package/dist/src/network/register-protocol-handler.d.ts.map +1 -0
- package/dist/src/network/register-protocol-handler.js +51 -0
- package/dist/src/network/register-protocol-handler.js.map +1 -0
- package/dist/src/peer-address-book.d.ts +60 -2
- package/dist/src/peer-address-book.d.ts.map +1 -1
- package/dist/src/peer-address-book.js +89 -1
- package/dist/src/peer-address-book.js.map +1 -1
- package/dist/src/pend-validation.d.ts +65 -0
- package/dist/src/pend-validation.d.ts.map +1 -0
- package/dist/src/pend-validation.js +69 -0
- package/dist/src/pend-validation.js.map +1 -0
- package/dist/src/reactivity/notify-transport.d.ts.map +1 -1
- package/dist/src/reactivity/notify-transport.js +2 -1
- package/dist/src/reactivity/notify-transport.js.map +1 -1
- package/dist/src/reactivity/push-state-gossip.d.ts.map +1 -1
- package/dist/src/reactivity/push-state-gossip.js +2 -1
- package/dist/src/reactivity/push-state-gossip.js.map +1 -1
- package/dist/src/repo/cluster-coordinator.d.ts +32 -6
- package/dist/src/repo/cluster-coordinator.d.ts.map +1 -1
- package/dist/src/repo/cluster-coordinator.js +44 -10
- package/dist/src/repo/cluster-coordinator.js.map +1 -1
- package/dist/src/repo/coordinator-repo.d.ts +181 -25
- package/dist/src/repo/coordinator-repo.d.ts.map +1 -1
- package/dist/src/repo/coordinator-repo.js +650 -62
- package/dist/src/repo/coordinator-repo.js.map +1 -1
- package/dist/src/repo/served-repo-proxy.d.ts +30 -0
- package/dist/src/repo/served-repo-proxy.d.ts.map +1 -0
- package/dist/src/repo/served-repo-proxy.js +50 -0
- package/dist/src/repo/served-repo-proxy.js.map +1 -0
- package/dist/src/repo/service.d.ts +16 -1
- package/dist/src/repo/service.d.ts.map +1 -1
- package/dist/src/repo/service.js +18 -16
- package/dist/src/repo/service.js.map +1 -1
- package/dist/src/reputation/types.d.ts +3 -1
- package/dist/src/reputation/types.d.ts.map +1 -1
- package/dist/src/reputation/types.js +3 -1
- package/dist/src/reputation/types.js.map +1 -1
- package/dist/src/rn.d.ts +24 -2
- package/dist/src/rn.d.ts.map +1 -1
- package/dist/src/rn.js +33 -4
- package/dist/src/rn.js.map +1 -1
- package/dist/src/storage/block-archive.d.ts +153 -0
- package/dist/src/storage/block-archive.d.ts.map +1 -0
- package/dist/src/storage/block-archive.js +194 -0
- package/dist/src/storage/block-archive.js.map +1 -0
- package/dist/src/storage/block-latch.d.ts +92 -0
- package/dist/src/storage/block-latch.d.ts.map +1 -0
- package/dist/src/storage/block-latch.js +132 -0
- package/dist/src/storage/block-latch.js.map +1 -0
- package/dist/src/storage/block-storage.d.ts +169 -12
- package/dist/src/storage/block-storage.d.ts.map +1 -1
- package/dist/src/storage/block-storage.js +415 -152
- package/dist/src/storage/block-storage.js.map +1 -1
- package/dist/src/storage/cached-raw-storage.d.ts +5 -1
- package/dist/src/storage/cached-raw-storage.d.ts.map +1 -1
- package/dist/src/storage/cached-raw-storage.js +16 -1
- package/dist/src/storage/cached-raw-storage.js.map +1 -1
- package/dist/src/storage/cached-store-driver.d.ts +14 -4
- package/dist/src/storage/cached-store-driver.d.ts.map +1 -1
- package/dist/src/storage/cached-store-driver.js +39 -5
- package/dist/src/storage/cached-store-driver.js.map +1 -1
- package/dist/src/storage/i-block-storage.d.ts +70 -19
- package/dist/src/storage/i-block-storage.d.ts.map +1 -1
- package/dist/src/storage/i-block-storage.js +21 -1
- package/dist/src/storage/i-block-storage.js.map +1 -1
- package/dist/src/storage/i-raw-storage.d.ts +38 -0
- package/dist/src/storage/i-raw-storage.d.ts.map +1 -1
- package/dist/src/storage/kv-raw-storage.d.ts +14 -8
- package/dist/src/storage/kv-raw-storage.d.ts.map +1 -1
- package/dist/src/storage/kv-raw-storage.js +29 -9
- package/dist/src/storage/kv-raw-storage.js.map +1 -1
- package/dist/src/storage/memory-store-driver.d.ts +4 -1
- package/dist/src/storage/memory-store-driver.d.ts.map +1 -1
- package/dist/src/storage/memory-store-driver.js +22 -2
- package/dist/src/storage/memory-store-driver.js.map +1 -1
- package/dist/src/storage/raw-store-codec.js +2 -2
- package/dist/src/storage/raw-store-driver.d.ts +44 -3
- package/dist/src/storage/raw-store-driver.d.ts.map +1 -1
- package/dist/src/storage/shared-cache-pool.d.ts +60 -3
- package/dist/src/storage/shared-cache-pool.d.ts.map +1 -1
- package/dist/src/storage/shared-cache-pool.js +68 -4
- package/dist/src/storage/shared-cache-pool.js.map +1 -1
- package/dist/src/storage/storage-repo.d.ts +204 -26
- package/dist/src/storage/storage-repo.d.ts.map +1 -1
- package/dist/src/storage/storage-repo.js +422 -119
- package/dist/src/storage/storage-repo.js.map +1 -1
- package/dist/src/storage/store-identity.d.ts +21 -0
- package/dist/src/storage/store-identity.d.ts.map +1 -0
- package/dist/src/storage/store-identity.js +33 -0
- package/dist/src/storage/store-identity.js.map +1 -0
- package/dist/src/storage/struct.d.ts +15 -0
- package/dist/src/storage/struct.d.ts.map +1 -1
- package/dist/src/storage/with-read-cache.d.ts +92 -0
- package/dist/src/storage/with-read-cache.d.ts.map +1 -0
- package/dist/src/storage/with-read-cache.js +132 -0
- package/dist/src/storage/with-read-cache.js.map +1 -0
- package/dist/src/sync/service.d.ts +13 -3
- package/dist/src/sync/service.d.ts.map +1 -1
- package/dist/src/sync/service.js +7 -30
- package/dist/src/sync/service.js.map +1 -1
- package/dist/src/testing/mesh-harness.d.ts +75 -2
- package/dist/src/testing/mesh-harness.d.ts.map +1 -1
- package/dist/src/testing/mesh-harness.js +193 -81
- package/dist/src/testing/mesh-harness.js.map +1 -1
- package/dist/src/testing/raw-storage-conformance.d.ts +8 -0
- package/dist/src/testing/raw-storage-conformance.d.ts.map +1 -1
- package/dist/src/testing/raw-storage-conformance.js +97 -2
- package/dist/src/testing/raw-storage-conformance.js.map +1 -1
- package/package.json +5 -6
- package/src/cluster/block-transfer-service.ts +528 -312
- package/src/cluster/block-transfer.ts +547 -424
- package/src/cluster/certified-claims.ts +319 -0
- package/src/cluster/client-signature-verifier.ts +34 -0
- package/src/cluster/cluster-policy.ts +294 -203
- package/src/cluster/cluster-repo.ts +2501 -2034
- package/src/cluster/commit-proof.ts +344 -0
- package/src/cluster/quorum-restore.ts +348 -223
- package/src/cluster/rebalance-monitor.ts +539 -254
- package/src/cluster/reconcile-block.ts +404 -203
- package/src/cluster/service.ts +23 -20
- package/src/cluster/spread-on-churn.ts +352 -346
- package/src/cohort-topic/host.ts +8 -7
- package/src/cohort-topic/stream-util.ts +14 -43
- package/src/dispute/cascade.ts +31 -15
- package/src/dispute/dispute-service.ts +706 -696
- package/src/dispute/invalidation.ts +162 -52
- package/src/dispute/service.ts +126 -125
- package/src/index.ts +7 -0
- package/src/libp2p-key-network.ts +1204 -1235
- package/src/libp2p-node-base.ts +185 -70
- package/src/network/open-protocol-stream.ts +87 -0
- package/src/network/register-protocol-handler.ts +85 -0
- package/src/peer-address-book.ts +96 -2
- package/src/pend-validation.ts +89 -0
- package/src/reactivity/notify-transport.ts +2 -1
- package/src/reactivity/push-state-gossip.ts +2 -1
- package/src/repo/cluster-coordinator.ts +65 -11
- package/src/repo/coordinator-repo.ts +729 -71
- package/src/repo/served-repo-proxy.ts +55 -0
- package/src/repo/service.ts +25 -16
- package/src/reputation/types.ts +3 -1
- package/src/rn.ts +34 -4
- package/src/storage/block-archive.ts +242 -0
- package/src/storage/block-latch.ts +144 -0
- package/src/storage/block-storage.ts +787 -498
- package/src/storage/cached-raw-storage.ts +21 -1
- package/src/storage/cached-store-driver.ts +898 -859
- package/src/storage/i-block-storage.ts +172 -116
- package/src/storage/i-raw-storage.ts +40 -0
- package/src/storage/kv-raw-storage.ts +34 -9
- package/src/storage/memory-store-driver.ts +26 -2
- package/src/storage/raw-store-codec.ts +42 -42
- package/src/storage/raw-store-driver.ts +45 -3
- package/src/storage/shared-cache-pool.ts +516 -452
- package/src/storage/storage-repo.ts +1421 -1014
- package/src/storage/store-identity.ts +41 -0
- package/src/storage/struct.ts +52 -34
- package/src/storage/with-read-cache.ts +182 -0
- package/src/sync/service.ts +178 -198
- package/src/testing/mesh-harness.ts +524 -344
- package/src/testing/raw-storage-conformance.ts +114 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PeerId, PrivateKey } from '@libp2p/interface';
|
|
2
|
-
import type { IKeyNetwork, ITransactor } from '@optimystic/db-core';
|
|
3
|
-
import { ClusterMember } from '../cluster/cluster-repo.js';
|
|
2
|
+
import type { IKeyNetwork, BlockId, ITransactor, ITransactionValidator } from '@optimystic/db-core';
|
|
3
|
+
import { ClusterMember, type ExpectedClusterView } from '../cluster/cluster-repo.js';
|
|
4
|
+
import { type ClusterPolicyOptions, type ResolvedClusterPolicy } from '../cluster/cluster-policy.js';
|
|
4
5
|
import { StorageRepo } from '../storage/storage-repo.js';
|
|
5
6
|
import type { IRawStorage } from '../storage/i-raw-storage.js';
|
|
6
7
|
import type { CoordinatorRepo } from '../repo/coordinator-repo.js';
|
|
@@ -13,8 +14,24 @@ export interface MeshNode {
|
|
|
13
14
|
}
|
|
14
15
|
export interface MeshOptions {
|
|
15
16
|
responsibilityK: number;
|
|
17
|
+
/**
|
|
18
|
+
* Replication factor. OMITTED now means what it means in production: the operator declared
|
|
19
|
+
* nothing, so it resolves to `DEFAULT_CLUSTER_SIZE` (10) — NOT to `nodeCount`. An undeclared
|
|
20
|
+
* two-node mesh therefore measures its repair corroboration floor against 10 and can never
|
|
21
|
+
* repair (see `resolveClusterPolicy` in `cluster/cluster-policy.ts`); a mesh that genuinely is
|
|
22
|
+
* its node count must say so, exactly as a real deployment must.
|
|
23
|
+
*/
|
|
16
24
|
clusterSize?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Passed through to `resolveClusterPolicy` verbatim; this is how a mesh declares its real
|
|
27
|
+
* cohort size (`assumedClusterSize`), downsize policy, or small-cluster opt-in. When both a
|
|
28
|
+
* legacy top-level field and the matching entry here are given, the entry here wins — it is
|
|
29
|
+
* the production-shaped one.
|
|
30
|
+
*/
|
|
31
|
+
clusterPolicy?: ClusterPolicyOptions['clusterPolicy'];
|
|
32
|
+
/** Legacy shorthand for `clusterPolicy.superMajorityThreshold`. */
|
|
17
33
|
superMajorityThreshold?: number;
|
|
34
|
+
/** Legacy shorthand for `clusterPolicy.allowDownsize`. */
|
|
18
35
|
allowClusterDownsize?: boolean;
|
|
19
36
|
/**
|
|
20
37
|
* Optional per-node raw-storage factory. Invoked once per node (indexed from 0)
|
|
@@ -23,6 +40,40 @@ export interface MeshOptions {
|
|
|
23
40
|
* with a crashing proxy, or by restart tests to rebuild over preserved state.
|
|
24
41
|
*/
|
|
25
42
|
rawStorageFactory?: (index: number) => IRawStorage;
|
|
43
|
+
/**
|
|
44
|
+
* Per-node member-side cluster derivation for the membership admission gate — the harness
|
|
45
|
+
* analogue of `libp2p-node-base`'s `deriveExpectedCluster` (findCluster + FRET confidence).
|
|
46
|
+
* Omitted → each member gets the production-shaped derivation over its own self-including
|
|
47
|
+
* key-network view (partition-aware, see `MeshFailureConfig.partitionSides`) with confidence
|
|
48
|
+
* from `meshConfidence` (default 1).
|
|
49
|
+
*/
|
|
50
|
+
deriveExpectedCluster?: (node: MeshNode, blockId: BlockId) => Promise<ExpectedClusterView>;
|
|
51
|
+
/**
|
|
52
|
+
* Per-node transaction validator — the harness analogue of `NodeOptions.validator`, which
|
|
53
|
+
* `libp2p-node-base` forwards straight into `clusterMember({ … validator })`. Invoked once per
|
|
54
|
+
* node (indexed from 0, in the order `Mesh.nodes` ends up in) during assembly.
|
|
55
|
+
*
|
|
56
|
+
* Omitted → no validator, and `ClusterMember.validatePendOperations` skips the whole validation
|
|
57
|
+
* step (signatures, schema hash, operations hash) — today's harness behaviour, preserved as the
|
|
58
|
+
* default so existing meshes do not suddenly re-validate transactions they were never built to
|
|
59
|
+
* satisfy. That is also production's current posture: no composition root supplies
|
|
60
|
+
* `NodeOptions.validator` yet (backlog `feat-no-deployment-validates-transactions-at-pend`).
|
|
61
|
+
*
|
|
62
|
+
* A FACTORY rather than one shared instance because enforcement is a per-node decision, and a
|
|
63
|
+
* mixed mesh — some members enforcing, some not — is exactly the case worth testing.
|
|
64
|
+
*
|
|
65
|
+
* A mesh that arms validators can also set `clusterPolicy.unvalidatablePendPolicy: 'reject'` to
|
|
66
|
+
* refuse pends that carry no `validation` payload (the single-collection `Collection.sync`
|
|
67
|
+
* shape, which a validator cannot re-check); the default 'accept' admits them unchecked.
|
|
68
|
+
*/
|
|
69
|
+
validatorFactory?: (index: number, peerId: PeerId) => ITransactionValidator;
|
|
70
|
+
/**
|
|
71
|
+
* Per-node network-size confidence (0..1) fed to the default derivation — the FRET stand-in.
|
|
72
|
+
* Default 1 (confident). Evaluated per vote, so a spec may flip it mid-test (e.g. collapse a
|
|
73
|
+
* partition side's confidence after the mesh is built). The gate's check is STRICTLY greater
|
|
74
|
+
* than its threshold (0.5), so returning the threshold itself lands on the fail-closed side.
|
|
75
|
+
*/
|
|
76
|
+
meshConfidence?: (node: MeshNode) => number;
|
|
26
77
|
}
|
|
27
78
|
export interface MeshFailureConfig {
|
|
28
79
|
/** Peers that should fail on cluster update (simulate unreachable) */
|
|
@@ -36,12 +87,34 @@ export interface MeshFailureConfig {
|
|
|
36
87
|
* them as a source. Distinct from `failingPeers`, which fails cluster (write) updates.
|
|
37
88
|
*/
|
|
38
89
|
silentPeers?: Set<string>;
|
|
90
|
+
/**
|
|
91
|
+
* Simulated network partition: each entry is one side of the split, as a set of peer-id
|
|
92
|
+
* strings. While set, a node's own key-network view (`findCluster`) answers a caller on side S
|
|
93
|
+
* with only the members of S that would otherwise be in the cohort — an UNAUTHENTICATED
|
|
94
|
+
* shrunken view, exactly what the membership admission gate exists to refuse. Callers not in
|
|
95
|
+
* any listed side see the unpartitioned cohort.
|
|
96
|
+
*
|
|
97
|
+
* This shapes cluster VIEWS (what a coordinator declares and what a member derives), not
|
|
98
|
+
* transport reachability — combine with `failingPeers`/`silentPeers` to also sever traffic.
|
|
99
|
+
* On the write path that rarely matters: a partitioned coordinator only contacts the cohort
|
|
100
|
+
* it declared, which is already its own side.
|
|
101
|
+
*/
|
|
102
|
+
partitionSides?: Set<string>[];
|
|
39
103
|
}
|
|
40
104
|
export interface Mesh {
|
|
41
105
|
nodes: MeshNode[];
|
|
42
106
|
failures: MeshFailureConfig;
|
|
43
107
|
keyNetwork: IKeyNetwork;
|
|
44
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Fold the mesh's operator-facing knobs into the numbers every node runs on, through the SAME
|
|
111
|
+
* resolver a real node's composition root uses (`libp2p-node-base.ts`). Named and exported rather
|
|
112
|
+
* than inlined in `createMesh` so the precedence rule below is assertable without building a mesh.
|
|
113
|
+
*
|
|
114
|
+
* Precedence: an explicit `clusterPolicy` entry wins over the matching legacy top-level field — the
|
|
115
|
+
* entry is the production-shaped one.
|
|
116
|
+
*/
|
|
117
|
+
export declare function resolveMeshPolicy(options: MeshOptions): ResolvedClusterPolicy;
|
|
45
118
|
/**
|
|
46
119
|
* Creates N interconnected mesh nodes with real components and mock transport.
|
|
47
120
|
* ClusterClient calls route directly to target ClusterMember instances.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh-harness.d.ts","sourceRoot":"","sources":["../../../src/testing/mesh-harness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAA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AACH,eAAO,MAAM,sBAAsB,GAAI,MAAM,IAAI,EAAE,UAAS,sBAA2B,KAAG,WAezF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,GAAI,MAAM,IAAI,EAAE,UAAS,sBAA2B,KAAG,GAAG,CAAC,MAAM,EAAE,WAAW,CAMjH,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { NetworkTransactor
|
|
1
|
+
import { NetworkTransactor } from '@optimystic/db-core';
|
|
2
2
|
import { peerIdFromPrivateKey } from '@libp2p/peer-id';
|
|
3
3
|
import { generateKeyPair } from '@libp2p/crypto/keys';
|
|
4
4
|
import { ClusterMember, clusterMember } from '../cluster/cluster-repo.js';
|
|
5
|
+
import { createReconcileBlock } from '../cluster/reconcile-block.js';
|
|
6
|
+
import { resolveClusterPolicy } from '../cluster/cluster-policy.js';
|
|
5
7
|
import { StorageRepo } from '../storage/storage-repo.js';
|
|
6
8
|
import { MemoryRawStorage } from '../storage/memory-storage.js';
|
|
7
9
|
import { BlockStorage } from '../storage/block-storage.js';
|
|
10
|
+
import { serveBlockArchive, servableProof } from '../storage/block-archive.js';
|
|
8
11
|
import { coordinatorRepo } from '../repo/coordinator-repo.js';
|
|
9
12
|
import { sortPeersByDistance } from '../routing/responsibility.js';
|
|
10
13
|
import { toString as u8ToString } from 'uint8arrays';
|
|
@@ -62,42 +65,83 @@ class MockMeshKeyNetwork {
|
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
67
|
/**
|
|
65
|
-
*
|
|
66
|
-
* of `libp2p-node-base`'s `
|
|
68
|
+
* One cohort peer's archive for a block, read straight from the sibling's `StorageRepo` — the mesh
|
|
69
|
+
* analogue of `libp2p-node-base`'s `fetchArchiveFromPeer` (a SyncClient round trip). The archive
|
|
70
|
+
* itself comes from `serveBlockArchive`, the same function `SyncService` answers a real fetch with,
|
|
71
|
+
* so the harness cannot serve a shape production would not — including the case that used to
|
|
72
|
+
* differ: a peer holding a revision whose content it cannot materialize still votes on
|
|
73
|
+
* `(rev, actionId)` here, exactly as it does over the wire.
|
|
67
74
|
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
75
|
+
* A silent peer serves no bytes either. `undefined` is the right answer: reconcile's `no-archive`
|
|
76
|
+
* outcome deliberately conflates unreachable with holds-nothing, and the production
|
|
77
|
+
* `fetchArchiveFromPeer` swallows every dial failure into the same `undefined`. (Contrast the read
|
|
78
|
+
* path's latest-revision consult, where silence REJECTS — the coordinator counts "did not answer"
|
|
79
|
+
* separately from "holds nothing".)
|
|
72
80
|
*
|
|
73
|
-
* `nodes` is captured by reference and is fully populated by the time
|
|
81
|
+
* `nodes` is captured by reference and is fully populated by the time this is invoked.
|
|
82
|
+
*
|
|
83
|
+
* NOTE: the archive served here always carries exactly ONE revision — the peer's current latest —
|
|
84
|
+
* because that is all a repo read surfaces. Enough for repair, which only ever targets one
|
|
85
|
+
* `(rev, actionId)`. If a spec ever needs a gap-fill across a revision RANGE, `serveBlockArchive`
|
|
86
|
+
* has to grow a real range and both callers get it at once.
|
|
74
87
|
*/
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
if (!target)
|
|
85
|
-
continue;
|
|
86
|
-
const result = await target.storageRepo.get({ blockIds: [blockId] }, { skipClusterFetch: true });
|
|
87
|
-
const entry = result[blockId];
|
|
88
|
-
const latest = entry?.state?.latest;
|
|
89
|
-
if (!latest || !entry?.block || latest.rev < committed.rev)
|
|
90
|
-
continue;
|
|
91
|
-
await storageRepo.saveReplicatedBlock(blockId, entry.block, latest);
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
88
|
+
const makeFetchArchive = (nodes, selfPeerId, failures) => async (peerIdStr, blockId) => {
|
|
89
|
+
if (peerIdStr === selfPeerId)
|
|
90
|
+
return undefined;
|
|
91
|
+
if (failures.silentPeers?.has(peerIdStr))
|
|
92
|
+
return undefined;
|
|
93
|
+
const target = nodes.find(n => n.peerId.toString() === peerIdStr);
|
|
94
|
+
if (!target)
|
|
95
|
+
return undefined;
|
|
96
|
+
return await serveBlockArchive(target.storageRepo, blockId);
|
|
94
97
|
};
|
|
98
|
+
/**
|
|
99
|
+
* Fold the mesh's operator-facing knobs into the numbers every node runs on, through the SAME
|
|
100
|
+
* resolver a real node's composition root uses (`libp2p-node-base.ts`). Named and exported rather
|
|
101
|
+
* than inlined in `createMesh` so the precedence rule below is assertable without building a mesh.
|
|
102
|
+
*
|
|
103
|
+
* Precedence: an explicit `clusterPolicy` entry wins over the matching legacy top-level field — the
|
|
104
|
+
* entry is the production-shaped one.
|
|
105
|
+
*/
|
|
106
|
+
export function resolveMeshPolicy(options) {
|
|
107
|
+
return resolveClusterPolicy({
|
|
108
|
+
clusterSize: options.clusterSize,
|
|
109
|
+
clusterPolicy: {
|
|
110
|
+
...options.clusterPolicy,
|
|
111
|
+
superMajorityThreshold: options.clusterPolicy?.superMajorityThreshold ?? options.superMajorityThreshold,
|
|
112
|
+
allowDownsize: options.clusterPolicy?.allowDownsize ?? options.allowClusterDownsize
|
|
113
|
+
// `allowUnvalidatedSmallCluster` passes through UNTOUCHED and so defaults to `false`, same
|
|
114
|
+
// as `resolveClusterPolicy` — the membership admission gate is ARMED in the harness. A mesh
|
|
115
|
+
// that must transact below the safe floor says so at its own call site:
|
|
116
|
+
// createMesh(1, { responsibilityK: 1, clusterPolicy: { allowUnvalidatedSmallCluster: true } })
|
|
117
|
+
// No harness-wide re-default: a disarmed gate has to be visible where the test is read.
|
|
118
|
+
// (Solo cohorts never reach the gate anyway — CoordinatorRepo short-circuits peerCount <= 1
|
|
119
|
+
// straight to local storage — so only a genuinely undersized MULTI-peer cohort needs the
|
|
120
|
+
// opt-in.)
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
95
124
|
/**
|
|
96
125
|
* Creates N interconnected mesh nodes with real components and mock transport.
|
|
97
126
|
* ClusterClient calls route directly to target ClusterMember instances.
|
|
98
127
|
*/
|
|
99
128
|
export async function createMesh(nodeCount, options) {
|
|
129
|
+
// NOTE: a mesh is never shut down — `Mesh` exposes no disposal seam, so each node's
|
|
130
|
+
// `ClusterMember.dispose()` is never called and its two cleanup intervals tick for the rest of
|
|
131
|
+
// the process. Harmless today: both handles are `.unref()`ed (the process still exits) and the
|
|
132
|
+
// callbacks are no-ops on an idle member, at ~40 `createMesh` sites across db-p2p's suite. If a
|
|
133
|
+
// mesh ever holds something a timer keeps alive — a real socket, a file handle, a fake clock a
|
|
134
|
+
// spec advances — give `Mesh` a `dispose()` that walks the nodes, and make the specs use it.
|
|
100
135
|
const failures = {};
|
|
136
|
+
// NOTE: one policy for the whole mesh, so every node necessarily agrees on cluster size and
|
|
137
|
+
// thresholds. That is right for repair tests, where disagreement is not the variable. A test
|
|
138
|
+
// that needs nodes to DISAGREE about the cluster (a partition where each side derives its own
|
|
139
|
+
// view — see ticket `mesh-harness-admission-gate`) has to resolve per node instead; it cannot
|
|
140
|
+
// be expressed with a single shared object.
|
|
141
|
+
//
|
|
142
|
+
// Resolved once per mesh rather than per node for a second reason: the resolver's one-line
|
|
143
|
+
// `repair-fault-tolerance` advisory then fires once instead of N times.
|
|
144
|
+
const policy = resolveMeshPolicy(options);
|
|
101
145
|
// Generate key pairs for all nodes
|
|
102
146
|
const keyPairs = await Promise.all(Array.from({ length: nodeCount }, async () => {
|
|
103
147
|
const privateKey = await generateKeyPair('Ed25519');
|
|
@@ -106,46 +150,115 @@ export async function createMesh(nodeCount, options) {
|
|
|
106
150
|
// Build nodes array (partially — coordinatorRepo added after keyNetwork is ready)
|
|
107
151
|
const nodes = [];
|
|
108
152
|
const peerNetwork = new MockPeerNetwork();
|
|
153
|
+
// One real reconcile callback per node, shared between the member's commit-path `reconcileBlock`
|
|
154
|
+
// and the coordinator's read-path `acquireBlockFromCohort` — production shares one instance
|
|
155
|
+
// (`libp2p-node-base.ts`), and a spec must not be able to tell the two paths apart. Built in
|
|
156
|
+
// phase 1 (with the member), consumed again in phase 2 (by the coordinator), so it is stashed
|
|
157
|
+
// here keyed by peer id rather than widened onto the public `MeshNode` type.
|
|
158
|
+
const reconcileByPeer = new Map();
|
|
159
|
+
// The mesh key network is built BEFORE the members: each member's `deriveExpectedCluster` (the
|
|
160
|
+
// admission gate's view) needs a per-node key network in phase 1, and constructing it here beats
|
|
161
|
+
// a late-bound slot a closure could fire on before it is filled. Safe because `nodes` is captured
|
|
162
|
+
// by reference and only consulted at call time, after the array is fully populated.
|
|
163
|
+
const keyNetwork = new MockMeshKeyNetwork(nodes, options.responsibilityK, failures);
|
|
164
|
+
/**
|
|
165
|
+
* One node's own view of the key network — what `Libp2pKeyPeerNetwork` gives a real node:
|
|
166
|
+
* - `findCluster` always includes self, so a responsible member's derived view is never empty
|
|
167
|
+
* (see the empty-view guard in `cluster-repo.admitMembership`);
|
|
168
|
+
* - under a simulated partition (`failures.partitionSides`), a caller inside a side sees only
|
|
169
|
+
* its side's members of the cohort — the caller-aware filtering lives here, in the per-node
|
|
170
|
+
* wrapper, precisely so `IKeyNetwork` itself needs no "who is asking" parameter.
|
|
171
|
+
* The SAME instance serves both the member's admission derivation (phase 1) and the node's
|
|
172
|
+
* coordinator (phase 2), so the two sides of a node can never see different topologies.
|
|
173
|
+
*/
|
|
174
|
+
const makeNodeKeyNetwork = (selfPeerId) => {
|
|
175
|
+
const selfStr = selfPeerId.toString();
|
|
176
|
+
return {
|
|
177
|
+
findCoordinator: (key, opts) => keyNetwork.findCoordinator(key, opts),
|
|
178
|
+
async findCluster(key) {
|
|
179
|
+
const peers = await keyNetwork.findCluster(key);
|
|
180
|
+
const side = failures.partitionSides?.find(s => s.has(selfStr));
|
|
181
|
+
if (side) {
|
|
182
|
+
for (const id of Object.keys(peers)) {
|
|
183
|
+
if (!side.has(id))
|
|
184
|
+
delete peers[id];
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
if (!(selfStr in peers)) {
|
|
188
|
+
peers[selfStr] = {
|
|
189
|
+
multiaddrs: ['/ip4/127.0.0.1/tcp/8000'],
|
|
190
|
+
publicKey: u8ToString(selfPeerId.publicKey.raw, 'base64url')
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
return peers;
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
const nodeKeyNetworkByPeer = new Map();
|
|
109
198
|
// Phase 1: create storage + cluster members
|
|
110
199
|
let nodeIndex = 0;
|
|
111
200
|
for (const { peerId, privateKey } of keyPairs) {
|
|
201
|
+
const index = nodeIndex++;
|
|
112
202
|
const rawStorage = options.rawStorageFactory
|
|
113
|
-
? options.rawStorageFactory(
|
|
203
|
+
? options.rawStorageFactory(index)
|
|
114
204
|
: new MemoryRawStorage();
|
|
115
|
-
nodeIndex++;
|
|
116
205
|
const storageRepo = new StorageRepo((blockId) => new BlockStorage(blockId, rawStorage));
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
206
|
+
// Active reconciliation: when a member commits a block it never pended (cohort drift), or a
|
|
207
|
+
// reader holds a corroborated revision it cannot promote locally, pull the committed revision
|
|
208
|
+
// from the cohort — through the PRODUCTION quorum rules (`createReconcileBlock`): a quorum of
|
|
209
|
+
// distinct peers must agree on the target `(rev, actionId)` AND on the block content, or the
|
|
210
|
+
// pass declines, persisting nothing. `reputation` is omitted — no reputation subsystem in the
|
|
211
|
+
// harness.
|
|
212
|
+
const reconcileBlock = createReconcileBlock({
|
|
213
|
+
selfPeerId: peerId.toString(),
|
|
214
|
+
fetchArchive: makeFetchArchive(nodes, peerId.toString(), failures),
|
|
215
|
+
// Production shape: a proof reconcile verified against the agreed bytes is persisted so
|
|
216
|
+
// the repaired replica serves it onward.
|
|
217
|
+
saveReplicatedBlock: (blockId, block, source, verifiedProof) => storageRepo.saveReplicatedBlock(blockId, block, source, verifiedProof),
|
|
218
|
+
simpleMajorityThreshold: policy.simpleMajorityThreshold,
|
|
219
|
+
superMajorityThreshold: policy.superMajorityThreshold,
|
|
220
|
+
repairCorroborationClusterSize: policy.repairCorroborationClusterSize
|
|
221
|
+
});
|
|
222
|
+
reconcileByPeer.set(peerId.toString(), reconcileBlock);
|
|
223
|
+
const nodeKeyNetwork = makeNodeKeyNetwork(peerId);
|
|
224
|
+
nodeKeyNetworkByPeer.set(peerId.toString(), nodeKeyNetwork);
|
|
225
|
+
// The node object exists before its member so the admission derivation below can hand the
|
|
226
|
+
// finished MeshNode to spec-supplied callbacks; `clusterMember`/`coordinatorRepo` are
|
|
227
|
+
// assigned as they are built (member just below, coordinator in phase 2) and the closures
|
|
228
|
+
// only run at vote time, long after both are in place.
|
|
229
|
+
const meshNode = {
|
|
230
|
+
peerId,
|
|
231
|
+
privateKey,
|
|
232
|
+
storageRepo,
|
|
233
|
+
clusterMember: undefined,
|
|
234
|
+
coordinatorRepo: undefined
|
|
127
235
|
};
|
|
128
|
-
//
|
|
129
|
-
//
|
|
130
|
-
|
|
131
|
-
|
|
236
|
+
// Member-side cluster derivation for the membership admission gate — the production shape
|
|
237
|
+
// (`libp2p-node-base.deriveExpectedCluster`): the SAME per-node key network the coordinator
|
|
238
|
+
// selects its cohort from, plus a network-size confidence. The self-including wrapper keeps a
|
|
239
|
+
// responsible member's view non-empty; `meshConfidence` is the FRET stand-in (default 1, i.e.
|
|
240
|
+
// confident — a partition spec collapses it per side).
|
|
241
|
+
const deriveExpectedCluster = options.deriveExpectedCluster
|
|
242
|
+
? (blockId) => options.deriveExpectedCluster(meshNode, blockId)
|
|
243
|
+
: async (blockId) => ({
|
|
244
|
+
peers: await nodeKeyNetwork.findCluster(new TextEncoder().encode(blockId)) ?? {},
|
|
245
|
+
confidence: options.meshConfidence?.(meshNode) ?? 1
|
|
246
|
+
});
|
|
247
|
+
meshNode.clusterMember = clusterMember({
|
|
132
248
|
storageRepo,
|
|
133
249
|
peerNetwork,
|
|
134
250
|
peerId,
|
|
135
251
|
privateKey,
|
|
136
|
-
consensusConfig,
|
|
137
|
-
reconcileBlock
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
storageRepo,
|
|
143
|
-
clusterMember: member,
|
|
144
|
-
coordinatorRepo: undefined // filled in phase 2
|
|
252
|
+
consensusConfig: policy,
|
|
253
|
+
reconcileBlock,
|
|
254
|
+
deriveExpectedCluster,
|
|
255
|
+
// Absent by default: `undefined` here is identical to omitting the field, and
|
|
256
|
+
// `validatePendOperations` then skips the validation step entirely.
|
|
257
|
+
validator: options.validatorFactory?.(index, peerId)
|
|
145
258
|
});
|
|
259
|
+
nodes.push(meshNode);
|
|
146
260
|
}
|
|
147
|
-
// Phase 2:
|
|
148
|
-
const keyNetwork = new MockMeshKeyNetwork(nodes, options.responsibilityK, failures);
|
|
261
|
+
// Phase 2: coordinator repos (needs all nodes for routing; key network built in phase 1)
|
|
149
262
|
const createClusterClient = (targetPeerId) => {
|
|
150
263
|
const target = nodes.find(n => n.peerId.equals(targetPeerId));
|
|
151
264
|
if (!target) {
|
|
@@ -178,39 +291,38 @@ export async function createMesh(nodeCount, options) {
|
|
|
178
291
|
if (!target)
|
|
179
292
|
return undefined;
|
|
180
293
|
const result = await target.storageRepo.get({ blockIds: [blockId], context }, { skipClusterFetch: true });
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
publicKey: u8ToString(node.peerId.publicKey.raw, 'base64url')
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
return peers;
|
|
196
|
-
}
|
|
294
|
+
const latest = result[blockId]?.state?.latest;
|
|
295
|
+
if (!latest)
|
|
296
|
+
return undefined;
|
|
297
|
+
// The commit proof rides along exactly as it does in production, and through the SAME
|
|
298
|
+
// lookup `serveBlockArchive` uses (`servableProof`) rather than a hand-rolled one — a
|
|
299
|
+
// harness that attached proofs by its own rule would let every mesh-tier test exercise a
|
|
300
|
+
// certification path real peers do not have, or miss one they do. Production reads the
|
|
301
|
+
// proof out of the served archive; the harness reads the sibling's repo directly, so
|
|
302
|
+
// sharing the lookup is what keeps the two answers identical.
|
|
303
|
+
const proof = await servableProof(target.storageRepo, blockId, latest);
|
|
304
|
+
return proof ? { ...latest, proof } : latest;
|
|
197
305
|
};
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
306
|
+
// The node's own self-including (and partition-aware) key-network view, built in phase 1 —
|
|
307
|
+
// the SAME instance the member's admission derivation reads, matching real
|
|
308
|
+
// Libp2pKeyPeerNetwork behavior.
|
|
309
|
+
const nodeKeyNetwork = nodeKeyNetworkByPeer.get(node.peerId.toString());
|
|
310
|
+
const factory = coordinatorRepo(nodeKeyNetwork, createClusterClient,
|
|
311
|
+
// The SAME resolved policy the member above was built from, spread the way
|
|
312
|
+
// `libp2p-node-base` spreads it into its coordinator factory — carrying
|
|
313
|
+
// `repairCorroborationClusterSize` (the repair floor's yardstick, DEFAULT_CLUSTER_SIZE
|
|
314
|
+
// when the mesh declared nothing), the production `minAbsoluteClusterSize` (2, not the
|
|
315
|
+
// coordinator's own fallback of 3), and the `allowUnvalidatedSmallCluster` gate —
|
|
316
|
+
// ARMED (false) unless the mesh opted out at its call site.
|
|
317
|
+
{ ...policy });
|
|
206
318
|
node.coordinatorRepo = factory({
|
|
207
319
|
storageRepo: node.storageRepo,
|
|
208
320
|
localCluster: node.clusterMember,
|
|
209
321
|
localPeerId: node.peerId,
|
|
210
322
|
clusterLatestCallback,
|
|
211
|
-
// The read path's transfer mechanism — the
|
|
212
|
-
// mirroring how `libp2p-node-base` shares one `reconcileBlock` between both.
|
|
213
|
-
acquireBlockFromCohort:
|
|
323
|
+
// The read path's transfer mechanism — the SAME instance the member uses on the commit
|
|
324
|
+
// path, mirroring how `libp2p-node-base` shares one `reconcileBlock` between both.
|
|
325
|
+
acquireBlockFromCohort: reconcileByPeer.get(node.peerId.toString())
|
|
214
326
|
});
|
|
215
327
|
}
|
|
216
328
|
return { nodes, failures, keyNetwork };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh-harness.js","sourceRoot":"","sources":["../../../src/testing/mesh-harness.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,aAAa,EAA+B,MAAM,4BAA4B,CAAC;AACvG,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,eAAe,EAA8B,MAAM,6BAA6B,CAAC;AAE1F,OAAO,EAAE,mBAAmB,EAAkB,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AAsCrD,MAAM,eAAe;IACpB,KAAK,CAAC,OAAO,CAAC,OAAe,EAAE,SAAiB;QAC/C,OAAO,EAAE,CAAC;IACX,CAAC;CACD;AAED;;;;GAIG;AACH,MAAM,kBAAkB;IAEL;IACA;IACA;IAHlB,YACkB,KAAiB,EACjB,eAAuB,EACvB,WAA8B,EAAE;QAFhC,UAAK,GAAL,KAAK,CAAY;QACjB,oBAAe,GAAf,eAAe,CAAQ;QACvB,aAAQ,GAAR,QAAQ,CAAwB;IAC/C,CAAC;IAEJ,KAAK,CAAC,eAAe,CAAC,GAAe,EAAE,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AE,OAAO,CAAC,SAAS,IAAI,KAAK;QACrC,sBAAsB,EAAE,OAAO,CAAC,sBAAsB,IAAI,KAAK;QAC/D,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,OAAO,EAAE,CAAC,MAAgB,EAAE,EAAE;YAC7B,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC/C,IAAI,CAAC,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,gBAAgB,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;YAChE,OAAO,IAAI,CAAC;QACb,CAAC;KACD,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,IAAU,EAAE,UAAkC,EAAE,EAA4B,EAAE;IACrH,MAAM,WAAW,GAAG,IAAI,GAAG,EAAuB,CAAC;IACnD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QAC/B,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,sBAAsB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,WAAW,CAAC;AACpB,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BlockCommitProof } from '../cluster/commit-proof.js';
|
|
1
2
|
import type { IRawStorage } from '../storage/i-raw-storage.js';
|
|
2
3
|
/**
|
|
3
4
|
* What `makeStorage` hands each conformance case: a fresh `IRawStorage` and a
|
|
@@ -8,6 +9,13 @@ export interface ConformanceHarness {
|
|
|
8
9
|
storage: IRawStorage;
|
|
9
10
|
cleanup: () => Promise<void>;
|
|
10
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* A structurally-valid {@link BlockCommitProof} carrying a recognizable marker. Storage-level
|
|
14
|
+
* suites never VERIFY a proof (that is `commit-proof.spec.ts`); they only assert the proofs
|
|
15
|
+
* store round-trips a proof-shaped object and keeps it in its own keyspace, so the votes are
|
|
16
|
+
* deliberately empty. Exported so every proofs-store suite shares one shape.
|
|
17
|
+
*/
|
|
18
|
+
export declare const makeProof: (marker: string) => BlockCommitProof;
|
|
11
19
|
/**
|
|
12
20
|
* Registers a `describe(name, ...)` block asserting that a raw-storage backend
|
|
13
21
|
* behaves identically to every other backend. This is the ONE maintained parity
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"raw-storage-conformance.d.ts","sourceRoot":"","sources":["../../../src/testing/raw-storage-conformance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"raw-storage-conformance.d.ts","sourceRoot":"","sources":["../../../src/testing/raw-storage-conformance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAM/D;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAClC,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7B;AAmBD;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,QAAQ,MAAM,KAAG,gBASzC,CAAC;AAQH;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CACvC,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,GAC5C,IAAI,CAyeN"}
|