Allow sending to duplicate address in bitcoin rpc #16980

issue ejose19 opened this issue on September 28, 2019
  1. ejose19 commented at 6:56 PM on September 28, 2019: none

    Is your feature request related to a problem? Please describe. See #2366 and #12538. Basically the only way to do this is using bitcoin-tx outputaddr command, but there's no native way using bitcoin-cli (RPC)

    Describe the solution you'd like There're are 2 solutions to this approach:

    • (non breaking) Add "addoutputaddr" method to bitcoin-cli that accepts {"address":"value"} and does the same as outputaddr command
    • (breaking) Using a different syntax for JSON in createrawtransaction that comply with JSON-RPC when sending to duplicate addresses example: [{"address": "bitcoinAddress", "amount": "btcAmount"}, {..}, ..]

    Describe alternatives you've considered

    • Currently only alternative is using bitcoin-tx, which is not an option is one is communicating with the node using RPC only
  2. ejose19 added the label Feature on Sep 28, 2019
  3. kristapsk commented at 7:07 PM on September 28, 2019: contributor

    What's the use case of having multiple outputs to the same address in a single transaction? That does not make any sense, you are definitely doing something wrong way. Bitcoin addresses aren't supposed to be reused at all.

  4. ejose19 commented at 7:15 PM on September 28, 2019: none

    @kristapsk nobody is implying "address reuse", we're talking about being able to send to the same address twice or more in the same transaction, as you can receive as many times you want to the same address, the issue is when you keep receiving AFTER spending (exposing your public key) Example possibility of this:

    2 users in exchange withdraw to the same address, so exchange have either to:

    • withdraw in separate transactions (more congestion to the network and makes one of the user wait for next batch)
    • combine the amounts and send in a single output (however, the users may get confused why they received more than requested)

    Since this is possible with bitcoin-tx, I don't see any reason why we can't have the possibility to do it in rawtransaction (it's the tool that gives the flexibility to create the transaction as the user wants)

  5. promag commented at 7:49 PM on September 28, 2019: member

    2 users in exchange withdraw to the same address

    Looks like the address is being reused?

  6. ejose19 commented at 7:59 PM on September 28, 2019: none

    That's why I put "address reuse", I agree with not reusing addresses, however you can't control what the users request withdrawing to (they're free to withdraw to any address they want).

    This feature request was more implying a functionality that's available through bitcoin-tx but not on bitcoin-cli (RPC). One of the proposed solution (add a new method) doesn't break anything and add the posibility to run the exact command from bitcoin-tx.

  7. achow101 commented at 8:05 PM on September 28, 2019: member

    Concept NACK.

    Why are there 2 users that are trying to withdraw to the same address? Presumably that's the same user.

    combine the amounts and send in a single output (however, the users may get confused why they received more than requested)

    That doesn't make any sense. They will receive the exact same amount because it is the same address!

    Since this is possible with bitcoin-tx, I don't see any reason why we can't have the possibility to do it in rawtransaction (it's the tool that gives the flexibility to create the transaction as the user wants)

    Just because it is possible doesn't mean that it should. I would say that it is a bug that bitcoin-tx can do this, rather than a bug that RPC cannot.

  8. ejose19 commented at 8:23 PM on September 28, 2019: none

    That doesn't make any sense. They will receive the exact same amount because it is the same address!

    Yes, the total amount will be the same, but not the individual amount, if they're not aware anyone else is withdrawing to the same address, they will suppose something is wrong. This is a very rare case anyways, since to have this happen either

    • They're the same user (as you mentioned)
    • They're sharing the address for whatever reason
    • They're withdrawing to a public address (donation?)

    Thanks for the feedback everyone.

  9. promag commented at 8:43 PM on September 28, 2019: member

    This is already possible/acceptable - multiple txo to same address.

    The exchange can also split the "batch" in multiple transactions and spend the 1st change in the 2nd transactions (and so on) - so waiting for next batch is not necessary.

    So concept NACK.

  10. ejose19 commented at 10:32 PM on September 28, 2019: none

    @promag can you point me how it's possible to do it without bitcoin-tx (or other way to manually creating the tx)

    Regarding the exchange, yes it's a good idea indeed, however if it's a small exchange (where withdraws occurs a few times a day, if any) then doing a 2nd transaction JUST for the duplicate withdrawal is counter - productive (batching allow less signatures and small tx size)

    Don't get me wrong, I'm not against your reasonale, just want to know why we restrain the user to create the transaction the way he want using the raw transaction way (which should be flexible)

  11. promag commented at 8:27 AM on September 29, 2019: member

    I meant that such transactions aren't rejected. You would have to create elsewhere.

  12. MarcoFalke added the label Brainstorming on Sep 30, 2019
  13. MarcoFalke commented at 6:38 PM on October 1, 2019: member

    Couldn't you sum the amounts and explain to your users that the amounts are going to be summed if they reuse addresses across accounts on your website?

    This will result in the cheapest txs with regard to fees for both you and likely also for your users.

  14. ejose19 closed this on Jan 20, 2020

  15. DrahtBot locked this on Feb 15, 2022

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