From f6a9078150082ca75a3651681ba9e87ebac12113 Mon Sep 17 00:00:00 2001 From: Arik Sosman Date: Thu, 21 Nov 2024 08:24:14 -0800 Subject: [PATCH] Document RGS timestamp usage. --- lightning-rapid-gossip-sync/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lightning-rapid-gossip-sync/README.md b/lightning-rapid-gossip-sync/README.md index 2ff2e7689..57df7caff 100644 --- a/lightning-rapid-gossip-sync/README.md +++ b/lightning-rapid-gossip-sync/README.md @@ -4,6 +4,16 @@ This crate exposes functionality for rapid gossip graph syncing, aimed primarily Its server counterpart is the [rapid-gossip-sync-server](https://github.com/lightningdevkit/rapid-gossip-sync-server) repository. +## Usage + +To kick off Rapid Gossip Sync from the beginning, retrieve a snapshot from an RGS server instance with the initial +timestamp being 0. + +Applying that snapshot using the `RapidGossipSync` instance will extract and retrieve the subsequent timestamp to +request from the server instance. The methods `sync_network_graph_with_file_path`, `update_network_graph`, and +`update_network_graph_no_std` all return a `Result`, and that `u32` success value +is the timestamp meant to be used for the next server request. + ## Mechanism The (presumed) server sends a compressed gossip response containing gossip data. The gossip data is -- 2.39.5