75929b11eddoc: add release note for submitSolution IPC changes (woltx)ed75d70fdbrefactor: centralize SubmitBlock result handling (w0xlt)cbaa1696f3mining: add reason and debug output to submitSolution (w0xlt)83f3bc002dmining: clarify SubmitBlock result handling (w0xlt) Pull request description: `BlockTemplate.submitSolution` currently returns only a boolean, so IPC mining clients cannot determine why a submission failed without inspecting Bitcoin Core's debug log. Returning `reason` and `debug`, as `Mining.submitBlock` already does, lets callers distinguish a concrete block rejection from a duplicate or inconclusive result. Here, `inconclusive` means the method returns failure, but validation did not determine that the submitted block is invalid. This follow-up was suggested during the review of #34644: https://github.com/bitcoin/bitcoin/pull/34644#discussion_r2853758006 This PR: - Extracts a shared `SubmitBlock` helper that wraps `ProcessNewBlock` with `SubmitBlockStateCatcher` to capture `BlockValidationState` - Adds `reason` and `debug` output parameters to `submitSolution`, matching `submitBlock` - Makes both methods delegate to the same helper, eliminating duplicated logic ACKs for top commit: optout21: ACK75929b11edachow101: light ACK75929b11edSjors: ACK75929b11edenirox001: ACK75929b11edsedited: ACK75929b11edTree-SHA512: 31b1c305c20aaebdfa2d887665d9927830d0f97ba3c3469e2792148ad799d5a400a000cc0ca0b9add071d314e27c9da44d55228c442533a32a7c031678b78a55
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. -
Rpc— used bybitcoin-clito be able to call RPC methods over a unix socket instead of TCP.
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.