Skip to content

Commit 0d6c34a

Browse files
committed
Fix docs (#249)
* Refactor 'CircuitShape' references to 'R1CSWithArity' - Implemented terminology update: all occurrences of `CircuitShape` have been replaced with `R1CSWithArity` - Corrected method return descriptions to reflect changes in terminology - Amended related notes and comments to maintain consistency and clarity in the codebase. Leftover from lurk-lang/arecibo#235 * Fix Supernova module documentation and code comments - Update comments for struct `PublicParams` in `mod.rs` to reflect the correct association with `R1CSWithArity`. - Alter codeblock tag in `Readme.md` from `ignore` to `text`. - Revise mathematical formula in `Readme.md` for the current iteration of $F$ by including brackets around `0` in the base case inputs.
1 parent b9b3581 commit 0d6c34a

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ pub struct R1CSWithArity<E: Engine> {
6363
impl<E: Engine> SimpleDigestible for R1CSWithArity<E> {}
6464

6565
impl<E: Engine> R1CSWithArity<E> {
66-
/// Create a new `CircuitShape`
66+
/// Create a new `R1CSWithArity`
6767
pub fn new(r1cs_shape: R1CSShape<E>, F_arity: usize) -> Self {
6868
Self {
6969
F_arity,
7070
r1cs_shape,
7171
}
7272
}
7373

74-
/// Return the [CircuitShape]' digest.
74+
/// Return the [R1CSWithArity]' digest.
7575
pub fn digest(&self) -> E::Scalar {
7676
let dc: DigestComputer<'_, <E as Engine>::Scalar, R1CSWithArity<E>> = DigestComputer::new(self);
7777
dc.digest().expect("Failure in computing digest")

src/supernova/Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ At each step, the prover needs to:
7676

7777
In pseudocode, `prove_step` looks something like:
7878

79-
```ignore
79+
```text
8080
if i = 0 {
8181
U[] = [ø;l]
8282
@@ -189,7 +189,7 @@ The inputs of provided to the augmented step circuit $F'_j$ are:
189189
- **Secondary**: Always `None`, and interpreted as $\mathsf{pc}_i \equiv 0$, since there is only a single circuit.
190190
- $z_0 \in \mathbb{F}^a$: inputs for the first iteration of $F$
191191
- $z_i \in \mathbb{F}^a$: inputs for the current iteration of $F$
192-
- **Base case**: Set to `None`, in which case it is allocated as $[0]$, and $z_0$ is used as $z_i$.
192+
- **Base case**: Set to `None`, in which case it is allocated as $\[0\]$, and $z_0$ is used as $z_i$.
193193
- $U_i[\ ] \in \mathbb{R}'^\ell$: list of relaxed R1CS instances on the other curve
194194
- **Primary**: Since there is only a single circuit on the secondary curve, we have $\ell = 0$ and therefore $U_i[\ ]$ only contains a single `RelaxedR1CSInstance`.
195195
- **Secondary**: The list of input relaxed instances $U_i[\ ]$ is initialized by passing a slice `[Option<RelaxedR1CSInstance<G>>]`, one for each circuit on the primary curve.

src/supernova/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ impl<E: Engine> CircuitDigests<E> {
7171
}
7272
}
7373

74-
/// A vector of [CircuitParams] corresponding to a set of [PublicParams]
74+
/// A vector of [R1CSWithArity] adjoined to a set of [PublicParams]
7575
#[derive(Clone, Serialize, Deserialize)]
7676
#[serde(bound = "")]
7777
pub struct PublicParams<E1, E2, C1, C2>
@@ -288,7 +288,7 @@ where
288288
(circuit_shapes, aux_params)
289289
}
290290

291-
/// Create a [PublicParams] from a vector of raw [CircuitShape] and auxiliary params.
291+
/// Create a [PublicParams] from a vector of raw [R1CSWithArity] and auxiliary params.
292292
pub fn from_parts(circuit_shapes: Vec<R1CSWithArity<E1>>, aux_params: AuxParams<E1, E2>) -> Self {
293293
let pp = PublicParams {
294294
circuit_shapes,
@@ -312,7 +312,7 @@ where
312312
pp
313313
}
314314

315-
/// Create a [PublicParams] from a vector of raw [CircuitShape] and auxiliary params.
315+
/// Create a [PublicParams] from a vector of raw [R1CSWithArity] and auxiliary params.
316316
/// We don't check that the `aux_params.digest` is a valid digest for the created params.
317317
pub fn from_parts_unchecked(
318318
circuit_shapes: Vec<R1CSWithArity<E1>>,
@@ -335,7 +335,7 @@ where
335335
}
336336

337337
/// Compute primary and secondary commitment keys sized to handle the largest of the circuits in the provided
338-
/// `CircuitShape`.
338+
/// `R1CSWithArity`.
339339
fn compute_primary_ck(
340340
circuit_params: &[R1CSWithArity<E1>],
341341
ck_hint1: &CommitmentKeyHint<E1>,

0 commit comments

Comments
 (0)