图解ETHPoS共识机制Gasper:合并后的以太坊是如何工作的?

区块律动Published on 2022-10-14Last updated on 2022-10-14

Abstract

众所周知, PoS 以太坊的共识协议是「Gasper」,它是在 LMD-GHOST( 分叉 选择规则)之上应用 Casper FFG(最终性确定工具)构建的。

众所周知, PoS 以太坊的共识协议是「Gasper」,它是在 LMD-GHOST( 分叉 选择规则)之上应用 Casper FFG(最终性确定工具)构建的。所以要想搞清楚完整的以太坊共识协议,就必须了解这两个部分(Casper + Ghost)。此外,这些设计真的很有趣。我打算梳理一下这两个协议的背景和演进,以及它们简单的工作流程。

PoS 共识算法的三大流派如下:

1.Nakamoto-inspired(Peercoin)

2.PBFT-inspired(Tendermint、Casper FFG)

3.CBC Casper

Nakamoto-inspired PoS 是一种基于链的算法,模拟在 PoW 中挖矿。它通过伪随机选择验证者来创建新区块。其在 2012 年的「Peercoin」论文中首次提出,peercoin 是基于权益证明共识的第一个加密货币。

PBFT-inspired(即 BFT-style)PoS 基于多年对拜占庭容错(尤其是 pBFT)的研究。在 2014 年的「Tendermint」论文中首次提出。一般来说,这些算法会选择一个代表账本规范交易的唯一链。

Casper 直接继承了 BFT 算法(更精确的是 pBFT),做了一些修改。CBC Casper 是由 @VladZamfir 提出的,有一些很好的资料可以更充分地解释它。

V 神的 CBC Casper 教程

VladZamfir 写的 CBC Casper 历史

CBC Casper 介绍视频

虽然以太坊最终选择了 Casper FFG 而不是 CBC Casper,但对 CBC Casper 的研究也很有价值,比如满足以太坊需求的分叉选择规则「LMD-GHOST」。Casper FFG 由 V 神和 Virgil Griffith在 2017 年提出,引入了 justification 和 finalization 的概念,并引入了 slashing conditions 和动态验证者机制,这些都是非常重要的特性。

Casper FFG 用于保证「最终性」(也就是安全性),这在 PoW 中是不存在的。简单来说,每个验证者都会对检查点进行投票,经过两轮投票后,检查点将被「最终确定」(第一轮为验证,第二轮为最终确定)。

所有最终确定的检查点都成为规范链(区块链历史的一部分),所有忠诚节点都同意他们永远不会逆转这条链。「最终检查点」之后的区块可以随意分叉,但之前的区块不允许分叉。

Casper FFG 除了通过「最终性」来保证区块链安全外,还引入了 slashing 条件来惩罚所有违反规则的验证者(这在传统 BFT 算法中是做不到的),所有违反规则的验证者都将被跟踪和惩罚。

除此之外,Casper FFG 是无需许可的(传统的 BFT 算法是需要许可认证的),pBFT 通过一个列表来维护共识,只有列表中的人才能成为参与者。Casper FFG 构建了动态验证者机制,所有验证者可以自由进出。Casper FFG 用于保证「最终性」和「安全性」,负责确认区块的最终状态,但不负责创建新区块,所以它需要底层区块链和分叉选择规则。

以太坊使用的分叉选择规则是基于 GHOST,该规则最早在2013 年的一篇论文中提出。2017 年,@VladZamfir 在 CBC Casper 工作时,他尝试将 GHOST 与 Casper 结合,产生了一个变种「LMD-GHOST」。

区块链允许分叉,当出现不同的分支时,应该选择哪条链继续添加后续新区块,需要分叉选择规则。PoW 使用的是最长链规则。思路是锻造最长的链需要最多的算力,所以这条链是最可信的。所以当所有矿工添加新区块时,他们会默认在最长的链上添加。

GHOST 的思路与此类似,其选择票数最多的链而不是高度最长的链,LMD-GHOST 做了一些修改,只考虑最近的投票(即所谓的「Least Message Driven」,LMD)。

LMD-GHOST 的规则很简单:

- 从创世区块开始;

- 每次有分叉,选择票数多的分支;

- 重复,直至找到 block leaf;

- 返回链的头部;

这是 Casper FFG 和 LMD-GHOST 的演变以及它们如何工作,它们共同保证「安全」+「活性」。LMD-GHOST 允许提议者随时创建新区块,新区块将按照分叉选择规则(即活跃度)添加到权重最大的链上。虽然 Casper FFG 将根据所有验证者的投票(两轮,超过 2/3,按存款)最终确定一个规范链。所有忠诚节点默认接受规范链,从而获得安全。

共识真的很有意思,以太坊对 PoS 的研究始于 2014 年,2022 年完成了合并。这是一条漫长而曲折的道路,过程中诞生了许多奇妙的想法、设计和工程。

Trending Cryptos

Related Reads

Semiconductor Stock Rebound: Is the Technical Correction Over or a Trend Reversal?

The core of recent semiconductor stock volatility is not about daily price swings, but rather the market questioning whether AI-driven semiconductor pricing has entered a new phase. Following a sharp sell-off in Korean stocks on June 23rd, led by Samsung and SK Hynix, a subsequent rebound is seen more as a technical positioning adjustment rather than a confirmed trend reversal. The key variable is HBM (High Bandwidth Memory), essential for AI chips. Its supply-demand imbalance granted memory makers significant pricing power. The current market focus is on whether this dynamic remains strong enough to justify elevated valuations. All eyes are on Micron's upcoming earnings report. The critical factor is not whether results meet already high expectations, but whether the company's guidance confirms that AI memory pricing power, order visibility, and future margins are still expanding. Micron's outlook will serve as a crucial test for the broader AI semiconductor chain, including Samsung, SK Hynix, and other infrastructure players. The recent bounce appears to be a pre-earnings positioning repair. For it to evolve into a sustained uptrend, concrete evidence is needed that the AI infrastructure expansion cycle's fundamentals—particularly for high-end memory—remain robust and can continue to surpass elevated market expectations. The risk is that strong demand alone may not be sufficient if future guidance hints at peaking momentum or increasing supply-side pressures.

marsbit14m ago

Semiconductor Stock Rebound: Is the Technical Correction Over or a Trend Reversal?

marsbit14m ago

Global Tech Stocks Plunge: Another Stress Test for the AI Bull Market

Global tech stocks plummeted in a sharp selloff on June 23, with South Korea's KOSPI index crashing nearly 10%, triggering a trading halt. The plunge was led by semiconductor giants Samsung and SK Hynix, dragging down major Asian and US tech indexes and levered ETFs. The immediate trigger was a confluence of three signals within 24 hours: 1) reports that SK Hynix was slowing HBM4 expansion, raising doubts about a key AI chip bottleneck; 2) profit-taking ahead of Micron's earnings report after its massive year-to-date rally; and 3) a warning from Korean regulators about the risks of single-stock leveraged ETFs. The selloff's severity was amplified by Korea's uniquely leveraged market structure: record-high retail margin debt, over $30 billion in volatile single-stock leveraged ETFs requiring daily rebalancing (which creates selling pressure during declines), and the surprising shift of the National Pension Service from a net buyer to a net seller. The event reignited debates about an AI bubble. Analysts differed on timing—some warned of imminent rupture, others saw a temporary liquidity-driven correction—but agreed that sky-high valuations, a shift to retail/leveraged buying, and rising rates created a fragile setup. The parallel steep drop in SpaceX's stock, alongside its massive debt raise for AI infrastructure, underscored a broader market shift from narrative-driven "infinite imagination" to a "return on investment" calculation phase. All eyes are now on Micron's upcoming earnings report, seen as a key test for the AI hardware trade's fundamental logic. A strong report could stabilize markets, while a miss could validate deeper fears. The episode serves as a stark warning: when a bull run becomes dependent on leveraged bets on a single narrative, a violent and rapid correction should not be a surprise. The core question for investors is how much drawdown they are willing to tolerate to stay invested.

marsbit16m ago

Global Tech Stocks Plunge: Another Stress Test for the AI Bull Market

marsbit16m ago

Ethereum Foundation Cuts 20% of Staff, 54 Depart: The Survival Logic Behind the Restructuring

The Ethereum Foundation (EF) has announced a major restructuring, resulting in the departure of 54 staff members, representing approximately 20% of its workforce. This reorganization is not merely a cost-cutting measure but a strategic refocusing. The EF will now concentrate its resources on what it deems critical and unique tasks, structured around five new operational clusters. The new structure comprises clusters dedicated to: the Protocol Layer (ensuring Ethereum's core properties like censorship resistance and security); the Access Layer (enabling trusted, non-intermediated user interactions); the User Layer (grounding decisions in real user needs and constraints); the Community Layer (representing EF's stance and building alliances); and the Institutional Layer (engaging with enterprises, governments, and academia to promote principled adoption). The foundation stated that the layoffs were a difficult but necessary step to align its organization and spending with its long-term mandate, insulating its core work from short-term market fluctuations. Affected employees were offered a severance package and transition support. The restructured EF emerges as a leaner and more focused organization, poised to prioritize the development and preservation of Ethereum's foundational promise of self-sovereignty. Further details on the new operational model are expected in the coming weeks.

marsbit18m ago

Ethereum Foundation Cuts 20% of Staff, 54 Depart: The Survival Logic Behind the Restructuring

marsbit18m ago

Talking About Returns But Not Collection? Goldfinch's Liquidation Sounds the Alarm for RWA Credit

Goldfinch, a crypto lending platform connecting investors with real-world borrowers, has proposed a full wind-down via governance proposal GIP-87. The plan would halt all new development, shut down its flagship Goldfinch Prime product, and allocate 150,000 USDC to manage the collection of outstanding loans. While the proposal is under community vote, it highlights a critical shift for the RWA (Real World Asset) lending sector: the transition from a growth phase focused on yields to a difficult recovery phase focused on collections. The proposal reveals that while the protocol's on-chain TVL is low, it still holds tens of millions in active, non-performing loans off-chain. This gap underscores that tokenizing debt makes tracking exposure transparent but does not simplify the offline, labor-intensive, and legally complex process of loan recovery. The case of the Lend East pool, where only an estimated 42% of a $10.15 million loan may be recovered, exemplifies the potential for significant investor losses. The wind-down plan forces token holders to govern not expansion but the maintenance of a debt collection system, including funding legal trust structures and preserving user access for repayments. This move starkly contrasts with the sector's typical narrative of rapid, AI-powered underwriting and high yields, exposing the often-overlooked necessity for robust borrower vetting, standardized disclosure, and sustainable collection mechanisms. Ultimately, Goldfinch's situation serves as a crucial stress test for the entire RWA lending space. It demonstrates that a platform's true resilience is tested not during capital deployment but during the protracted, costly, and uncertain process of recovering defaulted loans from real-world borrowers, a challenge blockchain transparency alone cannot solve.

Foresight News23m ago

Talking About Returns But Not Collection? Goldfinch's Liquidation Sounds the Alarm for RWA Credit

Foresight News23m ago

Meta Launches Prediction Market, Code-Named "Arena": Not Using Real Money, 3.56 Billion Daily Active Users Are Its Biggest Bargaining Chip

Meta, under the codename "Arena," is developing a standalone prediction market application, according to a June 23 report by The New York Times. Initially, the app will operate on a points-based system rather than real-money betting, though future integration of financial transactions is not ruled out. Meta plans to leverage its vast ecosystem of apps, boasting 3.56 billion daily active users, to distribute the product. The strategy aims to lower user acquisition costs and navigate regulatory complexities associated with real-money prediction markets, which are overseen by bodies like the CFTC. News of Meta's entry caused stock dips for established players like DraftKings and Robinhood, reflecting market concerns over Meta's potential to disrupt incumbents like Polymarket and Kalshi with its massive scale. The prediction market sector has seen explosive growth, with monthly trading volume on major platforms surging to approximately $24 billion as of April 2026. This marks Meta's second foray into the space, having launched and later shut down a similar virtual-points app called Forecast in 2020. While Arena poses a competitive threat to crypto-based platforms like Polymarket, its mainstream reach could also significantly expand the overall user base and awareness for prediction markets. The project remains in development with no public launch timeline, but its announcement has already impacted market sentiment.

marsbit29m ago

Meta Launches Prediction Market, Code-Named "Arena": Not Using Real Money, 3.56 Billion Daily Active Users Are Its Biggest Bargaining Chip

marsbit29m ago

Trading

Spot
Futures

Hot Articles

How to Buy CSPR

Welcome to HTX.com! We've made purchasing Casper (CSPR) simple and convenient. Follow our step-by-step guide to embark on your crypto journey.Step 1: Create Your HTX AccountUse your email or phone number to sign up for a free account on HTX. Experience a hassle-free registration journey and unlock all features.Get My AccountStep 2: Go to Buy Crypto and Choose Your Payment MethodCredit/Debit Card: Use your Visa or Mastercard to buy Casper (CSPR) instantly.Balance: Use funds from your HTX account balance to trade seamlessly.Third Parties: We've added popular payment methods such as Google Pay and Apple Pay to enhance convenience.P2P: Trade directly with other users on HTX.Over-the-Counter (OTC): We offer tailor-made services and competitive exchange rates for traders.Step 3: Store Your Casper (CSPR)After purchasing your Casper (CSPR), store it in your HTX account. Alternatively, you can send it elsewhere via blockchain transfer or use it to trade other cryptocurrencies.Step 4: Trade Casper (CSPR)Easily trade Casper (CSPR) on HTX's spot market. Simply access your account, select your trading pair, execute your trades, and monitor in real-time. We offer a user-friendly experience for both beginners and seasoned traders.

1.9k Total ViewsPublished 2024.03.29Updated 2026.06.02

How to Buy CSPR

What is CASPER

Vitalik's Casper: A Comprehensive Overview Introduction In the ever-evolving landscape of blockchain technology, consensus protocols play a crucial role in maintaining the integrity and security of decentralized networks. Vitalik's Casper, a pioneering proof-of-stake (PoS) consensus mechanism, is specifically designed for the Ethereum network. This innovative project represents a monumental shift from Ethereum's current proof-of-work (PoW) approach to a more energy-efficient and scalable model. As the crypto industry continues to grow, understanding the nuances and implications of Casper becomes increasingly vital for stakeholders, developers, and enthusiasts alike. What is Vitalik's Casper? Vitalik's Casper serves as a transformative variant of traditional PoS protocols. The primary objective of this project is to enhance the network's overall security and scalability while addressing inherent limitations commonly found in earlier PoS systems. At its core, Casper leverages a security deposit system that requires validators—participants responsible for confirming transactions and creating new blocks—to stake a certain amount of cryptocurrency. This deposit not only incentivizes good behavior but also establishes a penalty mechanism for validators exhibiting malicious conduct. In essence, Casper seeks to provide a reliable framework that fortifies the Ethereum ecosystem against potential threats and attacks while supporting the growing demand for network efficiency and scalability. Who is the Creator of Vitalik's Casper? Vitalik Buterin, a visionary in the world of blockchain, is credited as the creator of Vitalik's Casper. Buterin co-founded Ethereum in 2015 and has continuously driven the project’s development and evolution. His commitment to enhancing the Ethereum ecosystem and addressing its challenges culminated in the introduction of Casper, which aims to revolutionize the consensus mechanism in blockchain technology. Who Are the Investors of Vitalik's Casper? While specific information on individual investors backing Vitalik's Casper is not publicly available, the project is comprehensively supported by the Ethereum Foundation and the broader Ethereum community. The foundation plays a pivotal role in funding and advancing projects that improve Ethereum, and its backing of Casper highlights the importance of this protocol in the future of the network. Furthermore, various developers and stakeholders within the Ethereum ecosystem actively contribute to and advocate for the continued growth and implementation of Casper. How Does Vitalik's Casper Work? Vitalik's Casper operates through a sophisticated mechanism designed to facilitate smoother and more secure consensus within the Ethereum network. Key features that distinguish Casper from traditional consensus protocols include: Security Deposit System One of the hallmark features of Casper is its security deposit requirement for validators. To participate in the consensus process, validators must stake a certain amount of cryptocurrency, thereby ensuring their financial commitment to the network. This system deters malicious behavior, as any validator caught acting dishonestly risks losing their staked assets. Voting System Casper incorporates a voting mechanism where validators collaborate to finalize blocks on the blockchain. Each validator proposes and votes on blocks, contributing to the overall decision-making process. This democratic element fosters a decentralized approach to consensus, enhancing security and network stability. Penalty System The protocol's penalty system serves as a crucial deterrent against unethical validator behavior. Should a validator act maliciously or fail to participate in the consensus process adequately, they can be penalized by losing a portion—or in some cases, all—of their staked assets. This punitive measure reinforces the accountability of validators and upholds the integrity of the network. Hybrid Consensus By employing a hybrid consensus model, Casper smartly combines elements from both PoW and PoS mechanisms. This unique structure promotes a gradual transition from Ethereum's existing PoW model to a fully-fledged PoS system, allowing the network to evolve without compromising security during the changeover. Timeline of Vitalik's Casper The journey of Vitalik's Casper has been marked by significant milestones critical to its evolution. Here’s a brief timeline highlighting key events in its history: 2017: The conceptual framework of Casper was first articulated by Vitalik Buterin as a potential solution to Ethereum's scalability challenges. 2018: The first iteration of Casper was released on GitHub, marking the initial steps toward transitioning Ethereum to a PoS model. 2020: The launch of the Beacon Chain, a foundational blockchain for the Ethereum 2.0 ecosystem, occurred. This footstep marked the commencement of a multi-phased transition to the Casper protocol. Ongoing: The transition to Casper remains a continuous effort, with a series of phases developed to ensure the effective implementation of the new consensus mechanism. Key Features of Vitalik's Casper Vitalik's Casper boasts several distinguishing features that contribute to its viability and innovation within the blockchain landscape, including: Security Deposit System: Validators must stake a deposit, enhancing their commitment to network integrity. Voting System: A collaborative approach to block finalization promotes decentralized decision-making. Penalty System: Deters malicious activities through financial penalties, ensuring network stability and security. Hybrid Consensus: The blend of PoW and PoS elements facilitates a slower transition to PoS without abrupt disruptions to the network. Conclusion Vitalik's Casper represents a significant advancement in Ethereum's ongoing evolution. By introducing a secure and scalable consensus mechanism, Casper aims to address the inherent limitations of traditional PoS systems and enhance the overall functionality of the Ethereum network. The project’s emphasis on security, accountability, and innovation positions it as a critical component of Ethereum's future. Understanding Vitalik's Casper is essential not only for developers and investors within the crypto space but also for those interested in the broader implications of blockchain technology. As the Ethereum ecosystem continues its transformative journey towards scalability and efficiency, Casper stands at the forefront of this revolution, promising to reshape the landscape of decentralized consensus in the years to come.

693 Total ViewsPublished 2024.08.25Updated 2024.12.03

What is CASPER

Discussions

Welcome to the HTX Community. Here, you can stay informed about the latest platform developments and gain access to professional market insights. Users' opinions on the price of CSPR (CSPR) are presented below.

活动图片