tradecraftio / tradecraft

Tradecraft integration/staging tree https://tradecraft.io/download
Other
13 stars 9 forks source link

[Stratum] Use Merkle branches for fast recalculation of work units. #79

Closed maaku closed 4 years ago

maaku commented 4 years ago

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