Understanding SegWit, SegWit2x, and the Lightning Network
SegWit, SegWit2x, and the Lightning Network (LN) are all terms that describe proposed changes to Bitcoin’s blockchain to allow for faster transactions.
DETAILS ON IMPLEMENTATION:
More specifically, these actual and potential changes to Bitcoin’s code are “scaling solutions” meant to address Bitcoin’s problems of speed and transaction fees. SegWit and Lightning Network have already begun being implemented and embraced but haven’t been fully implemented or embraced as of January 2018. SegWit2x is a canceled hard fork.
SegWit is a “soft fork” (a backward compatible code change) that has been implemented on some cryptocurrencies (such as Litecoin). It is a scaling solution meant to solve Bitcoin’s blockchain size limitations by allowing more transactions to be added in each block thereby increasing Bitcoin transaction speeds. The trick involves splitting a transaction into two segments, moving the unlocking signature (“witness” data) from the original segment to a “witness” segment (see details on how SegWit works here). It is up to Bitcoin users, including entities like Coinbase, to embrace SegWit. As more entities embrace SegWit, Bitcoin transaction speeds will become faster.
Meanwhile, SegWit2x was a planned “hard fork” that didn’t occur (but was set to implement SegWit first and then increase block sizes after).
Lastly, the Lightning Network (LN) is a fix for both transaction costs and speeds. Lightning Network is neither a hard fork or soft fork but “an additional layer.” It is a fix that allows for instant low-cost transactions for Bitcoin and other coins like litecoin using a bunch of tricks (it has also been embraced by Ethereum under the name Plasma). The Lightning Network also allows for cross-platform atomic swaps, meaning one could use it to trade one coin to another without an exchange (for example, Bitcoin to Litecoin). Like SegWit2x, LN is predicated on SegWit’s code change. See details on how LN works here.
To be clear, the above aren’t just scaling solutions for Bitcoin, these changes potentially affect all “coins” that use the Bitcoin blockchain (for example Bitcoin, Litecoin, DigiByte, and Vertcoin) and, to what extent Ethereum implements Plasma, that will affect all tokens on the Ethereum blockchain as well.
A blockchain is a public record of transactions at the heart of cryptocurrencies.
To implement the changes requires “consensus” (like a democratic vote by those who use the Bitcoin network).
The debate over the direction of these changes has led the creation of new cryptocurrencies such as Bitcoin Cash (a “hard fork” of the Bitcoin blockchain meant to create a cryptocurrency with faster transaction times).
That is the gist of it, these are code changes to speed up transactions that are subject to democratic vote and debate. The details are way more heady than that. See the citations for more reading.
NOTE ON SEGWIT2x:
SegWit and Lightening are not controversial measures. However, SegWit2x was extremely controversial (and this helps us to understand why it was canceled). SegWit2x was set to create two different block chains and two different Bitcoins, just like other hard forks. However, unlike other hard forks, neither side wanted to capitulate to the other. That led to a splitting of the Bitcoin community and eventually the cancellation of SegWit2x.
Understanding the naming of SegWit, SegWit2x, and LN: The name SegWit is short for Segregated Witness. It has this odd name because it splits transactions into two segments, removing the unlocking signature (“witness” data) from the original portion and appending it as a separate structure at the end. The change is intended to solve a blockchain size limitation problem that reduces Bitcoin transaction speed. With that in mind, SegWit2x addresses the same issue by proposing 2mb blocks (hence the 2x part) and the Lightning Network (LN) seeks to solve this by allowing participants to transfer money to each other without having to make all their transactions public on the blockchain (… which would make transactions “lightning fast”).
Segwit, Segwit2x, Bitcoin Cash, and Bitcoin Gold are all different hard forks in Bitcoin that happened in 2017. The Segwits change the blockchain (and technically create new coins, but if everyone updates then only one coin is left). Cash and Gold created new coins on purpose with the intention of those coins staying around competing with Bitcoin as unique coins (Bitcoin doesn’t upgrade to embrace these coins, they fork off on their own and don’t look back). In other words, these are two different types of hard forks in terms of intention. The Segwits try to “fix” or “improve” Bitcoin’s network, Cash and Gold fork off and do their own thing as unique coins.