Skip to content

Commit

Permalink
Add some functionalities for MuxChip
Browse files Browse the repository at this point in the history
  • Loading branch information
ConstanceBeguier committed May 2, 2023
1 parent efeb611 commit 62fe736
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion halo2_gadgets/src/ecc/chip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl EccPoint {
/// Constructs a point from its coordinates, without checking they are on the curve.
///
/// This is an internal API that we only use where we know we have a valid curve point.
pub(crate) fn from_coordinates_unchecked(
pub fn from_coordinates_unchecked(
x: AssignedCell<Assigned<pallas::Base>, pallas::Base>,
y: AssignedCell<Assigned<pallas::Base>, pallas::Base>,
) -> Self {
Expand Down
10 changes: 10 additions & 0 deletions halo2_proofs/src/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ impl<F: Field> AssignedCell<Assigned<F>, F> {
}
}

impl<F: Field> From<AssignedCell<F, F>> for AssignedCell<Assigned<F>, F> {
fn from(ac: AssignedCell<F, F>) -> Self {
AssignedCell {
value: ac.value.map(|a| a.into()),
cell: ac.cell,
_marker: Default::default(),
}
}
}

impl<V: Clone, F: Field> AssignedCell<V, F>
where
for<'v> Assigned<F>: From<&'v V>,
Expand Down

0 comments on commit 62fe736

Please sign in to comment.