跟着区块链学英语(0003)

2.交易

我们把一条由电子签名组成的链叫做电子币。支付时,币的持有者通过把之前的一个交易的哈希值和自己的这个币的接收者的公钥以电子签名的方式加在这个币的链的末端而转移这个币的所有权。币的接收者可以通过验证该电子签名来验证所有权转移的过程。

问题当然在于币的接收者无法验证该币的原持有人之一是否存在”双花“的情况。通常的做法是引入可信的中心化官方机构,或者铸币厂,来验证每笔交易是否存在双花情况。每笔交易之后,铸币厂只有将旧币回收到手之后才发新币,只有铸币厂直接发行的币才不会被认为存在双花的情况。这种避免双花的解决方案的问题在于整个货币系统的命运都掌握在铸币厂的运营公司的手里,因为所有的交易都要通过他们才能进行,就像银行一样。

我们需要想一个方法,能够让收款人知道币之前的所有者没有已经将币花出去。为了达成这个目的,我们默认以最早的交易为唯一真实的交易,这样就不用再去管后续的尝试双花的问题。能够确定之前并没有交易的唯一方式是知晓所有的交易。在铸币厂为基础的模式当中,铸币厂本身就知晓所有交易,并且判断哪个是先完成的。如果要在没有可信第三方存在的情况下完成这一过程,交易就必须向全网广播,同时我们还需要一个能够让所有的参与者为他们所接收到的交易的历史记录的先后顺序达成一致的系统。在交易的时候,币的接收者拿到大多数节点承认该笔交易是首先完成的证明即可。

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.

The problem of course is the payee can't verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank.

We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don't care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced [1], and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.

你可能感兴趣的:(跟着区块链学英语(0003))