Subject: Re: Suggestions to make ACK easier

From: John Goerzen <[email-masked]>
Date: Wed, 13 Sep 2023 12:29:19 -0500

On Sun, Aug 13 2023, Sergey Matveev wrote:

> I made ability to automatically generate ACKs during tossing in 8.9.0
> release. nncp-toss -gen-ack, nncp-* -autotoss-gen-ack. Although I did
> only quick testing if it works fine. It saves knowledge about ACK
> packets in spool/tx/ack/PKT empty files. nncp-rm -ack will remove them
> and corresponding spool/tx/PKT packets.

Hi Sergey,

Thank you for this!

It's been a busy month, but I've finally had the time to update my
documentation, scripts, and such, and test this out.

I think I've found two issues.

The first, if -gen-ack is used in conjunction with -seen, then -seen
fires first and the ACK isn't generated.  This is relevant if the ACK
itself was lost at some point; we'd want to keep generating them as long
as the relevant packet keeps coming in.  Ideally the ACK would be
processed before applying the -seen filter.

The second, I'm a little less sure of, but it seems that when responding
to packets that arrived using a via designation, the ACK is sent to the
wrong node -- not the immediate peer.

I had a situation where a packet flowed like this:

A -> Z -> V

where the path between Z and V is using a USB stick and runs ACK.  The
ACK generated on V might have been sent to A via Z, rather than to Z
directly.

I'm a little unsure of my diagnosis here; I did see A process an ACK,
but it is also theoretically possible that a nncp-toss -gen-ack running
on Z generated that ACK.

In any case, somehow there were a few packets that don't have ACKs and
are sticking around (hence the first issue).

Thanks!

- John