Ethereum

What is Ethereum?

Ethereum is an open blockchain platform that lets anyone build and use decentralized applications that run on blockchain technology. Like Bitcoin, no one controls or owns Ethereum – it is an open-source project built by many people around the world. But unlike the Bitcoin protocol, Ethereum was designed to be adaptable and flexible. It is easy to create new applications on the Ethereum platform, and with the Homestead release, it is now safe for anyone to use those applications.

以太坊是一个开放的区块链平台。这个平台让人们可以基于区块链来构建和使用去中心化的应用。就像比特币一样,以太坊不受任何人控制和拥有。它是一个由全球的爱好者共同维护的开源项目。但与比特币不同的是,以太坊天生具备适应性和灵活性(adaptable and flexible)。使用家园版(homestead release),你可以很容易地在以太坊平台上创建新应用。您可以安全使用这些应用。

A next generation blockchain

Blockchain technology is the technological basis of Bitcoin, first described by its mysterious author Satoshi Nakamoto in his white paper “Bitcoin: A Peer-to-Peer Electronic Cash System”, published in 2008. While the use of blockchains for more general uses was already discussed in the original paper, it was not until a few years later that blockchain technology emerged as a generic term. A blockchain is a distributed computing architecture where every network node executes and records the same transactions, which are grouped into blocks. Only one block can be added at a time, and every block contains a mathematical proof that verifies that it follows in sequence from the previous block. In this way, the blockchain’s “distributed database” is kept in consensus across the whole network. Individual user interactions with the ledger (transactions) are secured by strong cryptography. Nodes that maintain and verify the network are incentivized by mathematically enforced economic incentives coded into the protocol.

区块链技术是比特币的基础,由神秘作者中本聪在他2008年出版的白皮书《比特币:点对点的电子现金系统》中首次提出。虽然白皮书中已经探讨了区块链更广泛的应用场景,但是直到数年之后区块链才成为一个时髦词汇(emerged as a generic term)。区块链是一个分布式计算架构。架构中每个节点都处理和记录相同的交易信息。这些交易信息都被打包在区块中。每一时间刻度只有一个区块可以加入区块链中。每个区块包含一个数字证明(mathematical proof),用于记录和验证它的前一区块。通过这种方式,区块链的分布式数据库实现了其在整个网络所有节点上的一致性。单个用户与账本的交互(亦即交易流程)受到强加密机制的保护。网络中的节点负责维护和验证网络。节点所做的工作得到了协议中写明的经济激励(economic incentives)(即挖矿得币)。

In Bitcoin’s case the distributed database is conceived of as a table of account balances, a ledger, and transactions are transfers of the bitcoin token to facilitate trustless finance between individuals. But as bitcoin began attracting greater attention from developers and technologists, novel projects began to use the bitcoin network for purposes other than transfers of value tokens. Many of these took the form of “alt coins” - separate blockchains with cryptocurrencies of their own which improved on the original bitcoin protocol to add new features or capabilities. In late 2013, Ethereum’s inventor Vitalik Buterin proposed that a single blockchain with the capability to be reprogrammed to perform any arbitrarily complex computation could subsume these many other projects.

在比特币的例子中,分布式数据库被设计为一个用户余额表、一个账本,其中的交易被视为代币(token)的转移。分布式数据库的使用促进(facilitate)了人与人之间非信用金融(trustless finance)的发展。随着比特币逐渐吸引了越来越多开发者和技术人员的关注,新兴项目(novel project)使用比特币网络的目的不再局限于(other than)交易有价代币(value tokens)。许多人采取了"分支币(alt coin)"的形式——基于他们私有数字加密货币的区块链。这种区块链是在比特币协议的基础上添加新特性新功能建立起来的。在2013年下半年,以太坊的发明人Vitalik Buterin提议开发一个具备二次编程能力的区块链。这种区块链通过二次编程可以执行任意复杂度的计算。这些计算可能包含(subsume)了许多其他子项目。

In 2014, Ethereum founders Vitalik Buterin, Gavin Wood and Jeffrey Wilcke began work on a next-generation blockchain that had the ambitions to implement a general, fully trustless smart contract platform.

2014年,以太坊联合创始人Vitalik Buterin, Gavin Wood 和 Jeffrey Wilcke 开始着手(work on)开发下一代的区块链。这种区块链致力于(had the ambitions to)实现一种通用的、充分去信用化的智能合同平台。

Ethereum Virtual Machine

Ethereum is a programmable blockchain. Rather than give users a set of pre-defined operations (e.g. bitcoin transactions), Ethereum allows users to create their own operations of any complexity they wish. In this way, it serves as a platform for many different types of decentralized blockchain applications, including but not limited to cryptocurrencies.

以太坊是一个的可编程的区块链。它不是给用户一套预定义的操作(例如比特币交易),而是让用户创造他们自己的操作。这些操作可以具备任意用户想达到的复杂度。通过这种方式,以太坊成为众多不同类型去中心化区块链应用的平台,包括但不限于(including but not limited to)数字加密货币。

Ethereum in the narrow sense refers to a suite of protocols that define a platform for decentralised applications. At the heart of it is the Ethereum Virtual Machine (“EVM”), which can execute code of arbitrary algorithmic complexity. In computer science terms, Ethereum is “Turing complete”. Developers can create applications that run on the EVM using friendly programming languages modelled on existing languages like JavaScript and Python.

以太坊狭义上(in the narrow sense)指的是一套(a suite of)协议。这些协议明确了一个为去中心化应用服务的平台。这个平台的核心是以太坊虚拟机(EVM)。这种虚拟机可以处理任意算法难度的代码。用计算机科学的话说,以太坊是图灵完备的。开发者可以创建在以太坊虚拟机上运行的应用程序。这些应用可以使用对用户友好的编程语言例如JavaScript和Python。

Like any blockchain, Ethereum also includes a peer-to-peer network protocol. The Ethereum blockchain database is maintained and updated by many nodes connected to the network. Each and every node of the network runs the EVM and executes the same instructions. For this reason, Ethereum is sometimes described evocatively as a “world computer”.

正如区块链一样,以太坊也包含了一个对等网络协议。以太坊区块链数据库由网络中的诸多节点共同维护和更新。每个网络节点都在运行以太坊虚拟机并执行相同的指令集。正是由于这个原因,以太坊有时候被戏称为“世界电脑”。

This massive parallelisation of computing across the entire Ethereum network is not done to make computation more efficient. In fact, this process makes computation on Ethereum far slower and more expensive than on a traditional “computer”. Rather, every Ethereum node runs the EVM in order to maintain consensus across the blockchain. Decentralized consensus gives Ethereum extreme levels of fault tolerance, ensures zero downtime, and makes data stored on the blockchain forever unchangeable and censorship-resistant.

大量的并行计算(parallelization)充斥着整个以太坊网络。这并不能让计算效率提升。事实上,这个过程使得以太坊网络上的运算比传统电脑上的单机运算更加缓慢,并且代价昂贵。当然(Rather),每个以太坊节点运行以太坊虚拟机是为了维持区块链的一致性。去中心化的一致性给以太坊带来了高超的容错性(fault tolerence),绝不存在系统掉线状况,并且使得存储于区块链上的数据永久抗更改抗审查(censorship-resistant)。

The Ethereum platform itself is featureless or value-agnostic. Similar to programming languages, it is up to entrepreneurs and developers to decide what it should be used for. However, it is clear that certain application types benefit more than others from Ethereum’s capabilities. Specifically, ethereum is suited for applications that automate direct interaction between peers or facilitate coordinated group action across a network. For instance, applications for coordinating peer-to-peer marketplaces, or the automation of complex financial contracts. Bitcoin allows for individuals to exchange cash without involving any middlemen like financial institutions, banks, or governments. Ethereum’s impact may be more far-reaching. In theory, financial interactions or exchanges of any complexity could be carried out automatically and reliably using code running on Ethereum. Beyond financial applications, any environments where trust, security, and permanence are important – for instance, asset-registries, voting, governance, and the internet of things – could be massively impacted by the Ethereum platform.

以太坊平台是无特征无价值(featureless and value agnostic)的。类似于编程语言,一切取决于企业家和开发者决定如何使用它。但是,通过以太坊的能力,某些应用类型确实比其他更赚钱。特别地,以太坊适合那些点对点自主直接交互(automate direct interaction between peers)的项目或者通过网络促进组织协同(coordinated group)的应用。例如点对点市场的协调或者复杂金融合同的自动化执行。比特币让人们可以在没有任何中间人(金融机构、银行、政府等)的情况下完成现金交易。而以太坊的影响将更为深远(more far-reaching)。理论上,任何复杂度的金融行为或交易都可以在平台上自动执行(be carried out)并且放心地(reliably)使用以太坊上的代码。在金融应用之上,任何对信用、安全和持久性(permanence)要求高的环境(例如资产登记/asset-registries、投票、行政/governance、物联网)都将受到以太坊平台的巨大冲击(massively impacted)

How does Ethereum work?

Ethereum incorporates many features and technologies that will be familiar to users of Bitcoin, while also introducing many modifications and innovations of its own.

以太坊包含了多种特性和技术,比特币玩家一定不会陌生。但是以太坊也带来了许多改进和创新。

Whereas the Bitcoin blockchain was purely a list of transactions, Ethereum’s basic unit is the account. The Ethereum blockchain tracks the state of every account, and all state transitions on the Ethereum blockchain are transfers of value and information between accounts. There are two types of accounts:

比特币区块链只是一条纯粹的交易链,然而(whereas)以太坊的基本组成却是账户。以太坊区块链追踪每个账户的状态。以太坊区块链上的所有状态转变都是账户间的价值和信息转移。

  • Externally Owned Accounts (EOAs), which are controlled by private keys

  • Contract Accounts, which are controlled by their contract code and can only be “activated” by an EOA

  • 外部账户,由私钥控制

  • 合同账户,由他们的合同程序控制,且只能通过一个外部账户激活

For most users, the basic difference between these is that human users control EOAs - because they can control the private keys which give control over an EOA. Contract accounts, on the other hand, are governed by their internal code. If they are “controlled” by a human user, it is because they are programmed to be controlled by an EOA with a certain address, which is in turn controlled by whoever holds the private keys that control that EOA. The popular term “smart contracts” refers to code in a Contract Account – programs that execute when a transaction is sent to that account. Users can create new contracts by deploying code to the blockchain.

对于大多数用户,这两种账户最基本的区别在于人类用户使用外部账户——因为他们可以掌握用于控制账户的私钥。另一方面(on the other hand),合同账户会受其内部程序支配。如果说他们可以被一个人类用户控制,那么一定是因为他们被编程为可受控于一个拥有特定地址的外部账户,而这个外部账户反过来(in turn)又被拥有该账户私钥的人控制。时下流行的名词“智能合同”指的是合同账户中的程序。这些程序会在交易发送到当前账户时触发执行。用户可以通过部署程序到区块链上来创建新的合同。

Contract accounts only perform an operation when instructed to do so by an EOA. So it is not possible for a Contract account to be performing native operations like random number generation or API calls – it can do these things only if prompted by an EOA. This is because Ethereum requires nodes to be able to agree on the outcome of computation, which requires a guarantee of strictly deterministic execution.

合同账户只是在接收到外部账户的指令后才会执行操作。所以不存在合同用户执行本地操作(例如随机数生成或API调用)的情况——它只能被外部用户触发。这是因为以太坊要求节点必须在得到运算结果(outcome)后可以对结果进行确认,这样才能确保操作被严格确定地执行。

Like in Bitcoin, users must pay small transaction fees to the network. This protects the Ethereum blockchain from frivolous or malicious computational tasks, like DDoS attacks or infinite loops. The sender of a transaction must pay for each step of the “program” they activated, including computation and memory storage. These fees are paid in amounts of Ethereum’s native value-token, ether.

就如比特币一样,用户必须支付小额交易费用给网络。这避免了以太坊区块链接入轻浮(frivolous)或恶意(malicious)的运算任务,例如分布式拒绝服务攻击(DDoS)或无限循环(infinite loops)。交易发送方必须为他们激活的程序的每一步支付费用,包括运算和存储器空间。这些费用也可以以太坊自有代币的形式支付。

These transaction fees are collected by the nodes that validate the network. These “miners” are nodes in the Ethereum network that receive, propagate, verify, and execute transactions. The miners then group the transactions – which include many updates to the “state” of accounts in the Ethereum blockchain – into what are called “blocks”, and miners then compete with one another for their block to be the next one to be added to the blockchain. Miners are rewarded with ether for each successful block they mine. This provides the economic incentive for people to dedicate hardware and electricity to the Ethereum network.

这些交易费用由那些验证网络的节点收取。这些矿工是以太坊网络中接收、传播(propagate)、验证和完成交易等工作的节点。矿工们对交易进行分组——同时更新以太坊区块链上账户的状态——然后把交易放入区块中。矿工接下来开始竞赛努力将自己的区块作为下一个区块加入区块链中。矿工每挖出一个区块就会得到相应奖励。这种模式给人们提供了经济激励,让他们愿意为之投入硬件和电力来经营以太坊网络。

Just as in the Bitcoin network, miners are tasked with solving a complex mathematical problem in order to successfully “mine” a block. This is known as a “Proof of Work”. Any computational problem that requires orders of magnitude more resources to solve algorithmically than it takes to verify the solution is a good candidate for proof of work. In order to discourage centralisation due to the use of specialised hardware (e.g. ASICs), as has occurred in the Bitcoin network, Ethereum chose a memory-hard computational problem. If the problem requires memory as well as CPU, the ideal hardware is in fact the general computer. This makes Ethereum’s Proof of Work ASIC-resistant, allowing a more decentralized distribution of security than blockchains whose mining is dominated by specialized hardware, like Bitcoin.

正如比特币网络,矿工被分配了一个复杂的数学难题,解决了才能挖到矿——一个区块。这种算法被称为(is known as)“工作量证明”。在算法上,如果解决一个运算难题比验证它所需要的资源多出几个数量级(magnitude orders),那么这样的运算难题会是工作量证明的理想备胎(candidate)。由于使用专业级的硬件设备(如ASIC)会导致如比特币网络上那样的集中化(centralization)(意指币都被具备优质算力的ASIC挖走了),而这是我们不提倡的,所以以太坊采用了一种耗内存的(memory-hard)运算难题。如果难题不仅需要CPU还依赖存储器,那么最理想的硬件设备实际上就是普通计算机。这使得以太坊的工作量证明算法是抗特定用途集成电路(ASIC, Application Specific Integrated Circuits)的。所以以太坊区块链是一个更为去中心化的分布式网络,而不像比特币区块链一样矿藏完全被专业级的硬件设备支配(dominated by specialized hardware)。

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 162,825评论 4 377
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 68,887评论 2 308
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 112,425评论 0 255
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 44,801评论 0 224
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 53,252评论 3 299
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 41,089评论 1 226
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 32,216评论 2 322
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 31,005评论 0 215
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,747评论 1 250
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,883评论 2 255
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,354评论 1 265
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,694评论 3 265
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,406评论 3 246
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,222评论 0 9
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,996评论 0 201
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 36,242评论 2 287
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 36,017评论 2 281

推荐阅读更多精彩内容