def block_num_to_hex(block_num):
    """Converts a block number to a hex string.
    This is used for proper index ordering and lookup.

    Args:
        block_num: uint64

    Returns:
        A hex-encoded str
    """
    return "{0:#0{1}x}".format(block_num, 18)