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

WIP: Announce channels to the involved peers directly after funding locked #414

Closed
wants to merge 15 commits into from

Conversation

cdecker
Copy link
Member

@cdecker cdecker commented Dec 8, 2017

This should fix #284 and depends on #413 (the first 8 commits are from there). It creates unsigned channel_announcements and channel_updates for a channel that has just locked in. They are then sent to the other endpoint of the channel and to gossipd (other nodes would ignore them due to missing/invalid signatures, but better not send them anyway). gossipd will process them adding the channel to the local view of the network, making them usable for routes, however it won't queue them for broadcast.

The reason this is still WIP is that we have a flaky test test_reconnect_sender_add1 which occasionally fails because the sendpay command doesn't fail when running under valgrind. It appears that for some reason we appear to automatically re-attempt the payment after reconnect when this PR is merged, and the payment succeeds. For comparison see the log before (especially the lines surrounding the first dev_disconnect) and the log after (also around the first dev_disconnect). I'm wondering how this can happen even though the test has nothing to do with gossipd, since we construct the route manually.

@rustyrussell any idea why this happens?

This is used to identify our own announcements.

Signed-off-by: Christian Decker <[email protected]>
We are still generating only char* style aliases, but the field is
defined to be unicode, which doesn't mix too well with char.

Signed-off-by: Christian Decker <[email protected]>
First step towards `gossipd` managing the `node_announcement`.

Signed-off-by: Christian Decker <[email protected]>
This will later be used to determine whether or not we should announce
ourselves as a node.

Signed-off-by: Christian Decker <[email protected]>
This is required to enable channels directly after funding locked. The
update is marked as non-public by a 0 timestamp and a missing
signature.

Signed-off-by: Christian Decker <[email protected]>
We often wait for a channel to be broadcast to a peer, but the channel
only becomes fully usable when a public announcement/update is
sent. This adds a "local" or "public" specifier in the logs so that we
can wait for the specific type that we need.

Signed-off-by: Christian Decker <[email protected]>
Adds sending unsigned `channel_announcement`s and `channel_update`s
when both sides reach `funding_locked`. This'll add the channels into
the gossip's view, without adding them to the broadcast queue, in the
next patch.

Signed-off-by: Christian Decker <[email protected]>
Relatively simple: until we reach funding-depth the channels should be
known locally, so we can already route through them, but they should
not be announced to peers to which the connection is non-local.

Signed-off-by: Christian Decker <[email protected]>
Using the implicit signal of having channel_announcement set doesn't
always work.

Signed-off-by: Christian Decker <[email protected]>
@rustyrussell
Copy link
Contributor

On top of the other gossip changes, this deserves its own new internal msg in gossip_wire.csv, rather than sending an announce stripped of signatures and detecting it that way?

@cdecker
Copy link
Member Author

cdecker commented Dec 13, 2017

Probably true, the code-paths are different enough to warrant a special message. Will see how that works out 👍

@cdecker
Copy link
Member Author

cdecker commented Dec 20, 2017

Closing since #450 was merge

@cdecker cdecker closed this Dec 20, 2017
@cdecker cdecker deleted the early-announce branch January 28, 2018 00:36
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.

Unable to see a channel and to find routes after the funding transaction is confirmed.
2 participants