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

bolt07: explicit that the peer may fail the connection if wrong chain_hash in query_messages #678

Closed
wants to merge 1 commit into from

Conversation

darosior
Copy link
Contributor

@darosior darosior commented Oct 1, 2019

In the query_ messages, the node receiving the query (query_[channel_range/short_channel_ids]) will set the complete flag to 0 in the reply if it does not maintain up-to-date informations about the network specified in the request chain_hash. If this is the case then it's not an interesting node for the initial peer, which may fail the connection.

This explicits a constraints on the reply_channel_range that is implied to not have any information in the first place (to set the len of the list of scds to 0). This is a modification of a MUST but we already do this for C-lightning, and (really not sure though) I don't think Eclair and LND even send a reply with complete to 0 on bad chain_hash ? (https:/lightningnetwork/lnd/blob/2dd23819bb0b24d1ece97057d7c469efb9e1d844/discovery/syncer.go#L809, https:/ACINQ/eclair/blob/b5461b80c83b3500449d5593afdce1d660e4aeb8/eclair-core/src/main/scala/fr/acinq/eclair/router/Router.scala#L584)

The behavior was already described in the rationale, this explicits it.

This adds a restriction for 'reply_channel_range' which is implied by
the fact of not maintaining up-to-date informations (for this 'chain').
Copy link
Collaborator

@t-bast t-bast left a comment

Choose a reason for hiding this comment

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

That sounds reasonable, @sstone WDYT?

@darosior
Copy link
Contributor Author

This finally does not seem to be a good idea, as we are going to use the complete flags for lightnweight nodes, closing this

@darosior darosior closed this Oct 20, 2019
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.

2 participants