Sites Inria

Version française


Jean-Michel Prima (*) - 30/08/2018

Improving Bitcoin... with forks

Emmanuelle Anceaume Emmanuelle Anceaume

Created 10 years ago, Bitcoin allows secure and anonymous payments without going through a bank. The new currency is based on a particularly well-design mechanism called a blockchain. A mixture of cryptography and distributed architecture, this tamper-proof registry guarantees the validity of successive transactions. But problems are arising: the computing cost is soaring. Energy expenditure as well. It is also impossible to manage a large number of transactions per second. Specializing in peer-to-peer (P2P) networks, researcher Emmanuelle Anceaume, from Rennes, proposes two new innovations to enable it to transition to another scale.

Four nuclear reactors working flat out. That’s 60 TWh per year. That’s how much electricity is now needed to compute the operations to produce and trade Bitcoins. Quite apart from the bandwagon and speculative yoyo effect, the crypto-currency invented by the mysterious Satoshi Nakamoto is gaining ground. The volume of trade is now reaching the equivalent of 6.5 billion Euros per day. This indisputable success also highlights the youthful shortcomings of the blockchain, a tamper-proof registry that makes it possible to record transactions in data structures called blocks. With some variations, the same technology is also used by dozens of other currencies that are flourishing in the wake of Bitcoin. Whether it’s Ether, Ripple, Iota or Neo, they all use blocks that attach to one another over time.

And therein lies the rub.

To create these blocks, it is necessary to solve a problem, ” explains Emmanuelle Anceaume , CNRS researcher for Cidre, a cybersecurity team formed by CentraleSupelec, Inria, the CNRS and the University of Rennes. “Finding the solution is not complicated, but it requires a lot of computing power. The amount of power needed continues to increase.’ In Bitcoin, the difficulty is updated every 2 weeks to ensure the creation of a block every 10 minutes on average. ‘In the beginning, everyone could plug in their computer and become a miner, that is, try to solve the problem, build a block and thus earn money. ” Currently the compensation is 12.5 Bitcoins per block. “But mining is no longer within the reach of the individual. Unless they are extraordinarily lucky, they will never manage to create a block. In practice, it has become the business of huge specialised farms. ” Thousands of battery machines, and a breath-taking electricity bill.

Limited size

With the increase in the number of trades, business is getting tougher. “The blocks have a finite size: 1 MB. So, you cannot insert a lot of transactions. In addition, for the system to work, it is also necessary to avoid there being too many competitively mined blocks because they will have to be aligned one behind the other in the chain. ’ While waiting for the validation of a block, several branches can be formed downstream. But only one will survive. It is up to the miners to choose the right one. "There is one rule: we keep only the longest chain. In practice, if one block is followed by six others, it has a very high probability of staying in the chain. ” To be registered in the chain, the new block must have no defects. “We calculate a Merkle tree, that is to say a cryptographic footprint of all the transactions it contains. If some wise guy tries to change one, it will alter the block's footprint. As a result, it will not be validated. ” Bad choice for the miner. The transactions will then go to other blocks in creation. “For everyone, there is a financial incentive to behave well. It's the beauty of the system. ” However, with its current architecture, Bitcoin can only absorb about 7 transactions per second. “It's not a big deal. This is because the blocks are small. Moreover, as I said, we must prevent too many blocks appearing simultaneously: that’s too complicated to manage. Hence the importance of the ratio between the time of creation of a block, and the time of diffusion of the information. The system requires the creation time to be very long compared to the broadcast time. So, we're stuck. If we increase the size of the blocks, it doesn’t work very well. If we increase the creation frequency, it does not work either because we decrease the ratio. This ratio must remain very high."

From the blockchain to the blockgraph

So, what can be done? “Allow forks. ” This is the concept introduced by a new algorithm called Sycamore. “When there are too many transactions, we will allow the chain to divide and create two separate blocks, each on a line. So, we double the capacity. We can even quadruple it, and so on, by multiplying these forks as much as necessary. But, at the same time, we make sure that no transaction can be in two blocks at a time. Obviously, this chain is no longer one. It is now a graph. ” This research also aims to “make sure that trust is not based solely on the miners. Today, they are in a hegemonic position. We want to keep them but encourage users like you and me to participate in the system, a little, by validating transactions on blocks. "

Structured P2P network

In this context, the second innovation concerns the peer-to-peer network underlying the blockchain. “There are two types of P2P network. The first is known as ‘unstructured’. Each node connects to neighbours at random. This is the case with Bitcoin, and it works well. The second type of network is called ‘structured’. Here, the nodes are organised within a mathematical structure that respects certain properties: a ring or a hypercube for example. And that's what we will do. We are going to reuse PeerCube, a hypercube we designed a few years ago. Each of its vertices consists not of a single node but of a group of nodes that are logically close to one another. Even if a malicious node slips into the group, the structure is ensured. It will withstand, which is important because we want to use these groups of nodes to validate part of the transactions using consensus algorithms. " The experiments are conducted on Grid'5000, Inria’s scientific computing grid. “We take real Bitcoin transactions and recalculate them using our graph. The first results show that our system passes the scale very well. We gain an order of magnitude in the number of transactions processed. Conversely, the necessary computing power is greatly reduced. We are about to ask Inria to finance a Technological Development Action (TDA) to recruit an engineer to implement the integration of these two prototypes, PeerCube and Sycomore, then the industrialisation of the code. We hope to have a demonstrator within a year.

Keywords: Emmanuelle Enceaume Forks Sycomore Bitcoin PeerCube INRIA Rennes - Bretagne Atlantique CIDRE Cybersecurity ADT