Bitcoin Forum
November 19, 2018, 04:19:54 AM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What is the difference between Segwit? Native Segwit? Legacy? Which one better?  (Read 144 times)
ResuLT
Member
**
Offline Offline

Activity: 294
Merit: 10


View Profile WWW
January 07, 2018, 12:03:02 PM
 #1

As the title says, what is the difference between them and which one is better to use for making each incoming and outcoming transaction confirmation faster?

1542601194
Hero Member
*
Offline Offline

Posts: 1542601194

View Profile Personal Message (Offline)

Ignore
1542601194
Reply with quote  #2

1542601194
Report to moderator
1542601194
Hero Member
*
Offline Offline

Posts: 1542601194

View Profile Personal Message (Offline)

Ignore
1542601194
Reply with quote  #2

1542601194
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1542601194
Hero Member
*
Offline Offline

Posts: 1542601194

View Profile Personal Message (Offline)

Ignore
1542601194
Reply with quote  #2

1542601194
Report to moderator
1542601194
Hero Member
*
Offline Offline

Posts: 1542601194

View Profile Personal Message (Offline)

Ignore
1542601194
Reply with quote  #2

1542601194
Report to moderator
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 1190
Merit: 1132



View Profile
January 07, 2018, 01:37:53 PM
 #2

I'm not sure what native segwit is, presumably that's just a pay-to-script transaction.
Legacy is the "original" transaction protocol. Segwit was set in place to reduce the demand on the network which is normally an address beginning with a 3 or a bech address (represented differently, normally with bv1 at the start).

Onto transaction times: both will confirm in the same amount of time for a specific fee (the legacy transaction fee will be higher). As a segwit transaction is slightly smaller, a lower fee can be paid and smaller transactions might fit into a block better than larger ones.

legend018
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
January 07, 2018, 10:03:06 PM
 #3

Some discussions about it happened here:https://bitcointalk.org/index.php?topic=2251039.0
bob123
Hero Member
*****
Offline Offline

Activity: 742
Merit: 698



View Profile WWW
January 08, 2018, 06:04:24 PM
 #4

Segwit basically does one thing: It removes redundant data from the transaction, and therefore lowers the size.
You have the choice between native segwit (bech32, starting with bc1...) and P2WPKH nested into P2SH (starting with 3... ).
Legacy addresses are the 'original' addresses which were introduced first (starting with 1..).
P2WPKH/P2SH addresses have the advantage of lowering transaction size ~30% (compared to legacy).
Bech32 transations are even smaller, but unfortunately a lot of online services don't accept these address type yet.

fabiorem
Sr. Member
****
Offline Offline

Activity: 574
Merit: 295


View Profile
January 08, 2018, 09:03:45 PM
 #5

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?

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.

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?
HCP
Hero Member
*****
Offline Offline

Activity: 784
Merit: 952

<insert witty quote here>


View Profile
January 09, 2018, 02:31:06 AM
 #6

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.

bob123
Hero Member
*****
Offline Offline

Activity: 742
Merit: 698



View Profile WWW
January 09, 2018, 09:38:52 AM
 #7

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/

fabiorem
Sr. Member
****
Offline Offline

Activity: 574
Merit: 295


View Profile
January 18, 2018, 06:34:08 PM
 #8

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?
bob123
Hero Member
*****
Offline Offline

Activity: 742
Merit: 698



View Profile WWW
January 19, 2018, 10:09:10 AM
 #9

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.

fabiorem
Sr. Member
****
Offline Offline

Activity: 574
Merit: 295


View Profile
January 19, 2018, 04:47:37 PM
 #10

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.
AdolfinWolf
Hero Member
*****
Offline Offline

Activity: 854
Merit: 685



View Profile
January 19, 2018, 05:05:28 PM
 #11

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.).

fabiorem
Sr. Member
****
Offline Offline

Activity: 574
Merit: 295


View Profile
January 19, 2018, 06:27:42 PM
 #12

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.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!