Technically, your warranty is void as soon as you root, and cannot be restored (if you take the vz terms literally). But it is not easy for vz to determine if you have rooted in the past, and if you were to unroot and restore everything back to the way it originally was, they will not be able to tell. Also, even if you left it rooted, they typically won't take the time to check if it was rooted. But just to be safe, you should definitely unroot if you are trying to send it back w/ your warranty.