DEV Community

Cover image for Epoch - Ethereum 2.0
Stipe
Stipe

Posted on

Epoch - Ethereum 2.0

Greetings!! This is the first article that I plan to publish about random things Ethereum 2.0. In this article boss of the hour is Epoch. You will find out what is epoch in Ethereum 2.0 proof of stake, and what role does it play.

Ethereum Epoch is a time frame during a set of validators activities are happening.

Activities:

  • Validators propose blocks
  • Validators attest blocks proposed by others

Each epoch is divided into smaller time units, called slots. One epoch has 32 slots. Each slot lasts 12 seconds. Meaning each epoch lasts approximately 6.4 minutes.
One epoch therefore will have 32 blocks, and each slot will have one block.

In each slot there is one validator that is assigned to propose a new block, and a committee of validators that attest validity of that block.


Imagine a hotel named "The Grand Ethereum hotel". Each night, the hotel's kitchen team of chefs works together in a organised way to prepare a set of dishes for buffet dinner for hotel guests. Kitchen operates on a precise schedule to ensure fairness, efficiency, and culinary excellence.

Let us imagine one epoch is one night, or one dinner service. Therefore each epoch represents one dinner service over entire year.

For each slot, a team of chefs is involved. Among them, one chef is randomly chosen to be the Lead Chef for that slot. Selection process is fair, unpredictable and random, ensuring every chef has the opportunity to lead.

The chosen Lead Chef for that slot is responsible for making key decisions, coordinating the team's actions, and creating a dish (proposing a block).

Supporting Chefs' Role: The other chefs act as committee (attesting validators). They assist the Lead Chef by checking and supporting their decisions and actions, making sure everything is cooked perfectly. They attest the dish before it is given to hotel guests.


To summarise once again, In Ethereum 2.0, epoch consists of maximum 32 blocks. This means every epoch is composed of 32 slots, with each slot potentially holding one block. Slots occur every 12 seconds, making each epoch approximately 6.4 minutes long. Validators work within these epochs to propose and attest to blocks, ensuring the security and consensus of the network.

Top comments (0)