Friday, January 27, 2023

With SegWit, Bitcoin Blocks Are Already Over 1 MB – Sort Of

With SegWit, Bitcoin Blocks Are Already Over 1 MB – Sort Of

Within 24 hours of SegWit activating on Bitcoin, the network produced its first block over 1 MB in size. The hope is that total transaction throughput can increase as more people and businesses use the new format.

Also read: BitKan Adds Bitcoin Cash, ETH to P2P Trading Platform

The block, number #481947, was mined by Bitfury on 25th August and reached 1032.118 KB in size. Computer Science student Justin Camarena of California claimed credit for building the 408-input transaction that topped the old maximum:

The abnormal transaction paid 2.284 sat/byte (satoshis per byte) which is extremely low. However Camarena said on Reddit that he’d paid far higher fees (e.g.: $430 USD) on previous similar transactions just to be first.

Wait… Aren’t Transactions Limited to 1 MB?

Casual Bitcoin observers from the past few years might be confused by this. Wasn’t the whole scaling fight about keeping block sizes to 1 MB maximum? Didn’t Bitcoin Cash hard-fork away specifically to get bigger blocks?

It has to do with the new way Bitcoin looks at block data and capacity. Yes, technically the block “size” is hard-coded to have a maximum 1 MB. But the new metric, which Bitcoin Core developers say is more important, is block weight.

Transaction blocks may have a total “weight” of 4 MB — the block with Camarena’s transaction had a weight of 3,996 KB. Actually, without the kind of novelty transaction Camarena assembled, block weights that large should be rare.

Block Weight Not Size

bitcoin block sizeTechnical writer Jimmy Song explained in detail in this Medium post how it happened. Segregated Witness separates the transaction signature (or “witness”) data from the transaction itself (hence the name).

Witness data under SegWit is calculated to be worth 1/4 the “weight” of transaction data. For example, 1 byte of tx data counts as 4 bytes of weight; while 1 byte of witness data counts as 1 byte of weight. Therefore, a SegWit transaction of 1,000 bytes with 500 bytes of witness data would actually be smaller (2.5 KB) than one with 1000 bytes of tx data and 300 bytes’ witness (3.1 KB).

Song described a “pathologically large SegWit transaction” that could theoretically reach close to 4 MB using a large number of (the right kind of) inputs. And that’s exactly what Justin Camarena did, paying hundreds of dollars for the privilege.

SegWit’s Add-On Features Will Make the Difference

In reality, though, we’re probably not going to see many large blocks like that. It’s also not the same as saying “Bitcoin now has larger blocks” because block size itself isn’t as relevant anymore.

The average block weight is more likely to be around 2 MB. However that may increase if Lightning Network, CoinJoin and multi-signature transactions become more common.

Technically, if the SegWit2x hard fork succeeds and the actual block size increases to 2 MB, total block weight could be as high as 8 MB. However, that would require a lot of witness data.

The success of the 2x hard fork is far from certain, though. If it fails, or if users still see 2 MB as too small, SegWit (with additional services) will need to prove it can actually increase transaction capacity and lower fees in the long run.

Do you understand how SegWit scales Bitcoin? Please let us know.

Images via Pixabay

Bitsonline Email Newsletter