Unlike the submitblock
RPC which takes a fully serialized block, when a block solution is received via IPC the client only provides the nonce, coinbase and a few other fields to submitSolution()
. It may not have all the information it needs to reconstruct the block. This makes debugging difficult when the block is invalid.
This commit therefore logs the fully serialized block if it’s rejected. This is in addition to the failure reason logged by ProcessNewBlock()
.
Example on a custom signet:
02025-09-12T09:18:32Z [error] ProcessNewBlock: AcceptBlock FAILED (bad-signet-blksig, signet block signature validation failure)
12025-09-12T09:18:32Z 000000204c002429741856d602d981fc9b8868d4cfe53d26f10ec5bed90186dbe2000000be72ddf01d23f7f1c3c165276c457b7a41bc0bac7b67096be4dd48e42d41612e6be5c368ae77031ef134b9a401020000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff36016200112f536a6f72736e61646f20506f6f6c2f2f20000100000000000000000000000000000000000000000000000000000000000100000000010000000000000000225120f140a01a8eed90d0d410af4e25eeca9c313915d2245e0f12321493d63b8be8550120000000000000000000000000000000000000000000000000000000000000000000000000
On mainnet this would be a huge message, but the IPC connection is trusted.