pub fn gen_verified_proof_for_exit_circuit<C: Circuit<Engine> + Clone>(
    circuit: C,
) -> Result<EncodedProofPlonk, failure::Error> {
    let vk = VerificationKey::read(File::open(get_exodus_verification_key_path())?)?;

    info!("Proof for circuit started");

    let hints = transpile(circuit.clone())?;
    let setup = setup(circuit.clone(), &hints)?;
    let size_log2 = setup.n.next_power_of_two().trailing_zeros();

    let size_log2 = std::cmp::max(size_log2, SETUP_MIN_POW2); // for exit circuit
    let key_monomial_form = get_universal_setup_monomial_form(size_log2, false)?;

    let proof = prove_by_steps::<_, _, RollingKeccakTranscript<Fr>>(
        circuit,
        &hints,
        &setup,
        None,
        &key_monomial_form,
    )?;

    let valid = verify::<_, RollingKeccakTranscript<Fr>>(&proof, &vk)?;
    failure::ensure!(valid, "proof for exit is invalid");

    info!("Proof for circuit successful");
    Ok(serialize_proof(&proof))
}
/// Generates proof for exit given circuit using step-by-step algorithm.
Generates proof for exit given circuit using step-by-step algorithm.
Generates proof for exit given circuit using step - by - step algorithm .
pub fn gen_verified_proof_for_exit_circuit<C: Circuit<Engine> + Clone>(
    circuit: C,
) -> Result<EncodedProofPlonk, failure::Error> {
    let vk = VerificationKey::read(File::open(get_exodus_verification_key_path())?)?;
    info!("Proof for circuit started");
    let hints = transpile(circuit.clone())?;
    let setup = setup(circuit.clone(), &hints)?;
    let size_log2 = setup.n.next_power_of_two().trailing_zeros();
    let size_log2 = std::cmp::max(size_log2, SETUP_MIN_POW2); // for exit circuit
    let key_monomial_form = get_universal_setup_monomial_form(size_log2, false)?;
    let proof = prove_by_steps::<_, _, RollingKeccakTranscript<Fr>>(
        circuit,
        &hints,
        &setup,
        None,
        &key_monomial_form,
    )?;
    let valid = verify::<_, RollingKeccakTranscript<Fr>>(&proof, &vk)?;
    failure::ensure!(valid, "proof for exit is invalid");
    info!("Proof for circuit successful");
    Ok(serialize_proof(&proof))
}
pub fn gen_verified_proof_for_exit_circuit < C : Circuit < Engine > + Clone > ( circuit : C , ) -> Result < EncodedProofPlonk , failure :: Error > { let vk = VerificationKey :: read ( File :: open ( get_exodus_verification_key_path ( ) ) ? ) ? ; info ! ( " " ) ; let hints = transpile ( circuit . clone ( ) ) ? ; let setup = setup ( circuit . clone ( ) , & hints ) ? ; let size_log2 = setup . n . next_power_of_two ( ) . trailing_zeros ( ) ; let size_log2 = std :: cmp :: max ( size_log2 , SETUP_MIN_POW2 ) ; // for exit circuit let key_monomial_form = get_universal_setup_monomial_form ( size_log2 , false ) ? ; let proof = prove_by_steps :: < _ , _ , RollingKeccakTranscript < Fr > > ( circuit , & hints , & setup , None , & key_monomial_form , ) ? ; let valid = verify :: < _ , RollingKeccakTranscript < Fr > > ( & proof , & vk ) ? ; failure :: ensure ! ( valid " " ) ; info ! ( " " ) ; Ok ( serialize_proof ( & proof ) ) }
Generates proof for exit given circuit using step-by-step algorithm.
Generates proof for exit given circuit using step - by - step algorithm .
circuit
C