-
Notifications
You must be signed in to change notification settings - Fork 895
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
Gossip cleanup part 1: Removing reliance on private gossip messages #6869
Gossip cleanup part 1: Removing reliance on private gossip messages #6869
Commits on Dec 6, 2023
-
CI revealed one: ``` cc plugins/libplugin-pay.c plugins/libplugin-pay.c: In function ‘payment_getroute’: plugins/libplugin-pay.c:888:17: error: ‘errstr’ may be used uninitialized [-Werror=maybe-uninitialized] 888 | payment_fail(p, "%s", errstr); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ plugins/libplugin-pay.c:851:21: note: ‘errstr’ was declared here 851 | const char *errstr; | ^~~~~~ cc1: all warnings being treated as errors ``` My local compiler gave another: ``` channeld/channeld.c: In function ‘resume_splice_negotiation’: channeld/channeld.c:3734:23: error: ‘final_tx’ may be used uninitialized [-Werror=maybe-uninitialized] 3734 | msg = towire_channeld_splice_confirmed_signed(tmpctx, final_tx, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3735 | chan_output_index); | ~~~~~~~~~~~~~~~~~~ channeld/channeld.c:3461:28: note: ‘final_tx’ was declared here 3461 | struct bitcoin_tx *final_tx; | ^~~~~~~~ cc1: all warnings being treated as errors make: *** [Makefile:298: channeld/channeld.o] Error 1 ``` So fix both. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for dad0022 - Browse repository at this point
Copy the full SHA dad0022View commit details -
common: prepare unit tests for lack of private channels.
Created a new canned gossmap without private channels, updated tests. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 522295a - Browse repository at this point
Copy the full SHA 522295aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 84361ca - Browse repository at this point
Copy the full SHA 84361caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b34784 - Browse repository at this point
Copy the full SHA 9b34784View commit details -
db: add private channel inbound fields
This will be used for generating route hints rather than private gossip
Configuration menu - View commit details
-
Copy full SHA for 5a29dda - Browse repository at this point
Copy the full SHA 5a29ddaView commit details -
gossipd: pass remote private channel update to ld
and stash in the database. Rusty: I added the bad gossip message so we would see unknown updates in CI, and made sure we don't send our own generated updates to lightningd. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 4dfe403 - Browse repository at this point
Copy the full SHA 4dfe403View commit details -
gossipd: always send information about our channels' gossip updates.
Not just when it's a private channel. This is useful for listpeerchannels in the next patch. Most of this is renaming. It also means that source can be NULL, so move it out of the struct and put it in the message, where it logically belongs, and make it an optional field. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 2fa59d9 - Browse repository at this point
Copy the full SHA 2fa59d9View commit details -
listpeerchannels: show gossip updates.
This is redundant if it's a public channel, but vital if it's not. Publishing unconditionally makes it easier for gossmap: we create a local modification all the time, even if redundant (and we can have the actual capacity ceiling accurate in this case, since we know it for local channels). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: JSON-RPC: `listpeerchannels` now shows gossip update contents (even if channel unannounced).
Configuration menu - View commit details
-
Copy full SHA for cc215c4 - Browse repository at this point
Copy the full SHA cc215c4View commit details -
pyln-testing: when waiting for active channel, make sure remote has s…
…ent fee info. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for c0bc986 - Browse repository at this point
Copy the full SHA c0bc986View commit details -
gossmap: insert temporary per-caller flag to turn off private gossip.
This lets us convert one user at a time. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 9cb6644 - Browse repository at this point
Copy the full SHA 9cb6644View commit details -
common: generic routine to turn listpeerchannels into gossmap local u…
…pdates. This is more thorough than the minimal one required for getroute(), including the feerates and cltv deltas. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for adf5758 - Browse repository at this point
Copy the full SHA adf5758View commit details -
plugins/topology: temporary hack to allow per-access private gossmap …
…suppression. We have multiple different routines here, and we want to wean them off private gossip one at a time. This converts `getroute`. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 53ffd08 - Browse repository at this point
Copy the full SHA 53ffd08View commit details
Commits on Dec 13, 2023
-
plugins/fetchinvoice: use gossmods_from_listpeerchannels instead of p…
…rivate gossip_store records. [ Includes use-after-free fix from Alex Myers <alex@endothermic.dev> ] Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 4a396e8 - Browse repository at this point
Copy the full SHA 4a396e8View commit details -
libplugin-pay: make sure get_gossmap calls are balanced by put_gossmap.
This will become important when we apply localmods to the gossmap at these points. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for fcc1010 - Browse repository at this point
Copy the full SHA fcc1010View commit details -
plugins/pay: use gossmods_from_listpeerchannels instead of private go…
…ssip_store records. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 2d06738 - Browse repository at this point
Copy the full SHA 2d06738View commit details -
common: add tests that json_scan can omit an entire object member.
We can, but I had a typo and thought we couldn't! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for dd3b594 - Browse repository at this point
Copy the full SHA dd3b594View commit details -
plugins/renepay: add localmods later.
We will get localmods from gossmods_from_listpeerchannels in the next commit, so we need to save routehints to add to that later. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 88b41fe - Browse repository at this point
Copy the full SHA 88b41feView commit details -
plugins/renepay: use gossmods_from_listpeerchannels instead of privat…
…e gossip_store records. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for ccec35d - Browse repository at this point
Copy the full SHA ccec35dView commit details -
pytest: fix test_zeroconf_open()
l2 gave us a routehint, but it should have seen l1 as a dead-end. It didn't due to the presence of a channel alias, which was a bug. We're about to fix this, which breaks the test. Add a dummy node off l1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for d536eeb - Browse repository at this point
Copy the full SHA d536eebView commit details -
lightningd: permit wrong-alias lookups for private channel_update.
This is wrong, but we send them for now in zeroconf! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 08dda8d - Browse repository at this point
Copy the full SHA 08dda8dView commit details -
lightningd: make listincoming use gossmods_from_listpeerchannels().
We temporarily use a second gossmap so we can just switch private info off for listincoming and not listchannels. Note that listchannels now uses the local alias (if no scid), so we have to change that in the routehint caller. Since we now *always* use a channel alias in hints if one exists, a test broke, so fix that. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 06efdc7 - Browse repository at this point
Copy the full SHA 06efdc7View commit details -
pytest: remove test waits for routehints.
Now listincoming sees local channels in listpeerchannels, we don't need these waits. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 5a81edd - Browse repository at this point
Copy the full SHA 5a81eddView commit details -
topology: don't show private nodes in listnodes.
This breaks our tests a bit, which assumed we can always see ourselves even if we don't have a proper channel. Usually we would deprecate this first, but it's unlikely to break anyone since it's a bit obscure that this worked at all. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Changed: JSON-RPC: `listnodes` no longer shows private (peer) nodes: use listpeers
Configuration menu - View commit details
-
Copy full SHA for da4ba26 - Browse repository at this point
Copy the full SHA da4ba26View commit details -
pytest: fix tests in assumption that listchannels will no longer show…
… private gossip. Some can only be changed once that is true, but some can be removed/amended already. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for f6a2210 - Browse repository at this point
Copy the full SHA f6a2210View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3362f74 - Browse repository at this point
Copy the full SHA 3362f74View commit details -
topology: don't show private nodes in listchannels.
This alters a few remaining tests, as well. [ Inclused even more test fixes from Alex Myers <alex@endothermic.dev>! ] Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Deprecated: JSON-RPC: `listchannels` listing private channels: use listpeerchannels
Configuration menu - View commit details
-
Copy full SHA for 9bf173c - Browse repository at this point
Copy the full SHA 9bf173cView commit details -
common: gossmap now always ignores private gossip_store messages.
In the next PR, they'll be removed, but for now all our code doesn't want them. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 1d8f94e - Browse repository at this point
Copy the full SHA 1d8f94eView commit details -
topology: deprecate overriding
active
inlistchannels
with `listp……eerchannels` info. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Deprecated: `listchannels` no longer uses local knowledge to set `active` to false if disconnected.
Configuration menu - View commit details
-
Copy full SHA for 59a0479 - Browse repository at this point
Copy the full SHA 59a0479View commit details -
plugins: re-enable listchannels local info in deprecated mode.
We only deprecated this, we didn't actually remove it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 406e6d0 - Browse repository at this point
Copy the full SHA 406e6d0View commit details