Repository navigation
Spec 03 Architecture
Source: spec/03-architecture.md at commit a9f0d61. The file is the source of truth; this page is a summary.
Chapter 03 places every process on a box, every box in a facility and every facility in a home. It draws the data flows (F1–F14) and the message sequences, and puts a time budget on each arrow. It fixes the vyrn-seq core map on the reference EPYC box, the NIC and queue map, the memory map, the replica, data, CONSUMER, AWS and DEV boxes, book groups, state ownership, failure domains and capacity scaling. It does not specify algorithms (05), wire semantics (04), frames and consensus (07), epochs (08), chain mode (09) or the platform (06); it cites those chapters. Every number is a budget unless it is marked vendor. The Spec 01 §14 decisions override anything in it.
-
vyrn-seqnever votes. In BASE, F1 holds the sequencer and voter R1, and F2–F4 hold one voter each (2 Rust, 2 Vx). In CHAIN, the 5 validator boxes vote (ARC-D1, §0). - A warm standby
vyrn-seqsits in F2. Failover promotes it and never a voter, so the client split survives a failover (ARC-D2, §6.18). - Lanes pre-encode their
PacketRecords in pass 1. Stream-A (core 4) and stream-B (core 7) drain them by cut and write the frames to both replication ports (ARC-D3). - Every response is frame-gated on
released_step, acks andBUSYincluded.LaneCutis written only after the step is released (ARC-D4, ARC-D5,INV-ARC-1,INV-ARC-2). - Every outcome that depends on the BBO snapshot is decided by the BBO core, so replicas can replay it (ARC-D6).
-
resp_seqhas one writer. TX cores A, B and C send taker and maker fills from slots the lane reserved; the lane sends everything else (ARC-D7,INV-ARC-3). - An unplanned loss of a lane core is a box failure and starts a failover. Spare cores are used only for planned evacuation (ARC-D9).
- The replication unit is one hot book or one book group of up to 8 books (ARC-D10, §5).
- There is no automatic failover between homes (ARC-D11).
- A session's data home is never in the sequencer's facility (ARC-D12).
- A packet is processed in two passes with early dispatch and deadline admission. A sweep is cut into 15 ns, 64-record continuation steps (ARC-D13, ARC-D14,
INV-ARC-4, §6.0). -
vyrn-mdruns on a non-voting observer box per facility. The resend recovery service runs on R2 (ARC-D15). - There are two lane classes: 42 dedicated lanes (cores 8–49) and a pool of 7 cores (56–62, CCD 7) with account tokens, stealing and
AcctTakelogging (ARC-D16, §4.2a). - Only merchant-silicon switches are used. FPGA switches and P4/Tofino are excluded (§3.2, §11).
| Name | Value | § | Status in the spec |
|---|---|---|---|
| Cross fill / improve ack, index 9 | 880 ns (835 at index 0) | §6.0 | budget, maximum enforced by admission |
| Join or cancel ack, index 9 | 965 ns (955 typical) | §6.0 | budget, maximum enforced by admission |
| Shed threshold | 980 ns | §6.0 | budget |
ARC_ADMIT_AGE_MAX_NS |
500 ns | §6.0, Local definitions | budget |
ARC_STEP_BUDGET_NS / ARC_BBO_TEST_NS
|
15 ns / 15 ns | ARC-D14, §6.0 | budget |
ARC_POOL_TOKEN_NS |
20 ns | §4.2a | budget |
ARC_METRO_ONEWAY_US |
500 µs | §2.1 | budget |
| WAN one-way NYC–LDN / LDN–TYO / NYC–TYO | 35 / 110 / 80 ms | §2.1, §2.3 | budget |
ARC_PTP_OFFSET_NS / ARC_PHC_SKEW_NS
|
100 ns / 50 ns | §3.3 | budget (maximum over the B-ARC-1 run) |
| Finality path, healthy / with a data miss | 3.05 ms / ≤ 6.05 ms | §6.17 | budget, against FINALITY_MAX_MS = 10 |
| Sequencer failover | 2 + 8 + 5 + 5 = 20 ms | §6.18 | budget (FAILOVER_TARGET_MS) |
ARC_K_MAX |
8 books per group | §5 | budget |
ARC_HOT_BOOK_MSGS |
250M msgs/s | §5.2 | budget |
| Replica D-port utilization at peak | 94% | §3.5 | budget (computed) |
Draft 0.2 has no measured numbers.
-
- Decisions this chapter makes
-
- Context and containers
-
- Global deployment
-
- Facility network
-
- Boxes
-
- Book groups
-
- Sequence diagrams
-
- State ownership
-
- Failure domains and blast radius
-
- Scaling
-
- Component catalog
-
- How the design meets the hard constraints
- Interfaces to other chapters
- Local definitions
- Requests to 01
- Open questions
- §14.7 (sequencer NICs). 01 specifies 4 × X2541 facing clients plus 2 × dual-port X2542 for replication. ARC-D8 and §4.1–§4.2 give "6 × X2541: 4 client-facing and 2 replication ports". 01 overrides them.
- §14.7, §14.16 (replica storage). 01 specifies 12 × 61.44 TB NVMe, about 7.9 h at sustained peak, with at least 6 h required. §4.5 and §3.5 give 12 × 30.72 TB, about 3.9 h at peak. 01 overrides them.
-
§14.19 A, §14.16 (dequeue-age drop). A packet past the 500 ns admission age is ingress loss, and it fails B3 and B21. §6.0 says B3 counts these drops "with
BUSYagainst the REQ-LAT-5 bound". 01 overrides that. - §14.16 (admission age). §6.0 and Request 3 say 01 gives 520 ns. 01 §14.16 now reads 500 ns, which matches this chapter, so the request is out of date.
- §14.17.5 (maker count). 01 says about 40 makers at index 9. §6.14 and Request 4 compute 18 at 16 ns per maker packet on three TX cores.
-
§14.3, §5 (lane count). Request 1 (50 lanes, cut B on lanes 25–49) is already resolved: 01 now has
N_LANES_REF= 49 and cut B on lanes 25–48. -
§14.18 O1, O2, O3. Stream cores run at about 0.41 load, not ≤ 0.25 (O1). The cross fill is 947 ns with 07's 142 ns gate, not 880 ns (O2). TX-C on boot core 0 may not be allowed in
nohz_full(O3).
All crates; see Architecture.
The chapter lists 14 open questions; see Open Questions.
Overview
Working on VYRN
Spec
- 00 Index
- 01 Conventions
- 02 Requirements
- 03 Architecture
- 04 Protocol
- 05 Engine
- 06 Platform
- 07 Replication
- 08 Epochs
- 09 Chain
- 10 Accounts, Risk, MD
- 11 Build
- 12 Commitment
- 13 Availability
- 14 Envelope
Engine crates
Other crates
- vyrn-nic
- vyrn-log
- vyrn-data
- vyrn-consensus
- vyrn-replica
- vyrn-epoch
- vyrn-chain
- vyrn-md
- vyrn-sim
- vyrn-bench
Binaries
- vyrn-seq (stub)
- vyrn-validator (stub)
- vyrn-admin
Outside Rust
Reflects main at a9f0d61.