Founder of Mattercloud, Attila Aros just released the beta of TXDB, a Bitcoin transaction spend index database. I have had conversations with Attila in the past about this subject and decided to catch up with him to discuss his motivation for building this service and the benefits it provides.
Introducing TXDB (beta)
Global Bitcoin Transaction Spend Index.
Easily query transaction spend status from a highly available and performant API.https://t.co/KBC6oIC6X0
Get the full txout:https://t.co/su5ActHtBz
— Attila (@AttilaAros) August 31, 2020
What is the primary purpose of TXDB?
TXDB is a Bitcoin transaction database.
TXDB is a simple and powerful Application Programmer Interface (API) that frees the developer from all the complexity of managing “Bitcoin storage nodes” at a time when the blockchain usage is growing exponentially.
I know you have been working on this for some time, what was your motivation for developing this service?
The motivation for TXDB began from last year when we saw the rise of network “stress tests” (blocks in excess of millions of transactions). These “stress tests” were causing quality and stability issues for us (and almost all the other services in this space). We knew we had to make a big change to how we index all the data.
As a result we were painfully aware of the limitations of the “monolithic node” method of serving data and we decided to start designing a system that is capable of withstanding high throughput while still reliably serving thousands of clients simultaneously.
You tweeted the following:
Any UTXO or colored tokens solution can now be easily built leveraging TXDB.
It makes it easy to “walk forward” a chain of “update transactions” to get the latest state.
Contact me if you have an app or token solution that needs this service and I’ll help you integrate.
— Attila (@AttilaAros) August 31, 2020
I am aware that UTXO-based tokens solutions have this issue of ‘validating back to the Genesis block’:
Could you elaborate on this issue that tokens face?
What is being referred to is the need for an external agent process to monitor the blockchain and update the token state as users update and transfer tokens.
The major benefit of using Bitcoin Script for tokenization is the security and reliability because each token is validated directly by the Bitcoin network and no additional agents are strictly necessary for the system to operate.
By leveraging Bitcoin Script directly (ie: UTXO/Script based approaches mentioned above), any native Bitcoin indexer can just as easily index these so-called Script-based tokens. This is a powerful use of Bitcoin’s scripting capabilities and greatly simplifies security and reliability of any token solution built in this way.
Why is the TXDB solution so crucial for token solutions?
TXDB provides a way for any token solution to quickly query any transaction output and also retrieve their spend statuses.
The “spend status” tells the client whether an output was spent (ex: a token’s state was updated) and makes it easy for token indexers to either crawl or query the blockchain data to get the latest state efficiently.
Does this simplify and/or replace necessary infrastructure other token platforms may have had to build?
TXDB complements existing token solution by providing a “last mile” blockchain data service. Token indexers can focus on tracking and processing their own token types and not incurring the cost and complexity of maintaining a global blockchain index.
Can UTXO-based token solutions scale (i.e. Run) without something like TXDB?
Of course they can!
The UTXO model of Bitcoin is perfect for a “peer to peer” world where users can share and store their own transactions between them. In other words, a UTXO based token solution that leverages Simplified Payment Verification (SPV) can scale just like any other application on the internet.
For token service providers, they may still want a way to connect to “sources of truth” and obtain a more complete picture of their data on the blockchain. Basically, we take the complexity and costs away from indexing the global blockchain and free up the token service developers to focus on their value proposition.
What existing businesses (other than token platforms) could potentially be your customer?
Any business that needs reliable and fast access to global Bitcoin blockchain data can be a customer. We welcome individual developers, startups and larger businesses.
Bitcoin is designed to scale “peer to peer,” however many service providers will want to have a “real-time fully copy” of the blockchain available to support their operations.
Is this a Bitcoin SV ‘only’ service?
Yes. We are a Bitcoin SV provider and TXDB was built for the unique scaling demands of the fastest growing blockchain.
What future businesses do you see becoming your customer?
How does TXDB compare to nChain’s Teranode project?
nChain’s Teranode project is being designed to handle Gigabyte-sized blocks capable of millions of transactions per second. A number of teams in addition to nChain are attempting to build a “next generation” distributed architecture for Bitcoin SV to handle such scale.
Any Bitcoin service provider that wants to provide a solution to serve the massive blockchain will need a transaction database that can meet the needs of clients while being able to keep up with the rapid growth.
TXDB aims to fill that need for clients today and is just one of the internal components we are building as part of our own distributed architecture for efficiently processing and serving Bitcoin SV transactions.
How does TXDB compare to _unwriter’s Bitbus or his other tools?
Bitbus is designed for developers to be able to query data and transactions in the blockchain, similar to our services.
The major difference with TXDB is that it’s designed from the ground up for massive amounts of data and it “gets out of the way” of developers without imposing a specific structure on their applications.
We are seeing a great shift in how developers think about their “Bitcoin applications” toward a more “peer to peer” approach where applications store their own transactions and merely rely on the network for settlement. It is difficult to say all the ways these apps will be architected—and that’s why we do not impose a specific way of doing things.
One thing that is clear to us is the need for a mission critical storage and indexing system that can be relied on developers to integrate into applications and workflows of any scale.
You also tweeted:
We have tested this internally this to handle 20k tx/second.
We can quickly and easily deploy this solution to any data center region and we will have no problems handling the BSV blockchain growth of 10-20x over the next couple years.
The fun begins now.
— Attila (@AttilaAros) August 31, 2020
This seems like a big deal. How are you so confident you can handle this scale?
We benchmarked it internally and just figured out how to make it really fast—we spared no optimization for this project.
Bitcoin is a chronological time-stamping service and by its nature more recent data will be accessed more frequently. Data that is in past blocks will be archived and indexed in tiered storage arrays. For example, the past month of data will be “hot loaded” and available on-demand, but older data may take longer time to pull from archives.
In this manner, we are confident we can add many “big data” techniques to scale out horizontally and prepare for the larger milestone of serving millions of transactions per second.
Have any token platforms reached out to you about using TXDB?
A few have reached out over the past months and recently since launch. I owe a big thanks to them for asking us for features that ultimately were the inspiration for TXDB, it is because of their feedback and requests that we had the confidence to build.
I understand that this is not a cheap service to run. Can you give an idea of the costs associated and why this is expensive?
That’s a secret.
However, we can say for sure that building this type of service “in house” is not trivial and has considerable costs that will only go up in time.
The biggest expenses come from the nature of the service “storing everything”. This is in the realm of big data and data warehousing as it will require a lot of storage, memory and compute resources.
Where can people reach out to you with questions and to get started using TXDB?
Anyone can reach me for questions and more info at [email protected] or on Twitter @AttilaAros.
Thank you, Attila, for taking time to answer my questions. I hope the readers learned about the usefulness of TXDB and how this infrastructure pushes the ecosystem forward.
New to Bitcoin? Check out CoinGeek’s Bitcoin for Beginners section, the ultimate resource guide to learn more about Bitcoin—as originally envisioned by Satoshi Nakamoto—and blockchain.