Closed meejah closed 1 year ago
The above situation will persist until all participants are up-to-date.
Note that there is a case in Private Storage where a participant will never update: restore-from-recovery-key.
This flow uses a second participant (so that two devices don't have the same write-caps): the "old" device is then a participant in the "new" folder that is created on the recovery device. Need to confirm that this definitely hits this case, but assuming it does we should properly handle a situation where a participant will "never" update (it could also happen for example, if a participant uses the software for a while but then decides they don't like it or whatever and just never runs it again).
Currently, the "downloader" logic looks at all (other) participants, and what Snapshot they point at. If the Snapshot is different from ours, then it fetches it (and performs some logic to determine if the Snapshot is an update or not). So if another device is out-of-date and hasn't updated its Snapshots they'll look interesting (because they don't match "our" Snapshot) so we'll download it -- but then determine that ours is newer. (So, the actual content isn't downloaded).
We could avoid downloading the Snapshot if we cached all parents for every Snapshot we currently have.