Skip to content

Spec 11 Build

Amp edited this page Nov 18, 2026 · 1 revision

Spec 11: Build, test, benchmark and run

Source: spec/11-build.md at commit a9f0d61. The file is the source of truth; this page is a summary.

What the chapter decides

11 fixes how VYRN is built and proved: one cargo workspace and one commit for every artifact, a dependency allowlist, coding rules for the pinned crates, the C shim build, the Vx parts, seven test layers, the benchmarks B1–B20, observability that never touches the hot path, CI/CD with a performance gate and reproducible signed releases, deployment and runbooks, and the milestones M0–M6. Its first rule: "A number without a benchmark is a budget", and draft 0.2 has no measured numbers (§0).

Key decisions

  • One repository, one commit (§1.1). One Cargo.lock, one toolchain file; the C shim and Vx code live in the same repository, so INV-DET holds across the sequencer, Rust replicas and Vx replicas.
  • Engine crates under crates/engine/ (§1.3) share one strict clippy.toml that bans floats, std::time, RandomState, logging and threads.
  • The dependency graph is a DAG (§1.4), checked by tools/lint-engine. See Architecture.
  • Dependency tiers (§2): E (engine crates may use), S (other production crates), T (tests and tools only); no async runtime on pinned cores (§2.3); SipHash is in-house (§2.4); Ed25519 verification follows ZIP-215 (§2.5).
  • Hot-crate rules (§3): every pinned role is a poll state machine (§3.1); unsafe only in the UNSAFE.toml modules (§3.2); checked arithmetic and overflow checks in every profile (§3.4); the sealing allocator enforces INV-NOALLOC (§3.5).
  • C shim (§4): 100–300 lines wrapping ef_vi and DPDK, inlined by cross-language LTO and verified by the asm gate (§4.4).
  • Vx (§5): libvyrn_vx_oracle and libvyrn_vx_client ship as shared libraries with a C ABI, hosted by Rust binaries and pinned by hash (§5.1).
  • Tests (§6): seven layers from unit tests to cross-build determinism; the per-platform matrix in §6.9.
  • Benchmarks (§7): B1–B20 and B-GPU, each passes or fails (§7.3).
  • Observability (§8): counters and per-core trace rings; no logging on pinned cores.
  • CI/CD (§9): stages S1–S6, the perf gate (§9.3), reproducible builds (§9.4), 2-of-3 signing (§9.5).
  • Operations (§10): one signed TOML config per box (C-ONEBIN), rollouts only at epoch boundaries, runbooks.
  • Milestones (§11.1) and a risk register R1–R15 (§11.2), each risk with a kill criterion that never restates a requirement.

Key numbers

Item Value Kind
S1 / S2 / S3 duration ≤ 15 / ≤ 60 / ≤ 45 min budgets (§9.1)
Runner noise to qualify MAD ≤ 1% (BLD_RUNNER_NOISE_MAX) rule (§9.3)
Perf regression worse than max(2%, 3 × MAD) vs median of last 10 runs rule (§9.3)
Release signatures 2 of 3 (BLD_RELEASE_SIGS) rule (§9.5)
C shim size 100–300 lines gate (§4.5)
Milestone total 80 weeks, about 800 person-weeks budget (§11.1)

Section map

0 Scope and the constraints · 1 Repository layout · 2 Dependency policy · 3 Rust coding rules for hot crates · 4 The C shim build · 5 The Vx parts · 6 Testing strategy · 7 Benchmarks · 8 Observability without touching the hot path · 9 CI/CD · 10 Deployment and operations · 11 Milestones and risks · Interfaces to other chapters · Local definitions · Requests to 01 · Open questions

Where 01 §14 refines this chapter

§14.11 accepts 11's requests: the unsafe allowlist, ZIP-215 Ed25519, the ID prefixes (B, WL, SF, M), and Vx parts shipped as shared libraries hosted by Rust binaries. 11 §1.3 already follows §14.3 (two cut cores) and §14.17.3 (TX-A/B/C).

Implemented by

Every crate; see Building, Testing, Benchmarking, CI Gates and Releases and Milestones and Status.

Open questions

The chapter lists 15 open questions; see Open Questions.

Clone this wiki locally