header-langage
简体中文
繁體中文
English
Scan to Download the APP
Partnered With:

Why is it important to understand ethereum's client diversity?

Read this article in 21 Minutes
Having multiple clients is a unique advantage of Ethereum and a testament to the hard work of the developer community.
Why is it Important to Understand Ethereum's Client Diversity?
By Joseph Cook
South Wind, Unitimes


Ethereum has multiple interoperable clients, developed and maintained by separate teams in different languages. This is a major achievement and provides resilience to the network by limiting the impact of a vulnerability or attack to the part of the network that runs the affected client. However, this advantage can only be achieved if all users are roughly evenly distributed across the available clients. Currently, the vast majority of Ethereum nodes run a single client, introducing unnecessary risk to the network.


Ethereum will soon undergo one of the most significant upgrades to its architecture since its inception -- the merger from proof of work (PoW) to proof of stake (PoS). This will fundamentally change the way the network comes to a consensus on the true state of blockchain and maintain network security. This new architecture will bring security, scalability, and sustainability benefits, but also magnify the risks associated with such dominance by a single client. This article will explore why...


Beacon chain


Beacon chain is a PoS blockchain. It currently runs in parallel with the Ethereum main network, but the two will soon "merge" together. Following the merger, existing Ethereum mainnet clients (" execution clients ") will continue to host Ethereum virtual Machines (EVM) and validate and broadcast transactions, but will stop participating in proof-of-work (PoW) mining and relinquish responsibility for consensus on blockchain headers (top blocks).


Instead, the consensus will become the responsibility of the consensus client, which packages the transactions from the "execution client" with the information needed for the consensus into the "beacon blocks" that form the beacon chain. "Miners" will be replaced by "validators", who will need to translate ETH  Staking in an Ethereum smart contract (a process called "staking"). The ETH pledged by the verifier will be used as collateral to motivate them to complete the verification work correctly. Verifiers that do not perform verification (e.g. because they are offline) or engage in malicious behavior will result in the destruction of part of their pledged ETH. On the other hand, if the verifier behaves properly, he or she will be rewarded with ETH.


1. Responsibilities of the verifier


For verifiers, good behavior means participating in validating beacon blocks received from other verifiers and voting on blockchain headers. If the validator receives a block that is valid, the validator "proves" the block, effectively voting for it to be added to the blockchain. A node will be asked to propose a new block from time to time, and other verifiers will "prove" the block. When a blockchain has multiple forks, only the chain that has accumulated the most attestations in its history is the correct blockchain.


The verifier will also participate irregularly on a synchronization committee. (sync committee)  The synchronization committee is a group of 512 randomly selected verifiers who will decide whether to accept block headers. Signature, so that the light client can retrieve these authenticated blocks without having to access the entire history chain or the entire set of verifiers.


2. Rationalization & NBSP; & Be finalised


The beacon chain sets the pace for the network. This rhythm is organized into two units of time: slot  And & have spent Epoch. Slot is an opportunity to add a block to a beacon chain, which occurs every 12 seconds. A slot may not have a block, but blocks are added to each available slot when the system is operating optimally. The epoch is in 32 slots (about 6.4 minutes). Slot and Epoch set the pace of the Ethereum blockchain.


During each epoch, the block in the first slot is a checkpoint. (checkpoint). Checkpoints are important because checkpoints are used to make records on the blockchain ledger permanent and irreversible -- a two-stage process: First, if at least two-thirds (or "absolute majority") of the ETH balance pledged by all active verifiers prove the last two checkpoints; (The current one is called the "target checkpoint," and the previous one is called the "source checkpoint.") So the block between the two checkpoints is "justified."


"Rationalization" is the first step towards becoming the permanent record on Ethereum's chain of authority. It was also in the 1600s, in the 1600s. It was also in the 1600s, when a "legitimate" checkpoint was followed by another, it was a finalized, even if it was permanent and irreversible. (That is, all records prior to this checkpoint become permanently immutable records on the blockchain).


This process of "rationalization" and "finalization" requires validators to perform "attestations" that are actually a little more complicated than described above. There are two types of proofs: one is   LMD GHOST vote, used to prove the head of the blockchain (LMD GHOST is a forking selection algorithm); The second is used to prove two checkpoints. FFG vote & have spent (FFG is a "finality gadget" that rationalizes and finalizes blockchains.) All verifiers perform each checkpoint. FFG votes, while only a randomly selected subset of verifiers in each SLOt  To & have spent LMD GHOST vote.


3. Reward, punishment and forfeiture of the pledge of the verifier


reward


As mentioned above, the ETH pledged by the verifier is used as "collateral" to incentivize the verifier's honest behavior. These pledged ETH will increase over time as verifiers are rewarded for participating in the protected network. When performed by the verifier. Lmd-ghost vote and & NBSP; When FFG votes in line with most other verifiers, the verifier receives a proof reward. When a validator is selected as a "block proposer," that validator also receives a reward if its proposed block is "settled." Block proposers can also increase their rewards by packaging evidence of misconduct by other verifiers into their proposed blocks. These rewards are a "reward" for encouraging the verifier to act honestly.


punishment


The verifier's possible "punishment" is in the form of various mechanisms to destroy part of the ETH pledged by the verifier. Validators are penalized when they fail to submit an FFG vote, submit late, or submit an incorrect FFG vote. (attestation penalties). But if the verifier misses the LMD-Ghost vote, there is no penalty, just a missed reward that could have been earned by voting on the chainhead. The verifier's balance is reduced by an amount equal to the reward they would have received if they had submitted the correct certification.


This means that the maximum penalty an honest but "lazy" validator can suffer for missing the proof is to lose three-quarters of the reward he could have earned if he had done the proof perfectly. In addition, when a validator is assigned to the sync Committee, if the validator fails to sign the block, the penalty is equal to the ETH value he would have received had he successfully signed the block.


Overall, these penalties are mild, and the provertor's continued inactivity will result in only a fairly slow reduction in the amount of ETH pledged.


confiscated


Confiscated & have spent (slashing)  Is a more serious action that results in the forcible removal of the verifier from the network and the associated loss of THE ETH pledge. There are three ways a verifier can be forfeited, all of which amount to a dishonest block proposal or block proof by the verifier:


- Propose and sign two different blocks in the same slot;


- Proof another block that "surrounds" one block (in effect, changing the history of the blockchain);


- Through "double voting" for both candidate blocks of the same block.


If any of these actions are detected, the verifier forfeits them. This means 1/64 of the pledged ETH (up to 0.5 ETH) will be destroyed immediately, and then a 36-day removal period begins: during which the pledge of the verifier will be gradually reduced; And at the midpoint of this period (day 18), the verifier will be subject to an additional penalty, the size of the penalty will be the same as before the forfeiture event. The total amount of ETH pledge for all forfeited verifiers within 36 days is proportional.


This means that as more verifiers are forfeited, the magnitude of forfeiture will increase. The maximum forfeiture is the total valid balance of all forfeited verifiers (i.e., if a large number of verifiers are forfeited, they may lose all of their pledge). On the other hand, a single, independent forfeiture event destroys only a fraction of the verifier's pledge. This intermediate penalty, which varies according to the number of persons forfeited, is known as the Correlation penalty.


Inactivity Leak mechanism


If the beacon chain has more than 4 epochs that have not been finalized, an economic mechanism called the "Inactivity Leak" is activated. The ultimate goal of The Inactivity Leak is to create the conditions for the blockchain to resume finalizing. As explained above, "finality" requires 2/3 of the total ETH pledge to reach a consensus on "source checkpoints" and "target checkpoints". If more than a third; The number of verifiers offline or unable to submit proof of proof, then it is not possible to have a two-thirds majority of verifiers to finalize the checkpoint.


At this point, the Inactivity Leak mechanism allows inactive verifiers to gradually reduce their ETH pledges until they control less than 1/3 of the total pledges on the network, allowing the remaining active verifiers to finalize the blockchain. No matter how large the number of inactive verifiers is, the remaining verifiers will eventually control. Two-thirds of the total amount pledged. This reduction in the pledge will be a strong incentive for inactive verifiers to reactivate as soon as possible!


Rewards, penalties, and penalties in beacon chain design encourage individual verifiers to do the right thing. However, from these design choices emerged a system that strongly incentivizes the verifier for equal distribution among multiple clients and strongly discourages such dominance by a single client. This is because supermajority rules are so important to beacon chains that a single malicious verifier is fairly harmless to a network, but a large number of malicious verifiers can wreak havoc. Let's take a look at some potential scenarios......


Risk scenarios


This asset incentive to consensus client diversity is risky. By evenly distributing verifiers across multiple clients, the impact of a client-specific attack or vulnerability can be greatly reduced, whereas the dominance of a single client increases this risk. This risk multiplier effect varies depending on how much of the network is occupied by a single dominant client.


We can get a little more intuitive with some hypothetical (but probably actual) scenarios. Let's assume that a bug was accidentally introduced into a consensus client that could directly cause the client to prove incorrectly, or expose a vulnerability that would allow a malicious attacker to force the client to prove incorrectly. So how does client diversity affect the consequences of this bug?


Scenario 1: The affected client controls less than one-third of the ETH pledge


This situation provides maximum flexibility for the beacon chain, as two-thirds of the pledged ETH are still being properly certified, allowing the beacon chain to be finalised normally. Therefore, from a network perspective, the consequences of this scenario are negligible. Affected verifiers will be subject to a sloth penalty because they submitted incorrect certificates. These losses are relatively small and the affected verifier can wait for the client to be fixed or switch to another client. Either way, the verifier can proceed with correct proof with minimal economic consequences and without breaking the beacon chain.


Scenario 2: The affected client controls more than one-third of the ETH pledge


This situation is much more problematic because less than two-thirds of ETH pledges are being proven correctly, i.e. there is no absolute majority of verifiers to reach a correct consensus. This means that the beacon chain cannot be finalized, and the Inactivity Leak mechanism will be activated. At this point, the bug affects the entire network. For exchanges and Dapps (decentralized applications) built on top of Ethereum, finality of blockchain is critical. If blockchain cannot be finality, there is no guarantee that transactions are permanent and immutable.


For individual verifiers using the affected client, the penalty is much more severe, because the activation of the Inactivity Leak mechanism means that the ETH pledged by the individual verifier is progressively destroyed until the affected client controls less than one-third of the total ETH pledged. And only then will the beacon chain resume. This ETH destruction may actually continue for some time after the beacon chain is restored, thus providing a buffer for small changes in the number of verifiers. The beacon chain is only in jeopardy if an affected client controls more than one-third of the total ETH pledge.


In this scenario, validators who run other alternative clients normally do not receive any reward while the Inactivity Leak mechanism is activated. This is a security mechanism designed to prevent an attacker from deliberately starting the Inactivity Leak mechanism, thereby increasing the total reward for other verifiers that the attacker controls that are running correctly. These are small penalties, but the point is that no one can escape the negative consequences of a consensus bug on the part of a client that controls more than a third of the total AMOUNT of ETH pledged.


Scenario 3: The affected client controls half of the ETH pledge


This can lead to unrecoverable forks in the beacon chain. If a client with a consensus bug forked onto its own chain, neither the original chain nor the new forked chain would be finalised, as both the old and new chains would be missing about half of the verifiers, and both would activate Inactivity Leak. At this point, the ETH pledge of the missing verifiers on the two chains will be gradually destroyed until they control less than 1/3 of the total network ETH pledge, at which point the verifiers on each chain can start to final-out again. This process takes the same amount of time on both chains because the recovery finalizes the same amount of ETH that needs to be destroyed.


The two chains will be finalized independently using different checkpoints. The two chains may never merge into a single "chain of authority." The solution will require the Ethereum community to reach a consensus on which chain is the "authority chain," a process that is sure to be politically difficult and divisive, resulting in half of the communities losing money by switching blockchains (and that doesn't include the possible devaluation of ETH). Perhaps even worse, The community could simply continue to splinter (similar to how The DAO incident led to The Ethereum Classic).


To avoid a permanent split in the beacon chain, validators using affected clients will have to race the Inactivity Leak to make client switches, or fix their clients before the blockchain starts to nail down. It could be 3-4 weeks, during which developers will scramble to save Ethereum. In this scenario, there is no escape from significant financial losses for a large number of verifiers.


Scenario 4: The affected client controls more than two-thirds of the ETH pledge


This is a nightmare situation for beacon chains because the affected client controls a super majority of verifiers and is able to nail down its own chain. In this way, incorrect information is likely to be permanently fixed in Ethereum's history. The client team will have about 13 minutes to identify the consensus bug, fix it, and broadcast client-side updates to affected verifiers before the blockchain begins to nail down illegal blocks.


The only possible mitigation for this situation is for the affected verifiers to withdraw their pledged ETH and withdraw from the blockchain. If the affected verifiers try to rejoin the correct blockchain after the bug has been fixed, they will be forfeited as a "colluded penalty" because the checkpoint they prove at this time contradicts the checkpoint they proved before, and they do so collectively. The Inactivity Leak mechanism will be activated by a large number of verifiers leaving, meaning that these affected verifiers will continue to lose their ETH pledge while they wait to withdraw (exit). With a large number of verifiers to drop out, the queues will be long, slow, and expensive.


The only other option is for the remaining unaffected clients to accept the bug, join the new chain, and agree that the bug will henceforth be the expected behavior of the Ethereum consensus layer. This would be staking contrary to the core principles of a community, and would be hugely divisive. These few clients will be indolent on the new chain, even if they behave properly.


Neither option is a good one. The former option is expensive for the affected verifier and logically difficult to correct. The latter option would seriously undermine trust in Ethereum and lead us to accept a permanently tainted chain.


Other risks


Reversal finality


If a single client controls more than two-thirds of the total ETH pledge, then the developer of that client has the ability to choose which version of blockchain history is correct. For example, if the developer of that client becomes malicious, they can spend some ETH (such as cashing out through an exchange, or bridging to another blockchain network), and then those developers collectively vote to replace the current settled chain with another version of the chain that does not include that cost transaction.


This is a "double flower" because the client controls most verifiers so that it can reverse finality and rewrite history. At the same time, the honest few validators are punished for their inconsistent proofs. A malicious attacker who controls an absolute majority of the total ETH pledge could also threaten to do the same and take over the network for ransom. Even one that controls a third. Malicious teams with total ETH pledges can also threaten to stop chain finalization and activate the Inactivity Leak mechanism.


Shared responsibility


The previous point is somewhat pessimistic about client development teams, not because it's reasonable, but because malicious behavior is possible and therefore needs to be guarded against. However, these developers will most likely always be the good guys, and they themselves need to resist the dominance of a single client, not only because they are likely to be Ethereum users (and ETH holders or pledgers), but also because responsibility for network security should not be concentrated on the shoulders of a small team. The actions of developers have a huge impact on the health of ethereum as a whole, and their stress and mental health are the real cost. Client diversity avoids this by sharing responsibility among multiple independent teams.


centralized


Even if the client development team is made up of completely well-intentioned developers, they retain excessive power over ethereum operations when they control most of the ETH collateral. Decentralization is a core principle of Ethereum, and this must include decentralization of developers, users, and hosting providers. Decentralization of development teams across multiple clients limits the influence of individual client teams on the philosophical direction of Ethereum by evenly distributing THE ETH pledge, thereby limiting the ability of individual client teams to make key decisions such as forking content and timing. Client diversity ensures that decentralized decisions are made at the developer level.


political


Social Recovery of an Honest chain; It's a politically charged question. Ethereum's consensus mechanism should be determined based on rules encoded into its clients -- this is its primary goal. Interfering with this process could lead to fragmentation in the Ethereum community, with different users having a variety of philosophical, ethical, and technical views on mitigating a consensus bug/ attack on a major client. Governance decisions will be clumsy, disruptive, and may be too slow to be most effective.


The real example


The probability of occurrence of the above scenario is relatively low. Developers are meticulous in researching and testing every update to their software, and there is no reason to doubt the ethics of any client team. However, these scenarios are not purely hypothetical. There have been real-world examples where client diversity has saved the Ethereum main network from permanent damage, and consensus bugs have also damaged the Ethereum test network. Some of these examples are described below.


Shanghai attack


In September 2016, during the DevCon conference in Shanghai, hackers attacked Ethereum, exploiting several vulnerabilities in the client software and causing network speeds to slow significantly. Attackers persist, quickly deploying new, similar attacks, and client developers race to reverse engineer and patch them. Finally, the attacker in   An unfixable bug was found in the Geth client, making a hard fork inevitable. Even after the hard fork upgrade, attackers discovered a denial-of-service vulnerability that took advantage of the bloated state caused by previous attacks and forced clients to perform tens of thousands of slow disk I/O operations per block. Client-side diversity won because Ethereum was able to continue to use alternative & NBSP while developers worked to fix bugs in Geth. Parity client, which does not suffer from the same vulnerability.


Since there are multiple clients, the Shanghai attack can be recovered, but if a similar bug affects a majority of consensus clients, the situation may be very different. If a "consensus client" was as dominant as it was when Geth was attacked, ethereum volumes would not be finalised because most verifiers would not be able to prove blocks at this point. Inactivity Leak will be activated because less than a third of the ETH pledge is available for proof.


Insecura chain


The feasibility of a "remote attack" was recently demonstrated at the Pyrmont test network. The idea is to build a group of validators to prove an alternate blockchain history. These verifiers are then used to trick new verifiers into joining the dishonest "Insecura" chain, gradually increasing the number of affected verifiers to the point where the blockchain is disrupted, the Inactivity Leak is activated, and the ETH pledge of the honest majority of verifiers is exhausted. Ultimately, this could lead to affected clients finalising their own version of the blockchain. While the investment of time and money required makes this behavior unlikely to be an attack vector, a similar dynamic could lead to a bug in a dominant consensus client infecting a large part of the network.


Medalla test network


There was a sudden drop in the number of active validators on Medalla's test network due to clock issues with the Prysm client. The chain cannot be finalised because so many verifiers have dropped out of the network that two-thirds of the pledged ETH, the vast majority, are no longer available for proof. The recovery is gradual because it depends on the verifier switching the client from Prysm to a few other clients. Then the real time catches up with the Prysm client's faulty clock time, and the previously invalid proof suddenly becomes valid.


This caused the Prysm client to grind to a halt, while the Teku and Lighthouse clients suffered from a huge state bloat as they suddenly processed a large number of proofs. If Prysm were the only client on Medalla's test network, the entire network would have stalled; If Prysm clients controlled less than a third of the total ETH pledge, a lot of confusion could be avoided.


Prysm deposit root bug


In early 2021, the Prysm client encountered a bug related to Eth1 deposit root validation. At that time, the Prysm client was able to generate invalid deposit roots. (deposit root) and pass it to the other Prysm nodes. Because Prysm has such a large share of verifiers, this invalid root spreads quickly across the network and is accelerated by the fact that Prysm follows a majority voting mechanism rather than explicitly validating the root in every block.


While the bug was minor and did not disrupt the beacon chain or result in significant financial penalties for the probator, the incident demonstrates the importance of client diversity in two ways: First, if the Prysm client has a small share of verifiers, it will limit the spread of the bug across the network and reduce its impact. Second, the post-incident analysis article describes how an alternative client implementation can be used as a benchmark to help developers quickly identify and fix the bug. Obviously, this is not possible without multiple actively maintained clients.


Current client diversity


The chart above shows the current diversity of Ethereum clients: execution clients on the left and consensus clients on the right.


The two pie charts above show a snapshot of the current customer diversity of ethereum's executive layer and consensus layer (as of This writing in January 2022) : Executive layer by & NBSP; Geth  Client-led, OpenEthereum  The client was a distant second. Client ranked third, Nethermind  In fourth place, other clients make up less than 1% of the network. The most common client on the consensus layer & NBSP; Prysm  While not as dominant as the executive-level Geth client, it still owns more than 60% of the network, Lightroom & NBSP; And & have spent Teku  20% and 14% respectively, and other clients are rarely used.


Execution layer data is available on January 23, 2022 via the Ethernodes website & NBSP; (ethernodes.org/)  To obtain; Consensus client data from Michael Sproul  (github.com/sigp/blockprint). Consensus client data is more difficult to obtain because beacon chain clients do not always have a clear trail that can be used to identify them. The data is generated using a classification algorithm that sometimes misrepresents a few clients. However, it is clear that most of the network nodes in the consensus layer are running Prysm. Prysm's dominance was sometimes even higher, over 68%. Although only a snapshot, the percentages in the figure provide a good overview of the current state of client diversity.


The client-side diversity of the execution layer is included in the figure above, because bugs affecting the execution client may also propagate to the consensus layer, since the consensus layer and execution layer will be coupled after the merger, and the execution payload generated by the execution client will be the core component of the beacon block.


Personal pledgee & The pledge pool


Addressing the client side allocation imbalance requires action by the major exchanges and STking pools. However, individual pledgers can also come into play by choosing to run a combination of non-GEth /Prysm clients. Instructions for setting up a few clients can be found on the clientdiversity.org page:

https://clientdiversity.org/


For pledgers with less than 32 ETH or who do not want the responsibility of running a verifier, there are a number of pledge service providers available. Some major centralized exchanges offer ETH pledge services, but the distribution of clients in their pledge pools is usually secret, and the tradability of ETH pledge tokens offered by these exchanges is limited. For these and other reasons, using these centralized services is not recommended.


一个更好的选择是使用更去中心化的流动性押注服务提供商,如 Lido 或 Rocketpool。这些服务商提供 ETH 质押服务,同时还提供了一种流动性 Token (比如用户通过 Lido 协议质押 ETH 将获得具有流动性的 stETH Token ),这些流动性 Token 的价值将随着验证者累积的奖励而增加。这些 Token 可以进行交易,或者用于赚取 DeFi 收益。这些流动性质押平台的客户端分布情况也要更加透明,比如 Lido 会发布季度更新,而 Rocketpool 现在也发布了他们的季度更新。对于不能或不愿意运行自己的验证器者的用户,这些服务是实现更好的客户端多样性的途径。


conclusion


The beacon chain's reward and penalty protocol directly incentivises client diversity. Single client dominance would be a potential threat to Ethereum, invisible when a single dominant client is performing well, but potentially catastrophic when a consensus bug occurs in that client. Having multiple clients is a unique advantage of Ethereum and a testament to the hard work of the developer community. However, when a single client controls most of the ETH pledge, this effort is weakened. Ideally, distribute the ETH pledge equally among at least 4 clients, giving each client up to 1/4 of the ETH pledge. This is easily achieved by using production-ready clients that are now available.


The original link


Welcome to join the official BlockBeats community:

Telegram Subscription Group: https://t.me/theblockbeats

Telegram Discussion Group: https://t.me/BlockBeats_App

Official Twitter Account: https://twitter.com/BlockBeatsAsia

举报 Correction/Report
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit