verity_dp_zk_host/
generate_groth16_proof.rsuse alloy_sol_types::SolValue;
use anyhow::Context;
use risc0_ethereum_contracts::groth16;
use risc0_zkvm::{ default_prover, ExecutorEnv, ProverOpts, VerifierContext };
pub fn generate_groth16_proof(input: &[u8], guest_elf: &[u8]) -> (Vec<u8>, Vec<u8>) {
let env = ExecutorEnv::builder().write_slice(&input).build().unwrap();
let receipt = default_prover()
.prove_with_ctx(env, &VerifierContext::default(), guest_elf, &ProverOpts::groth16())
.unwrap().receipt;
let seal = groth16::encode(receipt.inner.groth16().unwrap().seal.clone()).unwrap();
let journal = receipt.journal.bytes.clone();
let journal_output = <Vec<u8>>
::abi_decode(&journal, true)
.context("decoding journal data")
.unwrap();
(seal, journal_output)
}