Code language
System architecture
Storage bounds and worker admission¶
judgment_core owns no persistent tables: the stateless checker reads
termbank.dag rows through immutable views. Memory and work are bounded
separately at three boundaries:
- Checker scratch (
judgment_core).check_proof,check_chunk, andcheck_dag_chunkare pure functions of an immutableCheckView(orDagCheckView) and a caller-suppliedScratch. Temporary allocations are bounded explicitly byScratchLimits, and work is charged against the chunk'sBudget(chunk_allowance, KC1.10). Workers hold no persistent kernel tables and share the committed rows read-only. - Trusted proof-DAG storage (
termbank.dag). Persistent tables live inDagBank, speculative writes live in workspaces (termbank.dag.Workspace, which truncate without changing committed rows), and sealed segments and cold index runs spill to verified blocks read back through a bounded frame cache (DAG storage).DagBankcapacities andBudgetcharges are checked before allocation (G3, G4). - Authoring sessions (
judgment_shell).Sessionbounds per-session work through its explicit work allowance (work_remaining,spend,add_work), andSession.fork(work)creates a session over a child workspace of the parent's, with an explicit child work allowance (fork_costreports the charge for copying the session). A workspace may open any number of children: transactions and forks are bounded by the work allowance and the bank's capacities, not by a count of children.
What these bounds do and do not cover¶
Explicit Budget charges, ScratchLimits, and DagBank table
capacities enforce deterministic work and bounded data structures (G3, G4).
They do not measure or enforce an operating-system RSS ceiling, allocator
fragmentation, native thread stacks, or caller-retained outputs outside the
bank and scratch pool. Hosts scheduling parallel chunk workers or session forks
must size concurrency and scratch pools against their own process memory
limits.