-
Notifications
You must be signed in to change notification settings - Fork 317
[DRAFT] Expose AssumeUTXO Load Snapshot Functionality To The GUI #870
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
base: master
Are you sure you want to change the base?
[DRAFT] Expose AssumeUTXO Load Snapshot Functionality To The GUI #870
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
friendly ping @Sjors |
Concept ACK Although I'm not sure how much effort we should put into maintaining the current GUI codebase (if it's going to be replaced with QML eventually), this particular feature is high on my wish list. And the code changes here seem very simple. So I'm happy to test and review it. The first commit which touches the node interface should eventually be PR'd to |
Seems like this would be more appropriate for the first-run intro page? |
yep that's a great idea! I will update soon. |
fe687b3
to
25bfc72
Compare
25bfc72
to
60f676a
Compare
I'm a bit confused about the relation between this and bitcoin/bitcoin#33117. I would suggest rebasing 60f676a on that branch for clarity. Managed to load the most recent testnet4 snapshot at height 90,000! (after I rebased) The file dialog was a bit unresponsive, but that's fine since this is just PoC. I like the progress bar. |
Will rebase shortly with the changes from bitcoin/bitcoin#33117
WooHoo!
Hmmm... will look into that... does the dialog hang? |
The dialog wouldn't respond to me clicking on a file or folder. But then after a minute or so it worked again. |
- Added a new virtual method `snapshot` to the node interface for loading UTXO snapshots. - Updated the implementation in `interfaces.cpp` to activate the snapshot using a path. - Added `snapshot.h` to src/interfaces to process the path and extract the metada - Added `getMetadata` and `getActivationResults` methods for use by GUI and/or RPC - Added error handling method and member variable This change enhances the user ability to load utxo snapshots through the GUI
60f676a
to
82a3969
Compare
With 82a3969 it updates the interface methods to match bitcoin/bitcoin#33117 |
- Added a new signal `snapshotLoadProgress` to the notifications interface for tracking snapshot loading progress. - Introduced a `SnapshotLoadWorker` class to handle snapshot loading in a separate thread, emitting progress updates. - Updated `ClientModel` to manage snapshot loading, including methods for setting verification progress and loading snapshots based on that progress. - Enhanced the GUI to allow users to select a snapshot file and display loading progress through a dialog. - Integrated snapshot path handling in the application initialization process. This change improves user experience by providing real-time feedback during snapshot loading operations.
82a3969
to
482e80b
Compare
based on the QML PR 424. For evaluation purposes only!
GUI Integration for UTXO Snapshot Loading
Overview
This PR adds initial GUI support for loading a UTXO snapshot, building on Bitcoin Core's
assumeutxo
infrastructure.What This PR Does
Implementation Details
Core Components Modified
src/node/interfaces.cpp
)snapshotLoad()
based on theloadtxoutset
RPCsrc/qt/optionsdialog.cpp
)Key Design Decisions
assumeutxo
changesTesting Instructions
Load Snapshot
buttonhttps://bitcoin-snapshots.jaonoctus.dev/ (No affiliation with the maintainer of this site. As always "Don't trust! Verify!")
POC Ubuntu Screenshots `signet`
Launch bitcoin-qt on
signet
Navigate to Settings -> Options
Click the "Load Snapshot..." button
Navigate to where your snapshot file is. The snapshot was downloaded from here
Click "Yes"
Wait for the snapshot to load and for this pop-up to appear and click "Ok"
Verify the "chain_snapshot" directory is present in your
datadir
Expected Behavior
Notes for Reviewers
This is a work in progress - feedback welcome on the approach and implementation details.