Life of An Ethereum Beacon Chain Validator | Hsiao-Wei Wang


thank you cc for the
introduction so beacon chain is the core chain of the Ethereum 2.0 and today I’m going to
talk about the life cycle of the Beacon validator so first of all just a
quick recap of where we are right now This is the current serenity design for Ethereum
2.0 you can see that there will be four layers so on the top is the Ethereum 1.0 proof of work chain that we are using right now and there is the beacon chain that I’m going to
focusing today the beacon chain will provide the proof of stake and also it will be
the random number generator and you can see that the shard chain is under the beacon chain we
are design like for like 1024 shard chains will be there and
so please know that those shard chains are only for data there they don’t have
a in protocol state exclusion and then we will add the state exclusion
engine on the shard chains no this is the whole picture now you can have a good
overview of it and so today I’m going to focusing on the beacon chain so here’s the
roadmap overview that you can see it’s a simplified roadmap so we are still here
so the phase 0 everything we’re focusing on is the beacon chain design and the implementation and shard chain will be in phase one and the shard chain could be
utilized with layer 2 which Vitalik will talk about that later and
then from the phase 2 the shard state execution engine will be
introduced there and also the cross shard transactions and after the phase two we
assume that the base protocol will be fine and useful and then we can do more
iterations on Eth2.0 shard chains there are some iterations idea for example like
Casper CPC and make a STARK friendly system so let’s talk about the beacon chain
so to introduce the beacon chain validator the first question here is that why we
want to be a validator so of course there will be some rewards to trigger
you to join so the first obvious reward to trigger you to join here is the block proposer reward
so it’s something like in the Eth 1.0 chain as a miner you can include more
transactions and the transactions fee will be given to the miners and then in
the proof of stake chains the validators are also be incentivized to include
more validators’ votes and the transactions oh sorry
and the transfers we call those votes are attestations so attestation is a
data structure that point out that what did the validator vote for
so it includes signatures that validator attest so to tell others that which beacon chain is the valid chain they think it is and there are also
transfers also for the block proposer we have a special reward called whistle
blowing it’s like you can report others other malicious validators if you did
something very evil bad and you can report them tell them that everyone that
this is a bad one bad guy let’s punish her or she then then you will get
his slashed Ether to be your reward and then there are the Casper FFG reward the Casper FFG reward is the reward to reward that if you are
voting on the correct beacon chain so by the correct that I mean the canonical chain so if you are a validator so I see two beacon chains they are both valid if you but you will need to vote on the
one that would be more likely to be the canonical chain to be accept by the
whole internet and the last one is the crosslink reward so the crosslink is a data
structure that we use for describe that you vote for some specific shard chain so
um I’ll talk about that later one day later they will be responsible for
attesting one shard so they will need to make the crosslink and if that shard chain is really the canonical chain, they will get rewarded for that and then the second question is that how
to become a validator let’s see that first of all
how do you join the staking there is a deposit contract on the Ethereum 1 chain
the user can make up transaction to make a deposit of 23 Ethers (should be 32) on the contract
so and then this 20 sorry 32 Ethers will be locked in the contract
and every time there’s a new deposit being made there will be a log event
that will on the Eth 1 chain receipt As a beacon chain validator they would
need to keep track of the state of Eth 1 contract so and especially watch the
event log of the deposit contract you can use some Eth one light client to keep track on that so okay so here I am I’m making a deposit
and then the beacon chain validators we will check if this validator has already made a deposit of enough balance on the beacon chain and then they can’t be added immediately they have to wait for like
for like 25 minutes and then we call that the validator is active right now then let’s talk about the shuffling so um
once the violator being added into a big large validator list then they got activated there will be shuffled into several small
committees so please know that the whole system will have only one big validator list and they will got shuffled into this pseudo randomly sampled but two
different committees and each committee is assigned
to be responsible for verifying one certain shard chain and it’s for one
certain block or slot in the spec is active okay so now imagine that you
have ready be a validator and why would you what should you to to gain some more
incentive or some more reward there are two main responsibilities for the validators
the first one is proposing a valid block so you can see the right this this
here is the data structure of beacon block and beacon block body so the most interesting thing here I think
it’s the RANDAO reveal and the Eth1 data here
so the RANDAO reveal is that so every validators when it’s their time to
propose a block they have to reveal their RANDAO it it’s a hash value that will be contribute to provide the entropy to generate a seed and the
the protocol uses that seed to generate random numbers so that’s how the Eth2.0 random number generation being executed also they have to choose the best vote of Eth1 chain references from Eth1Data data structure in
their proposal another important job for validators is creating the
attestations so you can see the attestations like votes I think it’s a fear
to understand a validator has to vote for what the current view of the chain in
the client side there are three different chains
that a validator has to know about the first is the Eth1 proof of work chain, they can use the light client to know the current head of the Eth1 chain and the
second one is the beacon chain and as I said every active validator they are responsible to attest for the shard chain so
they also have to vote for the shard chain here and that that message we’ll call
that crosslink so I talked about the rewards but also there are also the
penalties and slashes that triggers the validators to be honest because if they
do something bad they will get slashed they’ve got punished by reduce their
balance the first thing is that Casper FFG penalties so we talked about
that the the one that contributed to the finalizations will be rewarded also if
you’re not contributing to finalization they will got punished by by reducing their balance here and if the beacon block is not being
finalized normally that means they probably the last finalized epoch will
be very long time ago then there will be a penalty we call inactive
penalty so that will be applied to validators because they didn’t do
their job well okay so and also the cross-link penalty
are with respective of the shard chain part there are two types of the slahsing
messages here there are the proposer slashing and the attester slashing when after they sent their attestations the attestations
is in includes their own signatures so they have to be responsible for that
certain message what they attested what they claim that is real if they claim it’s real but actually they are not
they will report it by the slashing messages so the other users they can
create the slashing message to report that hey this user is not good he
voted two shard chains in the same time and then so in that case they will got
punished too – and in the phase one we’re introduce the proof of custody and penalties so
it is kind of you know kind of the challenge and response game in that for
example is for solving for reduced the data availability problems so for
example because in the shard chain there will be only data there are no
certain state root in the shard chain so if I claim that I have this value I have the
data of this shard block but actually I don’t have and then you will ask do you the
others guy will ask do I have the shard block they will challenge me and I as a
prover I have to prove that I really have that so that’s the proof of custody
game here so if I don’t have but I lied then got punished too something
called the validator churn validator can’t just join or
leave the chain immediately there are two waiting queues here one is the
activation queue and one is the exit queue the reason why it is here is for the
stability and the chain liveness so we can’t accept the validator list and the committee’s being changed so frequently so um so the each time when the validator registry update
happens the validator that can could be activated or the deactivate is based on
this formula which is based on the total balance not every validator can leave as soon as
possible oh if I want to leave I have to create a
voluntary exit message and then broadcast it to the Internet and I also
can’t be leave immediately I have to become time to withdraw my balance right
so but in the phase 0 there would be a state called the withdrawable state so
because that the shard chain state execution
is not here yet so in phase 2 when we add the state execution engine the withdrawable will be withdrawn to the shard chain let’s see the life cycle of the
validators so I was here I activated this read the slashing message means
that I got slashed and then I have to wait for five minutes
to be exit and then if since I am I was slashed I want to withdraw my money in that
case I have to wait for 36 days then I can withdraw and for the case that if I
got penalized over and over time my balance was 32 Ether but now it’s only 16 Ethers
so my I don’t have enough balance I will also be kicked out that without
ejection and in that case I won’t wait for 25 minutes and I’m going to a state
called slashed and exited in that case have to wait for 27 hours and note that
and there’s a first in first out queue here that means that the
waiting queue and then you have to wait for another 27 hours then being the
withdrawable state and the last case is that I just want to leave no
one slashed me in that case I can send a message to that network and say if after
ready to exit and we have to wait for 25 minutes and then being in
the same status oh and I activated I can’t leave I just joined the validators pool I can’t immediately leave I will also have to wait for 9 days so um
the whole design is for the stability of the network and um there are some known computations
and network requirements here the first thing is that um right now we are
targeting on the worst case is 4 million validators that’s a huge
number in a single data structure and leads to a huge overhead of the validator
committee shufflings and also the state of the beacon chain won’t be as large as
Eth one EVM state but it’s still many messages to handling a huge single
validator list so the cache manager may be very important here the second thing
is the network propagation and shuffling so as I said that there will be many
different types of transactions but not everything you need to everyone to know
some message we have to be known by some a group of people some messages only
needs to be stay in the shard chain levels so on the case there which means that we
have to build like 1000 shard network for each chains so imagine that there will be 1024 shard networks then I know validators I have to shuffle between those
networks that cost only a lot of overhead and the last thing is the BLS signature aggregation so um we expected that the minimum committee size is 128 validators but if it’s the worst case with 4 million validators it will lead to 65,000
individual signatures per seconds so imaging that how one client on the laptop
handle that you can’t so we need to aggregate the signature in the shard chain
levels so in the best case the each block the validators only have to
handle the attestations not already being aggregated by the by each shard chain networks if you want to see more and you can see that link for
more information for the BLS signature aggregation so so everything
I’m talking about is happening right now there’s a very active
implementation and research on the Eth 2.0 spec on the Ethereum repository and also we have the
community call every two weeks on the eth2.0-pm and important thing is that we
have that more than 9 teams are building their beacon
chain client based on spec yeah you can see the link to find out what those 9 teams and today we have not just me the client implementors. I can’t see that can you wave? No? Proto, hi Proto. Oskar, Oskar okay if you are interested in client implementation you can also reach them out. and myself working on the research team we are working on the Python implementation for Eth2.0 and happy to talk if you want to
contribute to Trinity or you can follow me on Gitter ok then thanks to the slide reviewers
the vbuterin, the Danny Ryan, and protolambda here. Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *