QML Load UTXO Snapshot #485

Closed
D33r-Gee wants to merge 3 commits from qml-snapshot-load into qt6 AGit
D33r-Gee commented 2025-07-30 17:42:24 +00:00 (Migrated from github.com)

This is an re-opened PR based on #424 and #449

UTXO Snapshot Loading

Overview

This PR enables loading UTXO snapshots both during and after the initial onboarding process.

What This PR Does

  1. Adds a basic GUI interface for loading UTXO snapshots via the Connection Settings panel
  2. Enables snapshot selection during onboarding, with loading when headers are synced
  3. Implements non-blocking snapshot loading via QT Thread
  4. Provides visual confirmation of snapshot activation
  5. Adds a snapshot progress notifications accessible via a handler
  6. it adds a patch to the bitcoin submodule to expose snapshot loading functionality to the GUI via the interface system

Implementation Details

Core Components Modified

  1. CPP Backend (qml/models/nodemodel.cpp)
  • Manages snapshot loading state and progress
  • Uses Qt's thread system to prevent UI blocking
  • Provides progress updates via Qt signals
  • Adds support for storing snapshot file path during onboarding
  • Implements automatic snapshot loading once headers are synced
  1. UI Components (qml/components/SnapshotLoadSettings.qml, src/qml/components/ConnectionSettings.qml)
  • File selection dialog with onboarding awareness
  • Snapshot verification status
  • Progress tracking and visualization
  • Updated visibility conditions to enable loading during onboarding
  1. Snapshot Qml Model (qml/models/snapshotqml.cpp)
  • Introduces a worker class to manage snapshot metadata

Key Design Decisions

  1. Onboarding Integration
  • Allows users to select snapshot during setup
  • Delayed loading until headers are synced
  • Proper state handling between onboarding and regular modes

Testing Instructions

  1. Build
  2. Launch Bitcoin Core QML GUI
  3. Navigate to Connection Settings
  4. Test with different snapshots:
mainnet: magnet:?xt=urn:btih:559bd78170502971e15e97d7572e4c824f033492&dn=utxo-880000.dat&tr=udp%3A%2F%2Ftracker.bitcoin.sprovoost.nl%3A6969

alternatively, you can use the following link to download the mainnet snapshot: https://bitcoin-snapshots.jaonoctus.dev/

signet: https://drive.google.com/file/d/1VJeeGQncrs4xZhh6kU5IwkyatXVM4SOm/view?usp=sharing
  1. Test onboarding flow:

    • Select a snapshot file during initial setup
    • Verify it loads automatically after headers sync
  2. Verify (see screenshots below):

    • "Snapshot Loaded" confirmation appears
    • For errors, check debug.log for [snapshot]
Ubuntu 22.04 Screenshots

Screenshot 2025-05-05 154558
Screenshot 2025-05-05 154615
qt6_loading_snapshot_dialog
Screenshot 2025-05-05 154703
Screenshot 2025-05-05 154720
Screenshot 2025-07-30 103140

Expected Behavior

  • File selection dialog works
  • Node becomes usable while background validation continues
  • When selected during onboarding, snapshot loads after headers sync
Success/failure state properly displayed Screenshot 2025-07-30 101752

feedback welcome on the approach and implementation details.

This is an re-opened PR based on #424 and #449 # UTXO Snapshot Loading ## Overview This PR enables loading UTXO snapshots both during and after the initial onboarding process. ## What This PR Does 1. Adds a basic GUI interface for loading UTXO snapshots via the Connection Settings panel 2. Enables snapshot selection during onboarding, with loading when headers are synced 3. Implements non-blocking snapshot loading via QT Thread 4. Provides visual confirmation of snapshot activation 5. Adds a snapshot progress notifications accessible via a handler 6. it adds a patch to the bitcoin submodule to expose snapshot loading functionality to the GUI via the interface system ## Implementation Details ### Core Components Modified 1. **CPP Backend** (`qml/models/nodemodel.cpp`) - Manages snapshot loading state and progress - Uses Qt's thread system to prevent UI blocking - Provides progress updates via Qt signals - Adds support for storing snapshot file path during onboarding - Implements automatic snapshot loading once headers are synced 2. **UI Components** (`qml/components/SnapshotLoadSettings.qml`, `src/qml/components/ConnectionSettings.qml`) - File selection dialog with onboarding awareness - Snapshot verification status - Progress tracking and visualization - Updated visibility conditions to enable loading during onboarding 3. **Snapshot Qml Model** (qml/models/snapshotqml.cpp) - Introduces a worker class to manage snapshot metadata ### Key Design Decisions 1. **Onboarding Integration** - Allows users to select snapshot during setup - Delayed loading until headers are synced - Proper state handling between onboarding and regular modes ## Testing Instructions 1. Build 2. Launch Bitcoin Core QML GUI 3. Navigate to Connection Settings 5. Test with different snapshots: ``` mainnet: magnet:?xt=urn:btih:559bd78170502971e15e97d7572e4c824f033492&dn=utxo-880000.dat&tr=udp%3A%2F%2Ftracker.bitcoin.sprovoost.nl%3A6969 alternatively, you can use the following link to download the mainnet snapshot: https://bitcoin-snapshots.jaonoctus.dev/ signet: https://drive.google.com/file/d/1VJeeGQncrs4xZhh6kU5IwkyatXVM4SOm/view?usp=sharing ``` 7. Test onboarding flow: - Select a snapshot file during initial setup - Verify it loads automatically after headers sync 8. Verify (see screenshots below): - "Snapshot Loaded" confirmation appears - For errors, check debug.log for [snapshot] <details> <summary>Ubuntu 22.04 Screenshots</summary> ![Screenshot 2025-05-05 154558](https://git.fish.foo/attachments/1d2315c7-08c4-4ff9-af36-87325c6a4f59) ![Screenshot 2025-05-05 154615](https://git.fish.foo/attachments/6550e7c0-3642-45ed-8958-7f83803ab4e0) ![qt6_loading_snapshot_dialog](https://git.fish.foo/attachments/95f745fb-5e07-418e-9005-ca244d3cafca) ![Screenshot 2025-05-05 154703](https://git.fish.foo/attachments/224f78e7-8bf1-469b-a049-73295f9359de) ![Screenshot 2025-05-05 154720](https://git.fish.foo/attachments/358b7cf5-fcb9-417d-8739-ded84667654a) <img width="646" height="705" alt="Screenshot 2025-07-30 103140" src="https://git.fish.foo/attachments/89de30ec-dbe6-4be7-a115-f17eaee14720" /> </details> ### Expected Behavior - File selection dialog works - Node becomes usable while background validation continues - When selected during onboarding, snapshot loads after headers sync <details> <summary>Success/failure state properly displayed</summary> <img width="650" height="705" alt="Screenshot 2025-07-30 101752" src="https://git.fish.foo/attachments/b190387e-aea6-471d-8898-e5ff37b510e1" /> </details> feedback welcome on the approach and implementation details.
johnny9 (Migrated from github.com) requested changes 2025-07-31 01:44:03 +00:00
johnny9 (Migrated from github.com) commented 2025-07-31 01:42:49 +00:00

Remove the changes to the imageprovider as you shouldnt need to add each icon here anymore

Remove the changes to the imageprovider as you shouldnt need to add each icon here anymore
D33r-Gee (Migrated from github.com) reviewed 2025-07-31 17:44:32 +00:00
D33r-Gee (Migrated from github.com) commented 2025-07-31 17:44:32 +00:00

addressed with 050fa0e

addressed with [050fa0e](https://github.com/bitcoin-core/gui-qml/commit/050fa0ed3d4584e8518a1f3f00aee0dac96bddc8)
D33r-Gee commented 2025-07-31 17:46:50 +00:00 (Migrated from github.com)

with 050fa0e addressed @johnny9 comment to remove unnecessary icon descriptions

with [050fa0e](https://github.com/bitcoin-core/gui-qml/commit/050fa0ed3d4584e8518a1f3f00aee0dac96bddc8) addressed @johnny9 comment to remove unnecessary icon descriptions
D33r-Gee commented 2025-08-04 14:03:04 +00:00 (Migrated from github.com)

moved this to #488

moved this to #488
Sign in to join this conversation.
No description provided.