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:
- A asks for a list a short channel ids for a given block height range
- B replies with a list of short channel ids
- A compares with its own routing table and asks for missing channel ids
- B sends back channel announcements and updates
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.
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_rangewill now include a list of short channel ids (8 bytes) + timestamps (4 bytes)query_short_channel_idswill include a flag. If set to 1 the receiving node should send back a channel announcement + updates, otherwise it should just send back updates.