6

I roughly understand how SegWit works, but not the details, got a few practical questions.

If I understood correctly there are separate 'SegWit addresses'. How does that work, do they look like normal addresses? Will older non-SegWit clients also be able to send txs to such addresses? Or is it a new address format, that will not be recognized by older clients?

If I want people to be able to send SegWit transactions to me, do I have to give them a SegWit address, or can they also send SegWit txs to regular addresses?

Similarly, if I send a SegWit tx to someone else, will they receive it even if they are using an older non-SegWit client? Or perhaps will they not recognize or accept the tx as long as it's unconfirmed, but once it's confirmed they have the bitcoins?

5

How does that work, do they look like normal addresses? Will older non-SegWit clients also be able to send txs to such addresses? Or is it a new address format, that will not be recognized by older clients?

There are two types of "segwit addresses": P2SH nested and Bech32 addresses.

P2SH nested addresses just make use of the currently existing P2SH address and output styles. Since P2SH addresses are supported by all modern Bitcoin wallets, non-segwit clients can still send to these. These look like normal 3... addresses.

Bech32 addresses are completely new. They are a new construction designed specifically for segwit. Only wallets which have been updated to support Bech32 can send to Bech32 addresses. These look like bc1...

If I want people to be able to send SegWit transactions to me, do I have to give them a SegWit address, or can they also send SegWit txs to regular addresses?

There really isn't a "segwit transaction" per se. Rather there are segwit outputs, and these outputs are spent in a different way from other outputs. A transaction can create both Segwit and non-segwit outputs, and a transaction can spend from both segwit and non-segwit outputs. If you are a receiver and you want to use segwit, then the person sending you money must create a segwit output that you can spend. If you want to use segwit and send money to someone who does not, then you can create a transaction which spends a segwit output and creates a non-segwit output.

  • Thanks Andrew. If I received bitcoins and want to spend those as segwit-outputs, should I very first if the next recipient supports segwit? Or can I just send it as segwit-outputs as long as their address is a P2SH (i.e. 3...) address? Or can I expect a complaint from them if it turns out they don't support segwit, and thus can't spend the bitcoins I sent them? – RocketNuts Nov 13 '17 at 15:11
  • Or related to this, is there a way to identify or recognize an address as segwit-compatible? (I mean a P2SH 3... address, a bech32 address is always segwit compatible) Or is it impossible to distinguish from 'regular' (non-segwit) multisig addresses that also start with 3...? – RocketNuts Nov 13 '17 at 15:13
  • 1
    The only thing that matters for spending segwit outputs is if you are able to spend them. It does not matter if the recipient of the transaction understands segwit or not. For P2SH nested segwit outputs, those outputs and addresses are indistinguishable from other P2SH outputs (e.g. multisig) and addresses until they are spent. – Andrew Chow Nov 13 '17 at 16:04
  • The deposit addresses for my Kraken and Bitstamp account for example, they are 3... P2SH addresses. Can I safely send bitcoins there as segwit-outputs? I mean regardless of whether I received them (from the previous sender) as segwit or non-segwit outputs. So the new utxo I am creating for (or sending to) their address, is it safe to make that a segwit output? No need to verify or doublecheck with them if they accept that? (sorry if these questions seem duplicate, I'm really trying to get this clear, very much appreciate your help!) – RocketNuts Nov 14 '17 at 7:56
  • It is worth nothing though, that a transaction can spend from both segwit and non-segwit outputs is only possible from segwit enabled wallets. While, A transaction can create both Segwit and non-segwit outputs is possible from non-segwit enabled wallets. Right? – Jus12 Dec 8 '17 at 7:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.