Open JeremyRand opened 3 years ago
Sounds useful, especially as backend for the Qt UI checkbox. (Apart from that, i.e. for pure RPC/CLI users, I'd say they should just change the address type globally to segwit.)
As an alternative, what do you think about just flipping the default address type to segwit and not bothering with adding a choice in the UI?
As an alternative, what do you think about just flipping the default address type to segwit and not bothering with adding a choice in the UI?
As long as upstream still offers a choice for currency transactions (AFAIK they still do), I think we should do the same for name transactions. Also I'm hesitant to make Bech32 the default until we've finished phasing out the old 0.13.99 client that can't send to Bech32.
Hmm, that said, AFAIK the main reason upstream still supports giving the user a choice is because Alice may want to receive coins from Bob, but Alice supports Bech32 while Bob doesn't. This is not really a valid scenario with the auto-generated addresses in name_update
since Alice and Bob are the same wallet. Maybe it would make sense to have the DestinationAddressHelper
default to Bech32 even if the -addresstype
setting in namecoin.conf
isn't Bech32, and not bother with giving the user a choice since there's no good reason for them to change it here?
Would it be more Fluid to make the Tick box backwards. As in just flipping the code to make the Tick Box represent Old addresses while Bech32 be the New Default?
Would it be more Fluid to make the Tick box backwards. As in just flipping the code to make the Tick Box represent Old addresses while Bech32 be the New Default?
@Gapcoin1 For receiving coins/names from other people, I don't think we're ready to make Bech32 the default. For sending names to oneself, I don't see any reason to allow anything other than Bech32. Am I missing a use case?
Maybe not a very good one, but I sometimes run non-release builds on mainnet to use some new feature, while using a stable build for most usages. I imagine some other people might be doing that, but with 13.99. It seems undesirable if they should send their coins to a Bech32 address and then lose access to them in the old version.
My $0.02: if they want to upgrade to Bech32, let them, if not, don't force them.
Is your feature request related to a problem? Please describe.
There is no way to specify the address type of an address generated by
name_update
, other than changing the default for the entire wallet via the-addresstype
command-line flag.Describe the solution you'd like
We should add an
address_type
option toDestinationAddressHelper
(which currently handles thedestAddress
option). If set, this sets the address type of the generated address, similarly to theaddress_type
argument that currently exists forgetnewaddress
.Describe alternatives you've considered
We could name the option
addressType
, but that spelling is inconsistent with upstream's existinggetnewaddress
method.We could require users to manually call
getnewaddress
with the desiredaddress_type
and then pass that toname_update
, but that is not good UX.Additional context
Once this is implemented, I intend to make the
name_update
Qt GUI offer a tickbox for this, similar to theGenerate native segwit (Bech32) address
tickbox that exists on theReceive
tab.