Description
I believe that if we're not careful, we can end up with ANNOUNCE infinite loops today.
If there are three relays connected: A -> B -> C -> A, then we need to ask relays to see if they've already seen an ANNOUNCE before forwarding it along to applicable SUBSCRIBE_NAMESPACEs. Similarly, I can imagine an ANNOUNCE/UNANNOUNCE loop, which aren't as trivially prevented by ensuring you don't forward the same ANNOUNCE twice.
SUBSCRIBE has a temporal ordering, so this feels more tractable, but given we allow arbitrary gaps in Objects and Groups, tracking everything you've already forwarded for a subscription is potentially very costly/complex. If a relay is subscribing to the same track twice because two different relays announced it, I think it needs to keep state to ensure it doesn't forward the same Object multiple times?
BGP has loop prevention mechanisms and so do QUIC stateless resets.
Possibly deployments can ensure data flows in only one direction, but given this is pub/sub, not request/response, it's a lot easier to create loops.