原始文献 / 邮件 / Bitcoin P2P e-cash paper
Bitcoin P2P e-cash paper
Cryptography Mailing List · 2008-11-15 04:43:00 UTC
我会尽快发布源代码,作为参考来澄清所有这些实现问题。
Ray Dillinger (Bear) 写道:
> 当一枚币被花掉时,买卖双方用数字签名签署一笔(盲化的)交易记录。
只有买方签名,没有盲化。
如果有人双重支付,那么交易记录可以被去盲化,揭示作弊者的身份。
不使用身份,也没有追索机制。一切都是预防。
这通过相当标准的切分-选择算法实现,买方用秘密份额回应多个挑战。
没有挑战,也没有秘密份额。基本交易就是第2节图中展示的那样:一个(买方的)签名,满足前一笔交易的公钥;以及一个新的(卖方的)公钥,下次花掉它时必须满足该公钥。
他们在工作时也可能收到与正试图扩展的链一样长的链,其中最后几个"环"是与他们正在工作的链*不*相同的环。这些他们忽略。
没错,如果长度相等,就保留最先收到的那个来打破平局。
如果它包含双重支付,他们就创建一笔"交易"作为双重支付的证明,加入他们的 pool A,广播出去,继续工作。
没必要像那样报告"双重支付证明"。如果同一条链包含两笔支付,那么该区块无效并被拒绝。
区块工作量证明不足时也一样。该区块无效并被拒绝,没必要为此传播报告。每个节点都能在转发前看出并拒绝它。
如果有两条竞争的链,每条包含同一笔交易的不同版本,一条试图把钱给一个人,另一条试图把同一笔钱给另一个人,那么裁决哪笔支付有效正是整个工作量证明链的意义所在。
我们不是在"盯梢"双重支付以拉响警报、抓作弊者。我们只是裁决哪笔支付有效。交易收款方必须等待几个区块,以确保裁决有时间完成。想作弊的人可以尽情同时双重支付,而他们能得到的唯一结果是:几个区块内,一笔支付有效,其余无效。一旦主链中已有了一笔支付,任何后续的双重支付都会被立即拒绝。
即使更早的那笔支付还没进入链,只要它已在所有节点的池中,那么所有已持有第一笔支付的节点都会拒绝第二笔支付。
如果新链被接受,他们就放弃添加当前环,把 pool L 中的所有交易倒回 pool A(连同开始工作以来收到或创建的交易),从 pool A 中删除已是新链某一环组成部分的那些交易记录,再开始工作,试图扩展新链。
没错。每当有新交易进来他们也会刷新,所以 L 基本上一直包含 A 中的所有内容。
CPU 密集型的数字签名算法,用于签署包含新区块 L 的链。
它是 Hashcash 式 SHA-256 工作量证明(零的部分原像),不是签名。
有没有机制确保"链"不只由最快的 3 或 4 个节点添加的环组成?因为一条广播的交易记录很容易漏过那 3 或 4 个节点,如果那样,而这些节点又继续主导链,那么这笔交易可能永远加不进去。
如果您把它想成 CPU 密集型的数字签名,那您可能是把它想成谁先完成漫长操作谁就赢的竞赛。
这个工作量证明是 Hashcash 式 SHA-256 碰撞求解。这是一个无记忆的过程:每秒做数百万次哈希,每次都有微小概率找到解。最快的 3 或 4 个节点的优势只与其占总 CPU 算力的份额成正比。任何人在任何时刻找到解的概率都与其 CPU 算力成正比。
会有交易费,所以节点有动力接收并纳入尽可能多的交易。当创造的币总量达到预定上限后,节点最终将完全靠交易费获得补偿。
另外,为链添加一个环的工作量要求应随该链前一周添加的环数变化(再次呈指数变化),使币生成速率(从而通胀)受到严格控制。
没错。
要扩展,您需要币聚合。需要一种"可证明"的交易:某人收回十个单币,创造一枚面值为十的新币,等等。
每笔交易都是这样的。第9节"合并与拆分价值"。
Satoshi Nakamoto
---------------------------------------------------------------------
The Cryptography Mailing List
Unsubscribe by sending "unsubscribe cryptography" to majordomo at metzdowd.com
英文原文
I'll try and hurry up and release the sourcecode as soon as possible to serve as a reference to help clear up all these implementation questions.
Ray Dillinger (Bear) wrote:
> When a coin is spent, the buyer and seller digitally sign a (blinded)
> transaction record.
Only the buyer signs, and there's no blinding.
If someone double spends, then the transaction record
can be unblinded revealing the identity of the cheater.
Identities are not used, and there's no reliance on recourse. It's all prevention.
This is done via a fairly standard cut-and-choose
algorithm where the buyer responds to several challenges
with secret shares
No challenges or secret shares. A basic transaction is just what you see in the figure in section 2. A signature (of the buyer) satisfying the public key of the previous transaction, and a new public key (of the seller) that must be satisfied to spend it the next time.
They may also receive chains as long as the one they're trying to
extend while they work, in which the last few "links" are links
that are *not* in common with the chain on which they're working.
These they ignore.
Right, if it's equal in length, ties are broken by keeping the earliest one received.
If it contains a double spend, then they create a "transaction"
which is a proof of double spending, add it to their pool A,
broadcast it, and continue work.
There's no need for reporting of "proof of double spending" like that. If the same chain contains both spends, then the block is invalid and rejected.
Same if a block didn't have enough proof-of-work. That block is invalid and rejected. There's no need to circulate a report about it. Every node could see that and reject it before relaying it.
If there are two competing chains, each containing a different version of the same transaction, with one trying to give money to one person and the other trying to give the same money to someone else, resolving which of the spends is valid is what the whole proof-of-work chain is about.
We're not "on the lookout" for double spends to sound the alarm and catch the cheater. We merely adjudicate which one of the spends is valid. Receivers of transactions must wait a few blocks to make sure that resolution has had time to complete. Would be cheaters can try and simultaneously double-spend all they want, and all they accomplish is that within a few blocks, one of the spends becomes valid and the others become invalid. Any later double-spends are immediately rejected once there's already a spend in the main chain.
Even if an earlier spend wasn't in the chain yet, if it was already in all the nodes' pools, then the second spend would be turned away by all those nodes that already have the first spend.
If the new chain is accepted, then they give up on adding their
current link, dump all the transactions from pool L back into pool
A (along with transactions they've received or created since
starting work), eliminate from pool A those transaction records
which are already part of a link in the new chain, and start work
again trying to extend the new chain.
Right. They also refresh whenever a new transaction comes in, so L pretty much contains everything in A all the time.
CPU-intensive digital signature algorithm to
sign the chain including the new block L.
It's a Hashcash style SHA-256 proof-of-work (partial pre-image of zero), not a signature.
Is there a mechanism to make sure that the "chain" does not consist
solely of links added by just the 3 or 4 fastest nodes? 'Cause a
broadcast transaction record could easily miss those 3 or 4 nodes
and if it does, and those nodes continue to dominate the chain, the
transaction might never get added.
If you're thinking of it as a CPU-intensive digital signing, then you may be thinking of a race to finish a long operation first and the fastest always winning.
The proof-of-work is a Hashcash style SHA-256 collision finding. It's a memoryless process where you do millions of hashes a second, with a small chance of finding one each time. The 3 or 4 fastest nodes' dominance would only be proportional to their share of the total CPU power. Anyone's chance of finding a solution at any time is proportional to their CPU power.
There will be transaction fees, so nodes will have an incentive to receive and include all the transactions they can. Nodes will eventually be compensated by transaction fees alone when the total coins created hits the pre-determined ceiling.
Also, the work requirement for adding a link to the chain should
vary (again exponentially) with the number of links added to that
chain in the previous week, causing the rate of coin generation
(and therefore inflation) to be strictly controlled.
Right.
You need coin aggregation for this to scale. There needs to be
a "provable" transaction where someone retires ten single coins
and creates a new coin with denomination ten, etc.
Every transaction is one of these. Section 9, Combining and Splitting Value.
Satoshi Nakamoto
---------------------------------------------------------------------
The Cryptography Mailing List
Unsubscribe by sending "unsubscribe cryptography" to majordomo at metzdowd.com
