-
Notifications
You must be signed in to change notification settings - Fork 492
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
reply_channel_range is now too strict. #804
Comments
... except this introduces an ambiguity :( If you split the final queried block, receiver will think that the reply is complete. Then you send another reply... |
Yes, IIRC that's why we made it strict to include the whole block in one message... |
We previously insisted that `reply_channel_range` messages were not overlapping: blocks content could not be split across multiple messages. This made it possible to implicitly figure out when sync was complete, so we re-purposed the previous `complete` field to a `full_information` field. We now revert that change to allow blocks to be split across multiple messages. An explicit flag is thus needed to signal that sync is complete. Fixes #804
We previously insisted that `reply_channel_range` messages were not overlapping: blocks content could not be split across multiple messages. This made it possible to implicitly figure out when sync was complete, so we re-purposed the previous `complete` field to a `full_information` field. We now revert that change to allow blocks to be split across multiple messages. An explicit flag is thus needed to signal that sync is complete. Fixes #804
We insist that block numbers increase, eg. replies should be (first_block=100, num_blocks=10), (first_block=110, num_blocks=10).
This requires implementations to split on block boundaries, and also has the (previously raised but currently purely theoretical) problem that a single block with more than 8k channels would be unsendable without compressed encoding.
Moreover, lnd simply packs in channel ids to the limit, thus it can repeat a block on the edge case, and allows this explicitly:
syncer.go:736
So I think we should allow this: in particular, c-lightning will probably start doing the same thing, packing up to 8k descriptors into a reply chunk, then compressing. (We currently do a binary split when a block doesn't fit, which is pretty dumb).
The text was updated successfully, but these errors were encountered: