Well, because Segwit comes: How much capacity does the upgrade really free?

Well, because Segwit comes: How much capacity does the upgrade really free?
Stam. Image by Steven Guzzardi via Flickr.com. License: Creative Commons

With SEGWIT2X it is certain: Segwit will be activated. The block size is now replaced by a blockweight. The capacity will increase, there will be more transactions to the blockchain, the fees will fall. How and to what extent is not easy to explain. A small introduction to the blockweight limit.

banera:hover img{box-shadow:0 0 20px 5px rgba(255,0,0,0.6);}

In the past few weeks, there has been no longer any disputes about whether Segwit is activated or not – but about how and when. Segwit2x would like to enforce Segwit and a 2MB Hardfork. First of all, Segwit is activated. Unlike initially intended, this will happen in a way that has the widest possible compatibility with existing software. This means that the existing core nodes from version 0.13.1 and even the UASF nodes in the team.

In other words, the alliance of miners and companies, which is supposed to represent 80 percent of the ecosystem, will activate Segwit. And this before the 1. August. The UASF movement could say that it has achieved its goal.

banera:hover img{box-shadow:0 0 20px 5px rgba(255,0,0,0.6);}

But what exactly does Segwit do with the capacity? Sometimes it says that Segwit is a “2MB Softfork”, sometimes even a “4MB Softfork”, and then again that Segwit only delivers 1.5 or 1.8 MB capacity. What now? How is the long-awaited bonus place for transactions through Segwit?

Weight instead of size

Segwit changes the capacity to two wise men.

Segwit introduces a new transaction format for the first time. This puts the signatures-i.e. the digital signatures-in an extra package. Old nodes only see placeholder, while nodes with Segwit update can still see and validate the signatures. This has some advantages, such as the Malleability and the Quadratic Scaling remove, but that’s not the point here. This is about capacity. Because signatures make up around 60 percent of the transaction data. If the nodes, which previously enforce a limit from 1MB to the block size, no longer have to save the signatures, the capacity of the system increases. Clear.

baner a:hover img{box-shadow:0 0 20px 5px rgba(255,0,0,0.6);}

Second, the Segwit nodes-including the miners-replace the blocksize with the blockweight. The formula for this is a little more complicated than the simple blocksize> 1MB. The miners can now form blocks as long as they meet the following condition:

4 * Non-Segwit-Data + 1 * Segwit-Data <= 4000 Kilobyte

Let’s take a look at what that means. First we take the so-called “non-segwit data”. These include everything that has not been outsourced to the Segwit Extra package: ID, transmitter, empendant, amount, old signatures. The size of this data is then multiplied by 4. Then we add the signature data outsourced by Segwit. What comes out can be a maximum of 4 MB.

banera:hover img{box-shadow:0 0 20px 5px rgba(255,0,0,0.6);}

There are several reasons for this “Segwit discount”. One is that the signature data is very easy to prune, i.e. deleting from the blockchain without disability the ID of the transaction. The long -term load on the system is less due to this data.

But let’s take a look at which capacity Segwit actually gives. Which blocksize is hidden behind the Weight?

From weight back to size

It is not so easy for non-mathematicians to come back from the blockweight to the block. You have to calculate a little to find the formula with which you calculate how many kilobytes of transactions fit into such a Segwit block.

banera:hover img{box-shadow:0 0 20px 5px rgba(255,0,0,0.6);}

To do this, you need two variables: firstly, you have to know how high the proportion of Segwit transactions in all transactions is (m). That is the most difficult question. If nobody uses Segwit transactions, there will also be no capacity increase. Then you have to know what proportion the signatures in the block size have (s). This question is relatively easy to answer.

If you juggle around a little with these two variables and the blockweight formula, you finally get on a way how to convert the blockweight into the block size. I wrote a simple JavaScript with my formula that plays through the actual capacity with different m and n. Since I am neither a mathematician nor programmer, I was looking for someone who checks it for me. Jochen Hoenicke, IT scientist at the University of Freiburg and Bitcoin expert, has simplified the formula for me and corrected a little. But on the whole it worked.

banera:hover img{box-shadow:0 0 20px 5px rgba(255,0,0,0.6);}

The capacity increases with the increasing use of Segwit addresses. Logical. Let’s take a look at how exactly that works.

Uncertainty

But first we have to come to what we don’t know. The question of the proportion of signatures is relatively easy to answer. Jochen Hoenicke has listed the shares of the signatures in the blocks since the Genesis Block. He explains that signatures have been taking 60-63 percent of the square in the blocks for around two years. So it would be clear: n = 60 to 65.

banera:hover img{box-shadow:0 0 20px 5px rgba(255,0,0,0.6);}

The question is a bit more difficult whether Segwit transactions need about 10 percent more space than normal transactions. In the current version, addressing the so -called “Nested P2SH”, this will be the case. However, native Segwit addresses are planned for the future, where the extra-data is eliminated. In my simulation, I assumed the address format available so far, since the upgrade to native Segwit addresses is not entirely trivial.

However, the decisive factor is the Segwit penetration M. There is no data for this because you cannot measure how long the Bitcoin ecosystem will take to assume a new transaction format. It is impossible to find a hard number here. You can only do some clues and appreciate a rough, non -binding range.

banera:hover img{box-shadow:0 0 20px 5px rgba(255,0,0,0.6);}

How does Segwit spread out in the network?

The capacity gain from Segwit is usually given as 2MB. This estimate is – if at all – only realistic if you assume that every transaction kit Segwit is used. This should be unrealistic for the next six months.

What needs to happen so that we get 100 percent Segwit transactions? In essence, the entire UTXO set must be replaced. All inputs (coins) stored on the blockchain must be sent from normal addresses to Segwit addresses. Only then can the coins create capacity by outsourcing the signature. The UTXO set currently consists of 50 million inputs or almost 2 gigabytes of data. To replace them, the blockchain would need the full capacity of two weeks.

banera:hover img{box-shadow:0 0 20px 5px rgba(255,0,0,0.6);}

So it can be assumed that this will be very slow and will probably never have happened completely. First, however, Segwit develops its effect gradually.

Estimates

How long will it take for noteworthy parts of the UTXO to be exchanged? How much capacity is to be expected for the next six months? I outline two arguments that speak for a range of around 40-80 percent in 6 months:

  • If we take the good old Pareto principle, after which 20 percent work do 80 percent of sales, we can assume that 20 percent of the economy is responsible for 80 percent of the transactions. These 20 percent are platforms such as Coinbase, BitPay, Blockchain.info. Bitcoin.de, bitstamp and so on.
    As far as I know, there is currently no easy -to -use implementation of Segwit in the Wallets. But it can be assumed that this will be done quickly after activation and that the large platforms succeed to switch completely to Segwit over the course of six months. How this happens depends on how the platforms manage their inputs. Exchange that manage a large amount of inputs and combine with user credit should also send old transactions to Segwit for a long time.
  • I am less optimistic about the user wallets. Here, too, there is still no implementation in the user interface almost everywhere, which is why there should hardly be any use of Segwit. Even after an update, it will be difficult for many users to participate in the upgrade, since this is partly necessary to replace the wallet.

banera:hover img{box-shadow:0 0 20px 5px rgba(255,0,0,0.6);}

Overall, one can assume that the Segwit penetration is a maximum of 85 percent in half a year, but probably significantly lower, possibly even below 50 percent. In the worst case (50 percent), this means a block size of 1.25 MB. In the best case, at 85 percent, it would be about 1.45 MB.

Of course, this size will continue to rise. If native Segwit addresses are slowly prevailing, the capacity can increase up to 1.75 MB. And if the Segwit penetration reaches 90 to 95 percent, block sizes of more than 1.8 MB will also be possible.

banera:hover img{box-shadow:0 0 20px 5px rgba(255,0,0,0.6);}