Logarithmic Rex
Logarithmic Rex

@LogarithmicRex

23 Tweets Dec 08, 2022
(1/22) @ethereum Consensus
A guide to the process The World Computer uses to coordinate, execute and secure itself.
Including Proof of Work (PoW), Proof of Stake (PoS) and The Merge.
(2/22) Previously, we discussed the essential components of a computer: processor, memory, storage and user interface.
(3/22) We used this as a metaphor to describe @ethereum as The World Computer
- Processor: Ethereum Virtual Machine (EVM)
- Memory: Mempool & EVM’s current state
- Storage: the Ethereum blockchain
- UI: @MetaMask
…And then there was this thing called consensus.
(4/22) We hand-wove through it last time, but it’s time to dive in.
@ethereum exists from the union of 3 things:
- the EVM
- the blockchain
- the network of nodes
A node is a real computer that runs software to both execute the EVM and produce the blockchain.
(5/22) As The World Computer executes transactions, it records the changes in the EVM and reports it as a block.
Each node is executing this process locally, coordinating with the network and progressing in lockstep.
Let’s examine how.
(6/22) We begin with the blockchain, from which the EVM can load everything into memory. From there it can begin transacting.
Potential transactions are chosen from the mempool and bundled together. The EVM then executes all bundled transactions, producing a potential block.
(7/22) The potential block is then sent to the network. The other nodes inspect and approve the potential block, adding it to their copy the blockchain
The network must maintain uniform execution across tens of thousands of nodes. All must progress together, one block at a time
(8/22) Consensus is the process by which all the nodes coordinate, stay in sync and create economic security.
Currently, the @ethereum network uses Proof of Work (PoW) to coordinate. However, soonTM Ethereum will transition to Proof of Stake (PoS).
ethereum.org
(9/22) Today, nodes (miners) compete to solve puzzles generated by the current state of the blockchain.
The first miner to solve the puzzle broadcasts the block they produced to the network, who add it to their copy of the blockchain.
Then everyone begins on the next puzzle.
(10/22) Read about Ethash to learn more about these puzzles.
Just know that they are difficult to solve but easy to verify. Even with endless processors dedicated to each puzzle, it takes ~15 seconds to solve!
(in computer years that’s HUGE)
ethereum.org
(11/22) Importantly, the way this system works is winner take all. Only the first miner with the correct solution is rewarded. Every other node discards their work and starts on the next one.
Not only is everyone else’s effort trashed, it’s responsible for all that energy waste.
(12/22) There are pros and cons to PoW. It served its purpose well for the early years of @ethereum.
Anyone can plug in their computer and start mining $ETH, distributing it broadly. Over time, the competition has grown so fierce that only massive pools can win.
(13/22) As we approach The Merge, signifying @ethereum’s switch from PoW to PoS, we must remind ourselves that this has been the vision from the beginning
@VitalikButerin was posting about Ethereum’s “PoS war chest” back in 2014, before Ethereum launched
ethereum.org
(14/22) PoS begins with a commitment by every node (validator): “I will play by the rules.”
But this is the internet, we don’t rely on promises from anonymous IP addresses. @ethereum PoS requires a pledge of collateral.
Something at stake.
(15/22) In PoS, a validator is chosen at random, becoming the block producer
The block producer chooses transactions from the mempool (or elsewhere), constructs a block and sends it to the network
Validators attest to the validity of the new block, adding it to the blockchain
(16/22) Proposals are rewarded with a lot of $ETH, attestations with a little
The network is made of nodes, each of which can support multiple validators. A validator has exactly 32 $ETH at stake
Deploying more validators means a better chance to be selected as block proposer
(17/22) PoS is more complex and less battle-tested than PoW, and has taken many years (and attempts) to get right.
However, it has considerable advantages, especially in regards to decentralization.
(18/22) My favorite analogy is a running race.
PoW is a brutal competition between every athlete, from little Jimmy to @usainbolt. 1st gets the prize, 2nd-last get nothing.
PoS is an agreement to take turns and to share the winnings, enforced by a claim on your bank account.
(19/22) PoS also unlocks important technology and economic possibilities
L2s become supercharged by PoS from updates like sharding
And the economic benefits produced by @ethereum are not only accessible to more people, but also available for De-Fi via assets like $stETH & $rETH
(20/22) In summary, while @ethereum is about to finish a transition of consensus mechanisms, both provide the same role: network coordination and economic security.
PoW was for bootstrapping, PoS is for institution building.
(21/22) The Merge is just around the corner.
Ropsten has merged. Sepolia has merged. Only Goerli left… One more testnet to go!
If all goes well, we could have PoS @ethereum by Halloween 🎃
decrypt.co
(22/22) @ethereum is The World Computer, native to the internet.
The EVM and the blockchain speak to The World Computer. Consensus systems speak to internet native, coordinating trustlessly and progressing in unison.
The future is in the applications you build on top of it!
Like what you read? Help me spread the word by retweeting the thread (linked below).
Follow me for more explainers and as much alpha as I can possibly serve.

Loading suggestions...