Repository navigation
lightningd: treat channels funded before the activation as private in gossip - #87
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A local channel funded before the BLAKE2b activation can never be announced, but
derive_channel_stateput it inCGOSSIP_ANNOUNCEDwhen its announce flag was set. On every start lightningd logged "gossipd lost track of announced channel", rebroadcast itschannel_updateto every peer, and kept signing anode_announcementthat upgraded nodes drop.is_privatenow also covers a usable channel whose scid predates the activation, so it is handled like an unannounced channel: itschannel_updategoes only to its peer, it does not count towardhas_announced_channels, and stale peer sigs are dropped on enteringCGOSSIP_PRIVATE.announcement_signaturesfor such a channel are ignored quietly, since the peer may not know the activation height.channel_updateof a closed channel funded before the activation. It is now dropped instead of tripping the state checks.Closes #80
Test plan
test_gossip_prefork_channel_not_reannounced: two restarts start inCGOSSIP_PRIVATEwith no re-announce, a new alias is never announced, and invoices still carry a route hint that a third node pays through.test_gossip_prefork_channel_closed_restartandtest_gossip_prefork_zeroconf_closing_minedfail without the change (a BROKEN log and an illegal transition) and pass with it.Changelog-None