Bitcoin Forum
May 17, 2024, 04:59:11 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why are segwit blocks not bigger?  (Read 148 times)
?QuestionMark? (OP)
Member
**
Offline Offline

Activity: 79
Merit: 28


View Profile
January 13, 2021, 09:22:26 PM
Merited by ABCbits (1), bitmover (1)
 #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?
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3402
Merit: 6641


Just writing some code


View Profile WWW
January 13, 2021, 09:40:25 PM
Merited by bitmover (2), ABCbits (1), nc50lc (1)
 #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.

bitmover
Legendary
*
Offline Offline

Activity: 2310
Merit: 5952


bitcoindata.science


View Profile WWW
January 13, 2021, 09:51:00 PM
Last edit: January 14, 2021, 12:48:51 AM by bitmover
Merited by malevolent (2), ?QuestionMark? (2), ABCbits (1)
 #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
Quote
Average Block Weight   3,967,633 WU
Average Block Virtual Size   991,908 vbytes
Average Block Size   1,324,212 bytes


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

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

Activity: 2422
Merit: 5604


Self-proclaimed Genius


View Profile
January 14, 2021, 05: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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
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!