Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented May 10, 2020

When 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
Copy link
Member Author

maflcko commented May 10, 2020

Requested by @instagibbs, I believe, in comment #17693 (comment)

This work is based on the generateblock RPC added by @andrewtoth in #17693

@maflcko maflcko added the Tests label May 10, 2020
@andrewtoth
Copy link
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.

@maflcko
Copy link
Member Author

maflcko commented May 10, 2020

If anyone was quick enough to add generatetodescriptor 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.

Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does removing the generatetodescriptor RPC require a deprecation cycle?

@maflcko
Copy link
Member Author

maflcko commented May 10, 2020

Does removing the generatetodescriptor RPC require a deprecation cycle?

I'd say no, because it is only used for testing. See also #18933 (comment)

@andrewtoth
Copy link
Contributor

I haven't used generatetodescriptor myself, but I would imagine a use case would be to mine transactions in the mempool with it. With generateblock a user has to manually add all txids to get the same functionality. If we are replacing it, should we also add an option to generateblock to mine the mempool?

@maflcko
Copy link
Member Author

maflcko commented May 10, 2020

Ok, that can be done as a follow-up. Dropped the last commit faefc21 because it was too controversial.

@DrahtBot
Copy link
Contributor

DrahtBot commented May 10, 2020

The 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.

Copy link
Member

@instagibbs instagibbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK aside from the json question

@andrewtoth
Copy link
Contributor

andrewtoth commented May 12, 2020

The comment this is based on (#17693 (comment)) 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?

@achow101
Copy link
Member

Closing 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 achow101 closed this Oct 12, 2022
@maflcko maflcko reopened this Mar 10, 2023
@maflcko
Copy link
Member Author

maflcko commented Mar 10, 2023

Do 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?

Copy link
Contributor

@TheCharlatan TheCharlatan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK fa18504

@instagibbs
Copy link
Member

ACK fa18504

@DrahtBot DrahtBot removed the request for review from instagibbs March 23, 2023 12:21
@fanquake fanquake merged commit 8acfb1f into bitcoin:master Mar 23, 2023
@maflcko maflcko deleted the 2004-rpcBlock branch March 23, 2023 17:13
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 23, 2023
@bitcoin bitcoin locked and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants