Modifies generateblock to allow a user to set multiple outputs in the coinbase transaction. If an empty set is provided, the block will be empty. If no set of transactions is provided, the block will mine the mempool. If a set of transactions is provided only that set of txs will be mined.
When mining a block on regtest, the command “generatetoaddress” is available if you want to send the entire coinbase to 1 address. Let’s add generatetomany in case you want to split up the coinbase among multiple addresses, similar to how the “sendtoaddress” and “sendmany” commands both exist and let you send money to (1) one address or (2) multiple addresses. The generatetomany command would be particularly useful for simulating protocols that send money to multiple recipients directly from a coinbase, as several pools do now, like ocean and braidpool.
Notes
Needs release note
Changes on generateblock are not backwards compatible as now it takes an array of outputs instead a single output. This should not be critical as it is a test RPC.
DrahtBot
commented at 5:34 pm on May 10, 2025:
contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
See the guideline for information on the review process.
A summary of reviews will appear here.
Conflicts
Reviewers, this pull request conflicts with the following ones:
#34860 (mining: always pad scriptSig at low heights, drop include_dummy_extranonce by Sjors)
#32317 (kernel: Separate UTXO set access from validation functions by sedited)
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.
LLM Linter (✨ experimental)
Possible typos and grammar issues:
The reward is split in equal parts through all addresses and descriptors provided. -> among all addresses and descriptors provided. [“through” is likely a mistake here; “among” is clearer for distributing across a set.]
2026-04-02 18:06:34
DrahtBot added the label
RPC/REST/ZMQ
on May 10, 2025
polespinasa force-pushed
on May 10, 2025
polespinasa
commented at 5:42 pm on May 10, 2025:
member
I would like to discuss how to implement reward distribution. Do we ask the user for the exact number of bitcoins for each address or do we opt to use percentages of the reward?
IMHO it is better to use percentages, it makes things easier for the user.
DrahtBot added the label
CI failed
on May 10, 2025
DrahtBot
commented at 5:48 pm on May 10, 2025:
contributor
🚧 At least one of the CI tasks failed.
Task tidy: https://github.com/bitcoin/bitcoin/runs/41993075774
LLM reason (✨ experimental): The CI failure is due to a build error related to missing members in node::BlockAssembler::Options.
Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the
affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
polespinasa force-pushed
on May 10, 2025
andrewtoth
commented at 5:56 pm on May 10, 2025:
contributor
The generateblock command takes either an address or descriptor as its first argument. Perhaps it would be easier to extend that RPC to also take an array of address or descriptor and value pairs? That way we won’t need a new RPC.
polespinasa
commented at 5:59 pm on May 10, 2025:
member
Perhaps it would be easier to extend that RPC to also take an array of address or descriptor and value pairs?
That would be easy as the code is already done on the new RPC. But this change would not be backwards compatible, idk if we want to keep it that way.
There are some softwares like Polar that would be affected by this.
polespinasa force-pushed
on May 10, 2025
andrewtoth
commented at 6:17 pm on May 10, 2025:
contributor
But this change would not be backwards compatible
Sure it would be. Just parse an array first and if that fails parse a string.
DrahtBot removed the label
CI failed
on May 10, 2025
polespinasa
commented at 9:48 pm on May 10, 2025:
member
Just parse an array first and if that fails parse a string.
Oh right, that’s an option. I will let it as it is for now to see other contributors’ opinions.
May take your approach later.
supertestnet
commented at 11:38 pm on May 10, 2025:
none
Can a PSBT be constructed with only outputs, no inputs? If so, then maybe generateblock could accept a psbt or a string as an argument. If it is a psbt, it must contain outputs but no inputs.
But also, due to fees being variable, it may be useful to have some kind of “remainder” option so that you can say, for example, “give 1 btc apiece to the first 3 addresses, and give the remainder to the last address”
polespinasa
commented at 7:51 am on May 11, 2025:
member
Can a PSBT be constructed with only outputs, no inputs?
I’m not sure using a PSBT is the best approach. If we check the normal workflow for a PSBT we see it is intended to:
Create the PSBT with inputs and outputs but no metadata
Updated with the data needed to spend the UTXOs in the inputs
Signed
Finalized
IMO using PSBTs here does not make sense, we don’t need any of that, we don’t need to share with other users or software to sign or add information to inputs. It’s easier to just provide a JSON with the addresses and amounts (it’s the only info we need), also using a JSON it’s easier to implement with less changes.
But also, due to fees being variable, it may be useful to have some kind of “remainder” option so that you can say, for example, “give 1 btc apiece to the first 3 addresses, and give the remainder to the last address”
Do you have any idea on how that could look like?
Maybe something like this; where amount_fixed takes a number and share_reminder is a boolean:
generatetomany 1 [{addr1, amount_fixed, share_remainder}, ...]
bitcoin-cli generatetomany "{\"bcrt1qal6p633hvwz2yp5mav0qy7u2az8gkn2xywnj6v\":1,\"bcrt1q3me8uxjzw2egq76hjw6zcgzmlhlzzztfwqzjfv\":1,\"bcrt1q57yu04dn4l0zxv6ul4prm7favr630d3lmwvjh0\":1,\"bcrt1qal6p633hvwz2yp5mav0qy7u2az8gkn2xywnj6v\":\"remainder\"}" <– note the remainder in the last btc address
polespinasa
commented at 8:08 am on May 11, 2025:
member
note the remainder in the last btc address
what if you want to split the reminder between multiple addresses?
a1denvalu3
commented at 11:09 am on May 11, 2025:
none
note the remainder in the last btc address
what if you want to split the reminder between multiple addresses?
Generally, I am not sure about modifying real code to accommodate test-only code. It would be better to not modify src/node at all and just put the test-only code in the test-only code paths.
(Unless the code may be useful outside of tests, but then you’ll have to explain how)
Will delete it, was just added as all the else statement code is not needed for the simeple generatetoaddress.
Generally, I am not sure about modifying real code to accommodate test-only code. It would be better to not modify src/node at all and just put the test-only code in the test-only code paths.
I’m not understanding this part, what do you mean by test-only code? I don’t see a way to add this functionality without modifying this src/node/… files. Care to explain more?
Also maybe we would want to follow @andrewtoth advice and not create a new rpc command in the first place.
polespinasa
commented at 5:30 pm on May 11, 2025:
member
All fields with “remainder” to have the remainder split equally amongst them?
I don’t see duplicating entries as a good option. Could lead to errors. I think is better to have two camps for each address entry, one for the amount (can be 0) and one for reminder (can be done with 0 or 1 or by setting “remainder” or an empty string)
polespinasa
commented at 5:31 pm on May 11, 2025:
member
Also maybe we would want to follow @andrewtoth advice and not create a new rpc command in the first place.
Still not sure about this, would like to know more opinions, for other things like send we have multiple RPCs. Anyway, it’s an easy change, so it’s something we can do at the end if we want.
a1denvalu3
commented at 5:51 pm on May 11, 2025:
none
duplicating entries
How is it duplicating entries? In the example there is a different address for each entry.
polespinasa
commented at 5:54 pm on May 11, 2025:
member
How is it duplicating entries?
First address is duplicated. Anyway it is duplicated in case you want to assign an amount to an address + remainder.
polespinasa force-pushed
on May 12, 2025
polespinasa force-pushed
on May 12, 2025
polespinasa force-pushed
on May 12, 2025
DrahtBot added the label
CI failed
on May 12, 2025
This is necessary to avoid RegenerateCommitments to return -1 so breaking the code.
Idk if there’s a better approach to it.
polespinasa renamed this:
rpc:generatetomany
rpc: generatetomany
on May 12, 2025
DrahtBot removed the label
CI failed
on May 12, 2025
mzumsande
commented at 2:45 pm on May 12, 2025:
contributor
Could the motivation be added here? Doesn’t seem ok having to resort to twitter (where people without an account can’t even see most of the thread) to know the reason for a PR.
supertestnet
commented at 4:24 pm on May 12, 2025:
none
Here is my motivation:
When mining a block on regtest, the command “generatetoaddress” is available if you want to send the entire coinbase to 1 address. Let’s add generatetomany in case you want to split up the coinbase among multiple addresses, similar to how the “sendtoaddress” and “sendmany” commands both exist and let you send money to (1) one address or (2) multiple addresses. The generatetomany command would be particularly useful for simulating protocols that send money to multiple recipients directly from a coinbase, as several pools do now, like ocean and braidpool.
andrewtoth
commented at 4:39 pm on May 12, 2025:
contributor
Still not sure about this, would like to know more opinions, for other things like send we have multiple RPCs
Since I don’t seem to have convinced you, here are some more arguments for why this feature belongs in generateblock instead of a new RPC:
New RPCs require adding more code to test, and once added must go through a deprecation cycle to be removed (if they can be removed at all without disrupting too many users).
Consumers of the RPCs must write additional code for the new RPC, instead of simply modifying the argument type.
generateblock is much more flexible than generatetoaddress (or generatetodescriptor), since it takes the txs to include as the second argument. For advanced test cases, it is likely that users would want this functionality to test multiple output coinbases with blocks that mine non-standard txs or otherwise don’t mine the entire mempool. They would not have this capability with generatetomany as implemented here, but would have that for free with generateblock.
generateblock currently doesn’t collect transaction fees (https://github.com/bitcoin/bitcoin/issues/31684), so adding this functionality to it would fix this issue. Users could just call generateblock with an array containing a single address/descriptor:value pair that has the reward plus fees.
generateblock is capable of mining invalid blocks, since the txs to mine in the second argument can be any set of txs. We can similarly punt the calculation of the coinbase reward to the caller, so they must correctly calculate that all the values of the outputs add up to no more than the correct reward + fees. This removes the bikeshedding of whether to use remainder or split values up evenly.
polespinasa
commented at 6:55 pm on May 12, 2025:
member
generateblock is much more flexible than generatetoaddress (or generatetodescriptor), since it takes the txs to include as the second argument. For advanced test cases, it is likely that users would want this functionality to test multiple output coinbases with blocks that mine non-standard txs or otherwise don’t mine the entire mempool. They would not have this capability with generatetomany as implemented here, but would have that for free with generateblock.
This is a fair point, the only bad thing is that (if I’m not wrong) generateblock is thought to be used always with a given set of txs and that may not always be the use case. Maybe would be worth to implement it on both RPC?
For the first two points I understand them, but I don’t think it’s a problem. In case we consider those two reasons enough to not add a new PRC, this could be adapted to work inside generatetoaddress or generatetodescriptor adding the new arguments (payout amounts) and making them optional to keep the original behaviour if wanted. Making it backward compatible.
generateblock is capable of mining invalid blocks, since the txs to mine in the second argument can be any set of txs. We can similarly punt the calculation of the coinbase reward to the caller, so they must correctly calculate that all the values of the outputs add up to no more than the correct reward + fees. This removes the bikeshedding of whether to use remainder or split values up evenly.
This is also a good point but also focused on only this use case. Would say the same as before, you may want to mine txs from the mempool and not care about the exact amount of sats to distribute. Maybe implement this on both RPC is the solution to it.
What do you think?
andrewtoth
commented at 7:34 pm on May 12, 2025:
contributor
Consider if we already had the functionality for this in generateblock - what would be the motivation to add a new RPC generatetomany?
Note that sendtoaddress and sendmany have both been superseded by send, but the older RPCs can’t easily be removed. sendall is an interesting case, which we might want to mimic instead of adding a remainder field. But, then that won’t fix #31684.
andrewtoth
commented at 5:22 pm on May 13, 2025:
contributor
generateblock is thought to be used always with a given set of txs and that may not always be the use case. Maybe would be worth to implement it on both RPC?
you may want to mine txs from the mempool and not care about the exact amount of sats to distribute. Maybe implement this on both RPC is the solution to it.
What do you think?
I think you are making the case to add a feature to generateblock to mine the mempool and collect rewards the same as generateto commands. Perhaps we can make the second argument of generateblock optional, and if there is no set of txs provided then mine the mempool.
I don’t think we should be duplicating the effort implementing this on more than one RPC. Then every new mining test feature needs to be duplicated (or triplicated for generatetodescriptor/generatetomany). We should deprecate generateto RPCs and just use generateblock for everything going forward, similar to send vs sendtoaddress/sendmany.
polespinasa
commented at 7:27 am on May 14, 2025:
member
Perhaps we can make the second argument of generateblock optional, and if there is no set of txs provided then mine the mempool
That could be a smart approach. But I would always take the mempool or also put an optional argument to mine the mempool so it is not one or the other.
I don’t think we should be duplicating the effort implementing this on more than one RPC. Then every new mining test feature needs to be duplicated (or triplicated for generatetodescriptor/generatetomany). We should deprecate generateto RPCs and just use generateblock for everything going forward, similar to send vs sendtoaddress/sendmany.
I might agree, will think how to build it around generateblock. Deprecation for the other RPCs can be done in another PR as I think will be a blocking reason for merging, don’t want it to influence this one.
polespinasa force-pushed
on May 20, 2025
polespinasa force-pushed
on May 20, 2025
DrahtBot added the label
CI failed
on May 20, 2025
polespinasa force-pushed
on May 20, 2025
polespinasa
commented at 9:58 am on May 20, 2025:
member
Perhaps we can make the second argument of generateblock optional, and if there is no set of txs provided then mine the mempool.
This is implemented here 8b5dd8a5f135ce1aaf80d8c28943f503f4ee19d4
With a small difference, if no set of txs is provided then we mine the mempool, if an empty set is provided we mine an empty block (original behaviour of the RPC).
Note: for the moment fee collector is not implemented if a set of tx is set manually
in
src/rpc/mining.cpp:390
in
8b5dd8a5f1outdated
386@@ -306,10 +387,16 @@ static RPCHelpMan generateblock()
387 return RPCHelpMan{"generateblock",
388 "Mine a set of ordered transactions to a specified address or descriptor and return the block hash.",
389 {
390- {"output", RPCArg::Type::STR, RPCArg::Optional::NO, "The address or descriptor to send the newly generated bitcoin to."},
391- {"transactions", RPCArg::Type::ARR, RPCArg::Optional::NO, "An array of hex strings which are either txids or raw transactions.\n"
392+ {"outputs", RPCArg::Type::ARR, RPCArg::Optional::NO, "The addresses or descriptor to split, in equal parts, the coinbase reward among.",
not sure about forcing an array, when all tests mostly just want to provide a single dummy value.
it would be good to make this optional and then, require one of output or outputs to be present, or maybe even fallback to OP_TRUE if none are given? edit: Or maybe just fallback to OP_RETURN to avoid interfering with tests that assume utxo state?
not sure about forcing an array, when all tests mostly just want to provide a single dummy value.
I don’t think this should be a problem.
Same happens with sendall. Most tests just provide a single value in a list. And it actually doesn’t affect many tests.
I think it keeps the code simpler and avoids the confusion that could appear if we use multiple possible arguments.
Also, even if this is not a backward compatible change it’s not something critical as it is the test code.
But I like the idea of making it optional with a fallback to OP_RETURN if there are no values provided.
polespinasa
commented at 11:33 am on May 26, 2025:
I’ve set “output” as optional but still I have to provide at least an empty list. I’m unable to see how to make it fully optional.
0$ ./bitcoin-cli -rpcport=18443 generateblock
1error code: -3
2error message:
3JSON value of type null is not of expected type array
DrahtBot removed the label
CI failed
on May 20, 2025
naiyoma
commented at 10:36 am on May 24, 2025:
contributor
I’m a bit confused about the current approach. Are you planning to add generatetomany and also extend generateblock to accommodate an array of addresses?
I suggest that you put one approach in your fork and indicate this clearly in your description—separation of concerns makes it easier to follow and review.
For example:
Approach 1
Approach 2 → Link to the PR in your fork
polespinasa
commented at 10:40 am on May 24, 2025:
member
I’m a bit confused about the current approach. Are you planning to add generatetomany and also extend generateblock to accommodate an array of addresses?
generatetomany will not be added. I have to delete that code.
maflcko
commented at 10:42 am on May 24, 2025:
member
generatetomany will not be added. I have to delete that code.
Generally, it is best to just push the final version of the code, so that it is ready for further review. Prior versions of the code can trivially be retrieved via the commit hash (or a named alias), if needed.
in
src/rpc/mining.cpp:354
in
571e37a74foutdated
350+ {
351+ {RPCResult::Type::STR_HEX, "", "blockhash"},
352+ }},
353+ RPCExamples{
354+ "\nGenerate 11 blocks to two different addresses:\n"
355+ + HelpExampleCli("generatetomany", "\"11 '[\\\"bcrt1qal6p633hvwz2yp5mav0qy7u2az8gkn2xywnj6v\\\", \\\"bcrt1qvr3qgyhw6y0e0zj97v0j5yc40xtpea4wqj0g43\\\"]'\"")
polespinasa renamed this:
rpc: generatetomany
rpc: generateblock to allow multiple outputs
on May 25, 2025
in
test/functional/rpc_txoutproof.py:72
in
67172f6b1boutdated
68@@ -69,7 +69,7 @@ def run_test(self):
69 # We can't get the proof if we specify a non-existent block
70 assert_raises_rpc_error(-5, "Block not found", self.nodes[0].gettxoutproof, [txid_spent], "0000000000000000000000000000000000000000000000000000000000000000")
71 # We can't get the proof if we only have the header of the specified block
72- block = self.generateblock(self.nodes[0], output="raw(55)", transactions=[], submit=False)
73+ block = self.generateblock(self.nodes[0], outputs=["raw(55)"], transactions=[], submit=False)
all those raw( can probably just be omitted and use the OP_RETURN fallback
polespinasa
commented at 11:31 am on May 26, 2025:
done!
polespinasa force-pushed
on May 26, 2025
polespinasa
commented at 11:32 am on May 26, 2025:
member
OP_RETURN fallback if no address or descriptor set is provided.
A few tests added to test new functionalities
polespinasa force-pushed
on May 26, 2025
polespinasa force-pushed
on May 26, 2025
polespinasa force-pushed
on May 26, 2025
in
src/rpc/mining.cpp:310
in
a4c0eecc8foutdated
305@@ -306,10 +306,17 @@ static RPCHelpMan generateblock()
306 return RPCHelpMan{"generateblock",
307 "Mine a set of ordered transactions to a specified address or descriptor and return the block hash.",
308 {
309- {"output", RPCArg::Type::STR, RPCArg::Optional::NO, "The address or descriptor to send the newly generated bitcoin to."},
310- {"transactions", RPCArg::Type::ARR, RPCArg::Optional::NO, "An array of hex strings which are either txids or raw transactions.\n"
311+ {"outputs", RPCArg::Type::ARR, RPCArg::Optional::OMITTED, "The addresses or descriptor to split, in equal parts, the coinbase reward among.\n"
312+ "If no outputs are provided the coinbase transaction will burn the coins into a OP_RETURN output.",
I am also thinking about splitting up the “make this arg optional”. Seems like a small and easy preparatory pull request?
Any thoughts on this? Making it optional is a non-breaking change that should be easy to review.
naiyoma
commented at 1:00 pm on May 27, 2025:
contributor
A summary of my understanding of this PR so far, regarding the generateblock changes: :
Outputs and transactions are now optional.
generateblock can now take an array of addresses and distribute the reward equally among them.
generateblock with an empty array - in this case fallback to OP_TRUE
I think there’s an intention to add a remainder — that way, it’s possible to specify part of the reward to specific addresses and then split the remainder among the other addresses
Generate 2 addresses
0HASH=$(./build/bin/bitcoin-cli generateblock '["bcrt1qkqjkxltw5s89kkpxg0v9560nuh8c3alu04f6d6", "bcrt1qke6n4hcu4pl2fmv9ueklnn7fz6knum2n0qcnvc"]' | jq -r .hash)12# Verify that the reward is being split equally3./build/bin/bitcoin-cli getrawtransaction $(./build/bin/bitcoin-cli getblock $HASH | jq -r .tx[0]) true | jq '.vout[] | select(.value > 0) | {address: .scriptPubKey.address, btc: .value}'
341 CScript coinbase_output_script;
342 std::string error;
343+ std::vector<CScript> coinbase_outputs_scripts;
344+ if (address_or_descriptor.empty()) {
345+ coinbase_outputs_scripts.push_back(CScript() << OP_RETURN);
346+ //throw JSONRPCError(RPC_INVALID_PARAMETER, "Error: at least one address or descriptor must be provided.");
Although this RPC is only used by tests, I don’t think we should be breaking backwards compatibility here. It’s equally easy to determine whether this parameter is a string, so we can accept a string here for backwards compatibility.
The reason to keep compatibility is because this RPC has a high likelihood of being used in scripts and automated tests. Changing the type of the parameter will break all of those.
Yes, see verbose|verbosity in getblock for example.
polespinasa
commented at 12:08 pm on May 30, 2025:
Done in 2c855694c795a31f13a473d6a6eb80c5d765e8ed
The change causes an error in the rpc_help.py functional test that I am unable to fix
in
src/rpc/mining.cpp:312
in
a4c0eecc8foutdated
305@@ -306,10 +306,17 @@ static RPCHelpMan generateblock()
306 return RPCHelpMan{"generateblock",
307 "Mine a set of ordered transactions to a specified address or descriptor and return the block hash.",
308 {
309- {"output", RPCArg::Type::STR, RPCArg::Optional::NO, "The address or descriptor to send the newly generated bitcoin to."},
310- {"transactions", RPCArg::Type::ARR, RPCArg::Optional::NO, "An array of hex strings which are either txids or raw transactions.\n"
311+ {"outputs", RPCArg::Type::ARR, RPCArg::Optional::OMITTED, "The addresses or descriptor to split, in equal parts, the coinbase reward among.\n"
312+ "If no outputs are provided the coinbase transaction will burn the coins into a OP_RETURN output.",
313+ {
314+ {"address", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "A valid address"},
DrahtBot added the label
CI failed
on May 30, 2025
polespinasa force-pushed
on May 30, 2025
polespinasa force-pushed
on May 30, 2025
polespinasa force-pushed
on May 30, 2025
polespinasa
commented at 1:19 pm on May 30, 2025:
member
Rebased on top of master.
2c855694c795a31f13a473d6a6eb80c5d765e8ed implements allowing single address or descriptor without using an array or json structure as sugested in #32468 (review) and #32468 (review). But makes rpc_help.py fail. (I still don’t know why)
maflcko
commented at 9:52 am on June 5, 2025:
member
But makes rpc_help.py fail. (I still don’t know why)
The cli tool needs to “convert” non-string args. However, if the overload accepts a string and a non-string, it is unclear how to proceed. Maybe similar to hash_or_height?
polespinasa force-pushed
on Jun 9, 2025
polespinasa
commented at 4:46 pm on June 9, 2025:
member
However, if the overload accepts a string and a non-string, it is unclear how to proceed. Maybe similar to hash_or_height?
I was trying to make the cli accept bitcoin-cli generateblock address but seems that the only way to do it is by requesting a json type object from the user bitcoin-cli generateblock '"address"' like hash_or_height
in
test/functional/rpc_generate.py:121
in
00a5104ea9outdated
117@@ -117,7 +118,7 @@ def test_generateblock(self):
118119 # Ensure that generateblock can be called concurrently by many threads.
120 self.log.info('Generate blocks in parallel')
121- generate_50_blocks = lambda n: [n.generateblock(outputs=[address], transactions=[]) for _ in range(50)]
122+ generate_50_blocks = lambda n: [n.generateblock(outputs=address, transactions=[]) for _ in range(50)]
This test fails for some unexpected reason.
It is unable to parse the address although is the same as the other tests, so format should be correct.
TestFramework (ERROR): Called Process failed with 'error: Error parsing JSON: bcrt1p9yfmy5h72durp7zrhlw9lf7jpwjgvwdg0jr0lqmmjtgg83266lqsekaqka
Maybe some of the functions used for parsing needs a lock to work correctly with concurrency?
It’s the same value as in other tests that are working: See tests in lines 37, 48, 95, etc.
The value is declared in line 36 and it’s never changed. It only fails in that test case.
Oh you’re right, I didn’t know about node.cli difference.
Thanks for the help!
polespinasa
commented at 5:02 pm on June 9, 2025:
member
00a5104ea984d75ae769a4af49d480272e8562f6
added outputs param to the RPCConvertParams lists to make rpc_help.py test pass
polespinasa force-pushed
on Jun 9, 2025
DrahtBot removed the label
CI failed
on Jun 9, 2025
DrahtBot added the label
Needs rebase
on Jun 11, 2025
polespinasa force-pushed
on Jun 11, 2025
polespinasa
commented at 11:08 pm on June 11, 2025:
member
Rebased on top of master 5757de4ddd37f9321ee6b338b40888fd3561fc00 to fix conflicts
DrahtBot removed the label
Needs rebase
on Jun 12, 2025
polespinasa force-pushed
on Jun 12, 2025
polespinasa force-pushed
on Jun 12, 2025
DrahtBot added the label
CI failed
on Jun 12, 2025
DrahtBot
commented at 7:53 am on June 12, 2025:
contributor
🚧 At least one of the CI tasks failed.
Task lint: https://github.com/bitcoin/bitcoin/runs/43951458497
LLM reason (✨ experimental): The CI failure is caused by a lint check failure due to release notes snippets being placed in the wrong folder.
Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the
affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
polespinasa force-pushed
on Jun 12, 2025
polespinasa
commented at 8:01 am on June 12, 2025:
member
DrahtBot added the label
Needs rebase
on Feb 3, 2026
polespinasa force-pushed
on Feb 24, 2026
polespinasa
commented at 7:22 pm on February 24, 2026:
member
Rebased to fix some conflicts and silent conflicts with master
DrahtBot removed the label
Needs rebase
on Feb 24, 2026
sedited requested review from naiyoma
on Mar 13, 2026
sedited removed review request from naiyoma
on Mar 13, 2026
sedited requested review from andrewtoth
on Mar 13, 2026
sedited requested review from naiyoma
on Mar 13, 2026
sedited removed review request from naiyoma
on Mar 19, 2026
sedited requested review from stickies-v
on Mar 19, 2026
in
src/rpc/mining.cpp:308
in
1583139317
306@@ -307,10 +307,19 @@ static RPCHelpMan generateblock()
307 return RPCHelpMan{"generateblock",
308 "Mine a set of ordered transactions to a specified address or descriptor and return the block hash.",
andrewtoth
commented at 5:47 pm on March 22, 2026:
We should update the description to mention multiple outputs.
polespinasa
commented at 7:50 am on March 25, 2026:
andrewtoth
commented at 5:48 pm on March 22, 2026:
This if block can be combined with the below !mine_mempool block. No need to have two ifs if we are setting mine_mempool = false; unconditionally in here.
polespinasa
commented at 7:50 am on March 25, 2026:
true, done
in
src/rpc/mining.cpp:310
in
1583139317outdated
306@@ -307,10 +307,19 @@ static RPCHelpMan generateblock()
307 return RPCHelpMan{"generateblock",
308 "Mine a set of ordered transactions to a specified address or descriptor and return the block hash.",
309 {
310- {"output", RPCArg::Type::STR, RPCArg::Optional::NO, "The address or descriptor to send the newly generated bitcoin to."},
311- {"transactions", RPCArg::Type::ARR, RPCArg::Optional::NO, "An array of hex strings which are either txids or raw transactions.\n"
312+ {"outputs", RPCArg::Type::ARR, RPCArg::Optional::OMITTED, "The addresses or descriptors to split, in equal parts, the coinbase reward among.\n"
andrewtoth
commented at 5:51 pm on March 22, 2026:
Why don’t we want to have an array of { address: amount } objects, like we do for other RPCs, and just burn the rest of the reward if there’s not enough total amount?
polespinasa
commented at 7:45 am on March 25, 2026:
in
test/functional/feature_assumeutxo.py:430
in
1583139317
426@@ -427,7 +427,7 @@ def run_test(self):
427 # Create a stale block that forks off the main chain before the snapshot.
428 temp_invalid = n0.getbestblockhash()
429 n0.invalidateblock(temp_invalid)
430- stale_hash = self.generateblock(n0, output="raw(aaaa)", transactions=[], sync_fun=self.no_op)["hash"]
431+ stale_hash = self.generateblock(n0, sync_fun=self.no_op)["hash"]
andrewtoth
commented at 5:53 pm on March 22, 2026:
I think the only thing we should touch in the existing functional tests is renaming output -> outputs. Otherwise this should be backwards compatible, and mining the mempool instead of an empty block can be a behavior change in the tests.
polespinasa
commented at 7:51 am on March 25, 2026:
As this suggest #32468 (review) the raw(aaa) can be removed to just fallback on the OP_RETURN.
And doing outputs=[] or not adding outputs at all is the same, so there’s no need to keep it.
I will add back the transactions=[] you are right that is a behavior change and this PR should not be changing that. Thanks.
polespinasa force-pushed
on Mar 25, 2026
polespinasa
commented at 8:13 am on March 25, 2026:
member
Force pushed to apply some of @andrewtoth suggestions as they were fast to implement.
And rebased on top of master.
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: 2026-04-12 03:13 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me