2
0
mirror of https://github.com/lnbook/lnbook synced 2024-11-18 21:28:03 +00:00

Merge branch 'develop' into Enegnei-patch-1

This commit is contained in:
Andreas M. Antonopoulos 2019-09-28 10:18:51 -04:00 committed by GitHub
commit fa667d8cf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 206 additions and 88 deletions

View File

@ -10,4 +10,11 @@ install:
- pip3 install --user codespell
script:
- git grep $'\r' -- "*.asciidoc" "*.md" && echo "^ Possible Windows style line ending detected. Please use Unix style line endings (\n)." && exit 1 || true
- git grep ' $' -- "*.asciidoc" "*.md" && echo "^ Trailing space detected at end of line. Please remove." && exit 1 || true
- git grep $'\t' -- "*.asciidoc" "*.md" && echo "^ Use of tabs detected. Please use space for indentation." && exit 1 || true
- git grep "[^ ] [^ ]" -- "*.asciidoc" "*.md" && echo "^ Satoshi style double spacing detected. Sorry Satoshi, please use single spacing." && exit 1 || true
- git grep -iE '(^| )(\w+) \2(\.|,|:|;| |$)' -- "*.asciidoc" "*.md" && echo "^ Detected lexical illusion in the form of a duplicated word. Please correct." && exit 1 || true
- for FILE in $(git ls-files -- "*.asciidoc" "*.md"); do if [[ $(tail -c1 $FILE) != "" ]]; then echo "File ${FILE} does not end with a newline character (\n)."; exit 1; fi; done
- git grep "" -- "*.asciidoc" "*.md" | uniq -c | grep -1 "^ [2-9] " | cut -b9- | sed 's/:$/:[more-than-one-blank-line-here-please-remove]/' | grep ":" && echo "^ Multiple blank lines detected. Please use only one blank line between paragraphs." && exit 1 || true
- codespell --ignore-words-list=que $(git ls-files -- "*.asciidoc" "*.md")

View File

@ -1,5 +0,0 @@
[role="pagenumrestart"]
[[whatis_chapter]]
== What is the Lightning Network?
Initial paragraph

View File

@ -72,7 +72,6 @@ As we saw in <<intro_to_ln>>, the intro paragraph is superb!
```
## Line endings
All submission should use Unix-like line endings: LF (not CR, not CR/LF). All the postprocessing is done on Unix-like systems. Incorrect line endings, or changes to line endings cause confusion for the diff tools and make the whole file look like it has changed.

View File

@ -1,5 +1,7 @@
# Mastering the Lightning Network
[![Build Status](https://travis-ci.com/lnbook/lnbook.svg?branch=develop)](https://travis-ci.com/lnbook/lnbook)
![Mastering Lightning Cover](images/cover_thumb.png)
Mastering the Lightning Network is an O'Reilly Media book, due for publication in Q4'2020, and announced on August 28th by authors Andreas M. Antonopoulos ([@aantonop](https://twitter.com/aantonop)), Olaoluwa Osuntokun ([@roasbeef](https://twitter.com/roasbeef)), Rene Pickhardt ([@renepickhardt](https://twitter.com/renepickhardt)).

View File

@ -4,20 +4,20 @@
=== What is the Lightning Network?
The Lightning Network is a payment system for Bitcoin.
The Lightning Network (LN) is a payment system for Bitcoin.
It is a second layer protocol on top of Bitcoin that defines rules and contracts which enable fast, secure, private, trustless and permissionless transfer of Bitcoin.
Users of the Lightning Network are able to transfer Bitcoin among each other at virtually no cost and in real time.
Users of the LN are able to transfer Bitcoin among each other at virtually no cost and in real time.
They are not required to wait for block confirmations for payments.
Once a payment arrives, it is final and cannot be reversed.
Like a standard Bitcoin transaction, a payment on the Lightning Network can only be refunded by the recipient.
While all Bitcoin transactions are stored in the blockchain where they can be tracked, the payments on the Lightning Network are off-chain and offer more privacy than on-chain Bitcoin transactions.
Like a standard Bitcoin transaction, a payment on the LN can only be refunded by the recipient.
While all Bitcoin transactions are stored in the blockchain where they can be tracked, the payments on the LN are off-chain and offer more privacy than on-chain Bitcoin transactions.
Due to the use of onion routing, which is also implemented in Tor, even the nodes involved in forwarding the payment from sender to recipient do not know for whom they deliver the payment.
=== History of the Lightning Network
// The following is a working draft and suggested mile stones in the history of the Lightning Network.
// The following is a working draft and suggested mile stones in the history of the LN.
The history of the Lightning Network is nearly as old as the history of Bitcoin.
The history of the LN is nearly as old as the history of Bitcoin.
The first response to Satoshi Nakamoto's initial publication of the Bitcoin whitepaper on the metzdowd cryptography mailing list discussed the issue of scaling.
[quote, James A. Donald, First Response to the Bitcoin whitepaper https://www.metzdowd.com/pipermail/cryptography/2008-November/014814.html ]
____
@ -25,7 +25,7 @@ We very, very much need such a system, but the way I understand your proposal, i
____
While James A. Donald was probably referring to maintenance of the unspent transaction outputs (UTXOs) database, it quickly became clear that verifying and storing so many transactions would also become infeasible for any blockchain.
A key requirement for a second layer protocol such as Lightning (which will be described in greater depth later in this book) is the ability to sequence transactions external to the blockchain. In the first verisons of Bitcoin, Satoshi Nakamoto recognised this and introduced a data field called `nSequence` into the input transaction data.
A key requirement for a second layer protocol such as Lightning (which will be described in greater depth later in this book) is the ability to sequence transactions external to the blockchain. In the first versions of Bitcoin, Satoshi Nakamoto recognised this and introduced a data field called `nSequence` into the input transaction data.
The `nSequence` field was intended to allow users to transmit updated versions of a transaction to the network, changing the outputs of a transaction, effectively creating a payment channel.
Such a payment channel would then be valid as long as the transaction was not mined.
According to a Mailinglist post in 2013 by early Bitcoin developer Mike Hearn, Satoshi Nakamoto envisioned this construction for the use case of high frequency trading.footnote:HearnBitcoinDev[Mike Hearn on Bitcoin-dev - April 16th 2013 - Anti DoS for tx replacement http://web.archive.org/web/20190501234757/https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2013-April/002433.html.]
@ -42,10 +42,7 @@ What Hashcoin proposed would eventually be termed a unidirectional payment chann
With this mechanism, user "Alice" could fund a multi-signature address between herself and another user, "Bob", together with a timelocked transaction that 'refunded' the bitcoin back to Alice.
In their scenario, Hashcoin imagined Bob to represent an exchange.
The transaction used to fund the multi-signature address, which is controlled by Bob's and Alice's keys, is naturally called the funding transaction.
This transaction would not be signed and broadcasted by Alice before Bob provided a signature for the spend.
The setup allows Alice to send bitcoin to Bob.
As long as the channel remained open, she could update the channel balance with a newer transaction that sent less bitcoin back to herself and kept more bitcoin with Bob.
This transaction could not be mined without a signature from Bob.
Alice would send the partially signed transaction to Bob, who would sign it and keep it private.
Note that keeping it private is crucial. If Bob does not share the fully signed transaction with Alice, she does not have both signatures needed to spend funds from the multi-signature address. Except for the timelocked refund transaction, she can't send an outdated spend of the funding transaction to the Bitcoin network.
Bob, on the other hand, could do so, but he would have no interest in publishing an old channel state. The newer state would provide him with more bitcoin than the older state.
@ -54,15 +51,20 @@ Therefore, Bob can securely receive more updates to the channel balance as long
This mechanism would allow two users to engage into several smaller transactions which all happened outside of the Bitcoin network.
While this construction of the unidirectional payment channel would have solved the custody problem of exchanges it has never been widely implemented.
We can only speculate for reasons and guess that the overhead communication would have had to be standardized - as it is nowadays in the Lightning Network specification - which might have been too much overhead in the early days of Bitcoin.
We can only speculate for reasons and guess that the overhead communication would have had to be standardized - as it is nowadays in the LN specification - which might have been too much overhead in the early days of Bitcoin.
Also as a payment channel this system was not too useful as the channel could only at total send the total amount of provided Bitcoin in the funding transaction.
Once the timelock was over or all Bitcoin were sent to B the channel would have to be closed.
The obvious idea of opening two channels one from A to B and one from B to A would not have helped as each of those channels would have to be closed and reestablished once it ran dry.
The core breakthrough for the Lightning Network to become a reallity was the ability to create payment channels which technically can live forever and can send money back and forth as often as the peers wish to in combination with routing payments among several channels.
The core breakthrough for the LN to become a reality was the ability to create payment channels which technically can live forever and can send money back and forth as often as the peers wish to in combination with routing payments among several channels.
[TIP]
====
You can watch a video explaining the construction and operation of unidirectional payment channels online at: https://youtu.be/AcP3czefanM
====
Surprisingly both properties took quite some while until the community figured them out.
Technically speaking the unidirectional payment channel has all the important ingreedients (funding transaction to a 2-2 multisignature wallet, a transaction spending from the wallet encoding the balance, a timelock to allow refunding if the other side becomes unresponsive, off chain communication and the fact that no additional trust other than the one in the bitcoin network) of modern payment channels which are used in the Lightning Network.
Despite being rather useless in todays world we will study the unidirectional payment channel in more depth in this book as it is an easy to understand educational example to approach the construction of todays payment channels.
Technically speaking the unidirectional payment channel has all the important ingreedients (funding transaction to a 2-2 multisignature wallet, a transaction spending from the wallet encoding the balance, a timelock to allow refunding if the other side becomes unresponsive, off chain communication and the fact that no additional trust other than the one in the bitcoin network) of modern payment channels which are used in the LN.
Despite being rather useless in today's world we will study the unidirectional payment channel in more depth in this book as it is an easy to understand educational example to approach the construction of today's payment channels.
This setup has one safety issue as transactions have been malleable without the segwit upgrade.
A problem that needed to be solved for any payment channel construction that we know up till today and which has been fixed in August 2017.
@ -82,15 +84,14 @@ The next day, probably in response to Gavin's blogpost, Meni Rosenfeld started a
As Hashed Timelocked Contracts have neither been invented nor seen to solve the issue of trustless routing Rosenfeld imagined trusted routing nodes.
Without mentioning the term network or routing of payments the idea of connecting payment channels and being able to send funds from anyone to anyone else even if there was no direct channel was born.
In Rosenfelds solution payment providers would be the ultraservers and they would among themselves settle the transactions based on trust.
It took us another 3 years until the lightning network whitepaper emerged which had solved all the bits and bolts necessary to get rid of the trust in Rosenfelds solution.
It took us another 3 years until the LN whitepaper emerged which had solved all the bits and bolts necessary to get rid of the trust in Rosenfelds solution.
It was 2013 that Bitcoin developer Mike Hearn refered to Meni Rosenfelds proposal and suggesting to reactivate the `nSequence` field which Satoshi preiviously had deactivated.footnote:HearnBitcoinDev[]
Also Hearn refered to a section on the contracts article talking about the case of micropayment channels with the help of `nSequence`
It was 2013 that Bitcoin developer Mike Hearn referred to Meni Rosenfelds proposal and suggesting to reactivate the `nSequence` field which Satoshi preiviously had deactivated.footnote:HearnBitcoinDev[]
Also Hearn referred to a section on the contracts article talking about the case of micropayment channels with the help of `nSequence`
Links:
* https://en.bitcoin.it/w/index.php?title=Contract&oldid=36712#Example_7:_Rapidly-adjusted_.28micro.29payments_to_a_pre-determined_party
* Multiple white papers
** Joseph Poon, Thaddeus Dryja - The Bitcoin Lightning Network:
Scalable Off-Chain Instant Payments https://lightning.network/lightning-network-paper.pdf
@ -111,8 +112,8 @@ Bitcoin Duplex Micropayment Channels
As an electronic cash system it preserves the 3 most important properties of money (medium of exchange, store of value, and unit of account).
The invention of money (and in particular Bitcoin) was primarily made to facilitate trade and enable the exchange of value between people.
However, without the Lightning Network Bitcoin is hard to be used concurrently by millions of people.
Therefore, in order to fully understand the uses of the Lightning Network, we'll examine it from the perspective of people using it.
However, without the LN, Bitcoin is hard to be used concurrently by millions of people.
Therefore, in order to fully understand the uses of the LN, we'll examine it from the perspective of people using it.
In particular the use cases will come from previous users of Bitcoin as well as people who have not used Bitcoin before.
Each of the people and their stories, as listed here, illustrates one or more specific use cases.
We'll be seeing them throughout this book:
@ -125,7 +126,7 @@ A person or platform offering content on the web.
They want to install a pay wall or get tipped by their fans and consumers.
This could even include music or video streaming on demand paying in real time.
John is a 9 year old boy from Australia, who wanted a games console just like his friends. However he was told by his dad that in order to buy it, he had to earn the money by himself. Now John is an aspiring artist so he knows that while he is still learning, he can't charge much for his artwork. After learning about Bitcoin, he managed to setup a website to sell his drawings across the internet. By using the Lightning Network, John was able to charge as little as $1 for one of his drawings. By being able to set a fair price, which would normally be considered a micropayment and as such not possible with other payment methods, and by using a global currency such as Bitcoin, John was able to sell his art work to customers all over the world and in the end buy the games console he so very much wanted.
John is a 9 year old boy from Australia, who wanted a games console just like his friends. However he was told by his dad that in order to buy it, he had to earn the money by himself. Now John is an aspiring artist so he knows that while he is still learning, he can't charge much for his artwork. After learning about Bitcoin, he managed to setup a website to sell his drawings across the internet. By using the LN, John was able to charge as little as $1 for one of his drawings. By being able to set a fair price, which would normally be considered a micropayment and as such not possible with other payment methods, and by using a global currency such as Bitcoin, John was able to sell his art work to customers all over the world and in the end buy the games console he so very much wanted.
gamer::
Similar to the content creator, a gamer and live streamer would like to be tipped.
@ -137,8 +138,8 @@ Characteristic for remittance is that the payments usually are cross border and
However, they might happen on a monthly base as they are just a fraction of the monthly wage.
professional bitcoiner::
A person who wants to earn interest on their bitcoin without the risk of lending them to other people could decide to set up routing nodes on the lightning network.
By providing liquidity to the Lightning Network the routing capacities will be increased offering the chance to earn routing fees on the owned bitcoin.
A person who wants to earn interest on their bitcoin without the risk of lending them to other people could decide to set up routing nodes on the LN.
By providing liquidity to the LN the routing capacities will be increased offering the chance to earn routing fees on the owned bitcoin.
merchants::
Merchants live on the margin of the sold goods.
@ -149,14 +150,12 @@ A merchant will be happy to get an additional payment method which is virtually
An example of a merchant is Silke.
Silke runs a small coffee shop in an upmarket street in Berlin.
She knows about Bitcoin and wants to accept it in her shop, but has been reluctant to do so because she knows that Bitcoin payments take approx. 10 minutes to be confirmed into her account.
However with the Lightning Network, she knows that her regular clients, such as Joerg can pay for their coffee at her shop, quickly and with negligible fees.
Additionally, by using the Lightning Network, Silke has all funds deposited instantly to her wallet and with usually smaller fees on her side as well.
However with the LN, she knows that her regular clients, such as Joerg can pay for their coffee at her shop, quickly and with negligible fees.
Additionally, by using the LN, Silke has all funds deposited instantly to her wallet and with usually smaller fees on her side as well.
Ultimately this allows her to provide a better service or to offer better pricing for her products.
=== Getting Started
==== Choosing a Lightning Network Wallet
* full nodes (c-lightning, eclair, lnd) + remote controls
@ -166,9 +165,29 @@ Ultimately this allows her to provide a better service or to offer better pricin
==== Quick Start
* We start with a mobile wallet like eclair
* Verify the authenticity of the software (e.g. App store / Acinq website / github)
** discuss that a general phising scheme might consist of tricking you to download a similar looking software
[[getting_first_bitcoin]]
==== Getting Your First Bitcoin on the Lightning Network
* Trade fiat for Bitcoin (as in Mastering Bitcoin)
[[using_own_bitcoin]]
==== Process for people who already own Bitcoin ====
* send bitcoin to lightning wallet (1 onchain transaction - soon nodes / wallets may support funding a channel directly without sending bitcoins to the lightning network wallet first)
* find a node to open a channel with (Node explorer / Autopilots / ...)
* open a connection
* open a channel
* wait confirmations for the channel to become operational
[[sending_receiving]]
==== Sending and Receiving Bitcoin on the Lightning Network
* have the person who helps onbording open a payment channel (As complex as a bitcoin transaction)
* showcase how the funds now can be send back and forth
** create invoice
** decode invoice (do always before paying!)
** pay an invoice
* showcase how an arbitrary invoice can be paid e.g. https://voting.ln.rene-pickhardt.de

96
ch02.asciidoc Normal file
View File

@ -0,0 +1,96 @@
[role="pagenumrestart"]
[[ch02_How_Lightning_Works]]
== How the Lightning Network Works
=== Payment channels
* trustless between peers
* operation takes place off chain
* throughput bound by TCP/IP traffic
* have capacity which is split into a balance sheet
* instant payments between peers
==== Multisig address
* short review of bitcoin transactions
* review of segwit multisig addresses
==== Funding Transaction
* opens the payment channel
* encodes the capacity of the channel
* not clear who owns what fraction of the capacity
* visible onchain transaction (even for private channels)
==== Commitment Transaction
* encodes the balance of the payment channel
* kept secretly between channel partners
* everyone has their own set of transactions
* encumbered with a time lock to give time to penalize protocol breach
* smart contract inside which gives possability to penalize protocol breach
==== Announcing the channel
* gossip protocol
* option to have private channels
==== closing the channel
* the good way - mutal close
* the bad way - force close
* the ugly way - protocol breach
=== Invoices
an alternative structure for the subsections of the invoice section (while covering the same topics) could be: (creating, decoding, paying as 3 sub chapters)
* creating invoices
* decoding invoices
* bech32 encoding and human readable part of invoices
==== Payment Hash
* `pre_image` as proof of payment
* random numbers and selecting the pre_image
==== Meta Data
* Description
* routing hints
* fallback address
* expire time
* signature
=== Delivering the payment
* gossip protocol
* network of payment channels
* different scope of the network
** global path finding (entire knowledge of the network necessary)
** multihop routing (onion necessary only a subset of nodes involved)
** locally setting up and setteling htlcs (only peers involved)
==== Finding a path
* trivial case / channel partner as destination with enough funds in the channel
* topology information from the gossip protocol
* fees and pathfinding from destination to source
==== Onion routing
* construct an onion using
** SPHINX
** payment hash
** path
==== Payment Forwarding Algorithm
* receive an incoming HTLC
* forward an HTLC
* BOLT 02 channel update protocol
* sending back errors
=== Comparison with Bitcoin
* select outputs vs select payment channels / finding a path
* change outputs vs no change on lightning
* mining fees vs routing fees
* public transactions on the blockchain vs. secret payments
* waiting for confirmations vs instant settlement (if everything works smoothly)
* arbitrary amounts vs capacity restrictions
* variying fees depending on the traffic vs announced fees (might become dynamic too?)
* blockchain to save all transactions vs blockchain as a court system

View File

@ -4,7 +4,6 @@ License: CC-BY
Added By: @aantonop
////
== Basis of Lightning Technology (BOLT)
The Basis of Lightning Technology (BOLT) documents describe a layer-2 protocol for off-chain bitcoin transfer by mutual cooperation, relying on on-chain transactions for enforcement if necessary.

View File

@ -6,7 +6,6 @@ This quick glossary contains many of the terms used in relation to bitcoin. Thes
address::
A bitcoin address looks like +1DSrfJdB2AnWaFNgSbv3MZC2m74996JafV+. It consists of a string of letters and numbers. It's really an encoded base58check version of a public key 160-bit hash. Just as you ask others to send an email to your email address, you would ask others to send you bitcoin to one of your bitcoin addresses.
Asymmetric Cryptographic System::
Asymmetric cryptography, or public-key cryptography, is a cryptographic system that uses pairs of keys: public keys which may be disseminated widely, and private keys which are known only to the owner.
The generation of such keys depends on cryptographic algorithms based on mathematical problems to produce one-way functions.
@ -123,7 +122,7 @@ Diffie Hellman Key Exchange::
This shared secret may be directly used as a key, or to derive another key.
The key, or the derived key, can then be used to encrypt subsequent communications using a symmetric-key cipher.
An example of the derived key would be the ephemeral key used by the SPHINX Mix Format.
via https://en.wikipedia.org/w/index.php?title=Elliptic-curve_Diffie%E2%80%93Hellman&oldid=836070673
Via https://en.wikipedia.org/w/index.php?title=Elliptic-curve_Diffie%E2%80%93Hellman&oldid=836070673
Digital Signature::
A digital signature is a mathematical scheme for verifying the authenticity of digital messages or documents.
@ -170,11 +169,10 @@ Funding Transaction::
It is part of the rsmc to ensure that either side of the channel can withdraw their funds without the necessity to trust the channel partner.
Globalfeatures::
Globalfeaturess of a Lightning Network node are the features of interest for all other nodes.
Globalfeatures of a Lightning Network node are the features of interest for all other nodes.
Most commonly they are related to supported routing formats.
They are announced in the `_init_` message of the peer protocol as well as the `_channel_announcement_` and `_node_announcement_` messages of the gossip protocol.
Gossip Protocol::
Lightning Network nodes send and receive information about the topology of the Lightning Network through gossip messages which are exchanged with their peers.
The gossip protocol is mainly defined in BOLT 7 and defines the format of the _node_announcement_, _channel_announcement_ and _channel_update messages_.
@ -199,7 +197,6 @@ Hash Function::
It is infeasible to find two different messages with the same hash value.
https://en.wikipedia.org/w/index.php?title=Cryptographic_hash_function&oldid=868055371
hashlocks::
A hashlock is a type of encumbrance that restricts the spending of an output until a specified piece of data is publicly revealed. Hashlocks have the useful property that once any hashlock is opened publicly, any other hashlock secured using the same key can also be opened. This makes it possible to create multiple outputs that are all encumbered by the same hashlock and which all become spendable at the same time.
@ -214,7 +211,7 @@ Invoice::
Lightning Network::
The Lightning Network is a protocol on top of bitcoin (or other cryptocurrencies).
It creates a network of payment channels which enable the trustless forwarding of payments through the network with the help of HTLCs and Onion Routing.
It creates a network of payment channels which enables the trustless forwarding of payments through the network with the help of HTLCs and Onion Routing.
Other components of the lightning network are the gossip protocol, the transport layer and payment requests.
Lightning Network Node::
@ -225,7 +222,7 @@ lnd::
It is written in Go.
Localfeatures::
Localfeaturess of a Lightning Network node are the features of direct interest of the peer.
Localfeatures of a Lightning Network node are the features of direct interest of the peer.
They are announced in the `_init_` message of the peer protocol as well as the `_channel_announcement_` and `_node_announcement_` messages of the gossip protocol.
Locktime::
@ -233,7 +230,7 @@ Locktime::
Millisatoshi::
The smallest unit of account on the lightning network.
The the value cannot be enforced on chain.
The value cannot be enforced on chain.
multisignature::
Multisignature (multisig) refers to requiring more than one key to authorize a bitcoin transaction.
@ -241,12 +238,12 @@ multisignature::
In the standard case of a 2 party payment channel a 2-2 multisignature address is used.
Noise_XK::
The template of the Noise protocol framework to establish and authenticated and encrypted communication channel between two peers of the lightning network.
The template of the Noise protocol framework to establish an authenticated and encrypted communication channel between two peers of the lightning network.
X means that no public key needs to be known from the initiator of the connection.
K means that the public key of the receiver needs to be known.
More particular (from: http://www.noiseprotocol.org/noise.html) the protocol enables.
Encryption to a known recipient, strong forward secrecy. This payload is encrypted based on an ephemeral-ephemeral DH as well as an ephemeral-static DH with the recipient's static key pair. Assuming the ephemeral private keys are secure, and the recipient is not being actively impersonated by an attacker that has stolen its static private key, this payload cannot be decrypted. Sender authentication resistant to key-compromise impersonation (KCI). The sender authentication is based on an ephemeral-static DH ("es" or "se") between the sender's static key pair and the recipient's ephemeral key pair. Assuming the corresponding private keys are secure, this authentication cannot be forged.
// the noice protocol documentation is according to their IPR section public domain. The author is Trevor Perrin (noise@trevp.net)
// the noise protocol documentation is according to their IPR section public domain. The author is Trevor Perrin (noise@trevp.net)
Onion Routing::
Onion routing is a technique for anonymous communication over a computer network.
@ -416,7 +413,6 @@ Transaction Malleability::
Transport Layer::
tbd.
unspent transaction output (UTXO)::
UTXO is an unspent transaction output that can be spent as an input to a new transaction.
@ -426,5 +422,4 @@ upstream payment::
wallet::
Software that holds all your bitcoin addresses and secret keys. Use it to send, receive, and store your bitcoin.
Some contributed definitions have been sourced under a CC-BY license from the https://en.bitcoin.it/wiki/Main_Page[bitcoin Wiki], https://en.wikipedia.org[Wikipedia], https://github.com/bitcoinbook/bitconbook[Mastering Bitcoin] or from other open source documentation sources.

View File

@ -24,7 +24,6 @@ _Italic_:: Indicates new terms, URLs, email addresses, filenames, and file exten
_++Constant width italic++_:: Shows text that should be replaced with user-supplied values or values determined by context.
[TIP]
====
This icon signifies a tip or suggestion.
@ -121,7 +120,6 @@ Follow us on Twitter: link:$$https://twitter.com/oreillymedia$$[]
Watch us on YouTube: link:$$https://www.youtube.com/oreillymedia$$[]
==== Contacting Andreas
You can contact Andreas M. Antonopoulos on his personal site:
@ -142,7 +140,6 @@ link:$$https://linkedin.com/company/aantonop$$[]
Andreas would also like to thank all of the patrons who support his work through monthly donations. You can support Andreas on Patreon at
link:$$https://patreon.com/aantonop$$[].
==== Contacting Rene
You can contact Rene Pickhardt on his personal site:
@ -162,7 +159,6 @@ link:$$https://patreon.com/renepickhardt$$[].
Or you can support his work directly with bitcoin (also via the Lightning Network) at link:$$https://tallyco.in/s/lnbook$$[] for which Rene is equally thankful as for his patreons.
[[acknowledgments_sec]]
=== Acknowledgments by Andreas
@ -178,7 +174,6 @@ I am also grateful to the Bitcoin and Lightning Network community who welcomed m
In particular I am grateful to all the open source Bitcoin and Lightning Network protocol developers and people who fund them to make that technology possible.
Last but not least I am thankful to my loved ones.
[[github_contrib]]
=== Contributions

View File

@ -86,9 +86,9 @@ This group of topics would be end user oriented and is rather non technical
While also important for end users to be aware of some of the topics here it is primarily meant for professionals and developers.
* backup & restore a Lightning Network node
* configure a Lightning network Nodes
* configure a Lightning network Node
** max concurrent htlc in flight
** min channel channel size
** min channel size
** max channel size
** cltv_expiry delta
** routing fees
@ -103,7 +103,6 @@ While also important for end users to be aware of some of the topics here it is
* uptime
* watchtowers
=== BOLT 1.0
A summary of how the Lightning Network protocol works.
@ -137,7 +136,6 @@ A summary of how the Lightning Network protocol works.
* Transaction Malleability
* Transport Layer
=== BOLT 1.1 / 2.0
Future trends and developments on the Lightning Network.
@ -186,21 +184,34 @@ Creating Lightning Network Applications
** streaming example
** more ideas: https://bitcoingames2019.devpost.com/submissions
* btc pay server
* Turbo Channels https://medium.com/@akumaigorodski/instant-channels-enable-safe-lightning-payments-with-unconfirmed-funding-8d640defa183
=== comparisons and examples
The following is a loose list of potential infoboxes, tables and dropins which will most likely make it to some part of the book.
They have particular illustrative purpose and are therefore collected seperately to keep better track of them.
They have particular illustrative purpose and are therefore collected separately to keep better track of them.
==== comparisons
* payment process on Bitcoin vs payment process on the lightning network
* transaction vs payment
* capacity vs balance
* routing fees vs mining fees
* private vs public channel (difficulty to have truely private channels that don't reveal over time on the blockchain?)
* private vs public channel (difficulty to have truly private channels that don't reveal over time on the blockchain?)
* source based routing vs best effort routing (onion routing vs IP forwarding)
* eltoo vs RSMC (?)
* private key vs fully signed transaction (it can be seen as almost the same in the sense of ownership)
* locked bitcoin vs freely movable bitcoin (onchain vs. offchain bitcoin)
* routing vs path finding
==== examples
tba
==== properties
* the seven ingredients for a payment channel c.f: https://youtu.be/AcP3czefanM
** 2-2 musig address
** funding transaction to open the channel (without possibility to malleate the transaction)
** commitment transaction to encode the balance of the channel
** a time lock to remove trust
** a communication protocol for partners exchange data outside of the bitcoin network
** asymmetrical information (unless we switch to eltoo but even there not all keys are shared but channel state is symmetric)
** game theoretic and economical incentives to follow the protocol