-
Notifications
You must be signed in to change notification settings - Fork 1
Description
As soon as the local instance has both hashes of the first block, it might request this block from the sender and forward it to the receiver. However, it should be possible to disable parallelization, because reading hashes and reading/writing blocks at the same time will cause a heavy slowdown on HDD storages (unless network speed is slower anyway...).
Remotes then also need threading for computing hashes (async, i.e. we compute the next hash even though we didn't send the previous hash yet) and sending/receiving blocks (sync, i.e. we only send/receive one block at a time). We must furthermore add package identifiers to the network protocol (to distinguish hashes and blocks) and ensure that we don't accidentally mix packages mid-data (this can indeed happen because we use stdout/stdin; maybe with a third thread responsible for communications?).