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

Refactor syncing and introduce ChainSource #365

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Commits on Oct 9, 2024

  1. Prefactor: Move src/wallet.rs to src/wallet/mod.rs

    We will be adding some wallet persistence/serialization related types
    and in a separate module down the line, so here we perepare for it by
    already moving the wallet code to a module directory.
    tnull committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    a225e1e View commit details
    Browse the repository at this point in the history
  2. Update the world

    ... we update LDK, lightning-liquidity, BDK, rust-bitcoin, rust-esplora-client,
    rust-electrum-client, etc.
    tnull committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    d0de144 View commit details
    Browse the repository at this point in the history
  3. Add ChainSource enum

    .. which will allow us to switch between different chain sources.
    tnull committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    3f7dfe1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    03dcb7a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8b6c832 View commit details
    Browse the repository at this point in the history
  6. f Drop unnecessary scope

    tnull committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    8fd708d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    271032a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c570aad View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    6c5880c View commit details
    Browse the repository at this point in the history
  10. Move syncing tasks to ChainSource

    .. which also gives us the opportunity to simplify and  DRY up the logic
    between background and manual syncing.
    tnull committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    16ebf39 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    8fdcb12 View commit details
    Browse the repository at this point in the history
  12. Introduce persisted NodeMetrics struct

    Previously, we persisted some of the `latest_` fields exposed via
    `NodeStatus`. Here, we now refactor this via a persisted `NodeMetrics`
    struct which allows to persist more fields across restarts. In
    particular, we now persist the latest time we sync the on-chain wallet,
    resulting in only doing a full scan on first initialization, and doing
    incremental syncing afterwards.
    
    As both of these operations are really really lightweight, we don't
    bother to migrate the old persisted timestamps for RGS updates and node
    announcement broadcasts over to the new data format.
    tnull committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    9ad7b4f View commit details
    Browse the repository at this point in the history
  13. Prefactor: Expose config objects via config module

    .. to further de-clutter the top-level docs.
    tnull committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    7bf1417 View commit details
    Browse the repository at this point in the history
  14. Prefactor: Move ChannelConfig to config

    .. to also expose it via the `config` module rather than at the
    top-level docs.
    tnull committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    b628dc2 View commit details
    Browse the repository at this point in the history
  15. Move Esplora-specific sync options to dedicated config

    .. as other upcoming chain sources might not have the same config
    options such as syncing intervals, or at least not with the same
    semantics.
    tnull committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    d9df8ac View commit details
    Browse the repository at this point in the history