After mining a correct nonce on the block template (received from rpc method "getblocktemplate") you need to submit the block back to the daemon. However, the rpc method "submitblock" appears to require the entire block blob. The template does not contain the entire block, just the parts necessary for mining. And I don't see any way to derive the full block information from the template to create the block blob.
So how do I mine on the template and then submit the full block back to the daemon?
blocktemplate_blob
is a block header. – glv Nov 06 '17 at 18:18Edit: The tree hash is tacked onto the end. So when the code parses the blob, its going to attempt to parse an entire block, and then run into the tree hash, right? – The Shoe Shiner Nov 06 '17 at 18:20
blockhashing_blob
contains the transaction tree hash root (because it's a preprocessed block header), but theblocktemplate_blob
doesn't (because it is a raw block header). When you submit theblocktemplate_blob
updated with your nonce, the daemon processes it, check if it is valid and sends it to the network if it is. – glv Nov 06 '17 at 18:32