算法与计算机科学michaelnielsen.org编辑精选
比特币协议究竟如何运作
How the Bitcoin protocol actually works
2013 — 2016,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
Michael Nielsen 的经典长文,从零开始一步步推导比特币协议的设计:如何用密码学实现数字货币、如何解决双重支付问题、工作量证明为何优于两阶段提交等简单方案。文章不堆砌比喻,而是直接讲清协议背后的技术原理。
为什么经久不衰:它避开了大量靠比喻糊弄的比特币科普,直击协议设计的技术细节,多年后仍是理解比特币工作原理的最佳入门读物之一。
HN 评论精选
比特币协议还有许多未被大众了解的潜力,如多重签名和智能合约
好文章。比特币协议中有很多绝大多数人从未听说过的可能性,本文触及了其中一部分。想了解能做什么,可以看比特币 wiki 的 Contracts 页面。不久的将来我们可能会看到多重签名交易之类的应用,理论上会打开一些非常有趣的选择。
rallison查看英文原文
Great article. There is a lot in the bitcoin protocol that is possible that the vast majority of people have never heard of, some of which this article touches on. For an idea of some of what could be done, see the Contracts section on the bitcoin wiki: https://en.bitcoin.it/wiki/Contracts In the near future, we may start to see things like multi signature transactions* and the like. In theory, it could open up some very interesting options. *Technically, I believe there exist a few of these transactions already on the blockchain.
解释了为什么简单的两阶段提交行不通,而工作量证明在容错性和扩展性上更优
两阶段提交的问题在于:恶意节点可以在受害者每次发起交易时都向网络发送反对消息,从而阻止别人花钱。要防止这一点,就需要能检测节点是否故障/恶意,这得实现代价高昂的拜占庭共识协议。在实际能抵御拜占庭故障的系统中,对一条日志(如一笔交易)达成一致所需的消息数是节点数的 O(n²),可扩展性会大受限制。比特币工作量证明的精妙之处在于:它比拜占庭共识更有韧性——拜占庭共识(3f+1 节点)最多容忍 f 个故障节点,而比特币能容忍全网 49% 的算力作恶……
hendzen查看英文原文
From the article: "I don’t understand why double spending can’t be prevented in a simpler manner using two-phase commit. What drawbacks and advantages does it have compared to the full Bitcoin protocol? uppose Alice tries to double spend an infocoin with both Bob and Charlie. The idea is that Bob and Charlie would each broadcast their respective messages to the Infocoin network, along with a request: “Should I accept this?” They’d then wait some period – perhaps ten minutes – to hear any naysayers who could prove that Alice was trying to double spend. If no such nays are heard (and provided there are no signs of attempts to disrupt the network), they’d then accept the transaction." The problem with 2PC is that a malicious node could stop somebody from being able to spend their coins by always sending nays out to the network when ever the victim sent a transaction. To prevent this, you would need to be able to detect when a node is faulty/malicious which would require implementing a costly Byzantine Consensus Protocol [1]. In practical systems that can withstand Byzantine faults, the number of messages required to agree on a log entry (e.g. a transaction) would be O(n^2) in the number of nodes in the network, which would greatly limit scalability. The genius of Bitcoin's Proof of Work protocol is that: 1) it is more resilient than Byzantine agreement. Byzantine agreement with 3f+1 nodes can handle at most f faulty nodes, while Bitcoin can tolerate 49% of the network hashing power being malicious. (though this is being debated currently due to theoretical strategies like selfish-mining) 2) it is much more efficient than Byzantine agreement in the number of messages sent, which has allowed the network to scale to thousands of nodes, although they have been running into issues with the blocksize/block limit, but their are currently research efforts [4] underway to remedy this. The main problem with Bitcoin's proof of work scheme it is that it is extremely expensive in terms of CPU cycles, but this is solved by compensating miners for their efforts through coin generation and transaction fees. [1] - http://www.cs.cornell.edu/courses/cs614/2004sp/papers/lsp82.pdf [2] - http://pmg.csail.mit.edu/papers/osdi99.pdf [3] - http://arxiv.org/pdf/1311.0243v5.pdf [4] - http://www.cs.huji.ac.il/~avivz/pubs/13/btc_scalability_full.pdf
本文的价值在于直面技术细节,而非依赖比喻
这是对比特币原始论文(本身已非常简洁易读)的很好补充。本文的贡献在于深入细节,讲清这些概念在现实中如何实际运作。有趣的是,市面上有那么多文章和演讲努力用比喻和例子解释比特币却回避技术细节,你把它们全看完可能还是一头雾水。
elcapitan查看英文原文
This is a good addition to the original Bitcoin paper (https://bitcoin.org/bitcoin.pdf [pdf]), which is already very concise and readable. The contribution of the post is going into the details of how the concepts actually play out in reality and how stuff just looks like. It's interesting that there are so many other articles and talks that try to explain Bitcoin with a high effort of metaphors and examples while avoiding technical details. You can consume all of them and still have no idea. But then again this is probably similar in other fields with high levels of internal complexity (i.e. where you'd have to read recursively all of the science behind it to get even superficial understanding).
这篇通俗讲解很适合向非技术亲友解释比特币
挑个小毛病:正文里密码学部分的变量和数字以图片形式呈现,Readability 抓取有问题。否则的话,很遗憾感恩节前没读到这篇文章。我是家里的"电脑专家",比特币正是今年感恩节的话题,我的解释本会因这篇通俗的讲解而受益良多。
diminoten查看英文原文
The smallest of nits to pick, but Readability has issues with the "images as text" behavior of the variables and numbers in the crypto parts of the post. Otherwise, I'm very sorry that I didn't find this until after Thanksgiving. As many of you are likely similarly tagged, I'm the "computer" guy in the family, and so whenever something happens in the news that's got anything to do with computers, I'm the guy people bug for answers. Bitcoin was the topic de jour this Thanksgiving, and my explanations would have benefitted greatly from this plain-English run-through. Fortunately, after having read this, I now will be able to give people the deluxe explanation, should they make the fatal mistake of asking. :) Thanks.
历次讨论
同类还值得读
位运算技巧集
Bit Twiddling Hacks
斯坦福页面上的经典位运算技巧合集,收录了 popcount、前导/尾随零、位反转、交换、舍入等大量技巧,并附有解释和性能讨论。
算法与计算机科学上首页 8 次 · 2011–2024graphics.stanford.edu编辑精选如何不按平均评分排序
How Not To Sort By Average Rating
经典文章解释了为什么按平均评分排序不可靠:只有少量评价的条目(比如仅一条五星)会轻易排到最前,而评价数量的差异被忽略。
算法与计算机科学上首页 7 次 · 2009–2024evanmiller.org编辑精选数据结构可视化
Data Structure Visualizations
旧金山大学 David Galles 教授制作的数据结构与算法交互式可视化网站,涵盖 B 树、红黑树、排序、图算法等,可逐步操作观察其运行过程。
算法与计算机科学上首页 6 次 · 2011–2021cs.usfca.edu编辑精选1996 年以来的计算机科学最佳论文奖
Best Paper Awards in Computer Science since 1996
Jeff Huang 维护的一个汇总页面,收录了自 1996 年以来计算机科学各主要会议的“最佳论文奖”获奖名单,并按年份和会议整理,方便读者一站式浏览历届获奖论文。
算法与计算机科学上首页 6 次 · 2010–2018jeffhuang.com编辑精选算法(Jeff Erickson)
Algorithms, by Jeff Erickson
伊利诺伊大学 Jeff Erickson 教授的算法课教材,免费在线开放。
算法与计算机科学上首页 5 次 · 2018–2022jeffe.cs.illinois.edu编辑精选