Retransmit NodeAnnouncement on regular intervals - #2084
Conversation
There was a problem hiding this comment.
Any reason this is the default? It could be made less spammy IMO.
There was a problem hiding this comment.
Could reasonably be made longer, but don't think one update every 24 hrs is the biggest spam problem atm.
There was a problem hiding this comment.
Sure but given that we only consider things stale after 2 weeks it could be set a bit higher.
8821aad to
89edb0d
Compare
f8ab1a7 to
ce72601
Compare
|
Needs a rebase! |
ce72601 to
16d4bac
Compare
16d4bac to
5085beb
Compare
|
Rebased. |
There was a problem hiding this comment.
Just something to note, the timestamp of our node announcement is updated to time.Now every time the server is started.
There was a problem hiding this comment.
Because of this, if a node restarts before it reaches a full day of uptime, it'll never rebroadcast its node announcement.
There was a problem hiding this comment.
I think that's good enough for now. I think maybe there was an issue/PR already for transmitting the node announcement if it changes?
There was a problem hiding this comment.
Won't the announcement be rebroadcast when the time us updated at startup? From that issue it seems so.
There was a problem hiding this comment.
I don't think that's the case. We only seem to send when opening a channel or when running with --nat.
506d249 to
4dc3b2c
Compare
There was a problem hiding this comment.
Because of this, if a node restarts before it reaches a full day of uptime, it'll never rebroadcast its node announcement.
4dc3b2c to
ec91c34
Compare
Also let retransmitStaleChannels take a timestamp, to make it easier to test.
This commit adds a test that ensures outdated announcements are retransmitted when the RetransmitTicker ticks.
ec91c34 to
92123c6
Compare
wpaulino
left a comment
There was a problem hiding this comment.
LGTM, though I still think the node announcement timestamp issue should be addressed in order to be consistent, likely as a separate PR.
I updated and reopened #274. Let me know if this is what you had in mind. |
SGTM |
This PR makes the gossiper retransmit our
NodeAnnouncementevery 24 hrs, to avoid other nodes considering it being a zombie. This is similar to what is done for channels.Fixes #2005.