Review report

core: PR #29409

๐ŸŸ  Major

Look up the enclosing FoundBlock (src/ipc/capnp/chain.cpp:75, head)

When reader.hasNextBlock() is true, this branch recurses without calling find() for the enclosing found_block; the callback runs only for the deepest nested block. The nested object gets the lookup for the requested hash, but the enclosing result remains not found. On the client, CustomReadMessage returns immediately for that enclosing result, so it copies neither the requested fields nor the nested fields. A caller such as the wallet's QueueNextBlock, which requests nextBlock, then sees the default false active-chain result and can abort a rescan. Look up the enclosing block as well as serializing any nested result independently.

๐ŸŸก Minor

Name the ancestry output for the cluster count (src/ipc/capnp/chain.capnp:54, head)

interfaces::Chain::getTransactionAncestry supplies cluster_count as its second output, and the node implementation forwards that value. Naming the corresponding wire field descendants makes Cap'n Proto clients interpret a cluster count as a descendant count, though the quantities need not match. Name the field clusterCount or explicitly map it to cluster_count so the wire API describes the returned value.

๐Ÿ’ก Suggestion

Test Chain marshalling across IPC (src/ipc/capnp/chain.cpp:100, head)

The FoundBlock conversion is hand-written, but the existing functional IPC test does not call makeChain, so the in-process interface tests do not exercise this conversion or its wire results. Add a cross-process Chain test that checks a FoundBlock result, including a nextBlock request, to catch regressions in the new serialization path while preserving existing Chain behavior.

Review coverage was incomplete. The adversarial review had incomplete evidence. The adversarial_glm review did not complete. The build review had incomplete evidence.