Closed Sjors closed 1 week ago
I dropped GetCoinBaseMerklePath
(which was introduced in https://github.com/bitcoin/bitcoin/pull/27854) in favor of our existing BlockMerkleBranch
. See updated PR description.
Fuzzer failure is because I haven't rebased past https://github.com/bitcoin/bitcoin/pull/30598
Rebased, but note that this doesn't build on cmake yet.
Builds on https://github.com/bitcoin/bitcoin/pull/30440
Because this new
BlockTemplate
interface causes the node to hold on to the template until the client releases it, there is now a more efficient way to communicate the block solution. Instead of having the send the full block, a client only needs to provide the nonce, timestamp, version fields and coinbase transaction.This PR introduces
submitSolution()
for that. It's currently unused.This PR also introduces
getCoinbaseMerklePath()
, which is needed in Stratum v2 to construct themerkle_path
field of theNewTemplate
message (see spec).This last function uses
BlockMerkleBranch
which was moved to the test code in #13191. The reason for moving was that it was no longer used. This PR moves it back.This PR does not change behaviour since both methods are unused.