mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-07 16:23:12 +00:00
Minor
This commit is contained in:
parent
5a9c5b295c
commit
9a54540116
@ -288,7 +288,6 @@ mod tests {
|
|||||||
config: CircuitConfig {
|
config: CircuitConfig {
|
||||||
fri_config,
|
fri_config,
|
||||||
num_routed_wires: 6,
|
num_routed_wires: 6,
|
||||||
zero_knowledge: true,
|
|
||||||
..CircuitConfig::large_config()
|
..CircuitConfig::large_config()
|
||||||
},
|
},
|
||||||
degree_bits,
|
degree_bits,
|
||||||
|
|||||||
@ -13,6 +13,9 @@ use crate::plonk::circuit_builder::CircuitBuilder;
|
|||||||
use crate::util::bits_u64;
|
use crate::util::bits_u64;
|
||||||
|
|
||||||
impl<F: Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
impl<F: Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
||||||
|
/// Finds the last available arithmetic gate with the given constants or add one if there aren't any.
|
||||||
|
/// Returns `(g,i)` such that there is an arithmetic gate with the given constants at index
|
||||||
|
/// `g` and the gate's `i`-th operation is available.
|
||||||
fn find_arithmetic_gate(&mut self, const_0: F, const_1: F) -> (usize, usize) {
|
fn find_arithmetic_gate(&mut self, const_0: F, const_1: F) -> (usize, usize) {
|
||||||
let (gate, i) = self
|
let (gate, i) = self
|
||||||
.free_arithmetic
|
.free_arithmetic
|
||||||
|
|||||||
@ -108,7 +108,7 @@ impl<F: Extendable<D>, const D: usize> Gate<F, D> for ArithmeticExtensionGate<D>
|
|||||||
gate_index: usize,
|
gate_index: usize,
|
||||||
local_constants: &[F],
|
local_constants: &[F],
|
||||||
) -> Vec<Box<dyn WitnessGenerator<F>>> {
|
) -> Vec<Box<dyn WitnessGenerator<F>>> {
|
||||||
(0..4)
|
(0..NUM_ARITHMETIC_OPS)
|
||||||
.map(|i| {
|
.map(|i| {
|
||||||
let g: Box<dyn WitnessGenerator<F>> = Box::new(ArithmeticExtensionGenerator {
|
let g: Box<dyn WitnessGenerator<F>> = Box::new(ArithmeticExtensionGenerator {
|
||||||
gate_index,
|
gate_index,
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
use crate::iop::target::Target;
|
use crate::iop::target::Target;
|
||||||
|
|
||||||
/// A named copy constraint.
|
/// A named copy constraint.
|
||||||
#[derive(Debug)]
|
|
||||||
pub struct CopyConstraint {
|
pub struct CopyConstraint {
|
||||||
pub pair: (Target, Target),
|
pub pair: (Target, Target),
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user