row of motherboard

Working blockchain gives you the edge in Bitcoin mining and business

Are you involved in a Bitcoin mining operation or business and looking for ways to improve your venture?

Let me introduce you to a concept critical to optimising your efficiency and profitability: Your working blockchain.

We define a 'working blockchain' as a pared-down blockchain record. Using a working blockchain can enable you to play your own role in the network without regard to other activity taking place simultaneously. The concept is derived from sections 7 and 8 of the Bitcoin white paper, 'Reclaiming Disk Space’, and ‘Simplified Payment Verification’.

Whether you’re a Bitcoin miner, service provider or just a user, limiting the data you store to the bare minimum will let you save on bandwidth from the beginning while ensuring you have all the info you need at your fingertips.

Working blockchain: different strokes for different folks

As there are different parties active in the network tasked with different roles, each of them will follow a different technique to generate the working blockchain that suits their needs. 

A miner's working blockchain

Let’s consider the perspective of a block-producing miner. When a block announcement comes in, it contains the Merkle root of all of the transactions in that block. To validate that block, a miner needs to have access to all of that activity at that point in time. Moving forward, and thanks to the nature of the transaction ledger, there is no requirement to store this information ad infinitum.

In this context, we say that a miner’s working blockchain is made up of the list of all the block headers going back to the Genesis block with the Merkle tree under each of them. These Merkle trees are each pruned of any transactions that no longer have spendable outputs. Effectively what they're doing is going back through the transaction history and dropping out anything that is redundant to validating future transactions.

Why would they be doing this? It is because the miners’ role in the network is the immediate act of validating new transactions and putting them into blocks, not the archiving of all information. 

So, who's keeping the record of historical data? For one, the people who are generating the information would keep a subset of data relevant to their transaction history. Secondly, archive services will be able to commercialise storing particular types of data and giving that information back to people who've lost it. These services are nascent today and represent opportunities for innovation and development.

Definition: A Bitcoin miner’s working blockchain

A Bitcoin miner's working blockchain therefore consists of the list of block headers going back to the Genesis block with their corresponding Merkle trees stripped down to just the transactions with usable outputs. 

A Bitcoin user's working blockchain

When looking at a Bitcoin service provider or user's working blockchain, we use SPV (simplified payment verification) as a framework. SPV is a technique that allows a simple and small immutable proof of existence for any transaction to be provided that links it back to a block with valid proof of work. Starting with just the block headers going back to the Genesis block, the user receives these proofs provided as ‘Merkle paths’, or lists of hashes that allow the user to trace a transaction’s hash or TXID up to a Merkle root, which validates that it was legitimately mined into a particular block. 

As Bitcoin users like apps and service providers all have unique needs and clients, each of them will have a working blockchain that's unique from anyone else's in the world. 

Definition: A Bitcoin user’s working blockchain

A Bitcoin user or service provider’s working blockchain consists of the list of block headers with Merkle trees which are built up from the Merkle paths of only the transactions that are relevant to it or its clients and customers.

The commonality in working blockchains

What you should note about these two techniques is that they both achieve the same ends, but for different network participants. Both use the branched hash path architecture of the Merkle tree to create a condensed database that represents a subset of transactions. 

Whether you start with the whole blockchain containing every single transaction and prune it back, or you start from the list of block headers and request Merkle proofs of specific transactions to build up your working blockchain, you'll arrive at the goal of having a set of just the transactions that are relevant to you. 

Alternative use cases of working blockchain: compliance issues

The method of pruning data from your working blockchain as described in section 7 of the white paper can be applied to other scenarios as well. There are already reported instances of people posting objectionable or illegal material to the blockchain

Contrary to the idea of the blockchain being uncensorable, network participants could agree to prune certain data from their working blockchain and refuse to serve it to anyone. Unlike other centrally-controlled platforms however, all network participants would have to be in agreement. Alternatively, law enforcement would have to attain a court order compelling miners to prune certain data from the blockchain. While the data would then become unavailable to the public, law enforcement would keep record of the material in their own working blockchain, allowing them to crack down and prosecute the criminals with proof that any data recovered corresponded to the illegal transactions. 

Gaining the competitive edge through a working blockchain

Many Bitcoin circles promote the idea that one needs to keep every single transaction that's ever been made to be able to validate if your own transactions are true and real. The premise is entirely false. Having a working blockchain will give you the flexibility to only keep the transactions that are relevant to the service you're running.

For example, the wallet we run at Elas Digital is completely P2P, so we don't need to run a node. When it receives a transaction, it receives the whole transaction from the person spending it, picks it apart so it can confirm its location on the blockchain. It then adds that transaction into the receiver's own working blockchain so that they have a copy of that transaction the next time they want to create a transaction. The wallet stores the Merkle paths and transaction details of all of the spendable coins that it's holding, and only that. We don't need to fill up your whole computer with gigabytes of other people's stuff - that's counterproductive and unnecessary. 

We don't make blockchain data more secure by making 100 million copies of it. We make it more secure by making a small number of highly secure copies that are managed by people with the computing systems needed to manage the network. This way it ensures that people who need only a lightweight wallet can function with the bare minimum of information, while that information has the same immutability as the information being held by the nodes who are validating the transactions. 

As long as you have the block headers, a transaction and the Merkle proof, you can restore the same amount of information that's kept by the people who validated that transaction when it was sent to the network.

As a miner, you need to be aware of everything that's happening on the network as it takes place, but afterwards can filter your records, removing anything that’s not going to be useful moving forward. The miners who do this the most effectively will save storage space and money, gaining a competitive edge. This is part of being the most efficient and most effective nodes on the network, and helps to ensure their sustainability.

The huge cash investment in mining is what secures the stability of the network as this ensures that miners will do the best by the network.

However smaller nodes can be more innovative, not efficient, unless the innovation causes efficiency. By being innovative, they can create a competitive advantage and out perform.

And this is what's exciting about Bitcoin. It's very difficult for anyone to become completely entrenched at the top. There are no means by which they can establish a cartel, as the person who is the most efficient (despite their size) can make more profit out of the same equipment.

Brendan Lee
Brendan Lee

Training and Development Manager - Bitcoin Association