Subject: [quicwg/base-drafts] assertion in OnLossDetectionTimeout of recovery draft (#3912)

From: Kazu Yamamoto <[email-masked]>
Date: Wed, 15 Jul 2020 18:06:10 -0700

The assertion in `OnLossDetectionTimeout` sometime fails in Haskell implementation which is translated from the pseudocode:

```
OnLossDetectionTimeout():
  ...
  if (earliest_loss_time != 0):
    ...
    return

  if (bytes_in_flight > 0):
    SendOneOrTwoAckElicitingPackets(pn_space)
  else:
    assert(endpoint is client without 1-RTT keys)
    // Client sends an anti-deadlock packet: Initial is padded
    // to earn more anti-amplification credit,
    // a Handshake packet proves address ownership.
    if (has Handshake keys):
      SendOneAckElicitingHandshakePacket()
    else:
      SendOneAckElicitingPaddedInitialPacket()
```

How does `bytes_in_flight > 0` guarantee "endpoint is client without 1-RTT keys"?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/3912

---

From: ianswett <[email-masked]>
Date: Thu, 16 Jul 2020 08:16:14 -0700

The only time the PTO is armed when there are no bytes in flight is when it's a client and it's unsure if the peer has completed address validation, so I'll change the assert to that.  It's possible for the client to have 1-RTT keys prior to the server validating it's address, as your code demonstrates.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/3912#issuecomment-659479659

---

From: Jana Iyengar <[email-masked]>
Date: Thu, 16 Jul 2020 17:34:35 -0700

@kazu-yamamoto : In addition to the PR, the point of the assert is not to suggest that it's always true when `(bytes_in_flight == 0)`. The assert confirms that if OnLossDetectionTimeout() is called with `bytes_in_flight == 0`, it's only when the server hasn't yet completed address validation.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/3912#issuecomment-659755523

---

From: Jana Iyengar <[email-masked]>
Date: Thu, 16 Jul 2020 17:35:10 -0700

Closed #3912 via #3916.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/3912#event-3555723081