Skip to content

Commit

Permalink
Adapt to upstream Nova RecursiveSNARK API changes
Browse files Browse the repository at this point in the history
- Updated the `nova` dependency branch in Cargo.toml for compatibility testing
- adapts tohttps://github.com/lurk-lang/arecibo/pull/87
  • Loading branch information
huitseeker committed Oct 30, 2023
1 parent 362a294 commit a87d82e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ clap = "4.3.17"
ff = "0.13"
metrics = "0.21.1"
neptune = { git = "https://github.com/lurk-lab/neptune", branch = "dev" }
nova = { git = "https://github.com/lurk-lab/arecibo", branch = "dev", package = "nova-snark" }
nova = { git = "https://github.com/lurk-lab/arecibo", branch = "forward_port_238_242", package = "nova-snark" }
once_cell = "1.18.0"
pairing = { version = "0.23" }
pasta_curves = { git = "https://github.com/lurk-lab/pasta_curves", branch = "dev" }
Expand Down
30 changes: 9 additions & 21 deletions src/proof/nova.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,18 +419,13 @@ where
&pp.pp,
&circuit_primary,
&circuit_secondary,
z0_primary.clone(),
z0_secondary.clone(),
&z0_primary,
&z0_secondary,
)
.expect("Failed to construct initial recursive snark")
});
r_snark
.prove_step(
&pp.pp,
&circuit_primary,
&circuit_secondary,
z0_primary.clone(),
z0_secondary.clone(),
)
.prove_step(&pp.pp, &circuit_primary, &circuit_secondary)
.expect("failure to prove Nova step");
recursive_snark = Some(r_snark);
}
Expand Down Expand Up @@ -467,18 +462,13 @@ where
&pp.pp,
circuit_primary,
&circuit_secondary,
z0_primary.clone(),
z0_secondary.clone(),
&z0_primary,
&z0_secondary,
)
.expect("Failed to construct initial recursive snark")
});
r_snark
.prove_step(
&pp.pp,
circuit_primary,
&circuit_secondary,
z0_primary.clone(),
z0_secondary.clone(),
)
.prove_step(&pp.pp, circuit_primary, &circuit_secondary)
.expect("failure to prove Nova step");
recursive_snark = Some(r_snark);
}
Expand Down Expand Up @@ -520,9 +510,7 @@ where

let (zi_primary_verified, zi_secondary_verified) = match self {
Self::Recursive(p, _) => p.verify(&pp.pp, num_steps, z0_primary, &z0_secondary),
Self::Compressed(p, _) => {
p.verify(&pp.vk, num_steps, z0_primary.to_vec(), z0_secondary)
}
Self::Compressed(p, _) => p.verify(&pp.vk, num_steps, z0_primary, &z0_secondary),
}?;

Ok(zi_primary == zi_primary_verified && zi_secondary == zi_secondary_verified)
Expand Down

0 comments on commit a87d82e

Please sign in to comment.