Toms Blog

Where I talk about Bitcoin Cash and more

Introducing a bitcore-json-proxy

2019-09-23 flowee

Today I introduce the next step in the plan to platforming Bitcoin Cash. The creation of the Flowee Bitcore proxy. Bitcore is an old product which backs many of the block-explorers.

In my 30 years of doing software developing I came to my personal conclusion that the best way to build a big software product is that I get on paper the most perfect design first, and with that full knowledge decide where to cut corners so it actually becomes possible to build.

When I started coding on Bitcoin in 2016 and I got to know and touch practically all corners of Bitcoin Core, later Classic, my ideal was being crushed as the codebase is designed exactly in the opposite way. As all Core based clients have learned.

When we finally got our bigger blocks in August 2017 I went full steam ahead with my normal approach. And I drafted a high level sketch of what I think is the ideal software for the Bitcoin Cash ecosystem. And Flowee was born.

Flowee is not a single software project, it is software platform. A series of projects that work well together. These products can be used together for a corporation or professional to quickly get up and running and start using Bitcoin Cash.

In the original Bitcoin Core software we have all the functionality you need as a node operator, as a company and as an end user. It has everything from the full block storage all the way to a usable wallet. The direct effect of this is that trade-offs are made. The wallet being there puts in requirements that keeps the full node from being made better for speed.

So I started sketching the bigger architecture and perfect world system. At the center I now have a full node, which I renamed to the Hub in order to make clear that this is not the same thing as the Core wallet/client.

Going outwards from the Hub I have a series of indexes. When we grow our Blockchain from today’s 150GB to 1.5TB in a couple of years, we need to have fast lookup indexers because otherwise everything will just slow to a crawl. Indexers to quickly find the real data, while the real data still, and always will be, kept in the center: the Hub.

Today I merged 2 changes into the codebase:

  1. A framework to do quick queries on the database in the Hub, with transparently doing look ups in the indexers. This is working code, and a 3rd iteration with a design I’m happy with.
    This new framework allows basic and simple queries as well as very unconventional queries to be made with very little knowledge of the lower level details.
  2. The first service using the above framework, a bitcore-proxy. Bitcore is a product that was made by Bitpay as a way to get access to the Blockchain. It is very well known as it has a JSON based service which is used by many block-explorers.

Why is this a big deal?

The best way to build up an industry is to unite all players that have the same needs and pool resources to make those happen. Each player in the ecosystem then can focus most of their resources on differentiating features. An exchange and a BitBacker-like website are very different companies, but they both run a lot of software that is identical. The sharing of resources to maintain basic infrastructure and tools means everyone gets the same or better infrastructure, for a fraction of the price.

Most bigger companies in Bitcoin and Bitcoin Cash have seen the lack of this kind of infrastructure. A purse.io has to maintain their own full node codebase, and has problems every now and then because obviously this is a drain on their resources. A critical look shows this is a common problem. We probably lost more good companies (BitBacker, lazyfox, honest.cash) due to lack of infrastructure-tools than to anything else. Because those people had no time to just build their vision out, they needed to focus on the infrastructure.

What we don’t even see today is the amount of startups that never were, never could get any product off the ground, because they were limited by the lack of infrastructure-tools.

The Bitcore-proxy, together with the query-framework it uses, will allow a near infinite amount of applications and ideas to be tested and rolled out on top Flowee.

In short;

  • Companies spend less resources when they build on public infrastructure / tools.
  • Flowee provides full node functionality, Blockchain access and other infrastructure.
  • Adding a simple way to query the data (a C++ framework) more companies can do their research and build on Flowee.
  • With the beta of a Bitcore-proxy, more existing use-cases will slowly be covered by a whole-Flowee stack.

Flowee applications are free and open source software. If you want to help, or simply add your favorite feature, contributions are welcome on gitlab.

What’s next?

Flowee will continue to innovate and work on the masterplan. Imagine a perfect software architecture that involves practically all types of companies and services, this is the 5 year goal. Even though I won’t get it perfect, I’m still reaching for the moon.

The bitcore proxy is in beta, so more functionality and bugfixes are inevitable, while at the same time working on the query framework.

After that the goal will move to add a new service that will allow a lot of developers to start using the flowee stack, likely nodejs based.