1

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

  1. Each byte of the segwit marker, flag, and witness fields counts as one weight unit
  2. 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.

7
  • 3
    Does bitcoin.stackexchange.com/q/43596/5406 or bitcoin.stackexchange.com/q/108333/5406 answer your question?
    – Murch
    Commented Sep 12, 2023 at 22:20
  • If either of these other topics fully answered your question, please flag your own topic as a duplicate of the respective topic. This will ensure that other users find the corresponding topic when they rediscover your topic. If your question has not been fully answered, please edit your question to clarify how your question exceeds the linked topics.
    – Murch
    Commented Sep 13, 2023 at 15:26
  • 2
    @Murch None of the accepted answers gives an answer to the question why exactly the multiplier 4 is used and not 5 or 6. However, Jannes in his answer in the first linked question talks about it being because TXout 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
    Commented Sep 13, 2023 at 15:56
  • Thanks, that would be great
    – Murch
    Commented Sep 13, 2023 at 17:56
  • 1
    @Murch Hey, Murch. It seems that the factor of 4 was chosen empirically (based on experience) so that segWit gets a sufficient discount, without damaging the network (which would be the case if the factor were higher). I'm not sure in what ways a larger factor would harm the network, but this text talks about it. I will edit a question a little bit because I see that many did not understand exactly what I wanted to ask. I hope that someone who knows Bitcoin better will answer at some point.
    – dassd
    Commented Sep 14, 2023 at 14:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.