Skip to content

Commit

Permalink
fix(risc0): add prover code to proof key
Browse files Browse the repository at this point in the history
  • Loading branch information
petarvujovic98 committed Jul 17, 2024
1 parent 9d44217 commit 39ed4a6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion provers/risc0/driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ impl From<Risc0Response> for Proof {

pub struct Risc0Prover;

const RISC0_PROVER_CODE: u8 = 3;

impl Prover for Risc0Prover {
async fn run(
input: GuestInput,
Expand All @@ -58,7 +60,11 @@ impl Prover for Risc0Prover {
) -> ProverResult<Proof> {
let mut write = write;
let config = Risc0Param::deserialize(config.get("risc0").unwrap()).unwrap();
let proof_key = (input.chain_spec.chain_id, output.hash.clone());
let proof_key = (
input.chain_spec.chain_id,
output.hash.clone(),
RISC0_PROVER_CODE,
);

debug!("elf code length: {}", RISC0_GUEST_ELF.len());
let encoded_input = to_vec(&input).expect("Could not serialize proving input!");
Expand Down

0 comments on commit 39ed4a6

Please sign in to comment.