Skip to content

[bug]: GossipSyncer should remove unreliable Peers from syncing the ChannelGraph #8889

@ziggie1984

Description

@ziggie1984

There are peers in the network which have a very old ChannelGraph view and when connected to them it requires LND to do a lot of unnecessary work to check for the validity of their out of date graph data. Moreover for pruned nodes this comes with a burden in terms of bandwidth because for channels the node doesn't have the blockdata anymore they need to be fetched from peers which is very bandwidth intensive especially if you use VPN services for your node which restrict the bandwidth at certain points.

I think we should first introduce some sanity checks, if our channel-graph and the channel-graph of our peers is too far apart, we should trust ourselves more and remove the peer from syncing the data. Probably we should also ban that peer at some point.

This is how an out of date peer sync could look like (form a mainnet node):

 DISC: GossipSyncer(02dfe525d9c5b4bb52a55aa3d67115fa4a6326599c686dbd1083cffe0f45c114f8): starting query for 164060 new chans
2024-06-29 11:20:06.456 [INF] DISC: GossipSyncer(02dfe525d9c5b4bb52a55aa3d67115fa4a6326599c686dbd1083cffe0f45c114f8): querying for 500 new channels
2024-06-29 11:20:06.717 [INF] DISC: GossipSyncer(02dfe525d9c5b4bb52a55aa3d67115fa4a6326599c686dbd1083cffe0f45c114f8): querying for 500 new channels
2024-06-29 11:20:06.894 [ERR] CRTR: process network updates got: unable to fetch utxo for chan_id=556369376388317185, chan_point=8450839336340be66e5e1bf02d6ab046d4e83b44d97f034f0b8da609e4f74df1:1: target output has been spent
2024-06-29 11:20:06.988 [ERR] CRTR: process network updates got: unable to fetch utxo for chan_id=556449640836104192, chan_point=6950a0ad8d4d3751f26afd8ab09c32e28b017e721503adefdf6d1f06ae2b19d4:0: target output has been spent
2024-06-29 11:20:07.210 [ERR] CRTR: process network updates got: unable to fetch utxo for chan_id=556484825143181312, chan_point=8ca07553aff9287badc5a792f85e6785aaccd8c8596b3d7664eb7499e9de67fb:0: target output has been spent
2024-06-29 11:20:07.567 [ERR] CRTR: process network updates got: unable to fetch utxo for chan_id=556816877593165824, chan_point=1451d36ff82bb6faa74eae09486b520eef1702a41273ea3c5e6785daaff2fd40:0: target output has been spent

....

Metadata

Metadata

Assignees

Labels

bugUnintended code behaviourgossip

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions