pub fn constrain_virtual_equals_external<F: Field + Ord>(
region: &mut Region<'_, F>,
virtual_cell: AssignedValue<F>,
external_cell: Cell,
copy_manager: &mut CopyConstraintManager<F>,
)
Expand description
Constrains that virtual_cell
is equal to external_cell
. The virtual_cell
must have
already been raw assigned with the raw assigned cell stored in copy_manager
unless it is marked an external-only cell with type id EXTERNAL_CELL_TYPE_ID.
- When the virtual cell has already been assigned, the assigned cell is constrained to be equal to the external cell.
- When the virtual cell has not been assigned and it is marked as an external cell, it is assigned to
external_cell
and the mapping is stored incopy_manager
.
This should only be called when witness_gen_only
is false, otherwise it will panic.
§Panics
If witness generation only mode is true.