Repository navigation
Crate vyrn data
Amp edited this page Nov 18, 2026
·
1 revision
crates/vyrn-data · layer 4 of spec 11 §1.4 · not pinned (11 §1.3)
The data tier. A client sends a second copy of each request packet to a data box. The box checks it, stores it by (session, pkt_seq) and PktHash, fans it out to every replica and the warm standby, and answers fetches for missing payloads. It answers from its RAM ring, and also from logged blocks that it reads through vyrn_log::BlockStore.
- 07 §5 (the data tier): §5.2 ingest, §5.3 data frame, §5.5 fetch
- 01 §6.1 (the request packet), 04 D2/D3 and §2.4 (resends and client equivocation)
- 07 §8.2 (the block record whose payloads a BLOCK fetch serves)
- 11 §1.3 (the crate's job), 11 §1.4 (layer 4)
| Type | Role |
|---|---|
DataNode |
One data box over generic RxRing/TxRing and a BlockStore: ingest, fan-out, heartbeats, fetches |
NodeConfig, Counters
|
Box configuration and its counters (such as fetch_bad) |
DataHome, HomeConfig
|
Ingest for one data home: parse, MAC, dedupe, hash, store |
Mode |
BASE checks tag_seq under K_seq, CHAIN checks tag_com under K_com
|
Reject, Event
|
Ingest reject reasons, and events for the control core (BadMac, CopyConflict) |
Packet, Ingested
|
A stored packet and the result of one ingest |
ring::Ring |
The RAM ring indexed by (session, pkt_seq)
|
dedupe::Dedupe |
The hi mark plus a 256-bit window per session |
frame::FrameBuf, frame::DataHdr, frame::Fetch
|
DATA / DATA_HB / FETCH_RESP frames and the KEY / RANGE / BLOCK fetch messages |
Implemented (partial)
- The library implements ingest, the frame format, the fetch formats and a node that runs end to end over
vyrn-nic'ssimbackend. - The crate doc marks several choices as gap, where 07 is silent. Examples: the fetch byte layout,
MAX_VARIANTS, and a ring that evicts by slot count rather than byREP_DATA_RING_S. - The crate doc names one follow-up: "07 §5.2 step 5's fixed open-addressed table is a follow-up". The indexes are
BTreeMaps, which allocate as sessions arrive. - The
vyrn-databinary is a stub: src/main.rs isfn main() {}. -
Cargo.tomldeclarescommonware-p2pandtokio, but no file undersrc/uses them. - Tests: 10
#[test]. tests/node.rs has 5, tests/golden.rs has 3 (against tests/golden/vyrn_data_vectors.out), andsrc/ring.rsandsrc/dedupe.rshave 1 each.
| Crates | |
|---|---|
Code (Cargo.toml) |
vyrn-types, vyrn-crypto, vyrn-wire, vyrn-log, vyrn-nic
|
| 11 §1.4 |
vyrn-log, vyrn-nic (and the layers below them) |
These match. 11 §1.3 says the vyrn-data binary links vyrn-data, vyrn-nic and vyrn-log, but its main does nothing yet.
- Code: crates/vyrn-data
- Spec: Spec-07-Replication, Spec-01-Conventions, Spec-04-Protocol, Spec-11-Build
- Related: Crate-vyrn-log, Crate-vyrn-nic, Crate-vyrn-replica, Known-Gaps
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.