CHAINSTATE OS is a proposed Linux-based cognitive operating system. Eight separated trust planes, a governed reasoning loop extended with kernel-near eBPF observation, BranchState continuity with TIMEMACHINE rollback, metacognitive isolation, an independent falsifiability kill gate, and constitutional safety — designed to run on your hardware, answer to you, and fail closed. Research Paper II (October 2026) adds an eBPF substrate for process, syscall, filesystem and network telemetry, with an LSM-BPF enforcement path reserved for reviewed deployments.
Simulated control surface. Pick a cs command from the side rail to swap the terminal output and highlight the matching state tile; live telemetry runs on the right. SIMULATED — no real substrate is attached to this page.
$ cs status SUBSTRATE .... LOCAL NETWORK ...... SAFE-DEGRADED POLICY ....... ENFORCED METACOG ...... ISOLATED KILLGATE ..... INDEPENDENT RECEIPTS ..... APPEND-ONLY BRANCH ....... experiment-01 KERNEL ....... eBPF ATTACHED (4/4) Demo telemetry is simulated.
Full substrate map: the governed cognition loop at the top, eight separated trust planes, the continuity + release infrastructure, and the new kernel-near eBPF evidence plane at the bottom. No edge skips a plane. Hover any node for a summary; click for the full specification.
| LAYER | SPECIFICATION | STATUS |
|---|---|---|
| Base system | Linux (hardened distribution target), immutable base image, signed A/B partitions, verified boot | DESIGN |
| Cognitive runtime | Local model host with pluggable backends (GGUF / ONNX / vendor runtimes), retrieval, proposal generator confined to the Cognitive plane | DESIGN |
| Metacognitive layer | Isolated uncertainty estimator and hypothesis-killing evaluator; user-local state cannot rewrite substrate metacognition | DESIGN |
| Constitutional engine | Hard-veto policy machine: consent, provenance, capability budgets, fail-closed defaults | DESIGN |
| Execution sandbox | Namespaced, quota-limited process cells; signed skill plugins with declared capability limits | DESIGN |
| Continuity | BranchState append-only receipt chain, TIMEMACHINE branch/rollback, conflict-aware offline peer sync | DESIGN |
| Hardware abstraction | CPU / GPU / NPU / FPGA / RISC-V targets; UCI-1 + RISC-V acceleration path; optional optical inference backend | ROADMAP |
| Sensor fusion | LiDAR, radar, EO/IR, MEMS, hyperspectral, audio behind default-deny actuation policy | ROADMAP |
| eBPF observation | Process, syscall, filesystem, network monitors via libbpf + CO-RE; signed BPF artifacts, kernel-profile preflight, ringbuf telemetry | DESIGN |
| eBPF enforcement | LSM-BPF hooks for MAC and audit; disabled by default, enabled only after separate threat model and independent review | ROADMAP |
| Distribution | GitHub releases: signed packages, SHA-256 checksums, SBOM, sandboxed installer with entitlement verification | BETA |
| Entitlement / payment | Base mainnet ETH settlement to treasury 0x2E96…0958; one wallet per install; client-side RPC verification + backend hardening when live | BETA |
| Demo site | This page — static HF Space, in-browser simulation, wallet connection UI | LIVE |
H(r₀) = SHA-256(genesis ‖ device_id) H(rₙ) = SHA-256(H(rₙ₋₁) ‖ actionₙ ‖ planeₙ ‖ tₙ) Append-only: valid(rₙ) ⇒ valid(r₀ … rₙ₋₁) Any rewrite of rₖ invalidates all H(rₖ₊₁ … rₙ).
B(t) = B₀ − Σᵢ c(aᵢ) for approved actions aᵢ ≤ t execute(a) permitted ⇔ c(a) ≤ B(t) ∧ veto(a) = ⊥ ∧ sig(skill) valid Budget exhaustion ⇒ fail closed, not fail open.
For hypothesis h with evidence E: U(h) = 1 − max P(h | E) kill(h) ⇔ U(h) > τ_kill ∨ falsifier(h, E) = ⊤ The kill-gate evaluator is independent: weights(killgate) ∩ writable(user_state) = ∅
branch b = (root, Δ₁ … Δₙ) merge(b₁, b₂) defined ⇔ conflict(Δ(b₁), Δ(b₂)) = ∅ else: user-arbitrated three-way merge over receipts TIMEMACHINE: restore(t) replays r₀ … r_t exactly; state(t) is a pure function of the receipt prefix.
declared D(a) = { principal, capability, exec_id, policy_fp }
observed O(a) = { pid, exec_id, hook, event_class } from BPF
consistent(a) ⇔ D(a).exec_id = O(a).exec_id
∧ O(a).event_class ⊆ capability(a)
¬consistent(a) → incident_candidate(a); metacog weighs
alternatives; constitutional plane decides response.
load(obj) permitted ⇔
provenance(obj) ∧ policy(obj.class) ∧ kernel_compat
∧ signature(obj) ∧ verifier(obj) = ⊤
∧ hook ∈ approved_hooks
∧ capabilities ⊆ loader_capabilities
Any gate false ⇒ fail closed; AI cannot generate obj.
Research Paper II extends CHAINSTATE from a governed user-space architecture to a kernel-near observability and security substrate using extended Berkeley Packet Filter (eBPF). The goal is not to make eBPF an AI decision-maker. eBPF supplies kernel-visible evidence that can be correlated with what the Constitutional plane authorized. Declared behavior = capability contract. Observed behavior = kernel event stream. Receipt outcome = the auditable relationship between the two.
fs.read:workspace) for policy reconciliation.net.none that opens a socket raises an incident candidate. Egress destination class is captured for the receipt.No value is a measured production result until reproduced on the Appendix A matrix. All bars are design targets.
// os/ebpf/process_monitor.bpf.c — exec/fork/exit telemetry #include "vmlinux.h" #include <bpf/bpf_helpers.h> #include <bpf/bpf_tracing.h> char LICENSE[] SEC("license") = "GPL"; struct process_event { __u32 pid; __u32 ppid; __u64 ts_ns; __u32 uid; char comm[16]; char exe[128]; }; struct { __uint(type, BPF_MAP_TYPE_RINGBUF); __uint(max_entries, 256 * 1024); } events SEC(".maps"); SEC("tp/sched/sched_process_exec") int handle_exec(struct trace_event_raw_sched_process_exec *ctx) { struct process_event *e; e = bpf_ringbuf_reserve(&events, sizeof(*e), 0); if (!e) return 0; u64 id = bpf_get_current_pid_tgid(); e->pid = id >> 32; e->ppid = BPF_CORE_READ(ctx, old_pid); e->ts_ns = bpf_ktime_get_ns(); e->uid = bpf_get_current_uid_gid(); bpf_get_current_comm(&e->comm, sizeof(e->comm)); bpf_ringbuf_submit(e, 0); return 0; }
A Local-First Cognitive Operating System with Temporal BranchState Continuity, Hardware-Agnostic Cognitive Acceleration, Sensor-Fusion, Optical-Generative Extensions, Constitutional Safety, and Offline-First Distributed Deployment.
Separation of trust planes. Interface, Skill, Cognitive, Metacognitive, Constitutional, Execution, Continuity and Hardware are distinct privilege domains. A Cognitive-plane proposal holds no authority until it survives Challenge, Authorization and Execution.
Governed cognition loop. OBSERVE → REPRESENT → HYPOTHESISE → CHALLENGE → AUTHORIZE → EXECUTE → REFLECT, with receipts appended at every transition.
Continuity as a first-class citizen. BranchState treats system state as a pure function of an append-only receipt chain, enabling TIMEMACHINE rollback, branching experiments and conflict-aware offline peer sync.
Independent falsifiability. A metacognitive kill gate, isolated from user-writable state, actively attempts to falsify the system's own hypotheses before they can act.
Hardware pluralism. CPU, GPU, NPU, FPGA, RISC-V with UCI-1 acceleration path and an optional optical inference backend on the roadmap, plus a default-deny fused-sensor pipeline.
Follow-up paper extending CHAINSTATE from a governed user-space architecture to a kernel-near observability and security substrate using eBPF, with an LSM-BPF enforcement path reserved for reviewed deployments.
eBPF as evidence, not authority. The cognitive runtime cannot generate or load arbitrary eBPF programs. Signed, pre-built BPF artifacts move through a privileged loader with eight gates (provenance → policy → compatibility → signature → kernel verifier → attachment → health → rollback).
Intent / observation reconciliation. Receipts correlate what Constitutional authorized with what the kernel-visible execution path reports: request hash, principal, capability set, executable identity, observed event class, policy fingerprint, outcome.
Extended loop. Observe → Represent → Hypothesise → Challenge → Authorize → Execute → observe kernel effects → Receipt → Reflect.
Independent kernel verifier. The Linux BPF verifier remains an independent safety boundary. Signatures establish provenance and integrity; they do not replace verifier checks or capability requirements.
LSM-BPF disabled by default. MAC and audit via LSM-BPF are enabled only after a separate threat model, compatibility matrix, recovery procedure and independent security review.
Evaluation. Twelve measurable dimensions — coverage, event loss, attribution, consistency, detection and enforcement latency, rollback, verifier rejection, overhead, privacy minimization, offline determinism. No numeric target is presented as a result until reproduced on Appendix A's experiment matrix.
DESIGN BranchState + TIMEMACHINE continuity core
DESIGN eBPF process / syscall / fs / network monitors
ROADMAP LSM-BPF enforcement (reviewed deployments only)
ROADMAP UCI-1 + RISC-V acceleration
ROADMAP LiDAR / radar / EO-IR / MEMS / hyperspectral / audio fusion
ROADMAP Optional optical inference backend
DESIGN ORCID 0000-0002-9510-8377 · University of Agder
One-time, one install per wallet. ETH settlement on Base mainnet (chain 8453) directly to the CHAINSTATE treasury. The transaction hash is required to unlock the installer — public download does not grant installation.
0x2E964e1c0e3Fa2C0dfD484B2E6D2189dfCF20958
state-v.eth
Wallet not connected.
Paste a Base-mainnet transaction hash sent from the connected wallet to the treasury above. The page verifies it against the public Base RPC and issues your install token.
—
The installer in RedCiprianPater/chainstate-os re-verifies the token server-side against the on-chain transaction and your wallet signature before writing the bundle. Keep the token private — anyone who holds it can attempt one install.
Public download does not grant installation. The installer requires the install token above, which binds entitlement to the paying wallet, bundle hash and expiry, with a same-wallet signature.
REPOSITORYThis static Space is demo + checkout UI only. Secrets stay off the Space; verification runs against the public Base RPC until the hardened backend is live.
SPACEEvery release ships signed packages, SHA256SUMS, an SBOM and verify-bundle.sh. Verify before installing. Both R&D papers are attached to releases and linked from this Space.
to = treasury, from = your wallet, status = success.SHA-256(wallet ‖ tx ‖ v1) is derived.