This repository has been archived on 2026-08-30. You can view files and clone it. You cannot open issues or pull requests or push a commit.
bl 4033c0ffab Protocol v2: trusted-peer push, truthful partials, split downloads
Three capabilities the iroh-blobs 0.103 line makes possible:

- Push (new API surface, protocol v2): `Push { hash, node_id }` hands
  fully-present content to a trusted peer, unprompted. Consent is
  mutual — the sender pushes only to peers it trusts, and the receiver
  (which now accepts connections unconditionally and gates per request)
  admits pushes only from peers *it* trusts, deferring with RateLimited
  while metered. An accepted push is pinned by the receiver (default
  policy, format inferred from the request ranges) once its transfer
  completes, and surfaces as a PushReceived event. Because QUIC writes
  are fire-and-forget, the sender confirms delivery by observing the
  receiver's bitfields (root + last hashseq child) before replying —
  Pushed { bytes } means verified received, not merely sent. New
  varde-ctl `push` command.

- Truthful partial presence: Status/List report bytes actually present
  and verified for partial blobs, from the store's bitfields via
  observe, instead of the old "0 until complete".

- Split downloads: multi-provider fetches stripe one request across
  providers (SplitStrategy::Split) instead of trying them serially.

Trusted peers may observe bitfields even when serving is disabled or
metered — bitfields are metadata, and push confirmation rides on them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-16 14:52:27 +02:00

varde

A small, boring, distro-packageable Linux daemon that owns a content-addressed blob store and mirrors content between consenting peers, built on iroh (iroh 1.0, iroh-blobs 0.103). Applications talk to it over a unix socket: "add this path", "pin this hash", "materialize hash X at path Y". Think: what Windows Delivery Optimization is for updates — generalized, open, legible.

varde (Norwegian): a stone cairn used as a waypoint.

Design ethos

  • Infrastructure, not product. No GUI, no self-updater. A daemon, a CLI, a JSON-lines socket protocol, man pages, systemd units.
  • Legible to the network. Identifiable mDNS advertisement, DSCP CS1 marking, conservative rate limits (10 MiB/s up default), LAN-only with zero WAN upload by default, all transfers stop on metered connections.
  • Consent-tiered. Discovery is open; replication is explicit. Content is served only to allowlisted peers, except what you deliberately publish (--open-lan pins, exported tickets). All fetched data is BLAKE3-verified regardless — trust gates participation, not integrity.

Layout

crate role
varde-proto wire types for the socket API (serde, no I/O)
varde-daemon the service: store, endpoint, policy, socket server
varde-ctl CLI client and protocol reference implementation

dist/ holds systemd units (system + user, socket activation), scdoc man pages, an example config, and an untested Arch PKGBUILD. docs/ has per-milestone decision notes and the redoal integration sketch.

Quick start

$ varde-daemon --user &
$ varde-ctl add ~/dataset -r
added 5b1c…e0 (1234567 bytes)
$ varde-ctl pin 5b1c…e0
$ varde-ctl ticket export 5b1c…e0     # hand this to another machine
$ varde-ctl ticket import <ticket>    # ...which runs this
$ varde-ctl materialize 5b1c…e0 /srv/dataset   # reflinks when possible

Trusted peers on the same LAN sync overlapping pins automatically:

$ varde-ctl status          # shows this daemon's node id
$ varde-ctl peer trust <node-id-of-the-other-machine>   # on both ends

Trusted peers can also hand content to each other directly, no ticket round-trip — the receiver pins what it accepted:

$ varde-ctl push 5b1c…e0 <node-id-of-the-other-machine>

Building and testing

$ cargo build --release
$ cargo test --workspace          # spawns real daemons; no mocked iroh
$ cargo clippy --workspace --all-targets -- -D warnings

The metered feature (default on) needs D-Bus at runtime only; build with --no-default-features for systems without it.

S
Description
moved to project.uhhm.no/uhhm/varde
Readme 413 KiB
Languages
Rust 100%