Indexes

PRPriorityReviewabilityReviewsAgreementSize
(+)#26966 furszy index: initial sync speedup, parallelize process
  • Speed up initial construction of optional indexes by processing blocks in parallel across worker threads
  • Dramatically cut the hours needed to build block filters and transaction indexes on multi-core systems
P2 · speedup
  • P2 because initial index builds take hours and tests show multi-fold speedups for block filters
  • It provides durable value for index sync and lays groundwork for batched database writes
Rebase after #33689
  • Review #33689 first
  • Drafted by the author and needs rebase
0 (+1) -1
Disputed
  • Strong support for parallelizing sync, but contested over diff complexity and txindex regressions
  • Concept approval for the design and approach (ryanofsky)
  • Verified sync time dropped from over 48 hours to 16 hours in testing (pinheadmz)
  • Approach objection over diff complexity and performance regressions on txindex (l0rinc)
  • Observed slight txindex slowdowns on SSD and questioned parallelizing it (andrewtoth)
569 + 462 tests
  • 569 lines added or modified outside tests
  • 462 lines added or modified in tests
  • 153 lines removed in total
  • 14 files, 11 commits
(+)#36002 andrewtoth txindex: allow running in pruned mode
  • Allow pruned nodes to run txindex without keeping full raw block history on disk
  • Let users look up transaction block hashes and fetch missing blocks on demand
  • Enable indexing on already pruned nodes without redownloading past history
P2 · new feature
  • P2 because it unlocks transaction indexing for users unable to store full block data
  • Removes a long-standing barrier for resource-constrained node operators
  • Delivers durable value by letting indexes start on already pruned nodes
Ready
  • Ready to review
  • The author is actively addressing questions and CI is passing
0
Strong
  • Strong concept support for enabling txindex on pruned nodes
  • Enthusiastic concept approval (l0rinc)
  • Concept approval with discussion on partial history disk usage (ajtowns)
  • Suggests returning structured RPC data and unifying index state enums (arejula27)
176 + 195 tests
  • 176 lines added or modified outside tests
  • 195 lines added or modified in tests
  • 86 lines removed in total
  • 23 files, 7 commits
(+)#34489 furszy index: batch db writes during initial sync
  • Speed up initial sync of optional indexes by batching database writes across block ranges
  • Reduce heavy disk I/O and cs_main lock contention that degrades overall node responsiveness
P2 · speedup
  • P2 because it speeds up initial index sync by 11% to 27% on spinning disks
  • Significantly reduces database file churn and lock contention for node operators running indexes
  • Unblocks foundational architecture needed for parallel index processing
Needs rebase
  • Needs rebase due to merge conflicts and recent architectural changes to indexes
0 (+1)
Blocked
  • Concept supported for batching writes and preparing parallel index sync (arejula27, polespinasa, l0rinc)
  • Blocking objection: interrupts can save advanced in-memory state with stale locators (l0rinc)
  • Author acknowledged the race condition and plans to resolve it alongside the rebase (furszy)
+300/-74
  • 11 files
  • 10 commits
(+)#24230 ryanofsky indexes: Stop using node internal types and locking cs_main, improve sync logic
  • Prevent lock contention by stopping indexes from holding the main lock during sync and startup
  • Decouple optional indexes from node internal types so they can eventually run in separate processes
P2 · unblocks #10102
  • P2 because it eliminates main lock contention during index synchronization and startup
  • Decouples optional indexes from internal validation types to unblock running them out of process
Needs rebase
  • Needs rebase due to merge conflicts with current master
0
Strong
  • Broad concept and approach support across multiple maintainers with all code concerns resolved
  • Approach support for separating internal types toward multiprocess architecture (sedited)
  • Concept support verified through detailed testing across commits (mzumsande, josibake)
  • Concept approval without stated reasons (fjahr, aureleoules)
  • Resolved race conditions and crash on block invalidation during sync (mzumsande, furszy)
937 + 201 tests
  • 937 lines added or modified outside tests
  • 201 lines added or modified in tests
  • 577 lines removed in total
  • 42 files, 18 commits
(+)#35474 w0xlt node: move index ownership to NodeContext
  • Make index lifecycles explicit during node startup and shutdown
  • Help future work on running multiple node instances or separating processes
P3 · cleanup
  • P3 because removing global index state clarifies component lifetimes
  • Destruction order is bound directly to node context teardown
Ready
  • Ready to review with clean CI and no author blockers
0
Positive
  • Generally positive sentiment with no objections
  • Concept approval without stated reasons (sedited, fjahr)
  • Clarified relationship with concurrent index changes without dispute (Sjors)
231 + 24 tests
  • 231 lines added or modified outside tests
  • 24 lines added or modified in tests
  • 175 lines removed in total
  • 27 files, 5 commits
(+)#35728 maflcko rpc: Properly throw on internal I/O errors in GetTransaction
  • Prevent RPC and REST from falsely reporting confirmed transactions as missing when disk reads fail
  • Alert users and callers to internal storage faults instead of misleading them into thinking a tx is absent
P3 · cleanup
  • P3 because it cleanly separates missing index records from disk read or deserialization failures
  • Stops callers from mistaking index corruption or storage faults for absent keys
Needs rebase
  • Needs rebase due to merge conflicts, and the author has been silent for two months
0
Mild
  • Concept approval for separating missing transactions from internal read errors (yuvicc, musaHaruna)
  • Unaddressed objection: pruned blocks may return an I/O error instead of block not available (yuvicc)
46 + 62 tests
  • 46 lines added or modified outside tests
  • 62 lines added or modified in tests
  • 41 lines removed in total
  • 10 files, 3 commits
(+)#35229 optout21 refactor: Use CBlockIndex parameters as reference
  • Prevent accidental null dereferences by enforcing non-null invariants at compile time
  • Protects developers from runtime null errors across chain and index logic
P4 · cleanup
  • P4 because method signature changes here have no impact on index correctness or sync speed
  • Provides only minor maintainability value without altering how block filters or indexes run
Author silent
  • Author has been silent for 113 days, exceeding the stale author threshold
  • Reviewing now may be unproductive until the author returns to address feedback
0
Strong
  • Concept approved with broad agreement and no objections raised
  • Support for compile-time safety and clearer non-null guarantees (musaHaruna)
  • Concept approval without stated reasons (stickies-v, w0xlt)
  • Suggested using reference wrappers for internal chain storage (maflcko)
71 + 7 tests
  • 71 lines added or modified outside tests
  • 7 lines added or modified in tests
  • 68 lines removed in total
  • 12 files, 7 commits
Reviewability: ReadyStalePaused
Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets
Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs.
Size: lines added or modified outside tests, then in tests; greener = smaller.
Ranking pass (2026-09-17): all PRs here were compared with each other; 4 notes on review order, overlaps, and band changes.

Covers

The optional indexes under src/index/: txindex, blockfilterindex (BIP 157/158 filters), coinstatsindex, and the base index framework they share (BaseIndex, index synchronization and its performance, index locking and threading). Plus the RPCs and tests that exist only for these indexes.

Not indexes: the mandatory structures the node cannot run without. The UTXO database and coins cache (src/txdb, src/coins), the block index and block tree database, block and undo file storage (src/node/blockstorage), pruning, and the database wrapper (src/dbwrapper, LevelDB) are all validation, whatever their names suggest. The maintainers' "UTXO Db and Indexes" label covers both groups, so it is not evidence of membership here on its own; the "Block storage" label is validation.

What matters here

Data integrity first: an optional index that silently returns wrong answers or corrupts on crash is worse than no index, and BIP 157 filters are served to light clients. Then correctness under reorgs and during initial sync. Then sync time and resource use, which users of these indexes feel directly (initial txindex and filter builds take hours). Then decoupling the index framework from node internals so indexes can be maintained and tested independently. Then new index types with a stated consumer.

Refactors count when they remove a shared-lock dependency or a correctness hazard; moving code around does not.

generated 2026-09-17 21:55 UTC