@@ -121,33 +121,26 @@ impl MptCircuitConfig {
121
121
n_rows : usize ,
122
122
) -> Result < ( ) , Error > {
123
123
let randomness = self . rlc_randomness . value ( layouter) ;
124
- let ( u32s, u64s, u128s, frs) = byte_representations ( proofs) ;
125
124
126
- layouter. assign_region (
127
- || "mpt circuit" ,
128
- |mut region| {
129
- self . mpt_update
130
- . assign ( & mut region, proofs, n_rows, randomness) ;
131
- Ok ( ( ) )
132
- } ,
125
+ let proofs_vec: Vec < _ > = proofs. iter ( ) . cloned ( ) . collect ( ) ;
126
+ layouter. assign_regions (
127
+ || "mpt circuit parallel assignment 1" ,
128
+ self . mpt_update . assignments ( proofs_vec, n_rows, randomness) ,
133
129
) ?;
134
130
135
- let mut keys = mpt_update_keys ( proofs) ;
136
- keys. sort ( ) ;
137
- keys. dedup ( ) ;
138
-
139
- let selector_assignments = self . selector_assignments ( n_rows) ;
140
- let byte_bit_assignments = self . byte_bit . assignments ( ) ;
131
+ let ( u32s, u64s, u128s, frs) = byte_representations ( proofs) ;
141
132
let byte_representation_assignments = self
142
133
. byte_representation
143
134
. assignments ( u32s, u64s, u128s, frs, randomness) ;
144
- let canonical_representation_assignments = self
145
- . canonical_representation
146
- . assignments ( keys, n_rows, randomness) ;
135
+ let selector_assignments = self . selector_assignments ( n_rows) ;
136
+ let byte_bit_assignments = self . byte_bit . assignments ( ) ;
137
+ let canonical_representation_assignments =
138
+ self . canonical_representation
139
+ . assignments ( mpt_update_keys ( proofs) , n_rows, randomness) ;
147
140
let key_bit_assignments = self . key_bit . assignments ( key_bit_lookups ( proofs) ) ;
148
141
149
142
layouter. assign_regions (
150
- || "mpt circuit parallel assignment" ,
143
+ || "mpt circuit parallel assignment 2 " ,
151
144
AssignmentMap :: new (
152
145
selector_assignments
153
146
. chain ( byte_bit_assignments)
0 commit comments