Beacon chain, PoS, sharding...you must first understand these terms when contacting Ethereum 2.0 by evercoder2020

View this thread on steempeak.com
· @evercoder2020 ·
$15.48
Beacon chain, PoS, sharding...you must first understand these terms when contacting Ethereum 2.0
![醚着火了燃烧的ETH硬币正上升醚着火了醚着火了.jpg](https://cdn.steemitimages.com/DQmTUaCUiasroAJ4s95PbtX4Wz2vofjwkw3RT38PvoQFiQL/%E9%86%9A%E7%9D%80%E7%81%AB%E4%BA%86%E7%87%83%E7%83%A7%E7%9A%84ETH%E7%A1%AC%E5%B8%81%E6%AD%A3%E4%B8%8A%E5%8D%87%E9%86%9A%E7%9D%80%E7%81%AB%E4%BA%86%E9%86%9A%E7%9D%80%E7%81%AB%E4%BA%86.jpg)

# 1.Attestation certification
Proof is a vote initiated by the verifier, which is aggregated by the verifier's signature to prove the validity of the block, and the vote is weighted by the verifier's balance.

# 2.Attester
The verifier on the beacon chain can act as a block proposer and prover, and the prover initiates a vote on the block.

# 3.Beacon Chain
Realized in phase 0 of Ethereum 2.0, the Proof of Stake (PoS) consensus mechanism will be introduced. It is also considered the "coordination layer" of Eth2.
Function:
- Assign responsibilities to validators
- Finalize the checkpoint
- Perform random number generation on the protocol layer
- Strengthen the beacon chain
- Vote on the chain head as the basis for fork selection
- Connect and vote for the transition/data of the shard chain

# 4.Block proposer
The verifier randomly selected by the beacon chain through the RANDAO mechanism makes a proposal for the next block. There is only one block proposer in each slot.

# 5.Casper FFG
Casper FFG is a block finalization system based on the PoS consensus mechanism. It stipulates the rules for block finalization and checks the determined blocks. Casper FFG integrates PoS algorithm technology and Byzantine fault-tolerant consensus principles. It is decoupled from the chain growth process and can be used as an independent overlay to provide services for finalizing blocks for any effective blockchain protocol. Compared with the PoW consensus mechanism, FFG can bring higher security to the blockchain and prevent the block from being tampered with.

Casper FFG vote means that the verifier initiates a vote for the checkpoint of the most recent epoch, the "target checkpoint" and the previous checkpoint, the "source checkpoint", which proves that the vote is broadcast by the verifier to the p2p network, and finally by the block producer Packed into blocks.

# 6.Committees
The committee in each slot in the beacon chain and shards consists of at least 128 validators. According to the pseudo-random process RANDAO, the validators are randomly assigned to the committee to vote on the block to determine its validity.

# 7.Checkpoint
Checkpoint refers to the block located in the first slot of each epoch. If no block is generated in this slot, the nearest block is the checkpoint. Each epoch will have a checkpoint block; a block may be a checkpoint for multiple epochs at the same time.

# 8.Chain head
The chain head refers to a block at the end of the beacon chain or shard chain. Each block in the slot must initiate an LMD GHOST vote to verify the beacon chain head.

# 9.Current Balance & Effective Balance Current Balance & Effective Balance

The existing balance refers to the total amount of ETH currently held by the validator, and the effective balance refers to the amount of ETH calculated based on the existing balance. The effective balance defines the range of the amount of ETH bounties or confiscations obtained by the verifier. The effective balance is up to 32 ETH.

If the verifier wants to expand the number of effective balances, the existing balance that needs to be held is "effective balance + 1.25 ETH". In other words, if the validator originally held a valid balance of 20 ETH and wants to increase it to 21 ETH, the validator’s existing balance must be increased to 21.25 ETH. As shown in the third example below, if the existing balance is reduced by 0.25 ETH and falls below the threshold, the effective balance will be adjusted accordingly.

The following example illustrates how to calculate the effective balance:
- If the existing balance is 32 ETH — the effective balance is 32 ETH;
- If the existing balance is reduced from 22 ETH to 21.76 ETH — the effective balance will be 22 ETH;
- If the existing balance is reduced from 22 ETH to 21.749 ETH — the effective balance will be 21 ETH;
- If the existing balance increases to 19.25 ETH and the original effective balance is 18 ETH, then the effective balance will increase to 19 ETH;
- If the existing balance increases to 22.25 ETH, and the original effective balance is 21 ETH, then the effective balance will increase to 22 ETH.

# 10.Deposit Contract
A smart contract deployed on the Ethereum PoW chain. To become a PoS validator of Eth2, you need to first send a transaction to the deposit contract, including a certain amount of ETH as a pledge deposit. The deposit contract records the history of pledges and locks all pledge deposits on the PoW chain, which can then be transferred to the Eth2 beacon chain. Please note that in the early stage of Eth2, the deposit contract only supports one-way transfer, and the pledge deposit cannot be transferred from Eth2 back to the PoW chain.

# 11.Double proposal
A block proposer proposes more than one block in his allocated slot.

# 12.Double vote
A validator initiates two FFG votes for the same target checkpoint (target) and different source checkpoints (source). Double voting can be seen as a double-spend attack in the PoS version.

![image.png](https://cdn.steemitimages.com/DQmQU6NGjMkiN5zH8XJmQ4gtzFeErGVgeUBxDBd21uyT4An/image.png)

# 13.Epochs period
Each epoch consists of 32 slots (time slots), each slot is 12 seconds, and one epoch is 6.4 minutes.

# 14.EBB time boundary block
Epoch boundary block (EBB, epoch boundary block) is a term used in some literature and can be understood as a synonym for "checkpoint".

# 15.Fork choice rule
The fork selection rule in Eth2 is LMD GHOST (Latest Message Driven GHOST, GHOST driven by the latest message). In this agreement, the fork with the highest number of votes will be selected as the chain head. Compared with the longest chain rule, the advantage of GHOST is that it can reduce the attack efficiency when the network delay is high, while minimizing the depth of chain reorganization. Even if an attacker can efficiently continue to generate blocks on his forked chain and try to make the chain the longest chain, the protocol will choose another forked chain with a higher number of votes.

# 16.Finalization
Finality means that two conflicting blocks (checkpoints) cannot be finalized at the same time. It can also be called economic finality. In Eth2, once two conflicting checkpoints are finalized, at least one-third of the active validators in the system will be punished. If two consecutive epochs are proven (or two consecutive epochs that skip an epoch), the first epoch is considered final.

# 17.Justification proof
Proof refers to the behavior of the verifier to vote on the checkpoint and determine the beacon chain head. If 2/3 of the validators (that is, an absolute majority) reach a consensus on two epoches, such as a source checkpoint (source) and a target checkpoint (target), then both checkpoints are proven. If two consecutive epochs are proven (or two consecutive epochs that skip an epoch), the first epoch is considered final.

# 18.LMD GHOST
LMD GHOST is the fork selection rule in Eth2. GHOST (Greediest Heaviest Observed SubTree) is actually an earlier protocol, widely used in PoW and other blockchains. The protocol only follows the "heaviest" subtree, the longest chain. In the Bitcoin context, the heaviest branch is the chain with the highest hash power and is considered the longest chain (canonical chain). LMD (Last Message Driven) plays the role of "message" through "Last Message Driven". The message is an attestation. The difference is that the fork with the most votes will be regarded as the canonical chain.

# 19.Proof of Stake (PoS)
Proof of Stake (PoS) is a consensus algorithm for public blockchains, which depends on the economic rights of the verifier in the network. In a public blockchain based on Proof of Work (PoW), participants who solve cryptographic puzzles are rewarded to verify transactions and create new blocks (ie, mining). In a PoS-based chain, a group of validators take turns to propose and vote for the next block, and the weight of each validator's vote depends on its deposit (ie, equity). The significant advantages of PoS include improved security, reduced centralization risks, and energy savings.

On Ethereum 2.0, activating a validator requires staking 32 ETH in the network.

# 20.Phase 0 Phase 0
Phase 0 is the first phase of Ethereum 2.0, that is, the start of the beacon chain (the beacon chain was created on December 1, 2020, Beijing time). Phase 0 realizes the transformation from PoW to PoS consensus mechanism by managing and coordinating validators. This stage will not provide functions such as sharding chain or execution, that is, participants cannot conduct transactions or call smart contracts in the Eth2 network at this stage.

# 21.Phase 1 Phase 1
Phase 1 is the second network upgrade of Ethereum 2.0 after Phase 0. The main goal is to start the shard chain and write data to the shard chain. Sharding is the key to improving the scalability of Ethereum, because it allows parallel processing of transactions and greatly improves throughput. The latest solution is to deploy 64 data shards in phase 1 (maybe more in the future).

# 22.Phase 1.5 Phase 1.5
Phase 1.5 refers to the merger period of the Ethereum 1.0 and 2.0 blockchains. In Phase 1.5, the Ethereum 1.0 chain will be merged into the Eth2 beacon chain with execution functions. At that time, all the functions of the 1.0 chain (including the use of ETH) will be implemented on the 2.0 chain without breaking data consistency.

# 23.Phase 2 Phase 2
Phase 2 is the third phase of Ethereum 2.0. In the previous roadmap, the plan for Phase 2 was to integrate the functionality of the entire 2.0 system and introduce virtual machines based on eWASM to provide an execution environment for shards to build scalable applications based on Eth2 and fully introduce the 1.0 chain 2.0, the proof-of-work mechanism is finally abandoned. In the latest "Executable Beacon Chain + Data Fragmentation + Layer 2" roadmap, Phase 2 has been temporarily shelved, but the possibility of a built-in virtual machine is still retained.

# 24.Sharding
The concept of sharding originally refers to the horizontal division of databases, which divides large databases into smaller, faster, and more manageable parts. In order to ensure decentralization, the blockchain needs to adopt a similar horizontal expansion method. Each sharding chain has a subset of nodes to work on the chain. Virtual miners and validators are assigned to different shards, and only process and verify transactions on their own shard chain. Eth2's short-term plan is to enable 64 shards, and it is expected that the cross-linking of the shards and the beacon chain will be realized in phase 1.

# 25.Shuffling mechanism
The main purpose of validator "shuffling" is to ensure the security of fragments. Since validators are scattered in different shards, some nodes may maliciously control a certain shard. The validators are shuffling, so that each shard block has a committee, and the validators are randomly selected. After mathematical calculations, if the attacker controls less than one-third of the total number of validators, it is difficult to attack a certain segment.

# 26.Slots
A 12-second period in which a randomly selected validator will propose a block. In each slot, a block may be added to the beacon chain and shards, but there may be no block generated in the slot. In each epoch, validators are randomly assigned to a slot and shards to form a committee. Except for a block proposer, other committee members are responsible for attesting the block. Each committee has at least 128 verifiers.

# 27.Surround vote
The FFG vote initiated by a validator surrounds the previous FFG vote or is surrounded by the previous FFG vote.

For example, suppose a validator initiates an FFG vote for the source checkpoint at slot 32 and the target checkpoint at slot 128 in epoch 5:
- In epoch 6, the FFG vote initiated for the source checkpoint at slot 64 and the target checkpoint at slot 96 is surrounded by its vote in epoch 5.
- In epoch 6, the FFG vote initiated for the source checkpoint at slot 0 and the target checkpoint at slot 160 surrounds its FFG vote in epoch 5.

# 28.Slashing
Punishment of verifiers means that if the verifier is proved to have breached, its (part of) pledge deposit will be destroyed. In the Eth2 stage 0 period, validators will be punished mainly for three malicious behaviors: double voting, surround voting, and double proposal. The confiscated verifiers will be stopped to continue participating in the agreement and will be forced to withdraw.

The destroyed pledge deposit will be proportional to the number of verifiers confiscated at the same time, so as to avoid the verifier from being excessively punished due to unintentional actions. Because the attack requires a large number of verifiers to participate, the more verifiers that are confiscated, the greater the possibility of being attacked and the stronger the punishment. The minimum penalty amount is 1 ETH, and the maximum penalty amount is the verifier's entire balance.

# 29.Validator
Verifiers can be regarded as "virtual miners" in the Proof of Stake (PoS) consensus mechanism. Users activate and manage verifiers by staking ETH. For every 32 ETH pledged, one verifier will be activated.

The verifier works through the verifier client, and the client operates with the help of beacon (chain) nodes. Each beacon node has the function of tracking and reading the beacon chain. And each verification client can perform the function of the beacon node or call the beacon node. A client allows one or more verifiers to perform verification functions.

## Verifier life cycle:
1. Pledge: 32 ETH has been deposited into the ETH1 deposit contract, and this status will be retained for about 7 hours. This can ensure security when the ETH1 chain encounters an attack.
2. Wait for activation on Eth2
- Before there are 327680 valid validators in the network, 4 validators can be activated per epoch (900 per day). After that, 5 validators can be activated per epoch. And for every additional 64,000 active validators, the number of validators that can be activated per epoch+1
- The number of activations is proportional to the number of active validators, and the upper limit is the set of valid validators divided by 64,000

## Active validator (Proof of Participation & Proposal of Block):
In any of the following situations, the verifier stops working
- Balance below 16 ETH (eviction)
- Voluntary withdrawal
- Confiscated
👍  , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
post_id89,135,569
authorevercoder2020
permlinkbeacon-chain-pos-sharding-you-must-first-understand-these-terms-when-contacting-ethereum-2-0
categoryhive-110112
json_metadata{"image":["https:\/\/cdn.steemitimages.com\/DQmTUaCUiasroAJ4s95PbtX4Wz2vofjwkw3RT38PvoQFiQL\/%E9%86%9A%E7%9D%80%E7%81%AB%E4%BA%86%E7%87%83%E7%83%A7%E7%9A%84ETH%E7%A1%AC%E5%B8%81%E6%AD%A3%E4%B8%8A%E5%8D%87%E9%86%9A%E7%9D%80%E7%81%AB%E4%BA%86%E9%86%9A%E7%9D%80%E7%81%AB%E4%BA%86.jpg","https:\/\/cdn.steemitimages.com\/DQmQU6NGjMkiN5zH8XJmQ4gtzFeErGVgeUBxDBd21uyT4An\/image.png"],"app":"steemit\/0.2","format":"markdown"}
created2021-01-17 14:56:09
last_update2021-01-17 14:56:09
depth0
children0
net_rshares39,200,920,708,466
last_payout2021-01-24 14:56:09
cashout_time1969-12-31 23:59:59
total_payout_value7.785 SBD
curator_payout_value7.696 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length14,762
author_reputation11,659,144,011,798
root_title"Beacon chain, PoS, sharding...you must first understand these terms when contacting Ethereum 2.0"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars0
author_curate_reward""
vote details (24)