bcoin 2019: Our plan for the next 52,560 blocks

Matthew Zipkin
bcoin
Published in
7 min readJan 15, 2019

--

2018 was a big year for the bcoin project. We finally removed that -beta and released a solid v1.0.0! How did we get there, and what’s on the roadmap for this year? Let’s take a look.

The 2018 bcoin story

We had a lot on our roadmap for last year. We produced everything we set out to do and more.

The community: Our Github repo is approaching 2,000 stars, 150 watchers, and over 500 forks! It’s great to see so many new people checking out the code. We’re up to 30 contributors, more than half of whom have added multiple commits. Over 134 issues were opened and 77 of those are already closed. Our Slack group is another great way to interact directly with the development team. I’ve personally enjoyed learning about new projects and the innovative ways bcoin is being integrated.

The hackathon: In April we hosted Crypto 4 Your Thoughts with our partners at Cosmos. Over 180 developers attended and thousands of dollars worth of prizes were distributed. Several projects were built on top of bPanel including the winning project.

Crypto 4 Your Thoughts, 2018

The workshop: At the Scaling Bitcoin Conference in Tokyo, members of the bcoin team led a workshop called CVE, Vulnerability handling about responsible disclosure for cryptocurrency projects. A few weeks prior to the conference, a bcoin team member had responsibly disclosed a security issue in Bitcoin Core.

The documentation: Our main resource portal is bcoin.io, and this year we added a ton of new goodies there. There was a massive update to the API docs, as well as lots of new guides. We now have guides on cross-chain atomic swaps, time-locked transactions, running bcoin in a web browser and a whole lot more.

What? A full node in a browser tab?!

The refactor: The biggest change in bcoin this year was the modularization of the code. A Bitcoin node has many moving parts, and separating them out has a lot of advantages. It makes it a lot easier to re-assemble them with different configurations for different cryptocurrencies, and it also makes it a lot easier to build applications with smaller toolsets. The most notable of these new independent modules is the wallet. A bcoin wallet server can now be run remotely from the rest of the node. Some of the other interesting modules include:

  • bcrypto: Extends the node.js crypto module and adds special support for secp256k1
  • bsock: Minimal implementation of the socket.io protocol
  • bweb: A web server framework for routing a REST API, as well as static web pages. Our own lightweight version of an Express server, it includes support for the most often-used middleware
  • bclient: Clients for bcoin node and wallet servers

These new libraries are all open-source and can be used for any project, whether it’s related to Bitcoin or not!

Late in 2018, our lead developer JJ re-implemented the mocha testing framework, creating bmocha. This was important to isolate bcoin from a common vulnerability in JavaScript projects: dependencies. Mocha depends on several external libraries, and since dependencies have been used to attack Bitcoin wallet users, it is essential for bcoin users’ security to git rid of them. After replacing bmocha, bcoin depends only on projects maintained by the bcoin organization on GitHub, even in a developer environment.

Bitcoin Cash and Handshake: With those modules all pulled out and published to npm, two new projects were put together:

  • bcash is our new implementation of the Bitcoin Cash fork. It was released in May and integrated by Purse.io. Since the original hard fork, our team has kept bcash consensus-compliant with Bitcoin ABC through two additional protocol-upgrading hard forks.
  • hsd is a whole different beast! The first totally new cryptocurrency implementation based on the bcoin library. Handshake is a decentralized, permissionless naming protocol compatible with DNS.

New toys: We’ve added a few new features to the bcoin suite this year. These are in-progress projects that will be reviewed, finalized and released in 2019:

  • Neutrino support (BIP 157): On a bcoin development branch, we’ve introduced support for Neutrino service. With this running you can connect a lnd Lightning Node to the Bitcoin network.
  • bmultisig: This is a brand-new module that plugs in to the bcoin wallet module and extends its API for multisig usage. This incredible application allows developers to build new multisignature schemes, propose and approve transactions to the partners. bPanel supports this module already with the in-progress bwallet plugin.
  • Indexer plugin: This module maintains the blockchain indexers outside of the bcoin node, separate from the chain database itself. The advantage here is to be able to index the chain and apply custom filters without disrupting the status of the node itself.

We’ve also been hard at work on our Blockchain Management System, bPanel. bPanel is a web-based user interface that interacts with bcoin, bcash, and handshake. Like WordPress, it is plugin based and we have some cool plugins in development like a hardware-compatible multisig wallet, a versatile price ticker, and even a testnet faucet for handshake.

Here’s a sneak preview of bPanel! How fun is this?!

2019: Adoption and convenience

Our goals for the new year are all about adoption. Adoption of Bitcoin as a currency by new users, and integration of bcoin and bpanel by developers for applications and enterprise.

bPanel: We want to integrate an authentication layer to bPanel so users can run the server remotely, but securely. In addition to building more plugins, we plan on building a one-click installer that will help on-board new users. We plan on integrating more hardware wallet types, more versatile multisig solutions, and better support for multiple chains.

Neutrino client: We already have a working Neutrino server for bcoin, and we plan on implementing the client next. It’s a much better scheme than SPV in regards to privacy and security, and would enable some really cool lightweight apps to be built on bcoin.

Partially Signed Bitcoin Transactions: BIP174 is a scheme for standardizing transactions that need to be passed around for multiple signatures. This would be a useful feature to have for bcoin users who collaborate with partners on other wallets. We have a pull request already in progress.

Better disk usage: There’s a good deal of efficiency improvements we can still squeeze out of bcoin. Solving these problems will make everything run a lot faster and use a lot less disk space. Check out the issue on GitHub for the highest priority items already identified and feel free to contribute with other areas you might have found for improvement!

Bitcoin Cash: Keeping up with Bitcoin ABC is already a full-time effort, but we have a few other goals we want to achieve with our bcash library. We want to run our own tests on the scaling potential of the BCH network, and see just how far we can push the maximum block size. One of the tools the Bitcoin ABC developers want to implement is called Graphene, an algorithm to reduce block propagation time.

Can we handle gigabyte blocks?!

RPC: The bcoin JSON-RPC API was originally designed to match that of Bitcoin Core. Although bcoin also has its own REST API, the RPC was included so developers could switch from Bitcoin Core to bcoin, or use both in tandem. The RPC in Bitcoin Core has gone through a lot of changes and updates this past year and we plan on maintaining that consistency.

A menace to the network

Is bcoin a menace to the Bitcoin network? We obviously don’t think so 😉. We believe that alternative implementations are helpful for preventing critical bugs from bringing down the entire network. bcoin also has a slew of features that make it the best choice for lots of use cases. Whether you’re running an enterprise service with thousands of accounts, or just a single user who wants the privacy of a full node and the security of two-factor multisig, bcoin has a solution for you.

We’re excited to see what 2019 brings the Bitcoin ecosystem, and even more excited to bring that ecosystem to more users, developers and applications. By the time the blockchain hits height 610,000 we’ll have a ton of new features on the field — to the moon!

Learn more at bcoin.io

--

--