Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support Go garbage-collected ciphertexts (ethereum#34)
Optimize cgo <-> tfhe-rs performance by: * not deserializing the server key on every operation * not serializing/deserializing the ciphertexts on every operation * making sure a ciphertext is serialized/deserialized at most once * not copying bytes when passing them from Go to C * caching cihpertext serialization and hash for later uses Keep pointers to C-allocated ciphertexts in the `verifiedCiphertexts` EVM variable instead of their serialization. Hook these C-allocated ciphertexts to the gargage collector by utilizing `setFinalizer()`. Run the GC based periodically, based on number of allocated ciphertexts. Add an unit test for `tfhe.go`.
- Loading branch information