Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use versioned safe ser/deser #37

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

dartdart26
Copy link
Collaborator

Use the versioned safe ser/deser tfhe-rs functions. Versioning might become part of safe ser/deser, but for now we better be explicit and not rely on that.

ProvenCompactCiphertextList uses safe_(de)serialize() now as versioning is not supported in thfe-rs yet. Will move to versioned once available.

CompactPkePublicParams uses (de)serialize_with_mode() as of now as versioning is not supported yet.

Also, remove explicit thread local and Arc handling for server key - it is already an Arc internally, so it is cheap to clone.

@dartdart26 dartdart26 self-assigned this Sep 25, 2024
register_int_counter!("coprocessor_get_ciphertexts_count", "grpc calls for get ciphertexts endpoint").unwrap();
static ref GET_CIPHERTEXTS_ERRORS: IntCounter =
register_int_counter!("coprocessor_get_ciphertexts_errors", "grpc errors while calling get ciphertexts").unwrap();
static ref UPLOAD_INPUTS_COUNTER: IntCounter = register_int_counter!(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beyond just this specific PR: a lot of the diffs are just formatting noise. Is there a tool that standardises formatting that we could agree on and use so we avoid this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to put a check in CI and not allow PRs without formatting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be best, yes

Use the versioned safe ser/deser tfhe-rs functions. Versioning might
become part of safe ser/deser, but for now we better be explicit and not
rely on that.

`ProvenCompactCiphertextList` uses safe_(de)serialize() now as
versioning is not supported in thfe-rs yet. Will move to versioned once
available.

`CompactPkePublicParams` uses (de)serialize_with_mode() as of now as
versioning is not supported yet.

Also, remove explicit thread local and Arc handling for server key - it
is already an Arc internally, so it is cheap to clone.
@dartdart26 dartdart26 force-pushed the petar/versioned-safe-ser-deser branch from 5d17ce3 to 42d9c16 Compare September 25, 2024 13:08
@dartdart26 dartdart26 merged commit 0ebd723 into main Sep 25, 2024
2 checks passed
@dartdart26 dartdart26 deleted the petar/versioned-safe-ser-deser branch September 25, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants