Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> deploy for free, run indefinitely with zero downtime

So who actually pays for the runtime - is it the work the miners do? If not, what is the mining work used for exactly?



The mining work is used to prove that a certain amount of computational 'work' was done. This work takes a predictable amount of time (in aggregate), and because of that, it can be used as a way to timestamp transactions in a globally serializable way, even in the face of malicious adversaries.

Consider a block chaining system without proof of work: I want to send some bitcoin so I broadcast a signed message to the network saying "send 10 bitcoin to dandare". But let's say I also send another message to the network saying "send 10 bitcoin to <my other address>" at the exact same time.

Now what happens is the chain forks. Some people consider transaction #1 canonical and some people consider transaction #2 canonical, but they can't both go in the same chain because they conflict. So now your blockchain has a split at the end of it, how do you decide which one is the real one?

Well, everyone in the network is incentivized to add their transactions to the 'real' chain, because obviously everyone wants their own transactions to be real. So if either chain gets a small edge in 'realness' everyone will pile into that one, looking out for their own self-interest.

In the absence of proof of work, no chain ever becomes any more 'real' than any other, because there is no effort in adding to the chain. Me with just my laptop can keep extending the one that I want to win indefinitely, and roughly 50% of the time it'll come out how I want.

Proof of work solves this, by making the network 'invest' computational effort to extend a chain. Because it takes enormous computational resources, no single actor can significantly or reliably influence which chain is going to win. And as each additional block is chained on after the one containing a given transaction, it becomes exponentially more difficult for another 'side chain' to catch up.

This means that if you wait until about 3 blocks after the transaction I sent you, you can have a very high degree of confidence that the chain you are looking at is and always will be the canonical bitcoin blockchain. In order for that to become untrue, someone would have to find two consecutive solutions to the proof of work problem in the same time it takes the entire bitcoin network to find 1.


The miners do two things: run your code, and come to a consensus on what transactions happen on the database, in what order.

The consensus work is expensive, and we pay them for it mainly by minting new coins. In effect we're taxing all the coin holders by inflating the currency.

To run a specific transaction, you pay a transaction fee, which also goes to the miners. They could just ignore our transaction, so we pay them a little to run it.

So basically it's the users who pay the running costs of an application. Every time they call a method in a script, they have to include a small payment to the miners.

Generally these payments are pretty small but as computers go, Ethereum is a very expensive one, since every operation or stored byte is replicated on thousands of computers. You're not going to be doing a lot of computation or storing bulk data. But simple business rules are easily affordable.


That's how I always understood it. Miners machines do all the operations and for this they are rewarded with bitcoins.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: