Pages:
Author

Topic: What is the difference between Segwit? Native Segwit? Legacy? Which one better? - page 2. (Read 969 times)

legendary
Activity: 1876
Merit: 3132
so, Nested Segwit is synonymous to Segwit, not Native Segwit..
and Native Segwit is synonymous to Bech32, right?

SegWit is a protocol upgrade. Nested SegWit is a type of address which starts from 3 and offers full compatibility while providing some benefits of the native SegWit. Native SegWit is also referred to as the bech32 address (it starts from bc1).

but on this wiki it reports BitStamp as not yet adopting bech32 ..  Huh

Oh, you're right. It's weird that they don't allow sending to bech32 addresses while generating nested SegWit ones. Choose a nested SegWit address then. It should start with 3 and it will be completely compatible with all services. I am sorry for confusing you.
legendary
Activity: 1946
Merit: 1427
Quote

but on this wiki it reports BitStamp as not yet adopting bech32 ..  Huh
Might be outdated. I haven't used Bitstamp, but i'd be surprised if they didn't let you withdraw to bech32 adresses by now.

Edit: actually, as per May, they didnt seem to support it either: https://github.com/spesmilo/electrum-docs/issues/92
Not sure if that's already changed.

Quote
and a stupid question, why is it that if it was introduced later they called it "Native", just to add some more confusion ..  Smiley
Because the bech32 implementation makes use of all the advantages Segwit has to offer, whereas nested segwit (3.. adresses) doesn't.
I'm assuming that's why they called the former "Native" because it's a more "complete" implementation.

Basically: https://bitcoin.stackexchange.com/a/74792, and if you're interested as to why bech32 adresses are cheaper; https://bitcoin.stackexchange.com/a/78934

ed: This site seems to give a good alternative overview of services that support segwit next to the wiki. https://segwit.support/ (Wtf Binance!)


jr. member
Activity: 54
Merit: 1

Since BitStamp supports SegWit, I would recommend you choosing a native SegWit address in the Ledger Live. Nested SegWit ensures 100% compatibility with services which don't support SegWit yet, but you will save a bit less on fees in the future if you choose it.

so, Nested Segwit is synonymous to Segwit, not Native Segwit..

and Native Segwit is synonymous to Bech32, right?


but on this wiki it reports BitStamp as not yet adopting bech32 ..  Huh

and a stupid question, why is it that if it was introduced later they called it "Native", just to add some more confusion ..  Smiley
legendary
Activity: 1876
Merit: 3132
what the heck do I choose??  Grin  Huh

Since BitStamp supports SegWit, I would recommend you choosing a native SegWit address in the Ledger Live. Nested SegWit ensures 100% compatibility with services which don't support SegWit yet, but you will save a bit less on fees in the future if you choose it.
jr. member
Activity: 54
Merit: 1
I've been reading the topic but couldn't find an answer to my issue, which is real simple:

what the heck do I choose??  Grin  Huh



I have a BitStamp account waiting and still cant understand if I need to activate a Native Segwit or Segwit account on my Ledger Live ..

I have found this article on the news announcement section of BitStamp but wasnt able to find out where my address belongs and still cant move on
legendary
Activity: 2674
Merit: 2965
Terminated.
Ah I'm on about sending to, you're on about sending from.

A lot of sites still don't support native segwit. They've built brand new websites in that time some of them too and still don't accept it... But yes bad form validation also needs to be blamed.
No... I'm talking about sending to and it really has nothing to do with full nodes... it is simply bad programming on the part of the sites.

Example: Site/Wallet asks you to put your withdrawal address in or the address you want to send to... you enter a bc1 address it says "invalid address"... that is most likely a pure validation issue. Users are then like "Why cannot I send from to my "bc1" address?"... and this ends up causing confusion and the incorrect belief that you can only send to certain types of addresses from specific address types.
It is a pure validation issue, no need for the 'likely' part. Implementing native Segwit decoding is really easy if you look at the examples from the BIP. If their software team is that unqualified they could just bulk source addresses from Bitcoin Core.  Roll Eyes

It's probably more correct to say that you can only send to certain address types from some specific wallets/sites... but that's not an issue with Bitcoin, that's because those specific wallets/sites are "broken".
Correct.
HCP
legendary
Activity: 2086
Merit: 4361
Ah I'm on about sending to, you're on about sending from.

A lot of sites still don't support native segwit. They've built brand new websites in that time some of them too and still don't accept it... But yes bad form validation also needs to be blamed.
No... I'm talking about sending to and it really has nothing to do with full nodes... it is simply bad programming on the part of the sites.

Example: Site/Wallet asks you to put your withdrawal address in or the address you want to send to... you enter a bc1 address it says "invalid address"... that is most likely a pure validation issue. Users are then like "Why cannot I send from to my "bc1" address?"... and this ends up causing confusion and the incorrect belief that you can only send to certain types of addresses from specific address types.

It's probably more correct to say that you can only send to certain address types from some specific wallets/sites... but that's not an issue with Bitcoin, that's because those specific wallets/sites are "broken".
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
Ah I'm on about sending to, you're on about sending from.

A lot of sites still don't support native segwit. They've built brand new websites in that time some of them too and still don't accept it... But yes bad form validation also needs to be blamed.
HCP
legendary
Activity: 2086
Merit: 4361
The only time transactions don't work is when exchanges or wallets done host from full nodes.
I doubt that is true... it more likely a result of "broken" programming that is doing address validation based purely on Base58 P2PKH and P2SH address formats... that is to say... "1" or "3"-type addresses.

The fallacy that "you can't send from X-type address to Y-type address" came about because certain (popular) websites just don't (or didn't) recognise bech32 addresses (aka "bc1") as being "valid" address types. It has nothing to do with whether or not they're running full nodes.

For instance, you can have v0.17.1 of Bitcoin Core running in the backend, but if your frontend UI is not setup to accept "bech32" as a valid address... then it's still not going to let you send to a bc1 address Tongue
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
The only time transactions don't work is when exchanges or wallets done host from full nodes.

All implementation is deigned to be backwards compatible (when possible) and this is no exception. Any core node after about v0.9 (I think) will recognise segwit as being fairly standard as a transaction and will process it through. The errors come when wallets and services done rely on full nodes for transaction data and instead use sloppy programming to contact random nodes it trusts...

P2SWH afaik is essentially the same as all the other transactions its just that the signed part is removed and placed elsewhere in order to increase the limit of the blocks.



Wow I was stupid 15 months ago...
legendary
Activity: 3430
Merit: 3080
we have P2WPKH which is the bc1 or bech32 addresses, these require clients to be upgraded
we have P2PKH which is the 1 or base58 or legacy addresses, this should work without upgrade since it is the old version

Yep, that's right


we have P2SH which is the multi sig and has nothing to do with SegWit and should work like the last one
we have P2WSH which is the nested SegWit where we use a workaround to get an address which starts with 3 and looks the same as P2SH so that old clients without upgrade can work with this one too if they are lazy enough not to upgrade.

Not totally right, but it's not relevant why that's wrong for this discussion



Basically:

Either your software supports native SW, or it doesn't (because native SW is newest).

Until your software supports native SW, use the script-wrapped addresses instead (addresses beginning with a 3)
legendary
Activity: 3472
Merit: 10611
Which work and which don't? The end goal is to get everyone on Bc1 right? Most of the replies to "can I send from this to that" seem to be yes, but I have not had that fortune.

all of them work and there is no end goal here. think of SegWit as the additional features that we added on top of bitcoin. now to use those features you have to upgrade. otherwise you can send from any address to any other address without a problem.
the fact that you couldn't send bitcoin from Binance account to a bc1 address only shows that Binance has not yet upgraded their system even though more than a year has passed.

Legacy > Legacy = Yes
Legacy > P2SH = Yes?
Legacy > Bech1/Bc1 = ?

P2SH > Legacy = ?
P2SH > P2SH = Yes
P2SH > Bc1 = Yes

Bc1 > Legacy = ?
Bc1 > P2SH = Yes?
Bc1 > Bc1 = Yes
the answer to all of the above is YES.

Also am I using P2SH nomenclature correctly? Or should I be referring to the hybrid/bridge addresses as P2WPKH? or should I be technical and say "P2WPKH nested into P2SH"? What is the proper shorthand?

we have P2WPKH which is the bc1 or bech32 addresses, these require clients to be upgraded
we have P2PKH which is the 1 or base58 or legacy addresses, this should work without upgrade since it is the old version
we have P2SH which is the multi sig and has nothing to do with SegWit and should work like the last one
we have P2WSH which is the nested SegWit where we use a workaround to get an address which starts with 3 and looks the same as P2SH so that old clients without upgrade can work with this one too if they are lazy enough not to upgrade.
newbie
Activity: 1
Merit: 1
I've read all of these replies, as well as other threads over the last couple of years, and I must say I still am confused about one thing.

What wallets can send to what wallets. It is not an any combination is ok thing because each time I've tried to make a SegWit wallet to support the ecosystem, I run into trouble. It seems to me there are 9 types of transactions. Which work and which don't? The end goal is to get everyone on Bc1 right? Most of the replies to "can I send from this to that" seem to be yes, but I have not had that fortune. Every time I've tried I've been denied. I can't remember what I tried as I've tried a few times over the last year or 2 or however long it's been. One that I remember in particular is trying to send Bitcoin from Binance to I believe a Bc1? It was Electrum, and I don't remember if it was Bc1 or P2SH nested.

Please explain if I am mis understanding, and can someone copy paste this and fill in the ?'s and confirm or deny the Yes?'s

Legacy > Legacy = Yes
Legacy > P2SH = Yes?
Legacy > Bech1/Bc1 = ?

P2SH > Legacy = ?
P2SH > P2SH = Yes
P2SH > Bc1 = Yes

Bc1 > Legacy = ?
Bc1 > P2SH = Yes?
Bc1 > Bc1 = Yes

Also am I using P2SH nomenclature correctly? Or should I be referring to the hybrid/bridge addresses as P2WPKH? or should I be technical and say "P2WPKH nested into P2SH"? What is the proper shorthand?
sr. member
Activity: 1400
Merit: 347
So yes, you should've sent them from the exchange to a segwit adress.


I sent to the segwit address now, and it worked.

Sending 100k satoshis from the legacy address results in a 98k satoshi fee. Sending this same value from the segwit address results in a 83k satoshi fee. That is a 15% difference.
legendary
Activity: 1946
Merit: 1427
I did some experiment. Sent a bit more than 0.006btc from a exchange to a new wallet. Before sending, I assigned the only address on this wallet a segwit address. After adding the segwit address, I sent from the exchange to the initial legacy address, not the segwit one.

Then closed QT, got back to the August wallet, re-open QT, and tried to sent 0.005btc from there to the exchange. The fee was 98000 satoshis, approximately. Since I was only checking, I didnt sent the value.

Closed QT again, switched to the new wallet, re-open QT, and tried to sent 0.005btc from this one to the exchange, got the same 98000 satoshis fee. Again, I was only checking, but I got the same fee to send 500000 satoshis.

What I did wrong? Should I have sent from the exchange to the segwit address, instead of the legacy one? I didnt sent to the segwit address, because I thought this address is only to witness transactions for the main address.
No, that's not how it works. The segwit adress doesn't do anything for a legacy adress.. You will indeed need to send the funds to a segwit compatible adress to make a segwit transaction from there, as explained above.

You just simply made a legacy transaction, hence why the fees remained the same.

So yes, you should've sent them from the exchange to a segwit adress.

I believe to then send them back will also give you the reduced fees, even if the exchange doesn't support segwit adresses. ( eg. if they still use the 1... standard adresses.) ( Would love if someone could correct me if i'm wrong on this.).
sr. member
Activity: 1400
Merit: 347
I did some experiment. Sent a bit more than 0.006btc from a exchange to a new wallet. Before sending, I assigned the only address on this wallet a segwit address. After adding the segwit address, I sent from the exchange to the initial legacy address, not the segwit one.

Then closed QT, got back to the August wallet, re-open QT, and tried to sent 0.005btc from there to the exchange. The fee was 98000 satoshis, approximately. Since I was only checking, I didnt sent the value.

Closed QT again, switched to the new wallet, re-open QT, and tried to sent 0.005btc from this one to the exchange, got the same 98000 satoshis fee. Again, I was only checking, but I got the same fee to send 500000 satoshis.

What I did wrong? Should I have sent from the exchange to the segwit address, instead of the legacy one? I didnt sent to the segwit address, because I thought this address is only to witness transactions for the main address.
legendary
Activity: 1624
Merit: 2481
What I know is that you can create a segwit address using a legacy address. I did this in a empty wallet, just as a experiment, but when I tried a transaction from my main wallet to this empty wallet it had the same usual fees of legacy wallets. 

As i already mentioned previously, it doesn't matter which address you are sending TO. This doesn't make any difference in size.
It matters FROM which address you are sending.
legacy -> any_address = 'standard' fee
segwit -> any_address = lower fee due to lower tx size (weight).



However, I didnt create a segwit address in my main wallet, because I dont know if it is safe to generate those address in a wallet created in August 2017, that is, before the implementation of Segwit.

SegWit got activated 23.08.2017.
But even if your wallet file was created before that date there won't be any problems with creating segwit addresses in an pre-segwit created wallet.
You are using the latest version of core, right?

Additionally you should still make backups. In case of anything not working you will always be able to restore your old wallet file.



Should I send all the btc to the empty wallet, which have a segwit address, and only then, assumes that new transactions coming from this new wallet will be smaller?

Yes.
sr. member
Activity: 1400
Merit: 347
The easiest way of 'switching to SegWit' would be to simply send your whole balance to a (newly generated) SegWit wallet/address.
You don't have to first create another legacy wallet. That would just be an additional (unnecessary) transaction (incl. fees).
Just create a SegWit wallet and send your funds over. Depending on the amount of 'inputs' you have it might result in a pretty big TX (and high fees).



I use bitcoin-QT as wallet. If I move my wallet to another folder, QT creates a new wallet automatically when it starts. But this new wallet is always with a legacy address.

What I know is that you can create a segwit address using a legacy address. I did this in a empty wallet, just as a experiment, but when I tried a transaction from my main wallet to this empty wallet it had the same usual fees of legacy wallets.

However, I didnt create a segwit address in my main wallet, because I dont know if it is safe to generate those address in a wallet created in August 2017, that is, before the implementation of Segwit.

Should I send all the btc to the empty wallet, which have a segwit address, and only then, assumes that new transactions coming from this new wallet will be smaller?
legendary
Activity: 1624
Merit: 2481
If I create a new wallet, and send a segwit transaction there (for example, to claim forked coins), which wallet need to have a segwit address (starting with 3), the one which is sending the bitcoin, or the one which is receiving it? 

It is irrelevant which address you are sending to.
If YOU are using a segwit address, your transactions will be lower in size (in comparison to sending from legacy).



I tried to send to another wallet with a segwit address, but the fee was even higher than to a normal address. The recipient was a segwit address, the sender was legacy. The normal address on the recipient was asking standard fees.

The fee is usually being set as a rate (e.g. sat/B). As long as you send the same transaction (same amount of inputs/outputs - your wallet may have changed that),
the transaction size sent from a SegWit address will be lower than from a legacy address.



My current wallet holding bitcoins is from august 2017, before segwit locked in. Should I make another legacy wallet, send a legacy transaction there, and only then create a third wallet which would be segwit?

The easiest way of 'switching to SegWit' would be to simply send your whole balance to a (newly generated) SegWit wallet/address.
You don't have to first create another legacy wallet. That would just be an additional (unnecessary) transaction (incl. fees).
Just create a SegWit wallet and send your funds over. Depending on the amount of 'inputs' you have it might result in a pretty big TX (and high fees).
If you recieved a lot of small transactions, you might wait until the backlog of unconfirmed transactions has settled a bit (to not pay too much fees). [1]

[1] Currently 170k+ unconfirmed TX's (blockchain.info/unconfirmed-transactions) - Fee estimation: https://estimatefee.com/ and https://bitcoinfees.earn.com/
HCP
legendary
Activity: 2086
Merit: 4361
If I create a new wallet, and send a segwit transaction there (for example, to claim forked coins), which wallet need to have a segwit address (starting with 3), the one which is sending the bitcoin, or the one which is receiving it?
You don't need to send "SegWit" transactions to claim forked coins? What exactly are you trying to do? Huh


Quote
I tried to send to another wallet with a segwit address, but the fee was even higher than to a normal address. The recipient was a segwit address, the sender was legacy. The normal address on the recipient was asking standard fees.
Then something changed the DATA size of the transaction... or the "dynamic" fee rates changed. Generally, identical transactions (same number of inputs/outputs) being sent from a legacy address, should result in the same data size and same fee, regardless of the address types being sent to.


Quote
My current wallet holding bitcoins is from august 2017, before segwit locked in. Should I make another legacy wallet, send a legacy transaction there, and only then create a third wallet which would be segwit?
Or can my current wallet, which was created before the lock-in, generate a segwit address (starting with 3), and then send to a legacy address in a second wallet, which would not have any segwit address?
Depends on your wallet. Some wallet software let you create SegWit addresses in exiting wallet files... some wallet software requires you create a completely new SegWit only wallet file.
Pages:
Jump to: