Ethereum’s Solidity & Consensus Mechanism

Ethereum’s move toward proof-of-stake (PoS) ETH2 was demonstrated on a testnet in October 2021 and is expected to be implemented on the mainnet this year.

Like Bitcoin, Ethereum also uses a proof-of-work consensus mechanism. Miners collect transactions for a block, aggregate them cryptographically, and then have to try quintillions of different numbers, called nonces, until the resulting hash has a certain number of leading zeroes. While Bitcoin uses the industry-standard SHA256 algorithm, Ether miners compute “Ethash,” a slightly altered version of the SHA3-256 and SHA3-512 algorithms.

It is much harder to build application-specific chips (ASIC) for Ethash, so the ASIC arms race never happened on Ethereum. Instead, miners use high-end graphics cards (GPU) like the Nvidia RTX 3090. Miners’ insatiable demand led to Nvidia implementing a throttling switch when cards detect mining workloads, so gamers could afford GPUs.

Figure: MSI Nvidia RTX3090 graphics card, typically used for Ethereum mining

Source: msi.com

Solidity — Ethereum’s programming language

Vitalik Buterin wanted to allow developers the freedom to run everything they could dream of on top of the blockchain and create a massively distributed system. He called Ethereum the “world computer” because miners worldwide would execute programs.

Bitcoin has a programming language called Script that has limited functionality. Ethereum’s language needed a complete instruction set to give developers more freedom.

Gavin Wood, who later founded Polkadot, was the first to implement a working version of Ethereum and developed Solidity as Ethereum’s language. Later, another language called Vyper was introduced. (Smart contracts can be written in both.)

Since miners run different hardware, Solidity compiles to so-called bytecode, executed by the Ethereum Virtual Machine (EVM), abstracting the hardware layer. This way, a developer doesn’t have to worry about what machine a miner will run. The EVM takes care of that.

Solidity is easy to read and is quite similar to JavaScript in the way the code looks, although it has several fundamental differences — e.g., more stringent variable data types.

With a TVL of more than $160 billion and thousands of projects, the need for improved performance has become critical. We will look at the full extent of the performance currently required in another article next week.

This article is an extract from the 80+ page Scaling Report: Does the Future of Decentralized Finance Still Belong to Ethereum? co-published by the Crypto Research Report and Cointelegraph Consulting, written by ten authors and supported by Arcana, Brave, ANote Music, Radix, Fuse, Cryptix, Casper Labs, Coinfinity, Ambire, BitPanda and CakeDEFI.