Skip to content

Gossip Infinite Loop Fix #1256

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 07-routing-gossip.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ A node:
- If it has NOT previously received `announcement_signatures` for the funding transaction:
- MUST send its own `announcement_signatures` message.
- If it receives `announcement_signatures` for the funding transaction:
- MUST respond with its own `announcement_signatures` message.
- MUST respond with its own `announcement_signatures` message once per connection.
Comment on lines 94 to +95
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should indeed make it clearer that we mustn't create an infinite loop (even though I hope every implementation already does this correctly - eclair does). I'm nitpicking, but with the change you're proposing, if we strictly follow the spec without thinking, we'd still be sending one redundant announcement_signatures:

  • Both nodes send announcement_signatures on reconnection because of the requirement above ("If it has NOT previously received (...): MUST sent its own announcement_signatures message.)
  • When receiving the remote announcement_signatures, they would respond with their own announcement_signatures, even though they already sent it right before
  • Then they would stop re-sending announcement_signatures

It would be slightly more correct to change the spec to say that you only respond with your own announcement_signatures if you haven't already sent it since reconnecting:

- If it receives `announcement_signatures` for the funding transaction:
  - If it has not already sent its own `announcement_signatures` since reconnecting:
    - MUST respond with its own `announcement_signatures`.

Also note that all of this will be cleaned up with taproot, where we will need nonces to be able to create our own announcement_signatures, and will thus only re-send it after exchanging channel_ready (which will contain those nonces). We won't be able to have a loop of announcement_signatures message because we won't have nonces to create the partial signatures!


A recipient node:
- If the `short_channel_id` is NOT correct:
Expand Down