9

I have read this related question - Bitcoin without mining and I am trying to understand the very basics of Bitcoin network and the blockchain.

I wonder, if we take the mining out of Bitcoin, what would we need to implement in order to make it a working system again.

So far, I am aware of these components that rely on mining:

  • new coin generation - without mining, we would need to implement a new way of introducing new coins to the system
  • bitcoin mining is used to create and validate blocks which contain transactions that are to be included in the immutable blockchain - so, without mining, we would need to create another system of creating new blocks that all the nodes will accept (i.e. consensus)

My questions are:

  1. Is there anything else that would need to be done? In this question I assume everything else we would like to work like Bitcoin.
  2. What are the alternatives of building blockchain? If we think about Bitcoin as a currency scheme only (and disregard other aspects of having blockchain) - do we really need a chain that stores all the history? Can't we just have accounts and their balances and update them? I.e. what are the other options of solving the double-spend problem besides having a full history in a chain.
17

Mining is not essential for coin creation. New coin introduction can be tied to new block creation, or be time based. Even if you don't use proof of work, you will still have blocks (even if you don't call them that way anymore; they may be called "database updates"). More interesting however, if you don't use proof of work, you don't even need your own currency (but you still could).

Validation is done by full nodes (the "auditors"). Miners also validate, but it is not their primary function. They do so because otherwise their blocks - which indirectly provides their income - could unknowingly be invalid, and not be accepted by the rest of the ecosystem.

Mining has one and only one purpose: providing a decentralized, permissionless mechanism for determining which version of history to accept, in case there are multiple valid competing versions. These competing versions are inevitable when there is not a single party coordinating their creation. This is because communication speed across the planet is not infinite, so one may create a block without having heard about a competing block elsewhere.

So to answer your question, if we want a block chain without proof of work, the only thing you need to do is replace the criterion for choosing between different versions of history. The simplest is using digital signatures instead of proof of work. There could be a known central party that signs blocks instead of grinding a nonce, and any chain with its signature would be accepted. No more reorgs, electricity and hardware costs, confirmation times, concerns about propagation, ... the system would work better in every way possible, apart from the fact that it now needs a trusted central party who has the right to censor.

This can be extended. Instead of one known central party, there can be multiple. For example, there could be 10 known parties, and every block is required to have a signature from 7 out of those 10. This requires a significant number to conspire, but if they do, they can still censor transactions. In fact, this system is a modern incarnation of Byzantine Fault Tolerance, a distributed consensus system that long predates Bitcoin. The only downside is that there is no recourse when the security assumption (7 out of those 10 are honest) is false. In a proof-of-work setting, one can join the mining landscape in that case, even without telling anyone else.

  • Thank you for a detailed explanation. I wonder if mining is there only to choose the version of history to accept, why can't we use some kind of simple deterministic approach to say which is better? And if that is not possible, could a centralized RNG be of any help? – Wapac May 29 '16 at 7:27
  • If you accept centralization, why even bother with an RNG. In a centralized setting, there won't be any conflicting versions of history to choose from. Just accept the one that comes from the central authority. – Pieter Wuille May 29 '16 at 7:35
  • OK, could you please comment the deterministic selection for choosing the "right" chain? – Wapac May 29 '16 at 7:43
  • In a centralized setting, there is only one chain. You have a single party (or group of parties) deciding what goes in. Whatever they tell is in the chain, is in the chain. – Pieter Wuille May 29 '16 at 10:02
  • That part was meant in decentralized environment - i.e. why can't we replace Bitcoin's mining with a simple deterministic approach. Is that because there is no such algorithm known that would be able to decide that and at the same time be secure against the various kinds of attacks? – Wapac May 29 '16 at 10:05
2

Background

What bitcoin does is maintaining a distributed ledger in which transactions are stored. Simplified, you will get a huge table like this:

From  |   To   |   Amount
------+--------+----------
 SYS  |  A     |      100
 SYS  |  B     |      100
 SYS  |  C     |      100
 A    |  B     |       50
 C    |  B     |       50

Coins come into the system when they are conjured up out of thin air and transferred to some account holder. The first three transactions in the table above represent A, B and C each receiving 100 coins from the system. From there on, both A and C transfer half of their coins to B. So now we can infer that A and C both have 50 coins, while B has 200.

Double spending and Forks

If C now would try to send 100 coins to A, the transaction should be denied as invalid, because C does not have enough coins. But here comes the tricky part. What if the node processing this new (invalid) transaction had not yet received the last update? In other words, what if it had not yet seen that C transferred 50 coins to B already? It would not be able to say the transaction was invalid and so it would accept it.

This is a fork. The system processing the invalid transaction now has a different ledger from the rest of the world:

From  |   To   |   Amount
------+--------+----------
 SYS  |  A     |      100
 SYS  |  B     |      100
 SYS  |  C     |      100
 A    |  B     |       50
 C    |  A     |      100

In distributed systems, even if no one is dishonest, such forks will happen all the time. Because the time it takes for a transaction to propagate to all the nodes in the network will differ for each node, everyone will have a slightly different view of the order that those transactions happened in. But that order can be critically important, as we saw above. So who is right and how to get everyone to agree on that?

Consensus through Proof of Work

First the question of who is right. Is there even an objective order of transactions? General Relativity suggests that actually, there is not. So which order of transactions we accept is actually not that important, as long as all nodes agree on it.

So how to get them to agree? This is where consensus through Proof of Work comes into play. Each node processing transactions encodes it's view of reality (the order of transactions it thinks is correct) into a block and then solves a cryptographic puzzle, attaching the answer to the block. The role of this Proof of Work is that it acts as a collateral; the processing node had to do work, which means spend real-world money, to create that block. This means it has a stake in that block being accepted. If the block is not accepted, the work will have been done for nothing. This creates an economic incentive to 'do the right thing'. If you do the wrong thing, chances are you will end up having done work for nothing, unless you can get the other nodes to accept your wrong version of reality.

The whole thing is a race. Only one version of reality can be accepted for each block in the chain, so the first miner to solve the puzzle and produce the next block has the biggest chance to win the price. But at the same time, miners receive new blocks from other miners. Multiple blocks with multiple versions of reality. The miner has to pick which of these blocks to accept and use as the base for mining the next block. If it picks wrong, it looses the work invested in mining the wrong chain.

So, accept a wrong block and loose the work done on mining that chain, unless most other nodes also accept that wrong block. Create a wrong block and loose the work done mining that wrong block, unless you get the other miners to accept your wrong block.

Blockchain without miners

I don't think it's possible. 'Miners' is just a term used to describe 'transaction processors'. A blockchain needs processors whichever way you cut it I think.

Blockchain without Proof of Work

It seems to be possible. People are looking at Proof of Stake as an alternative. In that scenario, 'miners' wouldn't need to solve a cryptographic puzzle, but they would need to 'put their money where their mouth is', so to say. Again, this creates a collateral which acts as an economic incentive to do the right thing.

One very subtle thing here is that, although the idea to use the very coin people are mining as the collateral is very intruiging, I'm personally not yet sure whether it wouldn't actually create one big circular reasoning cycle. Because in different forks (different views of reality), the coin may actually have different value... so how to objectively decide what the stake actually is. The subtle genius of Proof of Work is that the work is done in the real world, so the stake is in the one common reality we all share. Meaning it's the same no matter what version of reality the ledger you are looking at contains.

It's a very intruiging question you asked. I hope my answer helps your understanding and I have to add I am not an expert in the field at all so I may have made mistakes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.