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.
When using cyclic recursion,
CircuitBuilder::build_with_options
currently checks that the resulting common data matches the data that was passed intoCircuitBuilder::conditionally_verify_cyclic_proof
, and panics if it's different. This PR adds atry_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 intoconditionally_verify_cyclic_proof
. The behavior ofbuild_with_options
is the same.