halo2_gadgets: Fix return type of `ecc::chip::FixedPoint::u`

This trait method was previously preventing the trait to working with
fields that encode to more than 256 bits.
This commit is contained in:
Jack Grigg 2022-05-09 16:42:42 +00:00
parent 3486703bd2
commit 342ebdd15e
2 changed files with 4 additions and 2 deletions

View File

@ -49,6 +49,8 @@ and this project adheres to Rust's notion of
- `FixedPointShort::mul` now takes `ScalarFixedShort` instead of
`(EccChip::Var, EccChip::Var)`.
- `halo2_gadgets::ecc::chip`:
- `FixedPoint::u` now returns `Vec<[<C::Base as PrimeField>::Repr; H]>`
instead of `Vec<[[u8; 32]; H]>`.
- `ScalarKind` has been renamed to `FixedScalarKind`.
- `halo2_gadgets::sinsemilla`:
- `CommitDomain::{commit, short_commit}` now take the trapdoor `r` as an

View File

@ -7,7 +7,7 @@ use crate::{
};
use arrayvec::ArrayVec;
use ff::Field;
use ff::{Field, PrimeField};
use group::prime::PrimeCurveAffine;
use halo2_proofs::{
circuit::{AssignedCell, Chip, Layouter},
@ -210,7 +210,7 @@ pub trait FixedPoint<C: CurveAffine>: std::fmt::Debug + Eq + Clone {
fn generator(&self) -> C;
/// Returns the $u$ values for this fixed point.
fn u(&self) -> Vec<[[u8; 32]; H]>;
fn u(&self) -> Vec<[<C::Base as PrimeField>::Repr; H]>;
/// Returns the $z$ value for this fixed point.
fn z(&self) -> Vec<u64>;