Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow duplicate output addresses createrawtransaction #23877

Closed
antonilol opened this issue Dec 27, 2021 · 9 comments
Closed

allow duplicate output addresses createrawtransaction #23877

antonilol opened this issue Dec 27, 2021 · 9 comments

Comments

@antonilol
Copy link

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

Invalid parameter, duplicated address: tb1qcum5rgwvzmtfvtwk80y4zp7mv5mgg384ygfsn3

Describe the solution you'd like

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

Describe alternatives you've considered

hex editing

Additional context

40ac7fcef6a918e0c073f74cf79bb97b043f311e9f3b6e3d5067b0e6f2b6be5a

@ghost
Copy link

ghost commented Dec 27, 2021

Any usecases for this feature?

@kristapsk
Copy link
Contributor

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

@antonilol
Copy link
Author

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

@kristapsk
Copy link
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

@antonilol
Copy link
Author

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?

@maflcko
Copy link
Member

maflcko commented Dec 27, 2021

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

@antonilol
Copy link
Author

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?

@bitcoin bitcoin deleted a comment from Thanayaby Dec 28, 2021
@antonilol
Copy link
Author

Off want min you're

?

@maflcko
Copy link
Member

maflcko commented Feb 7, 2022

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.

@maflcko maflcko closed this as completed Feb 7, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Feb 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants