0xPolygonZero / plonky2

Apache License 2.0
757 stars 283 forks source link

Add try_build_with_options #1391

Closed ctian1 closed 9 months ago

ctian1 commented 9 months ago

When using cyclic recursion, CircuitBuilder::build_with_options currently checks that the resulting common data matches the data that was passed into CircuitBuilder::conditionally_verify_cyclic_proof, and panics if it's different. This PR adds a try_build_with_options function that always returns the data along with a boolean of whether it succeeded or not. This way, it's possible to get the correct common_data and pass it into conditionally_verify_cyclic_proof. The behavior of build_with_options is the same.

sonarcloud[bot] commented 9 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information