amaclin (OP)
Legendary
Offline
Activity: 1260
Merit: 1019
|
|
November 20, 2016, 07:44:04 PM |
|
Should the client use segwit-addresses for change addresses? If yes - it will be confusing users. If no - the benefits of segwit are smaller than expected
|
|
|
|
|
|
|
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
achow101
Moderator
Legendary
Offline
Activity: 3388
Merit: 6641
Just writing some code
|
|
November 20, 2016, 08:53:54 PM |
|
Should the client use segwit-addresses for change addresses?
Yes If yes - it will be confusing users.
How so? It should be giving segwit addresses for all addresses regardless.
|
|
|
|
johoe
|
|
November 24, 2016, 04:38:18 PM |
|
I think the idea so far is to add a segwit account to segwit enabled wallets. The segwit account then has segwit addresses (p2sh at first). The user is free to choose between his segwit account and non-segwit account and whether he wants to transfer his funds to the segwit account. When he uses the segwit account, he uses segwit change addresses. So every user can decide for himself if/when he wants to update to segwit (of course, only after it gets activated).
It would be possible to use a mixed account with both segwit and non-segwit addresses and maybe even native p2wpkh addresses for change. But this may be confusing to users, cause inconsistent balances between different wallets (e.g. when sharing xpubs), and make it easier to spot the change output.
|
Donations to 1CF62UFWXiKqFUmgQMUby9DpEW5LXjypU3
|
|
|
gmaxwell
Moderator
Legendary
Offline
Activity: 4172
Merit: 8420
|
|
November 26, 2016, 10:15:39 PM |
|
I think the idea so far is to add a segwit account to segwit enabled wallets. The segwit account then has segwit addresses (p2sh at first). The user is free to choose between his segwit account and non-segwit account and whether he wants to transfer his funds to the segwit account. When he uses the segwit account, he uses segwit change addresses. So every user can decide for himself if/when he wants to update to segwit (of course, only after it gets activated).
That sounds like foolish wallet construction, IMO. Don't do that. A wallet should use segwit (in which case all newly generated addresses should be segwit) or it shouldn't (in which case none of it is). As far as bare P2WPKH outputs, indeed-- those could be used for change, but they're more identifiable which is pretty ugly.
|
|
|
|
ScripterRon
|
|
November 29, 2016, 03:48:38 PM |
|
For my own wallet, I've taken the approach of providing both P2PKH ('1') and P2SH-P2WPKH ('3') addresses for each private key. The user can select either address when providing a receive address to an external site.
When sending coins, the transaction type is determined by the outputs being spent. A witness transaction will be created if any output is a witness output. Otherwise, a legacy transaction is created. The change address is then selected based on the transaction type.
This should provide interoperability with both new and old wallets. Even if segwit is activated, that doesn't mean a particular web site will accept witness transactions. So wallets will need to support both for some time.
|
|
|
|
trout
|
|
December 01, 2016, 01:28:38 PM |
|
Even if segwit is activated, that doesn't mean a particular web site will accept witness transactions. So wallets will need to support both for some time.
AFAIU, non-segwit-supporting wallets will still recognize transactions with segwit inputs. So no need keep creating P2PKH addresses in order to be able to pay to non-segwit wallets
|
|
|
|
dbstmddhks
|
|
December 01, 2016, 02:53:58 PM |
|
It is soft-forking.
I don't think this makes an address change.
From wan.
|
|
|
|
ScripterRon
|
|
December 01, 2016, 03:52:12 PM |
|
Even if segwit is activated, that doesn't mean a particular web site will accept witness transactions. So wallets will need to support both for some time.
AFAIU, non-segwit-supporting wallets will still recognize transactions with segwit inputs. So no need keep creating P2PKH addresses in order to be able to pay to non-segwit wallets I need to generate P2PKH addresses for non-segwit wallets sending coins to me (the generated addresses are for my private keys). You are correct that non-segwit wallets should handle witness transactions since they will receive them in legacy format.
|
|
|
|
amaclin (OP)
Legendary
Offline
Activity: 1260
Merit: 1019
|
|
December 01, 2016, 03:55:56 PM |
|
You are correct that non-segwit wallets should handle witness transactions since they will receive them in legacy format. only when confirmed.
|
|
|
|
achow101
Moderator
Legendary
Offline
Activity: 3388
Merit: 6641
Just writing some code
|
|
December 01, 2016, 04:19:04 PM |
|
Even if segwit is activated, that doesn't mean a particular web site will accept witness transactions. So wallets will need to support both for some time.
AFAIU, non-segwit-supporting wallets will still recognize transactions with segwit inputs. So no need keep creating P2PKH addresses in order to be able to pay to non-segwit wallets I need to generate P2PKH addresses for non-segwit wallets sending coins to me (the generated addresses are for my private keys). You are correct that non-segwit wallets should handle witness transactions since they will receive them in legacy format. You should be using p2sh nested segwit addresses. The segwit scripts are the "redeemscript" of a p2sh address. Since all wallets today can use p2sh, this lets wallets without segwit still be able to send to you and you can take advantage of segwit.
|
|
|
|
|