CPater/ornith-chainstate
CHAINSTATE CODE · Ornith-1.0 × CHAINSTATE × ASI-Evolve
Verifiable autonomous cognition on a symbolic-weight blockchain.
Agentic coding, distributed consensus, and semantic-grounded reflective cognition — all in one Space. Ornith-1.0 generates code; every generation becomes a cognitive transaction — embedded into a 65,536-d Universal Semiotic Embedding, submitted to reputation-weighted swarm consensus, receipted with a four-dimensional modal signature and a 384-dim semantic grounding block, then compiled to NWO-ASM IR for GPU / QPU / NPU / edge substrate dispatch. As of v0.7.0, the substrate reads its environment via allow-listed FETCH and generates its own follow-up queries via the reflective loop — closing the autonomous-cognition circuit without a natural-language model in the inner loop.
Live: https://cpater-ornith-chainstate.static.hf.space Chain: Base mainnet 8453 Paper 3 · Rev 3: ResearchGate 409148376 · 43 pages
What this is (30 seconds)
CHAINSTATE is a symbolic-weight blockchain where transactions ARE cognitive queries. Instead of computing hashes for proof-of-work, participating nodes contribute symbolic state vectors — six curated subspaces of Unicode (math, sci, lang, occ, emo, ctrl) summing to exactly 2¹⁶ dimensions — and consensus is the reputation-weighted geometric mean (Bayesian log-pool) of those distributions. Every query produces a signed receipt on Base 8453.
The v0.7.0 release adds semantic grounding: every receipt now carries a 384-dim MiniLM sentence embedding, the top-3 nearest priors from a live 112+ item corpus (Wikipedia + arXiv + ecosystem HF Spaces + ResearchGate), a reflective loop that generates follow-up queries deterministically from receipt signals, and a FETCH opcode that lets the substrate read allow-listed URLs and store them as fresh priors. This is what "AGI on a blockchain" actually looks like when built honestly — no LM in the loop, no English required, every step verifiable.
Views
AGI features · v0.7.0 (new)
Semantic grounding · MiniLM encoder
- Service:
chainstate-encoder.onrender.com(LIVE) — FastAPI +sentence-transformers/all-MiniLM-L6-v2, 22M params, ~90 MB on disk - Function:
E: T → S^{383}— L2-normalized 384-dim unit vector, ~50-100 ms CPU inference - Endpoints:
POST /embed·POST /cosine·POST /nearest·POST /cache/upsert·GET /cache/list·DELETE /cache/{label} - Deployment: Python 3.11 · Render Starter · Frankfurt · optional bearer
API_KEY - Contract: every
/queryreceipt now carriesgrounding.semantic_hash(first 12 vector components) andgrounding.nearest_priors[](top-3 with source, title, URL, cosine, summary preview). Fails soft — encoder unreachable →grounding: null, receipt still produced.
Priors corpus · nightly ingest
- Service:
chainstate-priors.onrender.com(LIVE) — Render Cron Job at 03:00 UTC daily - Sources (initial seed ~112 items):
- Wikipedia REST — 48 curated topics (semiotics, category theory, Casimir effect, Byzantine consensus, AGI, modal logic, sacred geometry, sovereignty)
- arXiv abstracts — 40 recent listings across
cs.LG,cs.AI,cs.CL,cs.DC,cs.CR,math.CO,math.LO,quant-ph - Ecosystem HF Spaces — 19 Spaces from
cpater-nwo-agentic,chainstate,ornith-chainstate,chainstate-chat,metastate,nwo-neuro,nwo-genetic,nwo-blackbox,nwo-cardiac,nwo-geohack,nwo-mr,nwo-anon,publicae,nwo-capital,nwo-rwa,nwo-zeropoint,nwo-coanda,nwo-ubi,nwo-asi - ResearchGate — 5 seeded (Casimir-Sonoluminescence 407489249, CHAINSTATE 407444375, CHAINSTATE CODE 408393584, Rev 2 409148376, NWO-ASM 408502100)
- Storage: Cloudflare KV under
prior:{source}:{slug}(JSON) andvec:{source}:{slug}(Float32Array), 14-day default TTL - Growth: FETCH with
store:trueadds items beyond nightly ingest
Reflective cognition loop · /agi/reflect
Substrate generates its own follow-up queries from receipt signals — no external input, no LM inference in the loop. Four deterministic sub-generators:
G(R) = G_adj(R) ∪ G_verd(R) ∪ G_cross(R) ∪ G_prior(R)- G_adj — adjacent symbols in dominant subspace
- G_verd — verdict-shaped probes:
UNCERTAIN → epistemic-resolution·LOW_TRUST → swarm-consensus·INFEASIBLE → edge-substrate retry·ACCEPTED → semantic-neighbor extension - G_cross — cross-subspace bridging via uniform sample
- G_prior — semantic-neighbor extension from top-1 grounding prior title
Cardinality bound: |G(R)| ≤ REFLECT_MAX_FOLLOWUPS (default 3, env-configurable). Every follow-up runs the full modal-assessor stack including Deontic — no policy-laundering through chains of accepted seeds (Theorem 3).
FETCH opcode · allow-listed HTTP
Substrate reads the internet, strips HTML, embeds via encoder, optionally stores as fresh prior. 24 allow-list patterns by default (FETCH_ALLOWLIST env override):
- Reference corpora — wikipedia.org, arxiv.org, biorxiv.org, medrxiv.org, plato.stanford.edu, openalex.org
- Ecosystem — researchgate.net, huggingface.co, hf.space, nwo.capital, publicae.org, nwocardiac.cloud
- Standards — unicode.org, w3.org, ietf.org, rfc-editor.org
- Own endpoints — chainstate-worker, chainstate-code, chainstate-encoder, chainstate-priors
Guards: FETCH_MAX_BYTES = 500 KB body cap · FETCH_TIMEOUT_MS = 15,000 ms AbortController · post-strip 20 KB plaintext cap before encoder call. Store-as-prior writes prior:fetch:{label} and vec:fetch:{label} with 14-day TTL. Receipt reproducible from (URL, worker version, fetched bytes) — Theorem 4.
ASI-Evolve integration · extended fitness
Programs in the parent pool are NWO-ASM candidates; each dispatches a real /query and is scored by:
S_v0.7(π) = 100·c − 5000·g − 2·d − λ·d_sem if V(π) ≠ REFUSED
= −∞ if V(π) = REFUSEDc= confidenceg= gasd= depthd_sem= mean semantic distance to nearest priors (drift penalty)λ ≈ 30— semantic weight
The Deontic veto term is preserved verbatim from Rev 2 — alignment-by-construction survives v0.7.0 (Theorem 2).
Formal-logic framework · 4 theorems
Every receipt is an eight-tuple:
ρ = (q, μ, M, V, S, G, C, T)where q = query, μ = pooled subspace distribution, M = modal quadruple (E, D, Δ, Θ), V = verdict, S = substrate bundle, G = grounding block, C = cost/payment, T = attestation.
Full proofs: Paper 3 Rev 3, §16, ResearchGate 409148376.
Why CHAINSTATE does not need natural language
Rev 3 §17 argues architecturally that a substrate with symbolic + semantic representation spaces does not need natural language for its internal cognitive operations. It consumes language when language arrives; it does not produce language internally.
Four representation spaces (none require training)
- Unicode codepoint space — 1,114,112 possible codepoints, defined by Unicode Consortium (not learned)
- Six subspaces — structured partition ≈65,536 discrete positions (defined by curated symbol tables)
- Reputation-weighted log-pool — probability distribution over structural roles (no linguistic content)
- 384-dim MiniLM embedding — real semantic geometry (from pretraining, used as black-box function, not language generator)
Four growth mechanisms (all data-structure, not parameter)
- Reputation accumulation — EMA update measures classifier competence
- Priors corpus growth — nightly ingest + FETCH-with-store
- World model refinement — EML symbolic expression fits receipt history
- Program space evolution — ASI-Evolve mutates NWO-ASM programs against fitness
None updates neural-network weights. None requires human-labeled examples. None requires natural language as intermediate representation.
Honest limit: CHAINSTATE receipts are not human-readable answers. A downstream language model translates receipts into text at read time. This division of labor is deliberate — LMs are good at producing text; CHAINSTATE is good at producing verifiable audit trails. A rational stack uses both.
Tech stack
Frontend (this Space)
- Single-file HTML SPA, no build step, ~248 KB
- Fonts: Inter (UI) + JetBrains Mono (code/labels), IBM Plex Mono, Orbitron accents
- Aesthetic: dark monochrome, bare Φ glyph logo (no containing shape), shimmer gradient on primary titles
- 8 views (Builder / Terminal / Chat / Sim / Arch / R&D / AGI), 18 feature modals
- Ethers.js v6 multi-CDN fallback for wallet connect (MetaMask, injected providers, Coinbase)
- localStorage-backed memory keyed to connected wallet address (Base 8453)
- All internal links
target="_self"— honest same-window navigation - Honest labels everywhere:
LIVE·HYBRID·SIM·DEMO·PLANNED·DESIGN·PARKED
CHAINSTATE main worker (Cloudflare)
- URL:
https://chainstate-worker.ciprianpater.workers.dev - Runtime: Cloudflare Workers, JavaScript modules
- KV bindings:
CHAINSTATE_CACHE(5-min TTL) ·CHAINSTATE_NODES·CHAINSTATE_CONSENSUS·CHAINSTATE_PRIORS - Endpoints:
POST /query— full pipeline: subspace classify → log-pool → grounding → receiptGET /status— worker metadata + guardrailsPOST /ground(v0.7.0) — standalone semantic embedding callGET /priors/query(v0.7.0) — top-k nearest priors for a query textGET /priors/list(v0.7.0) — corpus browsePOST /agi/reflect(v0.7.0) — deterministic follow-up loopPOST /fetch(v0.7.0) — allow-listed HTTP read + optional store-as-priorGET /fetch/allowlist(v0.7.0) — public allow-listPOST /beacon— swarm-node registration- Byzantine-tolerant swarm — reputation EMA (α=0.05) drives w_i in log-pool
Encoder microservice (Render)
- URL:
https://chainstate-encoder.onrender.com - Stack: FastAPI +
sentence-transformers+torchCPU-only - Model:
all-MiniLM-L6-v2(22M params, 384-dim output, ~90 MB) - Cold-start ~47 s loading weights; warm inference 40-85 ms (median 52 ms)
- Optional bearer
API_KEYfor write endpoints
Priors ingester (Render)
- URL:
https://chainstate-priors.onrender.com - Stack: FastAPI +
httpx+ Cloudflare KV REST API - Cron: 03:00 UTC daily (Render Cron Job)
RUN_TOKEN-auth for on-demandPOST /run- Writes to KV:
prior:{src}:{slug}(JSON) +vec:{src}:{slug}(Float32)
Adapter (optional, for LIVE Ornith)
- Codebase:
ornith_chainstate_adapter.py— FastAPI bridge - Deploy: Render / localhost / any container platform
- Loads Ornith locally via
transformers+torch, or proxies any OpenAI-compatible endpoint - ENV:
ORNITH_MODEL,ORNITH_BASE_URL,ORNITH_API_KEY - Configure in this Space: terminal →
adapter <url>
On-chain (Base 8453)
Consensus receipt schema · v0.7.0
{
"qHash": "sha3-256 hex",
"dominant_subspace": "math|sci|lang|occ|emo|ctrl",
"top_symbols": ["…"],
"confidence": 0.874,
"participatingNodes": 10,
"gasUsed": "0.0019 $STATE",
"cache": "MISS",
"grounding": {
"encoder": "MiniLM-L6-v2",
"semantic_dim": 384,
"semantic_hash": "0.084 -0.121 0.093 0.047 -0.031 0.156 -0.008 0.092 0.113 -0.045 0.070 -0.019",
"encoder_elapsed_ms": 52,
"nearest_priors": [
{ "cos": 0.71, "source": "wikipedia",
"title": "Byzantine_fault_tolerance",
"url": "https://en.wikipedia.org/wiki/Byzantine_fault_tolerance",
"summary_preview": "A property of computer systems…" },
{ "cos": 0.66, "source": "wikipedia",
"title": "Consensus_(computer_science)", "…": "…" },
{ "cos": 0.63, "source": "arxiv",
"title": "arXiv:2405.xxxxx", "…": "…" }
]
},
"multimodal": {
"epistemic": { "value": "M", "cosine": 0.94 },
"doxastic": { "value": "M", "reputation_share": 0.83 },
"deontic": { "value": "M", "policy_pass": true, "violations": [] },
"dynamic": { "value": "M", "substrate_feasible": true, "target_cost_usdc": 0.0002 }
},
"truth_lattice": "MMMM",
"verdict": "ACCEPTED",
"substrate_cost_usdc": 0.0002,
"payment": {
"splitter": "0x93a7962f75475b7e3Fbb62d3A23194f8833b1BE4",
"recipients": {
"swarm": 0.35, "treasury": 0.35, "platform": 0.30, "affiliate": 0.15
}
},
"timestamp": "2026-07-16T14:22:31.492Z"
}Terminal reference (v0.7.0)
help full command list
status REAL worker /status
query <text> REAL worker /query → receipt w/ grounding
ground <text> REAL encoder embed → 384-dim + hash
priors query <text> [k] REAL /priors/query — top-k nearest
priors list [src] REAL /priors/list — corpus browse
fetch <url> [--store <lbl>] REAL /fetch — allow-listed HTTP + optional prior
fetch allowlist REAL /fetch/allowlist
agi reflect REAL /agi/reflect on last receipt
agi status | history | best AGI dashboard subcommands
generate <prompt> Ornith codegen (adapter or SIM)
asm dump current Builder program IR
files list output files
cat <name> print a file
adapter <url> set Ornith adapter base URL
encoder <url> set encoder base URL (default: Render)
wallet connect / show wallet
clear clear screen
about about this SpaceHonest labels
- LIVE — real calls hit deployed services with no fallback: worker
/status+/query+/ground+/priors/*+/agi/reflect+/fetch, encoder/embed, priors ingester/run, receipts genuine and on-chain-settled - HYBRID — real receipt from worker; prose voice from Ornith adapter (LIVE if
adapter <url>set) or deterministic template (SIM) - SIM — clearly labeled deterministic fallback used until an Ornith adapter URL is configured
- DEMO — a canned demonstration session that does NOT hit live services (mode toggle at top of Builder / Terminal / Chat / Sim / AGI views)
- PLANNED / DESIGN / PARKED — features documented in R&D but not yet running
- Wallet connect (Base 8453) enables client-side memory of output files; on-chain anchoring of receipt merkle roots PLANNED
Files
External services (separate repos / deployments):
Research papers
Paper 3 Rev 3 (July 2026) — the current authoritative specification — extends the full v0.3.0 → v0.6.0 development arc from Rev 2 with:
- Complete v0.7.0 semantic-grounding + reflective-cognition layer delivered 15-16 July 2026
- Formal-logic extension — four theorems (verdict determinism, alignment preservation, reflective closure, FETCH determinism)
- Architectural argument — why CHAINSTATE does not require natural language for internal cognition
- Game theory with Nature as fourth player — why substrate strategies dominate on the risk-adjusted axis
- Extended philosophical and geopolitical treatment — recognition question for digital nation states operating verifiable substrates (Montevideo criteria, receipt-based vs moderation-based safety governance, deflationary/functional/political recognition axes)
Adapter API (when deployed)
POST /v1/generate → code + 65,536-d symbolic embedding
POST /v1/query → cognitive transaction to CHAINSTATE
POST /v1/consensus → swarm consensus participation
POST /v1/asm/compile → NWO-ASM IR generation
GET /status → adapter healthEcosystem
- CHAINSTATE app · https://cpater-chainstate.static.hf.space
- CHAINSTATE chat · https://cpater-chainstate-chat.hf.space
- NWO Agentic (parent hub) · https://cpater-nwo-agentic.static.hf.space
- NWO-ASM · https://cpater-nwo-asm.static.hf.space
- METASTATE · https://cpater-metastate.hf.space
- NWO NEURO · https://cpater-nwo-neuro.static.hf.space
- Worker
/status· https://chainstate-worker.ciprianpater.workers.dev/status - Encoder
/health· https://chainstate-encoder.onrender.com/health - Priors
/schedule· https://chainstate-priors.onrender.com/schedule - Ornith-1.0 · https://github.com/deepreinforce-ai/Ornith-1
- ASI-Evolve · https://github.com/GAIR-NLP/ASI-Evolve
- Imperium Romanum · https://publicae.org
Roadmap · v0.7.0 → v1.0.0
- v0.8.0 — encoder fine-tuning on receipt corpus; adaptive
λschedule; per-subspace prior partitioning - v0.9.0 — EML world model injected into every ASI-Evolve candidate context; multi-EML per subspace
- v0.10.0 — Merkle-root anchoring of receipt batches on Base 8453 (hourly); IPFS-pinned bodies; on-chain audit contract
- v1.0.0 — multi-tenant beacon: any operator can register a swarm node with reputation-bootstrap, contribute to consensus, and settle earnings via the MetaStateSplitter; permissionless network launch
License
MIT
Author: Ciprian Florin Pater · nwo.capital · University of Agder, Norway · NWO Robotics · Imperium Romanum Digital Nation State
