MultiversX Tracker is Live!

Summary of Ethereum's new consensus protocol: Gasper

All Cryptocurrencies

by COINS NEWS 91 Views

Summary of Ethereum's new consensus protocol: Gasper

This whole post is the summary/TL;DR of Ethereum's new consensus mechanism, Gasper. If you're not "innit for the tech", the Intro section provides an even shorter summary.

I originally posted this a week ago on the CryptoCurrency_Tech sub, but I figure there might be 1-2 of you here who would be interested in this.

Intro - A TL;DR of the TL;DR

Gasper is the hybrid consensus protocol that's used by post-merge Ethereum and the Ethereum Beacon chain. It's a combination of the LMD-GHOST and Casper FFG protocols.

  • GHOST, originally used by pre-merge Ethereum, is a variation of Bitcoin's Nakamoto Consensus algorithm that allows for better fork-determination and faster block times. It uses heaviest weight instead longest chain to determine the canonical chain.
  • Casper then provides an additional deterministic-finality layer on top of GHOST. This allows the Ethereum blockchain to have additional security using permanent checkpoints every epoch.

If you have 13 minutes of time, I highly recommend that you check out Alt Explainer's Gasper video. Consensus protocols are pretty complicated to explain without animation, and Alt Explainer does an excellent job of explaining it at an ELI-15 level.

Bitcoin's Consensus Protocols

Before we begin, let's go over some simpler protocols. Most of you are familiar with Bitcoin's consensus protocol, which is a combination of Nakamoto Consensus and Proof of Work.

  • Nakamoto Consensus, used for validation and fork-determination, states that in the case of forks, the longest chain (technically, it's the highest-difficulty chain) is the canonical chain. It provides probabilistic finality. There is always the possibility that transactions will be rewritten in the future by reorganizations (reorgs), but the more blocks have been written, the higher the probability that the transaction is probabilistically final. For Bitcoin, this is generally considered by most exchange nodes to be 3-6 blocks. At ~10-minutes per block, that's a total 30-60 minutes for Bitcoin's probabilistic finality.
  • Proof of Work (PoW) is used to provide Sybil Resistance, which prevents attackers from gaining more influence on consensus by creating multiple identities. Instead influence is determined by the total hash power of the entity's miners, which can't be faked by splitting into multiple identities.
  • Byzantine Fault Tolerance (BFT) protocols are a family of extremely-fast consensus protocols used in distributed databases since the 1980s. Efficient BFT protocols are only 3-5% slower than their centralized versions when there is no network latency. They can handle faults of (n) bad nodes as long as there are (3n + 1) honest, working nodes. In other words, at least 2/3 of nodes need to be honest and working to maintain liveness, and at least 1/3 honest nodes to maintain safety/fault tolerance. Most large global tech companies use some form of BFT-Paxos/Raft or Practical BFT (pBFT) in their infrastructure. Most newer PoS blockchains use a variation of BFT for consensus, though there are some exceptions like Cardano's current version of Ouroboros.

Pre-merge Ethereum also uses PoW for Sybil Resistance. Later on, this switches to PoS, where influence is determined by the entity's total staking value instead of its total hash power. But for Consensus validation, Ethereum uses GHOST (Greedy Heaviest-Observed Sub-Tree), which is a variation of Nakamoto Consensus that provides a few optimizations.

GHOST - Ethereum's main consensus protocol

https://preview.redd.it/loqdhk8bvwm91.png?660&format=png&auto=webp&s=1e97216803ef8cc47bed9668980a6999a8c2a603

  • PoW Ethereum has 13s blocks. Because its block times are much faster, it has a much higher chance of encountering forks due to network latency.
  • To counteract the forks, it uses GHOST, which is a variation of Nakamoto Consensus that is more efficient for determining fork path. Nakamoto's longest chain rule only cares about length. (Technically, it checks the highest-difficulty chain, which for all practical purposes nowadays, is the longest chain.) Any blocks outside of the longest chain, called orphan or uncle blocks, are ignored and wasted. In the above image, Chains 1 and 3 are longer than Chain 2 even though Chain 2 has the most miners (weight) behind it. Under Bitcoin's Nakamoto consensus, this would lead to wasted mining power/influence.
  • Weight vs Length: Unlike Bitcoin's Nakamoto Consensus, GHOST uses the concept of chain "weight" instead of "length". It will add the weight of orphaned and uncle blocks to each chain during fork determination instead of wasting them. Thus in the example, Chain 2 will win under the GHOST protocol.
  • PoS version of GHOST: After transitioning from PoW and PoS, LMD-GHOST now measures weight by using the combined staking power attesting to blocks. A randomized committee of 128 validators are chosen using the RANDAO protocol at each epoch to attest to each block proposal. The chain that has the blocks with the most combined staking power behind them becomes the canonical chain. Attesting validators will also receive rewards along with the block proposer, who gets the most rewards. In addition, validators are slashed if they attempt to propose multiple blocks or double-vote on multiple chains. Slashing prevents validators from gaming the rewards system by voting on every chain for more attestation rewards.
  • The LMD part of LMD-GHOST stands for "Latest Message Driven", which just means that if multiple messages are received by a validator, only the latest one is considered.
  • Block times also reduce from 13s to 12s post-merge due to no longer having to wait 1s for mining during block proposals. Ethereum is typically considered probabilistically final in about 25 blocks (~5 minutes). That makes PoW Ethereum's probabilistic finality ~12x times faster than Bitcoin's.

Casper FFG - Ethereum's finality protocol

  • Casper FFG is a BFT-based protocol that adds deterministic finality to the block chain. It requires at least 2/3 of validators to be honest and active. Ethereum blocks are divided into epochs every 32 blocks, or 6.4 minutes. If validators agree on 2 epochs in a row, all previous epochs will considered deterministically final. Thus, it takes ~19 minutes for deterministic finality in most cases.
  • Note that unlike many other fast-finality PoS consensus protocols, Ethereum actually gathers signatures from ALL validators instead of just from a subset of them. It does this through BLS signature aggregation. Without signature aggregation, it would take 1 day to gather all the signatures.
  • Because block production is computationally-trivial in Proof of Stake (since it doesn't take much energy), there theoretically exists long-range attacks. In a long-range attack, a malicious validator could build a longer forked chain and beat out the length of the canonical chain.
  • Casper FFG provides checkpoints against long-range attacks. Blocks that reach deterministic finality are immutable, and active validators will not fall for the attack.
  • One of the minor weaknesses of Ethereum is that it has Weak Subjectivity. What this means is that new nodes joining the network and nodes that have been offline for a long time cannot objectively tell which is the canonical chain. They have to ask existing nodes and pick the one they think is correct, hence adding subjectivity.

Gasper - GHOST and Casper combined

  • Gasper is the union of GHOST and Casper. It uses GHOST as the main consensus protocol with 5-min probabilistic finality, and adds a layer of ~20-min deterministic finality with Casper for checkpoints. This is somewhat similar to Solana and Cardano in that they also have probabilistic finality with periodic checkpoints (deterministic in 80s and 5 days respectively).
  • This is much slower finality than many newer PoS blockchains like Algorand, Avalanche, Cosmos/Tendermint SDK chains, Fantom/Hedera, and Polkdaot Substrate SDK chains, and many more. But Ethereum is a multi-layer ecosystem where its Layer 2 solutions can provide fast finality. Considering that Layer 1 Ethereum is meant to be a settlement layer instead of a payment channel or Medium of Exchange, this is an acceptable balance.
  • Gasper also has protection against liveness attacks and inactivity leaks where some validators are no longer participating. After 4 epochs of inactivity, validators that are not attesting will gradually get slashed until the honest and active validators reach a 2/3 supermajority again.

Further reading:

submitted by /u/Maleficent_Plankton
[link] [comments]

Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments