v30rc2 createrawtransaction unable to create txns with multiple OP_RETURNs #33544

issue mikekelly openend this issue on October 5, 2025
  1. mikekelly commented at 10:53 pm on October 5, 2025: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    createrawtransaction in v30rc2 seems unable to create txns with multiple OP_RETURNs

    Expected behaviour

    Expected v30 cli to be able to generate transactions with multiple OP_RETURN outputs.

    Steps to reproduce

    0$ bitcoin-cli -regtest createrawtransaction \
    1  '[{"txid":"0000000000000000000000000000000000000000000000000000000000000000","vout":0}]' \
    2  '[{"data":"68656c6c6f"},{"data":"776f726c64"}]'
    3
    4# Error:
    5# error code: -8
    6# error message: Invalid parameter, duplicate key: data
    

    Relevant log output

    No response

    How did you obtain Bitcoin Core

    Pre-built binaries

    What version of Bitcoin Core are you using?

    v30rc2

    Operating system and version

    UNIX

    Machine specifications

    No response

  2. mikekelly commented at 5:43 am on October 6, 2025: none
  3. maflcko commented at 6:17 am on October 6, 2025: member

    Is there an existing issue for this?

    * [x]  I have searched the existing issues
    

    See #32478?

  4. mikekelly commented at 6:33 am on October 6, 2025: none
    @maflcko - apologies. Out of interest, is it a hard rule that RPC changes like this must follow a release later? Seems strange to relax standardness but not give users a straightforward way to make use of it
  5. mikekelly closed this on Oct 6, 2025

  6. maflcko commented at 6:46 am on October 6, 2025: member
    With policy changes, the expectation is that one release is needed to upgrade a sufficient portion of the network, until the wallet and RPC can offer them as features. Otherwise, users may not be able to propagate such transactions, or only intermittently.
  7. mikekelly commented at 6:52 am on October 6, 2025: none
    @maflcko genuine question - why couldn’t the approach be to accommodate policy changes in the same release but with a warning to users about potential propagation issues (and then remove it in the next release)?
  8. maflcko commented at 6:55 am on October 6, 2025: member
    Yeah, it is always a bit of a case-by-case decision. However, I don’t think a pull request in a reviewable state exists to implement this? So nothing can be merged into 31.x, nor 30.x anyway.
  9. mikekelly commented at 10:22 am on October 6, 2025: none

    Here’s the offending lines

    https://github.com/bitcoin/bitcoin/blob/30.x/src/rpc/rawtransaction_util.cpp#L109-L111 @maflcko this is all that needs removing and replacing with a warning. I assume there are standardness tests that will start failing and need changing too. Not sure if I’ll have time to get to this myself. Also concerned there may be dragons here and it’s not as simple as it appears - what do you think @petertodd or @murchandamus ?

  10. maflcko commented at 10:32 am on October 6, 2025: member

    There is https://github.com/bitcoin/bitcoin/pull/32790/files, but it is still in draft and has not received any code-review, only a conceptual feedback.

    No strong opinion from my side, but I’ve removed the milestone from the issue and pull, so that reviewers (once there are any) can suggest a milestone, but I think it is clear that this missed 30.0 and it seems unlikely to make it into 30.1. Though, again, no strong opinion.

  11. mikekelly commented at 10:38 am on October 6, 2025: none
    @maflcko I suppose if it’s not going into 30.0 then it wont need warnings. It’s a shame to not have it in 30.0 but if the ship has sailed it is what it is.

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-11-12 12:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me