Skip to content

Commit d906010

Browse files
ziggie1984Roasbeef
authored andcommitted
discovery: add detailed comment.
Describe why it is ok to resurrect zombie channels based on the timestamp of the `ReplyChannelRange` msg although its not verifiable data.
1 parent 4441386 commit d906010

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

channeldb/graph.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2143,6 +2143,21 @@ func (c *ChannelGraph) FilterKnownChanIDs(chansInfo []ChannelUpdateInfo,
21432143
zombieIndex, scid,
21442144
)
21452145

2146+
// TODO(ziggie): Make sure that for the strict
2147+
// pruning case we compare the pubkeys and
2148+
// whether the right timestamp is not older than
2149+
// the `ChannelPruneExpiry`.
2150+
//
2151+
// NOTE: The timestamp data has no verification
2152+
// attached to it in the `ReplyChannelRange` msg
2153+
// so we are trusting this data at this point.
2154+
// However it is not critical because we are
2155+
// just removing the channel from the db when
2156+
// the timestamps are more recent. During the
2157+
// querying of the gossip msg verification
2158+
// happens as usual.
2159+
// However we should start punishing peers when
2160+
// they don't provide us honest data ?
21462161
isStillZombie := isZombieChan(
21472162
info.Node1UpdateTimestamp,
21482163
info.Node2UpdateTimestamp,

0 commit comments

Comments
 (0)