-
Notifications
You must be signed in to change notification settings - Fork 73
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
tnull
wants to merge
15
commits into
lightningdevkit:main
Choose a base branch
from
tnull:2024-10-chain-source-refactor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Oct 9, 2024
-
Prefactor: Move
src/wallet.rs
tosrc/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.
Configuration menu - View commit details
-
Copy full SHA for a225e1e - Browse repository at this point
Copy the full SHA a225e1eView commit details -
... we update LDK, lightning-liquidity, BDK, rust-bitcoin, rust-esplora-client, rust-electrum-client, etc.
Configuration menu - View commit details
-
Copy full SHA for d0de144 - Browse repository at this point
Copy the full SHA d0de144View commit details -
.. which will allow us to switch between different chain sources.
Configuration menu - View commit details
-
Copy full SHA for 3f7dfe1 - Browse repository at this point
Copy the full SHA 3f7dfe1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 03dcb7a - Browse repository at this point
Copy the full SHA 03dcb7aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b6c832 - Browse repository at this point
Copy the full SHA 8b6c832View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8fd708d - Browse repository at this point
Copy the full SHA 8fd708dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 271032a - Browse repository at this point
Copy the full SHA 271032aView commit details -
Configuration menu - View commit details
-
Copy full SHA for c570aad - Browse repository at this point
Copy the full SHA c570aadView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c5880c - Browse repository at this point
Copy the full SHA 6c5880cView commit details -
Move syncing tasks to
ChainSource
.. which also gives us the opportunity to simplify and DRY up the logic between background and manual syncing.
Configuration menu - View commit details
-
Copy full SHA for 16ebf39 - Browse repository at this point
Copy the full SHA 16ebf39View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8fdcb12 - Browse repository at this point
Copy the full SHA 8fdcb12View commit details -
Introduce persisted
NodeMetrics
structPreviously, 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.
Configuration menu - View commit details
-
Copy full SHA for 9ad7b4f - Browse repository at this point
Copy the full SHA 9ad7b4fView commit details -
Prefactor: Expose config objects via
config
module.. to further de-clutter the top-level docs.
Configuration menu - View commit details
-
Copy full SHA for 7bf1417 - Browse repository at this point
Copy the full SHA 7bf1417View commit details -
Prefactor: Move
ChannelConfig
toconfig
.. to also expose it via the `config` module rather than at the top-level docs.
Configuration menu - View commit details
-
Copy full SHA for b628dc2 - Browse repository at this point
Copy the full SHA b628dc2View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for d9df8ac - Browse repository at this point
Copy the full SHA d9df8acView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.