Hey guys, IceeHot here, Bitcoin Private Contributor and Support member. This is week two of my bi-weekly educational series for Bitcoin Private, where we explore technical topics that are related to Bitcoin Private and explain them in a concise and easy-to-understand way. Today, we're going to talk about Segwit, an upcoming protocol change coming to Bitcoin Private later this year.

What is Segwit?

SegWit, or Segregated Witness, is a previous change to Bitcoin and an upcoming change to Bitcoin Private that will require a "Soft Fork" of that coin, meaning that the change would be backwards-compatible with the same blockchain, and does not require a "Hard Fork". This means that users can use SegWit at their leisure and are not required to adopt it.

SegWit splits transaction data into two segments rather than one, moving the unlocking signature (“witness” data) from the original segment to a new “witness” segment in the transaction data. The original section would continue to hold the normal sender and receiver data, and the new "witness" structure would contain scripts and signatures for that transaction. The original data segment would be counted normally, but the "witness" segment would, in effect, be counted as a quarter of its real size.

Why is SegWit beneficial for Bitcoin Private?

Implementing SegWit decreases the virtual size of transactions, making each Bitcoin Private transaction on-chain take up less memory in each block. This increases the throughput of the network by increasing how many transactions can fit in each block. For example, when Bitcoin implemented SegWit, it was roughly equivalent to increasing their blocksize from 1 MB to an estimated 1.8 MB.

SegWit also fixes something called transaction malleability, which is a "flaw" in Bitcoin and other cryptocurrencies that allows the transaction ID of a transaction to change after it has been broadcast to the network, but before it has been mined into the blockchain. This is helpful for enabling the Lightning Network as explained in the last section.

What is the Lightning Network and how does it work?

The Lightning Network creates a layer on top of a cryptocurrency (Layer 2 solution) like Bitcoin Private, enabling fast and cheap transactions that do not need to be immediately settled on that network's blockchain. First, two parties who wish to transact with each other set up a multi-signature wallet (which requires multiple signatures to initiate a transaction). The two parties transact using a internal balance sheet within that multi-signature wallet, meaning that every transaction does not need to be confirmed by the blockchain. When the two parties complete their transactions with each other, they close out their channel, and the resulting balance sheet is registered on the blockchain and posted to the network. While this example is specifically for two parties, this concept can be extended to include as many parties as are needed by sending payments to someone via channels that already exist between other parties.

How does SegWit enable the Lightning Network?

The benefits of separating "witness data" from the rest of a Bitcoin Private transaction's data are not limited to only increasing on-chain throughput. While Lightning Network is technically possible without implementing SegWit, it would not be foolproof. Remember that the Lightning Network works by creating a double-signed transaction. This is analogous to having a banking check that requires both parties to sign in order for the check to be valid. The check specifies how much is being sent from one party to another. To start the Lightning Network channel, this dual-signed check must be funded with cryptocurrency.

To make sure this dual-signed check isn’t held captive by an uncooperative partner, the check is signed by both parties before the funding transaction is sent out to the network. For the payment channel to work, we need the funding transaction to not be broadcast until after the check is signed by both parties. Because the check refers to the funding transaction’s ID, if the funding transaction’s ID is changed, the double-signed check will become invalid. This represents a risk to opening the Lightning Network channel. By removing transaction malleability, Lightning Network is much easier to implement.

That concludes this week's Tech Tuesday, please comment with anything you'd like to discuss or add! Next Tech Tuesday's topic will be hardware wallets as Bitcoin Private got added to Ledger Nano recently with TREZOR soon to follow! If you would like to donate to help with my college education, you may donate below!

My Twitter

Bitcoin Private Official Twitter

Bitcoin Private Official Website