* support multiple leaves at same height in leaves set * prune leaves on finalization * test leaves behavior in client-db * fix no-std compilation