WinDeveloper Coin Tracker

How to Stake on Ethereum 2.0 Mainnet

Alexander Zammit

Alexander Zammit Photo

A Software Development Consultant with over 20 years of experience. Involved in the development of various Enterprise software solutions. Today he is very focused on Blockchain and DLT technologies.

  • Published: Nov 17, 2020
  • Category: Ethereum
  • Votes: 5.0 out of 5 - 4 Votes
Cast your Vote
Poor Excellent

This November Ethereum 2.0 hit another milestone, the release of the mainnet staking deposit contract. After multiple test launches, we are getting ready for the Phase 0 main highlight, the mainnet Beacon Chain.

The various test networks so far gave us an opportunity to try this out risk free. However, this time round we are dealing with real ether.

Of course, the staking contract was deployed where real ether lives today, Ethereum 1.0. We can find this at the address 0x00000000219ab540356cBB839Cbe05303d7705Fa. Here, we can see that this was deployed on 14th October. It only started receiving deposits on 3rd November, with deposits taking-off on the following day when the announcement was made.

Some important facts:

  1. The beacon chain target genesis date is 1st December 12pm UTC. Genesis is the event when the beacon chain springs to life processing blocks and validator attestations.

  2. Genesis will only happen if at least 16,384 validators deposit 32 ETH to the staking contract for a total of 524,288 ETH.

  3. This threshold must be reached at least 7 days before the target genesis date. Otherwise genesis will be postponed. If postponed, genesis will happen 7 days after that the required deposit threshold is reached.

At the time of writing (14th Nov) the contract balance is at 67,072ETH. For genesis not to be postponed the outstanding ether must be deposited by midday 27th November. Deposits are expected to accelerate significantly as this date approaches.

 

The Staking Process

Staking can be done either directly or by joining a staking pool. Hopefully, many will stake directly since that is what brings true decentralization. Direct staking is done through the launch pad. This wizard is nearly identical to the one used for the testnets.

Ethereum 2.0 Launcpad

We start with 10 click-through-steps that help us understand what the process is about.

Accept Staking Conditions

We start by accepting that staking will involve depositing 32 ETH.

We must also accept the possibility of losing part of this stake, which loss may be significant if we are somehow deemed to be acting maliciously or contrary to the specs (slashing). This is further emphasized in the same wizard when we are reminded that as early adopters, we are risking slashing because of software bugs (ouch!).

Another point highlighted here is the fact that our stake will not be withdrawable until Eth 2.0 phase 2. This is no minor detail. Whereas phase 2 should happen in around 2 years' time, one should also keep in mind that phase 2 is still under research. Stake transfers will become possible in phase 1, however. Until then, one must make sure to keep one's nodes running and fulfilling their duty.

After clicking through the 10 steps, we get to the Eth1.0 client selection step.

Eth1 Client

Our Eth2.0 nodes will require monitoring the Eth1.0 chain. Instead of running our own Eth1.0 node, we may consider relying on some external service. However last week's Infura outage was a good reminder that this is not a risk-free option. I personally recommend running your own Eth 1.0 node and consider external services as a backup.

Syncing to Eth 1.0 may take a few days. Indeed, one should get the Eth 1.0 node sorted before going through the staking wizard. I wrote about this in, Running an Ethereum Node for Software Development.

The next wizard step provides us with a selection of Eth 2.0 clients for running the beacon and validator nodes.

Eth2 Client

Here, it is worth appreciating the importance of having multiple client implementations. Again, Infura's outage helps explaining this point. This outage is being attributed to an older Eth1.0 Geth client version unexpectedly forking the chain.

The moral of the story is that if a large portion of nodes run the same client software, a problem within that client could cause some serious trouble. On the other hand, if the blockchain is composed of a well-balanced mix of clients, a problem in one client type would not compromise enough nodes to threaten the blockchain availability.

Even so, today Prysm is the most popular Eth2.0 client. I admit this was the client type I ran myself for the testnets and so did many others. To help making Ethereum more resilient, it is advisable to pick another client type and balance things out.

With the Eth2.0 client selection sorted, we move to the next Wizard step, Key generation.

Key Generation

Here we specify the number of validators we intend to run and our platform. Based on these selections, the page will show the command needed for generating our keys. Here I selected 1 validator and the Windows platform and got back the command:
deposit.exe new-mnemonic --num_validators 1 --chain mainnet

Running this, requires us to download the deposit executable. Click the "Download from Github" button and scroll to the download selection:

Download Deposit Tool

Here I am simply downloading and running the executable for Windows. So, I just extract the file and run the command provided by the wizard.

Running deposit.exe we are prompted to select the language and to specify a keystore password. In return we get a 24-word mnemonic. This mnemonic is extremely valuable and should be saved securely. In case we lose our keystore, the mnemonic would allow us to recover our keys.

Key Generation

The deposit application will finally generate two files. Look for these at the indicated path (D:\ETH2c\validator_keys). I got:
deposit_data-1605394666.json
keystore-m_12381_3600_0_0_0-1605394666.json

We now go back to the Eth2.0 launchpad wizard that we left at the Generate Key Pairs page. Hitting continue at the bottom of this page we get to the Upload Deposit File page.

Upload Public Key

To complete this step just drag and drop the deposit_data-* file just generated. Make sure to upload the correct file! Note that here we are in the process of associating the newly generated keys to the 32 ETH deposit which we will be completing next.

Deposit Ether

And here my friends we have reached the moment when we must fork out our 32 ETH. I have not staked any ether myself so I cannot keep showing screenshots from the mainnet launch pad.

However, since I did complete this wizard for the Medala and Spadina test networks, I can tell you that the few steps that follow involve:

  1. Select how we want to connect to our wallet.
  2. Confirming that we really want to go ahead with the deposit.
  3. Submitting the transaction through which the 32 ETH deposit is completed.

If everything goes fine, our transaction will be confirmed. Congratulations! We just earned ourselves the right to run one validator! And now the hard work begins. Time to make sure all the nodes are ready for genesis. But that is the topic for another article...

 

User Comments - Page 1 of 1

Add New Comment...

Melvin 8 Feb 2021 22:30
Thanks very well explained
Copyright 2021 All rights reserved. BlockchainThings.io