-
Notifications
You must be signed in to change notification settings - Fork 436
Set dont_forward on private channel updates and add tests #4340
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
base: main
Are you sure you want to change the base?
Set dont_forward on private channel updates and add tests #4340
Conversation
|
👋 I see @wpaulino was un-assigned. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4340 +/- ##
==========================================
- Coverage 86.53% 86.00% -0.54%
==========================================
Files 158 156 -2
Lines 103190 102652 -538
Branches 103190 102652 -538
==========================================
- Hits 89300 88285 -1015
- Misses 11469 11857 +388
- Partials 2421 2510 +89
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
🔔 1st Reminder Hey @wpaulino! This PR has been waiting for your review. |
|
We should also ignore updates we receive with the bit set in our network graph/p2pgossipmessagehandler. |
Fixes #1672.
Changes:
dont_forwardbit (message_flags bit 1) onchannel_updatemessages for private channelschannel_updategossip messages that havedont_forwardset inP2PGossipSyncchannel_updatewithdont_forwardset for an unknown channel, suggesting the user check thetx_indexpassed tochain::Confirm::transactions_confirmedDetails
Outbound flag setting:
ChannelManager::get_channel_update_for_unicast, we now set:message_flags = 1 | (1 << 1)for private channels (must_be_one+dont_forward)message_flags = 1for public channels (must_be_oneonly)Inbound filtering:
P2PGossipSync::handle_channel_update, channel updates with thedont_forwardbit set are rejected withErrorAction::IgnoreAndLog(Level::Debug)to prevent them from polluting the network graphDiagnostic logging:
internal_channel_update, if we receive achannel_updatefor an unknown SCID withdont_forwardset, we log a debug message suggesting the user verify thetx_indexpassed tochain::Confirm::transactions_confirmedTests
handling_channel_update_with_dont_forward_flag- verifies gossip layer rejects updates withdont_forwardbittest_channel_update_dont_forward_flag- verifies private channels set the flag, public channels don'ttest_unknown_channel_update_with_dont_forward_logs_debug- verifies debug logging for unknown channel updatesBased on lightning/bolts#999: BOLT 7
dont_forwardflag for SCID aliases.