iroh
iroh copied to clipboard
Sync tracking issue
This issue contains an overview of known limitations, bugs, missing features and chances for optimization for Iroh sync. It was mostly copied from the original PR overview (#1333) to get started.
Known bugs & limitations
- [ ] Fix cross-compiles to arm/android. See https://github.com/cross-rs/cross/issues/1311
- [x] Ensure that we don't block async executors: #1502 Fixed in #1612
- [x] Make sync propagate through the swarm: #1515
- [ ] Sync propagation test is flakey #1741
Missing features
- [x] Add
iroh_sync::Store::close_replica: #1495 - [ ] ~~Implement
AuthorImportandAuthorShareRPC & CLI commands~~ maybe let's not do this to and keep authors device-local so we can assume linear inserts - [ ] Partial sync and partial download policies for documents
- [x] Make read-only replicas possible: #1767
- [ ] #1494
Reliability / performance / optimizations
- [ ] Make content download reliable and predictable.
- [x] Propagate content availabilits: #1480
- [ ] Allow to download missing content from peers / prevent "lost content": #1489
- [ ] Add basic peer management and persistence. Currently live sync will stop to do anything after a node restart.
- [x] Remember peers in
iroh-net: #1488 - [x] Persist the addressbook of peers for a document, and reconnect when restarting the node. Likely track "sync policy" per document
- [ ] Implement
PeerAddandPeerListRPC & CLI commands for a document
- [x] Remember peers in
- [ ] Improve algorithm when to sync with which peer. Currently sync runs on initial peer and for each
NeighborUpevent from the gossip layer. Make sure this reliably syncs often enough, and prevent double syncs. First step is better tracking, see #1491 - [ ] Make fingerprinting calculation fast and do not allocate for each entry. And/or cache fingerprints to not recalculate everything, always.
- [ ] sync store
list_namespacesandlist_authorsinternally collect, return iterator instead
Security
- [ ] Use a cryptographic algorithm for fingerprint calculation in place of the current XOR algorithm
- [ ] Make sure that we never leak the
NamespaceIdof a document (which is also used asTopicIdfor gossip), because theNamespaceIdgives read-only access to a document.- [ ] Maybe make the
TopicIda hash of theNamespaceIdto reduce the surface of potential exposure?
- [ ] Maybe make the
- [ ] #1519
Other TODOs collected from the code
- [ ] Port
hammerandfscommands from REPL example to iroh cli - [ ]
iroh-syncshouldn't depend oniroh-bytesonly forHashtype -> #1354 - [ ]
iroh_sync: Remove some items only used in tests (marked with #[cfg(test)]) - [ ]
ranger::SimpleStore::get_range: optimize - [ ]
ranger::Peeravoid allocs? - [ ]
fs::StoreInstance::get_fingerprintoptimize