# Quick peer gossip catchup protocol

**URL:** <https://delvingbitcoin.org/t/quick-peer-gossip-catchup-protocol/251>\
**Category:** Protocol Design\
**Tags:** lightning\
**Created:** [December 5, 2023, 3:22am UTC](https://delvingbitcoin.org/t/quick-peer-gossip-catchup-protocol/251 "2023-12-05T03:22:20Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![rustyrussell](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/rustyrussell/32/154_2.png) [@rustyrussell](https://delvingbitcoin.org/u/rustyrussell)\
**Post date:** [December 5, 2023, 3:22am UTC](https://delvingbitcoin.org/t/quick-peer-gossip-catchup-protocol/251/1 "2023-12-05T03:22:20Z")

</div>

Hi all! I’ve been reworking CLN’s gossip daemon, and it is clear that we can fairly easy save a little information on a per-peer basis and send them all the gossip which we’ve received since they disconnected (minus a little bit, probably).

I’m thinking of it as a new feature “option\_serves\_gossip\_catchup”. The peer would send the gossip\_timestamp\_filter with an odd TLV field indicating it wanted gossip since last time, though I suspect we’ll want a new message to say “cannot serve from last time” if (say) the peer doesn’t have a channel, or dataloss; in this case just stream gossip from now on, if they want the entire gossip then they simply re-send gossip\_timestamp\_filter with 0 as time.

Implementing this for us simply means tracking the last gossip\_store offset we sent, and adjusting it when we compact (on restart). This requires some work and storage per peer, so we may want to restrict it to those which have channels with us.

As an addition, we could prioritize “important” gossip (new channels of significance), though that’s harder to specify.

---

_[View the full topic](https://delvingbitcoin.org/t/quick-peer-gossip-catchup-protocol/251)._
