What is Ethereum? – Lawshiga Thurairajasingam – Medium
Ethereum is something that open doors for new possibilities. Here, I try to bring the most that I can to paint a picture of what ethereum is. As a newbie, these are the stuff I figured out in my exploration.
So, let’s get started.
Ethereum falls into the category of software which runs on a network. The network checks that the data and small computer programs called “smart contracts” are processed in all the computers in the network. But the striking point is every node in the network is going to perform exactly the same tasks as they will have to process the same data.
The reason is computers don’t trust each other. When we talk about trust, then there should be someone in-charge to maintain that reliability and obedience in the network. But there is no such thing called central coordinator.
Ethereum is purely based on the blockchain technology. It validates, stores and replicates the transaction data in all the computers in the network. A general open ledger is maintained to record and keep track of all the transaction data. But where Ethereum overtakes bitcoin is Ethereum is capable of running codes known as the smart contracts in all the computers. For that Ethereum Virtual Machine has to be adopted in all the machines in the network.
What actually happens within ethereum is when a node or a computer gets synced in the ethereum network it can involve in a transaction, mining and validating. The only way the ether can be generated is by mining. So, the potential miner will earn ethers.
Miner can select the transactions from their transaction pool which holds the new transactions ordered in the decreasing order of its gas price. The transaction with the higher gas price is more likely to be selected for execution by the miner. So, the miner is the person who is going to decide the transactions that are going to be added in a block. And the miner assembles the transactions in a block. So, it is obvious that another potential miner can create a block with totally different transactions.
Besides, the miner needs to have a higher computing power machine. But why is that?
The reason is after a transaction is made, miners will compete to be the first to add that transaction to the block. For that, the miner has to solve a puzzle which is something flexible as it changes its difficulty once a two weeks time in order to control the number of ethers out there. What is being solved in the puzzle?
This is more like a guessing game. The node has to try different nonce to get a hash below the target hash. A nonce is a number used once and it gets incremented every time until reaching a correct nonce. The nonce will be appended with the header of the transaction and will be hashed. Once a miner finds out the matching nonce he has to keep it to broadcast to the other nodes in the network in order to validate it. That is what we call proof of work. That we are proofing our work to others.
The power consumed in the process of mining will be nearly earned by the reward allocated to the miner for executing a transaction.
What if we got forks, where more than one miner who mined and got the correct nonce at the same time. So, here the block of the miner who has a long chain will be accepted as it depends on the amount of time, electricity, and computing power spend for that. And guess what, the other miner will get rejected. Sounds unfair, right?
Hence comes to play the proof of stake where the node which has already proved its stake will get the chance of mining by staking some ethers. And the forks will not be created. Also, for other nodes no need to waste their time and electricity, and left behind with empty hands while another node gets the rewards. But what if that potential miner intends to cheat the whole network?
Oh, actually that can’t be done. Because if he tries to do so, he may want to lose all his ethers. Also, every time some portion from his percentage will be reduced to avoid having a monopolization over the network.
So, we have finished some stuff in exploring the inside of ethereum.
In the next post, we will see how to be a part of the ethereum network.