Customizing a block template for a particular miner involves changing the coinbase outputs which causes the segwit commitment to be updated. Presently the stratum code makes a copy of the entire block before manipulating it, which would be expensive for large blocks. This commit changes that behavior to use pre-calculated Merkle branches for the coinbase and the block-final transaction, which massively reduces the cost of updating the block template for large blocks.
Customizing a block template for a particular miner involves changing the coinbase outputs which causes the segwit commitment to be updated. Presently the stratum code makes a copy of the entire block before manipulating it, which would be expensive for large blocks. This commit changes that behavior to use pre-calculated Merkle branches for the coinbase and the block-final transaction, which massively reduces the cost of updating the block template for large blocks.
Depends on #78