Skip to content
This repository was archived by the owner on Oct 9, 2026. It is now read-only.
This repository was archived by the owner on Oct 9, 2026. It is now read-only.

Update announcement inclusion logic #15

Description

@arik-so

Currently, the announcement inclusion logic lives here:

https://github.com/lightningdevkit/rapid-gossip-sync-server/blob/main/src/serialization.rs#L134

We need to update it such that if a channel at any point had an interval exceeding two weeks between updates in either direction (since the client's last seen timestamp), an announcement is also included.

Activity

  1. TheBlueMatt commented on Sep 14, 2022

    @TheBlueMatt
    Contributor
    its kinda awkward, tho, because you have to care even if time A was before the last sync time
    
    so we now need to fetch all updates between (last sync - 2 weeks) and now
    
    because if A was last announced 3 weeks ago before the one yesterday we have to include the announcement for clients that last synced 2 weeks ago
    though we do not need to include the announcement for clients that last synced 4 weeks ago
    
    we only need to care, I think, if the "timeout period" spanned the "last sync time"
    
  2. arik-so commented on Sep 14, 2022

    @arik-so
    ContributorAuthor

    Additionally, in this line

    https://github.com/lightningdevkit/rapid-gossip-sync-server/blob/main/src/serialization.rs#L129

    it's possible that first_update_seen may have happened before last_seen_timestamp, however, the first update seen in the opposite direction happened afterwards. For that case, we'd still need to make sure to also include the channel announcement.

    Additionally, by that point, the intermediate update series is no longer available in the delta, so it would need to be calculated in lookup.rs, and a largest_update_interval field would need to be added to the directional update structs.

  3. arik-so commented on Oct 16, 2023

    @arik-so
    ContributorAuthor

    This is not super high priority, but would be a great project to tackle once #63 lands, which will allow customizing the announcement seen timestamps in tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions