Bcoin: A “Menace to the Network” or an Enrichment of the Bitcoin Ecosystem?

Views: 453

Purse is best known as a peer-to-peer marketplace and gift card service where users can save money using Bitcoin through Amazon’s e-commerce platform. Now, the company is in the throes of a complementary project that has garnered the attention of entrepreneurs and developers throughout the Bitcoin community.

Bcoin, as it is affectionately called, is a newly developed JavaScript library that offers a new way to connect to the Bitcoin network. While Bcoin is not the first library in the high-level programming language, it is the first to include full node capabilities. In Bcoin — as opposed to another Bitcoin JavaScript library, bitcoinjs — tasks like blockchain verification don’t need to be offloaded to third parties. In other words, no other nodes need to be trusted to confirm the valid chain.

Speaking to Bitcoin Magazine, Purse CTO and Bcoin lead developer Christopher Jeffrey explained:

“When I was working at BitPay, we were looking for a ‘hackable’ Bitcoin back-end to do cool things with. I wanted access to lower level features than the Bitcoin Core API allowed, but a pull-request to make that possible was rejected, so I was left with few options. After I left BitPay, I turned to an old project I was a contributor to: Bcoin. Over the course of a year, I turned a simplified payment verification library into a full node library.”

Now, Bcoin is getting ready for “prime time,” as Purse will start running its service on top of it.

“Bcoin will be used as Purse’s full node and wallet back-end,” Jeffrey explained. “It should be live within the next week. This means Bcoin will be responsible for securing actual money and will be battle-tested by us for anyone considering using it.”

A Viable Bitcoin Core Alternative?

While Bitcoin Core has been vetted over time, and for many still serves as the go-to standard, the code base can be a bit challenging to work with, even for experienced software engineers. As a result, only a small cadre of developers are fully conversant with it and actively contribute to its advancement.

Jeffrey’s efforts to create Bcoin should simplify some of the complexities associated with managing a large and rapidly growing merchant website.

“Bcoin is my answer to the Bitcoin development problem. I think it will be the right answer for a lot of people. JavaScript is a ubiquitous language: everyone is familiar with it and it runs everywhere, including the browser,” Jeffrey told Bitcoin Magazine.

But not everyone agrees that Bcoin is an enrichment to the Bitcoin ecosystem. Concerns about Bcoin have been raised among some other developers in the Bitcoin community.

Bitcoin Core developer Peter Todd is perhaps the most outspoken critic. He told Bitcoin Magazine that rewriting the consensus code is a nice way to learn the protocol, but ultimately is a waste of money for a business.

“My views about this are typical of those of competent, experienced Bitcoin developers who believe that rewriting the consensus code and getting it right is spectacularly difficult, and no one has been successful at doing so,” Todd said. “Equally, the Satoshi Bitcoin code base is well optimized and very fast; you’re not going to do better than that in JavaScript anyway.”

Todd went on to say that like it or not, consensus has incredibly strict requirements on compatibility. “You need 100% compatibility down to the tiniest minute details.” This, he says, is a unique requirement that simply doesn’t exist in nearly all other projects. “If you’re web-browser, no-one cares because layouts differ only by a few pixels. On the other hand, if your account balance and my account balance differ by even a single satoshi, then that’s a huge problem that simply must be fixed. Otherwise it won’t be clear who owns what money.”

Satoshi

Christopher Jeffrey acknowledged that a mentality around the infeasibility of a consensus protocol re-implementation has existed since the very early days of Bitcoin. Even Satoshi Nakamoto once predicted that an alternative implementation would act as a “menace to the network.”

Jeffrey says the goal isn’t to upstage Satoshi or to become problematic to the network, nor to establish a position in the block-size debate. Through the accelerated development of his new implementation, he hopes to debunk the notion that it is impossible to re-implement consensus code.

“Whoever Satoshi was, he was very smart, but he was not a programmer. He left us with an absolute mess of a project. That project has been further hacked together over the years to make it even more haphazard. The code is unreadable, the API is arbitrarily designed, and it’s not very easy to fix all of that unless you start fresh. Consensus code is very difficult to re-implement, but not impossible. The criticisms of re-implemented consensus code do have some merit. That being said, most of the critics are too dismissive.”