According to BIP141, the formula for calculating block/transaction weight is:
BASE SIZE * 3 + TOTAL SIZE
According to Bitcoin wiki (and also based on the above formula):
- Each byte of the segwit marker, flag, and witness fields counts as one weight unit
- Each byte of the other fields in the transaction counts as four weight units
This puts a new limit to transaction size close to 4MB.
So my question is: Why is the discount, that is, the factor, of segWit data exactly 4? Why don't we use a higher factor, for example 5 or 6? That way, we would get an even bigger discount and have even bigger blocks and thus a bigger number of transactions that we can process in the same time.
Murch
has left links to some of the similar questions. However, none of these answer the question why the factor of 4. Jannes
said in his answer that it is because TXout is 1/4 the size of TXins
. This makes it clear to me why 2
or 3
was not taken as a factor. We simply wouldn't have big enough benefits. However, it is still not clear to me why a larger factor was not taken, such as 5, 6 or something even higher.
Jannes
in his answer in the first linked question talks about it being becauseTXout is 1/4 the size of TXin
, although he didn't go into specific details. The good thing is that he posted links that I think go a little deeper into it. I will go through those reddit discussions (that he left) in detail and see if I understand. If so, I will answer the question myself, unless someone has already done so. – dassd Sep 13 '23 at 15:56