Try   HackMD

EPF Dev Update (Week 15)

Hey, there!

This is a summary of my week 15.

What did I work on for week 15?

I worked on the function that allowed validators to withdraw stakes or rewards from the Elixir Consensus Client.

How do withdrawals work?

Every Proof-of-stake system needs a way for validators to withdraw their stakes and rewards. This was added in the Capella updrade; the first upgrade after the merge.

Push withdrawals are used to process withdrawals. That is, validators don't have to manually request withdrawals. It is processed automatically.

There are two types of withdrawals: full withdrawals and partial withdrawals.

A full withdrawal happens when a validator exits or gets slashed. When a validator exits they are eligible for a withdrawal after about 27 hours. It takes longer when they are slashed.

A full withdrawal effectively sends the complete balance to the validator.

Partial withdrawals are more common. This enables validators to withdraw their rewards while maintaining an effective balance(32 ETH).

It's possible to be eligible for both types of withdrawal and in that case, a full withdrawal is prioritized.

To be eligible for both types of withdrawal, validators need to have an eth1 withdrawal credentials.

There are two types of withdrawal credentials: the Bls withdrawal credential and the Eth1 withdrawal credential. The former was used when withdrawals were unavailable and every validator is required to make a one-time upgrade to the latter to be eligible for withdrawals.

An Eth1 withdrawal credential is a 32 bytes value where the first byte is the 0x01 called the eth1_address_withdrawal_prefix, the next 11 bytes are zero bytes and the remaining 20 bytes are an address and this is the address where withdrawals are sent.

What would I be doing for the next week?

  • Continue contributing to the Elixir Consensus Client
  • Work on adding test vectors to Pedersen Commitments and IPA in the constantine