Skip to content

Spec 01 Conventions

Amp edited this page Nov 18, 2026 · 1 revision

Spec 01: Conventions

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

What the chapter decides

01 is normative and wins over every other chapter: "If another chapter disagrees with it, this chapter wins and the other chapter has a bug." It defines the words, primitive types, cryptography, constants, wire layouts, invariants, requirement-ID prefixes, software names, hardware targets, determinism rules and the v1 product decisions. §14 holds the binding draft 0.2 and draft 0.3 decisions.

Section map

1 Words · 2 Hard constraints · 3 Primitive types · 4 Cryptography · 5 Constants · 6 Wire layouts (6.1–6.6) · 7 Invariants · 8 Requirement IDs · 9 Software names · 10 Hardware targets (with the reference core map) · 11 Determinism rules · 12 Product and ownership decisions (v1) · 13 Writing rules for chapters · 14 Draft 0.2 decisions (14.0–14.19)

Key decisions

  • Types (§3): little-endian newtypes in vyrn-types: Tick, Qty, AccountId, LaneId, LaneSeq, StepId, Handle, Epoch, Height, Nanos, Hash (BLAKE3-256), PktHash, Tag (SipHash-2-4).
  • Crypto (§4): SipHash-2-4 packet MACs, BLAKE3 everywhere, Ed25519 for votes and certificates, X25519 plus BLAKE3 derive_key for session keys.
  • Invariants (§7): INV-WRITER, INV-DET, INV-FRAME-FIRST, INV-UNCROSSED, INV-LANE-NOMATCH, INV-CUT-MONO, INV-FENCE, INV-NOALLOC, INV-QUORUM, INV-ACK-AFTER-CUT.
  • Determinism (§11): no floats, no randomly seeded hash maps, the clock enters state only as the NIC RX timestamp (plus logged shed decisions), checked arithmetic, and replay = the live engine with the NIC replaced by the order stream.
  • Product (§12): v1 is fully collateralized spot; balances live in lanes; one hot book per sequencer box.
  • Languages (§9): Rust for every binary, C only for vyrn-nic-shim, Vx for vyrn-vx-client and vyrn-vx-oracle. No C++.

§14, the binding decisions

§ Decision
14.0 The hard requirements are not negotiable; exactly three facts are stated as facts (AWS wire is Nitro's, the handoff window is set by light, BFT needs a timely network).
14.1 Deadline admission: an answer or BUSY within 1 µs; DEADLINE_GUARD_NS = 20, shed threshold 980 ns.
14.2 Two-pass lanes with early dispatch; worst-case budgets at message index 9.
14.3 Two cut cores (core 1: lanes 0–24, core 6: lanes 25–48).
14.4 vyrn-seq never votes; client split; warm standby in F2.
14.5 Ordering frames; every response is frame-gated.
14.6 Response retention.
14.7 Hardware (NICs, NVMe, no GPU/FPGA/ASIC/P4/SmartNIC).
14.8 Sessions survive epochs.
14.9 Finality gate FIN_GATE_BLOCKS = 8 in both modes; forced inclusion.
14.10 New reject reasons, StepKinds and response records.
14.11 Accepted chapter requests.
14.12 Name: VYRN, vyrn- prefix, C shim prefix vyns_.
14.13 Adopted from onebook: Segment16 FIFOs, immutable queue positions, separate attestations, shedding before sequencing, epoch-settled balance domains.
14.14 Maker fills also within 1 µs.
14.15 Dedicated (42) and pooled (7-core) lane classes; BBO step ≤ 15 ns; STEP_FILL_CAP = 64.
14.16 Other cross-chapter rulings (self-fence, data home, observer box, retention, frame gate).
14.17 Rulings on 05's findings: ack budget, what dedicated-lane "zero BUSY" means, three TX cores, AcctTake, long sweeps.
14.18 Open items O1–O7 carried into draft 0.3 (see Open Questions).
14.19 Draft 0.3 rulings: A ingress scope, B revert and bust, C DAV-1 to DAV-4.

Key numbers (§5; all budgets unless the spec says otherwise)

Name Value Kind
LAT_MAX_NS 1000 hard maximum
NIC_FLOOR_NS 560 maximum for NIC qualification
LANE_NS_PER_MSG 30 budget
BBO_CROSS_NS 15 budget (maximum per step)
CUT_REFRESH_NS 100 budget
BLOCK_NS 1_000_000 block length
FINALITY_MAX_MS 10 hard maximum while the network meets its bound
N_BASE, Q_BASE / N_CHAIN, Q_CHAIN 4, 3 / 5, 4 set sizes
FAILOVER_TARGET_MS 20 published outage target
N_LANES_REF 49 42 dedicated + 7 pooled

Words are on the Glossary. Implemented by: vyrn-types holds §3, §5 and the §6.6 records as code.

Clone this wiki locally