pub trait Connect {
// Required methods
fn connect_cell_pair(
&mut self,
cell1: (usize, usize),
cell2: (usize, usize)
);
fn connect_64bit(&mut self, zero_row: usize, start_row: usize);
fn connect_ffadd_range_checks(
&mut self,
ffadd_row: usize,
left_rc: Option<usize>,
right_rc: Option<usize>,
out_rc: usize
);
}
Expand description
Trait to connect a pair of cells in a circuit
Required Methods§
sourcefn connect_cell_pair(&mut self, cell1: (usize, usize), cell2: (usize, usize))
fn connect_cell_pair(&mut self, cell1: (usize, usize), cell2: (usize, usize))
Connect the pair of cells specified by the cell1 and cell2 parameters
cell_pre
–> cell_new
&& cell_new
–> wire_tmp
Note: This function assumes that the targeted cells are freshly instantiated with self-connections. If the two cells are transitively already part of the same permutation then this would split it.
sourcefn connect_64bit(&mut self, zero_row: usize, start_row: usize)
fn connect_64bit(&mut self, zero_row: usize, start_row: usize)
Connects a generic gate cell with zeros to a given row for 64bit range check
sourcefn connect_ffadd_range_checks(
&mut self,
ffadd_row: usize,
left_rc: Option<usize>,
right_rc: Option<usize>,
out_rc: usize
)
fn connect_ffadd_range_checks( &mut self, ffadd_row: usize, left_rc: Option<usize>, right_rc: Option<usize>, out_rc: usize )
Connects the wires of the range checks in a single foreign field addition Inputs:
ffadd_row
: the row of the foreign field addition gateleft_rc
: the first row of the range check for the left inputright_rc
: the first row of the range check for the right inputout_rc
: the first row of the range check for the output of the addition Note: If run withleft_rc = None
andright_rc = None
then it can be used for the bound check range check