The Red Queen’s race
In Lewis Carroll’s Through the Looking-Glass, The Red Queen’s race is an event where The Red Queen and Alice are frantically running but don’t move. This is the exchange they have while out of breath afterwards.
“Well, in our country,” said Alice, still panting a little, “you’d generally get to somewhere else — if you run very fast for a long time, as we’ve been doing.”
“A slow sort of country!” said the Queen. “Now, here, you see, it takes all the running you can do, to keep in the same place. If you want to get somewhere else, you must run at least twice as fast as that!”
In evolutionary biology, the red queen’s race is used to illustrate that sexual reproduction and the resulting genetic recombination may be just enough to allow individuals of a certain species to adapt to changes in their environment. More importantly however, it is also used in environmental sociology by Allan Schnaiberg’s idea of the Treadmill of Production. In this example producers are continually driven to accumulate capital and expand the market in an effort to maintain relative economic and social position. Much like an evolutionary game-theoretic biological system.
These evolutionary forces dictating the direction of evolution are well understood. Utilising statistics game-theoretic models are able to predict the spread of a genome, they conclude that,
Targeted experiments based on our computational results could further help assess the BQ [Black Queen] Hypothesis.
The Black Queen
The Black Queen hypothesis is based on the card game Hearts. The significant rule in the game for this analogy is that the queen of spades, which must end up in a player’s deck, carries a very large penalty. The biological theory is that it can be beneficial for a cell to lose vital functions (i.e., losing the ability to process Sulpha) if the surrounding cells are able to fulfil that function for them. The main driver for this would be that the individual cells become more metabolically efficient as they no longer have to provide the function for themselves, allowing cells to specialize. There are again parallels here with business: if the KPIs (Key Performance Indicators) in a business model are correctly identified, it would stand to reason that these metrics can be used within similar biological models described above. The forces acting on both nature and businesses are measurable, thus can be modelled and tested.
Equal and opposite
Using the kind of thinking from above we maybe able to understand the secret to Bitcoin’s success. Why is Bitcoin able to resist attacks and what are the mechanisms behind that resistance? To answer this question we must look in detail at Bitcoin’s genome or the technical details of the way Bitcoin has been constructed.
The Bitcoin network, made up of miners, takes a snapshot of time roughly every 10 minutes via the probabilistic Proof of Work (POW) mechanism. Companies that decide to take on this process wherein they reward themselves every time they produce a valid snapshot are known as miners. This reward includes a subsidy and transaction fees. In order to validate other miners are worthy of their reward, each miner checks their competitors’ attempt at solving the proof of work by observing the blocks they produce. Other miners will only accept their work if it contains no double spends and follows a given rule set. It is this incentive mechanism that guards the network against would-be attackers that wish to double spend. Miners are encouraged to propagate their work as fast as possible to ensure their effort, money and time is not wasted on invalid blocks due to a competitor’s block orphaning theirs.
The fact that miners must follow the longest valid proof-of-work chain creates a balanced incentive mechanism. Not only to propagate the block being worked on top of as quickly as possible but also to validate incoming blocks as quickly as possible. The transition from one block to the next block is an important one, it must be done both quickly and with managed risk. As we know, if a miner begins working on top of an invalid block, the work is wasted. Yet to ensure that they are not left behind, work must be commenced on a valid block as soon as possible. This may mean that work begins before all aspects of an incoming block are validated.
The image illustrates this as a free body force diagram where miner ‘A’ has found a block and is positively incentivised (F1) to propagate their block as soon as possible. Miner ‘B’ who is receiving the block is positively incentivised (F2) to receive and validate the block as soon as possible. The weakening of either incentive would be a detriment to the system as a whole. The dictum to assume that everyone is always trying to attack is one that miners should not take lightly. One mistake could cost them everything that their business has been built upon. This financial force could be seen as a Key Performance Indicator of the Bitcoin network.
A seat at the table
Imagine a party of miners sitting at a table. A miner that is not sitting directly at the table, and thus not well connected, collects less revenue through mining fees due to not receiving transactions in a timely manner from other miners. They also experience more orphans due to not being able to communicate the block fast enough. All of which results in a loss of revenue for that individual miner and increased revenue for all other miners.
This is an evolutionary type mechanism, described by both the red and black queen hypothesis, just the same as in biology or in economic capitalism. This is the economic effect that determines which miners will be able to compete to find blocks; if they produce too many blocks that are orphaned they will not be able to make a profit and will find that they lose their seat at the table. Once we understand what mechanisms cause miners to be tightly connected we can understand the core technical and economic properties of the system.
Both transactions and blocks are broadcast on a best effort basis. The exact mechanism used to propagate the information is not relevant to any of the core design on the Bitcoin protocol. However, it can have an effect on the core protocol if adjustments are made to Bitcoins economic protocol that might allow propagation to become more efficient, however the mechanisms proposed to increase block or transaction propagation time may not even achieve that. If propagation times are given as a reason to alter the Bitcoin protocol we must be very aware of how exactly this is achieved if anyone is asking for consensus changes primarily because the networking protocol should never need consensus altering changes. If a miner elects to use a different networking protocol and others cannot connect to them, this miner isolates themselves from the other miners.
Current and proposed methods of propagation are beyond the scope of this series as they are not protected by a consensus mechanism. It is much more like a language spoken between miners but has no effect on the way they process information they are given. Each miner can agree on different languages between themselves yet can work on the same protocol. There is no risk of one miner creating a block that is seen as invalid by some and valid by others so long as each miner has all the same information to complete the block.
As we are going over the validation process for blocks it is worth mentioning the validation process for transactions. As soon as a new transaction is seen on the network a number of conditions need to be met for it to be accepted and thus enter the blockchain. These conditions involve a verification that the signatures are valid, the input is greater than the output, unless it is a coinbase transaction in which case there is no input, and there is a valid parent transaction. If any of these conditions are not met the transaction is rejected by being flagged, kept in memory as an incident and an alert is propagated throughout the network. Keeping the transaction in memory and propagating an alert is not vital however, it may help miners spot a pattern in malicious behaviour. There is also a loop that can be used to control a miners risk level to attacks, if there is a very large transaction chain that a miner does not have and is given the final transaction first a miner may find themselves continuously requesting data from their peers. The ‘j’ parameter will allow a miner to stop this loop and black list a peer that is behaving maliciously.
The miner that is more connected and can produce blocks that are easiest to validate will find themselves at an advantage due to lower orphan rates, which again, cost the miners in revenue and profit. The opposite side of this is that the miner that is able to validate blocks the fastest will also have an advantage. Above is a simplified process which miners may choose to follow to ensure that they are on the longest valid chain for as long as possible.
A rule of this process is that the first valid block received is the one worked on. That means the block that validates first is the one that is to be considered part of the valid chain. Therefore if a block takes too long to download or validate the miner either reverts back to the previously saved block, or transitions to a competing block that is found to be valid first. One may notice that only one loop exists within this flow chart. It is this loop that miners can use to manage their risk level by setting the value of ‘k’. This is similar to the ‘j’ parameter used to protect against a DDoS attack for transactions. However, it is much more important. If this value is set incorrectly it is not just a transaction fee that is missed, but an entire block reward. If other miners accept and build upon the block just rejected by the miner under discussion, then it becomes the longest chain and work has been wasted.
It is also worth mentioning that a miner cannot produce a block larger than one that they are not able to validate as part of the building process is the act of validation. Only a more efficient or more connected miner may be able to produce a block that others cannot produce in the given time between blocks. These more efficient and resilient miners can faster adapt changing market demand for block space and are thus more competitive. They therefore may build blocks in accordance with a competitive economic strategy, in which a miner produces a large block that 51% of the network can validate whilst the other 49% find difficult to and thus fall behind.
Where are we going?
In this section we have outlined the validation process and identified two potential Key Performance Indicators (KPI) of the mining business. This KPI is a risk mitigation factor which will directly affect their profits and therefore chances of survival.
While this knowledge is not new or revolutionary, it is the underpinnings of how Bitcoin functions. Without understanding this it is difficult to have constructive conversations about the direction of the protocol. We are laying the groundwork for further more complex discussions. One may also notice that the processes above, although they are linear, allow transaction validation and tree construction to be parallelised. Chained transactions can be validated by a single thread, and the merkle tree can be built in sections. This will also be covered in more detail in the next block.
Alex Fauvel, follow me on Twitter to get notified about my next post and for the latest news and developments happening in Bitcoin cash land.
All posts are never intended to be financial advice and are for informational purposes only.
If you have any questions relating to Bitcoin Cash please get in touch at: email@example.com and I will do my best to get back to you.