@@ -64,7 +64,7 @@ use crate::operation::{MPTPath, SingleOp};
6464use halo2_proofs:: {
6565 arithmetic:: Field ,
6666 circuit:: { Chip , Layouter , Region , Value } ,
67- ff:: { FromUniformBytes , PrimeField } ,
67+ ff:: FromUniformBytes ,
6868 plonk:: {
6969 Advice , Column , ConstraintSystem , Error , Expression , Selector , TableColumn , VirtualCells ,
7070 } ,
@@ -123,7 +123,7 @@ impl MPTOpTables {
123123 )
124124 }
125125
126- pub fn build_lookup_any < Fp : PrimeField + FromUniformBytes < 64 > + Ord > (
126+ pub fn build_lookup_any < Fp : FromUniformBytes < 64 > + Ord > (
127127 & self ,
128128 enable : Expression < Fp > ,
129129 rules : impl IntoIterator < Item = Expression < Fp > > ,
@@ -138,7 +138,7 @@ impl MPTOpTables {
138138 ret
139139 }
140140
141- pub fn build_lookup < Fp : PrimeField + FromUniformBytes < 64 > + Ord > (
141+ pub fn build_lookup < Fp : FromUniformBytes < 64 > + Ord > (
142142 & self ,
143143 enable : Expression < Fp > ,
144144 old : Expression < Fp > ,
@@ -148,7 +148,7 @@ impl MPTOpTables {
148148 self . build_lookup_any ( enable, [ old, new] , mark)
149149 }
150150
151- pub fn fill_constant < Fp : PrimeField + FromUniformBytes < 64 > + Ord > (
151+ pub fn fill_constant < Fp : FromUniformBytes < 64 > + Ord > (
152152 & self ,
153153 layouter : & mut impl Layouter < Fp > ,
154154 rules : impl Iterator < Item = ( [ u32 ; 3 ] , u32 ) > + Clone ,
@@ -207,7 +207,7 @@ impl HashTable {
207207 self . 0 . map ( |col| col. index ( ) )
208208 }
209209
210- pub fn build_lookup < Fp : PrimeField + FromUniformBytes < 64 > + Ord > (
210+ pub fn build_lookup < Fp : FromUniformBytes < 64 > + Ord > (
211211 & self ,
212212 meta : & mut VirtualCells < ' _ , Fp > ,
213213 enable : Expression < Fp > ,
@@ -239,7 +239,7 @@ impl HashTable {
239239
240240 /// a helper entry to fill hash table with specified rows, use padding record
241241 /// when hashing_records is not enough
242- pub fn dev_fill_with_paddings < ' d , Fp : PrimeField + FromUniformBytes < 64 > + Ord > (
242+ pub fn dev_fill_with_paddings < ' d , Fp : FromUniformBytes < 64 > + Ord > (
243243 & self ,
244244 layouter : & mut impl Layouter < Fp > ,
245245 hashing_records : impl Iterator < Item = & ' d ( Fp , Fp , Fp ) > + Clone ,
@@ -256,7 +256,7 @@ impl HashTable {
256256 }
257257
258258 /// a helper entry to fill hash table, only for dev (in using cases)
259- pub fn dev_fill < ' d , Fp : PrimeField + FromUniformBytes < 64 > + Ord > (
259+ pub fn dev_fill < ' d , Fp : FromUniformBytes < 64 > + Ord > (
260260 & self ,
261261 layouter : & mut impl Layouter < Fp > ,
262262 hashing_records : impl Iterator < Item = & ' d ( Fp , Fp , Fp ) > + Clone ,
@@ -349,7 +349,7 @@ impl MPTOpGadget {
349349 }
350350
351351 /// if the gadget would be used only once, this entry is more easy
352- pub fn configure_simple < Fp : PrimeField + FromUniformBytes < 64 > + Ord > (
352+ pub fn configure_simple < Fp : FromUniformBytes < 64 > + Ord > (
353353 meta : & mut ConstraintSystem < Fp > ,
354354 sel : Selector ,
355355 exported : & [ Column < Advice > ] ,
@@ -378,7 +378,7 @@ impl MPTOpGadget {
378378 /// + s_op_flags * 6 (corresponding 6 ctrl_types)
379379 /// + free col * 8
380380 /// notice the gadget has bi-direction exporting (on top it exporting mpt root and bottom exporting leaf)
381- pub fn configure < Fp : PrimeField + FromUniformBytes < 64 > + Ord > (
381+ pub fn configure < Fp : FromUniformBytes < 64 > + Ord > (
382382 meta : & mut ConstraintSystem < Fp > ,
383383 sel : Selector ,
384384 exported : & [ Column < Advice > ] ,
@@ -469,13 +469,13 @@ impl MPTOpGadget {
469469 i1. chain ( i2)
470470 }
471471
472- /* pub fn init<Fp: PrimeField + FromUniformBytes<64> + Ord>(&self, layouter: &mut impl Layouter<Fp>) -> Result<(), Error> {
472+ /* pub fn init<Fp: FromUniformBytes<64> + Ord>(&self, layouter: &mut impl Layouter<Fp>) -> Result<(), Error> {
473473 self.tables
474474 .fill_constant(layouter, Self::transition_rules())
475475 }*/
476476
477477 /// assign data and enable flag for MPT circuit
478- pub fn assign < Fp : PrimeField + FromUniformBytes < 64 > + Ord > (
478+ pub fn assign < Fp : FromUniformBytes < 64 > + Ord > (
479479 & self ,
480480 region : & mut Region < ' _ , Fp > ,
481481 offset : usize ,
@@ -510,7 +510,7 @@ impl MPTOpGadget {
510510}
511511
512512/*
513- fn lagrange_polynomial_for_hashtype<Fp: PrimeField + FromUniformBytes<64> + Ord, const T: usize>(
513+ fn lagrange_polynomial_for_hashtype<Fp: FromUniformBytes<64> + Ord, const T: usize>(
514514 ref_n: Expression<Fp>,
515515) -> Expression<Fp> {
516516 super::lagrange_polynomial::<Fp, T, 5 /* last Type: Leaf */>(ref_n)
@@ -531,14 +531,14 @@ struct PathChipConfig {
531531
532532/// chip for verify mutiple merkle path in MPT
533533/// it do not need any auxiliary cols
534- struct PathChip < ' d , F : PrimeField + FromUniformBytes < 64 > + Ord > {
534+ struct PathChip < ' d , F : FromUniformBytes < 64 > + Ord > {
535535 offset : usize ,
536536 config : PathChipConfig ,
537537 data : & ' d MPTPath < F > ,
538538 ref_ctrl_type : Option < & ' d [ HashType ] > ,
539539}
540540
541- impl < Fp : PrimeField + FromUniformBytes < 64 > + Ord > Chip < Fp > for PathChip < ' _ , Fp > {
541+ impl < Fp : FromUniformBytes < 64 > + Ord > Chip < Fp > for PathChip < ' _ , Fp > {
542542 type Config = PathChipConfig ;
543543 type Loaded = MPTPath < Fp > ;
544544
@@ -551,7 +551,7 @@ impl<Fp: PrimeField + FromUniformBytes<64> + Ord> Chip<Fp> for PathChip<'_, Fp>
551551 }
552552}
553553
554- impl < ' d , Fp : PrimeField + FromUniformBytes < 64 > + Ord > PathChip < ' d , Fp > {
554+ impl < ' d , Fp : FromUniformBytes < 64 > + Ord > PathChip < ' d , Fp > {
555555 fn configure (
556556 meta : & mut ConstraintSystem < Fp > ,
557557 g_config : & MPTOpConfig ,
@@ -854,13 +854,13 @@ struct OpChipConfig {
854854
855855/// chip for verify mutiple merkle path in MPT
856856/// it do not need any auxiliary cols
857- struct OpChip < ' d , F : PrimeField + FromUniformBytes < 64 > + Ord > {
857+ struct OpChip < ' d , F : FromUniformBytes < 64 > + Ord > {
858858 offset : usize ,
859859 config : OpChipConfig ,
860860 data : & ' d SingleOp < F > ,
861861}
862862
863- impl < Fp : PrimeField + FromUniformBytes < 64 > + Ord > Chip < Fp > for OpChip < ' _ , Fp > {
863+ impl < Fp : FromUniformBytes < 64 > + Ord > Chip < Fp > for OpChip < ' _ , Fp > {
864864 type Config = OpChipConfig ;
865865 type Loaded = SingleOp < Fp > ;
866866
@@ -873,7 +873,7 @@ impl<Fp: PrimeField + FromUniformBytes<64> + Ord> Chip<Fp> for OpChip<'_, Fp> {
873873 }
874874}
875875
876- impl < ' d , Fp : PrimeField + FromUniformBytes < 64 > + Ord > OpChip < ' d , Fp > {
876+ impl < ' d , Fp : FromUniformBytes < 64 > + Ord > OpChip < ' d , Fp > {
877877 fn configure (
878878 meta : & mut ConstraintSystem < Fp > ,
879879 g_config : & MPTOpConfig ,
0 commit comments