Currently, plonky2 Merkle proofs depend on balanced Merkle Trees (BMTs).
This implies that the leaf set must be of length of a power of 2. For our use case (generate commitments to events), whenever the number of events is not a power of 2, we extend these with default values (and length prepending), see #102 for more details.
This approach 'works' for now, but it is not optimal. A possibility for future resolving the current issue is to use Merkle Mountain Ranges (MMRs).
Currently,
plonky2
Merkle proofs depend on balanced Merkle Trees (BMTs).This implies that the leaf set must be of length of a power of 2. For our use case (generate commitments to events), whenever the number of events is not a power of 2, we extend these with default values (and length prepending), see #102 for more details.
This approach 'works' for now, but it is not optimal. A possibility for future resolving the current issue is to use Merkle Mountain Ranges (MMRs).