This article correctly shows that virtually none of the ideas underpinning Bitcoin are new. They can all be traced to the academic literature going back decades. Cryptographic signatures and public-key cryptography, cryptographic hash functions, cryptographic proof-of-work, time-stamping, Merkle trees, chains of transactions blocks, Byzantine fault tolerance, smart contracts -- all of these ideas were old when Bitcoi…
Bitcoin's Academic Pedigree
21–30 of 147 posts
Re: Bitcoin's Academic Pedigree
#22Earlier quoted context omitted.
It's actually not a new kind of distributed algorithm: 1. Peer-to-peer algorithms: BitTorrent would like a word with you. 2. Distributed consensus: Paxos would like a word with you. 3. Proof of work: hashcash would like a word with you. That said, I find the Bitcoin paper to be a delightful synthesis of a bunch of well known ideas.
Prior to Bitcoin, there was NO distributed algorithm capable of maintaining an agreed-upon blockchain of transactions in perpetuity, in a manner resistant to attack by fraudulent nodes. Such an algorithm didn't exist prior to Bitcoin.
Re: Bitcoin's Academic Pedigree
#23Coauthor here. Here's some context for how this essay came about. When we released a draft of the Princeton Bitcoin textbook [1], one piece of feedback was that we focused on cryptocurrency technology as it is today, and ignored the juicy and tumultuous history of how the ideas developed over the last few decades. So I invited Jeremy Clark, who's connected to some of this history, to write a preface to the book. If y…
Re: Bitcoin's Academic Pedigree
#24This article correctly shows that virtually none of the ideas underpinning Bitcoin are new. They can all be traced to the academic literature going back decades. Cryptographic signatures and public-key cryptography, cryptographic hash functions, cryptographic proof-of-work, time-stamping, Merkle trees, chains of transactions blocks, Byzantine fault tolerance, smart contracts -- all of these ideas were old when Bitcoi…
I've spent a lot of time reviewing the original Bitcoin codebase. It's brilliant code. It's production-grade C++. There's nothing in it that hints at academic origins. Most people are either academics or professional coders -- to be both is a rare exception. The codebase seemed to materialize out of nowhere. One of the earliest commits in the SVN repo contains 36 thousand lines of code. "Satoshi" (or this group of pe…
Re: Bitcoin's Academic Pedigree
#25After 12 years as an academic computer scientist, Bitcoin was the most impressive computer science research I saw. And it came from outside the academy.
Re: Bitcoin's Academic Pedigree
#26Earlier quoted context omitted.
I've spent a lot of time reviewing the original Bitcoin codebase. It's brilliant code. It's production-grade C++. There's nothing in it that hints at academic origins. Most people are either academics or professional coders -- to be both is a rare exception. The codebase seemed to materialize out of nowhere. One of the earliest commits in the SVN repo contains 36 thousand lines of code. "Satoshi" (or this group of pe…
Just clicked to check it out and was reminded about how much I like the base-58 scheme they used for addresses.
My favorite is:
IMPLEMENT_SERIALIZE
(
READWRITE(prevout);
READWRITE(scriptSig);
READWRITE(nSequence);
)
It's a C++ macro that implements reading and writing member variables to/from disk/network. It uses C++ templates to figure out the sizes of everything, so it winds up packing items efficiently. We used something similar in the gamedev industry, so this was a delightful surprise.Ohh, no, I take it back. This is my favorite:
//
// Compact size
// size UINT_MAX -- 9 bytes (255 + 8 bytes)
//
inline unsigned int GetSizeOfCompactSize(uint64 nSize)
{
if (nSize
When encoding an arbitrary value, if it's less than 253, it only uses 1 byte of space. When you read a byte off the network, if it's 253, you know there are two more bytes to read. 254 = 4 bytes, 255 = 8 bytes.Again, it's a small thing -- very standard tactic. But there are dozens of tiny, effective decisions exactly like this all throughout the codebase.
There's a secure allocator for wiping your private key so that it doesn't hang out in memory, with hacks to work around MSVC8 problems. Which academics bother with MSVC8 hacks?
//
// Allocator that clears its contents before deletion
//
template
struct secure_allocator : public std::allocator
{
// MSVC8 default copy constructor is broken
typedef std::allocator base;
typedef typename base::size_type size_type;
typedef typename base::difference_type difference_type;
typedef typename base::pointer pointer;
typedef typename base::const_pointer const_pointer;
typedef typename base::reference reference;
typedef typename base::const_reference const_reference;
typedef typename base::value_type value_type;
secure_allocator() throw() {}
secure_allocator(const secure_allocator& a) throw() : base(a) {}
~secure_allocator() throw() {}
template struct rebind
{ typedef secure_allocator other; };
void deallocate(T* p, std::size_t n)
{
if (p != NULL)
memset(p, 0, sizeof(T) * n);
allocator::deallocate(p, n);
}
};
Another gem (note the comments): case OP_EQUAL:
case OP_EQUALVERIFY:
//case OP_NOTEQUAL: // use OP_NUMNOTEQUAL
{
// (x1 x2 - bool)
if (stack.size()
Bitcoin is worth N billion dollars right now, and this codebase really is a billion dollar codebase. Is this really the work of a single person?Re: Bitcoin's Academic Pedigree
#27After 12 years as an academic computer scientist, Bitcoin was the most impressive computer science research I saw. And it came from outside the academy.
Re: Bitcoin's Academic Pedigree
#28This article correctly shows that virtually none of the ideas underpinning Bitcoin are new. They can all be traced to the academic literature going back decades. Cryptographic signatures and public-key cryptography, cryptographic hash functions, cryptographic proof-of-work, time-stamping, Merkle trees, chains of transactions blocks, Byzantine fault tolerance, smart contracts -- all of these ideas were old when Bitcoi…
I've spent a lot of time reviewing the original Bitcoin codebase. It's brilliant code. It's production-grade C++. There's nothing in it that hints at academic origins. Most people are either academics or professional coders -- to be both is a rare exception. The codebase seemed to materialize out of nowhere. One of the earliest commits in the SVN repo contains 36 thousand lines of code. "Satoshi" (or this group of pe…
Fun fact: I was contacted by the Computer History Museum in Mountain View since this tarball (and the .rar) hosted on my site is the earliest known public copy of the source code.
Re: Bitcoin's Academic Pedigree
#29Earlier quoted context omitted.
Prior to Bitcoin, there was NO distributed algorithm capable of maintaining an agreed-upon blockchain of transactions in perpetuity, in a manner resistant to attack by fraudulent nodes. Such an algorithm didn't exist prior to Bitcoin.
I think mayank wanted you to say "Bitcoin's peer-to-peer protocol, on the other hand, is a new distributed algorithm"
Re: Bitcoin's Academic Pedigree
#30Earlier quoted context omitted.
Just clicked to check it out and was reminded about how much I like the base-58 scheme they used for addresses.
There's so much like that. I'm going to try to write a blog post highlighting all the gems. My favorite is: IMPLEMENT_SERIALIZE ( READWRITE(prevout); READWRITE(scriptSig); READWRITE(nSequence); ) It's a C++ macro that implements reading and writing member variables to/from disk/network. It uses C++ templates to figure out the sizes of everything, so it winds up packing items efficiently. We used something similar in…
The formatting of the code in that function also puzzles you for an instant, but then you realise just how much clearer it makes it over the "lame" but "consistently formatted" alternative of
if ( )
{
....
}
else if ( )
{
...
}
....