Help Needed: Best Way to Get Historical Address Balances on Umbrel (scantxoutset with blockheight failing despite coinstatsindex=1)

Hi Umbrel Community,

I’m running Bitcoin Core 29.0.0 via the Bitcoin Node app on my Umbrel (Version: umbrelOS 1.4.2) on a Raspberry Pi 4. My node is fully synced, and I also have a fully synced Electrs server running as an app on the same Umbrel.

My Overall Goal: My primary objective is to perform a historical balance audit for a large personal set of my Bitcoin addresses (over 5,000 addresses across different categories). I need to find the balance for each address as it was on specific past dates (e.g., 12/31/22, 12/31/23, 12/31/24) by querying my own node data. This is for an automated script.

Method Attempted So Far (scantxoutset): I’ve been attempting to use the scantxoutset RPC command with specific blockheight parameters, as this seems like the most direct way to get the precise historical UTXO information from Bitcoin Core.

Steps Taken & Current Status with scantxoutset:

  1. Enabled coinstatsindex=1:
  • Successfully added coinstatsindex=1 to /home/umbrel/umbrel/app-data/bitcoin/data/bitcoin/bitcoin.conf (placing it on a line before the includeconf=umbrel-bitcoin.conf directive).
  • debug.log confirms Config file arg: coinstatsindex="1" is loaded by Bitcoin Core on startup.
  1. Index Building:
  • Observed “Syncing coinstatsindex with block chain from height X” messages in debug.log for over 45 hours. These messages showed consistent progress and eventually stopped appearing regularly, suggesting the initial historical build (up to ~block 885,000+) completed. The node has been running with coinstatsindex=1 active for several days now (since May 21st).

What Works with scantxoutset:

  • The command scantxoutset start '["addr(MY_ADDRESS)"]' without a blockheight (which scans to the current chain tip) works perfectly and returns the expected JSON output with "success": true. This was tested successfully.

The Problem Persists with scantxoutset + blockheight:

  • Whenever I try to use scantxoutset start with a blockheight parameter, the command immediately fails, returning error code: -1 and the full help text for scantxoutset.
  • This failure has been consistent for:
    • A P2SH address (e.g., 3MqUP6G1daVS5YTD8fz3QgwjZortWwxXFd)
    • A P2WPKH address (e.g., bc1qe9devjmst3ruphj06gay5tvmpgjscjzcvp32el)
  • The failure occurs for various historical BLOCKHEIGHT values tested (e.g., 769786, 890000).
  • The debug.log shows no specific error messages at the moment these commands fail; Bitcoin Core just seems to reject the parameters at the validation stage. This issue is preventing me from automating the collection of historical balance data for my audit.

My Questions for the Community:

  1. Regarding scantxoutset with blockheight on umbrelOS 1.4.2 / Bitcoin Core 29.0.0:
  • Is this a known issue or limitation?
  • Is there a different or officially recommended method to ensure coinstatsindex=1 is not only enabled but also fully usable for historical scantxoutset queries, or any other prerequisite I might be missing specifically for this Umbrel environment?
  1. Open to Alternatives: Given my goal (historical balances for many addresses from my own node) and the fact I have a synced Electrs server:
  • If scantxoutset with blockheight is not currently viable on my setup, what would be the best alternative approach to achieve this?
  • Could my Electrs server be leveraged more effectively for this specific kind of historical point-in-time balance query, perhaps via its Electrum protocol RPC? If so, any pointers to how this is typically done would be appreciated.
  • Are there other tools or methods compatible with an Umbrel node that are better suited for this task?

I’m keen to find a working solution using my own node data. Any advice, insights, or suggestions on how to proceed would be incredibly helpful.

Thank you for your time and help!