-
Notifications
You must be signed in to change notification settings - Fork 493
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
BOLT7: How to sync channel updates ? #480
Comments
s/32 bytes/4 bytes/. We need 2 channel update timestamps though, right? Maybe 0 meaning "no update received"? |
Yes 4 bytes (we could use the timestamp of he most recent updates that we have). There is already a Suppose a node stores a "last online at" timestamp. When it becomes online again, it uses this timestamp (minus a few hours for example) to send a |
I've implemented and tested several variations and this is what I propose:
There are 2
When a node receive a It's very basic but not that different from the existing messages and so should be fairly easy to implement if you already support channel range queries. |
Closing this old issue, we are fortunately able to sync |
To route messages, LN nodes use a local routing table that includes channel announcements and updates. There is one announcement per channel, but nodes can publish many updates, and should use the most recent updates when they compute routes.
Keeping their local routing table up to date is difficult for nodes which are often offline, and can create UX issues where the first payments that users will try will fail because the local routing table is using old updates. It may also alter the computing of routes by ignoring nodes that have published new updates with lower fees.
The current "channel range queries sync" scheme works by reconciling lists of channel ids:
It works very well when nodes have missed channel announcements, but not when they've missed channel updates:
Suppose A has been offline for some time, and has the same channels as B but many of its channel updates are too old.
If is only starts for a short time, it won't get new updates through the channel query scheme, and will not be online long enough to receive channel updates broadcast.
To fix this is propose that we add channel update timestamps to our channel range queries:
reply_channel_range
will now include a list of short channel ids (8 bytes) + timestamps (4 bytes)query_short_channel_ids
will include a flag. If set to 1 the receiving node should send back a channel announcement + updates, otherwise it should just send back updates.The text was updated successfully, but these errors were encountered: