Live data from Hacker News

Bitcoin's Academic Pedigree

queue.acm.org

21–30 of 147 posts

Re: Bitcoin's Academic Pedigree

#21
post #2

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…

Everything is built on top of previous work which I do not intend to diminish here. But, Satoshi is a total genius. The complexity and ingenuity of Bitcoin are just amazing.

Re: Bitcoin's Academic Pedigree

#22
post #16
post #12

Earlier 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.

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

#23

Coauthor 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…

When you were researching the ledger part, I'm curious whether you've come across a DAG-based ledger. I've been reading the byteball [1] paper and still can't tell whether it's baloney or really the DAG is a consensus that does not require PoW... I suspect it's neither, there are trade offs, but I could not find much anything good on the subject to read.

[1] https://byteball.org/Byteball.pdf

Re: Bitcoin's Academic Pedigree

#24
post #2

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…

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.

Re: Bitcoin's Academic Pedigree

#25
post #3

After 12 years as an academic computer scientist, Bitcoin was the most impressive computer science research I saw. And it came from outside the academy.

It's more than just science. I believe it changes the world more than anything in the last 30 years. I have been thinking of what the world would be without internet / computers / mobile phones, but having a great liquid store of value. If I had to choose only 1 of these technologies for my life, I would pick Bitcoin.

Re: Bitcoin's Academic Pedigree

#26

Earlier 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.

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 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

#28
post #2

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…

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…

I recovered and archived version 0.1.0 (directly from Hal Finney): http://www.zorinaq.com/pub/bitcoin-0.1.0.tgz It has 19k lines of code. That's certainly a few months of work minimum.

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

#29
post #22
post #16

Earlier 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"

I can get on board with that :)

Re: Bitcoin's Academic Pedigree

#30

Earlier 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…

That was probably inspired by ASN.1 or other serialisation protocols.

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 ( )
    {
        ...
    }
    ....
Post reply on HN