Workflow Analysis of Ethereum Casper CBC Protocol

Last Wednesday, Vitalik Buterin, the founder of Ethereum, announced the latest information on the development route of Ethereum (also known as Ethereum 2.0) at the Devcon4 conference in Prague. Called Shasper, which means the combination of sharding and Casper), which includes Casper, sharding, EWASM and some other protocols, it will be a new blockchain and will exist at the same time as the current Ethereum PoW chain, and connected to each other.

In the first phase, Ethereum developers will deliver the basic beacon chain, the second phase is the launch of the sharded data chain, the third phase is the enablement of state transactions (EWASM), and finally the iteration, improvement and addition of new technologies.

In this article, we will discuss the Casper consensus mechanism of the beacon chain. There are actually two major versions of the Casper consensus mechanism, one is Casper FFG (Vitalik version), and the other is Casper CBC (Vlad version) to be mentioned in this article. ).

The following is translated from Vitalik's latest post "Casper CBC lite via committees"

The workflow of Casper CBC is roughly as follows:

1. The verifier sends a message;

2. Each message specifies the block the validator is voting on, and also specifies the latest message the validator has received from other validators.

3. The block that the validator is voting on must be equal to or inherited from the head block of the GHOST fork choice rule (using the latest news from other validators as input)

4. The only slashing conditions are (i) the above rules, (ii) a validator cannot generate two messages with the same sequence number, (iii) in a later message, a validator cannot refer to a validator with (more the message referenced by the author) the message of the earlier sequence number;

5. Finality is endogenous: at some point, when there are multiple rounds of validators voting on the descendants of X, it is mathematically impossible for the head to switch to X without a large number of validators sending invalid messages. Non-X blocks; and less than this amount limit, can be detected and measured using various heuristics.

Below is an example of a GHOST fork choice rule. The letters A, B, C, D, E represent the 5 most recent votes.

The first selection is between the green and yellow blocks. In the end, the green block wins because there are three votes from the green block and only two votes from its competitor, the yellow block. The second selection is between the red block and the blue block. And the blue block wins 2:1, and the blue block has only one orange sub-block, so the orange block is the winner.

The efficiency problem caused by doing this is obvious: each message needs to refer to all the other messages it has seen, which can lead to O(N^2) data complexity;

This paper explores a specific strategy for mitigating data complexity, compared to each validator's vote, which is evaluated on the GHOST fork-choice rule for each other validator's message, where validators are explicitly assigned to m private committees of other validators (possibly 32≤m≤256), and in their messages must contain references to the signatures of these m validators.

This reference can be done by serial number, or by where these signatures have been included in the chain. The slashing condition can simply check whether these messages actually represent m other messages for the GHOST fork selection evaluation, and the counter is always incremented.

more specifically:

1. For a chain to accept a message, either (i) the message must vote on a block in the chain, or (ii) the off-chain block the message voted on must be included in an uncle. );

2. For a chain to accept an uncle, the parent of the uncle must (i) be part of the chain, or (ii) have been incorporated into the chain as an uncle;

3. For a chain that accepts a message, all messages referencing its latest set must be accepted;

4. Each message has a sequence number. For a chain to accept messages with sequence number n, it must have accepted messages from sequence number 0. ..n−1 validator’s message;

5. The verifier can slash two messages with the same sequence number, or can slash a message with vote x, where the evidence contained in the message cannot prove vote x;

If the committees are large enough, they will approach the entire validator set. And you can heuristically determine the number of validators. Here is the relevant code:

github.com ethereum/research/blob/659f0b31f9337b3e7ee4bde45cdb93c0ed4fd390/graph_cbc/graph_cbc.py

import random

VALIDATORS = 5000

EDGES = 255

FINALITY = 4000

assert EDGES % 2 == 1

neighbors = list(range(VALIDATORS))

edgelist = neighbors * EDGES

random.shuffle(edgelist)

edges = [edgelist[i*EDGES:i*EDGES+EDGES] for i in range(VALIDATORS)]

last_votes = '1' * FINALITY + '0' * (VALIDATORS - FINALITY)

while 1:

new_zeroes = []

for i in range(VALIDATORS):

votes_for_0 = len([e for e in edges[i] if last_votes[e] == '0'])

if votes_for_0 * 2 > EDGES:

Note that this part of the code is intercepted, the complete code can be accessed: https://github.com/ethereum/research/blob/659f0b31f9337b3e7ee4bde45cdb93c0ed4fd390/graph_cbc/graph_cbc.py

The result is m ≈ 256, and the fault tolerance rate seems to be close to 20%, which is very close to the maximum possible value of 25% for Casper CBC in two rounds. While we lose a few percent of security, we gain a surprisingly parsimonious representation of the protocol that would otherwise require some rather complex data structures.

Also, note that this flavor of Casper CBC is basically very similar to how Avalanche (Avalanche Protocol) works, where each node achieves consensus by polling a committee of other nodes. The main difference here is that committees are chosen by protocol and slashing conditions enforce compliance, while GHOST is used as a fork choice rule to scale the N-ary consensus chain, effectively achieving economic security. This suggests that there may be a more general framework that can effectively encompass Casper CBC as well as Avalanche;

Further work:

1. The fault tolerance of Casper CBC can be increased to (1/3-ϵ) by increasing the number of waiting rounds. So can we use a similar technique to increase the fault tolerance rate to more than 20%?

2. Is there a way to make sharding happen naturally in this setup? In general, this goal can be accomplished by replacing the chain mechanism with some DAG technique, where each block knows the parent of its shard, and the tenth newest and older of the other shards blocks, and validators are expected to only fully validate blocks that have not been validated by a sufficiently large sample of validators.

2500 Puffs

2500 Puffs - 3500 Puffs Vape Pen,disposable pods,Dab Pen Atomizer,Vape Pen Nicotine

Shenzhen Xcool Vapor Technology Co.,Ltd , http://www.xcoolvapor.com