SegWit, or Segregated Witness, is one of the most essential upgrades in Bitcoin’s history. It aims to reduce bloat in the latter’s blockchain by siphoning away bulky signature data and storing them in a sidechain (aka the SegWit chain). SegWit also happens to be extremely controversial since it led to the Bitcoin-Bitcoin Cash hard fork. In this article, we will learn more about SegWit and its long-term impact on the ecosystem.
Bitcoin’s network consists of thousands of nodes, each keeping a complete record of transactions that have taken place on the network. As the network grew, several problems cropped up. A significant issue was the increase in the number of transactions. Blocks were constrained to a maximum size of 1MB, meaning only a limited number of transactions could be added to a particular block. The increase in transactions was a significant burden on the network and led to delays in processing transactions.
Initially, some in the Bitcoin community floated the idea of an increased block size. The logic was straightforward. If the issue was there was not enough space in the block, then simply increase the block size, right?
Well, not exactly.
Increasing the block size meant more centralization since only pools with a high hashrate could manage to mine these blocks. Increasing the block size would require a hard fork, which the community was vehemently against.
A more elegant solution was needed. Blockstream’s Peter Wiulle floated a possible solution in 2015 called SegWit. SegWit would be a sidechain to the main Bitcoin blockchain. So, before we go any further, let’s understand what a sidechain means.
The sidechain is a cryptographic structure that runs parallel to the main blockchain. The sidechain is linked to the main chain via another structure called a “peg.” If you want to interact with a sidechain, you will need to lock up some of the native coins, in this case, BTC, and access data within the sidechain. The peg is two-way, so it is possible for a user to move from blockchain to sidechain and then back.
SegWit simply divides the transaction into two segments. The main idea is the reorganization of block data so that signatures are no longer placed with transaction data. This approach takes care of three issues at once.
Once the witnesses are segregated from the transaction data, it opens up space on the block, allowing for more transactions to be stored in a single block, and increasing the network’s throughput.
SegWit also solves the malleability issue once the signatures are separated from the transaction data, eliminating the risk of any alteration to the data.
Since the blocks can now contain more transactions, it results in a significant increase in transaction speeds.
Signature data within Bitcoin transactions are only useful during the initial verification. However, this data is bulky (it takes up 65% of the block) and is pretty useless later on. SegWit removes the signature data from the main chain and opens up more space within each block.
SegWit results in an increase in transaction speeds as more transactions can be stored in each block, enabling a significantly larger number of transactions through the blockchain. While a block may take the same time to mine, the transactions per second (TPS) are considerably higher since more transactions are processed.
Transaction Malleability allows an attacker to doctor input transactions before they are registered within the blockchain. SegWit prevents transactional malleability by simply removing the signatures from the transaction data by creating a sidechain, allowing data to be stored away from the main chain, and avoiding any alteration to the data.
SegWit, unfortunately, couldn’t prevent a hard fork. A vocal minority within the Bitcoin community believed that SegWit goes against Satoshi Nakamoto’s original vision, and increasing the blocksize is the way to go forward. This blocksize debate resulted in the Bitcoin-Bitcoin Cash hard fork in August 2017.
There is no question about the benefits that SegWit has brought about. 5 years on, SegWit has become part and parcel of the main Bitcoin ecosystem. Using a sidechain to circumvent the increased block size issue is truly an inspired idea. Along with this, it is important to note that by circumventing malleability, Bitcoin can implement layer-2 solutions like the lightning network safely.
Should you wish to purchase Bitcoin, you can do so through Rain, a secure trading platform secured by the Central Bank of Bahrain. Rain features a simple registration process; simply set up your account and begin trading.
Copyright 2022 Rain Management WLL