#33117 Interfaces: Expose UTXO Snapshot Loading and Add Progress Notifications

full analysis

https://github.com/bitcoin/bitcoin/pull/33117 · D33r-Gee · +129/-21 in 10 files, 3 commits · labels: Needs rebase, IPC

Goal

  • Allow GUI clients to trigger UTXO snapshot loading and display real-time progress feedback to users

Adds a new `interfaces::Snapshot` interface and progress notification signals to `interfaces::Node` and `kernel::Notifications`. Refactors `loadtxoutset` to utilize this new interface and consolidates snapshot activation failure handling under a unified RPC error format.

Problem: The node interface and kernel notifications lack methods to trigger UTXO snapshot activation and report progress, preventing GUI clients (both Qt and QML) from offering snapshot loading with real-time user feedback.

Category: IPC / multiprocess (#8 of 20)

P3 · new feature

  • P3 because it exposes snapshot loading and progress notifications across process boundaries
  • Directly unblocks GUI snapshot loading implementations in downstream pull requests

Exposes UTXO snapshot loading and progress notification signals over the interfaces boundary, designed with multiprocess separation in mind (avoiding cross-process file descriptor handling). This directly unblocks GUI snapshot integration in downstream PRs.

Membership: Touches src/interfaces/node.h and introduces src/interfaces/snapshot.h for process-separated communication.

Factors: security/stability 0, bug 0, performance 0, user value 1, leverage 2

Category: Kernel (libbitcoinkernel) (#12 of 18)

P4 · new feature

  • P4 because it is only a minor pass-through callback addition to kernel notifications
  • Limited to forwarding snapshot progress updates out of validation

Adds a single notification callback method to kernel notifications to pass progress updates out of validation. It is a minor pass-through addition to the kernel boundary.

Membership: Adds snapshotLoadProgress to src/kernel/notifications_interface.h and implements it in src/node/kernel_notifications.h.

Factors: security/stability 0, bug 0, performance 0, user value 0, leverage 1

Category: RPC / REST / ZMQ (#43 of 52)

P4 · cleanup

  • P4 because it only refactors loadtxoutset to use the new interface and standardizes error codes
  • Adds no new RPC features or user-facing functional changes

Refactors loadtxoutset to call the new snapshot interface instead of directly calling ChainstateManager. The change standardizes error handling to RPC_INTERNAL_ERROR (-32603) for snapshot loading failures, but adds no new RPC features.

Membership: Refactors loadtxoutset RPC implementation in src/rpc/blockchain.cpp and alters error return codes.

Factors: security/stability 0, bug 0, performance 0, user value 0, leverage 0

Reviewability: Stale: Needs rebase

  • Needs rebase due to merge conflicts with master

The PR has merge conflicts with master (mergeable_state is dirty) and needs a rebase.

Author status: Active, periodically rebasing and addressing inline feedback

Resolved concerns:

  • Ryanofsky noted that passing file handles across process boundaries complicates IPC; author revised the API to take an fs::path and encapsulate file parsing inside SnapshotImpl.
  • Pinheadmz pointed out that firing progress notifications for every coin would trigger 100M+ times on mainnet; author batched updates to fire every 100,000 coins.
  • Pinheadmz identified redundant pre-parsing of metadata in RPC loadtxoutset; author streamlined activate() to return util::Result<const CBlockIndex*> and unified error handling.

Agreement: Strong

  • Strong consensus on concept and approach with all architectural concerns resolved
  • Verified snapshot loading using downstream QML GUI (pinheadmz) and current GUI (Sjors)
  • Approach approval (sedited)

Strong consensus on concept and approach with all architectural and review comments addressed.

Multiple maintainers and contributors supported the concept and tested downstream GUI implementations (pinheadmz, Sjors, sedited). Design and performance concerns raised by ryanofsky and pinheadmz were resolved.

  • pinheadmz: 'concept ACK, tested the mainnet snapshot load with the QML gui branch built on top of this'
  • sedited: 'Approach ACK'
  • Sjors: 'At first glance this looks very reasonable. I also tested it in the (current) GUI'
  • pinheadmz: 'code review ACK at d0c32c28e5 ... This is an important feature to expose to GUI users, and this is the right way to get there.'

Review verdicts (DrahtBot): 0 (+1)

Dependencies

Files

4 lines under test/bench/ci.

  • src/node/interfaces.cpp +55/-0
  • src/interfaces/snapshot.h +36/-0
  • src/rpc/blockchain.cpp +10/-19
  • src/interfaces/node.h +9/-0
  • src/validation.cpp +6/-0
  • src/node/kernel_notifications.cpp +5/-0
  • test/functional/feature_assumeutxo.py +2/-2
  • src/node/interface_ui.h +3/-0
  • src/node/kernel_notifications.h +2/-0
  • src/kernel/notifications_interface.h +1/-0

Card

Adds a snapshot interface to interfaces::Node and kernel notifications to support UTXO snapshot loading and progress updates. Solves the absence of progress reporting and interface support needed by GUI implementations loading assumeutxo snapshots, unblocking downstream PRs in both the Qt and QML GUI repositories. Reviewers strongly support the concept and approach, and earlier design feedback regarding multiprocess file handling has been incorporated. The PR currently needs a rebase against master before review can conclude.

Data

dossier JSON · extract JSON · model openrouter/google/gemini-3.8-flash, generated 2026-09-17T16:16, confidence high, input hash e9bf6dd7591dfde8