We know all RPZ downstreams. If we track the serial they want to start from in each IXFR requests then we can discard the tail of the IXFR chain with serials older than the oldest RPZ downstream IXFR start.
[x] Track claimed serial for each downstream. This is a bit difficult as we know the downstream by addr+port, but they claim a serial via their IXFR request, which will use a random port.
[x] Process data from a an update that lead to an update of RPZ (i.e. a new IXFR object was created) into the RPZ AXFR data.
[x] Delete IXFR objects from the IXFR chain if they are more than two serials earlier than last claimed serial.
[x] Enhance the zone transfer support to be able to send an AXFR if we don't have enough links left in the IXFR chain to satify the IXFR request.
Strawman proposal:
We know all RPZ downstreams. If we track the serial they want to start from in each IXFR requests then we can discard the tail of the IXFR chain with serials older than the oldest RPZ downstream IXFR start.