From e5491ceff1b59221561cc57301e85e8968835257 Mon Sep 17 00:00:00 2001 From: vv01f Date: Wed, 5 Feb 2020 00:09:01 +0100 Subject: [PATCH 1/9] illustration of the need for bitcoin, example microtransactions --- 01_introduction.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01_introduction.asciidoc b/01_introduction.asciidoc index 109ad13..0b57060 100644 --- a/01_introduction.asciidoc +++ b/01_introduction.asciidoc @@ -8,7 +8,7 @@ While the bulk of this book is written for programmers, the first two chapters a === Motivation for the Lightning Network -As Bitcoin grows, and the demand for transactions grows, the number of transactions in each block will increase until eventually hitting the block size limit. When blocks are full, excess transactions are left to wait in a queue and many users increase the fees they're willing to pay in order to buy space for their transaction in the next block. However, simply increasing block size does not solve the problem because it has the undesirable effect of centralizing the network. Because blockchains are gossip protocols, each node is required to know and validate every single transaction that occurs on the network. As such, the greater the block size, the greater the processing and storage requirements for each individual node. The greater the requirements, the fewer the nodes that will ultimately be run. But what if each node wasn't required to know and validate every single transaction? What if there was a way to have scalable off-chain transactions, without losing the security of the Bitcoin network? +As Bitcoin grows, and the demand for transactions grows, the number of transactions in each block will increase until eventually hitting the block size limit. When blocks are full, excess transactions are left to wait in a queue. Many users increase the fees they're willing to pay in order to buy space for their transaction in the next block. At the same tim an increasing number of users are left behind. Their transactions, e.g. microtransactions such as common small spendings, are not economically qualified to be on the network. However, simply increasing block size does not solve the problem because it has the undesirable effect of centralizing the network. Because blockchains are gossip protocols, each node is required to know and validate every single transaction that occurs on the network. As such, the greater the block size, the greater the processing and storage requirements for each individual node. The greater the requirements, the fewer the nodes that will ultimately be run. But what if each node wasn't required to know and validate every single transaction? What if there was a way to have scalable off-chain transactions, without losing the security of the Bitcoin network? In February 2015, Joseph Poon and Thaddeus Dryja proposed a possible solution to the Bitcoin Scalability Problem, with the publication of _"The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments"_ footnote:[Joseph Poon, Thaddeus Dryja - "The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments" (https://lightning.network/lightning-network-paper.pdf).] In the whitepaper, Poon and Dryja estimate that in order for Bitcoin to reach the 47,000 transactions per second processed at peak by Visa, it would require 8GB blocks. This would make running a node completely untenable for anyone but large scale enterprises and industrial grade operations. The result would be a network in which only a few users can actually validate the state of the ledger, which ultimately breaks the trust model of Bitcoin. From 2ca8265c3c1a6b68562f5d62d5987364c4fadce6 Mon Sep 17 00:00:00 2001 From: vv01f Date: Wed, 5 Feb 2020 01:01:44 +0100 Subject: [PATCH 2/9] a node, not an --- 01_introduction.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01_introduction.asciidoc b/01_introduction.asciidoc index 0b57060..695c212 100644 --- a/01_introduction.asciidoc +++ b/01_introduction.asciidoc @@ -24,7 +24,7 @@ While the Lightning Network was initially conceived for Bitcoin, it is able to b As we start exploring the Lightning Network, we will encounter some technical terminology that might, at first, be confusing and a bit difficult to understand. While all of these concepts and terms will be explained in detail as we progress through the book, and are defined in the glossary, we need some basic explanations to get started. Here are some of the concepts you will encounter in the first two chapters of this book: -Node:: A computer that participates in a network. An LN node is a computer that participates in the Lightning Network. A Bitcoin node is a computer that participates in the Bitcoin Network. Typically a Lightning Network user will run an LN node and a Bitcoin node. +Node:: A computer that participates in a network. A LN node is a computer that participates in the Lightning Network. A Bitcoin node is a computer that participates in the Bitcoin Network. Typically a Lightning Network user will run a LN node and a Bitcoin node. Blockchain:: A distributed transaction ledger, produced by a network of computers. Bitcoin, for example, is a system that produces a blockchain. The Lightning Network is not itself a blockchain, nor does it produce a blockchain, it is a network that relies on existing blockchains for its security. From 9c6d78fe679721528b08177680b87c5c4f55de34 Mon Sep 17 00:00:00 2001 From: vv01f Date: Wed, 5 Feb 2020 01:07:25 +0100 Subject: [PATCH 3/9] eg. => e.g. --- 01_introduction.asciidoc | 2 +- 02_getting_started.asciidoc | 4 ++-- CONTRIBUTING.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/01_introduction.asciidoc b/01_introduction.asciidoc index 695c212..fdcdaad 100644 --- a/01_introduction.asciidoc +++ b/01_introduction.asciidoc @@ -28,7 +28,7 @@ Node:: A computer that participates in a network. A LN node is a computer that p Blockchain:: A distributed transaction ledger, produced by a network of computers. Bitcoin, for example, is a system that produces a blockchain. The Lightning Network is not itself a blockchain, nor does it produce a blockchain, it is a network that relies on existing blockchains for its security. -Transaction:: A data structure that records the transfer of control over some funds (eg. some bitcoin). The Lightning Network relies on Bitcoin transactions (or those of another blockchain), to track control of funds. +Transaction:: A data structure that records the transfer of control over some funds (e.g. some bitcoin). The Lightning Network relies on Bitcoin transactions (or those of another blockchain), to track control of funds. Payment Channel:: a payment channel is a _financial relationship_ between two nodes on the Lightning Network, typically implemented by multi-signature Bitcoin transactions that share control over bitcoin between the two LN nodes. diff --git a/02_getting_started.asciidoc b/02_getting_started.asciidoc index 7231291..03da7d5 100644 --- a/02_getting_started.asciidoc +++ b/02_getting_started.asciidoc @@ -155,7 +155,7 @@ Alice now has an LN wallet. But, it's empty! She now faces one of the more chall There are several ways Alice can acquire bitcoin: -* She can exchange some of her national currency (eg. USD) at a crypto-currency exchange +* She can exchange some of her national currency (e.g. USD) at a crypto-currency exchange * She can buy some from a friend, or an acquaintance from a Bitcoin Meetup, in exchange for cash * She can find a _Bitcoin ATM_ in her area, which acts as a vending machine, selling bitcoin for cash * She can offer her skills or a product she sells and accept payment in bitcoin @@ -222,7 +222,7 @@ Let's review the definition of a "Lightning Network Channel" at this point, to m The wallet or _node_ that Alice opens a channel to, is called her _channel peer_. Once "opened", a channel can be used to send many payments back and forth between Alice's wallet and her channel peer. -Furthermore, Alice's channel peer can _forward_ payments via other channels further into the Lightning Network. This way, Alice can _route_ a payment to any wallet (eg. Bob's LN wallet) as long as Alice's wallet can find a _path_ made by hoping from channel to channel, all the way to Bob's wallet. +Furthermore, Alice's channel peer can _forward_ payments via other channels further into the Lightning Network. This way, Alice can _route_ a payment to any wallet (e.g. Bob's LN wallet) as long as Alice's wallet can find a _path_ made by hoping from channel to channel, all the way to Bob's wallet. All this to say: Alice needs one or more channels that connect her to one or more other nodes on the Lightning Network. She doesn't need a channel to connect her wallet directly to Bob's Cafe in order to send Bob a payment, though she can choose to open a direct channel too. Any well-connected node in the Lightning Network can be used for Alice's first channel. In this example, since we want to also demonstrate payment routing, we won't have Alice open a channel directly to Bob's wallet. Instead we will have Alice open a channel to a well-connected node and then later use that node to forward her payment, routing it through any other nodes, as necessary to reach Bob. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index de23d43..29f8033 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,9 +50,9 @@ Adjust heading style in each section as follows: 1. Only the chapter/section should be level 2, everything else should be level 3 and below (level 1 is the book title itself). Each asciidoc file should start with a "==" heading. 2. Headings should be all lower case, except for first letter, proper nouns and acronyms. "An introduction to the Lightning Network", "Explaining the physics of fulgurites" etc. -3. Acronyms are spelled out, capitalized, with the acronym in parentheses (eg. "Hash Time-Locked Contract (HTLC)"). Once you have spelled out an acronym in one heading, we can keep it as an acronym only in subsequent headings. +3. Acronyms are spelled out, capitalized, with the acronym in parentheses (e.g. "Hash Time-Locked Contract (HTLC)"). Once you have spelled out an acronym in one heading, we can keep it as an acronym only in subsequent headings. 4. No period at the end of headings. Question mark if it is a question (generally avoid question headings, unless really appropriate) -5. Should include a unique anchor all lower case, underscore separated, within double square brackets (eg. [[intro_to_htlcs]]). +5. Should include a unique anchor all lower case, underscore separated, within double square brackets (e.g. [[intro_to_htlcs]]). 6. Headings should be followed by a blank line. 7. Heading should be followed by a paragraph of text, not a lower-level heading without any text. If you find one like this, add a TODO comment (line of 4 slashes "////", line with "TODO: add paragraph", line of 4 slashes) 8. Often it seems useful to link to a webpage / url. Since the research community figured out that every year about 50% of all outstanding url's become invalid we encourage you to use the wayback machine / Web Archive at: http://web.archive.org and provide a link to a saved copy of the web page. From 7cc5aa0d71749b5a198be26cedc237b6a766fab8 Mon Sep 17 00:00:00 2001 From: vv01f Date: Wed, 5 Feb 2020 01:14:13 +0100 Subject: [PATCH 4/9] transact bitcoint or transact in Bitcoin --- 01_introduction.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01_introduction.asciidoc b/01_introduction.asciidoc index fdcdaad..fb80e61 100644 --- a/01_introduction.asciidoc +++ b/01_introduction.asciidoc @@ -58,7 +58,7 @@ The Lightning Network is a network that operates as "second layer" protocol on t As an electronic cash system, Bitcoin preserves the three most important properties of money (medium of exchange, store of value, and unit of account). Other relevant properties of digital payment systems include the ability of third parties to them as a method of control and/or a tool of surveillance. 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 (or another second-layer or scaling solution), it would be infeasible for millions of people to concurrently use Bitcoin as a medium of exchange because the network itself would become overloaded, slow, and costly. -To date, Bitcoin is the longest running, most secure cryptocurrency or electronic cash system and many people believe it represents the most stable store of value of all of the current cryptocurrencies. LN allows people to transact in bitcoin, without the overhead associated with on-chain transactions. This might seem confusing at first. You might be wondering how can LN actually work? While we could explain the network in computer science terms, it will be much easier to understand if we examine it from the perspective of people using it. In our examples, some of the people will have already used Bitcoin and others will be completely new to the Bitcoin network. 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: +To date, Bitcoin is the longest running, most secure cryptocurrency or electronic cash system and many people believe it represents the most stable store of value of all of the current cryptocurrencies. LN allows people to transact bitcoin, without the overhead associated with on-chain transactions. This might seem confusing at first. You might be wondering how can LN actually work? While we could explain the network in computer science terms, it will be much easier to understand if we examine it from the perspective of people using it. In our examples, some of the people will have already used Bitcoin and others will be completely new to the Bitcoin network. 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: consumer:: Alice is a bitcoin user who wants to make fast, secure, cheap, and private payments for small retail purchases. She buys coffee with bitcoin, using the Lightning Network. From ee33a341730fa406ab92efe4187f8243aa3b0c8f Mon Sep 17 00:00:00 2001 From: vv01f Date: Wed, 5 Feb 2020 01:19:22 +0100 Subject: [PATCH 5/9] a node, not an --- 01_introduction.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01_introduction.asciidoc b/01_introduction.asciidoc index fb80e61..8957fa6 100644 --- a/01_introduction.asciidoc +++ b/01_introduction.asciidoc @@ -83,4 +83,4 @@ Wei is an entrepreneur who sells information services related to the Lightning N === Chapter Summary -In this chapter we looked at the history of the Ligtning Network and the motivations behind second-layer scaling solutions for Bitcoin and other blockchain based networks. We learned basic terminology including node, payment channel, and on-and-off-chain transactions. Finally, we met Alice, Bob, Saavi, John, Gloria, Farel, and Wei who we'll be following throughout the rest of the book. In the next chapter we'll meet Alice and walk through her thought process as she selects an LN wallet and prepares to make her first LN transaction, to buy a cup of coffee from Bob's Cafe. +In this chapter we looked at the history of the Ligtning Network and the motivations behind second-layer scaling solutions for Bitcoin and other blockchain based networks. We learned basic terminology including node, payment channel, and on-and-off-chain transactions. Finally, we met Alice, Bob, Saavi, John, Gloria, Farel, and Wei who we'll be following throughout the rest of the book. In the next chapter we'll meet Alice and walk through her thought process as she selects a LN wallet and prepares to make her first LN transaction, to buy a cup of coffee from Bob's Cafe. From dc82887ec95c9d1562563d5ccd7f4eb25998e822 Mon Sep 17 00:00:00 2001 From: vv01f Date: Wed, 5 Feb 2020 01:25:55 +0100 Subject: [PATCH 6/9] a node, not an --- 02_getting_started.asciidoc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/02_getting_started.asciidoc b/02_getting_started.asciidoc index 03da7d5..383bca9 100644 --- a/02_getting_started.asciidoc +++ b/02_getting_started.asciidoc @@ -48,7 +48,7 @@ In <> we see the three broad categories of lightning wallet |=== -Lightning wallets can be installed on a variety of devices, including laptops, servers, and mobile devices. To run an LN node and a Bitcoin node, you will need to use a server or desktop computer, as mobile devices and laptops are usually not powerful enough in terms of capacity, processing, battery life, and connectivity. +Lightning wallets can be installed on a variety of devices, including laptops, servers, and mobile devices. To run a LN node and a Bitcoin node, you will need to use a server or desktop computer, as mobile devices and laptops are usually not powerful enough in terms of capacity, processing, battery life, and connectivity. In <> we see some examples of currently popular LN node and wallet applications for different types of devices. @@ -77,11 +77,11 @@ In the next section we will introduce our first user and walk through their firs === Alice's First LN Wallet -Alice is a long time Bitcoin user. We first met Alice in Chapter 1 of _"Mastering Bitcoin"_ footnote:["Mastering Bitcoin 2nd Edition, Chapter 1" Andreas M. Antonopoulos (https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch01.asciidoc).], when she bought a cup of coffee from Bob's cafe, using a bitcoin transaction. Now, Alice is eager to learn about and experiment with the Lightning Network. First, she has to select an LN wallet that meets her needs. +Alice is a long time Bitcoin user. We first met Alice in Chapter 1 of _"Mastering Bitcoin"_ footnote:["Mastering Bitcoin 2nd Edition, Chapter 1" Andreas M. Antonopoulos (https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch01.asciidoc).], when she bought a cup of coffee from Bob's cafe, using a bitcoin transaction. Now, Alice is eager to learn about and experiment with the Lightning Network. First, she has to select a LN wallet that meets her needs. Alice does not want to entrust custody of her bitcoin to third parties. She has learned enough about cryptocurrency to know how to use a wallet. She also wants a mobile wallet so that she can use it for small payments on-the-go, so she chooses the _Eclair_ wallet, a popular non-custodial mobile LN wallet. -==== Downloading and Installing an LN Wallet +==== Downloading and Installing a LN Wallet When looking for a new cryptocurrency wallet, you must be very careful to select a secure source for the software. @@ -148,7 +148,7 @@ After Alice initializes her Eclair Mobile wallet, she will see a brief tutorial === Loading Bitcoin Into the Wallet -Alice now has an LN wallet. But, it's empty! She now faces one of the more challenging aspects of this experiment: she has to find a way to acquire some bitcoin and load it onto her Eclair wallet. +Alice now has a LN wallet. But, it's empty! She now faces one of the more challenging aspects of this experiment: she has to find a way to acquire some bitcoin and load it onto her Eclair wallet. [[acquiring-bitcoin]] ==== Acquiring Bitcoin @@ -258,17 +258,17 @@ Choosing the ACINQ node will slightly reduce Alice's privacy, as it will give AC Alice touches "ACINQ Node" and is ready to open her first LN channel. -==== Opening an LN Channel +==== Opening a LN Channel When Alice selects a node to open a new channel, she is asked to select how much money she wants allocated to this channel. In subsequent chapters we will discuss the implications of these choices, but for now Alice will allocate almost all her funds to the channel. Since she will have to pay transaction fees to open the channel, she will select an amount a few dollars (or a few thousandths of a bitcoin) less than her total balance. Alice allocates 0.018BTC of her 0.020 total to her channel and accepts the default fee rate, as shown in <>. [[eclair-open-channel]] -.Opening an LN Channel +.Opening a LN Channel image:images/eclair-open-channel-detail.png[] -Once she clicks "OPEN", her wallet constructs the special Bitcoin transaction that opens an LN channel, known as the _funding transaction_. The funding transaction is sent to the Bitcoin Network for confirmation. +Once she clicks "OPEN", her wallet constructs the special Bitcoin transaction that opens a LN channel, known as the _funding transaction_. The funding transaction is sent to the Bitcoin Network for confirmation. Alice now has to wait, again (see <>), for the transaction to be recorded in the Bitcoin Blockchain. As with the initial Bitcoin transaction that she used to acquire her bitcoin, she has to wait for six or more confirmations (approximately one hour). From 90505d984a069e045be69a9e3c5446e3d96fa8e1 Mon Sep 17 00:00:00 2001 From: vv01f Date: Tue, 11 Feb 2020 16:37:02 +0100 Subject: [PATCH 7/9] apply requested change --- 01_introduction.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01_introduction.asciidoc b/01_introduction.asciidoc index 8957fa6..1ebc5cc 100644 --- a/01_introduction.asciidoc +++ b/01_introduction.asciidoc @@ -8,7 +8,7 @@ While the bulk of this book is written for programmers, the first two chapters a === Motivation for the Lightning Network -As Bitcoin grows, and the demand for transactions grows, the number of transactions in each block will increase until eventually hitting the block size limit. When blocks are full, excess transactions are left to wait in a queue. Many users increase the fees they're willing to pay in order to buy space for their transaction in the next block. At the same tim an increasing number of users are left behind. Their transactions, e.g. microtransactions such as common small spendings, are not economically qualified to be on the network. However, simply increasing block size does not solve the problem because it has the undesirable effect of centralizing the network. Because blockchains are gossip protocols, each node is required to know and validate every single transaction that occurs on the network. As such, the greater the block size, the greater the processing and storage requirements for each individual node. The greater the requirements, the fewer the nodes that will ultimately be run. But what if each node wasn't required to know and validate every single transaction? What if there was a way to have scalable off-chain transactions, without losing the security of the Bitcoin network? +As Bitcoin grows, and the demand for transactions grows, the number of transactions in each block will increase until eventually hitting the block size limit. When blocks are full, excess transactions are left to wait in a queue. Many users increase the fees they're willing to pay in order to buy space for their transaction in the next block. At the same time an increasing number of users are left behind. Their transactions, e.g. microtransactions such as common small spendings, are not economically qualified to be on the network. However, simply increasing block size does not solve the problem because it has the undesirable effect of centralizing the network. Because blockchains are gossip protocols, each node is required to know and validate every single transaction that occurs on the network. As such, the greater the block size, the greater the processing and storage requirements for each individual node. The greater the requirements, the fewer the nodes that will ultimately be run. But what if each node wasn't required to know and validate every single transaction? What if there was a way to have scalable off-chain transactions, without losing the security of the Bitcoin network? In February 2015, Joseph Poon and Thaddeus Dryja proposed a possible solution to the Bitcoin Scalability Problem, with the publication of _"The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments"_ footnote:[Joseph Poon, Thaddeus Dryja - "The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments" (https://lightning.network/lightning-network-paper.pdf).] In the whitepaper, Poon and Dryja estimate that in order for Bitcoin to reach the 47,000 transactions per second processed at peak by Visa, it would require 8GB blocks. This would make running a node completely untenable for anyone but large scale enterprises and industrial grade operations. The result would be a network in which only a few users can actually validate the state of the ledger, which ultimately breaks the trust model of Bitcoin. From 84eaf7b6128bd596906d1b1ee90403f55ccb702a Mon Sep 17 00:00:00 2001 From: vv01f Date: Tue, 11 Feb 2020 19:49:24 +0100 Subject: [PATCH 8/9] rm trailing space --- 02_getting_started.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/02_getting_started.asciidoc b/02_getting_started.asciidoc index ccf2ecd..a7dbae4 100644 --- a/02_getting_started.asciidoc +++ b/02_getting_started.asciidoc @@ -35,8 +35,8 @@ Blockchains, especially open blockchains like Bitcoin, attempt to minimize or el Every other component of a lightning wallet brings similar considerations of trust. If all the components are under the control of the user, then the amount of trust in third parties is minimized, bringing maximum power to the user. Of course, this is a direct trade-off, as with that power comes the responsibility to manage complex software. -Every user must consider their own technical skills before deciding what type of lightning wallet to use. Those with strong technical skills should use a lightning wallet that puts all of the components under the direct control of the user. Those with less technical skill but a desire to control their funds, should choose a _non-custodial_ lightning wallet, even if some of the components (other than the keystore) rely on some trusted third parties. -Often the trust in those cases relates to privacy. +Every user must consider their own technical skills before deciding what type of lightning wallet to use. Those with strong technical skills should use a lightning wallet that puts all of the components under the direct control of the user. Those with less technical skill but a desire to control their funds, should choose a _non-custodial_ lightning wallet, even if some of the components (other than the keystore) rely on some trusted third parties. +Often the trust in those cases relates to privacy. If users decide to outsource some functionality to a third party they usually give up some privacy as the third party will learn some information. Finally, those seeking simplicity and convenience, even at the expense of control and security, may choose a custodial lightning wallet. This is the least challenging option, but it _undermines the trust model of cryptocurrency_ and should, therefore, be considered only as a stepping stone towards more control and self-reliance. From 6ee3e1e22bb9f204cd1bae9911e462bd994cd3a5 Mon Sep 17 00:00:00 2001 From: vv01f Date: Tue, 11 Feb 2020 20:03:06 +0100 Subject: [PATCH 9/9] rm trailing space --- 01_introduction.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01_introduction.asciidoc b/01_introduction.asciidoc index 1301f4b..6ae446f 100644 --- a/01_introduction.asciidoc +++ b/01_introduction.asciidoc @@ -2,7 +2,7 @@ [[intro_what_is_the_lightning_network]] == Introduction -Welcome to Mastering the Lightning Network or "LN" as we'll call it throughout the book! +Welcome to Mastering the Lightning Network or "LN" as we'll call it throughout the book! The LN is a protocol for using Bitcoin in a smart and non obvious way. Thus it is a second layer technology on top of Bitcoin. It is changing the way people exchange value online and it's one of the most exciting advancements to happen to the Bitcoin network over the past few years. Right now, LN is in its infancy. In concept it's about 5 years old, in implementation about 3 years old. We're only beginning to see the opportunities LN provides including improved privacy, speed, and scale. With core knowledge of LN, you can help shape the future of the network while building opportunities for yourself as well. Some basic knowledge about Bitcoin is assumed but can be readily acquired by reading the first two chapters of _Mastering Bitcoin_ which are available for free online.