allow duplicate output addresses `createrawtransaction` #23877

issue antonilol opened this issue on December 27, 2021
  1. antonilol commented at 2:43 PM on December 27, 2021: none

    Is your feature request related to a problem? Please describe.

    <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

    Invalid parameter, duplicated address: tb1qcum5rgwvzmtfvtwk80y4zp7mv5mgg384ygfsn3

    Describe the solution you'd like

    <!-- A clear and concise description of what you want to happen. -->

    remove the duplicate address check or add an optional argument to remove the check

    Describe alternatives you've considered

    <!-- A clear and concise description of any alternative solutions or features you've considered. -->

    hex editing

    Additional context

    <!-- Add any other context or screenshots about the feature request here. -->

    40ac7fcef6a918e0c073f74cf79bb97b043f311e9f3b6e3d5067b0e6f2b6be5a

  2. antonilol added the label Feature on Dec 27, 2021
  3. ghost commented at 3:13 PM on December 27, 2021: none

    Any usecases for this feature?

  4. kristapsk commented at 3:45 PM on December 27, 2021: contributor

    I don't see any point in doing this, just unnecessary increases global UTXO set.

  5. antonilol commented at 3:48 PM on December 27, 2021: none

    I don't see any point in doing this, just unnecessary increases global UTXO set.

    it makes no difference when either using 2 different addresses or using 2 outputs with the same address advantage: you only have to get 1 new address, not 2. for 2 new addresses it doesn't matter but if you needed 2000 addresses because duplicate addresses are blocked by createrawtransaction it costs a lot of time creating 2000 new addresses

  6. kristapsk commented at 4:35 PM on December 27, 2021: contributor

    it makes no difference when either using 2 different addresses or using 2 outputs with the same address

    Why not just sum amounts and use one TXO instead? What is the use case?

    it costs a lot of time creating 2000 new addresses

    On my laptop:

    $ time for i in $(seq 1 2000); do bitcoin-cli -signet -rpcwallet=signet getnewaddress > /dev/null; done
    
    real	0m39,460s
    user	0m9,583s
    sys	0m6,962s
    

    Address reuse has never been recommended practice in Bitcoin. It actually works by accident, not by design. https://en.bitcoin.it/wiki/Address_reuse

  7. MarcoFalke added the label RPC/REST/ZMQ on Dec 27, 2021
  8. antonilol commented at 5:44 PM on December 27, 2021: none

    createrawtransaction must be a tool to create a raw transaction without having to make the TX hex yourself. if multiple of the same outputs is allowed in a raw TX, why can't createrawtransaction do it for me?

  9. MarcoFalke commented at 5:58 PM on December 27, 2021: member

    Agree that there is no need to add this feature, since there is no use case

  10. antonilol commented at 6:28 PM on December 27, 2021: none

    createrawtransaction must be a tool to create a raw transaction without having to make the TX hex yourself. if multiple of the same outputs is allowed in a raw TX, why can't createrawtransaction do it for me?

  11. fanquake deleted a comment on Dec 28, 2021
  12. antonilol commented at 5:33 PM on January 2, 2022: none

    Off want min you're

    ?

  13. MarcoFalke commented at 1:12 PM on February 7, 2022: member

    The feature request didn't seem to attract much positive attention in the past. Also, the issue seems not important enough right now to keep it sitting around idle in the list of open issues.

    Closing due to lack of interest. Pull requests with improvements are always welcome.

  14. MarcoFalke closed this on Feb 7, 2022

  15. DrahtBot locked this on Feb 7, 2023

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: 2026-04-13 15:14 UTC

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