[DRAFT] Expose AssumeUTXO Load Snapshot Functionality To The GUI #870

pull D33r-Gee wants to merge 3 commits into bitcoin-core:master from D33r-Gee:2025_gui_interfaces_loadsnapshot_poc changing 13 files +171 −0
  1. D33r-Gee commented at 3:19 pm on April 30, 2025: none

    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

    1. Adds a basic GUI interface for loading UTXO snapshots via the Options Dialog panel
    2. Provides visual confirmation of snapshot activation
    3. Adds a snapshot progress notification bar accessible via a handler

    Implementation Details

    Core Components Modified

    1. Node Interface (src/node/interfaces.cpp)
    1. QT Integration (src/qt/optionsdialog.cpp)
    • Manages snapshot loading state and progress
    • makes use of a worker class to manage snapshot metadata (src/qt/snapshotmodel.cpp)
    • Provides progress updates via a progress bar

    Key Design Decisions

    1. Extensibility
    • Interface designed to accommodate future assumeutxo changes
    • Error handling framework in place

    Testing Instructions

    1. Build
    2. Launch Bitcoin Core GUI (bitcoin-qt)
    3. Navigate to Settings -> Options
    4. Click Load Snapshot button
    5. Follow pop-up instructions
    6. Test with sample snapshot:

    https://bitcoin-snapshots.jaonoctus.dev/ (No affiliation with the maintainer of this site. As always “Don’t trust! Verify!”)

    Screenshot 2025-04-28 100528 Launch bitcoin-qt on signet Screenshot 2025-04-28 100541 Navigate to Settings -> Options Screenshot 2025-04-28 100559 Click the “Load Snapshot…” button Select_file Navigate to where your snapshot file is. The snapshot was downloaded from here Screenshot 2025-04-28 100735 Click “Yes” Screenshot 2025-04-28 100950 Wait for the snapshot to load and for this pop-up to appear and click “Ok” Screenshot 2025-04-28 101743 Verify the “chain_snapshot” directory is present in your datadir

    Expected Behavior

    • File selection dialog works
    • Success/failure state properly displayed
    • Node becomes usable while background validation continues

    Notes for Reviewers

    • This is a POC so all feedback is welcomed
    • I am not a designer so please feel free to chime in if there’s a more elegant way to achieve this

    This is a work in progress - feedback welcome on the approach and implementation details.

  2. interface: Expose load utxo snapshot functionality
    Expose load/activate AssumeUTXO snapshot functionaility so that it can be laoded trhough the GUI.
    5e0b38e4c7
  3. poc: Load snapshot through the options dialog
    This is a quick and dirty POC to showcase and test the load snapshot functionality. This is by no means meant to be a robust approach...
    abce36797a
  4. poc: Add notification handler to display UTXO snapshot Load Progress
    This serves as a quick and dirty POC to display a progress bar when an AssumeUTXO snapshot is loading. The gui code is by no means production or deployment ready. For backend evaluation pruposes only...
    fe687b38f1
  5. DrahtBot commented at 3:19 pm on April 30, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK Sjors

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  6. D33r-Gee commented at 3:51 pm on April 30, 2025: none
    friendly ping @Sjors
  7. Sjors commented at 10:05 am on May 1, 2025: member

    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 bitcoin/bitcoin. But let’s wait with that until this PR has enough concept ACK and some initial review.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-05-03 00:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me