You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ADR 025: Client crash recovery and download resume #207
ADR 005 defines byte_offset in StreamRequest for seek and resume, but no ADR specifies the client-side persistence layer that enables crash recovery: how downloaded bytes are stored on disk, how payment channel state is persisted, and how a client resumes from the exact point of a crash or abort.
Refs: ADR 003 (payment channels, voucher nonce), ADR 005 (byte_offset, StreamRequest), ADR 012 (client state under ~/.decdn/)
Gap
No design exists for:
Stable on-disk structure for in-progress downloads (chunked temp files vs. sparse file vs. separate chunk dir)
Persisting payment channel IDs and latest voucher nonces across restarts
Determining the resume byte offset after a crash (last BLAKE3-verified byte)
Handling the case where a node has a voucher the client did not persist (potential overpayment)
Atomic state updates to avoid corruption from a crash during the persistence write itself
Interaction with parallel downloads (ADR 024)
Why it needs an ADR
Without this, clients re-download from byte 0 after any crash, paying twice for already-delivered bytes and wasting bandwidth. Especially painful for large blobs (AI models, datasets).
Expected outcome
ADR 025 defining the on-disk layout for in-progress downloads, the state persistence format (channel IDs, voucher nonces, verified byte ranges), resume semantics, and atomic update guarantees.
Activity
docs: add ADR 025 — client download resume and crash recovery
docs: add parallel download, crash resume, and manifests to ADR 012