Proposed changes in NFS

Thread Summary:

We evaluated both file and directory versioning and each have their strengths and disadvantages currently. We need to factor in the way SAFE Network works into our discussions as well otherwise the practical outcome will be skewed. One drawback of file versioning is one wouldn’t be able to retrieve a deleted file, but this can be worked around by client apps storing a copy of it somewhere if this functionality is wanted, for e.g. they can move the deleted items to trash before deleting from directory listing for recovery of accidentally deleted items. From a different perspective however this feature of not being able to recover deleted files might be useful - maybe the user had sensitive information and wanted a permanent and secure deletion.
With Dir versioning the disadvantages are those of sizes. If a file is changed in the dir then entire directory is replicated with the new file causing more bloat. This is explained here. Similarly if there are many files which do not require versioning support (just a few or one requires it) then they all suffer due to entire dir being versioned. This size issue with Directory versioning can be countered with only keeping a diff of changes when a dir is mutated. This will however need to be looked into in a separate topic before concluding as feasible. The good however is that a deleted file can be recovered (which again comes with a caveat - if someone does want a truly permanent deletion it wouldn’t be (at least not easily) possible).

This also ties in with self-encryption. Since ImmutableData is capped at 1 MiB currently, we want S.E to reflect that by giving us a DataMap by way of recursive s.e which is <= current cap for ImmutableData. This code is presently in safe_core and is currently planned to be moved to S.E.

Ultimately we will also discuss more on whether deletable-immutable-data might help here, reducing unwanted data from the Network. The RFC is already there for a starting point.

With all this we concluded that for now we will go with File-versioning approach (which suffices a lot of use cases already) and keep looking for any solution that can be better overall as our network matures and we know more of what might pan out and what might not.

4 Likes