#15 以太坊入门

导读:来自 MetaMask 的一篇文档 Learn the basics of blockchains and Ethereum。阅读时间约为 10 分钟。


What is Ethereum? / 什么是 Ethereum ?

Ethereum is a public blockchain network with a vast vision. Ethereum’s designers realized that if you built a public blockchain network, you could do a lot more than just track digital currency: you could run a global public computer, always available and open to the world. And that’s what Ethereum is: it’s a global network that is capable of running programs on the Ethereum Virtual Machine, or EVM. Programs are written for the EVM in a language called Solidity, and the network uses a cryptocurrency, called ether (or ETH, pronounced “eeth”) to compensate the people that maintain the network–and also as a token of value for transactions carried out on the network.

以太坊是一个具有广阔前景的公共区块链网络。以太坊的设计者意识到,如果你建立了一个公共区块链网络,你可以做很多事情,而不仅仅是跟踪数字货币:你可以运行一个全球公共计算机,永远可用并向世界开放。这就是以太坊:它是一个全球网络,能够在以太坊虚拟机,或 EVM 上运行程序。程序是用一种叫做 Solidity 的语言为 EVM 编写的,网络使用一种加密货币,叫做以太坊,来补偿维护网络的人 — 同时也作为网络上进行交易的价值象征。

  • cryptocurrency – 加密货币

So, how do you coordinate all that? / 那么,你是如何协调这一切的呢?

As mentioned previously, an essential function of a blockchain network is coordinating the process of agreement between all the nodes in the network regarding whether a transaction is valid or not. The agreement is referred to as consensus, and the process by which it occurs is called a consensus mechanism, or consensus protocol. Ethereum has used two different consensus mechanisms at different points, the first being Proof of Work (PoW) and the second, Proof of Stake (PoS). In both mechanisms, computers are provided to do the work of verifying the validity of the transactions, and agreeing on them.


  • consensus – 共识
  • Stake – 权益、股权、赌注

What are miners? And is a validator the same thing? / 什么是矿工?验证者和旷工是一回事吗?

Under PoW consensus, actors known as ‘miners’ carry the responsibility of verifying the transactions, creating the blocks, and maintaining the chain. In exchange, these miners are given a reward (in ETH) each time their node is the first to finalize, or mine, a new block; this also incentivizes miners having good-quality equipment and connection speeds, which in turn helps the network.

在 PoW 共识下,被称为 “矿工 “的人承担着验证交易、创建区块和维护链的责任。作为交换,这些矿工在每次他们的节点率先完成或开采一个新区块时都会得到奖励(以 ETH 为单位);这也激励了矿工拥有高质量的设备和连接速度,这反过来也有助于网络的发展。

  • incentivizes – 激励

However, there exists the possibility for enough miners to band together–at least 51% of the network–and subvert control of the network to their own ends, rewriting the transaction history, stealing tokens, etc. In order to prevent this and other security problems, the mining is made intentionally difficult, that is, computationally complex (often called “expensive”) in order to make it virtually impossible for any rogue actor(s) to carry out such an attack.

然而,存在这样一种可能性,即足够多的矿工联合起来 — 至少占网络的 51% — 并为自己的目的颠覆对网络的控制,改写交易历史,窃取代币,等等。为了防止这种情况和其他安全问题,挖矿被故意弄得很困难,也就是说,计算上很复杂(通常称为 “昂贵”),以使任何流氓行为者几乎不可能进行这种攻击。

  • band together – 团结起来
  • subvert – 颠覆、破坏

This design–made to keep the network safe–has side effects, in particular environmental and real-world economic ones; the economic model on the blockchain is also inefficient. The constant incentive to mine blocks faster means that miners have a real motivation to buy new computers, even specialized ones that do nothing other than mine on blockchains. And big, powerful computers use a lot of electricity, and generate a lot of heat. This environmentally-unfriendly, inefficient arms race has become increasingly difficult to justify, on a number of points.

这种设计 — 是为了保持网络安全 — 有副作用,特别是环境和现实世界的经济影响;区块链的经济模式也是低效的。不断激励人们更快地挖掘区块,意味着矿工有真正的动力去购买新的计算机,甚至是除了在区块链上挖矿之外什么都不做的专门计算机。而大型、强大的计算机会使用大量的电力,并产生大量的热量。这种不环保、低效率的军备竞赛,在很多方面都变得越来越难以自圆其说。

Enter PoS consensus: instead of miners, validators are the actors ensuring transaction validity and network integrity. In place of costly number-crunching as a security measure, each validator must have staked 32 ETH; that is, deposited it in a smart contract, a kind of computer program that lives on the Ethereum blockchain, with the promise that they will operate their validator according to the rules. If they act in bad faith, or try to subvert or attack the network, or just don’t maintain enough connectivity, their staked currency will be slashed, or taken from them. If they do what they’re supposed to do, maintain connectivity and confirm transactions, they will be rewarded with ETH, the same as miners.

进入 PoS 共识:验证者代替了矿工,成为确保交易有效性和网络完整性的行为者。为了取代昂贵的数字计算作为安全措施,每个验证者必须押注 32 个 ETH;也就是说,将其存入智能合约,一种生活在以太坊区块链上的计算机程序,并承诺他们将按照规则操作其验证者。如果他们不守信用,或试图颠覆或攻击网络,或只是没有保持足够的连通性,他们的抵押货币将被削减,或被夺走。如果他们做了他们应该做的,保持连接并确认交易,他们将得到 ETH 的奖励,与矿工一样。

  • staked – 押注