[DRAFT] Expose AssumeUTXO Load Snapshot Functionality To The GUI#870
[DRAFT] Expose AssumeUTXO Load Snapshot Functionality To The GUI#870D33r-Gee wants to merge 2 commits intobitcoin-core:masterfrom
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 copy-paste 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. LLM Linter (✨ experimental)Possible places where named args for integral literals may be used (e.g.
2026-02-25 17:47:14 |
|
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. |
60f676a to
82a3969
Compare
|
With 82a3969 it updates the interface methods to match bitcoin/bitcoin#33117 |
82a3969 to
482e80b
Compare
- 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
- 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.
482e80b to
6e5582f
Compare
|
With 6e5582f updated the validation section of the snapshot load progress notification to batch progress updates for every 100,000 coins processed (and upon completion). This optimization reduces the overhead of signaling the GUI on every single coin while ensuring the interface remains responsive and provides smooth feedback during the UTXO snapshot population process. Additionally, I've rebased the branch on upstream/master and resolved the conflicts in src/qt/bitcoin.cpp |
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
assumeutxoinfrastructure.What This PR Does
Implementation Details
Core Components Modified
src/node/interfaces.cpp)snapshotLoad()based on theloadtxoutsetRPCsrc/qt/optionsdialog.cpp)Key Design Decisions
assumeutxochangesTesting Instructions
Load Snapshotbuttonhttps://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
signetNavigate 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
datadirExpected Behavior
Notes for Reviewers
This is a work in progress - feedback welcome on the approach and implementation details.