warriors/trisha/docs/explanation/architecture.md

architecture

trisha is the runtime half of the soft3 proof stack.

trident (compiler)          trisha (runtime)
─────────────────           ─────────────────────────────────────
source .tri files           TrishaWarrior
      ↓                           ↓
 parse + type check          runner (execute)
      ↓                      prover (STARK prove)
 codegen → TASM              verifier (STARK verify)
      ↓                      deployer (neptune on-chain)
 ProgramBundle ──────────→  batch executor
                             GPU backend (7 shaders)

trident produces a ProgramBundle (TASM bytecode + type info + metadata). trisha takes that bundle and does the actual work: execution, proof generation, verification, deployment.

trisha implements trident's four runtime traits:

trait what it does
Runner execute the program, collect outputs
Prover generate a STARK proof of execution
Verifier verify a STARK proof
Deployer package + submit to neptune (stub)

TrishaWarrior in warrior.rs implements all four.

stack position

neurons / apps
      ↓
  trident (compile)
      ↓
  trisha (execute + prove + verify)
      ↓
  triton-vm (STARK engine, vendored + patched)
      ↓
  GPU (Metal / Vulkan / DX12 via wgpu)

triton-vm is the STARK engine. trisha patches it at build time (via patches/apply.nu) to inject GPU acceleration hooks without maintaining a fork. the patch adds a GpuAccelerator trait with three dispatch points: Tip5 batch hashing, iNTT, and NTT.

binary discovery

the trisha binary is discovered at runtime by trident's find_warrior(). trident delegates execution to whatever warrior binary is on $PATH. this keeps the compiler and runtime independently versioned.

module map

src/
  lib.rs          re-exports all public modules
  main.rs         clap dispatch → cli commands
  cli.rs          five commands: run, prove, verify, deploy, guess
  warrior.rs      TrishaWarrior: implements Runner/Prover/Verifier/Deployer
  compile.rs      source → ProgramBundle via trident API
  error.rs        TrishaError enum (no unwrap in library code)
  proof_file.rs   TOML envelope + bincode proof bytes (base64)
  batch.rs        generic parallel executor (run_batch)
  convert.rs      Vec<u64> ↔ BFieldElement
  gpu/
    mod.rs          GpuBackend trait
    cpu.rs          CPU fallback via triton-vm
    wgpu_backend.rs wgpu backend (Metal/Vulkan/DX12)
    tip5_accel.rs   Tip5 GPU batch hashing
    shaders/
      goldilocks.wgsl  field arithmetic (vec2<u32> to emulate u64)
      ntt.wgsl         radix-2 Cooley-Tukey butterfly NTT
      poseidon2.wgsl   Poseidon2 permutation for Merkle trees
      fri.wgsl         FRI query folding and verification
      gemv.wgsl        matrix-vector multiply (polynomial evaluation)
      tip5.wgsl        Tip5 batch hashing
      mine.wgsl        nonce mining kernel (24M H/s on M1 Max)

Homonyms

cyber/architecture
cyb/architecture
cyberia/architecture
cybics/crystal/architecture
the five primitives of a vimputer a resource-complete architecture for earth-scale distributed computation the problem every vimputer is an incomplete computer. they meter compute (gas, cycles, stark proofs) but treat the network itself — messaging, bandwidth, storage, and sequencing — as invisible…
cyberia/foundation/architecture
organizational architecture of cyberia — from a village on a volcano to a planetary superintelligence, bootstrapped by two founders, governed by 147 neurons through the tri-kernel genesis: the heroes a superintelligence that launches wrong is broken forever. a malformed Crystal produces a malformed…
cybics/tech/architecture
unit types pyramid: 1 sphere: 7 cube: 42 prysm: 146 connected by pipe and multigrid
cyb/cyb/docs/architecture
cyb-shell Architecture Overview cyb-shell is a native macOS application built on Bevy ECS game engine. It provides four switchable "worlds" — Terminal, Browser, UI, and Game — sharing one window and one GPU pipeline. Shared GPU Resources **Key principle: one wgpu driver per application.** Bevy…
soft3/bbg/specs/architecture
architecture the authenticated state layer for cyber. individual cyberlinks are private — who linked what is never disclosed. the cybergraph is the public aggregate: axons (directed weights between particles), neuron summaries, particle energy, token supplies, φ* distribution. all derived from…
neural/rune/specs/architecture
execution architecture [← specification index](/neural/rune/specs/readme) workload split | workload | profile | right strategy | |----------|---------|----------------| | REPL, scripts, ad-hoc | run once, dies fast | interpret directly | | event handlers, UI | run often per session, short bursts |…
soft3/glia/run/specs/architecture
Architecture cyb-llm runtime executes models via three parallel paths. Each path trades off speed, universality, and maintenance differently. Together they cover the full spectrum from commodity chat to frontier research without compromise on correctness. Three paths 1. Curated path —…

Graph