Eth 2.0, do you really know what a beacon chain is?

Many readers may still have an understanding of blockchain in the Bitcoin blockchain network, the ring nested public ledger is really impressive, but today's blockchain network has long taken on a different shape, through different consensus mechanisms, network structure to reach trust.

September 15, '22 was an exciting day, when Ether's Beacon Chain merged with the original main chain, marking a radical move towards proof-of-stake (PoS) for Ether's consensus mechanism (PoW).

post image

I Time slots and epochs

The beacon chain provides a constant clock heartbeat for Ethernet consensus. Each time slot is 12 seconds, and an epoch is 32 time slots or 6.4 minutes. One block per time slot is added to the beacon chain, but there are also time slots where no blocks are added. All nodes need to have synchronized clock heartbeats and the creation block of the beacon chain is located in Slot0.

II Validators and Attestations

The PoW mechanism "miners" are tightly bound together, while Ethereum's validators are "virtual miners" under the PoS mechanism, and the validator nodes are rewarded without consuming arithmetic and power. The verifier is "virtual" because the verifier is activated by the pledger. In PoW, users buy hardware to become miners. In Ether, the user pledges 32ETH to activate and control a verifier executed by a beacon chain node.

In each cycle, a verifier is randomly assigned to a slot. A proof is like a vote of the verifier, and the weight of this vote is determined by the balance of the verifier node. The verifiers broadcast their proofs in the network and these votes are eventually recorded in a beacon chain (the content of the beacon chain is mainly the address of the verifier registration, the status of each verifier and the proof). At the same time, the verifiers monitor each other, report conflicting votes, or report bad verifiers who repeatedly participate in votes. Block proposers are randomly selected from the validators and used for block construction.

post image

III Committees (Committees)

A committee is a set of validators. The selection of committees, the creation of proposers, and the arrangement of verifiers are implemented in a pseudo-random process called RANDAO. Each time slot has a committee of one proposer and at least 128 validators. A verifier can be in only one committee per cycle. Typically, there are more than 8192 validators in the network, thus guaranteeing two sets of committees per time slot.

post image

The primary responsibility of the verifiers in the committee is to vote for what they believe to be the latest block, known as the LMD GHOST vote. In Slot1, a block is proposed and then proved by two validators; one of the validators in Committee A goes offline. the proof in Slot1 and the block propagates the network and reaches many validators. In Slot 2, another block, which is not seen by the verifier in Committee B, proves that the head of the beacon chain is the block in Slot1. Note that this verifier is different from the offline verifier from Slot 1. In Slot3, all the verifiers in Committee C run the LMD GHOST poll and independently give a proof with consistent results.

IV Beacon Chain Check Point (Check Point)

A check point is a block in the first time slot of the cycle. If there is no block in the first time slot, the checkpoint is the previous nearest block. There must be one checkpoint block per cycle, and a block can be a checkpoint that is attributed to more than one cycle.

post image

Note that there are no blocks from Slot65 to Slot128. the Epoch2 checkpoint should be a block on Slot128. Due to the lack of blocks, the Epoch2 checkpoint is still the block on Slot64. The case is similar for Epoch 3, where Slot192 is empty, so the previous block, Slot180, is the Epcoh3 checkpoint.

When a LMD GHOST vote is taken, the verifier also votes for the checkpoint in the current cycle, called target. this vote is called a Casper FFG vote and also includes a previous checkpoint, called source. in the figure, the verifier in Epoch1 votes for the source checkpoint of the creation block, and the target checkpoint of the block, Slot 64. in Epoch2, the same verifier votes for the same checkpoint. Only the verifier assigned to a particular timeslot votes the LMD GHOST for that timeslot. However, all validators vote FFG for each cycle checkpoint.