hitsave-io / xyz

Monorepo for HitSave
1 stars 0 forks source link

client: hashing and pickling overhaul #128

Closed EdAyers closed 1 year ago

EdAyers commented 1 year ago

There are a few problems with the current way that the client hashes python objects:

The hashing code is doing something very similar to pickling; take a python object, serialise it to a bytestream. The bytestream is then digested using BLAKE3 instead of being written to a file. We should define digest-equality as just meaning that two object's pickle-digests are the same.

Some caveats:

With all of these adjustments I think we will have a nice, performant object digester that works well with any picklable object.

We still won't have the object's digest be the same as the pickle's blob-digest, but I can imagine later modifying pickle to be HitSave aware:

EdAyers commented 1 year ago

done