Expand description
A function to calculate lipmaa sequence numbers.
From the bamboo spec: “The lipmaalinks are chosen such that for any pair of entries there is a path from the newer to the older one of a length logarithmic in their distance.”
use lipmaa_link::lipmaa;
let result = lipmaa(13);
assert_eq!(result, 4);Constants§
- MAX_
NUM_ LIPMAA_ LINKS_ FOR_ U64 - The number of lipmaa links needed to traverse from u64::MAX back to 0;
Functions§
- get_
lipmaa_ links_ back_ to - Get all the lipmaa link numbers back to some other lipmaa_link in descending order
- get_
lipmaa_ links_ back_ to_ root - Get all the lipmaa link numbers between
nand 0 - is_
skip_ link - Will
ncreate a “skip” link rather than justn - 1 - lipmaa
- Calculates the lipmaa link number given the current sequence number.