public inbox for nncp-devel@lists.cypherpunks.ru
Atom feed
From: Sergey Matveev <stargrave@stargrave•org>
To: nncp-devel@lists.cypherpunks.ru
Subject: Re: Issues with very large packets
Date: Sun, 21 Feb 2021 11:27:00 +0300	[thread overview]
Message-ID: <YDIZYGFwTwma7TEF@stargrave.org> (raw)
In-Reply-To: <87o8ge59f3.fsf@complete.org>

[-- Attachment #1: Type: text/plain, Size: 1627 bytes --]

*** John Goerzen [2021-02-20 22:31]:
>Interesting.  How do these different options interact with removing the
>packet from the remote end?

Packet is deleted only and only when confirmation is sent. And
confirmation is sent only if either packet with the same hash exists in
the spool directory (completely checksummed and fully downloaded), or
corresponding .seen packet exists (that can appear only after tossing of
completely checksummed and fully downloaded packet).

By default, after packet is received, it is renamed .part->.nock and it
is added to background checker queue. When checker finishes
checksumming, it renames .nock->"no extension" and sends confirmation to
the remote side. If remote side is unavailable (connection is lost),
then that confirmation is lost. But ordinary packet (or .seen after its
tossing) will be in the spool. Each online session starts with sending
the whole list of packets (taking niceness in advance) to the remote
side. And during the next session, because of packet/.seen, confirmation
will be sent and packet deleted on remote side. Also, when session
begins, background checker is started with pre-filled queue of currently
existing .nock files (by default, if no -nock option is turned on), that
will send confirmation when .nock-s are checked.

So no loss is possible (.nock files are not enough for confirmation).
Lost connections are not a problem, if you keep state of seen packets --
confirmation will be sent during the next sessions.

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2021-02-21  8:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18 21:35 Issues with very large packets John Goerzen
2021-02-19 12:36 ` Sergey Matveev
2021-02-19 19:18   ` John Goerzen
2021-02-19 19:46     ` Sergey Matveev
2021-02-19 20:34       ` John Goerzen
2021-02-20 19:56         ` Sergey Matveev
2021-02-21  4:31           ` John Goerzen
2021-02-21  8:27             ` Sergey Matveev [this message]