029ba1a21dindex: remove CBlockIndex access from CustomAppend() (furszy)91b7ab6c69refactor: index, simplify CopyHeightIndexToHashIndex to process single block (furszy)6f1392cc42indexes, refactor: Remove remaining CBlockIndex* uses in index Rewind methods (Ryan Ofsky)0a248708dcindexes, refactor: Stop requiring CBlockIndex type to call IsBIP30Unspendable (Ryan Ofsky)331a25cb16test: indexes, avoid creating threads when sync runs synchronously (furszy) Pull request description: Combining common refactors from #24230 and #26966, aiming to move both efforts forward while reducing their size and review burden. Broadly, #24230 focuses on enabling indexes to run in a separate process, and #26966 aims to parallelize the indexes initial synchronization process. A shared prerequisite for both is ensuring that only the base index class interacts with the node’s chain internals - child index classes should instead operate solely through chain events. This PR moves disk read lookups from child index classes to the base index class. It also includes a few documentation improvements and a test-only code cleanup. ACKs for top commit: maflcko: review ACK029ba1a21d👡 achow101: ACK029ba1a21dTheCharlatan: Re-ACK029ba1a21ddavidgumberg: ACK029ba1a21dmzumsande: Code Review ACK029ba1a21dTree-SHA512: f073af407fc86f228cb47a32c7bcf2241551cc89ff32059317eb81d5b86fd5fda35f228d2567e0aedbc9fd6826291f5fee05619db35ba44108421ae04d11e6fb
Internal c++ interfaces
The following interfaces are defined here:
-
Chain— used by wallet to access blockchain and mempool state. Added in #14437, #14711, #15288, and #10973. -
ChainClient— used by node to start & stopChainclients. Added in #14437. -
Node— used by GUI to start & stop bitcoin node. Added in #10244. -
Handler— returned byhandleEventmethods on interfaces above and used to manage lifetimes of event handlers. -
Init— used by multiprocess code to access interfaces above on startup. Added in #19160. -
Ipc— used by multiprocess code to accessInitinterface across processes. Added in #19160.
The interfaces above define boundaries between major components of bitcoin code (node, wallet, and gui), making it possible for them to run in different processes, and be tested, developed, and understood independently. These interfaces are not currently designed to be stable or to be used externally.