-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set dont forward bit in chanupdate msg for private channels #8582
base: master
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
42dfa2c
to
5f46805
Compare
5f46805
to
d16859f
Compare
cc528d4
to
ee97b15
Compare
ee97b15
to
578f47d
Compare
Hold on with your review still, first the dependant PR need to pass the tests and then this one. |
578f47d
to
76d44d8
Compare
4430487
to
e885bf5
Compare
This will make it simple in the next commits to test soley single messages rather than always the combination of announcement and channel update msg.
When the option SCID is used we need to make sure we update the channel data in an atomic way so that we don't miss any updates by our peer and remove all edge info which still uses the alias as the channel id (e.g. ChannelUpdate msgs). Moreover add unit test for the new ReAddEdge method.
In case we assume valid channels or have alias channels we make sure we also add the channel point to the block filter so that we are notified if the channel point is spent in a block.
e885bf5
to
2913f6e
Compare
We almost never need to create all messages at the same time (ChanUpdate,ChanAnnouncement,Proof) so we split it up into own functions.
76d44d8
to
898ad3e
Compare
new msg flag in the channel update msg is defined.
Set the dont_forward bit in the chan update msg when a channel is not (yet) announced to the network. This is either the case for channels which signal this in the ChannelFlags of the OpenChannel msg but also for public channels which have still not reached the minimum depth height of 6 confirmations.
898ad3e
to
f7fe057
Compare
Adopt tests to make sure the dont_forward bit is set when needed.
When a channel update is now executed the msg field will be migrated on the fly meaning that private channels or channels which still have no signatures exchanged will now signal the dont_forward bit.
In case the __dont_forward__ is set in the ChanUpdate msg lnd will not forward this msg to the gossiper hence broadcasting it to all its peers. This makes sure we follow the network rules and dont forward ChanUpdates which do not signal it.
f7fe057
to
6bbd9a4
Compare
@ziggie1984, remember to re-request review from reviewers when ready |
Replaces #7759
Need to address this comment for that PR to be ready for master: #7759 (comment)
PR is based on #8777
and
#9384