Have createNewBlock() return a BlockTemplate interface#30440
Have createNewBlock() return a BlockTemplate interface#30440achow101 merged 2 commits intobitcoin:masterfrom
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
b50f75d to
50afc30
Compare
|
🚧 At least one of the CI tasks failed. HintsMake sure to run all tests locally, according to the documentation. The failure may happen due to a number of reasons, for example:
Leave a comment here, if you need help tracking down a confusing failure. |
50afc30 to
b13eeda
Compare
|
In #29432 (comment) @TheBlueMatt wrote:
This PR returns a The goal is to be able to quickly send I assume your concern is that this would make I could make Would it need a way to unilaterally drop templates, or to tell the external application to pick which templates to drop? Benchmarks would be useful here. |
|
Pushed a commit that adds |
e24c853 to
b7b9ad8
Compare
|
🚧 At least one of the CI tasks failed. HintsMake sure to run all tests locally, according to the documentation. The failure may happen due to a number of reasons, for example:
Leave a comment here, if you need help tracking down a confusing failure. |
|
Also added |
b7b9ad8 to
3f2031c
Compare
3f2031c to
408c11e
Compare
Ah, okay, that was my only real concern. Sending transaction data with the nonce solution requires Bitcoin Core do a metric shitload of allocations and takes ~forever. My only concern was making sure Bitcoin Core held on to the |
ryanofsky
left a comment
There was a problem hiding this comment.
Light code review ACK 408c11e9bced08c51a7645a2de2c39c18e4360d9. This looks good, but I didn't review the getCoinbaseMerklePath implementation closely to check that it is computing the right thing.
408c11e to
1e8f33e
Compare
|
Rebased on the changes to #30356 and extracted |
ryanofsky
left a comment
There was a problem hiding this comment.
Code review ACK 1e8f33ec15bc468385b2807e42d60c841c407681
33f5ab3 to
23374a2
Compare
|
@ryanofsky I used the incantation suggested here: https://github.com/bitcoin/bitcoin/blob/master/contrib/devtools/README.md#clang-format-diffpy I assumed this would only edit lines impacted by the commit. But I see it touched a few other places in |
ryanofsky
left a comment
There was a problem hiding this comment.
Code review ACK 23374a22f442939802c0296d6447e0db02d513da. Just reined in clang-tidy since last review so there are fewer changes
Add interface changes from bitcoin#30409 bitcoin#30440 This commit changes the C++ Mining interface without changing the corresponding Capn'Proto interface. The capnp interface is updated the next commit.
Add interface changes from bitcoin#30409 bitcoin#30440 This commit updates the Cap'n Proto Mining interface after updating the C++ Mining interface last commit.
Add interface changes from bitcoin#30409 bitcoin#30440 This commit changes the C++ Mining interface without changing the corresponding Capn'Proto interface. The capnp interface is updated the next commit.
Add interface changes from bitcoin#30409 bitcoin#30356 bitcoin#30440 bitcoin#30443 This commit updates the Cap'n Proto Mining interface after updating the C++ Mining interface last commit.
itornaza
left a comment
There was a problem hiding this comment.
Concept ACK 23374a22f442939802c0296d6447e0db02d513da
Do you consider updating for cmake? It would be helpful for me to build and run tests locally.
An external program that uses the Mining interface may need quick access to some information in the block template, while it can wait a bit longer for the full raw transaction data. This would be the case for a Stratum v2 Template Provider which needs to send a NewTemplate message (which doesn't include transactions) as quickly as possible.
|
Rebased for cmake (no changes). |
23374a2 to
a93c171
Compare
itornaza
left a comment
There was a problem hiding this comment.
Code review ACK a93c171
Offering an option for the Template Provider to get block header data as soon as possible is a great addition.
Code changes look straight forward. Also, built the pr and successfully run all tests on it locally.
|
ACK a93c171 It seems like |
Add interface changes from bitcoin#30409 bitcoin#30440 This commit changes the C++ Mining interface without changing the corresponding Capn'Proto interface. The capnp interface is updated the next commit.
Add interface changes from bitcoin#30409 bitcoin#30440 This commit updates the Cap'n Proto Mining interface after updating the C++ Mining interface last commit.
Add interface changes from bitcoin#30409 bitcoin#30440 This commit changes the C++ Mining interface without changing the corresponding Capn'Proto interface. The capnp interface is updated the next commit.
Add interface changes from bitcoin#30409 bitcoin#30440 This commit updates the Cap'n Proto Mining interface after updating the C++ Mining interface last commit.
Suggested in #29432 (comment)
An external program that uses the Mining interface may need quick access to some information in the block template, while it can wait a bit longer for the full raw transaction data.
This would be the case for a Stratum v2 Template Provider which needs to send a NewTemplate message message (which doesn't include transactions) as quickly as possible. It does not include the serialized block transactions.