Skip to content

BOLT 7: Push the sending of announcements_signatures back a little - #474

Closed
TheBlueMatt wants to merge 1 commit into
lightning:masterfrom
TheBlueMatt:master
Closed

TheBlueMatt wants to merge 1 commit into
lightning:masterfrom
TheBlueMatt:master

Conversation

@TheBlueMatt

@TheBlueMatt TheBlueMatt commented Sep 4, 2018 •

Copy link
Copy Markdown
Collaborator

Technically this change may result in channels_announcements only
coming from one end. However, because c-lightning already implements
announcement_signatures in this way, in practice this will improve
reliability of channel_announcements.

Closes #468

My understanding is lnd would need to be updated to do this, and I'm not sure about elair.

Technically this change may result in channels_announcements only
coming from one end. However, because c-lightning already implements
announcement_signatures in this way, in practice this will improve
reliability of channel_announcements.

Closes lightning#468
@TheBlueMatt TheBlueMatt changed the title Correct fee calculation in BOLT 7 BOLT 7: Push the sending of announcements_signatures back a little Sep 4, 2018
@TheBlueMatt

Copy link
Copy Markdown
Collaborator Author

Uh, lol, oops'd completely wrong title/text. Fixed now, sorry to the email-digest folks.

@TheBlueMatt

Copy link
Copy Markdown
Collaborator Author

Yea, spellcheck is just dumb, counterparty is a word, yo.

Comment thread 07-routing-gossip.md
- MAY fail the channel.
- if it has sent AND received a valid `announcement_signatures` message:
- SHOULD queue the `channel_announcement` message for its peers.
- MAY rely on its counterparty not sending an `announcement_signatures`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What's this trying to convey? That it's OK for the other side to violate this clause and that you should be prepared for it?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

You MAY rely on your counterparty to comply with the SHOULD NOT above in order to behave correctly. Otherwise you'd have to not rely on it, as a SHOULD NOT is not sufficient for you to rely on your counterparty following it.

@Roasbeef

Copy link
Copy Markdown
Collaborator

FWIW, these are two independent processes. One gates being able to update the channel locally, while the other gates an advertisement so nodes can remotely trigger channel updates (via routing).

@rustyrussell

Copy link
Copy Markdown
Collaborator

Not really: the depth for funding_locked implies "I expect reorgs upto depth X". That also implies we don't accept the short channel id until depth X. That means, until I've sent you 'funding locked', you have no right to send me 'announcement_signatures'.

The problem with the 'MAY rely' line is that it isn't actionable, and it doesn't combine with the SHOULD.

We should make the first change a MUST, (actually, just s/has been sent/has been sent and received/) then if we want to add:

The receiving node:

  • if it has not sent funding_locked:
    • MAY defer handling the announcement_signatures until after it has sent funding_locked, otherwise MUST ignore it.

Then at the bottom of Rationale:

The reason for allowing deferring of a premature announcement_signatures is that an earlier version of the spec did not require waiting for receipt of funding locked: deferring rather than ignoring it allows compatibility with this behavior.

rustyrussell pushed a commit to rustyrussell/bolts that referenced this pull request Oct 29, 2018
Technically this change may result in channels_announcements only
coming from one end. However, because c-lightning already implements
announcement_signatures in this way, in practice this will improve
reliability of channel_announcements.

[ After much bikeshedding, wording rewritten but same effect -- RR ]

Closes lightning#468
Closes: lightning#474
@TheBlueMatt

Copy link
Copy Markdown
Collaborator Author

Your proposal doesn't fix the issue, though. The goal is to avoid having to needlessly store a message for later processing adding complexity for no reason whatsoever - your proposal just tells you that you have to do so. The MAY is there specifically because the SHOULD is otherwise not actionable - you have to assume your counterparty doesn't do this for completely correct behavior. I'm open to other wordings there.

rustyrussell pushed a commit that referenced this pull request Nov 29, 2018
Technically this change may result in channels_announcements only
coming from one end. However, because c-lightning already implements
announcement_signatures in this way, in practice this will improve
reliability of channel_announcements.

[ After much bikeshedding, wording rewritten but same effect -- RR ]

Closes #468
Closes: #474
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants