Git Design: Pull and Push

I know this will never work but let’s mark it as a feature if we do manage find a way to do this.

We’ll take the Git idea of pull and push design, and merge into safenet. What if you want to modify the said data without having to upload new data? One could pull all of the chucks of said data from the vaults, modify it, then push it back into the vaults. It does require datamap private key. Datamap will be updated, and then discard the old datamap?

We could save more resources, and reduce junk files.

But how does the network know that other people do not also have a copy of the file’s datamap.

The network could allow changes to be made to files the other users considered safe from change.

That’s pretty much the way GIT and other immutable data structures work – If a change is made the original data is still perfectly intact and usable without problem for anybody using the aged datamap – Anything new is added to the network and the datamap is changed to reference the existing files minus the replaced files plus the new one…

My concern with SAFE is that it doesn’t do this enough… If you change on letter in a document someplace it doesn’t hash out the same, and is chunked entirely differently and encrypted differently – that causes de-duplication not to work as well as it could…

It would be best just to upload the changes and re-use as much of the unmutated data as possible…

If you do not change the length and only data in one chunk then only 3 chunks are rewritten, from my understanding.

ie if you change chunk 50 in a 100 chunk file then

  • no change in length: only 3 chunks around chunk 50 are written to get self encryption correct
  • change length: then chunks 49 to 100+ are written since they all change

The datamap returned will contain the set of chunks that are now for the file.

So if you keep the old datamap and the new then you have versioning

I don’t think so – Because self encryption process uses the hashes of each of the chunks is used to encrypt the adjacent chunk around the horn…

So either the chunk itself is change or the hash of its neighbor is changed and then that hash is used to create the final chunk that is sent to the network…

Self encryption relies only on the previous and following decrypted chunk to help encrypt the current chunk. So to encrypt one chunk you only need 3 chunks

Right, but if you change chunk 3, it changes the hash that is used to encrypt chunk 1… So chunk 1 is going to be stored in a new and different address on the maidsafe network even if it’s content is the exactly the same…