Skip to content

Commit

Permalink
translate 1~9, 15, 17
Browse files Browse the repository at this point in the history
  • Loading branch information
Yihen-Liu committed May 31, 2023
1 parent 54453c7 commit 05b477d
Show file tree
Hide file tree
Showing 17 changed files with 2,762 additions and 1,887 deletions.
360 changes: 238 additions & 122 deletions 01_introduction.asciidoc

Large diffs are not rendered by default.

481 changes: 314 additions & 167 deletions 02_getting_started.asciidoc

Large diffs are not rendered by default.

1,038 changes: 611 additions & 427 deletions 03_how_ln_works.asciidoc

Large diffs are not rendered by default.

418 changes: 225 additions & 193 deletions 04_node_client.asciidoc

Large diffs are not rendered by default.

208 changes: 100 additions & 108 deletions 05_node_operations.asciidoc

Large diffs are not rendered by default.

59 changes: 33 additions & 26 deletions 06_lightning_architecture.asciidoc
Original file line number Diff line number Diff line change
@@ -1,55 +1,62 @@
== Lightning Network Architecture
== 闪电网络架构

((("architecture, Lightning Network", id="ix_06_lightning_architecture-asciidoc0", range="startofrange")))In the first part of this book we introduced the main concepts of the Lightning Network and worked through a comprehensive example of routing a payment and setting up the tools we can use to explore further. In the second part of the book we will explore the Lightning Network in a lot more technical detail, dissecting each of the building blocks.
((("architecture, Lightning Network", id="ix_06_lightning_architecture-asciidoc0", range="startofrange")))在本书的第一部分,我们介绍了闪电网络的主要概念,通过一个综合示例来说明支付路径并配置了一些可以用来进一步探索学习闪电网络的工具。在本书的第二部分,我们将深入探讨闪电网络的更多技术细节,剖析每个功能模块。

In this section we will outline the components of the Lightning Network in more detail and provide a "big picture" perspective to guide you through the following chapters.

=== The Lightning Network Protocol Suite
在本节中,我们将更详细地概述闪电网络的组件,并提供“全局”视角来指导您完成以下章节。

((("architecture, Lightning Network","protocol suite")))((("protocol stack")))The Lightning Network is composed of a complex collection of protocols that run on top of the internet. We can broadly classify these protocols into five distinct layers that make up a _protocol stack_, where each layer builds upon and uses the protocols in the layer below. Also, each protocol layer abstracts the underlying layers and "hides" some of the complexity.
=== 闪电网络协议组件

The architecture diagram shown in <<lightning_network_protocol_suite>> provides an overview of these layers and their component protocols.
((("architecture, Lightning Network","protocol suite")))((("protocol stack")))闪电网络由运行在互联网之上的复杂协议集合组成。 我们可以将这些协议大致分为五个不同的层,构成一个 _协议栈_,其中每一层都基于并使用下一层中的协议。 此外,每个协议层都抽象了底层并“隐藏”了一些复杂性。


<<lightning_network_protocol_suite>> 中显示的架构图提供了这些层及其组件协议的概述。

[[lightning_network_protocol_suite]]
.The Lightning Network protocol suite
image::images/mtln_0601.png[]

((("architecture, Lightning Network","layers")))The five layers of the Lightning Network, from the bottom up, are:

Network connection layer:: This contains the protocols that interact directly with the internet core protocols (TCP/IP), overlay protocols (Tor v2/v3), and internet services (DNS). This layer also contains the cryptographic transport protocols that protect Lightning pass:[<span class="keep-together">messages</span>].
((("architecture, Lightning Network","layers")))闪电网络的五层,自下而上依次是:

网络连接层:: 该层包含直接与 Internet 核心协议 (TCP/IP)、应用协议 (Tor v2/v3) 和 Internet 服务 (DNS) 交互的协议。该层还包含保护闪电消息的加密传输协议。

消息层:: 该层包含节点用于协商特征、格式化消息和编码消息字段的协议。


P2P层:: 该层是闪电节点之间通信的主要协议层,也包含节点之间交换的所有不同消息。


Messaging layer:: This layer contains the protocols that nodes use to negotiate features, format messages, and encode message fields.
路由层:: 该层包含用于在节点之间以端到端和原子路由支付的协议。也包含闪电网络的核心功能:路由支付。

Peer-to-peer (P2P) layer:: This layer is the primary protocol layer for communication between Lightning nodes and contains all the different messages exchanged between nodes.

Routing layer:: This layer contains the protocols used to route payments between nodes, end-to-end and atomically. This layer contains the core functionality of the Lightning Network: routed payments.
支付层:: 网络的最高层,为应用程序提供可靠的支付接口。

Payment layer:: The highest layer of the network, which presents a reliable payment interface to applications.
=== 闪电网络详述

=== Lightning in Detail
((("architecture, Lightning Network","outline of details")))在接下来的10章中,我们将剖析协议组件并深入研究闪电网络的每个组件。

((("architecture, Lightning Network","outline of details")))Over the next 10 chapters, we will dissect the protocol suite and examine each component of the Lightning Network in detail.

We spent quite some time trying to decide the best order of presenting this detail. It's not an easy choice because there is so much interdependence between different components: as you start explaining one, you find that it pulls in quite a few of the other componenents. Instead of a top-down or bottom-up approach, we ended up choosing a more meandering path that starts with the most fundamental building blocks that are unique to the Lightning Network-Payment Channels and moves outward from there. But since that path is not obvious, we will use the Lightning Protocol Suite shown in <<lightning_network_protocol_suite>> as a map. In each chapter will focus on one or more related components, and you will see them highlighted in the protocol suite. Kind of like a map marker saying "You are here!"
我们花了相当长的时间试图确定并呈现组件细节的最佳顺序。 这不是一件容易的事,因为不同的组件之间存在如此多的相互依赖:当您开始解释一个时,您会发现它包含了相当多的其他组件。,抛开自上而下或自下而上的方法,我们最终选择了一条更曲折的路径,从闪电网络支付渠道独有的最基本构建块开始,然后从那里向外延展。但由于该路径并不明显,我们将使用 <<lightning_network_protocol_suite>> 中显示的闪电协议套件作为地图。 在每一章中都将关注一个或多个相关组件,并且您会看到它们在协议套件中被突出显示。 有点像地图标记说 “你在这里!”

Here's what we will cover:
以下是我们将要覆盖的内容:

pass:[<a data-type="xref" href="payment_channels" data-xrefstyle="chap-num-title">#payment_channels</a>]:: In this chapter we will look at how payment channels work, in significantly more depth than we saw in the earlier parts of the book. We will look at the structure and Bitcoin Script of the funding and commitment transactions, and the process used by nodes to negotiate each step in the protocol.
支付通道:: 在本章中,我们将了解支付渠道是如何工作的,这比我们在本书前面部分看到的要深入得多。 我们将研究资金和承诺交易的结构和比特币脚本,以及节点在协议协商过程中的每个步骤。

pass:[<a data-type="xref" href="#routing" data-xrefstyle="chap-num-title">#routing</a>]:: Next, we will put together several payment channels in a network and route a payment from one end to the other. In that process we will dive into the hash time-locked contract (HTLC) smart contract and the Bitcoin Script that we use to construct it.
路由:: 接下来,我们将把几个支付渠道放在一个网络中,并将支付从一端路由到另一端。在这个过程中,我们将深入研究哈希时间锁(HTLC)合约和我们用来构建它的比特币脚本。

pass:[<a data-type="xref" href="#channel_operation" data-xrefstyle="chap-num-title">#channel_operation</a>]:: Putting together the concepts of a simple payment channel and a routed payment using HTLCs, we will now look at how HTLCs are part of each channel's commitment transaction. We will also look at the protocol for adding, settling, failing, and removing HTLCs from the commitments.
通道行为:: 将简单支付通道和使用 HTLC 的路由支付的概念放在一起,我们现在将了解 HTLC 如何成为每个通道承诺交易的一部分。 我们还将研究在承诺中添加、解决、失败和删除 HTLC 的协议。

pass:[<a data-type="xref" href="#onion_routing" data-xrefstyle="chap-num-title">#onion_routing</a>]:: Next, we will look at how the HTLC information is propagated across the network inside the onion routing protocol. We will look at the mechanism for layered encryption and decryption that gives the Lightning Network some of its privacy characteristics.
洋葱路由:: 接下来,我们将看看 HTLC 信息是如何在洋葱路由协议内通过网络传播的。 我们将研究赋予闪电网络一些隐私特征的分层加密和解密机制。

pass:[<a data-type="xref" href="#gossip" data-xrefstyle="chap-num-title">#gossip</a>]:: In this chapter we will look at how Lightning nodes find each other and learn about published channels to construct a channel graph that they can use to find paths across the network.
八卦协议:: 在本章中,我们将了解闪电节点如何找到彼此并了解已发布的通道以构建通道图,它们可以使用该通道图来查找网络中的路径。

pass:[<a data-type="xref" href="#path_finding" data-xrefstyle="chap-num-title">>#path_finding</a>]:: Next, we will see how the information from the gossip protocol is used by each node to build a "map" of the entire network, which it can use to find paths from one point to another to route payments. We'll also look at the exiting innovations in pathfinding, such as multipart payments.
路径寻找:: 接下来,我们将看到每个节点如何使用来自 gossip 协议的信息来构建整个网络的“地图”,它可以使用它来找到从一个点到另一个点的路径来路由支付。 我们还将研究现有的寻路创新,例如多部分支付。

pass:[<a data-type="xref" href="#wire_protocol" data-xrefstyle="chap-num-title">#wire_protocol</a>]:: Underpinning the Lightning Network is the peer-to-peer protocol that nodes use to exchange messages about the network and about their channels. In this chapter we look at how those messages are constructed and the extension capabilities built into messages with feature bits and Type-Length-Value (TLV) encoding.
发票:: 闪电网络的一个关键部分是付款请求,也称为闪电发票。 在本章中,我们将剖析发票的结构和编码。

pass:[<a data-type="xref" href="#encrypted_message_transport" data-xrefstyle="chap-num-title">#encrypted_message_transport</a>]:: Moving down to the lower-level part of the network, we will look at the underlying encrypted transport system that ensures the secrecy and integrity of all communications between nodes.(((range="endofrange", startref="ix_06_lightning_architecture-asciidoc0")))
消息格式:: 支撑闪电网络的是点对点协议,节点使用该协议来交换有关网络及其通道的消息。 在本章中,我们将了解这些消息是如何构造的,以及通过特征位和类型-长度-值 (TLV) 编码来扩展消息的表达能力。

pass:[<a data-type="xref" href="#invoices" data-xrefstyle="chap-num-title">#invoices</a>]:: A key part of the Lightning Network is payment requests, also known as Lightning invoices. In this chapter we dissect the structure and encoding of an invoice.
传输层消息加密:: 这部分是网络传输的底层部分;在这部分中,我们将研究确保节点之间所有通信的保密性和完整性的底层加密传输系统。

Let's dive in!
让我们开始吧!
Loading

0 comments on commit 05b477d

Please sign in to comment.