Skip to content

Commit

Permalink
ecc::chip.rs: Documentation fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
therealyingtong committed Jun 11, 2021
1 parent 12596c5 commit cf3934a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/circuit/gadget/ecc/chip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,34 +174,34 @@ where
add_config.create_gate(meta);
}

// Create variable-base scalar mul gates
// Create variable-base scalar mul gate
{
let mul_config: mul::Config<C> = (&config).into();
mul_config.create_gate(meta);
}

// Create witness scalar_fixed gates that apply to both full-width and
// Create witness_scalar_fixed gate that applies to both full-width and
// short scalars
{
let config: witness_scalar_fixed::Config<C> = (&config).into();
config.create_gate(meta);
}

// Create witness scalar_fixed gates that only apply to short scalars
// Create witness_scalar_fixed gate that only applies to short scalars
{
let config: witness_scalar_fixed::short::Config<C> = (&config).into();
config.create_gate(meta);
}

// Create fixed-base scalar mul gates that are used in both full-width
// Create fixed-base scalar mul gate that is used in both full-width
// and short multiplication.
{
let mul_fixed_config: mul_fixed::Config<C, { constants::NUM_WINDOWS }> =
(&config).into();
mul_fixed_config.create_gate(meta);
}

// Create gates that are only used in short fixed-base scalar mul.
// Create gate that is only used in short fixed-base scalar mul.
{
let short_config: mul_fixed::short::Config<C, { constants::NUM_WINDOWS_SHORT }> =
(&config).into();
Expand Down
1 change: 1 addition & 0 deletions src/circuit/gadget/ecc/chip/mul/complete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ impl<C: CurveAffine> Config<C> {

#[allow(clippy::type_complexity)]
#[allow(non_snake_case)]
#[allow(clippy::too_many_arguments)]
pub(super) fn assign_region(
&self,
region: &mut Region<'_, C::Base>,
Expand Down
3 changes: 1 addition & 2 deletions src/circuit/gadget/ecc/chip/mul/incomplete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ impl<C: CurveAffine> Config<C> {

// Gate for incomplete addition part of variable-base scalar multiplication.
pub(super) fn create_gate(&self, meta: &mut ConstraintSystem<C::Base>) {
// (k_i) ⋅ (k_i - 1) = 0
meta.create_gate("Scalar boolean decomposition", |meta| {
meta.create_gate("Incomplete addition for variable-base scalar mul", |meta| {
let q_mul = meta.query_selector(self.q_mul);
let z_cur = meta.query_advice(self.z, Rotation::cur());
let z_prev = meta.query_advice(self.z, Rotation::prev());
Expand Down

0 comments on commit cf3934a

Please sign in to comment.