dusk-network / plonk

Pure Rust implementation of the PLONK ZKProof System done by the Dusk team
https://dusk-network.github.io/plonk
Mozilla Public License 2.0
543 stars 150 forks source link

Add `size` method to `Circuit` trait #768

Closed moCello closed 1 year ago

moCello commented 1 year ago

This change also removes the need to preallocate the circuit builder which in turn removes the need to pass the public parameters when compressing a circuit.

Resolves #767

codecov[bot] commented 1 year ago

Codecov Report

Merging #768 (577738b) into master (bcb31de) will decrease coverage by 0.21%. The diff coverage is 70.00%.

:exclamation: Current head 577738b differs from pull request most recent head 0e0b3d4. Consider uploading reports for the commit 0e0b3d4 to get more accurate results

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/dusk-network/plonk/pull/768/graphs/tree.svg?width=650&height=150&src=pr&token=7JKOJ0fLuy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network)](https://app.codecov.io/gh/dusk-network/plonk/pull/768?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network) ```diff @@ Coverage Diff @@ ## master #768 +/- ## ========================================== - Coverage 85.07% 84.86% -0.21% ========================================== Files 57 57 Lines 4327 4327 ========================================== - Hits 3681 3672 -9 - Misses 646 655 +9 ``` | [Files](https://app.codecov.io/gh/dusk-network/plonk/pull/768?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network) | Coverage Δ | | |---|---|---| | [src/composer/builder.rs](https://app.codecov.io/gh/dusk-network/plonk/pull/768?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network#diff-c3JjL2NvbXBvc2VyL2J1aWxkZXIucnM=) | `80.00% <100.00%> (ø)` | | | [tests/composer.rs](https://app.codecov.io/gh/dusk-network/plonk/pull/768?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network#diff-dGVzdHMvY29tcG9zZXIucnM=) | `95.91% <ø> (ø)` | | | [src/composer/compiler.rs](https://app.codecov.io/gh/dusk-network/plonk/pull/768?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network#diff-c3JjL2NvbXBvc2VyL2NvbXBpbGVyLnJz) | `98.42% <75.00%> (+0.47%)` | :arrow_up: | | [src/composer/compiler/compress.rs](https://app.codecov.io/gh/dusk-network/plonk/pull/768?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network#diff-c3JjL2NvbXBvc2VyL2NvbXBpbGVyL2NvbXByZXNzLnJz) | `87.82% <87.50%> (-0.08%)` | :arrow_down: | | [src/composer.rs](https://app.codecov.io/gh/dusk-network/plonk/pull/768?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network#diff-c3JjL2NvbXBvc2VyLnJz) | `91.00% <77.77%> (-0.03%)` | :arrow_down: | | [src/debugger.rs](https://app.codecov.io/gh/dusk-network/plonk/pull/768?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network#diff-c3JjL2RlYnVnZ2VyLnJz) | `67.41% <33.33%> (-5.85%)` | :arrow_down: | | [src/runtime.rs](https://app.codecov.io/gh/dusk-network/plonk/pull/768?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network#diff-c3JjL3J1bnRpbWUucnM=) | `18.75% <0.00%> (-19.72%)` | :arrow_down: | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/dusk-network/plonk/pull/768/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/dusk-network/plonk/pull/768?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/dusk-network/plonk/pull/768?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network). Last update [bcb31de...0e0b3d4](https://app.codecov.io/gh/dusk-network/plonk/pull/768?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network).