Switching Staking Clients Using Eth-Docker | Eth-Docker Setup Highlights

EthStaker Special Events · November 2020 · 7:35

This EthStaker session walks through switching Ethereum staking clients using eth-docker, a tool that packages node software into containers for easier setup and maintenance. The walkthrough highlights setup shortcuts within eth-docker, tying client flexibility to the broader staking and validators conversation for node operators.

Topics

From EthStaker Special Events, hosted by Eth Staker.

Transcript

york if you were to switch to clients so how to do it is it like ift's ifd switch client or is it more work than that it is a little bit more work than that yes um it's a good question let me get here to support switch clients okay so the reason it's a little bit more work is i was afraid that if i make a mistake in the code somewhere when i'm switching clients i'm gonna get you slashed if your keys exist in two locations at once right you're gonna get slashed and so i was like yes i i know what i'm

doing and i can run all kinds of tests and it would be the height of arrogance to say i cannot introduce a bug into key handling so the idea of moving keys around programmatically scared me therefore i am i have deliberately not created something to make that uh automated so what you would need to do here the method i am advocating here is to [Music] create a new client stack and let it sync the reason i did it that way was

ah because we didn't have rapid sync at the time so maybe i want to rewrite this so at the time there really wasn't a rapid sync which means it took a few days for something to synchronize and i didn't want you to be down so this all talks about doing a new client stack maybe i want to rewrite that so if i'm thinking about how i would do that now probably what i would do is i would say okay let's do an sd let's just do a docker ps i'm not going to show a client switch we're going to switch away from load star and do it safely so everything as you can see is up i'm going to stop this and now what i'm going to do is i'm

going to say really the only thing i care about that i need to remove is the validator data here and the consensus data so docker volume remove everything is in a volume so in this case the ls validator data holds my key this is now gone the key is now gone and i have no way of running this twice and then i'm going to get rid of the beacon chain database as well while i'm at it and then maybe i'll do a new sd config if i do that i want to be careful that i choose basu again as my execution client because i don't want to

resync that and if i don't remember that let's do just a take a look at my environment file i'm running besu right okay let's do a new sd config so we were on load star we're going to switch to lighthouse we're still on prototestnet it's going to be an ethereum node we're going to say lighthouse this is still going to be as staker as my graffiti and this is important select the same execution client i had before because i am not going to replace it and then we're going to get our inferior sync again going here so we have a rapid and we don't have to worry about being

down for too long dashboard demo project settings and we are on proater that one and dashboards okay um it will now grab this lighthouse stuff i'm gonna i now have to do one more thing before i do anything i'm still at risk here of getting myself slashed if i'm moving too fast because as you can imagine

i can do this here within minutes and if i start a testing twice in the same epoch i'd get myself slashed right so what i need to do here is i would have to go into um product or beacon chain and look for my validator here which of course i'm not going to find because i didn't actually pause it for it um let's just grab a grab a random validator shall we can we do that on beacon chain is that a thing yeah if you have any indexed at in the search bar you can like go towards any validator yeah let's take value to five it is actually

it's perfect this is a very good this is great this is actually a great example in this case just imagine that it wasn't down for you know days but what you do want to see is that it missed a couple attestations here right um and that your last attestation say this one actually came in we're pretending right that that was maybe two apocs away so it is now finalized it's in a finalized epoch i'm safe and i'm see i'm missing them so i know the key isn't running anywhere and now i can import it safely right so that's that's what we're pretending another sdk import

and i still have the keys where they were and now it is imported into lighthouse and i just do another sd up that's a thank you for asking that question because it um reminds me that i really need to redo that part of the of the documentation now that we have rapid sync checkpoint sync and all these clients um now when i look at the consensus clients which is now lighthouse i see it loaded the checkpoint block and state and it is now syncing and i am using i'm using lighthouse version two one two

that's it wildly efficient yeah it's so efficient you gotta be a little careful i mean it with the whole make sure you're missing attestations make sure you deleted the yeah some people will say six minutes but really 13 minutes is 13 minutes is fine you know just walk the dog around the block or something so i i've had that in it like i'm sweating the whole 13 well when i when you get used to it it doesn't bother you anymore but when you start doing it and you're missing 13 minutes it kills you but uh you really do get used to it like you get used to just being down for a minute and it's okay yeah it's it's a couple cents it's not a big deal right uh compared to slashing

and uh okay that was it uh really really fast client switch without following these directions but using rapid sync instead well and your directions will be updated eventually anyway they will be oh yeah