telehash/telehash.github.io

Exchange state.

fd opened this issue · 1 comments

fd commented

I seem to remember that exchanges used to expire after two minutes of inactivity (no open channels over that exchange). But I can't find it in the spec any more.

Did this change?

There was language like that in v2 since the transport coupling to udp/nat was so strong, that the exchange timeout was tied to it, but in v3 each transport can provide it's own semantics for when any "pipe" has timed out independent of the exchange state.

When a transport pipe fails it should trigger a handshake, and when that fails the exchange should start timing out channels, but should not close until all of the channels have timed out (as they may provide their own timeouts), so there isn't a fixed/exact time, it just depends on the current channels open and transport timeout events.

With no open channels an exchange and its ephemeral keys should be expunged immediately, or close to immediately, within a few seconds? There may be custom/embedded situations where that is not optimal and can be relaxed, so perhaps it isn't a hard/fixed rule?