faraday icon indicating copy to clipboard operation
faraday copied to clipboard

chanevents: channel event monitor improvements

Open bitromortac opened this issue 7 months ago • 3 comments

Follow-up improvements identified during review of #237 (currently only in faraday-forwarding-ability branch).

  • Reconnection: The monitor retries on a fixed interval when the subscription breaks. We should use exponential backoff to be friendlier to lnd during extended outages. The connection may also need to be re-established (needs tests if the grpc connection can recover).

  • Start subscription before initial sync: Right now we sync first, then subscribe. Any events that happen in between get dropped. We should flip the order - subscribe first to start buffering, do the sync, then process buffered events with dedup.

  • Deduplicate initial sync events initialSync writes events for every channel on startup regardless of whether anything actually changed. Over time this bloats the DB. We should compare against the last recorded state and only write when something differs.

Points raised in review here https://github.com/lightninglabs/faraday/pull/244

bitromortac avatar Apr 09 '26 10:04 bitromortac

Hello. I would like to pick this up if that's ok?

murraystewart96 avatar May 17 '26 19:05 murraystewart96

@murraystewart96, the channel events feature (forwarding ability) is still under development, and this work should only start once the side branch (faraday-forwarding-ability) is merged into master.

bitromortac avatar May 18 '26 06:05 bitromortac

@bitromortac thanks for the heads up. I have an implementation ready so I will wait to see if it's still required once the feature has been merged.

murraystewart96 avatar May 18 '26 08:05 murraystewart96