dusk-network / plonk

Pure Rust implementation of the PLONK ZKProof System done by the Dusk team

Home Page:https://dusk-network.github.io/plonk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Restructure integration tests

moCello opened this issue · comments

commented

Describe what you want implemented
Restructure integration tests and add common setup and verification functions that all tests can use.

Describe "Why" this is needed
Reduce test boilerplate. This way it becomes more transparent what is actually tested and easier to add new tests.

Describe alternatives you've considered
The tests essentially are unit tests (testing one specific functionality/function) but because the testing happens in-circuit and benefit from helper functions, I have kept them as integrations tests.

Additional context
The workload is split over multiple issues. This issue covers:

  • add helper functions:
    • setup
    • check_satisfied_circuit
    • check_unsatisfied_circuit
  • refactor tests:
    • assert_equal_point
    • assert_equal_public_point
    • component_mul_point
    • component_add_point
    • component_mul_generator
    • component_boolean
    • component_select
    • component_select_one
    • component_select_zero
    • component_select_point
    • component_select_identity