rpc: Add submit option to generateblock #18933
pull maflcko wants to merge 2 commits into bitcoin:master from maflcko:2004-rpcBlock changing 3 files +29 −14-
maflcko commented at 2:18 pm on May 10, 2020: memberWhen submit is turned off, a block can be generated and returned as hex, to be used for further tests. For example, it can be submitted on a different node, on a different interface (like p2p), or just never submitted and be used for other testing purposes.
-
maflcko commented at 2:20 pm on May 10, 2020: member
Requested by @instagibbs, I believe, in comment #17693 (review)
This work is based on the
generateblock
RPC added by @andrewtoth in #17693 -
maflcko added the label Tests on May 10, 2020
-
andrewtoth commented at 4:35 pm on May 10, 2020: contributor
generatetodescriptor
will be available for at least 2 releases. Is there any concern that other users will depend on it? I suppose workarounds for it are easy enough. -
in doc/release-notes.md:107 in fa872b5f6e outdated
103@@ -104,6 +104,9 @@ Low-level changes 104 Tests 105 ----- 106 107+- The `genereratetodescriptor` RPC has been removed and replaced by the
jonatack commented at 4:46 pm on May 10, 2020:s/genereratetodescriptor/generatetodescriptor/
maflcko commented at 4:55 pm on May 10, 2020:Thanks, fixed.maflcko commented at 4:47 pm on May 10, 2020: memberIf anyone was quick enough to addgeneratetodescriptor
to their test scripts, they are surely quick enough to pull it out again the next time they update their node to a new major version.jonatack commented at 4:48 pm on May 10, 2020: contributorDoes removing the generatetodescriptor RPC require a deprecation cycle?maflcko commented at 4:53 pm on May 10, 2020: memberDoes removing the generatetodescriptor RPC require a deprecation cycle?
I’d say no, because it is only used for testing. See also #18933 (comment)
maflcko force-pushed on May 10, 2020andrewtoth commented at 5:50 pm on May 10, 2020: contributorI haven’t usedgeneratetodescriptor
myself, but I would imagine a use case would be to mine transactions in the mempool with it. Withgenerateblock
a user has to manually add alltxid
s to get the same functionality. If we are replacing it, should we also add an option togenerateblock
to mine the mempool?maflcko force-pushed on May 10, 2020maflcko commented at 6:23 pm on May 10, 2020: memberOk, that can be done as a follow-up. Dropped the last commit faefc219b63825b3393ccea683645ecbbac0e169 because it was too controversial.DrahtBot commented at 9:36 pm on May 10, 2020: contributorThe following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviews
See the guideline for information on the review process.
Type Reviewers ACK TheCharlatan, instagibbs If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Conflicts
No conflicts as of last run.
in src/rpc/mining.cpp:1203 in fa58b4cd18 outdated
1199@@ -1187,7 +1200,7 @@ static const CRPCCommand commands[] = 1200 1201 { "generating", "generatetoaddress", &generatetoaddress, {"nblocks","address","maxtries"} }, 1202 { "generating", "generatetodescriptor", &generatetodescriptor, {"num_blocks","descriptor","maxtries"} }, 1203- { "generating", "generateblock", &generateblock, {"output","transactions"} }, 1204+ { "generating", "generateblock", &generateblock, {"output","transactions","submit"} },
instagibbs commented at 2:20 pm on May 11, 2020:Also should be added to “src/rpc/client.cpp” to be parsed as non-string on -cli, right?
instagibbs commented at 2:25 pm on May 11, 2020:oh nice, will review
maflcko commented at 4:53 pm on December 15, 2021:Thanks, fixed.instagibbs commented at 2:21 pm on May 11, 2020: memberACK aside from the json questionandrewtoth commented at 3:25 am on May 12, 2020: contributorThe comment this is based on (https://github.com/bitcoin/bitcoin/pull/17693#discussion_r393727104) suggests to bypass validity check. However, https://github.com/bitcoin/bitcoin/pull/18933/files#diff-9651347c8e00bed3ddc7631de569406dL364 still does that. Do we want to skip that check as well?DrahtBot added the label Needs rebase on May 23, 2020maflcko force-pushed on Dec 15, 2021DrahtBot removed the label Needs rebase on Dec 15, 2021maflcko force-pushed on Dec 15, 2021maflcko force-pushed on Dec 15, 2021DrahtBot added the label Needs rebase on Feb 21, 2022maflcko force-pushed on Feb 22, 2022DrahtBot removed the label Needs rebase on Feb 22, 2022DrahtBot added the label Needs rebase on Mar 25, 2022maflcko force-pushed on Mar 30, 2022DrahtBot removed the label Needs rebase on Mar 30, 2022maflcko force-pushed on Mar 31, 2022DrahtBot added the label Needs rebase on Apr 6, 2022maflcko force-pushed on Apr 6, 2022DrahtBot removed the label Needs rebase on Apr 6, 2022DrahtBot added the label Needs rebase on May 13, 2022maflcko force-pushed on May 13, 2022DrahtBot removed the label Needs rebase on May 13, 2022DrahtBot added the label Needs rebase on May 20, 2022maflcko force-pushed on May 27, 2022DrahtBot removed the label Needs rebase on May 27, 2022DrahtBot added the label Needs rebase on Aug 30, 2022achow101 commented at 6:08 pm on October 12, 2022: memberClosing this as it has not had any activity in a while. If you are interested in continuing work on this, please leave a comment so that it can be reopened.achow101 closed this on Oct 12, 2022
maflcko reopened this on Mar 10, 2023
maflcko force-pushed on Mar 10, 2023refactor: Replace block_hash with block_out fab9a08e14rpc: Add submit option to generateblock fa18504d57maflcko force-pushed on Mar 10, 2023maflcko commented at 10:02 am on March 10, 2023: memberDo we want to skip that check as well?
Should be trivial to add in a follow-up with a one-line patch, if and when needed?
DrahtBot removed the label Needs rebase on Mar 10, 2023TheCharlatan approvedTheCharlatan commented at 10:14 am on March 21, 2023: contributortACK fa18504d5767a40dc9827fb081633219bf251001fanquake requested review from instagibbs on Mar 23, 2023fanquake requested review from pinheadmz on Mar 23, 2023instagibbs commented at 12:21 pm on March 23, 2023: memberACK fa18504d5767a40dc9827fb081633219bf251001DrahtBot removed review request from instagibbs on Mar 23, 2023fanquake merged this on Mar 23, 2023fanquake closed this on Mar 23, 2023
maflcko deleted the branch on Mar 23, 2023sidhujag referenced this in commit caceb360ad on Mar 23, 2023bitcoin locked this on Mar 22, 2024
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-01-22 03:12 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-01-22 03:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me