Skip to content
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

plugins/topology: remove topology functionality from gossipd. #4585

Merged

Conversation

rustyrussell
Copy link
Contributor

After this, gossipd's main responsibility is just to create our own gossip messages, and receive those from others. As a nice bonus, listchannels, listnodes and getroute don't use gossipd, so they don't block its more important functions.

@rustyrussell rustyrussell added this to the v0.10.1 milestone Jun 5, 2021
@rustyrussell rustyrussell force-pushed the guilt/pay-map-gossip-store branch 5 times, most recently from 2507b5e to 1f9f4bd Compare June 11, 2021 12:51
@rustyrussell rustyrussell force-pushed the guilt/pay-map-gossip-store branch 2 times, most recently from 08f7382 to be4176f Compare June 12, 2021 00:19
@rustyrussell
Copy link
Contributor Author

rustyrussell commented Jun 13, 2021

Seems to hit CI flake, fixed in #4596

That has been merged, trivial rebase.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This suppresses some "may-be-uninitialized" warnings later.  It makes
gcc pickier about how we ignore the result though :(

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Temporarily rename old getroute to getrouteold (we will remove this).

Changelog-Changed: JSON-RPC: `getroute` is now implemented in a plugin.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
It sometimes fails because the two race, and sometimes because there's
randomness, but it generally works (and doesn't fail systemically).

We remove this before the final merge.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…active=false.

This is blurring the lines a bit, but it's closer to what gossipd did.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
It sometimes fails because the two race, and sometimes because there's
randomness, but it generally works (and doesn't fail systemically).

We remove this before the final merge.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This was previously internal to gossipd and was called "read_addresses".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
It sometimes fails because the two race, and sometimes because there's
randomness, but it generally works (and doesn't fail systemically).

We remove this before the final merge.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Invoices need to know what the peers' update contains, to create
routehints.  It also wants to know if a peer has no other public
channels (so-called "dead end" peers) to eliminate them from routehint
consideration.

This was previously done by a special function to ask gossipd.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This turned into a more extensive cleanup than intended.  The previous
warnings were overlapping and confusing, especially now MPP is the norm.

*warning_capacity* is now the "even under best circumstances, we don't
have enough incoming capacity", which is really what
warning_mpp_capacity was trying to say (no longer printed).

*warning_offline* and *warning_deadends* are only given if adding such
peers would have helped give capacity (i.e. not if *warning_capacity*
is set).  The new *warning_private_unused* tells you that we would
have sufficient capacity, but we refused to expose private channels.

The test cases have been enhanced to cover the new warnings.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `invoice` now gives `warning_private_unused` if unused unannounced channels could have provided sufficient capacity.
Changelog-Changed: JSON-RPC: `invoice` warnings are now better defined, and `warning_mpp_capacity` is no longer included (since `warning_capacity` covers that).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…istnodes.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We're about to remove routing from gossipd.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This involves removing some fields from the now-misnamed routing.h
datastructures, and various internal messages.

One non-obvious change is to our "keepalive" logic which refreshes
channels every 13 days: instead of using the 'enabled' flag on the
last channel broadcast to decide whether to refresh it, we use the
local connected status directly.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…ugins.

This mainly helps our CI under valgrind, which starts a fresh instance
and immediately calls the invoice command.  This can cause the topology
plugin to try to access the gossmap file before it's created.

We can also move the gossmap reading in topology to init time.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@cdecker
Copy link
Member

cdecker commented Jun 15, 2021

ACK a0e1020

@rustyrussell rustyrussell merged commit 75720ad into ElementsProject:master Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants