[WIP] Add getCoinbaseMerklePath() to Mining interface #30441
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Builds on #30440.
This adds
getCoinbaseMerklePath()
to the Mining interface.Unlike the entire
Mining
interface so far, this is not a refactor. It adds new functionality.The Stratum v2 NewTemplate message is a short message intended to give miners something to do as quickly as possible. It does not include the serialized block transactions. In lieu of that it contains a
merkle_path
field.The reason this PR is WIP is that I haven't studied this protocol message in any detail. The implementation is copy-pasted from earlier versions of #29432 and it may be possible to reuse parts of
merkle_tests.cpp
.The main purpose of this PR is to provide a complete and stable Mining interface for #30437 to build on. This can then be used to develop a "sidecar" alternative to #29432. I'll get to improving the implementation later.