Files
modules/storage-autobase/hyper-p2p-autobase-fork-choice
Raven ScottandCursor 422b41f7e4 Expand pear, encoding, consensus, supercomputer, and CRDT modules
Add manual API helpers across categories: pear link resolver cache,
applink reload, storage layout defaults, compact codec decodeBatch,
schema allValid/getSchema, session bridge removePair, udx sendRecvRatio,
cluster affinity and cpu-share clearAll, raft truncateLog/currentTerm,
quorum vote tally, silence and whisper seen helpers, qos unsubscribeAll,
LWW register clearAll, peer selector topRegions, graph hasPath, fork choice
clearViews, and trust gate untrustAll.

Co-authored-by: Cursor <[email protected]>
2026-05-21 02:43:36 -04:00
..
2026-05-21 02:00:00 -04:00
2026-05-21 02:00:00 -04:00

hyper-p2p-autobase-fork-choice

Registers Autobase view forks over gossip and picks the best by weight/version; align with hyper-p2p-causal-consensus for writer ordering. Hyperswarm gossip when topic is set.

Category: Storage (Autobase)

Composes with: hyper-p2p-causal-consensus

Protocol: autobase-fork-choice/v1

When to use

Multiple Autobase views compete and peers must converge on one fork id.

When not to use

Single linear Autobase with no fork hints.

Quick start

const { HyperP2PAutobaseForkChoice } = require('hyper-p2p-autobase-fork-choice')
const topic = process.argv[2] // 64-char hex or string
const mod = new HyperP2PAutobaseForkChoice({ topic })
await mod.ready()   // joins swarm when topic set
// ... application logic ...
await mod.close()

Docs

Test

npm install && npm test