Summarized from: https://discord.com/channels/973324189794697286/1526567789803081728/1526942404614164571
We saw Waittickets with ticketWaitFor=0, which doesn’t really make sense.
This seems to happen after retries: the registrar recomputes tWait, then calls updateWaitAfterRetry, which subtracts now - ticket.tInit.
Current flow is something like:
waitingTime() rounds the computed wait to whole seconds.updateWaitAfterRetry() can produce a positive remaining wait time below one second.tWait > 0 as Wait(ticket).Duration using .seconds, so a sub-second tWaitFor becomes 0.tInit, tMod) are serialized as epoch seconds, but validation compares ticket.tMod + ticket.tWaitFor + registrationWindow against Moment.now() that has more precision.registrationWindow=1s, the retry window depends on where inside the second the ticket was created. ie: a ticket created at 12:00:01.943 is serialized with tMod=12:00:01, so the validation window can be shortened by almost a full second. Combined with tWaitFor=0, retries can be rejected as late.It would be nice to sync in what is the intended protocol behavior for remaining waits that are below a second? ie:
Confirmed, because the wait is below ticket precision?Wait, but round tWaitFor up to 1 second?Also:
Wait response with tWaitFor=0 considered valid by the protocol?
0 shouldn’t make sense as a waiting time - it should round up to whatever the lowest unit is that the resolution allows.