OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-identity commits / a73d35f

adopt keet-pattern Autobase config: optimistic + ackInterval + ackThreshold
Mirror the canonical Autobase configuration used by keet-core-hyperdb (@holepunchto/keet-core-hyperdb v1.22.0): - optimistic: true non-indexer writers append optimistically; their blocks linearize before being signed. Without this, plain writers stall and the only escape was making every device an indexer — which deadlocks the manifest migration when the indexer set grows from 2 to 3 (sys.indexers ahead of linearizer). - ackInterval: 1000 auto-ack on a timer so signedLength advances even when the indexer set has no pending appends. (The "no timers in mounting/wakeup" rule that previously vetoed this only applies to startup paths, not stable autobase operation.) - ackThreshold: 4 per-indexer churn budget, matches keet's defaults. Validated cross-machine on tabertron + stortron via pear-git-v3/test/keet-pattern-e2e.js — all 3 phases (plain-writer linearization, start-indexing promotion, move-indexer atomic swap) pass on both peers with identical state. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
a73d35ffe3453aa9239e5e3a82b6efb62fe6864e
by plankatron <fleeky@gmail.com> · 2026-05-02T14:44:37.000Z

Changed files (1) +14 -1

lib/auth/identity-registry.js +14 -1
……@@ -61,6 +61,16 @@ export class IdentityRegistry {
6161 : this._bootstrapKey)
6262 : null
6363
64 // Canonical multi-writer Autobase config (mirrors keet-core-hyperdb):
65 // optimistic — non-indexer writers can append optimistically; their
66 // blocks linearize before being signed. Without this,
67 // plain writers stall and the only workaround is to
68 // make every device an indexer, which deadlocks during
69 // manifest migration when going from 2→3 indexers.
70 // ackInterval — auto-ack on a timer so signedLength advances even
71 // when the indexer set has no pending appends.
72 // ackThreshold — per-indexer churn budget. 4 matches keet's defaults.
73 // See pear-git-v3/test/keet-pattern-e2e.js for cross-machine validation.
6474 this._base = new Autobase(this._store, rootKey, {
6575 apply,
6676 open (store) {
……@@ -71,7 +81,10 @@ export class IdentityRegistry {
7181 })
7282 },
7383 valueEncoding: 'binary',
74 keyPair: this._keyPair || undefined
84 keyPair: this._keyPair || undefined,
85 optimistic: true,
86 ackInterval: 1000,
87 ackThreshold: 4
7588 })
7689
7790 await this._base.ready()