public inbox for nncp-devel@lists.cypherpunks.ru
Atom feed
* Confirmation of Received Packets
@ 2022-02-23 13:17 John Goerzen
  2022-02-24 11:10 ` Sergey Matveev
  0 siblings, 1 reply; 5+ messages in thread
From: John Goerzen @ 2022-02-23 13:17 UTC (permalink / raw)
  To: nncp-devel

Hi folks,

I am working to set up a fully airgapped system.  It will exchange data
with another system solely by using nncp-xfer and USB sticks.  This is
data I really wouldn't want to lose.

This brings to mind a thought...

With nncp-caller/daemon, there is a confirmation of correct receipt of
packets (including checksum).  The sending side doesn't delete the
packet until it's received this confirmation from the receiver.

With nncp-xfer/bundle, we don't have that mechanism.  We can choose to
either leave packets on the disk after transmission, or not.  If we
leave packets on the disk after transmission, that implies that they
will be transmitted over and over.  (We can use seen on the receiver
side to prevent multiple processing, but it won't prevent multiple
transmissions.)

If we don't keep the packets on the sender side, then we risk data loss
due to issues such as USB stick failure, loss of the USB stick, etc.

It seems it may be useful to have "something" on the receiver side
(toss, xfer, or bundler) be able to create a reply packet saying "I am
node X, and here is a list of packets I have successfully received and
checksummed."  This packet could go back to the sender over whatever
method is used (xfer/bundle/etc).

There is perhaps a workaround (untested):

The sender machine can have a script around nncp-bundle that generates
bundles with unique filenames, placed into a particular "for node X"
directory on the USB stick.

The receiver can process these with nncp-bundle -check -rx.  Assuming
that this command exits with code 0 if all packets are successfully
received and checked and nonzero if not (I couldn't find documentation
if this is indeed the case), then if all packets are successfully
received and checked, it could move the bundle into "verified by node X"
directory.

The next time the sender runs, it can run nncp-bundle -rx -delete over
everything in the "verified by node X" directory.

I think it would be nice to be able to handle this within NNCP, however.
It would mean lower storage requirement (just a few bytes to indicate
successful reception instead of keeping the entire bundle around), and
also a lot easier automation.

I would hope it wouldn't be too difficult to implement?

Thanks!

- John

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-25 22:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23 13:17 Confirmation of Received Packets John Goerzen
2022-02-24 11:10 ` Sergey Matveev
2022-02-24 22:00   ` John Goerzen
2022-02-24 22:03     ` Sergey Matveev
2022-02-25 22:46       ` Jonathan Lane