bolt07: explicit that the peer may fail the connection if wrong chain_hash in query_messages#678
Closed
darosior wants to merge 1 commit into
Closed
bolt07: explicit that the peer may fail the connection if wrong chain_hash in query_messages#678darosior wants to merge 1 commit into
darosior wants to merge 1 commit into
Conversation
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').
abd699f to
810dc32
Compare
This was referenced Oct 1, 2019
Contributor
Author
|
This finally does not seem to be a good idea, as we are going to use the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the
query_messages, the node receiving the query (query_[channel_range/short_channel_ids]) will set thecompleteflag to0in the reply if it does not maintain up-to-date informations about the network specified in the requestchain_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_rangethat is implied to not have any information in the first place (to set thelenof the list of scds to0). This is a modification of aMUSTbut we already do this for C-lightning, and (really not sure though) I don't think Eclair and LND even send a reply withcompleteto0on badchain_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)