Indexes

From claude-dev-suite/claude-dev-suite · View interactive version

Indexes is an AI agent skill from the GitHub repository claude-dev-suite/claude-dev-suite. Bitcoin Core indexes: txindex, blockfilterindex (BIP157/158), coinstatsindex, txospenderindex. Disk costs, rebuild times, when each is needed. USE WHEN: choosing which indexes to enable, troubleshooting "txid not found", integrating with electrs / fulcrum / LN nodes.

How to use this skill

Skill file

Bitcoin Core Indexes

Four optional indexes as of Bitcoin Core 31.1 (July 2026), in addition

to the always-on UTXO set:

txindex

txindex=1

Maps every txid to its block / position. Enables:

txindex, only mempool + recent blocks since restart).

Cost:

re-measured since. It stores one LevelDB record per txid, so it

scales with cumulative transaction count, not with block bytes:

991,029,144 transactions on 20 April 2024 vs 1,439,337,665 on

15 September 2026 (~45% more records), so budget roughly half

again as much at the current tip (height 967,284,

16 September 2026).

When to enable:

When to skip:

blockfilterindex (BIP157/158)

blockfilterindex=1
peerblockfilters=1   # serve filters to peers

Maintains compact block filters per block. Enables:

Cost:

block, so this one does scale with block data, which grew ~36%

from ~566 GB on 20 April 2024 to ~769 GB on 15 September 2026.

When to enable:

coinstatsindex

coinstatsindex=1

Maintains rolling stats for gettxoutsetinfo (UTXO set value, count,

hash) without a full scan.

Cost:

When to enable:

minutes and locks the wallet).

Without it, gettxoutsetinfo still works but does a full scan

on-demand → slow.

Upgrade note: Bitcoin Core 30.0 (October 2025) rewrote the index to fix

an overflow bug, and the rewritten index syncs from scratch on the first

start after the upgrade. It is stored at indexes/coinstatsindex/; the

pre-30.0 index at indexes/coinstats/ is deliberately left in place for

downgrades and must be deleted by hand to reclaim the space. Core logs a

warning naming the old directory on every start while it exists.

txospenderindex

txospenderindex=1

Added in Bitcoin Core 31.0 (April 2026); default off. Records, for every

non-coinbase input of every block transaction, which transaction spent

that outpoint.

Enables:

mempool ones. With the index available the RPC also returns the

blockhash of the spending block.

gettxspendingprevout gained two options in 31.0 alongside the index:

mempool_only (defaults to true only when the index is unavailable; set

false to fall through to the index) and return_spending_tx (returns

the full spending tx as spendingtx).

Cost:

key per non-coinbase transaction input, so it scales with the

cumulative input count of the chain, not with the UTXO set.

When to enable:

(explorers, forensics, watchtower-style tooling).

When to skip:

with -txospenderindex").

Combining

All four can be enabled together. Pruning is incompatible with txindex

and, since 31.0, with txospenderindex; blockfilterindex and

coinstatsindex both work on a pruned node.

Typical configurations:

| Use case | txindex | blockfilterindex | coinstatsindex | prune |

|----------|---------|------------------|----------------|-------|

| Personal wallet | no | no | no | optional |

| LN node (LDK) | no | yes | optional | no |

| LN node (LND/CLN) | no | optional | optional | no |

| Electrs/Fulcrum host | no | yes | optional | no |

| Block explorer | yes | yes | yes | no |

| Forensic / API | yes | optional | yes | no |

| Lightweight personal | no | no | no | yes (550-15000) |

Rebuilding

Adding txindex=1 to existing node:

# Stop node
bitcoin-cli stop
# Edit conf, add txindex=1
# Restart; node rebuilds index
bitcoind -daemon
# Watch
tail -f ~/.bitcoin/debug.log

Output:

2025-... reindex-chainstate already=true txindex=true blockfilterindex=true coinstatsindex=true
2025-... Building txindex
... (hours later) ...
2025-... txindex is enabled

To force rebuild from scratch: -reindex (full reindex, days) or

-reindex-chainstate (UTXO + indexes only, hours).

Index storage

Paths per doc/files.md at v31.1 (July 2026):

db/ LevelDB alongside them.

index lived at indexes/coinstats/).

Common bugs

index "stuck"; manually delete indexes/txindex/ to free disk.

blockfilterindex=1 are both set.

txindex.

indexes/coinstats/ is still there next to the new

indexes/coinstatsindex/; delete the old one once you are sure you

will not downgrade to 29.x or lower.

See also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.