Skip to content

Neurofold/getnid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

getnid - Get Neurofold ID

GetNID is a decentralized, edge-native namespace resolver and immutable oracle. It provides O(1) resolution of canonical entities (mapping strings and Wikidata QIDs to NIDs) with zero backend compute.

Core Architecture

  • O(1) Double-Sharding: 1.5GB ledger mathematically partitioned into 256 router shards and 8,192 data shards.
  • Deterministic Identity: NIDs are cryptographically derived (N + SHA-256(QID)[:12]).
  • Edge-Native Execution: WASM-compiled SQLite queries shards directly from the browser's OPFS.
  • Swarm Bootstrapping: Web Workers sync and cryptographically verify the ledger locally via HTTP/2.

System Flow

flowchart TB
    subgraph Genesis [Genesis Pipeline]
        direction TB
        PG[(PostgreSQL)] --> BG[build_genesis.py]
        BG -->|Hash String| RS[(256 Routers)]
        BG -->|Hash QID| DS[(8192 Data)]
    end

    CDN((HuggingFace CDN))

    subgraph Web [Browser Client]
        direction TB
        SW[sync_worker.js] -->|Verify & Write| OPFS[(OPFS)]
        WW[worker.js] <-->|O1 Lookup| OPFS
        UI[app.js] <-->|PostMessage| WW
    end

    subgraph Native [Native Client]
        direction TB
        BR[build.rs] -->|Fuse| LB[(ledger.bin)]
        LB --> RO[getnid_core.so]
        PY[registry.py] <-->|Zero-Copy| RO
    end

    RS --> CDN
    DS --> CDN
    CDN -.->|Manifest Sync| SW
    
    RS --> BR
    DS --> BR
Loading