![]() (Source: ) How the Lightning Network actually works Just before nLockTime, the parties and a few witness nodes broadcast the highest sequence tx they saw. Only the final outcome gets recorded by the network. Intermediate transactions do not need to be broadcast. If desired, a default transaction can be prepared after each version so n-1 parties can push an unresponsive party out. If one party stops agreeing to changes, then the last state will be recorded at nLockTime. The party giving money would be the first to sign the next version. They can keep updating a tx by unanimous agreement. One use of nLockTime is high frequency trades between a set of parties. This process is more secure if transaction A cannot be malleated by a third party (the TXID changing), otherwise Bob could have created transaction B only for it to become invalid as transaction A changes, thereby enabling Alice to hold the funds hostage indefinitely.Īccording to an e-mail that Satoshi sent to Bitcoin developer Mike Hearn, this basic structure was Satoshi’s idea: If Alice refuses to sign anything in order to frustrate Bob, all Bob needs to do is wait one week for transaction B to become valid, and he is then able to move the money from the channel to himself by broadcasting transaction B, which Alice has already signed.As long as this gets confirmed before the one-week locktime in transaction B, Alice safely receives her 0.1 BTC regardless of what Bob does. If Bob tries to renege on his payment, all Alice needs to do is sign and broadcast to the network transaction P1, which Bob signed when he initially made the payment.In theory, the above channel is secure for the following reasons: The payment process can be repeated again and again until the funds in the channel, in this case 1 BTC, have been exhausted. Although setting up the channel involves broadcasting a transaction to everyone, once the channel is set up, multiple payments from Bob to Alice can occur by simply sending data from Bob to Alice, avoiding a broadcast to the entire network. The diagram above depicts the traditional way to set up a basic unidirectional payment channel. ![]() Lightning’s basic technical building blocks However, building such a payment system, in which all parties can always revert to the blockchain and reclaim their funds if there is a problem, is complex and has some significant risks and limitations. In this way, one can achieve performance and efficiency almost equivalent to that of direct communication between the parties over the Internet, while retaining some of the security characteristics of Bitcoin’s blockchain. Instead of broadcasting a transaction to everyone, the transaction can be sent more directly to the payment recipient. Only when parties to the transaction are dishonest does one need to resort to the cumbersome process, which distributed censorship-resistant systems require to maintain consensus. The Lightning Network represents an improvement in efficiency and uses a more logical payment-network structure. Mobile phones have made this process faster and more efficient, as messages can be sent directly to the intended recipient. Prior to the widespread adoption of mobile phones, stadium announcers broadcast messages for individuals over the public-address system to all those in attendance. The old “broadcast to everyone” announcement method at sporting events, during Arsenal’s 3-3 draw at home to Sheffield Wednesday in May 2000. If the objective is to build a payment system used by millions of people across the globe, this method does not seem logical. Many consider this process to be inefficient. For example, if one buys a coffee using Bitcoin, the transaction is broadcast to the entire Bitcoin network without prioritising propagation of the transaction data to the coffee shop or the coffee shop’s payment processor. There isn’t even special treatment for the recipient of the payment. Miners, meanwhile, are required to engage in an energy-intensive competitive process to determine if the transaction makes it into the ledger, just in case a conflicting transaction occurs. The motivation behind the Lightning Networkīlockchain-based payment systems typically work in a “broadcast to everyone” mode, in that when one makes a payment, one needs to broadcast the transaction to all participants in the network. Please click here to download a PDF version of this report We then examine some of its limitations, including the downsides of inferior security compared to transacting on-chain and why this makes Lightning potentially unsuitable for larger-value payments. We describe some of the basic technical building blocks that make Lightning possible. Abstract: In this piece, we explain the motivation behind the creation of the Lightning Network and why its scaling characteristics are superior to what we have today, potentially resulting in a transformational improvement.
0 Comments
Leave a Reply. |