In pre-segwit bitcoin, process of calculating transaction fee was easy. Actually everything was based on the fact that the byte has its own value/price (estimated by network) and then fee is obtained as number_of_bytes * proce_of_single_byte
. So, for example, if the price of one byte
is 10 sats, then the fee for a transaction of 250 bytes is 2500 sats.
But what about calculating a fee in post-segwit Bitcoin?
In post-Segwit Bitcoin, bytes have a different value/price depending on the type of byte. So, if the byte is segwit then it is worth 4 times less than a non-segwit byte, that is its price is 4 times smaller. The question is: how is the transaction fee calculated in this case?
Is it done by not using bytes
now, but vbytes
and then they have a value (price)? And at that, each byte of non-segwit is one vbyte
, while each byte of segwit is 0.25 vbyte
? So, for example, if the price of one vbyte
is 10 sats, then the fee for a transaction of 250 bytes (150 non-segwit, 100 segwit) is (150 * 10 sats) + (100/4 * 10 sats) = 1750 sats. So, in post-segwit bitcoin for calculating transaction fee we use (number_of_nonsegwit_bytes * price_of_single_vbyte) + (number_of_segwit_bytes / 4 * price_signle_vbyte)
Is this how software and miners calculate transaction fee?
I'm asking because here
Pieter Wuille
said that vsize has no meaning except for humans
, while bitcoin uses weight because of integer numbers. If this is true and vbytes are not actually used in softwares for calculating fee, how is the fee then calculated?
weight
orvbyte
are used for calculating fee. In the second answer to the question you left the link forzono
said the followingMiners consider fee(in satoshi) **per weight** of each transaction in order to maximize their profit.
However, you said the followingThe virtual size corresponds to the blockweight which determines the fees
. Pieter Wuille (I linked in question) said thatvsize has no meaning except for humans
and that Bitcoin uses weight because of integer numbers. So what does bitcoin softwares use?