In miden-crypto/src/merkle/mmr/partial.rs at line 643, the const LEAVES array was changed to fn leaves() to work around the fact that P3's int_to_node function is not const.
Change Made
- const LEAVES: [Word; 7] = [
- int_to_node(0),
- int_to_node(1),
- int_to_node(2),
- int_to_node(3),
- int_to_node(4),
- int_to_node(5),
- int_to_node(6),
- ];
+ fn leaves() -> [Word; 7] {
+ [
+ int_to_node(0),
+ int_to_node(1),
+ int_to_node(2),
+ int_to_node(3),
+ int_to_node(4),
+ int_to_node(5),
+ int_to_node(6),
+ ]
+ }
Action Required
Once upstream Plonky3 releases our changes that make their constructors const, revert this function back to a const array.
Part of #724