4 ms·
Parent talks about the „Lightning Network“ — a Layer 2 scaling solution for Bitcoin. Beware: I am still a crypto noob but I am still going to try to explain how
by G3rn0ti 5y ago
Parent talks about the „Lightning Network“ — a Layer 2 scaling solution for Bitcoin. Beware: I am still a crypto noob but I am still going to try to explain how I understood the system so far. Edited: Minor terminology and typos.
Roughly speaking the Lightning Network works similar to a „current account“ that businesses have between each other but does not require the actors to trust each other. The parties initiate a transaction by each one sending Bitcoin to a public multi signature address. The resulting transaction cannot be spent by any one alone. Now, this unspent transaction serves as an initial balance and opens a channel between the parties on the layer 2 network. Bitcoin may now be wired back and forth between the parties on layer 2 w/o needed to be settled individually on the Bitcoin block chain. Finally, if all parties agree by signing a second, settling transaction the resulting balance is written back to the Blockchain to whatever address the participants initially agreed upon. Theoretically, there could have been billions of Bitcoin transactions over the years on the Lightning Network which would be eventually represented by only two transactions on the chain.
Now, taproot improves this scheme by introducing Schnorr signatures. Up to now every member of the multisig transaction I just talked about needed to contain the public keys of all parties which in turn needed to be verified against all their private keys. Since transactions are limited in their size, this limited the applicability of multisig transactions. Now, Schnorr signatures allow for aggregation of public keys so the transaction only needs to contain a single number instead of hundreds or thousands. Of course, this also speeds up validations of transactions.
I hope this all made sense. I have yet to see practical applications of a Lightning Network „scheme“ but I heard El Salvador is using it for cheap Bitcoin transactions (although not applying Schnorr signatures yet).
- spurgu 5y agoPerhaps a simplification to this would be a poker night, where at the beginning of the evening everyone puts in some real money and in return get poker chips. At the end of the night people can exchange whatever chips they have left for real money.
- TekMol 5y agoParent talks about the „Lightning Network“ I was not talking about the Lightning Network in particular. The LN is a system that does settlement on the Bitcoin blockchain. So is the "BMW and its suppliers" network I imagined. But this network is simpler and more customized to the needs of this particular use case. Of course using the LN would be a viable alternative to a custom solution.
- G3rn0ti 5y agoI see, so in principle, taproot would facilitate to set up custom scaling solutions for Bitcoin payment schemes.
- space_rock 5y ago"Bitcoin may now be wired back and forth between the parties on layer 2 w/o needed to be settled individually on the Bitcoin block chain." Cooperatively update the final state would be more precise. And if one party is uncooperative then a timeout contract becomes valid. Your understanding is generally correct. Also bitcoin doesn't use the word crypto which is closely associated with scams. Bitcoin is about the 21 million coin limit so only one currency not cryptocurrencies.
- nybble41 5y agoThe other half of the Taproot update besides Schnorr signatures is support for MASTs: Merklized Abstract Syntax Trees. This allows you to create scripts (smart contracts) where only the used part of the script needs to be revealed when the funds are transferred. Other parts which were not used—for example, the clauses related to recovering funds in the event of a non-cooperating peer in a Lightning channel when the channel is closed normally—need not be included in the transaction, which both improves privacy and reduces the transaction size (and thus also the fees).
- UncleEntity 5y agoSo, basically, a dead code elimination scheme? I do wonder how it could ensure the code running is the actual code signed for as its hash would be different though.
- nullc 5y agoBecause the code is rearranged into a top level arbitrary tree ORs and the hashing commits to this tree. At signing time, the signer reveals a hash for every non-taken branch, so that the commitment still checks that leaf being executed was an admissible one. The dead-code elimination goes further than that, because at the top level this hash root is hidden inside a public key which can be a key controlled by all the participants jointly (or some subset if appropriate). At signing time if these top level parties are available and cooperate they can just sign, and no script is ever revealed, it's impossible for third parties to tell it was ever there-- saving resources and preserving privacy. (And the possibility to complete the transaction using the script means they don't gain from failing to cooperate)