Summary
Sometimes users want to know the nearest valid full-tree leaf count without manually calculating it. The script computes fullLeaves, but doesn’t provide an option to round the user’s input automatically.
Proposal
- Add
--round-leaves flag.
- Instead of requiring user input for leaves, compute:
- rounded_up = arity**ceil(log(leaves, arity))
- rounded_down = arity**floor(log(leaves, arity))
- Print both possibilities.
Benefit
Useful for designing commitment systems or memory layouts that must align to exact powers of arity.