@optimystic/db-p2p 1.1.0 → 1.3.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 (40) hide show
  1. package/dist/src/cluster/cluster-repo.d.ts +35 -12
  2. package/dist/src/cluster/cluster-repo.d.ts.map +1 -1
  3. package/dist/src/cluster/cluster-repo.js +47 -15
  4. package/dist/src/cluster/cluster-repo.js.map +1 -1
  5. package/dist/src/index.d.ts +1 -0
  6. package/dist/src/index.d.ts.map +1 -1
  7. package/dist/src/index.js +1 -0
  8. package/dist/src/index.js.map +1 -1
  9. package/dist/src/libp2p-node-base.d.ts +17 -0
  10. package/dist/src/libp2p-node-base.d.ts.map +1 -1
  11. package/dist/src/libp2p-node-base.js +1 -1
  12. package/dist/src/libp2p-node-base.js.map +1 -1
  13. package/dist/src/noise-crypto.d.ts +3 -0
  14. package/dist/src/noise-crypto.d.ts.map +1 -0
  15. package/dist/src/noise-crypto.js +2 -0
  16. package/dist/src/noise-crypto.js.map +1 -0
  17. package/dist/src/repo/cluster-coordinator.d.ts +92 -36
  18. package/dist/src/repo/cluster-coordinator.d.ts.map +1 -1
  19. package/dist/src/repo/cluster-coordinator.js +266 -198
  20. package/dist/src/repo/cluster-coordinator.js.map +1 -1
  21. package/dist/src/repo/coordinator-repo.d.ts.map +1 -1
  22. package/dist/src/repo/coordinator-repo.js +5 -4
  23. package/dist/src/repo/coordinator-repo.js.map +1 -1
  24. package/dist/src/rn.d.ts +1 -0
  25. package/dist/src/rn.d.ts.map +1 -1
  26. package/dist/src/rn.js +1 -0
  27. package/dist/src/rn.js.map +1 -1
  28. package/dist/src/storage/storage-repo.d.ts.map +1 -1
  29. package/dist/src/storage/storage-repo.js +24 -6
  30. package/dist/src/storage/storage-repo.js.map +1 -1
  31. package/package.json +2 -2
  32. package/readme.md +15 -0
  33. package/src/cluster/cluster-repo.ts +48 -15
  34. package/src/index.ts +1 -0
  35. package/src/libp2p-node-base.ts +19 -2
  36. package/src/noise-crypto.ts +4 -0
  37. package/src/repo/cluster-coordinator.ts +1409 -1328
  38. package/src/repo/coordinator-repo.ts +5 -4
  39. package/src/rn.ts +1 -0
  40. package/src/storage/storage-repo.ts +1781 -1762
@@ -2511,10 +2511,11 @@ export class CoordinatorRepo implements IRepo {
2511
2511
  // fresh revision, which is what the `conflict: true` shape makes `Collection.syncAttempts`
2512
2512
  // and the multi-collection `pendPhase` do. But a member reached only by
2513
2513
  // `scheduleCommitRetry` can still land the refused revision later, and this node's own
2514
- // member (or its fallback commit) may hold it already. When the refused block is the
2515
- // action's LOG TAIL, that matters beyond this block: `NetworkTransactor.commit` stops at a
2516
- // refused tail and never sweeps the action's other blocks, so the writer can then read
2517
- // its own log entry back while none of the data it describes was committed anywhere.
2514
+ // member (or its fallback commit) may hold it already. When the refused commit carries the
2515
+ // action's LOG TAIL, that matters beyond this block: the writer can then read its own log
2516
+ // entry back while the data it describes is on a minority at best when the tail travelled
2517
+ // with the other blocks, the members holding it may hold them too; when it travelled alone,
2518
+ // `NetworkTransactor.commit` stops at the refused tail and never sweeps the rest.
2518
2519
  // The writer's retry with the SAME action id is what converges that, and only because it
2519
2520
  // does two things: `isOwnRevision` in `StorageRepo.pend` and `commit` treats an
2520
2521
  // already-landed own revision as satisfied, and `Collection.completeOwnEntry` — on
package/src/rn.ts CHANGED
@@ -57,6 +57,7 @@ export * from './sync/service.js';
57
57
  export * from './it-utility.js';
58
58
  export * from './libp2p-key-network.js';
59
59
  export * from './libp2p-node-rn.js';
60
+ export * from './noise-crypto.js';
60
61
  export * from './optimystic-node.js';
61
62
  export * from './routing/responsibility.js';
62
63
  export * from './routing/libp2p-known-peers.js';