mirror of https://github.com/zcash/halo2.git
Docfixes.
Co-authored-by: Daira Hopwood <daira@jacaranda.org> Co-authored-by: str4d <jack@electriccoin.co>
This commit is contained in:
parent
c43c91b796
commit
209e6a1132
|
@ -12,7 +12,6 @@ pub trait CondSwapInstructions<F: FieldExt>: UtilitiesInstructions<F> {
|
||||||
/// Given an input pair (a,b) and a `swap` boolean flag, returns
|
/// Given an input pair (a,b) and a `swap` boolean flag, returns
|
||||||
/// (b,a) if `swap` is set, else (a,b) if `swap` is not set.
|
/// (b,a) if `swap` is set, else (a,b) if `swap` is not set.
|
||||||
///
|
///
|
||||||
///
|
|
||||||
/// The second element of the pair is required to be a witnessed
|
/// The second element of the pair is required to be a witnessed
|
||||||
/// value, not a variable that already exists in the circuit.
|
/// value, not a variable that already exists in the circuit.
|
||||||
fn swap(
|
fn swap(
|
||||||
|
|
|
@ -67,7 +67,7 @@ impl<F: FieldExt + PrimeFieldBits, const K: usize> LookupRangeCheckConfig<F, K>
|
||||||
vec![(q_lookup * word, table)]
|
vec![(q_lookup * word, table)]
|
||||||
});
|
});
|
||||||
|
|
||||||
// Lookup for range checks up to S bits, where S < K.
|
// Lookup used in range checks up to S bits, where S < K.
|
||||||
meta.lookup(|meta| {
|
meta.lookup(|meta| {
|
||||||
let q_lookup_short = meta.query_selector(config.q_lookup_short);
|
let q_lookup_short = meta.query_selector(config.q_lookup_short);
|
||||||
let word = meta.query_advice(config.running_sum, Rotation::cur());
|
let word = meta.query_advice(config.running_sum, Rotation::cur());
|
||||||
|
@ -345,8 +345,6 @@ impl<F: FieldExt + PrimeFieldBits, const K: usize> LookupRangeCheckConfig<F, K>
|
||||||
let shift = F::from_u64(1 << (K - num_bits));
|
let shift = F::from_u64(1 << (K - num_bits));
|
||||||
element * shift
|
element * shift
|
||||||
});
|
});
|
||||||
print!("element: {:?}", element.value());
|
|
||||||
print!("shifted: {:?}", shifted);
|
|
||||||
|
|
||||||
region.assign_advice(
|
region.assign_advice(
|
||||||
|| format!("element * 2^({}-{})", K, num_bits),
|
|| format!("element * 2^({}-{})", K, num_bits),
|
||||||
|
|
Loading…
Reference in New Issue