Abstract

摘要

A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work.

一个纯粹的点对点电子现金系统将允许在线支付直接从一方发送到另一方,而无需通过金融机构。数字签名提供了部分解决方案,但如果仍然需要一个可信的第三方来防止双重支付,那么主要的好处就丧失了。我们提出了一种使用点对点网络来解决双重支付问题的方案。该网络通过将交易哈希到一条不断增长的、基于哈希的工作量证明链中来给交易打上时间戳,形成一条不重做工作量证明就无法更改的记录。

核心词汇 Key Vocabulary

peer-to-peeradj. 点对点的 — 不需要中心服务器,节点之间直接通信
financial institutionn. 金融机构 — 如银行、支付公司等中介
double-spendingn. 双重支付 — 同一笔数字货币被花费两次的问题
proof-of-workn. 工作量证明 — 通过计算来证明消耗了算力的机制
hash / hashingn./v. 哈希 — 将数据转换为固定长度摘要的加密函数
timestampn./v. 时间戳 — 记录事件发生的精确时间
Section 1

Introduction 引言

Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust-based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions.

互联网上的商业活动几乎完全依赖金融机构作为可信第三方来处理电子支付。虽然这个系统对大多数交易来说运作得还不错,但它仍然受到基于信任模型的固有弱点的影响。完全不可逆的交易实际上是不可能的,因为金融机构无法避免调解争议。调解成本增加了交易费用,限制了最小实际交易规模,切断了小额临时交易的可能性。

核心词汇 Key Vocabulary

transactionn. 交易 — 区块链上最基本的操作单位
trust-based modeln. 基于信任的模型 — 需要信任中间人的传统体系
non-reversibleadj. 不可逆的 — 一旦确认就无法撤销
mediate / mediatingv. 调解 — 在争议双方之间进行裁决
Section 2

Transactions 交易

We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the next by digitally signing a hash of the previous transaction and the public key of the next owner and adding these to the end of the coin. A payee can verify the signatures to verify the chain of ownership.

我们将一枚电子货币定义为一条数字签名链。每个所有者通过对前一笔交易的哈希和下一个所有者的公钥进行数字签名,并将这些添加到货币的末端,从而将货币转移给下一个人。收款人可以通过验证签名来验证所有权链。

核心词汇 Key Vocabulary

digital signaturen. 数字签名 — 用私钥对数据签名以证明身份和完整性
public keyn. 公钥 — 可公开分享的密钥,用于验证签名或加密
payeen. 收款人 — 接收付款的一方
ownershipn. 所有权 — 对资产的合法持有权
Section 3

Timestamp Server 时间戳服务器

The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash. The timestamp proves that the data must have existed at the time in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.

我们提出的解决方案始于一个时间戳服务器。时间戳服务器的工作方式是对要打时间戳的一组数据项的区块取哈希值,并广泛发布该哈希。时间戳证明了该数据在那个时间点必然已经存在,才能被纳入哈希。每个时间戳在其哈希中包含前一个时间戳,形成一条链,每个额外的时间戳都加强了在它之前的那些。

核心词汇 Key Vocabulary

blockn. 区块 — 包含一组交易记录的数据单元
chainn. 链 — 区块按时间顺序连接形成的数据结构
timestamp servern. 时间戳服务器 — 为数据提供时间证明的服务
Section 4

Proof-of-Work 工作量证明

To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof-of-work system. The proof-of-work involves scanning for a value that when hashed, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block's hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work.

为了在点对点的基础上实现分布式时间戳服务器,我们需要使用工作量证明系统。工作量证明涉及扫描一个值,使其哈希后以若干个零位开头。所需的平均工作量与所要求的零位数成指数关系,但可以通过执行一次哈希来验证。对于我们的时间戳网络,我们通过在区块中递增一个随机数来实现工作量证明,直到找到一个使区块哈希满足所要求零位数的值。一旦花费了 CPU 算力使其满足工作量证明,该区块就无法在不重做工作的情况下被更改。

核心词汇 Key Vocabulary

noncen. 随机数 — 矿工不断尝试的值,直到找到有效哈希
exponentialadj. 指数级的 — 增长速度极快的
CPU effortn. CPU 算力 — 计算机用于计算的处理能力
Section 5

Network 网络

The steps to run the network are as follows: 1) New transactions are broadcast to all nodes. 2) Each node collects new transactions into a block. 3) Each node works on finding a difficult proof-of-work for its block. 4) When a node finds a proof-of-work, it broadcasts the block to all nodes. 5) Nodes accept the block only if all transactions in it are valid and not already spent. 6) Nodes express their acceptance of the block by working on creating the next block in the chain, using the hash of the accepted block as the previous hash.

运行网络的步骤如下:1)新交易被广播到所有节点。2)每个节点将新交易收集到一个区块中。3)每个节点为其区块寻找一个困难的工作量证明。4)当一个节点找到工作量证明时,它将该区块广播给所有节点。5)节点仅在区块中的所有交易都有效且尚未被花费的情况下才接受该区块。6)节点通过使用已接受区块的哈希作为前一个哈希来创建链中的下一个区块,以此表达对该区块的接受。

核心词汇 Key Vocabulary

broadcastv. 广播 — 将信息发送给网络中的所有参与者
noden. 节点 — 网络中的一台参与计算机
Section 6

Incentive 激励机制

By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.

The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.

The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.

按照惯例,区块中的第一笔交易是一笔特殊交易,它创造一枚新币,归该区块的创建者所有。这为节点支持网络增加了激励,并且提供了一种将货币初始分配到流通中的方式,因为没有中央机构来发行它们。稳定地增加一定数量的新币类似于黄金矿工耗费资源将黄金加入流通。在我们的情况下,消耗的是 CPU 时间和电力。

激励也可以通过交易手续费来资助。如果一笔交易的输出值小于其输入值,差额就是交易手续费,会被加到包含该交易的区块的激励价值中。一旦预定数量的货币已经进入流通,激励就可以完全转变为交易手续费,并且完全没有通货膨胀。

激励可能有助于鼓励节点保持诚实。如果一个贪婪的攻击者能够集结比所有诚实节点更多的 CPU 算力,他将不得不在用它来通过偷回自己的支付来欺骗人们,还是用它来生成新币之间做出选择。他应该会发现按照规则行事更有利可图——这些规则使他获得的新币比其他所有人加起来都多——而不是破坏系统和他自己财富的有效性。

核心词汇 Key Vocabulary

incentiven. 激励 — 鼓励某种行为的奖励机制
circulationn. 流通 — 货币在经济体中的传递与使用
transaction feen. 交易手续费 — 用户支付给矿工的处理费用
minern. 矿工 — 通过算力竞争来验证交易和创建新区块的参与者
inflation freeadj. 无通胀的 — 不会因新增发行而贬值
Section 7

Reclaiming Disk Space 回收磁盘空间

Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block's hash, transactions are hashed in a Merkle Tree, with only the root included in the block's hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.

A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore's Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.

一旦一枚币的最新交易被足够多的区块覆盖,之前的已花费交易就可以被丢弃以节省磁盘空间。为了在不破坏区块哈希的情况下实现这一点,交易被哈希到一棵默克尔树中,只有根节点被包含在区块的哈希中。旧区块可以通过裁剪树的分支来压缩。内部哈希不需要被存储。

一个没有交易的区块头大约是 80 字节。如果我们假设每 10 分钟生成一个区块,80 字节 × 6 × 24 × 365 = 每年 4.2MB。以 2008 年计算机系统通常配备 2GB 内存来看,加上摩尔定律预测的每年 1.2GB 的增长,即使区块头必须保存在内存中,存储也不会成为问题。

核心词汇 Key Vocabulary

Merkle Treen. 默克尔树 — 一种哈希二叉树结构,用于高效验证数据完整性
discardv. 丢弃 — 移除不再需要的数据
compactv. 压缩 — 通过移除冗余数据来减小体积
memoryn. 内存 — 计算机用于临时存储数据的快速存取空间
Section 8

Simplified Payment Verification 简化支付验证

It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he's convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it's timestamped in. He can't check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.

As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker's fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user's software to download the full block and alerted transactions to confirm the inconsistency.

不运行完整网络节点也可以验证支付。用户只需要保留最长工作量证明链的区块头副本——他可以通过查询网络节点直到确信自己拥有最长链来获取——并获得将交易链接到其所在区块的默克尔分支。他无法自己检查交易,但通过将交易链接到链中的一个位置,他可以看到一个网络节点已经接受了它,而之后添加的区块进一步确认网络已经接受了它。

因此,只要诚实节点控制着网络,验证就是可靠的,但如果网络被攻击者压制,则更容易受到攻击。虽然网络节点可以自己验证交易,但只要攻击者能够继续压制网络,简化方法就可能被攻击者伪造的交易所欺骗。一种防御策略是在网络节点检测到无效区块时接受来自它们的警报,提示用户的软件下载完整区块和被警报的交易以确认不一致。

核心词汇 Key Vocabulary

verifyv. 验证 — 确认数据或交易的真实性和有效性
Merkle branchn. 默克尔分支 — 默克尔树中从叶节点到根节点的路径
vulnerableadj. 脆弱的 — 容易受到攻击或损害
alertn. 警报 — 通知用户异常情况的信号
inconsistencyn. 不一致 — 数据之间存在矛盾或冲突
Section 9

Combining and Splitting Value 合并与拆分价值

Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.

It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction's history.

虽然可以单独处理每一枚币,但为每次转账中的每一分钱都单独创建一笔交易是不切实际的。为了允许价值的拆分和合并,交易包含多个输入和输出。通常会有一个来自较大前序交易的单个输入或多个合并较小金额的输入,以及最多两个输出:一个用于支付,一个将找零(如果有的话)退还给发送者。

应该注意的是,扇出——一笔交易依赖于多笔交易,而那些交易又依赖于更多交易——在这里不是问题。永远不需要提取一笔交易历史的完整独立副本。

核心词汇 Key Vocabulary

inputn. 输入 — 交易中引用的之前交易的输出,作为资金来源
outputn. 输出 — 交易中指定的资金去向和金额
changen. 找零 — 交易中多余的金额退回给发送者
fan-outn. 扇出 — 一个节点连接到多个后续节点的结构
Section 10

Privacy 隐私

The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the "tape," is made public, but without telling who the parties were.

As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.

传统银行模型通过限制相关方和可信第三方对信息的访问来实现一定程度的隐私。公开宣布所有交易的必要性排除了这种方法,但仍然可以通过在另一个地方打断信息流来维护隐私:保持公钥匿名。公众可以看到有人向另一个人发送了一笔金额,但没有将交易与任何人联系起来的信息。这类似于证券交易所发布的信息级别,其中单笔交易的时间和规模——"记录带"——是公开的,但不会透露交易方的身份。

作为额外的防火墙,每笔交易都应该使用一个新的密钥对,以防止它们被链接到一个共同的所有者。对于多输入交易,一些链接仍然是不可避免的,因为它们必然揭示其输入属于同一个所有者。风险在于,如果一个密钥的所有者被揭露,链接可能会揭示属于同一所有者的其他交易。

核心词汇 Key Vocabulary

anonymousadj. 匿名的 — 身份不被公开或关联
key pairn. 密钥对 — 一组公钥和私钥,用于加密和签名
exchangen. 交易所 — 买卖资产的市场平台
firewalln. 防火墙 — 此处比喻为一层额外的隐私保护措施
Section 11

Calculations 计算

We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.

The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker's chain being extended by one block, reducing the gap by -1. The probability of an attacker catching up from a given deficit is analogous to a Gambler's Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain.

Given our assumption that p > q, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn't make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.

我们考虑一个攻击者试图比诚实链更快地生成替代链的场景。即使做到了这一点,也不会使系统对任意更改开放,比如凭空创造价值或拿走从不属于攻击者的钱。节点不会接受无效交易作为支付,诚实节点永远不会接受包含它们的区块。攻击者只能尝试更改自己的交易之一,以取回他最近花费的钱。

诚实链与攻击者链之间的竞赛可以被描述为二项随机游走。成功事件是诚实链延伸一个区块,其领先优势增加 +1;失败事件是攻击者的链延伸一个区块,差距减少 -1。攻击者从给定差距追赶上来的概率类似于赌徒破产问题。假设一个拥有无限信用的赌徒从亏损开始,进行可能无限次的尝试以达到收支平衡。我们可以计算他达到收支平衡的概率,或者攻击者追上诚实链的概率。

鉴于我们假设 p > q,随着攻击者需要追赶的区块数量增加,概率呈指数级下降。在胜算不利于他的情况下,如果他不能在早期就幸运地向前冲刺,随着他越来越落后,他的机会变得微乎其微。

核心词汇 Key Vocabulary

scenarion. 场景 — 假设的情况或可能发生的事件
probabilityn. 概率 — 事件发生的可能性大小
Binomial Random Walkn. 二项随机游走 — 每步只有两种可能结果的随机过程
Gambler's Ruinn. 赌徒破产问题 — 经典概率论问题,分析赌徒最终破产的概率
breakevenn. 收支平衡 — 不盈不亏的状态
Conclusion

结论

We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis.

我们提出了一个不依赖信任的电子交易系统。我们从数字签名构成的通常框架出发,这提供了对所有权的强有力控制,但如果没有防止双重支付的方法就是不完整的。为了解决这个问题,我们提出了一个使用工作量证明的点对点网络来记录交易的公开历史,如果诚实节点控制了大部分 CPU 算力,这些记录很快就会变得在计算上对攻击者来说不切实际去更改。该网络在其非结构化的简洁性中是健壮的。节点同时工作,几乎不需要协调。它们不需要被识别,因为消息不会被路由到任何特定的地方,只需要在尽力而为的基础上被传递。

核心词汇 Key Vocabulary

impracticaladj. 不切实际的 — 理论上可能但实际无法完成
robustadj. 健壮的 — 系统在各种条件下都能正常运行
coordinationn. 协调 — 多个参与者之间的配合
best effortphrase. 尽力而为 — 不保证结果但尽量完成