Description
Background
Since 19 with have some ban logic in place for non-channel peers in case they send us outdated gossip messages. Therefore when Peers request Gossip Sync from us we should not send out Zombie related updates to the peer because we might potentially get banned if we do not have a channel with then.
Currently we only filter out zombie updates if we process a ChannelRangeReply message by our peer, meaning we do not fetch channels we have in our zombie list see here:
Line 924 in b3eb9a3
However we should also not send out zombie related gossip if a peer requests a GossipSync see here:
Line 1052 in b3eb9a3
Consequently if another peer is doing a historical gossip sync, we would serve them all our zombie information which would ban ourselves if we had no channel with the peer.
This is in particular a problem if nodes run with neutrino running with assumechanvalid
where we do not validate the fundingTX, so we should not send out those messages as well which have all zeros in the fundingTX.
Moreover we might send over a warning to the PEER that we are going to BAN them to make debugging easier in the future as proposed by @bitromortac