{"action":"created","comment":{"url":"https://api.github.com/repos/xitu/gold-miner/pulls/comments/172390740","pull_request_review_id":101057349,"id":172390740,"diff_hunk":"@@ -2,239 +2,240 @@\n > * 原文作者：[Josh Stark](https://medium.com/@jjmstark?source=post_header_lockup)\n > * 译文出自：[掘金翻译计划](https://github.com/xitu/gold-miner)\n > * 本文永久链接：[https://github.com/xitu/gold-miner/blob/master/TODO/making-sense-of-ethereums-layer-2-scaling-solutions-state-channels-plasma-and-truebit.md](https://github.com/xitu/gold-miner/blob/master/TODO/making-sense-of-ethereums-layer-2-scaling-solutions-state-channels-plasma-and-truebit.md)\n-> * 译者：\n+> * 译者：JohnJiangLA\n > * 校对者：\n \n-# 带你了解以太坊第 2 层扩容方案：State Channels、Plasma 和 Truebit\n+# 带你了解以太坊第2层扩容方案：状态通道（State Channels）、Plasma 和 Truebit\n \n ![](https://cdn-images-1.medium.com/max/800/1*XTjr9JD25uUluY_QVQ_RaA.jpeg)\n \n-Construction of the Tunkhannock Viaduct railway bridge in Pennsylvania ([cc](https://www.flickr.com/photos/library_of_congress/5715531287)). Roman engineering principles being extended to new uses.\n+宾夕法尼亚州 Tunkhannock 地区铁路高架桥（[cc](https://www.flickr.com/photos/library_of_congress/5715531287)）。古罗马的建筑理念在新时代的使用。\n \n-For ethereum [2018 is the year of infrastructure](https://twitter.com/L4ventures/status/953041925241757697). This is the year when early adoption will test the limits of the network, renewing focus on technologies built to scale ethereum.\n+对于以太坊来说 [2018 年是着力基础建设的一年](https://twitter.com/L4ventures/status/953041925241757697)。今年会是对它早期采用的技术进行网络负载考验的一年，而其版本的更新也主要关注用于一些扩展以太坊的技术。\n \n-**Ethereum is still in its infancy.** Today, it [isn’t safe or scalable](https://twitter.com/VladZamfir/status/838006311598030848). This is well understood by anyone who works closely with the technology. But over the last year, the ICO-driven hype has begun to far exaggerate the current capabilities of the network. The promise of ethereum and web3 — a safe, easy to use decentralized internet, bound by a common set of economic protocols, and used by billions of people — is still on the horizon, and [will not be realized until critical infrastructure is built](https://twitter.com/granthummer/status/957353619736559616).\n+**以太坊至今仍处于成长初期。**现今，它还不是安全的或者可扩展的(https://twitter.com/VladZamfir/status/838006311598030848)。技术人员能够很清楚的认识到这一点。但是在去年，ICO 驱动的炒作已经开始夸大目前的网络能力。构建一个安全，易于使用的分散式互联网，受约于一套通用经济规范并被无数人使用，以太坊和 web3 提出的这一美好承诺就在眼前，但[只有在建立关键基础设施的前提下才能够实现](https://twitter.com/granthummer/status/957353619736559616)。\n \n-The projects working to build this infrastructure and expand the capabilities of ethereum are commonly referred to as _scaling solutions_. These take many different forms, and are often compatible or complimentary with each other.\n+致力于构建这种基础架构和扩展以太坊性能的项目通常被称为**扩展方案（scaling solutions）**。这些项目有着不同的形式，并且通常相互兼容或互补。\n \n-In this long post I want to dive deep into _one_ category of scaling solution: **“off-chain” or “layer 2” solutions.**\n+在这篇长帖中，我想要深入讲解**一**种扩展方案：**“off-chain” 或 “第二层（layer 2）” 方案。**\n \n-*   **First**, we’ll discuss the scaling challenges of ethereum (and all public blockchains) in general.\n-*   **Second**, we’ll cover the different approaches to solving the scaling challenge, distinguishing between “layer 1” and “layer 2” solutions.\n-*   **Third**, we’ll delve into layer 2 solutions and explain how they work — specifically, we’ll talk about [**state channels**](https://medium.com/l4-media/generalized-state-channels-on-ethereum-de0357f5fb44)**, P**[**lasma**](http://plasma.io/)**, and** [**Truebit**](http://truebit.io)\n+*   **第一**，我们会概略的讨论下以太坊（以及所有公用的区块链）的扩展难题。\n+*   **第二**，我们将介绍解决扩展挑战的不同方法，区分 “layer 1” 和 “layer 2” 解决方案。\n+*   **第三**，我们会深入了解第二层（layer 2）解决方案并详细解释它是怎样运作的，我们会谈及 [**状态通道（tate channels）**](https://medium.com/l4-media/generalized-state-channels-on-ethereum-de0357f5fb44)**，**[**Plasma**](http://plasma.io/) **和**  [**Truebit**](http://truebit.io)。\n \n-**This article focuses on giving the reader a thorough and detailed _conceptual_ understanding of how layer 2 solutions work**. But we won’t dig into code or specific implementations. Rather, we focus on understanding the economic mechanisms used to build these systems, and the common insights that are shared between all layer 2 technologies.\n+**本文的重点是向读者提供对于第二层（layer 2）解决方案工作原理全面而彻底的概念理解。**但我们不会深入研究代码或特定实现。相反，我们专注理解用于构建这些系统的经济机制以及所有第二层技术之间共同的思维模式。\n \n * * *\n \n-### 1. The scaling challenges of public blockchains\n+### 1. 公用区块链的扩展难题\n \n-First, it’s important to understand that “scaling” isn’t a single, specific problem. **It refers to a collection of challenges that must be overcome to make ethereum useful to a global user base of billions of people.**\n+首先，你要知道“扩展”不是一个单一的、特定的问题，**它涉及了一系列难题，必须解决这些难题才能使以太坊对全球无数用户可用。**\n \n-The most commonly discussed scaling challenge is transaction throughput. Currently, ethereum can process roughly 15 transactions per second, while in comparison Visa processes approximately 45,000/tps. In the last year, some applications — like [Cryptokitties](http://cryptokitties.co), or the occasional ICO — have been popular enough to “slow down” the network and raise gas prices.\n+最常讨论的扩展难题是交易通量。目前，以太坊每秒可以处理大约15笔交易，而 Visa 的处理能力则大约在 45,000/tps。在去年，一些应用程序（比如 [Cryptokitties](http://cryptokitties.co) 或偶尔的 ICO）已经足够流行以至于“放缓了”网络速度并提升了[挖矿费用（gas）](https://myetherwallet.github.io/knowledge-base/gas/what-is-gas-ethereum.html) 的价格。\n \n-**The core limitation is that public blockchains like ethereum require every transaction to be processed by _every single node_ in the network.** Every operation that takes place on the ethereum blockchain — a payment, the birth of a Cryptokitty, deployment of a new ERC20 contract — must be performed by every single node in the network in parallel. This is by design — it’s part of what makes public blockchains authoritative. Nodes don’t have to rely on someone _else_ to tell them what the current state of the blockchain is — they figure it out for themselves.\n+**公用区块链（比如以太坊）最核心的缺陷是要求每一笔交易要被网络中的每一个节点处理。**一笔支付，Cryptokitty 的诞生，部署新的 ERC20 合约，每一个以太坊区块链上发生的操作都必须由网络中的每个节点并行执行。这是设计理念所决定的，也正是由于这种设计理念才使得公用区块链具有权威性。节点不需要依赖**其他**节点来告诉他们当前区块链的当前状态，它们会自己计算出来。\n \n-**This puts a fundamental limit on ethereum’s transaction throughput:** it cannot be higher than what we are willing to require from an individual node.\n+**这给以太坊的交易通量带来了根本性的限制：**它不能高于我们愿意达到的对于单个节点的要求。\n \n-We _could_ ask every individual node to do more work. If we doubled the block size (i.e., the block gas limit), it would mean that each node is doing roughly double the amount of work processing each block. But this comes at the cost of decentralization: requiring more work from nodes means that less powerful computers (like consumer devices) may drop out of the network, and mining becomes more centralized in powerful node operators.\n+我们**可以**要求每个节点做更多的工作，如果我们将块大小加倍(例如，区块 gas 限制)，这意味着每个节点处理每个区块的工作量大致是之前的两倍。但是这样就减弱了系统的分散化理念：节点要做更多的工作意味着性能较差的计算机（比如用户设备）可能会从网络中退出，并且挖矿也会更向性能强大的节点运营者集中。\n \n-Instead, we need a way for blockchains to _do more useful stuff_ without increasing the workload on individual nodes.\n+相反，我们需要一种方式使区块链**做更多有用的事**，但并不是增加单个节点的工作量。\n \n-Conceptually, there are [two ways we might go about solving this problem](https://blog.ethereum.org/2018/01/02/ethereum-scalability-research-development-subsidy-programs/):\n+从概念上来说，[有两种可能解决这个问题的方法](https://blog.ethereum.org/2018/01/02/ethereum-scalability-research-development-subsidy-programs/)：\n \n-#### **I. What if each node _didn’t_ have to process every operation in parallel?**\n+#### **一. 如果每个节点不必并行处理每个操作，会怎样？**\n \n-The first approach rejects our premise — what if we could build a blockchain where every node didn’t have to process every operation? What if, instead, the network was divided into two sections, which could operate semi-independently?\n+第一种方法是抛弃我们的前提，如果我们可以构建一个每个节点不必处理每个操作的区块链，会怎样？如果网络分为两个部分代替原有网络，每一个部分都可以独立运行，会怎样？\n \n-Section A could process one batch of transactions, while Section B processed another batch. This would effectively double the transaction throughput of a blockchain, since our limit is now what can be processed by _two_ nodes at the same time. If we can split a blockchain into many different sections, then we can increase the throughput of a blockchain by many multiples.\n+A 部分可以处理一批交易，而同时 B 部分可以处理另一批。这实际上会使区块链的交易通量翻倍。因为我们的限制现在能够被**两**个节点同时处理。如果我们可以将区块链分为许多不同的部分，那么我们可以将区块链的通量提高很多倍。\n \n-This is the insight behind “**sharding”**, a scaling solution being pursued by Vitalik’s [Ethereum Research group](http://ethereumresearch.org/) and others. A blockchain is split into different sections called _shards_, each of which can independently process transactions. Sharding is often referred to as a **Layer 1** scaling solution because it is implemented at the base-level protocol of ethereum itself. If you want to learn more about sharding, I recommend this [extensive FAQ](https://github.com/ethereum/wiki/wiki/Sharding-FAQ) and [this blog post](https://medium.com/@icebearhww/ethereum-sharding-and-finality-65248951f649).\n+这是**分片（sharding）**的思维模式，也是 Vitalik 的[以太坊研究小组（Ethereum Research group）](http://ethereumresearch.org/) 和其他社群正在研究的一种扩展方案。一个区块链被分割成叫做 **shards** 的不同部分，每一个部分都可以独立处理交易。因为分片是在以太坊的基础级协议中实现的，所以通常被也称为**第一层（layer 1）**扩展解决方案，如果你想了解更多有关分片的内容，请查看 [extensive FAQ](https://github.com/ethereum/wiki/wiki/Sharding-FAQ) 和[这篇博文](https://medium.com/@icebearhww/ethereum-sharding-and-finality-65248951f649)。\n \n ![](https://cdn-images-1.medium.com/max/800/1*mPCgXycICNjuscoFt974fQ.png)\n \n-#### **II. What if we could squeeze more _useful operations_ out of ethereum’s existing capacity?**\n+#### **二. 如果我们能够从以太坊现有能力中压榨出更多有用的业务操作**\n \n-The second option goes in the opposite direction: rather than increase the capacity of the ethereum blockchain itself, **what if we could do** **more things** **with the capacity we already have?** The throughput of the base-layer ethereum blockchain would be the same, but in practice we would be able to do many more operations that are useful to people and applications — like transactions, state updates in a game, or simple computations.\n+第二种选择的方向则相反：不是增加以太坊区块链本身的容量，**如果我们可以通过我们已经拥有的能力来做更多的事情，会怎样？**在基础级别以太坊区块链的生产力都是相同的，但是实际上，我们可以做更多对人和应用程序有用的操作，比如交易，游戏中的状态更新，或者简单的计算。\n \n-This is the insight behind “off-chain” technologies like [**state channels**](https://medium.com/l4-media/generalized-state-channels-on-ethereum-de0357f5fb44)**,** [**Plasma**](http://plasma.io/)**, and** [**Truebit**](http://truebit.io)**.** While each of these is solving a different problem, they all function by performing operations “off chain” instead of on the ethereum blockchain, while still guaranteeing a sufficient level of security and finality.\n+这是 “链下（off-chain）” 技术背后的思维逻辑，比如 [**状态通道（state channels）**](https://medium.com/l4-media/generalized-state-channels-on-ethereum-de0357f5fb44)**，**[**Plasma**](http://plasma.io/) **和** [**Truebit**](http://truebit.io)**。**虽然其中每个解决方案都在解决一个不同的问题，它们都通过执行“链下”操作而且能够不在以太坊区块链上运行的同时，仍然保证足够的安全性和权威性。\n \n-These are also known as **Layer 2** solutions because they are built “on top of” the ethereum main-chain. They do not require changes to the base level protocol — rather, they exist simply as smart contracts on ethereum that interact with off-chain software.\n+这些也被称为**第二层（layer 2）**解决方案，因为它们建立在以太坊主链“之上”。他们不需要更改基本级别的协议，相反，它们只是作为作为以太坊上的智能合约，用于与链下软件进行交互。\n \n ![](https://cdn-images-1.medium.com/max/800/1*TSKyc_gKn8kj0p-27nGQ-A.png)\n \n-### **2. Layer 2 solutions are _cryptoeconomic_ solutions**\n+### **2. 第二层（layer 2）解决方案是加密经济解决方案**\n \n-Before diving into specific layer 2 solutions, it’s important to understand the underlying insight that makes them possible.\n+在深入了解第二层解决方案的细节之前，了解下使其可行的潜在细节是非常重要的。\n \n-The basic power of a public blockchain is in [cryptoeconomic consensus](https://hackernoon.com/making-sense-of-cryptoeconomics-5edea77e4e8d). By carefully aligning incentives and securing them with software & cryptography, we can create networks of computers that reliably come to agreement about the internal state of a system. This is the key insight of [Satoshi’s whitepaper](https://bitcoin.org/bitcoin.pdf), which has now been applied in the design of many different public blockchains including bitcoin and ethereum.\n+公用区块链的动力源泉在于[加密经济合约](https://hackernoon.com/making-sense-of-cryptoeconomics-5edea77e4e8d)。通过调整激励措施并用软件和加密措施保护激励，我们可以创建一个就内部状态达成一致的稳定计算机网络。这是[中本聪的白皮书](https://bitcoin.org/bitcoin.pdf)的关键内容，现已应用于许多不同的公用区块链（包括比特币和以太坊）的设计中。\n \n-**Cryptoeconomic consensus give us a _core hard kernel_ of certainty** — unless something extreme like a 51% attack happens, we know that on-chain operations — like payments, or smart-contracts — will execute as written.\n+除了一些极端的情况下（比如 51% 攻击），**加密经济合约给了我们一个稳固的核心**。我们知道链上（on-chain）操作（比如支付，智能合约）可以被看做是写入去执行。\n \n-**The insight behind layer 2 solutions is that we can use this core kernel of certainty as an _anchor_ — a fixed point to which we attach additional economic mechanisms.** This _second_ _layer_ of economic mechanisms can extend the utility of public blockchains outwards, letting us have interactions _off_ of the blockchain that can still reliably refer _back_ to that core kernel if necessary.\n+**第二层（layer 2）解决方案背后的关键是我们可以将这个内核的稳固性用作锚点，一个可以附加其他经济机制的固定点**。这种**第二层**经济机制可以扩展公用区块链的可用性。让我们**脱离**区块链进行交互操作，并且在需要的情况下仍能可靠地重归到核心链上。\n \n-These layers built “on top” of ethereum won’t always have the same guarantee as on-chain operations. But they can still be _sufficiently final and secure_ to be very useful — especially when that slight decrease in finality lets us perform operations much faster or with lower overhead costs.\n+这些构建在以太坊“之上”的层并不总是与链上操作具有相同的保障。但是，它们仍然具备**足够的权威性，安全性以及可用性**，特别是在终端的略微减少时，我们能够更快的执行操作或维持更低的日常成本。\n \n-**Cryptoeconomics didn’t begin and end with Satoshi’s whitepaper — it’s a body of techniques that we are only learning to apply.** Not just in the design of core protocols, but in the design of second layer systems that extend the functionality of the underlying blockchain.\n+**加密经济并不是随着中本聪的白皮书而开始或结束**，它是最适合我们去学习与应用的技术主体。不仅存在于核心协议的设计中，也存在于第二层系统的设计中，它们扩展了底层区块链的功能性。\n \n-#### **I. State channels**\n+#### **一. 状态通道（State channels）**\n \n-State channels are a technique for performing transactions and other state updates “off chain”. However, things that happen “inside” of a state channel still retain a very high degree of security and finality: if anything goes wrong, we still have the _option_ of referring back to the “hard kernel” of certainty found in on-chain transactions.\n+状态通道（State Channel）是一种用于在“链下”执行交易和其他状态更新的技术。可是，一个状态渠道通道“中”发生的事务扔保持了很高的安全性和权威性。如果出现任何问题，我们仍然可以选择重归到“稳固内核”上，它的权威性是建立在链上交易基础上。\n \n-Most readers will be familiar with the idea of a _payment channel_, which has been around for several years, and recently implemented on bitcoin through the [lightning network](http://lightning.network/). State channels are the more _general_ form of payment channels — they can be used not only for payments, but for any arbitrary “state update” on a blockchain — like changes inside a smart contract. State channels were [first described in detail](http://www.jeffcoleman.ca/state-channels/) by Jeff Coleman in 2015.\n+大部分读者会熟悉存在多年的概念——**支付通道（payment channel）**，它最近通过在比特币上借助[闪电网络（lightning network）](http://lightning.network/)实现了。状态通道是支付通道泛化出来的形式，它不仅可用于支付，还可用于区块链上任意的“状态更新”，比如智能合约中的更改。在 2015 年，Jeff Coleman [第一次详细介绍](http://www.jeffcoleman.ca/state-channels/)了状态通道。\n \n-The best way to explain how a state channel works is by looking at an example. Keep in mind that this is a conceptual explanation, meaning that we won’t get into the technical details of a specific implementation.\n+解释状态通道的运作方式的最佳方法就是来看一个样例。请记住这是一个概念性的解释，也就是说我们不会牵涉到具体实现的技术细节。\n \n-Imagine that Alice and Bob want to play a game of tic tac toe, where the winner receives 1 eth. The naive way to do this would be to create a smart contract on ethereum that implements the rules of tic tac toe and keeps track of each players’ moves. Every time a player wants to make a move, they send a transaction to the contract. When one player wins, as determined by the rules, the contract pays out the 1 eth to the winner.\n+现在试想一下，爱丽丝和鲍勃想玩一场井字游戏，赢家可以获得一个以太币。实现这一目的的最简单方法就是在以太坊上创建一个智能合约，实现井字游戏规则并跟踪每个玩家的动作。每次玩家想要移动时，他们都会向合约发送一个交易。当一名玩家获胜时，会根据规则合约会付给赢家一个以太币。\n \n-This works, but is inefficient and slow. Alice and Bob are having _the entire ethereum network_ process their game, which might be overkill for what they need. They have to pay gas costs every time a player wants to make a move, and they have to _wait_ for blocks to be mined before making the next move.\n+这样是可行的，但是效率低下且速度慢。爱丽丝和鲍勃正在使用**整个以太网络**处理他们的游戏过程，这对于他们的需求来说有点不合时宜。他们每一步都需要支付挖矿费用（gas），并且还要在进行游戏的下一步之前都要**等待**挖矿完成。\n \n-**Instead, we can design a system that lets Alice and Bob play tic-tac-toe with _as few on-chain operations as possible_.** Alice and Bob will be able to update the state of the game _off-chain_, while still having full confidence that they can revert back to the ethereum main-chain if necessary. We call this system a “state channel”.\n+**不过，我们可以设计一个新的系统，它能使爱丽丝和鲍勃在井字游戏的过程中产生尽可能少的链上操作。**爱丽丝和鲍勃能够以链下的方式更新游戏状态，同时在需要时仍能将其重归到以太坊主链上。我们将这样一个系统称之为“状态通道”。\n \n-First, we create a smart contract “Judge” on the ethereum main-chain that understands the rules of tic-tac-toe, and can identify Alice and Bob as the two players in our game. This contract holds the 1 eth prize.\n+首先，我们在以太坊主链上创建一个能够理解井字游戏规则的智能合约 “Judge”，同时它也能够认定爱丽丝和鲍勃是我们游戏中的两位玩家。该合约持有一个以太的奖励。\n \n-Then, Alice and Bob begin playing the game. Alice creates and signs a transaction describing her first move, and sends it to Bob, who also signs it, sends back the signed version, and keeps a copy for himself. Then Bob creates and signs a transaction describing his first move, and sends it to Alice, who also signs it, sends it back, and keeps a copy. Each time, they are updating the current state of the game between them. Each transaction contains a “nonce”, which simply means that we can always tell later in what order the moves happened.\n+然后，爱丽丝和鲍勃开始玩游戏。爱丽丝创建并签署一个交易，它描述了她游戏的第一步，然后将其发送给鲍勃，鲍勃也签署了它，再将签名后的版本发回并保留一份副本。然后鲍勃也创建并签署一个描述他游戏中第一步的交易，并发送给爱丽丝，她也会签署它再将它返发回并保留一份副本，他们每一次都会这样互相更新游戏的当前状态。每一笔交易都包含一个“随机数”，这样我们就可以直接知道游戏中走棋的顺序。\n \n-**So far, none of this is happening on-chain**. Alice and Bob are simply sending transactions _to each other_ over the internet, but nothing is hitting the blockchain yet. However, all of the transactions _could_ be sent to the Judge contract — in other words, they are valid ethereum transactions. You can picture this as two people writing a series of blockchain-certified cheques back and forth to each other. **No money has actually been deposited or withdrawn from a bank, but each has a stack of cheques that they _could_ deposit whenever they want.**\n+**到目前为止，还没有发生任何链上的操作。**爱丽丝和鲍勃只是通过互联网**向彼此**发送交易，但没有任何事情涉及到区块链。但是，所有交易都可以发送给 Judge 合约，也就是说，它们是有效的以太坊交易。你可以把这看做两人在彼此来回填写了一系列经过区块链认证的支票。**实际上，并没有钱从银行中存入或取出，但是他俩都有一堆可以随时存入的支票。**\n \n-When Alice and Bob are done playing the game — perhaps because Alice has won — they can _close_ the channel by submitting the final state (e.g. a list of transactions) to the Judge contract, paying only a single transaction fee. The Judge ensures that this “final state” is signed by both parties, and waits a period of time to ensure that no one can legitimately challenge the result, and then pays out the 1 eth award to Alice.\n+当爱丽丝和鲍勃结束游戏时（可能是因为爱丽丝赢了），他们可以通过向 Judge 合约提交最终状态（比如，交易列表）来**关闭**该通道，这样就只用付一次交易费用。Judge 会确定双方都签署了这个“最终状态”，并等待一段时间来确保没人会对结果提出合理质疑，然后向爱丽丝支付一个以太币的奖励。\n \n-**Why do we need this “challenge period” where the Judge contract waits?**\n+**为什么我们需要设置一个让 Judge 合约等待一下的\"质疑时间\"**\n \n-Imagine that instead of sending the _real_ final state to the Judge, Bob sent an _old_ version of the state — one where he was winning ahead of Alice. The Judge is just a dumb contract — on its own, it has no way of knowing whether this is the most recent state or not.\n+假设，鲍勃并没有给 Judge 发送一份**真实**的最终状态，而是发送一份**之前**他赢了爱丽丝的状态。这时如果 Judge 是一个非智能合约，它自己根本无法得知这个状态是否是最近的状态。\n \n-The challenge period gives Alice a chance to _prove_ to the Judge contract that Bob has lied about the final state of the game. If there is a more recent state, then she will have a copy of the signed transactions, and she can submit those to the Judge. The Judge can tell that Alice’s version is more recent by checking the nonce, and Bob’s attempt to steal the win is rejected.\n+而质疑时间给了爱丽丝一个机会能够证明鲍勃提交了虚假的游戏最终状态。如果有更近期的状态，她就会有一份已签名交易的副本，并可以将其提供给 Judge。Judge 可以通过检查随机数来判断爱丽丝的版本是否更新，然后鲍勃盗取胜利的企图就能被驳回了。\n \n-#### **Features and limitations**\n+#### **特性和限制**\n \n-State channels are useful in many applications, where they are a strict improvement over doing operations on-chain. However, it’s important to keep in mind the particular tradeoffs that have been made when deciding whether an application is suitable for being channelized:\n+状态通道在许多应用中都很有用，它对执行链上操作时有严密的改进。但在决定应用程序是否适合被通道化时，请特别注意需要做出的一些特定折中：\n \n-*   **State channels rely on availability**. If Alice lost her internet connection during a challenge (maybe because Bob, desperate to claim the prize, sabotaged her home’s internet connection) she might not be able to respond before the challenge period ends. However, Alice can pay someone else to keep a copy of her state and maintain availability on her behalf.\n-*   **They’re particularly useful where participants are going to be exchanging _many_ state updates over a long period of time.** This is because there is an initial cost to _creating_ a channel in deploying the Judge contract. But once it is deployed, the cost per state update inside that channel is extremely low.\n-*   **State channels are best used for applications with a defined set of participants.** This is because the Judge contract must always know the entities (i.e. addresses) that are part of a given channel. We can add and remove people, but it requires a change to the contract each time.\n-*   **State channels have strong privacy properties**, because everything is happening “inside” a channel between participants, rather than broadcast publicly and recorded on-chain. Only the opening and closing transactions must be public.\n-*   **State channels have instant finality**, meaning that as soon as both parties sign a state update, it can be considered final. Both parties have a very high guarantee that, if necessary, they can “enforce” that state on-chain.\n+*   **状态通道依赖于可靠性。**如果爱丽丝在质疑时间内下线了（也许是鲍勃不顾一切地想要赢下奖品，而破坏了她家的互联网连接），她可能无法在质疑时间内做出回应。但是，爱丽丝可以向付款给其他人，让其保存一份她的状态副本并作为她的权益代表，以保持系统的可靠性。\n+*   **在长期范围中参与者需要交换许多状态更新时，它是非常有用的。**这是因为**部署** Judge 合约时**创建**一个通道会产生初始成本。但是一旦部署完成，该通道内每一个状态更新的成本都会很低\n+*   **状态通道最适于有一组明确参与者的应用程序。**这是因为 Judge 合约必须始终知晓所有参与到给定通道的实体（比如，地址）。我们可以增加或删除用户，但是每次都需要更改合约。\n+*   **状态通道有很强的隐私属性。**因为一切都发生在参与者之间的通道“内”，而不是公共广播并记录在链上。只有开启和关闭交易必须公开。\n+*   **状态通道的权威性是即时生效的。**这意味着只要双方签署了一个状态更新，它可以被认为是最终状态。双方都有明确保证，在必要的情况下，他们可以将状态“执行”到链上。\n \n-At L4, we’re building [**Counterfactual**](https://counterfactual.com/)**:** a framework for generalized state channels on ethereum. Our general purpose, modular implementation will let developers use state channels in their application without needing to be state channel experts themselves. You can read more about the project [here](https://medium.com/l4-media/generalized-state-channels-on-ethereum-de0357f5fb44). We’ll be releasing a paper describing our technique in Q1 2018.\n+我们 L4 团队正致力于创建 [**Counterfactual**](https://counterfactual.com/)，它是一个用于针对以太坊的广义状态通道。我们的目标是使开发者可以在他们的项目中模块化地使用状态通道，而不需要成为状态通道专家。你可以通过[这里](https://medium.com/l4-media/generalized-state-channels-on-ethereum-de0357f5fb44)了解更多该项目的信息。我们将在 2018 年的第一季度发布技术细节文件。\n \n-The other notable state channels project for ethereum is [Raiden](https://raiden.network/), which is currently focused on building a network of _payment_ channels, using a similar paradigm as the [lightning network](http://lightning.network). This means that rather than have to open up a channel with the specific person(s) you want to transact with, you can open up a single channel with an entity connected to a much larger network of channels, enabling you to make payments to anyone else connected to the same network without additional fees.\n+另一个值得注意的针对以太坊的状态通道项目是 [Raiden](https://raiden.network/)，目前正主要致力于构建**支付**通道网络，它使用了和 [闪电网络](http://lightning.network)类似的范式。这意味着你不必与想要交易的特定人员搭建通道。你可以与一个连接到更大型通道网络的实体架设一个单独的通道，这样你就能够向连接到同一网络的任何人付款而无需额外费用。\n \n-In addition to Counterfactual and Raiden, there are several application-specific channel implementations on ethereum. For instance, Funfair has built state channels (which they call “[Fate channels](https://funfair.io/state-channels-in-disguise/)”) for their decentralized gambling platform, Spankchain has built [one-way payment channels](https://twitter.com/SpankChain/status/932801441793585152) for adult performers (they also [used a state channel for their ICO](https://github.com/SpankChain/old-sc_auction)), and [Horizon Games](https://horizongames.co/) is using state channels in their first ethereum-based game.\n+除了 Counterfactual 和 Raiden，在以太坊上还有几个应用程序特定的通道实现。例如，Funfair 就为他们的分布式赌博平台搭建了一套他们称之为 “[Fate channels](https://funfair.io/state-channels-in-disguise/)” 的状态通道，SpainChain 为成人项目演员构建了一套 [one-way payment channels](https://twitter.com/SpankChain/status/932801441793585152)（他们还在他们的 ICO 中[使用了状态通道](https://github.com/SpankChain/old-sc_auction)），还有 [Horizon Games](https://horizongames.co/) 也在他们的第一款基于以太坊游戏中使用了状态通道。\n \n-#### II. Plasma\n+#### 二. Plasma\n \n-On August 11 2017, Vitalik Buterin and Joseph Poon released a paper titled [_Plasma: Autonomous Smart Contracts_](http://plasma.io/plasma.pdf). The paper introduced a novel technique that could enable ethereum to reach many more transactions per second than currently possible.\n+在 2017 年 8 月 11 日，Vitalik Buterin 和 Joseph Poon 发表了一篇题为 [_Plasma: Autonomous Smart Contracts_](http://plasma.io/plasma.pdf)的文档。这份文档介绍了一种新技术，它能使以太坊每秒可以处理的远比现在更多的事务。\n \n-Like state channels, Plasma is a technique for conducting off-chain transactions while relying on the underlying ethereum blockchain to ground its security. **But Plasma takes the idea in a new direction, by allowing for the creation of “child” blockchains attached to the “main” ethereum blockchain.** These child-chains can, in turn, spawn their own child-chains, who can spawn their own child-chains, and so on.\n \n-The result is that we can perform many complex operations at the child-chain level, running entire applications with many thousands of users, with only minimal interaction with the ethereum main-chain. **A Plasma child-chain can move faster, and charge lower transaction fees, because operations on it do not need to be replicated across the entire ethereum blockchain.**\n+和状态通道一样，Plasma 是一种用于管理链下交易的技术，它降低了安全性并依赖底层以太坊。**但是 Plasma 采用了一种新思路，它是通过创建依附于“主”以太坊区块链的“子”区块链。**这些子链又可以循序产生他们自己的子链，并能依次循环往复。\n+\n+其结果是我们可以在子链层级中执行许多复杂的操作，在与以太坊主链保持最低限度交互的情况下，运行拥有数千名用户的完整应用程序。**Plasma 子链可以更快迁移，并承担更低的交易费用，因为其上的操作无需在整个以太坊区块链上重复。**\n \n ![](https://cdn-images-1.medium.com/max/800/0*44PC3oIBMgugPDph.)\n \n plasma.io/plasma.pdf\n \n-In order to understand how Plasma works, let’s walk through an example of how it could be used.\n+为了弄清楚 Plasma 的运行原理，我们来看一个其如何被运用的样例。\n \n-Let’s imagine that you’re creating a trading-card game on ethereum. The cards will be ERC 721 non-fungible tokens (like Cryptokitties), but have certain features and attributes that lets users play against each other — like in Hearthstone, or Magic the Gathering. These kinds of complex operations are expensive to do on-chain, so you decide to use Plasma instead for your application.\n+试想你正在创建一个基于以太坊的卡牌交换游戏。这些卡牌是一些 ERC 721 不可替代的令牌（比如 Cryptokitties），但是拥有一些可以让玩家相互对战的特征和属性，这有点像炉石传说或者万智牌。这些类型的复杂操作在链上执行代价非常大，所以你决定在你的应用程序中使用 Plasma 作为替代方案。\n \n-**First, we create a set of smart-contracts on ethereum main-chain that serve as the “Root” of our Plasma child-chain.** The Plasma root contains the basic “state-transition rules” of our child chain (things like “transactions cannot spend assets that have already been spent”), records hashes of the child-chain’s state, and serves as a kind of “bridge” that lets users move assets between the ethereum main-chain and the child-chain.\n+**首先，我们在以太坊主链上创建一系列的智能合约，它们可作为 Plasma 子链的“根节点”。**Plasma 根节点包含了子链的一些基本“状态交易规则”（诸如“交易无法消费已消费过的资产”），也记录了子链状态的哈希值，并建立一种允许用户在以太坊主链和子链间转移资产的“桥连”服务。\n \n-Then, we create our child-chain. The child-chain can have its own consensus algorithm — in this example, let’s say that it uses [Proof of Authority (PoA)](https://en.wikipedia.org/wiki/Proof-of-authority), a simple consensus mechanism that relies on trusted block producers (i.e. validators). Block producers are analogous to _miners_ in a “Proof of Work” system — they are the nodes that receive transactions, form blocks, and collect transaction fees. Let’s keep our example simple, and say that you (the company that created the game) are the _only_ entity that is creating blocks — i.e. your company runs a few nodes that are the block producers for our child-chain.\n+然后，创建我们的子链。子链可以拥有自己的共识算法，在这个例子中，我们假设它使用了 [Proof of Authority (PoA)](https://en.wikipedia.org/wiki/Proof-of-authority)，这是一种依赖可信区块生产者（比如，验证者）的简单共识机制。在“工作量证明”系统中，区块生产者和**矿工**的功能类似，他们接收交易，形成区块并收取交易费用的节点。为了让样例简单点，我们假设你（也就是创建游戏的公司）是创建区块的**唯一**实体，即你的公司运营几个节点，这些节点就是子链的区块生产者。\n \n-Once the child-chain is created and active, the block producers make periodic commitments to the root contract. This means they are effectively saying “I commit that the most recent block in the child-chain is X”. These commitments are recorded on-chain in the Plasma root as a proof of what has happened in the child-chain.\n+一旦子链创建好并生效后，区块生产者会周期性的向根节点发出提交。也就是他们实际上在说“我提交的 X 是子链中当前最新的区块”。这些提交被当做子链中事务的证明，记录在链上的 Plasma 根节点里。\n \n-Now that the child-chain is ready, we can create the basic components of our trading card game. The cards themselves are [ERC721](https://github.com/ethereum/eips/issues/721)’s, initially created on the ethereum main-chain, and then moved onto the child-chain through the plasma root. **This introduces a crucial point: Plasma lets us scale interactions with blockchain-based digital assets, but those assets should be created first on the ethereum-main chain.** Then, we deploy the actual game application smart-contracts on the child-chain, which contains all of the game logic and rules.\n+现在子链也准备好了，我们可以创建卡牌交换游戏的基本组件。这些卡片遵循 [ERC721](https://github.com/ethereum/eips/issues/721)，在以太坊主链上初始化，然后由 Plasma 根节点转移到子链上。**这里有一个关键知识：Plasma 可以扩展我们与基于区块链的数字资产之间的交互，但是这些资产应当是由以太坊主链创建的。**然后，我们将实际的游戏应用程序以智能合约的方式部署到子链上，这样子链就包含了游戏所有的逻辑和规则。\n \n-**When a user wants to play our game, they are _only interacting with the child chain_.** They can hold assets (the ERC721 cards), buy and trade them for ether, play rounds of the game against other users — whatever our game lets them do — without ever interacting directly with the main-chain. Because only a much smaller number of nodes (i.e. block producers) have to process transactions, fees can be much lower and operations can be faster.\n+**当用户想要玩游戏时，他们只需要和子链进行交互。**他们可以持有财产（ERC721 卡牌），购买并交换它们，与其他用户对战，以及其他游戏中允许的行为，而这些过程都不需要与主链进行交互。因为只有很少的节点（比如，区块生产者）才需要处理交易，这样费用就会降低很多，操作也能更快。\n \n-#### **But how can this be safe?**\n+#### **但是这种模式安全吗？**\n \n-By moving more operations off the main-chain and onto a child-chain, it’s clear we can perform more operations. But how secure is it? Are transactions that happen on the child-chain actually considered final? After all, we’ve just described a system where _a single entity_ controls the block production for our child chain. Isn’t that centralized? **Can’t the company steal your funds or take your collectible cards whenever it wants?**\n+通过将操作从主链迁移到子链上的方式，我们明显可以执行更多的操作了。但是这样安全吗？发生在子链上的交易是否具备权威性？毕竟，我们方才描述的系统只有**一个中心实体**控制着子链的区块生产。这样不是中心化吗？**这样公司不是随时都能窃取你的资产或者卡牌收藏吗？**\n \n-The short answer is that _even in a scenario_ where a single entity controls 100% of block production on a child chain, Plasma gives you a basic guarantee that **you can always withdraw your funds and assets back onto the main chain.** If a block producer starts acting maliciously, the worst that can happen is they force you to leave the child-chain.\n+简单来说，即使是在子链中完全由一个实体完全控制区块生产的**情景**下，Plasma 也能做出**你可以随时将你的资产收回到主链上**的基本承诺。如果一个区块生产者开始表现出敌意，最坏的情况也只是强迫你离开这个子链。\n \n-Let’s walk through a few different ways block producers could behave badly, and see how Plasma deals with those scenarios.\n+我们来看下几种区块生产者会表现恶劣的方式，然后看下 Plasma 会怎样处理这些情景。\n \n-**First, imagine that a block producer tries to cheat you by lying — by creating a _fake_ new block where suddenly your funds are controlled by them.** They are the _only_ block producer, so they’re free to introduce a new block that doesn’t actually follow the rules of our blockchain. Just like other blocks, they will have to publish a commitment to the Plasma root contract containing evidence of this block.\n+**首先，假设一个区块生产这试图通过说谎欺骗你，可以通过创建一个伪造的新区块，声称你的资产被他们接管了。**由于他们是**唯一**的区块生产者，所以他们可以自由引入一个并不遵循区块链规则的新区块。和其他区块一样，他们也得将这个区块存在的证据作为提交推送给 Plasma 根节点合约。\n \n-As mentioned above, the user always has an ultimate guarantee that they can withdraw their assets back to main-chain. In this scenario, the user (or rather an application acting on their behalf) would detect the attempted theft, and withdraw before the block producer can try and use the assets they’ve “stolen”.\n+如上所述，用户有能将他们的资产随时收回到主链上的基本保障。在这个情景下，用户（或者代表他们权益的应用程序）会侦测到这种盗窃的企图，并在区块生产者尝试和使用他们的“被盗”资产之前撤回到主链上。\n \n-Plasma also creates a mechanism to prevent fraud short of withdrawing to main-chain. Plasma includes a mechanism whereby anyone — including you — can publish a _fraud proof_ to the root contract, to try and show that the block producer has cheated. This fraud proof would contain information about the previous block, and allows us to show that according to the state-transition rules of the child-chain, the false block doesn’t properly follow from the previous state. If fraud is proven, the child-chain is “rolled back” to the previous block. Even better, we construct a system where any block producer who signed off on the false block is penalized by losing an on-chain deposit.\n+Plasma 还创建了一种防止利用欺诈的机制。Plasma 包含了一种任何人（包括你）都可以向根节点合约发布**欺诈证明（fraud proof）**的机制，这样就可以证明区块生产者作弊了。这个欺诈证明会包含之前区块的信息，并且允许我们根据子链中的状态交易规则，错误的区块并不能正确接上之前的状态。如果欺诈被证实，则子链回滚到前一个区块。更妙的是，我们还构建了一种签出错误区块的区块生产者会被处罚的体系，这些区块生产者会因此丢失一个链上押金。\n \n ![](https://cdn-images-1.medium.com/max/800/0*Xgnr1Hv-KhckkbvV.)\n \n plasma.io/plasma.pdf\n \n-**But submitting a fraud proof requires having access to the underlying data — i.e. the actual history of blocks that are used to prove the fraud.** What if the block producers are _also_ not sharing information about previous blocks, to prevent Alice from being able to submit a fraud proof to the root contract?\n+**但是提交欺诈证明需要访问底层数据，即需要用之前的实际历史区块来证明欺诈。**如果区块生产者为了防止爱丽丝能够向根节点合约提交欺诈证明，**并**不分享之前区块的信息怎么办？\n \n-In this case, the solution is for Alice to withdraw her funds and leave the child-chain. Essentially Alice submits a “Proof of Funds” to the root contract. After a delay period during which anyone can challenge her proof (e.g. to show she actually spent those funds in a later valid block), Alice’s funds are moved back to the ethereum main-chain.\n+在这种情况下，这个方案就是为了让爱丽丝收回资产并脱离子链而准备的。根本上来说，爱丽丝向根节点合约提交了一份“欺诈证明”。在一段任何人都可以质疑证明（比如，显示一些后面的合法区块证明实际上她消费了这些资产）的延迟时段后，爱丽丝的资产将会被移回到以太坊主链上。\n \n ![](https://cdn-images-1.medium.com/max/800/0*6b__s1TjsZqrO2zC.)\n \n plasma.io/plasma.pdf\n \n-**Lastly, block producers can _censor_ users of the child-chain.** If they wanted, block producers could simply never include certain transactions in their blocks, effectively preventing a user from performing any operations on the child-chain. Once again, the solution is simply to withdraw all of our assets back onto the ethereum main-chain as above.\n+**最后，区块生产者可以监察子链中的用户。**如果区块生成者愿意，他们可以直接不在其区块中不包含实际事务，从而有效阻止用户在子链上执行任何操作。如上所述，这个解决方案再一次的直接将我们所有的资产收回到以太坊主链上。\n \n-**Withdrawals themselves pose risks, however.** One concern is what would happen if everyone using a child-chain tried to withdraw at the same time. In the case of a mass withdrawal, there might not be enough capacity on the ethereum main-chain to process everyone’s transactions within the challenge period, [meaning users _could_ lose funds](https://www.reddit.com/r/ethereum/comments/6sqca5/plasma_scalable_autonomous_smart_contracts/dlex5pa/?utm_content=permalink&utm_medium=front&utm_source=reddit&utm_name=ethereum). Although there are many possible techniques for preventing this, e.g. by extending the challenge period in a way that is responsive to demand for withdrawals.\n+**但是，取出资产本身也会带来风险。**其中一个忧虑就是如果所有使用这一子链的用户在同一时刻都要取出资产会怎样。在这样一个大量取出的情况下，以太坊主链主链上可能没有足够的能力处理每个人在质疑期内的交易，[也就意味着用户可能会失去资金](https://www.reddit.com/r/ethereum/comments/6sqca5/plasma_scalable_autonomous_smart_contracts/dlex5pa/?utm_content=permalink&utm_medium=front&utm_source=reddit&utm_name=ethereum)。虽然有许多可行的技术能够防止这种情况发生，例如，通过延长质疑时间来适应取出资产的需求。\n \n-**It’s worth noting that it doesn’t _need_ to be the case that all block producers are controlled by one entity — this is simply the extreme case in our example.** We can create child-chains whose block production is spread among many different entities — i.e. actually decentralized in a way that is more similar to public blockchains. In those cases, there is less risk that block producers would interfere in the way described above, and so less risk that a user would have to move their assets back to the ethereum main-chain.\n+**值得注意的是，所有区块生产者都是由一个实体控制这种情况并不是必定的，这是个出现在我们案例中简单的极端情景。**我们可以创建创建区块生产者分布在不同实体间的子链，即像公用区块一样真正地去中心化。在这些情况下，区块生产者以上述的方式捣乱的风险会减小，产生用户不得不将资产收回到以太坊主链情况的风险也较小。\n \n-Now that we’ve covered both state channels and Plasma, it’s worth noting a few points of comparison.\n+现在我们已经介绍了状态通道和 Plasma，有几点值得比较下。\n \n-One difference is that state channels can perform _instant withdrawals_ when all of the parties in the channel consent to the withdrawal. If Alice and Bob agree to close out a channel and withdraw their funds, so long as they both agree to the final state they can get their assets out of the channel immediately. This is not possible on Plasma, where users must always go through a withdrawal process that involves a challenge period, as described above.\n+它们之间一个不同之处在于，当状态通道中所有利益方都一致同意取出资产，它可以**立即取出资产**。如果爱丽丝和鲍勃同意关闭通道并撤回它们的资金。只要他们都认同最终状态，他们就可以立即取得他们的资产。这在 Plasma 上并不可能实现，如上所述，用户在取出资产的过程中必须包含一个质疑时间。\n \n-State channels should also be less expensive per transaction than Plasma, and be faster. **This means that we will** [**_likely build state channels on Plasma child-chains_**](https://www.reddit.com/r/ethereum/comments/7jzx51/scaling_ethereum_hundreds_to_thousands_of/drb930m/?context=1). For example, in an application where two users are exchanging a series of small transactions. Building a state channel at the child-chain level _should_ be cheaper and faster than performing each of those transactions on the child-chain directly.\n+每笔交易的状态通道也会比 Plasma 更便宜，而且速度更快。**这意味着我们可以[在 Plasma 子链上建立状态通道](https://www.reddit.com/r/ethereum/comments/7jzx51/scaling_ethereum_hundreds_to_thousands_of/drb930m/?context=1)。**例如，一个应用程序中两个用户在进行一系列的小型交易。在子链上建立一个状态通道**应该**会比直接在子链上执行每个交易更加便宜和迅速。\n \n-Finally, it’s worth noting that this is only a partial description that leaves out many details. Plasma itself is in very early stages. If you’re interested in learning more about current work on Plasma, check out Vitalik’s recent proposal for a “[Minimal Viable plasma](https://ethresear.ch/t/minimal-viable-plasma/426)” (i.e. a stripped-down plasma implementation). There’s work being done by a group based in Taiwan, which you can find in [this repo](https://github.com/ethereum-plasma). OmiseGo is working on an implementation for their decentralized exchange — they posted a recent update about their progress [here](https://blog.omisego.network/construction-of-a-plasma-chain-0x1-614f6ebd1612).\n+最后，需要注意的是这部分讲解缺失了大量细节。Plasma 本身还处于非常起始的阶段。如果你有兴趣了解 Plasma 现在的情况，请查看 Vitalik 最近的一个关于 “[Minimal Viable plasma](https://ethresear.ch/t/minimal-viable-plasma/426)” 的提议（即抽离出 plasma 的实现过程）。一个台湾的团队正在进行这项工作，可以在[这个分支](https://github.com/ethereum-plasma)中查看。OmiseGo 正在研究他们的分布式交易的实现，他们在[这里](https://blog.omisego.network/construction-of-a-plasma-chain-0x1-614f6ebd1612)发布了最近更新进展信息。\n \n #### **III. Truebit**\n \n-[Truebit](http://truebit.io) is a technology to help ethereum conduct _heavy_ or _complex_ computation off-chain. This makes it different from state channels and Plasma, which are more useful for increasing the total transaction throughput of the ethereum blockchain. As we discussed in the opening section, scaling is a multi-faceted challenge that requires more than high transaction throughput. **Truebit won’t let us do _more transactions_, but it will let ethereum based applications _do more complex things_ in a way that can still be verified by the main-chain.**\n+[Truebit](http://truebit.io) 是一种帮助以太坊进行**繁重**或者**复杂** 链下运算的技术。它对于提高以太坊区块链的总交易通量更有效，这使得它与状态通道和 Plasma 不一样。正如我们在开篇部分讨论的那样，扩展是一个多面的挑战，需要的不仅仅是更高的交易通量。**Truebit 不会让我们做更多的交易，但是它可以让基于以太坊的应用程序处理更复杂的事务并仍能被主链验证。**\n \n-This will let us do operations useful to ethereum applications that are too computationally expensive to do on chain. For instance, validating Simple Payment Verification (SPV) proofs from other blockchains, which could let ethereum smart-contracts “check” whether a transaction has happened on another chain (like bitcoin or [dogecoin](https://twitter.com/Truebitprotocol/status/960662648193888256)).","path":"TODO/making-sense-of-ethereums-layer-2-scaling-solutions-state-channels-plasma-and-truebit.md","position":280,"original_position":280,"commit_id":"a0441e4ed7e3d3c35cb47225bb34657ea56234ed","original_commit_id":"a0441e4ed7e3d3c35cb47225bb34657ea56234ed","user":{"login":"foxxnuaa","id":9419075,"avatar_url":"https://avatars0.githubusercontent.com/u/9419075?v=4","gravatar_id":"","url":"https://api.github.com/users/foxxnuaa","html_url":"https://github.com/foxxnuaa","followers_url":"https://api.github.com/users/foxxnuaa/followers","following_url":"https://api.github.com/users/foxxnuaa/following{/other_user}","gists_url":"https://api.github.com/users/foxxnuaa/gists{/gist_id}","starred_url":"https://api.github.com/users/foxxnuaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxxnuaa/subscriptions","organizations_url":"https://api.github.com/users/foxxnuaa/orgs","repos_url":"https://api.github.com/users/foxxnuaa/repos","events_url":"https://api.github.com/users/foxxnuaa/events{/privacy}","received_events_url":"https://api.github.com/users/foxxnuaa/received_events","type":"User","site_admin":false},"body":"这将让我们能够执行对于以太坊应用程序有用但是在链上执行需要太多计算代价的操作。=》\r\n这就让我们能够对以太坊应用程序做一些有用的操作，这些操作的计算成本太高，无法在链上执行。","created_at":"2018-03-06T02:10:54Z","updated_at":"2018-03-06T03:03:03Z","html_url":"https://github.com/xitu/gold-miner/pull/3373#discussion_r172390740","pull_request_url":"https://api.github.com/repos/xitu/gold-miner/pulls/3373","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/comments/172390740"},"html":{"href":"https://github.com/xitu/gold-miner/pull/3373#discussion_r172390740"},"pull_request":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/3373"}}},"pull_request":{"url":"https://api.github.com/repos/xitu/gold-miner/pulls/3373","id":172753207,"html_url":"https://github.com/xitu/gold-miner/pull/3373","diff_url":"https://github.com/xitu/gold-miner/pull/3373.diff","patch_url":"https://github.com/xitu/gold-miner/pull/3373.patch","issue_url":"https://api.github.com/repos/xitu/gold-miner/issues/3373","number":3373,"state":"open","locked":false,"title":"带你了解以太坊第2层扩容方案：状态通道（state channels）、plasma 和 truebit","user":{"login":"JohnJiangLA","id":6165782,"avatar_url":"https://avatars3.githubusercontent.com/u/6165782?v=4","gravatar_id":"","url":"https://api.github.com/users/JohnJiangLA","html_url":"https://github.com/JohnJiangLA","followers_url":"https://api.github.com/users/JohnJiangLA/followers","following_url":"https://api.github.com/users/JohnJiangLA/following{/other_user}","gists_url":"https://api.github.com/users/JohnJiangLA/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnJiangLA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnJiangLA/subscriptions","organizations_url":"https://api.github.com/users/JohnJiangLA/orgs","repos_url":"https://api.github.com/users/JohnJiangLA/repos","events_url":"https://api.github.com/users/JohnJiangLA/events{/privacy}","received_events_url":"https://api.github.com/users/JohnJiangLA/received_events","type":"User","site_admin":false},"body":"译文翻译完成，resolve #3310 @Glowin 不好意思，还是耽误了一些时间。 @foxxnuaa  @Zheaoli  两位老铁辛苦，有什么问题及时沟通！\r\n","created_at":"2018-03-05T00:49:38Z","updated_at":"2018-03-06T03:03:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5cdda858ebd6bc4c86795a7ff51a170826338899","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":701907988,"url":"https://api.github.com/repos/xitu/gold-miner/labels/%E5%8C%BA%E5%9D%97%E9%93%BE","name":"区块链","color":"0e8a16","default":false},{"id":322084033,"url":"https://api.github.com/repos/xitu/gold-miner/labels/%E6%AD%A3%E5%9C%A8%E6%A0%A1%E5%AF%B9","name":"正在校对","color":"c2e0c6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/xitu/gold-miner/pulls/3373/commits","review_comments_url":"https://api.github.com/repos/xitu/gold-miner/pulls/3373/comments","review_comment_url":"https://api.github.com/repos/xitu/gold-miner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xitu/gold-miner/issues/3373/comments","statuses_url":"https://api.github.com/repos/xitu/gold-miner/statuses/a0441e4ed7e3d3c35cb47225bb34657ea56234ed","head":{"label":"JohnJiangLA:带你了解以太坊第2层扩容方案：State-Channels、Plasma-和-Truebit","ref":"带你了解以太坊第2层扩容方案：State-Channels、Plasma-和-Truebit","sha":"a0441e4ed7e3d3c35cb47225bb34657ea56234ed","user":{"login":"JohnJiangLA","id":6165782,"avatar_url":"https://avatars3.githubusercontent.com/u/6165782?v=4","gravatar_id":"","url":"https://api.github.com/users/JohnJiangLA","html_url":"https://github.com/JohnJiangLA","followers_url":"https://api.github.com/users/JohnJiangLA/followers","following_url":"https://api.github.com/users/JohnJiangLA/following{/other_user}","gists_url":"https://api.github.com/users/JohnJiangLA/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnJiangLA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnJiangLA/subscriptions","organizations_url":"https://api.github.com/users/JohnJiangLA/orgs","repos_url":"https://api.github.com/users/JohnJiangLA/repos","events_url":"https://api.github.com/users/JohnJiangLA/events{/privacy}","received_events_url":"https://api.github.com/users/JohnJiangLA/received_events","type":"User","site_admin":false},"repo":{"id":114252725,"name":"gold-miner","full_name":"JohnJiangLA/gold-miner","owner":{"login":"JohnJiangLA","id":6165782,"avatar_url":"https://avatars3.githubusercontent.com/u/6165782?v=4","gravatar_id":"","url":"https://api.github.com/users/JohnJiangLA","html_url":"https://github.com/JohnJiangLA","followers_url":"https://api.github.com/users/JohnJiangLA/followers","following_url":"https://api.github.com/users/JohnJiangLA/following{/other_user}","gists_url":"https://api.github.com/users/JohnJiangLA/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnJiangLA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnJiangLA/subscriptions","organizations_url":"https://api.github.com/users/JohnJiangLA/orgs","repos_url":"https://api.github.com/users/JohnJiangLA/repos","events_url":"https://api.github.com/users/JohnJiangLA/events{/privacy}","received_events_url":"https://api.github.com/users/JohnJiangLA/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JohnJiangLA/gold-miner","description":"🥇掘金翻译计划，可能是世界最大最好的英译中技术社区，最懂读者和译者的翻译平台：","fork":true,"url":"https://api.github.com/repos/JohnJiangLA/gold-miner","forks_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/forks","keys_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/teams","hooks_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/hooks","issue_events_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/issues/events{/number}","events_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/events","assignees_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/assignees{/user}","branches_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/branches{/branch}","tags_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/tags","blobs_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/git/refs{/sha}","trees_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/statuses/{sha}","languages_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/languages","stargazers_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/stargazers","contributors_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/contributors","subscribers_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/subscribers","subscription_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/subscription","commits_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/commits{/sha}","git_commits_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/git/commits{/sha}","comments_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/comments{/number}","issue_comment_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/issues/comments{/number}","contents_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/contents/{+path}","compare_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/merges","archive_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/downloads","issues_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/issues{/number}","pulls_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/pulls{/number}","milestones_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/milestones{/number}","notifications_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/labels{/name}","releases_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/releases{/id}","deployments_url":"https://api.github.com/repos/JohnJiangLA/gold-miner/deployments","created_at":"2017-12-14T13:16:38Z","updated_at":"2018-02-23T15:57:16Z","pushed_at":"2018-03-05T00:46:44Z","git_url":"git://github.com/JohnJiangLA/gold-miner.git","ssh_url":"git@github.com:JohnJiangLA/gold-miner.git","clone_url":"https://github.com/JohnJiangLA/gold-miner.git","svn_url":"https://github.com/JohnJiangLA/gold-miner","homepage":"https://juejin.im/tag/掘金翻译计划","size":30281,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"xitu:master","ref":"master","sha":"11c485e5f0d90390997d436354ddfc73cecfcd6d","user":{"login":"xitu","id":10482599,"avatar_url":"https://avatars2.githubusercontent.com/u/10482599?v=4","gravatar_id":"","url":"https://api.github.com/users/xitu","html_url":"https://github.com/xitu","followers_url":"https://api.github.com/users/xitu/followers","following_url":"https://api.github.com/users/xitu/following{/other_user}","gists_url":"https://api.github.com/users/xitu/gists{/gist_id}","starred_url":"https://api.github.com/users/xitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xitu/subscriptions","organizations_url":"https://api.github.com/users/xitu/orgs","repos_url":"https://api.github.com/users/xitu/repos","events_url":"https://api.github.com/users/xitu/events{/privacy}","received_events_url":"https://api.github.com/users/xitu/received_events","type":"Organization","site_admin":false},"repo":{"id":45512989,"name":"gold-miner","full_name":"xitu/gold-miner","owner":{"login":"xitu","id":10482599,"avatar_url":"https://avatars2.githubusercontent.com/u/10482599?v=4","gravatar_id":"","url":"https://api.github.com/users/xitu","html_url":"https://github.com/xitu","followers_url":"https://api.github.com/users/xitu/followers","following_url":"https://api.github.com/users/xitu/following{/other_user}","gists_url":"https://api.github.com/users/xitu/gists{/gist_id}","starred_url":"https://api.github.com/users/xitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xitu/subscriptions","organizations_url":"https://api.github.com/users/xitu/orgs","repos_url":"https://api.github.com/users/xitu/repos","events_url":"https://api.github.com/users/xitu/events{/privacy}","received_events_url":"https://api.github.com/users/xitu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xitu/gold-miner","description":"🥇掘金翻译计划，可能是世界最大最好的英译中技术社区，最懂读者和译者的翻译平台：","fork":false,"url":"https://api.github.com/repos/xitu/gold-miner","forks_url":"https://api.github.com/repos/xitu/gold-miner/forks","keys_url":"https://api.github.com/repos/xitu/gold-miner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xitu/gold-miner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xitu/gold-miner/teams","hooks_url":"https://api.github.com/repos/xitu/gold-miner/hooks","issue_events_url":"https://api.github.com/repos/xitu/gold-miner/issues/events{/number}","events_url":"https://api.github.com/repos/xitu/gold-miner/events","assignees_url":"https://api.github.com/repos/xitu/gold-miner/assignees{/user}","branches_url":"https://api.github.com/repos/xitu/gold-miner/branches{/branch}","tags_url":"https://api.github.com/repos/xitu/gold-miner/tags","blobs_url":"https://api.github.com/repos/xitu/gold-miner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xitu/gold-miner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xitu/gold-miner/git/refs{/sha}","trees_url":"https://api.github.com/repos/xitu/gold-miner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xitu/gold-miner/statuses/{sha}","languages_url":"https://api.github.com/repos/xitu/gold-miner/languages","stargazers_url":"https://api.github.com/repos/xitu/gold-miner/stargazers","contributors_url":"https://api.github.com/repos/xitu/gold-miner/contributors","subscribers_url":"https://api.github.com/repos/xitu/gold-miner/subscribers","subscription_url":"https://api.github.com/repos/xitu/gold-miner/subscription","commits_url":"https://api.github.com/repos/xitu/gold-miner/commits{/sha}","git_commits_url":"https://api.github.com/repos/xitu/gold-miner/git/commits{/sha}","comments_url":"https://api.github.com/repos/xitu/gold-miner/comments{/number}","issue_comment_url":"https://api.github.com/repos/xitu/gold-miner/issues/comments{/number}","contents_url":"https://api.github.com/repos/xitu/gold-miner/contents/{+path}","compare_url":"https://api.github.com/repos/xitu/gold-miner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xitu/gold-miner/merges","archive_url":"https://api.github.com/repos/xitu/gold-miner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xitu/gold-miner/downloads","issues_url":"https://api.github.com/repos/xitu/gold-miner/issues{/number}","pulls_url":"https://api.github.com/repos/xitu/gold-miner/pulls{/number}","milestones_url":"https://api.github.com/repos/xitu/gold-miner/milestones{/number}","notifications_url":"https://api.github.com/repos/xitu/gold-miner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xitu/gold-miner/labels{/name}","releases_url":"https://api.github.com/repos/xitu/gold-miner/releases{/id}","deployments_url":"https://api.github.com/repos/xitu/gold-miner/deployments","created_at":"2015-11-04T03:29:13Z","updated_at":"2018-03-06T03:02:05Z","pushed_at":"2018-03-06T03:00:12Z","git_url":"git://github.com/xitu/gold-miner.git","ssh_url":"git@github.com:xitu/gold-miner.git","clone_url":"https://github.com/xitu/gold-miner.git","svn_url":"https://github.com/xitu/gold-miner","homepage":"https://juejin.im/tag/掘金翻译计划","size":30351,"stargazers_count":12211,"watchers_count":12211,"language":null,"has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2192,"mirror_url":null,"archived":false,"open_issues_count":41,"license":null,"forks":2192,"open_issues":41,"watchers":12211,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/3373"},"html":{"href":"https://github.com/xitu/gold-miner/pull/3373"},"issue":{"href":"https://api.github.com/repos/xitu/gold-miner/issues/3373"},"comments":{"href":"https://api.github.com/repos/xitu/gold-miner/issues/3373/comments"},"review_comments":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/3373/comments"},"review_comment":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/3373/commits"},"statuses":{"href":"https://api.github.com/repos/xitu/gold-miner/statuses/a0441e4ed7e3d3c35cb47225bb34657ea56234ed"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"foxxnuaa"}}