Author

Topic: Why are segwit blocks not bigger? (Read 159 times)

brand new
Activity: 0
Merit: 1
January 16, 2021, 09:47:46 AM
#6
4 MB is a theoretical limit. In practice, it won't be reached. Miners are already filling up blocks as much as they can, you just don't see this reflected in the block size because the actual metric is block weight. The block weight for these blocks has been as close to the limit as possible.

The 4 MB theoretical limit comes from a calculation where the block consists of entirely witness data. This is simply not possible because transactions consist of a non-negligible amount of non-witness data. For a block to come close to that limit, it would essentially be a single transaction that doesn't do a whole lot but has an input with a ridiculous amount of witness data. But that's not very useful or practical.
brand new
Activity: 0
Merit: 0
January 16, 2021, 06:14:43 AM
#5
This is a nice concept. Thanks for sharing such interesting concept.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
January 14, 2021, 12:16:42 AM
#4
-snip- Why are segwit blocks not bigger. Couldn't a miner validate more transaction to benefit people waiting for confirmation and himself in form of more tx fees?
According to your own stats, it's slightly bigger than the legacy block size limit.
It's only a few kilobytes bigger because SegWit transaction aren't composed of purely "witness data", some parts are counted the same as a legacy transaction.
Plus most blocks don't contain 100% SegWit transactions for the size to dramatically increase.

Example (not the actual sizes):
Let's say for example that the block size limit is 1,000 vBytes or 4,000 WU (Weight Unit).
There are Segwit transactions with a size of 100 virtual Bytes will roughly have a size of 180 Bytes (in Disk)
There are Legacy transactions with a size of 180 Bytes will have the same size in vBytes 180 vBytes.

Block #1:
If there're 10 of SegWit txns (disregarding the other data in a block), it will fill the example's maximum size of 1000 vBytes but that's 1800 Bytes in Disk and it contains 10 transactions.
in Virtual Bytes: 100 vBytes (SegWit txn) x 10 = 1000 vBytes <-limit.
in RAW Bytes:     180 Bytes  (SegWit txn) x 10 = 1800 Bytes.
Block #2:
If there're only 4 of the SegWit txns and 3 legacy transaction which only uses the RAW size, the size of the block in Disk will be 1260 Bytes and it contains 7 transactions.
in Virtual Bytes: 100 vBytes (SegWit txn) x 4 = 400 vBytes & 180 vBytes (Legacy txn) x 3 = 540 vBytes; total of 940 vBytes <-can't fill the limit.
in RAW Bytes:     180 Bytes  (SegWit txn) x 4 = 720 Bytes  & 180 vBytes (Legacy txn) x 3 = 540 vBytes; total of 1260 Bytes.
As you can see, Block #1 produces higher raw size and includes more transactions in a block.
legendary
Activity: 2352
Merit: 6089
bitcoindata.science
January 13, 2021, 04:51:00 PM
#3
4 MB is a theoretical limit. In practice, it won't be reached. Miners are already filling up blocks as much as they can, you just don't see this reflected in the block size because the actual metric is block weight. The block weight for these blocks has been as close to the limit as possible.

The 4 MB theoretical limit comes from a calculation where the block consists of entirely witness data. This is simply not possible because transactions consist of a non-negligible amount of non-witness data. For a block to come close to that limit, it would essentially be a single transaction that doesn't do a whole lot but has an input with a ridiculous amount of witness data. But that's not very useful or practical.

Blockexplorers still show blocksize in bytes, maybe this is what op is referring to.

Blocksize is still about 1.3 mb on average, probably due to the fact that we still have more than 50% legacy transactions which occupy more space (please correct me if I am wrong)

I made this dashboard where you can see the last 24hours blocks from blockchair.com
. Couldn't a miner validate more transaction to benefit people waiting for confirmation and himself in form of more tx fees?

I noticed that some miners confirm blocks with more segwit transactions than others. Some mining pools often mine blocks with 30% segwit transaction, a way below average.
I noticed that those miners usually get lower rewards in the blocks as well. I made those charts (with 1 week data)




I just combined both charts and confirmed that miners that mine blocks with more segwit transactions receive more fees rewards than those who mine blocks with more legacy transactions.


I have this data in my dashboard, but you can only visualize it with one week data. You cannot see it online but I will paste it here.


You can see that some miners like Okex and TMSpool usually mine blocks with 35 37% segwit transactions, and they also get less reward than others.

There are no miners in the 4th quadrant, where they have a high segwit adoption and low reward. All low reward miners have low segwit adoption.
In daily charts this information is not clear, but in 1 week it is possible to see it. (i will publish it soon)
staff
Activity: 3458
Merit: 6793
Just writing some code
January 13, 2021, 04:40:25 PM
#2
4 MB is a theoretical limit. In practice, it won't be reached. Miners are already filling up blocks as much as they can, you just don't see this reflected in the block size because the actual metric is block weight. The block weight for these blocks has been as close to the limit as possible.

The 4 MB theoretical limit comes from a calculation where the block consists of entirely witness data. This is simply not possible because transactions consist of a non-negligible amount of non-witness data. For a block to come close to that limit, it would essentially be a single transaction that doesn't do a whole lot but has an input with a ridiculous amount of witness data. But that's not very useful or practical.
member
Activity: 79
Merit: 28
January 13, 2021, 04:22:26 PM
#1
Segwit blocks can be 4MB in size. I just calculated the average block size of the last 50 blocks and it's 1256840.44 bytes. Why are segwit blocks not bigger. Couldn't a miner validate more transaction to benefit people waiting for confirmation and himself in form of more tx fees?
Jump to: