fn max_to_freeze(num_new_leaves: usize, root_level: u32) -> usize {
        precondition!(root_level as usize <= MAX_ACCUMULATOR_PROOF_DEPTH);
        precondition!(num_new_leaves < (usize::max_value() / 2));
        precondition!(num_new_leaves * 2 <= usize::max_value() - root_level as usize);
        num_new_leaves * 2 + root_level as usize
    }
/// upper bound of num of frozen nodes:
///     new leaves and resulting frozen internal nodes forming a complete binary subtree
///         num_new_leaves * 2 - 1 < num_new_leaves * 2
///     and the full route from root of that subtree to the accumulator root turns frozen
///         height - (log2(num_new_leaves) + 1) < height - 1 = root_level
upper bound of num of frozen nodes:
new leaves and resulting frozen internal nodes forming a complete binary subtree
num_new_leaves * 2 - 1 < num_new_leaves * 2
and the full route from root of that subtree to the accumulator root turns frozen
height - (log2(num_new_leaves) + 1) < height - 1 = root_level
upper bound of num of frozen nodes : new leaves and resulting frozen internal nodes forming a complete binary subtree num_new_leaves * 2 - 1 < num_new_leaves * 2 and the full route from root of that subtree to the accumulator root turns frozen height - ( log2 ( num_new_leaves ) + 1 ) < height - 1 = root_level
fn max_to_freeze(num_new_leaves: usize, root_level: u32) -> usize {
        precondition!(root_level as usize <= MAX_ACCUMULATOR_PROOF_DEPTH);
        precondition!(num_new_leaves < (usize::max_value() / 2));
        precondition!(num_new_leaves * 2 <= usize::max_value() - root_level as usize);
        num_new_leaves * 2 + root_level as usize
    }
fn max_to_freeze ( num_new_leaves : usize , root_level : u32 ) -> usize { precondition ! ( root_level as usize MAX_ACCUMULATOR_PROOF_DEPTH ) ; precondition ! ( num_new_leaves ( usize max_value ( ) 2 ) ) ; precondition ! ( num_new_leaves 2 usize max_value ( ) root_level as usize ) ; num_new_leaves * 2 + root_level as usize }
upper bound of num of frozen nodes:
new leaves and resulting frozen internal nodes forming a complete binary subtree
num_new_leaves * 2 - 1 < num_new_leaves * 2
and the full route from root of that subtree to the accumulator root turns frozen
height - (log2(num_new_leaves) + 1) < height - 1 = root_level
upper bound of num of frozen nodes : new leaves and resulting frozen internal nodes forming a complete binary subtree num_new_leaves * 2 - 1 < num_new_leaves * 2 and the full route from root of that subtree to the accumulator root turns frozen height - ( log2 ( num_new_leaves ) + 1 ) < height - 1 = root_level
num_new_leaves
usize
root_level
u32
num_new_leaves
usize
root_level
u32