Skip to content

Prune unconnected nodes from the channel graph #138

@Roasbeef

Description

@Roasbeef

Currently we accept any and all NodeAnnouncement messages received. Instead we should:

  • Limit the number of unconnected nodes we accept and write to the database.

    • A node is unconnected if it doesn't have any authenticated channels advertised whcih are still open
  • Remove LinkNodes from the database, once we have closed out all previous channels with them.

The lack of an implementation of #1 opens us up to a disk flooding attacking whereby a node connects and send us a bunch of "fake" nodes with pubkeys that it generated on the fly. This attack is very cheap compared to channel creation as it is very cheap to generate new public keys, generate the signature then send us a bogus NodeAnnouncement message.

The lack of an implementation of #2 atm, results in the daemon attempting to establish persistent connections to nodes that it doesn't have any channels with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    databaseRelated to the database/storage of LNDdos/hardeningRelated to the resilience of LND against denial of service or other related attacksintermediateIssues suitable for developers moderately familiar with the codebase and LNrouting

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions