File tree 1 file changed +4
-12
lines changed
crates/circuits/poseidon2-air/src
1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ pub(crate) fn horizen_to_p3_babybear(horizen_babybear: HorizenBabyBear) -> BabyB
18
18
}
19
19
20
20
pub ( crate ) fn horizen_round_consts ( ) -> Poseidon2Constants < BabyBear > {
21
- let p3_rc16: Vec < Vec < BabyBear > > = RC16
21
+ let p3_rc16: Vec < Vec < _ > > = RC16
22
22
. iter ( )
23
23
. map ( |round| {
24
24
round
@@ -29,18 +29,10 @@ pub(crate) fn horizen_round_consts() -> Poseidon2Constants<BabyBear> {
29
29
. collect ( ) ;
30
30
let p_end = BABY_BEAR_POSEIDON2_HALF_FULL_ROUNDS + BABY_BEAR_POSEIDON2_PARTIAL_ROUNDS ;
31
31
32
- let beginning_full_round_constants: [ [ BabyBear ; POSEIDON2_WIDTH ] ;
33
- BABY_BEAR_POSEIDON2_HALF_FULL_ROUNDS ] = from_fn ( |i| p3_rc16[ i] . clone ( ) . try_into ( ) . unwrap ( ) ) ;
34
- let partial_round_constants: [ BabyBear ; BABY_BEAR_POSEIDON2_PARTIAL_ROUNDS ] =
35
- from_fn ( |i| p3_rc16[ i + BABY_BEAR_POSEIDON2_HALF_FULL_ROUNDS ] [ 0 ] ) ;
36
- let ending_full_round_constants: [ [ BabyBear ; POSEIDON2_WIDTH ] ;
37
- BABY_BEAR_POSEIDON2_HALF_FULL_ROUNDS ] =
38
- from_fn ( |i| p3_rc16[ i + p_end] . clone ( ) . try_into ( ) . unwrap ( ) ) ;
39
-
40
32
Poseidon2Constants {
41
- beginning_full_round_constants,
42
- partial_round_constants,
43
- ending_full_round_constants,
33
+ beginning_full_round_constants : from_fn ( |i| p3_rc16 [ i ] . clone ( ) . try_into ( ) . unwrap ( ) ) ,
34
+ partial_round_constants : from_fn ( |i| p3_rc16 [ i + BABY_BEAR_POSEIDON2_HALF_FULL_ROUNDS ] [ 0 ] ) ,
35
+ ending_full_round_constants : from_fn ( |i| p3_rc16 [ i + p_end ] . clone ( ) . try_into ( ) . unwrap ( ) ) ,
44
36
}
45
37
}
46
38
You can’t perform that action at this time.
0 commit comments