Rename Prover and ProvingAssignment.

This commit is contained in:
porcuquine
2021-10-13 13:43:01 -07:00
committed by Srinath Setty
parent 3b668e7ac6
commit efb73ef325
3 changed files with 12 additions and 12 deletions

View File

@@ -2,6 +2,6 @@
//!
//! [Bellperson]: https://github.com/filecoin-project/bellperson
pub mod prover;
pub mod r1cs;
pub mod shape_cs;
pub mod solver;

View File

@@ -2,8 +2,8 @@
#![allow(non_snake_case)]
use super::prover::ProvingAssignment;
use super::shape_cs::ShapeCS;
use super::solver::SatisfyingAssignment;
use bellperson::{Index, LinearCombination};
use ff::PrimeField;
@@ -16,7 +16,7 @@ use crate::{
/// `NovaWitness` provide a method for acquiring an `R1CSInstance` and `R1CSWitness` from implementers.
pub trait NovaWitness<G: Group> {
/// Return an instance and witness, given a shape and gens.
/// Return an instance and witness, given a shape and gens.
fn r1cs_instance_and_witness(
&self,
shape: &R1CSShape<G>,
@@ -26,13 +26,13 @@ pub trait NovaWitness<G: Group> {
/// `NovaShape` provides methods for acquiring `R1CSShape` and `R1CSGens` from implementers.
pub trait NovaShape<G: Group> {
/// Return an appropriate `R1CSShape` struct.
/// Return an appropriate `R1CSShape` struct.
fn r1cs_shape(&self) -> R1CSShape<G>;
/// Return an appropriate `R1CSGens` struct.
/// Return an appropriate `R1CSGens` struct.
fn r1cs_gens(&self) -> R1CSGens<G>;
}
impl<G: Group> NovaWitness<G> for ProvingAssignment<G>
impl<G: Group> NovaWitness<G> for SatisfyingAssignment<G>
where
G::Scalar: PrimeField,
{

View File

@@ -8,7 +8,7 @@ use bellperson::{
};
/// A `ConstraintSystem` which calculates witness values for a concrete instance of an R1CS circuit.
pub struct ProvingAssignment<G: Group>
pub struct SatisfyingAssignment<G: Group>
where
G::Scalar: PrimeField,
{
@@ -28,13 +28,13 @@ where
}
use std::fmt;
impl<G: Group> fmt::Debug for ProvingAssignment<G>
impl<G: Group> fmt::Debug for SatisfyingAssignment<G>
where
G::Scalar: PrimeField,
{
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
fmt
.debug_struct("ProvingAssignment")
.debug_struct("SatisfyingAssignment")
.field("a_aux_density", &self.a_aux_density)
.field("b_input_density", &self.b_input_density)
.field("b_aux_density", &self.b_aux_density)
@@ -68,11 +68,11 @@ where
}
}
impl<G: Group> PartialEq for ProvingAssignment<G>
impl<G: Group> PartialEq for SatisfyingAssignment<G>
where
G::Scalar: PrimeField,
{
fn eq(&self, other: &ProvingAssignment<G>) -> bool {
fn eq(&self, other: &SatisfyingAssignment<G>) -> bool {
self.a_aux_density == other.a_aux_density
&& self.b_input_density == other.b_input_density
&& self.b_aux_density == other.b_aux_density
@@ -84,7 +84,7 @@ where
}
}
impl<G: Group> ConstraintSystem<G::Scalar> for ProvingAssignment<G>
impl<G: Group> ConstraintSystem<G::Scalar> for SatisfyingAssignment<G>
where
G::Scalar: PrimeField,
{