1

I have recently become interested in crypto and after much reading on Ethereum I still have three burning questions that perhaps some of you can help with. Apologies in advance as some of these might be extremely basic and/or make little sense due to some misconceptions I might have. Here they go:

  1. I understand that, when running code on the Ethereum network, transaction fees are paid in gas. Are these fees paid directly to those who commit their computational resources to running this code? Are these people what you call “miners”?

  2. If the answer to the above is yes, why does new Ether have to be created to reward these miners at all? Aren’t they getting rewarded by the fees?

  3. When people talk about Ethereum moving from PoW to PoS, how exactly would PoS help in running these smart contracts? I was under the impression that under Ethereum’s PoW, miners commit their resources to running smart contracts, so who would run these under PoS?

Thank you!

  • I find that the best way to clear up confusion about these sorts of fundamental questions is to read the original bitcoin whitepaper. It is relatively accessible and really is critical to understand. Often people jump into Ethereum with this vague notion of a "world computer" and fundamental misunderstandings about the purpose of a blockchain that could be cleared up by going back to basics. – Tjaden Hess Jun 9 at 20:03
3

Your questions hint at some conceptual confusion. Fairly common misunderstandings.

"Consensus" is not about the results of transactions or contracts. It's mainly about disambiguating transaction order. With deterministic contract functions (they are) and an agreed transaction order (consensus), each node runs transactions for themselves. They rely on no one else for their conclusions about the world state.

I understand that, when running code on the Ethereum network, transaction fees are paid in gas. Are these fees paid directly to those who commit their computational resources to running this code? Are these people what you call “miners”?

No.

PoW requires an incentive to encourage people to devote resources to the consensus process that helps secure the network. In PoW, the transaction fees are paid to the miner that finds a solution to a block. This is a competitive, adversarial process that uses the brute force of combined computing power to raise the threshold of raw power required to alter the course of the network.

Everyone (all full nodes) runs all transactions.

If the answer to the above is yes, why does new Ether have to be created to reward these miners at all? Aren’t they getting rewarded by the fees?

The answer is No, but this deserves clarification. They are being rewarded with mining rewards to find blocks while the transaction fees per block are relatively low (zero, at the start). Mining rewards have been and will likely be reduced over time, possibly to zero, when transaction fees are sufficient to motivate a robust mining network.

As you know, PoW is slated to be replaced by PoS that will change the arrangement entirely.

When people talk about Ethereum moving from PoW to PoS, how exactly would PoS help in running these smart contracts? I was under the impression that under Ethereum’s PoW, miners commit their resources to running smart contracts, so who would run these under PoS?

PoS and PoW do not help with running contracts. They collapse the ambiguity of transaction order. Transaction order is ambiguous because network latency ensures that nodes learn about pending transactions in different orders. Since no one's clock is any more trustworthy than anyone else's, and since a centralized time source would be a single point of failure (contrary to the idea of a decentralized system) another method is required to establish a consensus about the agreed transaction order.

PoS, PoW, et al, do not attempt to establish a correct order in temporal time. They are methods of reaching an agreement, a.k.a. consensus, about the de facto, canonical order. The blockchain is well-ordered set of blocks with each block containing a well-ordered set of transactions. In all, it is a well-ordered set of transactions. It is not the order the transactions were sent. It is the order the transactions were accepted and processed, and all nodes must process the transactions in this order to synchronize with the network.

With an agreed order of inputs and deterministic functions, each node is then able to construct, for itself, the world state. Each node runs each transaction in order the transactions were accepted by the network, per the consensus protocol.

It's somewhat similar to using a change log to reconstruct a copy of a database. It's not necessary to have a copy of the state if one has a well-ordered log of changes to the state.

PoW itself is a deliberately inefficient method, by design. It has certain properties such as blocktime, meaning annoucements about new blocks will arrive, on average, at a certain pace. It is not the only way to reach a consensus about the order of transactions. Alternatives make various tradeoffs, usually in favor of reducing waste, increasing speed and capacity and with different arguments about how the algorithm attempts to discourage centralization.

Non-miners/verifiers/minters are not really assisted in terms of actually running the contracts, but the network itself could, for example, go much faster if the blocks arrive at a faster pace or contain more work per block.

Have a look at this for a conceptual overview: https://www.youtube.com/watch?v=Za5lPKNV_Mk

Hope it helps.

  • 1
    "Consensus" is not about the results of transactions or contracts. It's mainly about disambiguating transaction order." This should be plastered on the top of every blockchain-related website – Tjaden Hess Jun 9 at 19:58
  • Thanks. You made my day. :-) – Rob Hitchens - B9lab Jun 9 at 20:07
  • Thanks very much for taking the time to explain! – Álvaro Prat Hernando Jun 10 at 20:33

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.