Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't pause events for chainsync persistence #2957

Merged
merged 5 commits into from
May 6, 2024

Commits on Apr 26, 2024

  1. Don't pause events for chainsync persistence

    We used to wait on ChannelMonitor persistence to avoid
    duplicate payment events. But this can still happen in cases where
    ChannelMonitor handed the event to ChannelManager and we did not persist
    ChannelManager after event handling.
    It is expected to receive payment duplicate events and clients should handle these
    events in an idempotent manner. Removing this hold-up of events simplifies
    the logic and makes it easier to not persist ChannelMonitors on every block connect.
    G8XSU committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    cb86399 View commit details
    Browse the repository at this point in the history
  2. Stop storing last_chain_persist_height

    We only used to store last_chain_persist_height to release
    events held for more than LATENCY_GRACE_PERIOD_BLOCKS due to
    pending monitor update with UpdateOrigin::ChainSync. Since we no
    longer pause events for ChainSync persistence, we no longer need to
    store last_chain_persist_height.
    G8XSU committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    e084ab2 View commit details
    Browse the repository at this point in the history
  3. Stop tracking MonitorUpdates from ChainSync in pending_monitor_updates

    We no longer need to track them since we no longer hold events for
    pending MonitorUpdates resulting from ChainSync.
    G8XSU committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    7de602a View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2024

  1. Remove MonitorUpdateId from persist trait

    MonitorUpdateId was an opaque abstraction for id's generated by
    UpdateOrigin:Offchain and UpdateOrigin::ChainSync monitor updates.
    It was mainly needed to map calls made to
    ChainMonitor::channel_monitor_updated. We no longer track
    UpdateOrigin::ChainSync MonitorUpdates and can directly use
    ChannelMonitor::get_latest_update_id() for tracking
    UpdateOrigin::Offchain monitor updates.
    G8XSU committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    c1125f0 View commit details
    Browse the repository at this point in the history
  2. Remove ChainMonitor::sync_persistence_id

    It was used earlier for generating unique MonitorUpdateId for
    UpdateOrigin::ChainSync monitor updates.
    G8XSU committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    4d5de1f View commit details
    Browse the repository at this point in the history