You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
If I'm not mistaken, a SegWit address with an uncompressed pubkey is not spendable. However the decodescript RPC call can still convert any P2PKH output script into SegWit addresses by default. I think this may cause footguns.
Describe the solution you'd like
An additional optional argument to enable SegWit conversions, rather than providing SegWit addresses by default.
Describe alternatives you've considered
Show more warning messages in the help information and/or JSON response data.
The issue comes beforehand. If your program generates a script with an uncompressed key and queries a segwit address from decodescript, aside from the fact it makes no sense to use an RPC for this the issue is not with the RPC but with the logic of your program.
It's not that dangerous; it's not like it's a wallet RPC that may return an unspendable address.
The proposed fix is overkill (and any fix would be i think)
Worst case funds are not completely unspendable, only by standardness rules...
We generally avoid showing things to users that can result in funds being "stuck", even if technically still valid.
The feature request didn't seem to attract much 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.
Is your feature request related to a problem? Please describe.
If I'm not mistaken, a SegWit address with an uncompressed pubkey is not spendable. However the
decodescript
RPC call can still convert any P2PKH output script into SegWit addresses by default. I think this may cause footguns.Describe the solution you'd like
An additional optional argument to enable SegWit conversions, rather than providing SegWit addresses by default.
Describe alternatives you've considered
Show more warning messages in the help information and/or JSON response data.
Additional context
bitcoinjs/bitcoinjs-lib#1405
The text was updated successfully, but these errors were encountered: