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

Open
wants to merge 1 commit into
base: master
from

Conversation

@darosior
Copy link
Contributor

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://github.com/lightningnetwork/lnd/blob/2dd23819bb0b24d1ece97057d7c469efb9e1d844/discovery/syncer.go#L809, https://github.com/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

left a comment

That sounds reasonable, @sstone WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.