How does Ethereum blockchain work?

What is blockchain?

In short, it’s a distributed registry. It is an ever-growing database filled with certain information and has the following properties:

  • If data is recorded in a blockchain, it cannot be changed or deleted. Each entry remains in the database forever.
  • There is no single organization that supports and governs a blockchain. This is done by thousands of users, each of whom has its copy of the registry.

Inside of Ethereum blockchain

In the Ethereum network, a new block is created every 12–15 seconds and then saved forever in the blockchain. The data is then updated for all network nodes and cannot be changed by anybody from that moment on. Only a correct block is written to the blockchain.

What is block hash?

A hash function is a mathematical function that works as an encoder. It converts any data string in such a way that it is impossible to know the original value from the result. The result of processing a hash function is called a hash or hash sum.

The power of smart contracts

Imagine you’re making a bet for $100 about tomorrow’s weather with your pen-friend: he thinks tomorrow will be sunny and you think it’s gonna rain. The loser must give the winner $100. How do you guarantee that the loser will keep his word? Three ways come to mind:

Mutual trust

The easiest thing to do would be to rely on each other’s honesty. However, since you do not know each other and have never met in person, and the amount is not small, it is better to resort to a more reliable method.

Signing a formal agreement

It would seem that a solution has been found: you sign a formal agreement obliging the loser to pay the declared sum to the winner. You assure him and he calmly places his bet. In practice, in case of a conflict between the parties, you will spend a lot of time on trial and a lot of money on lawyers, which will make the whole process too long and expensive.

A trustee

And the third option — you could find a “common friend”, a reliable person, whom you both trust. The next day, he’d look out the window and give $200 to the winner. It’s as simple as that. But what if the trustee decides to steal the money?

What is gas?

A person using a smart contract must pay the system for the operation. The recipient of this payment is a node that uses its memory and electricity to execute a smart contract. Each action inside a smart contract has its own price. For example, you will have to pay a certain price if you want to take up some memory space of the node.

  • Bringing it to the end and completing the algorithm;
  • Lack of gas.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jeffrey Hancock

Jeffrey Hancock

Blockchain enthusiast developer and writer. I love video games, blockchain and the hot symbiosis of these two worlds.