Bitcoin Forum
May 10, 2024, 10:05:23 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: segwit and address formats  (Read 240 times)
10_sjdovn_10 (OP)
Member
**
Offline Offline

Activity: 100
Merit: 30

Stay humble, be cool, make world better place.


View Profile
February 18, 2021, 06:33:45 AM
 #1

Hello , anybody can explain Why to use SEGWIT or why not ?
and what is benefits of using SEGWIT with other  wallet formats ?
According to NIST and ECRYPT II, the cryptographic algorithms used in Bitcoin are expected to be strong until at least 2030. (After that, it will not be too difficult to transition to different algorithms.)
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715378723
Hero Member
*
Offline Offline

Posts: 1715378723

View Profile Personal Message (Offline)

Ignore
1715378723
Reply with quote  #2

1715378723
Report to moderator
1715378723
Hero Member
*
Offline Offline

Posts: 1715378723

View Profile Personal Message (Offline)

Ignore
1715378723
Reply with quote  #2

1715378723
Report to moderator
1715378723
Hero Member
*
Offline Offline

Posts: 1715378723

View Profile Personal Message (Offline)

Ignore
1715378723
Reply with quote  #2

1715378723
Report to moderator
ranochigo
Legendary
*
Offline Offline

Activity: 2968
Merit: 4177



View Profile
February 18, 2021, 06:52:19 AM
 #2

Segwit removes the signature from the transaction and bundles it separately. This also means that the convention for calculating transaction size has changed. With Segwit, the transaction are cheaper to make due to the method used when calculating the transaction size which makes it much cheaper than legacy transactions. I can't really see any downsides to be using segwit.

There's Bech32 which is also known as native Segwit as well as nested Segwit which is the witness being nested in the P2SH script. The latter starts with 3 and the former starts with bc1, the weight units of bech32 is smaller than nested Segwit but nested Segwit is compatible with all of the wallets and services while bech32 is not compatible with all.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
tranthidung
Legendary
*
Offline Offline

Activity: 2268
Merit: 4013


Farewell o_e_l_e_o


View Profile WWW
February 18, 2021, 07:00:17 AM
 #3

Your transaction fee will be decided by the formula
  • Transaction fee = transaction size * fee rate

If you're using a non-custodial wallet, you are fully controlling fee rate for your transactions. Now, let's assume you use a fixed fee rate for your transaction, so you will get a smaller transaction fee if you can reduce your transaction size.

It can be done by two main methods:
  • Reduce your total inputs and/ or total outputs for your transactions
  • With same number of inputs and outputs, you can reduce the size with Segwit address and related transaction to and from Segwit address.


▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
NeuroticFish
Legendary
*
Offline Offline

Activity: 3668
Merit: 6383


Looking for campaign manager? Contact icopress!


View Profile
February 18, 2021, 07:45:01 AM
 #4

and what is benefits of using SEGWIT with other  wallet formats ?

I'll make it simple. The benefit for you would be the cost of transactions.

If you make a typical transaction with old type of wallet to old type of wallet, for 10 sat/vbyte you'll pay around 2570 satoshi. (see c71cfdbf267a23f1c512933d11305529f4dd9e036642ff11b4b26c38a25bd0ca)
If you make a typical transaction with segwit compatible wallet to segwit compatible wallet, for 10 sat/vbyte you'll pay around 1660 satoshi. (see 0cdadafb139f58666a146d4627cb2e891db8d93d0ec5321a86d6f4a5cd07338c)
If you make a typical transaction with segwit bech32 wallet to bech32, for 10 sat/vbyte you'll pay around 1410 satoshi. (see 116010d6a51087238ebc8f9e8e33a159ccee7f9fe818ef8aa00314bfd51f51e4)

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
hosseinimr93
Legendary
*
Online Online

Activity: 2394
Merit: 5235



View Profile
February 18, 2021, 08:05:50 AM
Merited by vapourminer (1)
 #5

  • With same number of inputs and outputs, you can reduce the size with Segwit address and related transaction to and from Segwit address.
By using segwit addresses, you don't decrease the size.

Transactions fee is actually calculated based on weight unit. A transaction with segwit address(es) has lower weight unit (not lower size) and you can pay lower fee for it.
That's why we use virtual byte (weight unit / 4) when calculating fees.  

Segwit transactions include some witness data.
Since 1 byte of witness data is equivalent to 0.25 vbyte, segwit transactions have lower virtual size.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Charles-Tim
Legendary
*
Offline Offline

Activity: 1540
Merit: 4856



View Profile
February 18, 2021, 09:11:07 AM
Last edit: February 20, 2021, 08:39:39 PM by Charles-Tim
 #6

To make this clear, it is clear that segwit transaction are weighed not in size but weight unlike the legacy transactions. But, to make it short, the transaction fee can be known from the input and output vbytes of each addresses.

Input
Legacy= 149 vbytes for compressed addresses, while 180 vbytes for uncompressed addresses
Nested segwit= 93 vbytes
Native segwit= 68 vbytes

Output
Legacy= 34
Nested segwit= 32
Native segwit= 31

The transaction size in vbytes for 1 input and 2 output
Legacy= 226/228 for compressed dresses. While 257/259
Nested segwit= 166/168
Segwit= 139/141

Assuming the feerate is set to 100 satoshi/vbytes
Legacy= 226/228 for compressed dresses. While 257/259
100*226= 22600 satoshi for compressed legacy addresses
100*257= 25700 satoshi for uncompressed legacvy addresses

Nested segwit= 166/168
100*166= 16600 satohi

Segwit= 139/141
100*139= 13900 satoshi

Legacy addresses start with 1
Nested segwit addresses start with 3
Segwit addresses starts with bc1

So, with native segwit, you will save much fee. With nested segwit, much fee will also be saved but not as low as native segwit. With legacy, you will pay highest fee, especially if the address is uncompressed. In conclusion, use segwit addresses to pay cheapest fee, especially cheapest while using segwit address to pay segwit address.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Charles-Tim
Legendary
*
Offline Offline

Activity: 1540
Merit: 4856



View Profile
February 19, 2021, 11:09:42 AM
Merited by vapourminer (1)
 #7


The formula for fee calculation
Input*180 + output*34 + 10 plus or minus input

To use this formula for native/nested segvit I need to replace "180" and "34" with those values which are relevant to the type of both inputs and outputs, is this correct? What advantage in using this  formula  compared with  online calculators that allow to estimate the fee for given transaction?
Yes, only the input and the output will be changed, also know that the result is actually vsize or vbytes which is measure in weight of a transaction divided by four for segwit. Those input and output size are just for easy calculation sake which will also give the same result.

There is nothing bad to make use of online calculator, but making use of the ones that are not wrong in the calculation. The information above is just for knowing sake.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
ranochigo
Legendary
*
Offline Offline

Activity: 2968
Merit: 4177



View Profile
February 19, 2021, 04:13:41 PM
 #8

Are transactions that contain SEGWIT addresses better to be listed in the next block because they often contain more fees than regular Legacy transactions?
For the transactions of the same raw size paying the same fees, Segwit transactions are more likely to be included into the next block. Their virtual size is much lower than the legacy transaction despite them having the same raw size. This results in the segwit transaction having a much larger fees/virtual size.
SEGWIT is soft forks are not implemented by all nodes and some block explore cant see SEGWIT addresses
Yes, but that doesn't affect anyone else. The majority of the network and the miners are recognizing segwit addresses right now; this means that segwit transactions will have a good propagation. Having nodes or block explorers that are un-upgraded will not result in miners not accepting segwit transactions. If they can't recognize it, then you shouldn't be using them.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10558



View Profile
February 20, 2021, 04:32:19 AM
Merited by ranochigo (1), ABCbits (1), hosseinimr93 (1)
 #9

Segwit removes the signature from the transaction and bundles it separately.
SegWit does NOT remove anything from transactions, least of which the signature. The signature is still a part of each transaction and it is communicated and stored as the part of that transaction no different than its version, outputs, locktime,... in other words the structure is changed.
The only time it is removed is when sending a SegWit transaction to an old node and that's only because we want to continue letting them run while they are no longer "full nodes".

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!