Calculates the root of the minimal size merkle tree required to store num_non_empty_leaves.
Since we cannot isolate branches, it cost more gates than using MerkleTree on the full array of elements N,
but it may be cheaper onchain when proving the membership of a leaf.
pub fn new_sha<let N: u32, let MAX_SUBTREES: u32>(
leaves: [Field; N],
num_non_empty_leaves: u32,
) -> Selfpub fn get_root(self) -> Field
Calculates the root of the minimal size merkle tree required to store
num_non_empty_leaves.Since we cannot isolate branches, it cost more gates than using MerkleTree on the full array of elements
N, but it may be cheaper onchain when proving the membership of a leaf.