Ethereum 2.0 staking these common questions, one time help you answer

Ethereum 2.0 staking these common questions, one time help you answer

Loading

This article sorts out the common issues that need to be paid attention to in Ethereum 2.0 staking.

Original title: “Introduction | Beacon Chain Staking FAQ”
Written by: EthFans

The main purpose of this article is to remind everyone of the risks of participating in the Proof of Stake (PoS) project called “Ethereum 2.0” or “Eth2.0”, and hope that this explanation will help you understand itself. Given that the project currently has a specific form, only one of its design components, the “beacon chain”, will be used below to refer to the so-called “Eth2.0”. I believe you will understand this choice after reading the answers to these common questions (and the accompanying materials).

What basic concepts do I need to master?

What is Eth2.0?

Eth2.0 is a blockchain architecture proposed by the research team of the Ethereum Foundation (“EF”), which aims to realize a blockchain with proof of rights as a consensus mechanism and fragmented execution. This part of the research is derived from the vision (a blockchain that realizes the proof of equity consensus) that EF has been public since its establishment and has been led by the EF research team. According to expectations, after such an architecture is available, its startup status will be It inherits the account status of the current Ethereum Blockchain Mainnet at a certain moment, so it is called “Ethereum 2.0”.

In terms of implementation steps, EF’s plan is to launch in three phases, each phase adding a component and part of the function. So far, the design of the third phase (“Phase 2”) has not been fully completed; the technical goals of Phase 1 may also be adjusted.

At present, what ETH holders on the Ethereum blockchain can participate in is the “beacon chain” operated by a proof-of-stake (PoS) mechanism. In design, the beacon chain is the core of the entire fragmented execution system, but this core does not perform functions (we will see the impact of this later).

See details

What is a verifier?

When talking about the beacon chain, the validator is a participant in the PoS consensus process (just like the miner who submits the proof of work in the PoW consensus). The beacon chain verifiers form a blockchain by voting on blocks, and get block rewards after completing the consensus.

What is the proof-of-stake consensus mechanism?

Proof of Stake (Proof of Stake) is a type of consensus mechanism: it determines the probability of becoming a block producer and the voting weight when voting on the block based on the amount of resources in the system (such as tokens) occupied by participants; obtaining majority participation Blocks supported by the owners become part of the main chain; and the supporters of the main chain blocks will also receive additional tokens as rewards.

The PoS mechanism used by the beacon chain is “Casper FFG algorithm” + “LMD-Ghost bifurcation selection rule”. The two sets of rules jointly define what the verifier should and should not do at different times. Follow the guidelines of the rules to get rewards, and violate the rules will be punished.

How often does the beacon chain generate blocks?

The basic time unit of the beacon chain is not “block”, but slot and epoch. A slot is 12 seconds; an epoch is 32 slots, or 6.4 minutes. Whenever an epoch is terminated, the validators assign each validator to a certain slot of the next epoch according to predetermined rules (and the current state of the beacon chain) to participate in voting (called “witness (“) Attestator)”); At the same time, each slot will also have a dedicated validator responsible for proposing blocks (called the “proposer”). If the proposer of a slot is offline at that time, the slot cannot be produced, forming a “missed” slot. Therefore, it is uncertain how often a block is generated on the beacon chain. Ideally, a block can be formed every 12 seconds.

So is the reward for the validator issued every time a block is generated?

Not really. The reward and punishment for the validator is to be settled every epoch. Whenever an epoch ends and a new epoch starts, the verifiers will settle the verifier rewards and punishments of the epoch according to predetermined rules, thereby determining the voting weight of different verifiers in the new epoch.

How to become a verifier?

First, you need to send ETH to the deposit contract 0x00000000219ab540356cbb839cbe05303d7705fa on the current Ethereum blockchain and provide the withdrawal public key and verification public key that you arranged for the verifier, and then wait about 7.5 hours to register as a verifier . After successful registration, your validator will have to queue in the candidate queue for a period of time before actually participating in the PoS consensus and getting rewards. The length of this time depends on the length of the queue (because each epoch can be entered from the candidate team ” The number of validators in the “Active Validator” set is limited).

The operation here is very complicated, please do not do it manually by yourself, be sure to use the verifier quick launcher to complete the deposit deposit operation . Please look for this website and check the address of the contract to which your transaction is sent. Do not deposit tokens other than ETH.

Secondly, you need to have a computer that can ensure that you can control, have stable power and network supply, and have a certain level of hardware, run a kind of client software, and the software will control your verifier’s private key and participate in the beacon chain in real time. consensus. Specific requirements can be found in the “Operational Recommendations” section below.

What is the verifier key?

There are two pairs of key pairs related to a beacon chain verifier. One pair is called a “verification key pair”. The private key of this key pair is used to sign and send witness messages when the verifier participates in the consensus. ); The other pair is called “withdrawal key pair”. The private key of this key pair is used to retrieve the funds under the verifier’s name after the verifier completely exits the verifier team.

Both private keys need to be kept by themselves. If the verification private key is leaked, others can use your private key to send a witness message, which will cause your verifier to be severely punished; if the withdrawal private key is leaked, others can exit from your verifier After that, you first take away all the funds that belong to you.

Both public keys need to be submitted to the deposit contract when depositing the deposit (again, unless you know the relevant cryptography and smart contracts very well, please use the official guidance process and the tools provided to complete the operation. ).

What client software did you just mention?

Yes, you need to run some software, which will host your verification private key and constantly send and receive messages on the network to participate in the PoS consensus of the beacon chain. After all, from the perspective of the beacon chain (other verifiers), a verifier is a key pair that has some money under its name and needs to continuously send witness messages. If you do not participate in the consensus, your money will be lost. .

Specifically, your computer needs to run two kinds of software: (1) “Eth1 client”, such as Geth, OpenEthereum, Nethermind, TurboGeth; (2) “Eth2 client”, such as Lighthouse, Prysm, Teku, Nimbus. You only need to select one of the two categories.

Different software has different performance, different hardware requirements, and different compilation difficulties. As for its security, I’m sorry, there is no way to endorse the security of any software. Here are some deployment tutorials:

Rewards, punishments, risks

I want to participate in the beacon chain. I heard that early participants have a high rate of return. Is it true?

The Quick Starter website also provides a rough tool for calculating (in a purely quantitative sense) annualized rate of return. In a word: the additional issuance rate of assets on the beacon chain is inversely proportional to the sum of the validator’s effective balance; the lower the effective balance (the initial deposit is less), the higher the issuance rate, and the annualized return of the validator The higher the rate, and vice versa.

The effective balance can be regarded as the verifier’s voting weight, and the verifier’s existing balance (how much money can be retrieved if you withdraw right now) are two concepts. ( Introduction can be seen )

In addition, on the beacon chain, the rewards are not evenly divided. Casper FFG and LMD-Ghost have formed a set of quite complicated rules, and rewards and punishments are arranged for each validator in each epoch. Therefore, you It can be said that the rate of return of each verifier is different, and some verifiers can obtain a higher rate of return than the average of the entire network.

However, there are other factors that prevent you from simply thinking of it as an “ETH-based annualized rate of return”, because as mentioned earlier, in terms of design, the beacon chain only has the ability to form a consensus, but does not have the ability to execute, so users The income obtained on the beacon chain cannot be transferred on the beacon chain; secondly, at the current stage, these income (and principal) cannot be returned to the Ethereum blockchain; finally, these are supported at the protocol level The circulation of income and principal must wait until the system with the beacon chain as the core has the execution function, and there is no clear timetable for this. (From the current point of view, it is unlikely that the executive function will be launched within a year. Even if everyone aims to achieve availability as soon as possible, they will face some conflicts between short-term and long-term needs.)

What are the rewards and punishments? I heard that as long as you are not offline, you will be fine?

The design philosophy of the beacon chain (Casper FFG + LMD Ghost) is: after the verifier’s deposit is seized, the verifier can be punished to deter destructive behavior; at the same time, the difference in rewards can also be used to encourage them to cooperate with each other .

Penalties can basically be divided into three categories:

(1) For behaviors that undermine consensus, for example, a proposer proposes two different blocks in the slot where it is located (double proposal); double voting and surround voting when performing Casper FFG voting; such behavior is the most serious and will Trigger the so-called “Slashing”;

(2) The penalty for offline verifiers is called “slow work penalty”. In the period when the network is final, the punishment will be relatively small, roughly equivalent to the reward you would get if you participate in the consensus (if you participate in the consensus, you will get 3 yuan, then you will deduct 3 yuan if you do not participate) . In the period when the network does not have finality, this penalty will continue to increase with the extension of the lack of finality.

(3) In the period when the entire network lacks finality, online verifiers will also be punished, but the intensity of this punishment is fixed and will not increase. So it’s not that you’ll be fine if you’re always online. If a verifier makes a large-scale error, your normal verifier will also be punished, but you will be punished less. (The reason for this design is to prevent verifiers from deliberately not spreading or packaging other verifiers’ testimonials to make a profit during a period of lack of finality.)

How to define “offline”? The answer is that at the end of an epoch, all blocks in the epoch do not contain a verifier’s witness message, and they are considered offline. Therefore, the “online” requirement is not particularly strict.

The reward is simpler:

(1) As an online block proposer, you can get “block proposal reward” and “whistleblower reward” (if the packaged block contains the report of the confiscated behavior, the block proposer can get This part of the confiscated deposit; in the subsequent development, this design may be changed)

(2) As an online witness, you can get the normal “FFG Voting Reward”.

Among them, the more witness messages packaged by the block proposer in their own block (required messages to be packaged for the first time), the higher the “block proposal reward”; and after the witness sends the witness message, the witness message The faster it is packaged, the higher the reward the witnesses will receive-this is to encourage the verifiers to cooperate with each other.

  • The most detailed introduction about the rewards and punishments of beacon chain verifiers
  • About Capser FFG (finality, double voting, vote surround) of the Introduction

How strong is the confiscation?

The behaviors that will be confiscated are: double proposal block, FFG double voting, FFG surround voting.

After being confiscated, the confiscated verifier will face three penalties:

(1) The one-off basic confiscation executed at the time of confiscation; 1/32 of the validator’s effective balance (on the current beacon chain, the confiscation and punishment are weakened, and may be increased in the future ; By the way, this matter has not been discussed publicly)

(2) Continuous “offline punishment”; this is because the state of the confiscated verifier will be forced to change to “slahing”. In this state, he will be punished for each epoch (fixed intensity) It is 3 times the basic reward); after the verifiers who are to be punished are “exicted”, this punishment will be suspended; (this time is positively related to the number of verifiers waiting to withdraw)

(3) After the confiscated verifier turns into a completely exited state, he still needs to wait 8192 epochs to retrieve his remaining funds. During this period, the system will also be within 18 days before and after the time the verifier was arrested. The amount of confiscated deposits imposes further penalties. If the amount of confiscated deposit exceeds 33%, the penalty can be as high as 100% of the effective balance (that is, up to 32 BETH).

If I neglect and let my verifier stay offline, will the deposit be fined to 0?

Generally speaking, no. When the valid balance of the validator is less than 16 BETH, the validator will switch from the “active” state to the “exit soon” state, and wait for the queue to exit.

However, it is worth noting that validators who are about to withdraw still need to submit their witness messages normally. If they do not, they will still be punished by sabotage and will continue to lose funds during this period until they completely withdraw.

Can my verifier opt out?

Yes, 9 days after becoming an active verifier, you can initiate an active exit request, change the verifier status to about to exit, and enter the queue waiting for exit.

Can I get my remaining funds back immediately after the validator is completely withdrawn?

No, if you are not confiscated, you can withdraw funds after you completely withdraw and wait 256 epochs; if you are confiscated, you have to wait 8192 epochs. But it should be noted that at this stage, the funds still cannot be transferred.

Can I still join as an active validator after I completely log out?

Regrettably, in the current beacon chain, regardless of whether it is confiscated, actively withdrew, or passively withdrawn, the relevant key pair can no longer become a verifier. However, you can replenish the deposit for your verifier through the deposit contract on the Ethereum blockchain when your verifier is still active (but this supplement is not instant).

In addition to the risk of being punished and the risk of developing a route, what other risks are there?

The most obvious is that there is also the risk of client software implementation, that is, client software may go wrong. If you use the wrong client, of course you will be directly affected; but even if you don’t use the wrong client, it may still be indirectly affected because of too many validators dropped and the network lacks finality.

When may the beacon chain open the transfer function? What technical difficulties are still facing?

The completion of any function can enable the beacon chain to open the transfer function: (1) Let the beacon chain have a pure transfer function (or even only enable the transfer function between validators); (2) Realize the Ethereum blockchain and The merger of the “beacon chain-sharding” system.

The former may be simpler, but it does not meet the long-term goals of the project and violates the project’s commitment to participants (increasing hardware requirements); as for the latter, it obviously requires longer development time and time to seek social consensus.

Moreover, no matter what technical goal is chosen, it must take a long time to make it safe enough. Therefore, I personally do not expect to open the transfer function within a year. But this is just my personal opinion. And there are many variables.

Operational recommendations

If I operate the verifier myself, what kind of hardware do I need?

You need a good CPU, 16 GB of memory, solid state drive (for insurance, consider a scale of 1 TB and above), and a stable power supply and network supply. If there is no large-scale offline event, positive income can be guaranteed for more than 50% of the time online (but don’t be offline for a long time).

# Can I put the private key in the hardware wallet?

Your withdrawal private key can be placed in the hardware wallet, but the verification private key must be placed in the client software to ensure that the witness message is issued normally.

Is it possible to work hard on the hardware architecture or private key generation to improve security?

Yes, but the related methods are very professional, please be sure to seek professional help.

For example, the verifier client itself can be said to be a signer, then you can isolate the signer from other functions to ensure that the signer is not exposed to the Internet. and many more.

Is there a decentralized third-party operation plan?

No, all third-party hosting plans require you to trust the third party. For example, if a third party escrows your verification private key (you keep your own private key for withdrawal), you must still trust the third party to properly operate the verifier and not cause you to be confiscated (so between you and the third party must Realize the distribution of responsibilities). If you directly hand the money to a third party and do not even retain the private key for withdrawal, the degree of trust is even greater (equivalent to depositing money in a centralized exchange). At the moment, no one can cash out BETH.

What about adding some smart contracts and tokens?

No, smart contracts and tokens can only allow you to obtain a one-to-one token corresponding to the number of beacon chain assets on the Ethereum blockchain, but the additional issuance information of the token is still input by the information input mechanism, and this information input mechanism also requires trust (Because there are too many variables of income, service providers also need a certain degree of centralization to protect their own interests, which is inevitable).

other

Is there any tool for me to check the current situation on the beacon chain?

Block Explorer 1 and Block Explorer 2 .

However, the terminology used on the website may differ from the one provided here.

Do verifiers have to queue in and out?

Yes, the design of the beacon chain PoS protocol itself makes the network very unstable. Therefore, both entry and exit need to be coordinated by existing active validators.