Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

delayed acceptance of remote entries due to unfortunate gossip ordering #2013

Open
@rade

Description

@rade

I've just come across a case where a peer (re)joining a network of other peers, in a chain-topology (enforced through --no-discover), i.e. 'C' joined, 'A <--> B', forming 'A <--> B <--> C', took ~1 minute to accept the DNS entries from the farthest peer (A).

This is odd, since when a new peer connects we send it all gossip. So B should have sent everything to C and vice versa. And the logs indicate that this did indeed happen. So why where A's DNS entries missing? Then I found this in Nameserver.receiveGossip:

    gossip.Entries.filter(func(e *Entry) bool {
        return n.isKnownPeer(e.Origin)
    })

This removes all entries from received gossip for which the peer is unknown to us.

Why would A be unknown to C? Because the "sending all gossip" sends the gossip for all channels in a random order. So if the DNS gossip arrives before the topology gossip then C won't have learnt about A yet when it encounters A's DNS entries. Well, that's my theory anyway.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions