Skip to content

chanevents: channel event monitor improvements #238

@bitromortac

Description

@bitromortac

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions