MatrixAI / js-encryptedfs

Encrypted Filesystem for TypeScript/JavaScript Applications
https://polykey.com
Apache License 2.0
10 stars 3 forks source link

Upgrading DB to 4.0.2 #66

Closed emmacasolin closed 2 years ago

emmacasolin commented 2 years ago

Description

Breaking changes in the DB affect how we use the iterator, but now allow us to use keys with zero bytes. The iterator now returns key paths instead of key buffers, so they need to be handled with this in mind.

Tasks

Final checklist

emmacasolin commented 2 years ago

Many of the tests are failing after making changes. Changing the escape character in the DB to 0x00 fixes the majority of them, however, there are still issues with appending. Not sure yet what the cause of these are.

emmacasolin commented 2 years ago

The db has been updated to 4.0.2 now, introducing key encoding to resolve the issues I was seeing here. The source of the test failures was the result of escaping the keys, which changed the lexicographic order that we rely on here in the EFS. Switching from escaping to encoding solves the problem and has been thoroughly tested in the DB so we can now continue here.

CMCDragonkai commented 2 years ago

Great! Did you release the new version of EFS too?