P2P with temporary syncthing files

During transfer Syncthing creates temporary ~syncthing~ files until download is finished

device A uploads a 6GB file to device B and device C all devices share a single folder with each other device B has 3GB, device C has 1GB

Does syncthing on device B also send parts/blocks from the ~syncthing~ file to device C ? Or does P2P only work if device B has full 6GB?

Only devices that have the full file can send pieces to other devices.

(Well, technically, they could of course send pieces even if they don’t have the full file. But they won’t announce the file to their peers until the have the full file, so they won’t know about it and hence can’t ask for the pieces.)

Thanks for clarification - this is opposite from what I expected from a P2P program Are there any plans to change this behavior and reuse existing pieces? This would really help lot with big files and slow internet lines if a file is synced with multiple devices that are all interconnected.

1 Like

No current plans, but there were some changes lately that might make it easier to implement in the future.

1 Like

How would you do this though? What makes it easier?

Having a block index makes it easier. Granted, currently it doesn’t help because the temp files aren’t indexed nor announced, but if we did separate things out to announce for example file lists and available blocks (by hash) separately… That might help with the encrypted nodes stuff as well, maybe.

I have a lot of implementation detailed questions about this, but I’ve now opened up a ticket.

Thanks for considering this feature :smile: I’m sure this will speed up transfers because in many European countries DSL-lines are asymmetric

another related idea: it would be great to use existing blocks from files across folders

device A shares file 1 in folder X with device B and device C device B shares same file 1 in folder Y with device C a (complete) download would not be necessary because device C already has (some) all blocks of file 1

Blocks are already shared across folders, but files which we are picking up blocks from have to be fully downloaded for that to happen.

1 Like

Is there anyone working on this feature? Or has it already included in newer version of syncthing?


thank you :smiley: