mirror of https://github.com/zcash/halo2.git
Update comments
This commit is contained in:
parent
cba30b1b84
commit
87464d4b3f
|
@ -442,9 +442,8 @@ where
|
|||
}
|
||||
|
||||
#[allow(clippy::type_complexity)]
|
||||
/// $\mathsf{SinsemillaCommit}$ from [§ 5.4.8.4][concretesinsemillacommit].
|
||||
///
|
||||
/// [concretesinsemillacommit]: https://zips.z.cash/protocol/nu5.pdf#concretesinsemillacommit
|
||||
/// Evaluates the Sinsemilla hash of `message` from the public initial point `Q` stored
|
||||
/// into `CommitDomain`.
|
||||
pub fn hash(
|
||||
&self,
|
||||
layouter: impl Layouter<C::Base>,
|
||||
|
@ -462,9 +461,7 @@ where
|
|||
|
||||
#[allow(non_snake_case)]
|
||||
#[allow(clippy::type_complexity)]
|
||||
/// $\mathsf{SinsemillaCommit}$ from [§ 5.4.8.4][concretesinsemillacommit].
|
||||
///
|
||||
/// [concretesinsemillacommit]: https://zips.z.cash/protocol/nu5.pdf#concretesinsemillacommit
|
||||
/// Evaluates the Sinsemilla hash of `message` from the private initial point `Q`.
|
||||
pub fn hash_with_private_init(
|
||||
&self,
|
||||
layouter: impl Layouter<C::Base>,
|
||||
|
@ -482,17 +479,13 @@ where
|
|||
}
|
||||
|
||||
#[allow(clippy::type_complexity)]
|
||||
/// $\mathsf{SinsemillaCommit}$ from [§ 5.4.8.4][concretesinsemillacommit].
|
||||
///
|
||||
/// [concretesinsemillacommit]: https://zips.z.cash/protocol/nu5.pdf#concretesinsemillacommit
|
||||
/// Returns the public initial point `Q` stored into `CommitDomain`.
|
||||
pub fn q_init(&self) -> C {
|
||||
self.M.Q
|
||||
}
|
||||
|
||||
#[allow(clippy::type_complexity)]
|
||||
/// $\mathsf{SinsemillaCommit}$ from [§ 5.4.8.4][concretesinsemillacommit].
|
||||
///
|
||||
/// [concretesinsemillacommit]: https://zips.z.cash/protocol/nu5.pdf#concretesinsemillacommit
|
||||
/// Evaluates the blinding factor equal to $\[r\] R$ where `r` is stored in the `CommitDomain`.
|
||||
pub fn blinding_factor(
|
||||
&self,
|
||||
mut layouter: impl Layouter<C::Base>,
|
||||
|
|
|
@ -78,6 +78,22 @@ impl GeneratorTableConfig {
|
|||
});
|
||||
}
|
||||
|
||||
/// Load the generator table into the circuit.
|
||||
///
|
||||
/// | table_idx | table_x | table_y | table_range_check_tag |
|
||||
/// -------------------------------------------------------------------
|
||||
/// | 0 | X(S\[0\]) | Y(S\[0\]) | 0 |
|
||||
/// | 1 | X(S\[1\]) | Y(S\[1\]) | 0 |
|
||||
/// | ... | ... | ... | 0 |
|
||||
/// | 2^10-1 | X(S\[2^10-1\]) | Y(S\[2^10-1\]) | 0 |
|
||||
/// | 0 | X(S\[0\]) | Y(S\[0\]) | 4 |
|
||||
/// | 1 | X(S\[1\]) | Y(S\[1\]) | 4 |
|
||||
/// | ... | ... | ... | 4 |
|
||||
/// | 2^4-1 | X(S\[2^4-1\]) | Y(S\[2^4-1\]) | 4 |
|
||||
/// | 0 | X(S\[0\]) | Y(S\[0\]) | 5 |
|
||||
/// | 1 | X(S\[1\]) | Y(S\[1\]) | 5 |
|
||||
/// | ... | ... | ... | 5 |
|
||||
/// | 2^5-1 | X(S\[2^5-1\]) | Y(S\[2^5-1\]) | 5 |
|
||||
pub fn load(&self, layouter: &mut impl Layouter<pallas::Base>) -> Result<(), Error> {
|
||||
layouter.assign_table(
|
||||
|| "generator_table",
|
||||
|
|
|
@ -253,9 +253,6 @@ where
|
|||
|
||||
#[allow(clippy::type_complexity)]
|
||||
/// Hash `message` from the initial point `Q`.
|
||||
///
|
||||
/// Before this call to `hash_all_pieces()`, `x_Q` and `y_Q` MUST have been already assigned
|
||||
/// within this region.
|
||||
fn hash_all_pieces(
|
||||
&self,
|
||||
region: &mut Region<'_, pallas::Base>,
|
||||
|
|
|
@ -150,7 +150,7 @@ impl<F: PrimeFieldBits, const K: usize> LookupRangeCheckConfig<F, K> {
|
|||
* q_range_check_4
|
||||
* Expression::Constant(F::from(4_u64));
|
||||
|
||||
// Combine the running sum and short lookups:
|
||||
// Combine the running sum, short lookups and optimized range checks:
|
||||
vec![
|
||||
(
|
||||
q_lookup.clone()
|
||||
|
|
Loading…
Reference in New Issue