From a74436ccadf3ede90b8b4e490461f0ceca372923 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Sat, 21 Sep 2019 22:38:41 +0000 Subject: [PATCH 1/2] travis: Add linter to detect incorrect capitalization or when the end of a sentence is not on the same line as the beginning of the sentence --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 56845ba..002371a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,4 +17,5 @@ script: - 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 + - git grep -E "^[= ]*[a-z]" -- "*.asciidoc" "*.md" | grep -vE '(:(link|pass):|::$)' | grep -vE ':[= ]*(http|https)' | grep -E "[a-z]" && echo "^ The first letter of the sentence should be capitalized. The end of the sentence should be on the same line as the beginning of the sentence. Please correct." && exit 1 || true - codespell --ignore-words-list=que $(git ls-files -- "*.asciidoc" "*.md") From 48b0ea9f8e38d0e00ee792d8f430123cd943e914 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Sat, 21 Sep 2019 22:46:40 +0000 Subject: [PATCH 2/2] Fix incorrect capitalization --- ch01.asciidoc | 2 +- ch02.asciidoc | 4 ++-- glossary.asciidoc | 18 +++++++++--------- topics.asciidoc | 12 ++++++------ 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ch01.asciidoc b/ch01.asciidoc index bdb3141..ee27985 100644 --- a/ch01.asciidoc +++ b/ch01.asciidoc @@ -81,7 +81,7 @@ Andresen noted that there might be a better construction which would require les Andresen's work led to many discussions on Bitcointalk forum, and later on the bitcoin-development mailing list. These discussions resulted in the first construction of the first unidirectional payment channels. -to sum this up: Andresen used a similar construction as the unidirectional channel. +To sum this up: Andresen used a similar construction as the unidirectional channel. They key difference was that a trusted party would have co-signed the spend of the funding transaction. The Ultra Server was not able to steal Bitcoin. diff --git a/ch02.asciidoc b/ch02.asciidoc index f9117c0..00713f9 100644 --- a/ch02.asciidoc +++ b/ch02.asciidoc @@ -31,14 +31,14 @@ * gossip protocol * option to have private channels -==== closing the channel +==== 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) +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 diff --git a/glossary.asciidoc b/glossary.asciidoc index 66d2f0e..b80a145 100644 --- a/glossary.asciidoc +++ b/glossary.asciidoc @@ -28,7 +28,7 @@ Balance:: Nodes should aim to have balanced channels with similar inbound and outbound capicities. bech32:: - tbd. + TBD. bip:: Bitcoin Improvement Proposals. A set of proposals that members of the bitcoin community have submitted to improve bitcoin. For example, BIP-21 is a proposal to improve the bitcoin uniform resource identifier (URI) scheme. @@ -136,7 +136,7 @@ double-spending:: The Revocable Sequence Maturity Contracts used to construct payment channels heavily attempt to double-spend bitcoin. downstream payment:: - tbd. + TBD. ECDSA:: Elliptic Curve Digital Signature Algorithm or ECDSA is a cryptographic algorithm used by Bitcoin to ensure that funds can only be spent by their rightful owners. @@ -145,7 +145,7 @@ Eclair:: Implementation of the Lightning Network Protocol by the Paris based company ACINQ. It is written in Scala. encoding:: - tbd. + TBD. Ephemeral Key:: Ephemeral keys are mainly within the SPHINX Mix Format and Onion Routing on the Lightning Network. @@ -215,7 +215,7 @@ Lightning Network:: Other components of the lightning network are the gossip protocol, the transport layer and payment requests. Lightning Network Node:: - tbd. + TBD. lnd:: Implementation of the Lightning Network Protocol by the San Francisco based company Lightning Labs. @@ -311,7 +311,7 @@ Proof-of-Work:: A piece of data that requires significant computation to find. In bitcoin, miners must find a numeric solution to the SHA256 algorithm that meets a network-wide target, the difficulty target. Relative Timelock:: - tbd. + TBD. Revocable Sequence Maturity Contract:: This contract is used to construct a payment channel between two Bitcoin or Lightning Network users who do not need to trust each other. @@ -355,7 +355,7 @@ ScriptSig (aka signature script):: ScriptSig or signature script, is the data generated by a spender which is almost always used as variables to satisfy a pubkey script. Second stage HTLC:: - tbd. + TBD. secret key (aka private key):: The secret number that unlocks bitcoin sent to the corresponding address. pass:[A secret] key looks like the following: @@ -408,16 +408,16 @@ Transaction:: Transactions can also contain contracts and should not be confused with payments. Transaction Malleability:: - tbd. + TBD. Transport Layer:: - tbd. + TBD. unspent transaction output (UTXO):: UTXO is an unspent transaction output that can be spent as an input to a new transaction. upstream payment:: - tbd. + TBD. wallet:: Software that holds all your bitcoin addresses and secret keys. Use it to send, receive, and store your bitcoin. diff --git a/topics.asciidoc b/topics.asciidoc index cbeba16..ca1a3a1 100644 --- a/topics.asciidoc +++ b/topics.asciidoc @@ -1,5 +1,5 @@ [preface] -== list of topics +== List of topics This is a list of grouped topics that might be covered in the book. It will lead to the creation of an index @@ -186,11 +186,11 @@ Creating Lightning Network Applications * btc pay server * Turbo Channels https://medium.com/@akumaigorodski/instant-channels-enable-safe-lightning-payments-with-unconfirmed-funding-8d640defa183 -=== comparisons and examples +=== 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 separately to keep better track of them. -==== comparisons +==== Comparisons * payment process on Bitcoin vs payment process on the lightning network * transaction vs payment * capacity vs balance @@ -202,10 +202,10 @@ They have particular illustrative purpose and are therefore collected separately * locked bitcoin vs freely movable bitcoin (onchain vs. offchain bitcoin) * routing vs path finding -==== examples -tba +==== Examples +TBA. -==== properties +==== Properties * the seven ingredients for a payment channel c.f: https://youtu.be/AcP3czefanM ** 2-2 musig address