ZK-Garage / plonk

A pure Rust PLONK implementation using arkworks as a backend.
https://discord.gg/XWJdhVf37F
Mozilla Public License 2.0
295 stars 76 forks source link

Refactor Proving/Verifying keys #45

Closed bhgomes closed 2 years ago

bhgomes commented 2 years ago

Closes #14.

bhgomes commented 2 years ago
  • You can simply move permutation.rs file and rename it. Git should then identify it as a rename instead of as a massive change which makes the PR more difficult to review. As basically everything is in green and is not clear if you added something new or not. Same happens with:

    • src/proof_system/widget/ecc/fixed_base_scalar_mul.rs
    • src/proof_system/widget/logic.rs
    • src/proof_system/widget/range.rs
    • src/test.rs

Unfortunately, git is doing a disservice here, since for other files it gracefully displays a "move and change". These are not just file moves:

  1. src/permutation.rs is a move from src/permutation/mod.rs but also it now includes mod constants to include the constants. Honestly, the constant file is so small, we should just merge it into src/permutation.rs too.
  2. widget/fixed_base_scalar_mul.rs replaces the widget/ecc/scalar_mul directory and implements the new trait.
  3. widget/logic.rs replaces the widget/logic directory and implements the new trait.
  4. widget/range.rs replaces the widget/range directory and implements the new trait.
  5. src/test.rs replaces src/tests.rs (to keep the naming uniform across the library) and removes an extra unnecessary module (and removes an extra #cfg[test].
bhgomes commented 2 years ago

Also added some comments about the WIP.

I'll leave a detailed design and merge plan once I clean up a few inconsistencies left from master.

bhgomes commented 2 years ago

Moved to #49.