swarm
swarm copied to clipboard
Stream and Pull Sync improvements
- [ ] Pull out syncer from stream package as the provider in its own package. Currently stream and its only provider syncer are highly coupled in
network/stream
package, most significantly in tests. Reduce technical depth by removing syncer from stream package. - [ ] Pull syncing strategy abstraction and revision.
- [ ] If upstream peer offers invalid or no stamps then they can be disconnected (allow marginal faulty stamps). If downstream allowed invalid ones, they can spammed.
- [ ] To avoid discrepancies in validity check, it could be part of offered hash msg what expiration time was used. Downstream imposes moderate tolerance towards this time.
- [ ] If disconnect is conditioned on a small percentage of invalid stamps then the discrepancy problem (bullet point above) is solved.
- [ ] To protect chunks from being lost while being offered and delivered, we temporarily pin the offered chunks (atomic with offeredHashes). After delivery, timeout or downstream peer does not want chunk, pincounter is decreased again. With this protection, network requests are never needed to retrieve an offeredHash.
can you explain what is validity check
?
With this protection, network requests are never needed to retrieve an offeredHash.
not sure i'm following
I believe that this is mostly suggested by @zelig, if I am not mistaken. Maybe he could elaborate more.