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

gossipd: push our own gossip messages harder. #3152

Merged
merged 1 commit into from
Oct 14, 2019

Conversation

rustyrussell
Copy link
Contributor

I had a report of a 0.7.2 user whose node hadn't appeared on 1ml. Their
node_announcement wasn't visible to my node, either.

I suspect this is a consequence of recent version reducing the amount of
gossip they send, as well as large nodes increasingly turning off gossip
altogether from some peers (as we do). We should ignore timestamp filters
for our own channels: the easiest way to do this is to push them out
directly from gossipd (other messages are sent via the store).

Signed-off-by: Rusty Russell rusty@rustcorp.com.au

Copy link
Collaborator

@trueptolemy trueptolemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ACK b014a7e
Wait travis-ci

struct peer *peer;

list_for_each(&daemon->peers, peer, list)
queue_peer_msg(peer, msg);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for my "too early" ACK.
If we call push_gossip(daemon, take(msg)), here msg is regarded as TAKEN not only in push_gossip(), but also in queue_peer_msg().
In this loop, if the parameter msg is marked as TAKEN, then the first queue_peer_msg would free it.
So, maybe msg shouldn't be declared as "TAKES" in void push_gossip(struct daemon *daemon, const u8 *msg TAKES).
Is this reason accurate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, good catch. Will fix...

@rustyrussell
Copy link
Contributor Author

Rebased and fixed thinko, as diagnosed by @trueptolemy

@trueptolemy
Copy link
Collaborator

Indeed LGTM now, but always TIMEOUT on travis-ci.
I restart the failed jobs again.

I had a report of a 0.7.2 user whose node hadn't appeared on 1ml.  Their
node_announcement wasn't visible to my node, either.

I suspect this is a consequence of recent version reducing the amount of
gossip they send, as well as large nodes increasingly turning off gossip
altogether from some peers (as we do).  We should ignore timestamp filters
for our own channels: the easiest way to do this is to push them out
directly from gossipd (other messages are sent via the store).

We change channeld to wrap the local channel_announcements: previously
we just handed it to gossipd as for any other gossip message we received
from our peer.  Now gossipd knows to push it out, as it's local.

This interferes with the logic in tests/test_misc.py::test_htlc_send_timeout
which expects the node_announcement message last, so we generalize
that too.

[ Thanks to @trueptolmy for bugfix! ]
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Copy link
Collaborator

@trueptolemy trueptolemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 80e50ba

@niftynei
Copy link
Collaborator

ACK 80e50ba

@niftynei niftynei merged commit ca53c1b into ElementsProject:master Oct 14, 2019
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.

3 participants