@optimystic/db-core 1.0.0-beta.3 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/cluster/structs.d.ts +30 -6
- package/dist/src/cluster/structs.d.ts.map +1 -1
- package/dist/src/cluster/structs.js +5 -3
- package/dist/src/cluster/structs.js.map +1 -1
- package/dist/src/cohort-topic/antidos/bootstrap-evidence-envelope.d.ts +2 -1
- package/dist/src/cohort-topic/antidos/bootstrap-evidence-envelope.d.ts.map +1 -1
- package/dist/src/cohort-topic/antidos/bootstrap-evidence-envelope.js +10 -3
- package/dist/src/cohort-topic/antidos/bootstrap-evidence-envelope.js.map +1 -1
- package/dist/src/cohort-topic/wire/codec.d.ts.map +1 -1
- package/dist/src/cohort-topic/wire/codec.js +8 -2
- package/dist/src/cohort-topic/wire/codec.js.map +1 -1
- package/dist/src/collection/collection.d.ts +439 -34
- package/dist/src/collection/collection.d.ts.map +1 -1
- package/dist/src/collection/collection.js +843 -148
- package/dist/src/collection/collection.js.map +1 -1
- package/dist/src/collection/struct.d.ts +109 -4
- package/dist/src/collection/struct.d.ts.map +1 -1
- package/dist/src/collection/struct.js +88 -1
- package/dist/src/collection/struct.js.map +1 -1
- package/dist/src/collections/diary/diary.d.ts +6 -2
- package/dist/src/collections/diary/diary.d.ts.map +1 -1
- package/dist/src/collections/diary/diary.js +5 -2
- package/dist/src/collections/diary/diary.js.map +1 -1
- package/dist/src/collections/tree/struct.d.ts +124 -16
- package/dist/src/collections/tree/struct.d.ts.map +1 -1
- package/dist/src/collections/tree/struct.js +86 -11
- package/dist/src/collections/tree/struct.js.map +1 -1
- package/dist/src/collections/tree/tree.d.ts +13 -3
- package/dist/src/collections/tree/tree.d.ts.map +1 -1
- package/dist/src/collections/tree/tree.js +106 -40
- package/dist/src/collections/tree/tree.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/matchmaking/wire.d.ts.map +1 -1
- package/dist/src/matchmaking/wire.js +8 -2
- package/dist/src/matchmaking/wire.js.map +1 -1
- package/dist/src/network/durability.d.ts +45 -0
- package/dist/src/network/durability.d.ts.map +1 -0
- package/dist/src/network/durability.js +114 -0
- package/dist/src/network/durability.js.map +1 -0
- package/dist/src/network/i-key-network.d.ts +14 -6
- package/dist/src/network/i-key-network.d.ts.map +1 -1
- package/dist/src/network/index.d.ts +3 -0
- package/dist/src/network/index.d.ts.map +1 -1
- package/dist/src/network/index.js +3 -0
- package/dist/src/network/index.js.map +1 -1
- package/dist/src/network/lineage.d.ts +39 -0
- package/dist/src/network/lineage.d.ts.map +1 -0
- package/dist/src/network/lineage.js +61 -0
- package/dist/src/network/lineage.js.map +1 -0
- package/dist/src/network/routing-key.d.ts +24 -0
- package/dist/src/network/routing-key.d.ts.map +1 -0
- package/dist/src/network/routing-key.js +9 -0
- package/dist/src/network/routing-key.js.map +1 -0
- package/dist/src/network/stale-failure.d.ts +5 -1
- package/dist/src/network/stale-failure.d.ts.map +1 -1
- package/dist/src/network/stale-failure.js +5 -1
- package/dist/src/network/stale-failure.js.map +1 -1
- package/dist/src/network/struct.d.ts +151 -8
- package/dist/src/network/struct.d.ts.map +1 -1
- package/dist/src/network/struct.js.map +1 -1
- package/dist/src/reactivity/wire.d.ts.map +1 -1
- package/dist/src/reactivity/wire.js +8 -2
- package/dist/src/reactivity/wire.js.map +1 -1
- package/dist/src/testing/test-transactor.d.ts +64 -7
- package/dist/src/testing/test-transactor.d.ts.map +1 -1
- package/dist/src/testing/test-transactor.js +150 -23
- package/dist/src/testing/test-transactor.js.map +1 -1
- package/dist/src/transaction/coordinator.d.ts +141 -21
- package/dist/src/transaction/coordinator.d.ts.map +1 -1
- package/dist/src/transaction/coordinator.js +408 -122
- package/dist/src/transaction/coordinator.js.map +1 -1
- package/dist/src/transaction/errors.d.ts +39 -10
- package/dist/src/transaction/errors.d.ts.map +1 -1
- package/dist/src/transaction/errors.js +34 -9
- package/dist/src/transaction/errors.js.map +1 -1
- package/dist/src/transaction/index.d.ts +1 -0
- package/dist/src/transaction/index.d.ts.map +1 -1
- package/dist/src/transaction/index.js.map +1 -1
- package/dist/src/transactor/block-floors.d.ts +78 -0
- package/dist/src/transactor/block-floors.d.ts.map +1 -0
- package/dist/src/transactor/block-floors.js +62 -0
- package/dist/src/transactor/block-floors.js.map +1 -0
- package/dist/src/transactor/change-notifier.d.ts +43 -0
- package/dist/src/transactor/change-notifier.d.ts.map +1 -1
- package/dist/src/transactor/change-notifier.js +3 -0
- package/dist/src/transactor/change-notifier.js.map +1 -1
- package/dist/src/transactor/index.d.ts +1 -0
- package/dist/src/transactor/index.d.ts.map +1 -1
- package/dist/src/transactor/index.js +1 -0
- package/dist/src/transactor/index.js.map +1 -1
- package/dist/src/transactor/network-transactor.d.ts +43 -6
- package/dist/src/transactor/network-transactor.d.ts.map +1 -1
- package/dist/src/transactor/network-transactor.js +279 -86
- package/dist/src/transactor/network-transactor.js.map +1 -1
- package/dist/src/transactor/transactor-source.d.ts +94 -4
- package/dist/src/transactor/transactor-source.d.ts.map +1 -1
- package/dist/src/transactor/transactor-source.js +120 -42
- package/dist/src/transactor/transactor-source.js.map +1 -1
- package/dist/src/transactor/transactor.d.ts +14 -1
- package/dist/src/transactor/transactor.d.ts.map +1 -1
- package/dist/src/transform/atomic.d.ts.map +1 -1
- package/dist/src/transform/atomic.js +12 -9
- package/dist/src/transform/atomic.js.map +1 -1
- package/dist/src/transform/base-pins.d.ts +50 -17
- package/dist/src/transform/base-pins.d.ts.map +1 -1
- package/dist/src/transform/base-pins.js +58 -11
- package/dist/src/transform/base-pins.js.map +1 -1
- package/dist/src/transform/cache-source.d.ts +75 -11
- package/dist/src/transform/cache-source.d.ts.map +1 -1
- package/dist/src/transform/cache-source.js +162 -36
- package/dist/src/transform/cache-source.js.map +1 -1
- package/dist/src/transform/digest.d.ts +8 -1
- package/dist/src/transform/digest.d.ts.map +1 -1
- package/dist/src/transform/digest.js +19 -9
- package/dist/src/transform/digest.js.map +1 -1
- package/dist/src/transform/helpers.d.ts +6 -2
- package/dist/src/transform/helpers.d.ts.map +1 -1
- package/dist/src/transform/helpers.js +8 -3
- package/dist/src/transform/helpers.js.map +1 -1
- package/dist/src/transform/tracker.d.ts +94 -14
- package/dist/src/transform/tracker.d.ts.map +1 -1
- package/dist/src/transform/tracker.js +222 -68
- package/dist/src/transform/tracker.js.map +1 -1
- package/dist/src/utility/structural-equals.d.ts +38 -0
- package/dist/src/utility/structural-equals.d.ts.map +1 -0
- package/dist/src/utility/structural-equals.js +77 -0
- package/dist/src/utility/structural-equals.js.map +1 -0
- package/package.json +2 -2
- package/src/cluster/structs.ts +28 -7
- package/src/cohort-topic/antidos/bootstrap-evidence-envelope.ts +260 -253
- package/src/cohort-topic/wire/codec.ts +222 -216
- package/src/collection/collection.ts +960 -157
- package/src/collection/struct.ts +99 -4
- package/src/collections/diary/diary.ts +71 -68
- package/src/collections/tree/struct.ts +155 -23
- package/src/collections/tree/tree.ts +127 -40
- package/src/index.ts +1 -1
- package/src/matchmaking/wire.ts +8 -2
- package/src/network/durability.ts +123 -0
- package/src/network/i-key-network.ts +60 -52
- package/src/network/index.ts +10 -7
- package/src/network/lineage.ts +80 -0
- package/src/network/routing-key.ts +27 -0
- package/src/network/stale-failure.ts +5 -1
- package/src/network/struct.ts +156 -8
- package/src/reactivity/wire.ts +230 -224
- package/src/testing/test-transactor.ts +152 -24
- package/src/transaction/coordinator.ts +470 -131
- package/src/transaction/errors.ts +34 -9
- package/src/transaction/index.ts +1 -0
- package/src/transactor/block-floors.ts +105 -0
- package/src/transactor/change-notifier.ts +129 -80
- package/src/transactor/index.ts +1 -0
- package/src/transactor/network-transactor.ts +297 -89
- package/src/transactor/transactor-source.ts +131 -42
- package/src/transactor/transactor.ts +13 -1
- package/src/transform/atomic.ts +25 -22
- package/src/transform/base-pins.ts +76 -18
- package/src/transform/cache-source.ts +327 -194
- package/src/transform/digest.ts +21 -10
- package/src/transform/helpers.ts +8 -3
- package/src/transform/tracker.ts +423 -270
- package/src/utility/structural-equals.ts +72 -0
- package/dist/src/utility/block-id-to-bytes.d.ts +0 -3
- package/dist/src/utility/block-id-to-bytes.d.ts.map +0 -1
- package/dist/src/utility/block-id-to-bytes.js +0 -7
- package/dist/src/utility/block-id-to-bytes.js.map +0 -1
- package/src/utility/block-id-to-bytes.ts +0 -8
|
@@ -29,11 +29,14 @@ export type PendRequest = ActionTransforms & {
|
|
|
29
29
|
* 'r' is return, which fails but returns the pending ActionIds and their transforms */
|
|
30
30
|
policy: 'c' | 'f' | 'r';
|
|
31
31
|
/**
|
|
32
|
-
* Present only on
|
|
33
|
-
* transaction to re-execute plus the
|
|
34
|
-
*
|
|
35
|
-
* therefore not re-checkable —
|
|
36
|
-
*
|
|
32
|
+
* Present only on a validated multi-collection pend (`TransactionCoordinator.pendCollection`
|
|
33
|
+
* under its default `pendValidation: 'transaction'`): the transaction to re-execute plus the
|
|
34
|
+
* hash of ALL operations across all blocks it must produce. Absent on every pend that carries
|
|
35
|
+
* bare transforms and is therefore not re-checkable — the single-collection `Collection.sync`
|
|
36
|
+
* path, and a coordinator built with `pendValidation: 'none'` (the Quereus adapter's legacy
|
|
37
|
+
* multi-tree commit, which has no statements to re-execute) — see
|
|
38
|
+
* `ClusterConsensusConfig.unvalidatablePendPolicy` for what a validating receiver does with
|
|
39
|
+
* that shape. ONE optional pair, deliberately: "transaction
|
|
37
40
|
* without its hash" (or the reverse) was a state the old two independent optional fields
|
|
38
41
|
* permitted and no producer ever created — and a receiver whose guard required both could be
|
|
39
42
|
* talked out of validating by a sender that omitted one.
|
|
@@ -47,25 +50,99 @@ export type PendRequest = ActionTransforms & {
|
|
|
47
50
|
/** For multi-collection transactions: supercluster nominees for consensus */
|
|
48
51
|
superclusterNominees?: PeerId[];
|
|
49
52
|
/**
|
|
50
|
-
* Aged, advisory retry priority for
|
|
51
|
-
*
|
|
53
|
+
* Aged, advisory retry priority for a pend that carries no transaction (default 0 when absent).
|
|
54
|
+
* A validated multi-collection pend instead carries priority on the transaction inside
|
|
52
55
|
* {@link PendRequest.validation} ({@link Transaction.priority}); this top-level field is the
|
|
53
|
-
* carrier for a `Collection.sync` pend,
|
|
56
|
+
* carrier for every pend without one — a `Collection.sync` pend, and an unvalidated
|
|
57
|
+
* coordinator pend (`pendValidation: 'none'`). A cluster member reads whichever is present as the first
|
|
54
58
|
* `resolveRace` tiebreak. FAIRNESS-ONLY: it rides inside the signed cluster `message` (so it is
|
|
55
59
|
* integrity-protected in transit) but MUST NOT affect the operations hash, stale-read checks, or
|
|
56
60
|
* validity — a stale pend is still rejected regardless of priority.
|
|
57
61
|
*/
|
|
58
62
|
priority?: number;
|
|
63
|
+
/**
|
|
64
|
+
* Per block, the committed revision of the base the author's update operations were computed
|
|
65
|
+
* against (`Tracker.stagedBaseRevs`). Present for a block whose transform is update-only and
|
|
66
|
+
* whose base the author knows; never for an inserted or deleted block (base-independent), and
|
|
67
|
+
* absent for a block the author did not read through a source that reports revisions. Omitted
|
|
68
|
+
* entirely when empty (`baseRevsField`): the request is hashed verbatim into every cohort
|
|
69
|
+
* signature preimage, so a pend that declares nothing must serialize exactly as it did before
|
|
70
|
+
* the field existed. Action-wide here; the transactor narrows it to each per-coordinator batch's
|
|
71
|
+
* own block ids at send time, exactly as it narrows {@link CommitRequest.blockDigests}.
|
|
72
|
+
*
|
|
73
|
+
* Storage keeps it beside the pending record (`BlockMetadata.pendingBases` in db-p2p), so every
|
|
74
|
+
* later step that applies the record can refuse to apply it to a different version of the block
|
|
75
|
+
* — including the read-driven promotion in `StorageRepo.get`, which has no commit message to
|
|
76
|
+
* consult. The commit's own `blockDigests[id].baseRev` is now the fallback for a record whose
|
|
77
|
+
* pend named no base, not the primary check.
|
|
78
|
+
*/
|
|
79
|
+
baseRevs?: BlockBaseRevs;
|
|
59
80
|
};
|
|
60
81
|
export type BlockActionStatus = ActionBlocks & {
|
|
61
82
|
statuses: ('pending' | 'committed' | 'checkpointed' | 'aborted' | 'committed-invalidated')[];
|
|
62
83
|
};
|
|
84
|
+
/** How widely a successful write is known to be held at the moment it was acknowledged. */
|
|
85
|
+
export type DurabilityQuorum =
|
|
86
|
+
/** Every member of the resolved cohort confirmed it holds the revision. */
|
|
87
|
+
'full'
|
|
88
|
+
/** A strict majority confirmed — the acknowledgement bar — but at least one member did not.
|
|
89
|
+
* Also the class of a torn action whose cohort confirmed everything it was asked for
|
|
90
|
+
* (`withTornBlocks` clamps `full` down to this; `torn` then names the blocks, and `unconfirmed`
|
|
91
|
+
* may be empty). */
|
|
92
|
+
| 'majority'
|
|
93
|
+
/** The cohort resolved, and it is this node alone. Nobody else holds the revision yet. */
|
|
94
|
+
| 'local'
|
|
95
|
+
/** The cohort did NOT resolve: the lookup threw, or named nobody, or named a single peer that
|
|
96
|
+
* is not this node. The write is on this node's storage and the network was never consulted.
|
|
97
|
+
* Deliberately NOT `local`: a genuine cohort of one is a correct, complete write, whereas this
|
|
98
|
+
* is a write whose correct destination is unknown. */
|
|
99
|
+
| 'unrouted';
|
|
100
|
+
/** What the answering layer knows about who holds a successful write. Each layer refines it:
|
|
101
|
+
* `StorageRepo` answers for itself alone, `CoordinatorRepo` answers for the cohort the write ran
|
|
102
|
+
* on, and `NetworkTransactor` merges the per-coordinator answers into one action-level answer.
|
|
103
|
+
* Never a policy input — read it to DISPLAY or to REPAIR, never to decide acceptance.
|
|
104
|
+
*
|
|
105
|
+
* The only "this write is completely saved" test is `isFullyDurable` (`network/durability.ts`);
|
|
106
|
+
* do not compare `quorum` by hand, because a `full` cohort report can still sit on an action that
|
|
107
|
+
* abandoned blocks (`torn`). */
|
|
108
|
+
export type WriteDurability = {
|
|
109
|
+
readonly quorum: DurabilityQuorum;
|
|
110
|
+
/** Cohort members confirmed to hold the write, including this node when it holds it.
|
|
111
|
+
* For a commit this means "reported that its storage durably holds the revision"; for a pend
|
|
112
|
+
* it means "accepted the pending record". The two are NOT comparable — a pend confers no
|
|
113
|
+
* storage durability (see the note in `CoordinatorRepo.pendThroughCluster`). */
|
|
114
|
+
readonly confirmed: number;
|
|
115
|
+
/** Size of the cohort the write ran on. Zero exactly when `quorum` is 'unrouted'. */
|
|
116
|
+
readonly cohort: number;
|
|
117
|
+
/** Cohort members that did not confirm, by peer-id string. Empty when `quorum` is 'full'.
|
|
118
|
+
* ABSENT (not empty) when the answering layer could not name the cohort — an empty array
|
|
119
|
+
* here means "named the cohort, nobody is missing". */
|
|
120
|
+
readonly unconfirmed?: readonly string[];
|
|
121
|
+
/** The cohort the write ran on, by peer-id string. Absent where the answering layer has no
|
|
122
|
+
* cohort view at all (a bare `StorageRepo` verdict). */
|
|
123
|
+
readonly cohortPeerIds?: readonly string[];
|
|
124
|
+
/** Present only on an action-level result assembled from MORE THAN ONE distinct coordinator
|
|
125
|
+
* answer: the other answers. Identical answers are collapsed (`mergeDurability`), so a healthy
|
|
126
|
+
* single-cohort commit has none; one cohort answering differently for two batches appears
|
|
127
|
+
* twice. The scalar fields above always describe the WEAKEST answer, so a consumer that reads
|
|
128
|
+
* only them is reading the binding constraint and is never over-optimistic. */
|
|
129
|
+
readonly otherCohorts?: readonly WriteDurability[];
|
|
130
|
+
/** Blocks this action wrote that are NOT committed — a torn sweep abandoned and cancelled them
|
|
131
|
+
* (`NetworkTransactor.cancelAbandonedSweepBlocks`). Action-level commit results only.
|
|
132
|
+
* These blocks NEVER heal by replication: their transform is gone, and only the writer
|
|
133
|
+
* re-driving the action puts them back. */
|
|
134
|
+
readonly torn?: readonly BlockId[];
|
|
135
|
+
};
|
|
63
136
|
export type PendSuccess = {
|
|
64
137
|
success: true;
|
|
65
138
|
/** List of already pending actions that were found on blocks touched by this pend */
|
|
66
139
|
pending: ActionPending[];
|
|
67
140
|
/** The affected blocks */
|
|
68
141
|
blockIds: BlockId[];
|
|
142
|
+
/** Who accepted the pending record. REQUIRED, not optional: an absent field would read as plain
|
|
143
|
+
* success, which is exactly the ambiguity this field exists to remove (a solo write, a write
|
|
144
|
+
* whose cohort never resolved, and a quorum write all used to answer `{ success: true }`). */
|
|
145
|
+
durability: WriteDurability;
|
|
69
146
|
};
|
|
70
147
|
export type StaleFailure = {
|
|
71
148
|
success: false;
|
|
@@ -115,6 +192,11 @@ export type BlockContentDigest = {
|
|
|
115
192
|
/** Per-block content declarations riding on a commit. Optional per id: a block the client cannot
|
|
116
193
|
* digest without a network read is simply omitted, and falls back to corroboration downstream. */
|
|
117
194
|
export type BlockContentDigests = Record<BlockId, BlockContentDigest>;
|
|
195
|
+
/** Per block, the committed revision its update operations were computed against — the shape
|
|
196
|
+
* `Tracker.stagedBaseRevs` produces and {@link PendRequest.baseRevs} carries. Optional per id: an
|
|
197
|
+
* inserted or deleted block is base-independent and never named; a block updated without a known
|
|
198
|
+
* base is simply omitted. */
|
|
199
|
+
export type BlockBaseRevs = Record<BlockId, number>;
|
|
118
200
|
export type CommitRequest = ActionBlocks & {
|
|
119
201
|
/** The header block of the collection, present only when this commit creates the collection
|
|
120
202
|
* (the header is a fresh insert). Collection-identifying metadata, not an ordering signal —
|
|
@@ -158,6 +240,11 @@ export type CommitSuccess = {
|
|
|
158
240
|
success: true;
|
|
159
241
|
/** If present, the identified collection acts as the coordinator for the multi-collection transaction */
|
|
160
242
|
coordinatorId?: CollectionId;
|
|
243
|
+
/** Who holds the committed revision. REQUIRED for the same reason as {@link PendSuccess.durability}:
|
|
244
|
+
* a quorum commit, a solo commit, a commit whose cohort lookup failed, and a torn multi-block
|
|
245
|
+
* commit all answered `{ success: true }` before this field existed, and a writer could not tell
|
|
246
|
+
* them apart (GitHub #19). Test it through `isFullyDurable`, never by comparing `quorum`. */
|
|
247
|
+
durability: WriteDurability;
|
|
161
248
|
};
|
|
162
249
|
export type BlockActionState = {
|
|
163
250
|
/** The latest action that has been committed */
|
|
@@ -168,6 +255,59 @@ export type BlockActionState = {
|
|
|
168
255
|
export type BlockGets = {
|
|
169
256
|
blockIds: BlockId[];
|
|
170
257
|
context?: ActionContext;
|
|
258
|
+
/** Per block, the lowest revision the ASKER can accept for it — its floor. Omit a block that
|
|
259
|
+
* has none; omit the field entirely when no block does.
|
|
260
|
+
*
|
|
261
|
+
* A floor is knowledge only the asker holds: a collection that walked the log entry
|
|
262
|
+
* "action A, committed at revision r, changed block X" knows a read of X at a context at or
|
|
263
|
+
* above `r` must come back materialized at `r` or later, while the repo answering may honestly
|
|
264
|
+
* believe its older copy is current. `TransactorSource.tryGet` fills this from the collection's
|
|
265
|
+
* `BlockFloors`; `NetworkTransactor.get` treats an answer under a block's floor as NOT answered,
|
|
266
|
+
* so it earns the same second-chance round against a different coordinator that `unavailable`
|
|
267
|
+
* and `unconfirmedAheadRev` earn.
|
|
268
|
+
*
|
|
269
|
+
* CLIENT-SIDE HINT, never on the wire: `NetworkTransactor.get` builds its own
|
|
270
|
+
* `{ blockIds, context }` for each downstream `IRepo.get`, so this field reaches no peer and no
|
|
271
|
+
* coordinator's freshness decision. An `ITransactor` that ignores it (`TestTransactor`, the
|
|
272
|
+
* reference peer's) stays correct, because the reader-side check that actually enforces the
|
|
273
|
+
* floor runs on the merged answer either way (`TransactorSource` / `BlockFloorCheck`).
|
|
274
|
+
*
|
|
275
|
+
* NOTE: the retry `NetworkTransactor.get` runs is per BATCH, not per block, so one below-floor
|
|
276
|
+
* block re-asks every block that shared its coordinator. Costs nothing today — `tryGet` asks
|
|
277
|
+
* for one block per request, so this map never holds more than one entry — but a read source
|
|
278
|
+
* that batches would pay it. Split the retry payload down to the failing block ids then. */
|
|
279
|
+
floors?: Record<BlockId, number>;
|
|
280
|
+
/** Ask the answering repo whether each block's CURRENT content was built from this committed
|
|
281
|
+
* action at this revision; it answers per block in {@link GetBlockResult.lineage}. On the wire,
|
|
282
|
+
* unlike `floors`. A repo that predates the field leaves `lineage` absent, which every consumer
|
|
283
|
+
* reads as `unknown`. Asked only by a writer deciding whether its own superseded write is saved
|
|
284
|
+
* (`ITransactor.getLineage`); an ordinary read never sets it. */
|
|
285
|
+
lineageOf?: ActionRev;
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* Whether a block's current content was BUILT FROM a given committed `(actionId, rev)` — the
|
|
289
|
+
* write's transform is part of what the block holds now, even though later actions have since
|
|
290
|
+
* taken later revisions.
|
|
291
|
+
*
|
|
292
|
+
* - `contains` — it was. Holding that exact revision as the latest counts.
|
|
293
|
+
* - `excludes` — it provably was not: another action holds that revision of the block, or the
|
|
294
|
+
* block's history spans that revision without it. Nothing can land the write there any more.
|
|
295
|
+
* - `behind` — the block has not reached that revision (or does not exist). The write is not
|
|
296
|
+
* there, and could only get there through one of its own pending records.
|
|
297
|
+
* - `unknown` — not established either way.
|
|
298
|
+
*
|
|
299
|
+
* One repo answers from its own records only ({@link GetBlockResult.lineage}); a transactor
|
|
300
|
+
* answers for the block's cohort ({@link ActionLineage}).
|
|
301
|
+
*/
|
|
302
|
+
export type BlockLineage = 'contains' | 'excludes' | 'behind' | 'unknown';
|
|
303
|
+
/** A cohort-level answer to "is this committed write part of what these blocks hold now?" — see
|
|
304
|
+
* `ITransactor.getLineage`. */
|
|
305
|
+
export type ActionLineage = {
|
|
306
|
+
/** One answer per requested block id, in request order. */
|
|
307
|
+
blocks: BlockLineage[];
|
|
308
|
+
/** Who holds the write, present exactly when EVERY block answered `contains`: the weakest
|
|
309
|
+
* block's cohort report, by the same rule a commit's durability is merged. */
|
|
310
|
+
durability?: WriteDurability;
|
|
171
311
|
};
|
|
172
312
|
/** Why a repo could not establish whether a block exists. Present ONLY when the repo
|
|
173
313
|
* knows its own answer is a guess; an absent field is an authoritative answer. */
|
|
@@ -231,6 +371,9 @@ export type GetBlockResult = {
|
|
|
231
371
|
* the content here is real, it may just be behind. Absent = confirmed, so every
|
|
232
372
|
* producer that omits it keeps its meaning. */
|
|
233
373
|
unconfirmedAheadRev?: number;
|
|
374
|
+
/** This repo's answer to {@link BlockGets.lineageOf}, from its OWN records only — no cohort
|
|
375
|
+
* view. Absent when the question was not asked, or the repo predates it. */
|
|
376
|
+
lineage?: BlockLineage;
|
|
234
377
|
};
|
|
235
378
|
/**
|
|
236
379
|
* Thrown by a block read when the responsible repo could not determine whether the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"struct.d.ts","sourceRoot":"","sources":["../../../src/network/struct.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAClG,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,MAAM,YAAY,GAAG;IAC1B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,QAAQ,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,UAAU,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC7B,QAAQ,EAAE,QAAQ,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG;IAC5C;;;2FAGuF;IACvF,MAAM,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IACxB
|
|
1
|
+
{"version":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AAC/C,MAAM,MAAM,aAAa,GAAG,gBAAgB,CAAC;AAC7C,8CAA8C;AAC9C,MAAM,MAAM,YAAY,GAAG,eAAe,CAAC;AAC3C,4CAA4C;AAC5C,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"struct.js","sourceRoot":"","sources":["../../../src/network/struct.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"struct.js","sourceRoot":"","sources":["../../../src/network/struct.ts"],"names":[],"mappings":"AA8ZA;;;;;GAKG;AACH,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC1B;IAA2B;IAAhD,YAAqB,OAAgB,EAAW,MAA8B;QAC7E,KAAK,CAAC,SAAS,OAAO,oBAAoB,MAAM,mDAAmD,CAAC,CAAC;QADjF,YAAO,GAAP,OAAO,CAAS;QAAW,WAAM,GAAN,MAAM,CAAwB;QAE7E,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACrC,CAAC;CACD;AAED;;;;;;;GAOG;AACH,MAAM,OAAO,uBAAwB,SAAQ,KAAK;IAC5B;IAA2B;IAAhD,YAAqB,OAAgB,EAAW,UAAkB;QACjE,KAAK,CAAC,SAAS,OAAO,4CAA4C,UAAU,wDAAwD,CAAC,CAAC;QADlH,YAAO,GAAP,OAAO,CAAS;QAAW,eAAU,GAAV,UAAU,CAAQ;QAEjE,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IACvC,CAAC;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../../src/reactivity/wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;
|
|
1
|
+
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../../src/reactivity/wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAyBH,+EAA+E;AAC/E,eAAO,MA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AAK,EAAE,UAAU,EAAE,QAAQ,GAAE,MAA4C,GAAG,qBAAqB,CAE1I;AAyBD,wFAAwF;AACxF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,CA4BrE;AAED,sHAAsH;AACtH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE,CAKxF;AAED,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,cAAc,EAAE,eAAe,GAAE,MAAkC,GAAG,UAAU,CAEzH;AAED,6DAA6D;AAC7D,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,UAAU,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,cAAc,CAEhG"}
|
|
@@ -24,7 +24,10 @@
|
|
|
24
24
|
import { decodeCohortMessage, encodeCohortMessage, DEFAULT_MAX_MESSAGE_BYTES, } from "../cohort-topic/wire/codec.js";
|
|
25
25
|
import { asObject, b64urlField, failWire as fail, reqBool, reqFiniteNumber, reqIntInRange, reqString, reqStringArray, requireV1, } from "./wire-validate.js";
|
|
26
26
|
const utf8Encoder = new TextEncoder();
|
|
27
|
-
|
|
27
|
+
// Built on first use, not at module load: Hermes (React Native) has no native `TextDecoder`, so a
|
|
28
|
+
// module-scope construction fails the import itself whenever it runs ahead of the host's polyfill.
|
|
29
|
+
let utf8DecoderInstance;
|
|
30
|
+
const utf8Decoder = () => utf8DecoderInstance ??= new TextDecoder("utf-8", { fatal: true });
|
|
28
31
|
/** Ceiling for an opaque subscribe app payload, guarding decode allocation. */
|
|
29
32
|
export const DEFAULT_MAX_SUBSCRIBE_PAYLOAD_BYTES = 64 * 1024;
|
|
30
33
|
// --- validation helpers ---
|
|
@@ -66,9 +69,12 @@ function parseJsonBytes(bytes, maxBytes, what) {
|
|
|
66
69
|
if (bytes.length > maxBytes) {
|
|
67
70
|
fail(`${what}: payload ${bytes.length} exceeds max ${maxBytes} bytes`);
|
|
68
71
|
}
|
|
72
|
+
// Fetched outside the try, so a missing `TextDecoder` polyfill surfaces as itself rather than as
|
|
73
|
+
// "not valid UTF-8".
|
|
74
|
+
const decoder = utf8Decoder();
|
|
69
75
|
let text;
|
|
70
76
|
try {
|
|
71
|
-
text =
|
|
77
|
+
text = decoder.decode(bytes);
|
|
72
78
|
}
|
|
73
79
|
catch {
|
|
74
80
|
fail(`${what}: payload is not valid UTF-8`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wire.js","sourceRoot":"","sources":["../../../src/reactivity/wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EACN,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,GACzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACN,QAAQ,EACR,WAAW,EACX,QAAQ,IAAI,IAAI,EAChB,OAAO,EACP,eAAe,EACf,aAAa,EACb,SAAS,EACT,cAAc,EACd,SAAS,GACT,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;AACtC,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"wire.js","sourceRoot":"","sources":["../../../src/reactivity/wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EACN,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,GACzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACN,QAAQ,EACR,WAAW,EACX,QAAQ,IAAI,IAAI,EAChB,OAAO,EACP,eAAe,EACf,aAAa,EACb,SAAS,EACT,cAAc,EACd,SAAS,GACT,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;AACtC,kGAAkG;AAClG,mGAAmG;AACnG,IAAI,mBAA4C,CAAC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est, BlockGets, ActionId, ActionTransforms, Transforms, ClusterNomineesResult, CollectionId } from "../index.js";
|
|
1
|
+
import type { ITransactor, GetBlockResults, ActionBlocks, ActionLineage, BlockActionStatus, PendResult, CommitResult, PendRequest, BlockId, CommitRequest, BlockGets, ActionId, ActionTransforms, Transforms, ClusterNomineesResult, CollectionId } from "../index.js";
|
|
2
2
|
import type { TreeReplaceAction } from "../collections/tree/struct.js";
|
|
3
3
|
import type { Collection } from "../collection/collection.js";
|
|
4
4
|
export declare class TestTransactor implements ITransactor {
|
|
@@ -8,6 +8,13 @@ export declare class TestTransactor implements ITransactor {
|
|
|
8
8
|
constructor();
|
|
9
9
|
get(blockGets: BlockGets): Promise<GetBlockResults>;
|
|
10
10
|
getStatus(actionRefs: ActionBlocks[]): Promise<BlockActionStatus[]>;
|
|
11
|
+
/** One store, no replicas: every revision was applied here onto the one before it, so the
|
|
12
|
+
* revision index answers for lineage outright — mirroring `BlockStorage.lineageOf`, including
|
|
13
|
+
* the one way a later revision does NOT build on its predecessor (an insert replaces the block
|
|
14
|
+
* wholesale). The "cohort" is this store alone, which is what the durability says. */
|
|
15
|
+
getLineage(ref: ActionBlocks & {
|
|
16
|
+
rev: number;
|
|
17
|
+
}): Promise<ActionLineage>;
|
|
11
18
|
pend(request: PendRequest): Promise<PendResult>;
|
|
12
19
|
cancel(actionRef: ActionBlocks): Promise<void>;
|
|
13
20
|
commit(request: CommitRequest): Promise<CommitResult>;
|
|
@@ -38,6 +45,9 @@ export declare abstract class DelegatingTransactor implements ITransactor {
|
|
|
38
45
|
pend(r: PendRequest): Promise<PendResult>;
|
|
39
46
|
cancel(a: ActionBlocks): Promise<void>;
|
|
40
47
|
commit(r: CommitRequest): Promise<CommitResult>;
|
|
48
|
+
getLineage(ref: ActionBlocks & {
|
|
49
|
+
rev: number;
|
|
50
|
+
}): Promise<ActionLineage>;
|
|
41
51
|
get queryClusterNominees(): ((blockId: BlockId) => Promise<ClusterNomineesResult>) | undefined;
|
|
42
52
|
}
|
|
43
53
|
/**
|
|
@@ -60,27 +70,74 @@ export declare class FlakyCommitTransactor extends DelegatingTransactor {
|
|
|
60
70
|
commit(request: CommitRequest): Promise<CommitResult>;
|
|
61
71
|
}
|
|
62
72
|
/**
|
|
63
|
-
* Commits durably on the inner {@link TestTransactor}, then reports a stale
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
73
|
+
* Commits the WHOLE action durably on the inner {@link TestTransactor}, then reports a stale
|
|
74
|
+
* failure anyway — a write that fully landed but whose writer was told it failed.
|
|
75
|
+
*
|
|
76
|
+
* This is NOT the shape `NetworkTransactor.commit` produces when it refuses a write whose log tail
|
|
77
|
+
* landed: there the tail is committed BEFORE the sweep of the remaining blocks, so the blocks after
|
|
78
|
+
* the tail did NOT land. That shape is {@link TailLandsButReportsStale}, and it is the one that
|
|
79
|
+
* matters in production. This double makes "my own log entry is visible" and "my action is fully
|
|
80
|
+
* durable" the same thing, so on its own it cannot tell a writer that finishes its half-landed
|
|
81
|
+
* action from one that merely assumes it is finished. Keep it for the case it does model — every
|
|
82
|
+
* block already holds the action's revision, so the writer's completion pass has nothing left to
|
|
83
|
+
* land and must not duplicate or move the entry.
|
|
68
84
|
*
|
|
69
85
|
* Safe against the inner transactor's bookkeeping because `TransactorSource.transact` cancels
|
|
70
86
|
* the pend on the reported failure and {@link TestTransactor.cancel} only deletes PENDING records
|
|
71
87
|
* — the real commit already promoted them, so the cancel is a no-op.
|
|
72
88
|
*
|
|
89
|
+
* `afterLanding`, when given, runs a competing writer ONCE, after the first masked commit has
|
|
90
|
+
* landed and before its failure is reported: the rival reads the landed write and commits the next
|
|
91
|
+
* revision ON TOP of it, so by the time the writer looks again every block it wrote has moved past
|
|
92
|
+
* its revision while still containing it. Safe to await from inside `commit` here (unlike
|
|
93
|
+
* {@link TailLandsButReportsStale}'s rival, which has to wait for the cancel): the whole action
|
|
94
|
+
* landed, so it left no pending record for the rival's pend to collide with.
|
|
95
|
+
*
|
|
73
96
|
* Used by both write paths' own-entry regression suites (collection-own-action-replay.spec.ts and
|
|
74
97
|
* coordinator-own-action-replay.spec.ts); it lives here so the two cannot drift apart.
|
|
75
98
|
*/
|
|
76
99
|
export declare class CommitLandsButReportsStale extends DelegatingTransactor {
|
|
100
|
+
private readonly afterLanding?;
|
|
77
101
|
/** Remaining number of successful commits to mask as stale failures. */
|
|
78
102
|
private injections;
|
|
79
103
|
/** Commits that actually landed on the inner transactor (masked or not). */
|
|
80
104
|
landedCommits: number;
|
|
81
|
-
|
|
105
|
+
private rivalDue;
|
|
106
|
+
constructor(inner: TestTransactor, injections?: number, afterLanding?: RivalWrite | undefined);
|
|
82
107
|
commit(request: CommitRequest): Promise<CommitResult>;
|
|
83
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Lands ONLY the action's log tail on the inner {@link TestTransactor}, then reports a retryable
|
|
111
|
+
* failure — the shape `NetworkTransactor.commit` actually produces for a half-landed write. It
|
|
112
|
+
* commits the tail first and sweeps the remaining blocks only if the tail answered success, and a
|
|
113
|
+
* failed tail answer does not mean the tail is absent: the coordinator's durability gate answers
|
|
114
|
+
* `commit-not-durable` whenever fewer than a majority of the cohort hold the revision, even though
|
|
115
|
+
* some members stored it. So the writer is told "failed" over a log entry that is durable, while
|
|
116
|
+
* none of the entry's other blocks were ever committed — and the writer's own cancel then drops
|
|
117
|
+
* their pending records.
|
|
118
|
+
*
|
|
119
|
+
* A commit carrying nothing but the tail is delegated untouched (there is nothing to abandon), and
|
|
120
|
+
* does not consume an injection.
|
|
121
|
+
*
|
|
122
|
+
* `afterCancel`, when given, runs a competing writer ONCE, right after the writer's cancel of the
|
|
123
|
+
* torn attempt has been delegated. It is on `cancel` and not inside `commit` for the reason
|
|
124
|
+
* {@link CompetingWriterTransactor} documents: until that cancel lands, the torn action's data
|
|
125
|
+
* blocks still carry its pending records, a rival pending with policy `'r'` collides with them, and
|
|
126
|
+
* awaiting that rival from inside the writer's own commit is a livelock.
|
|
127
|
+
*/
|
|
128
|
+
export declare class TailLandsButReportsStale extends DelegatingTransactor {
|
|
129
|
+
private readonly afterCancel?;
|
|
130
|
+
/** Remaining number of commits to tear. */
|
|
131
|
+
private injections;
|
|
132
|
+
/** Commits torn so far: the tail landed, every other block of the action was abandoned. */
|
|
133
|
+
tears: number;
|
|
134
|
+
/** Commits delegated whole that succeeded on the inner transactor. */
|
|
135
|
+
landedCommits: number;
|
|
136
|
+
private rivalDue;
|
|
137
|
+
constructor(inner: TestTransactor, injections?: number, afterCancel?: RivalWrite | undefined);
|
|
138
|
+
commit(request: CommitRequest): Promise<CommitResult>;
|
|
139
|
+
cancel(actionRef: ActionBlocks): Promise<void>;
|
|
140
|
+
}
|
|
84
141
|
/** A competing writer: a real write driven against the UNWRAPPED transactor, so its own
|
|
85
142
|
* pend/commit calls are invisible to {@link CompetingWriterTransactor}'s counters and cannot
|
|
86
143
|
* re-trigger the interception. See {@link commitRivalTreeWrite} for the usual implementation. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-transactor.d.ts","sourceRoot":"","sources":["../../../src/testing/test-transactor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAU,QAAQ,EAAa,gBAAgB,EAA2B,UAAU,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"test-transactor.d.ts","sourceRoot":"","sources":["../../../src/testing/test-transactor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,aAAa,EAAgB,iBAAiB,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAU,QAAQ,EAAa,gBAAgB,EAA2B,UAAU,EAAE,qBAA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