[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 31 files +303 −395
  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. 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.

    Conflicts

    Reviewers, 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 typos and grammar issues:

    • %u -> %s [The format specifier should match the type of version_value when parsing fails and you want to print the string.]
  3. D33r-Gee commented at 3:51 pm on April 30, 2025: none
    friendly ping @Sjors
  4. 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.

  5. luke-jr commented at 12:34 pm on May 14, 2025: member
    Seems like this would be more appropriate for the first-run intro page?
  6. D33r-Gee commented at 10:35 pm on May 14, 2025: none

    Seems like this would be more appropriate for the first-run intro page?

    yep that’s a great idea! I will update soon.

  7. DrahtBot added the label Needs rebase on May 20, 2025
  8. Merge bitcoin/bitcoin#32520: Remove legacy `Parse(U)Int*`
    faf55fc80b11f3d9b0b12c1b26a9612ea9ce9b40 doc: Remove ParseInt mentions in documentation (MarcoFalke)
    33332829333b589420f8038541d04ec6970f051d refactor: Remove unused Parse(U)Int* (MarcoFalke)
    fa84e6c36cb0accf87123ca4eb98f6219d55fb5e bitcoin-tx: Reject + sign in MutateTxDel* (MarcoFalke)
    face2519fac9e840d52f0334d9079e664be7eb28 bitcoin-tx: Reject + sign in vout parsing (MarcoFalke)
    fa8acaf0b993c879ee8c516baa36339ff7b72406 bitcoin-tx: Reject + sign in replaceable parsing (MarcoFalke)
    faff25a558ab15b5d8eeea5dd4c9c0d76350051b bitcoin-tx: Reject + sign in locktime (MarcoFalke)
    dddd9e5fe38b81f1af6b343661b65e16b0de7c60 bitcoin-tx: Reject + sign in nversion parsing (MarcoFalke)
    fab06ac03788243847b799a3feaac56bc918fba9 rest: Use SAFE_CHARS_URI in SanitizeString error msg (MarcoFalke)
    8888bb499dec79258b1857b404d72f93650503f4 rest: Reject + sign in /blockhashbyheight/ (MarcoFalke)
    fafd43c69192fcb48a9e04d52eeb07fff15655d0 test: Reject + sign when parsing regtest deployment params (MarcoFalke)
    fa123afa0ef752e8645bf695d121da66d8f1382b Reject + sign when checking -ipcfd (MarcoFalke)
    fa479857ed234d54df31d33b60de14c6ffab3d6f Reject + sign in SplitHostPort (MarcoFalke)
    fab4c2967d554ddbc15f732cea6cd190c547d89f net: Reject + sign when parsing subnet mask (MarcoFalke)
    fa89652e68fc07fb6c9f3d9e34dc11d35f0cc1e1 init: Reject + sign in -*port parsing (MarcoFalke)
    fa9c45577dfbae67535e4965b5660288557d3631 cli: Reject + sign in -netinfo level parsing (MarcoFalke)
    fa980413257e2004a8d48a8be66c6d67f90b76ad refactor: Use ToIntegral in CreateFromDump (MarcoFalke)
    fa23ed7fc24212d85cdc7f52b317906b37a1a120 refactor: Use ToIntegral in ParseHDKeypath (MarcoFalke)
    
    Pull request description:
    
      The legacy int parsing is problematic, because it accepts the `+` sign for unsigned integers. In all cases this is either:
    
      * Useless, because the `+` sign was already rejected.
      * Erroneous and inconsistent, when third party parsers reject it. (C.f. https://github.com/bitcoin/bitcoin/pull/32365)
      * Confusing, because the `+` sign is  neither documented, nor can it be assumed to be present.
    
      Fix all issues by removing the legacy int parsing.
    
    ACKs for top commit:
      stickies-v:
        re-ACK faf55fc80b
      brunoerg:
        code review ACK faf55fc80b11f3d9b0b12c1b26a9612ea9ce9b40
    
    Tree-SHA512: a311ab6a58fe02a37741c1800feb3dcfad92377b4bfb61b433b2393f52ba89ef45d00940972b2767b213a3dd7b59e5e35d5b659c586eacdfe4e565a77b12b19f
    ff0060c3be
  9. 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...
    26897857ef
  10. 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...
    25bfc72407
  11. D33r-Gee force-pushed on May 20, 2025
  12. DrahtBot removed the label Needs rebase on May 20, 2025
  13. DrahtBot added the label Needs rebase on May 27, 2025
  14. DrahtBot commented at 11:47 pm on May 27, 2025: contributor

    🐙 This pull request conflicts with the target branch and needs rebase.


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-31 18:20 UTC

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