An Outlook on Block Explorers and the Beacon Chain
ETHCC 4 · July 2021 · 20:03
Stefan Starflinger examines the challenges facing block explorers as Ethereum’s Beacon Chain develops. He discusses different ways to run validators and monitor their activity before the Beacon Chain and mainnet are combined.
Speakers
Topics
From ETHCC 4, hosted by Ethereum France.
Transcript
i'm here from vienna i work for bitfly and i work on the beacon chain explorer today i'm gonna talk a bit about um our explorer i'm gonna give an outlook on how block explorers are gonna change or how they must kind of adapt to um kind of the merge that's coming up and then in general i'm going to talk a bit about also how to run a validator so first the beacon chain explorer i'm going to give you a bit of an overview for that so we started developing the beacon chain explorer at the end of 2019 we were kind of part
of most of the test nets it was the first speaking chain explorer and then etherscan also created one called beacon scan and the main goal for us is to kind of give the user a better idea of what's going on in the beacon chain instead of just queering the note itself all the time we wanted to kind of help him navigate what's going on in a really easy to digest manner and that's kind of the goal for us at beacon chain um we created this explorer and made it open source for people to kind of spin up and play around with themselves
and it's kind of with the decentralized ethos and right now we have around half a million page views per month and here you can see kind of like the the landing page and the services we offer um i'm going to go into that but first i'd like to maybe kind of get a feel for how many people are actually running a validator here if you could maybe raise your hand so that's about one two three four five people are running a validator how many people have gotten slashed so far okay that's good i guess and how many people would like to run a validator or are thinking of maybe running a validator that's around three people okay so that
talk is for you guys more or less and what we basically offer is kind of a way to kind of explore the current state of the beacon chain past state you can view your validators you can you view your earnings what's going on and you can also have like general an analytical overview of kind of how the finality is right now how much participation there is in the network over time we offer alerts so if you're running a validator you can kind of set up alerts if you will create an account with us and then if it goes offline or if you propose a block you will get a notification either email or through our mobile application
and we also offer api services and these api services are if you are building an app and if you would like to integrate some information from the beacon chain into your application then you can without running your own nodes you can use that and on the side here you can basically see kind of the current view so um you can see if the epoch is finalized you can kind of see what how long ago it is which is the participation and how much eth was used to kind of validate this how many validators and how much ethers staked at the moment and at the bottom you can see the most recent blocks that were
proposed which proposer proposed the block and you can see how many at the stations aggregated accusations there are to next i'm going to talk a bit about the infrastructure it's still quite simple that we use so we run each of these services basically in an individual virtual machine we have a prism node and then um we have an in furore if well we kind of outsource that and use an if insurer is one node and that basically goes then to an exporter or that information we extract it and the exporter is just a go program that we wrote
and it writes everything into a postgres database and then the extracted information we can query all of that from our front end go that we just kind of inject into some templates and then we can show that to the user that's basically just an overview of how we run the explorer and later on if it gets a bit bigger kind of with the challenges since running a prism node uh with all of the information not it we set it so it doesn't prune information so ours is currently nearly 600 gigabytes in size that's quite a lot for the average user or it might become quite a lot for the average user this is just
half a year but in a year or two years this will be quite quite a lot more to get all of the information to extract all of it so you can query it later and then uh i mean we're using infuria but just to get a feel i added uh kind of like an archive node which is 1.4 terabyte and then our database which is two terabyte right now so that's kind of a bit of a challenge to keep this also a bit decentralized and later on with the sharding this will be even more challenging as even more and more data is produced the more on ethereum scales the next thing that's a bit challenging is running and maintaining all of the nodes with all of the updates and one of the even bigger challenges is
the number of validators as they grow the much much faster and the much much slower our um exporter has to be and much much faster the export has to be and much slower the exports become so we always have to tune and optimize the exporter to keep it up to date and we've had some other people spin up explorers and they just start lagging behind if you don't maintain it next i'm going to give just a brief overview of the beacon chain so we've worked on this explorer to kind of represent phase zero of the beacon chain um and that's basically the first step from the proof of work to the proof of stake and it uses uh kind of the greediest heaviest
observed subtree ghost algorithm to kind of quickly and fast create new information so it has liveness and then lagging behind to create finality we have the casper algorithm that also looks instead of just proposing blocks it also looks at the attestations and how many people actually believe this is the canonical chain and in the end the beacon chain right now it just mainly consists of epoch slots and validators and access kind of like as previously mentioned the coordination layer and then to a bit of the history that went through with the explorers the different test nets that we supported so
we had a test net for zinc in spadina and medulla and these test nets were not always perfect they had quite a few issues that were worked on by the client teams for example during medalla there was quite a long period where finality was not found because of a clock issue with prism which was one of the main clients that was used i had a kind of a clock issue with using i think cloudflare and then i think half the network went offline so far in the mainnet we did not have that luckily but all of these testnets prepared us quite well
for the mainnet launch and so far more than half a year in it's been working quite smoothly and for the genesis so the deposits opened in november and it took until kind of like a week before launch people were actually a bit uh like scared that we want weren't going to reach the deposit threshold to start the beacon chain but luckily we did so the threshold was a half a million ethereum that needed to be staked um and we managed to reach that as i said one week before and then here we had a really nice genesis view when it happened and also a kind of like a checklist of everything that should go
right uh kind of like the first few blocks should be proposed here and that um overall the um here the participation should reach i think over 66 percent so over two-thirds of the participation so this was basically the genesis of the beacon chain and it went really really well and it started off with 21 000 validators and in the beginning you would receive a return of 20 but as the number of validators grew uh the less of a return you would receive because it would be shared with more validators that are active and comparing it to today
so half a year later we have 200 000 validators so that's a 10x increase in validator so the confidence in this beacon chain project has increased tremendously especially with all the staking pools that joined and in total there has only been one invalid deposit where one it was lost so if you go on through the launch pad and you want to deposit the funds the launch pad does the signing for you but if you try and do it manually and something goes wrong that can go well the east can go lost and overall around 200 people deposited too much too many funds so instead of 32 ethereum they deposited 60 for ethereum and
that's a bit unfortunate because you can't withdraw the money yet so they have just twice as much money relying around validating and the top non-depositor as you've seen the chart maybe if you were before from our site it's not perfect but it's kind of the information that we have available to us is that kraken which offers a pool has around 13 right now of the validators that are running of the deposited eth and in total around 150 validators were slashed they then lost some funds and they will be kicked out of the system and lastly we have four validators with a perfect record so
since more than half a year they have not gone offline they have not had internet issues or anything and they haven't missed a single at the station which is really really well done i did not manage to do that um so to the third part i'm gonna talk about how to run a validator uh kind of using uh the tools that we're building and how to monitor how to set it up um in in the beginning it's important if you're thinking of like spinning up a validator is important to really consider is it profitable for me right now because the more people join the less profitable profitable it will become so right now i just kind of took an extract and right now in a year it kind of
estimates that you would earn around two eth which is around four thousand dollar right now but you really have to take that with a grain of salt because so much changes like right now in half a year we have 10 times as many validators so this could really change in half a year again quite tremendously and maybe there are other opportunities like liquidity providing that would be more lucrative depending on what risk factor you want to engage in and something to consider is that the earnings are based on effective balance they're not based on the balance that the validator occurs so if you uh deposit you have an effective balance of 32 eth
and a balance of 32 and the rewards get added to your balance not your effective balance um so there are no uh cumulative rewards so just earn the six percent return on the effective balance of 32 and it cannot rise over 32 which is also something to consider if you want compounding effects maybe and another thing that's very important is network stability your reward does not only depend on your validator alone but it also depends on all the other validators that are running and if they are doing the things that the protocol expects so if there's only a 90 participation rate
you would earn less than if there were an overall 99 participation rate even if your validator is doing everything correctly then next if you want to stake then you would have to go to the launch pad which is made really nicely from ethereum.org and there you would have to choose kind of like how you would want to stake what hardware you would want to use to run it you can choose there you have a guide um what ethereum onenote you would like to use we also have on our website we have kind of a list here of the different ethereum one clients and of the different ethereum two clients and you can also subscribe to the updates that uh if
one of the client versions get updated and you get email notifications and even in the mobile app push notifications so you know when to update your software and then over the launch pad you can generate the keys for the validator and send the deposits to the ethereum one chain and once it's in the ethereum one chain it takes some time to be picked up by the beacon chain um it has a follow distance one follow distance that is set to around 2048 blocks and then after that time so here is when you deposit over the launch pad this is kind of the view that you get on our explorer that kind of informs you that you made a deposit but it has not
been picked up by the beacon chain and at the bottom you kind of have a view that it got picked up by the beacon chain and then you know exactly when it will be activated so you actually know when to turn on your validator when to spin it up and when it should be active and staking so you don't lose any funds and you should really make sure that it's active uh when it reaches the the set epoch the activation epoch otherwise you will lose funds um and then just to the income we i kind of zoomed out here um you can see kind of like over the half the year went to genesis the validated account increased and then the rewards of individual validators started to go down
that's kind of over there and the spikes here is when a validator proposes um and then the reward is a bit bigger for that day so that each one of these bars is kind of the earnings for one day of the validator um and then here you kind of can see a page with the proposals here you kind of see what slot you propose the block in you can also add a graffiti we have kind of like a graffiti board as well where you can draw something if you add coordinates there kind of for fun and next are kind of the attestations they're also important that you have a good network connection that if you attest to a certain block that attestation gets
inserted in a later block and it should be inserted basically right after so you can see here you are tested for this slot and it should be inserted in the next it should be basically added to the chain in the next slot and if it's added in the next store you have basically an optimal inclusion otherwise your validator is not performing as an optimal effectiveness you would maybe check what's going on maybe the network is not where your validator is running is not stable enough and then next i'll quickly go over the validator app so here we basically have similar information that we have on the website but it's more optimized for on the go and
you can also get push notifications and we also added uh so here you can basically see kind of like when a client updates you can see your earnings right now and the proposed here as well and kind of compare your rank to other validators as well and then we have monitoring for the app as well so if you have a beacon node this is for lighthouse if you have a beacon node you can monitor your client uh with the app so you don't need any extra monitoring you can easily set it up by just adding a flag uh so a monitoring endpoint flag to lighthouse so to the beacon node and to the validator client and if you add it you can basically get here kind of the network uh you know the metrics of your validator of your
hardware just like straight away in the app and you can also add notification settings so if the node that you're running uh does not have enough storage anymore you get a push notification it's really easy to set up just with one flag and the last thing for running a validator is you should have to watch out for slashing so here's kind of like a a bar chart of the addresses these one addresses that got slashed the most so here we have kind of like staked us with the eth1 address here that got slash got 53 slashing so they lost 53 validators um and then here you have the kind of like the top uh five slashings that i added here
so you should really make sure that you only run one process we had on reddit we saw someone who tried out our metrics and he didn't realize that he's already running one validator client and then he spun up another validator client with the metrics endpoint uh and then got slashed which is really unfortunate so really watch out that you're only running one process and there are two different kinds of slashings right now there's attestation violations and there's poser violations so for example if you propose in one slot you propose two conflicting blocks and once you're slashed your validator exits the system but not straight away there's something called an inactivity leak where the validator first loses funds for being slashed and
then over time it loses some more funds before the validator will be withdrawable and once it's withdrawable then it stops losing funds so yeah if you want to contribute since it's open source those are the links if you want to check it out if you want to spin it up you can check it out you can create issues you can create pull requests or you can tweet at etherchain.org and thanks for listening if you have any questions or how long do we have two minutes yeah if there's any questions otherwise i'll pass off yeah
thank you you