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

refactor: Remove clone trait from key and SNARK structs #268

Closed
wants to merge 1 commit into from

Conversation

huitseeker
Copy link
Contributor

@huitseeker huitseeker commented Jan 17, 2024

Summary

We've been a bit loose in allowing macro-derived Clone implementations in spartan SNARK structures. This removes the unused ones, and checks that we won't re-introduce these Clone implementations in the future for structs where this will not make sense (ProverKey, VerifierKey, SNARK).

Details

  • Removed Clone trait from various structs across multiple files, including ProverKey, VerifierKey, and multiple versions of RelaxedR1CSSNARK and BatchedRelaxedR1CSSNARK, among others.
  • Instituted tests to confirm that the Clone trait is not implemented for previously mentioned structs where Clone will not make sense.
  • Added a new static_assertions dependency to the project configuration file, Cargo.toml.

- Removed `Clone` trait from various structs across multiple files, including `ProverKey`, `VerifierKey`, and multiple versions of `RelaxedR1CSSNARK` and `BatchedRelaxedR1CSSNARK`, among others.
- Instituted tests to confirm that the `Clone` trait is **not** implemented for previously mentioned structs where Clone will not make sense.
- Added a new `static_assertions` dependency to the project configuration file, Cargo.toml.
@huitseeker
Copy link
Contributor Author

Shelving until I get time to come back to it.

@huitseeker huitseeker closed this Jan 18, 2024
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.

1 participant