20bdf56668
mDNS-style LAN discovery (iroh MdnsDiscovery, discovery flag, default on) feeds a presence tracker; trusted peers that appear trigger fetches of every incomplete pin, and Pin itself now fetches from present trusted peers. Serving is our own ProtocolHandler: trusted NodeIds get the full store, everyone else a filtered view limited to open_lan pins and ticket-exported hashes (plus hashseq children) that answers "not found" for the rest. Ticket export records standing serve-consent for that hash; trust changes take effect on new connections. ShapedStore implements the full iroh-blobs Store trait to charge provider reads to an upload token bucket and downloader writes to a download bucket; upload cap 0 closes incoming connections at accept. Subscribe now streams transfer_progress both ways, peer_joined, and pin_complete. Tests: forged-ticket trust gating (denied untrusted, served after trust), 256 KiB/s upload cap enforced by wall clock, event stream during a transfer, and real-mdns auto-sync between two daemons (skips where multicast is unavailable). Dependencies: n0-future, async-channel, futures-lite, bytes — all already in the tree via iroh; needed directly to name types in iroh-blobs trait signatures and channels. iroh feature discovery-local-network for MdnsDiscovery. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
40 lines
1.1 KiB
TOML
40 lines
1.1 KiB
TOML
[package]
|
|
name = "varde-daemon"
|
|
description = "varde: content-addressed blob mirror daemon on iroh"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
rust-version.workspace = true
|
|
|
|
[[bin]]
|
|
name = "varde-daemon"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
varde-proto = { workspace = true }
|
|
iroh = { workspace = true, features = ["discovery-local-network"] }
|
|
iroh-blobs = { workspace = true }
|
|
rand = "0.8"
|
|
# The next three exist to interoperate with iroh-blobs trait signatures
|
|
# and channels; all are already in the dependency tree via iroh.
|
|
n0-future = "0.1"
|
|
async-channel = "2"
|
|
futures-lite = "2"
|
|
bytes = "1"
|
|
iroh-io = { workspace = true }
|
|
reflink-copy = { workspace = true }
|
|
anyhow = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
tokio = { workspace = true }
|
|
toml = { workspace = true }
|
|
tracing = { workspace = true }
|
|
tracing-subscriber = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|
|
proptest = "1"
|
|
tokio = { workspace = true, features = ["test-util"] }
|