How to: Use Eth-Docker to Easily Setup a Validator

EthStaker Workshops and Technical Guides · January 2021 · 1:00:03

This EthStaker workshop shows how to use Eth-Docker to set up an Ethereum validator, walking through the tool's docker-compose based approach to installing and managing execution and consensus clients together. It covers how the tool simplifies keeping both clients in sync.

Speakers

Topics

From EthStaker Workshops and Technical Guides, hosted by Eth Staker.

Transcript

hey everyone welcome to an e-staker i think we're calling these tech call mondays i don't or i don't even say monday what day is today monday oh great yeah see so call mondays that works um so welcome uh i'm super fizz i'm here with uh thorsten how do you say your last name person beyonds barons yep i'll just say well so i know him as york down like that's how i've known him for a long time and then he changes his name on me and i don't know what to call him anymore right and remy roy hi there and buddha who i just saw with some really weird icon you gonna show

something on the camera again maybe not no my camera is on the floor that's why but hi hi hello and our intern for 2022 mr mojo hello hello hey before we get too far into this buddha is ox and viz gonna put the data up i've been like checking all day um wait is this supposed to be public now i mean it's gonna get public today's the day right uh i haven't talked to him much about it but i think it's going to get public i tried to like i asked him if they want to use um the beacon chain like a sub-domain to get more publicity

but they didn't have enough time to like um adapt the theme of the website to the beacon chain theme but like once that is done um like we can we can host it through beacon chain depending on if they want it obviously as a segway uh buddha works with the person we know is ox and biz or invisible symbol um and invisible symbol and michael sproul are working together on some beacon chain client data that we're excited about but that's not why we're here today sorry um we are here today to do something extremely exciting uh we're gonna talk about eth docker um or as the repo is called eth dash docker um and that is a

product developed by our own yorick down or thurston barons um what is ether yeah um it's really exciting if you're in uber geek otherwise maybe not so much so ether is a way to run ethereum clients and do that quickly and easily um how did it come about in 2020 i think now mid 2020 i became aware that ethereum prover stake was a thing i became aware there was i made darsha testnet i wanted to geek out because i was bored so i looked at sumer assad's guide that guide was excellent i got it all up and running in two hours and then i decided two hours is way too long i'm

not doing that again i want this in something that takes under 10 minutes and that's darker so what it does is it takes all the all the little things you have to do like i need this version of go and i need a java etc and as as docker does it encapsulates all that so it doesn't matter what's on your machine it matters what's in what's known as a container the which you can think of as a very sophisticated zip file which contains absolutely everything the program needs to run so that's uh i i agreed to ask the dumb questions i i think you jumped ahead to tell us what

docker is right what is what is docker like i so i hear of docker all the time and i know that all of the cool people use it but i don't know how to what is docker so when you when you come to this without knowledge right um the first thing you might think is oh docker is too complicated for me right i'm not a programmer but that's the same attitude people have towards the command line in general like i can't program you know i don't know you have to use nano until you explain nano is a text editor just on text not on you know there's no window as such but it's a text editor you know so all the same things apply uh and so the first thing i would say is don't be

afraid of docker it's actually probably easier to get this going than it is to follow something like a summer guide although it will take you more effort to dig down because now it's up and running and you don't have any reason anymore to understand everything to the nth degree so what is docker it is a tool that is designed to take a what you might call a runtime environment what i called earlier a sophisticated zip right basically everything the program needs grab it from something called docker hub or build it locally and then run it so if i have a program like i have say lighthouse i get that off pre-packaged run that on my machine and all i need is any kind of

linux really and then it's up and running it does use the linux underneath this is not a virtual machine uh but as far as the as lighthouse is concerned it lives in its own little world it doesn't see the rest of the machine a few background things about docker um there is a learning curve to docker if you've never used it before it will feel frustrating for the first couple of hours but the benefit kind of like thorson said once you get the basics of docker it really opens up a lot of new possibilities that you didn't know existed before which really means taking things like estocker and spinning up

a validator note in minutes with a few commands rather than a lot of instructions and to make this easier soccer comes with a shell wrapper something called sd it's a little script that does all that for you so while you can get smart about what is a docker in the first place you don't strictly speaking have to one of the things when i first learned docker that was frustrating to me is not really knowing what was going on in the background like right when i start a program i like to see terminal output um docker kind of abstracts all of that away are you going to show us ways that

we can actually look inside that docker container and know what's happening yes i will and this is very similar to running things in system d like you do with um with so much stuff right when you run it as a service in system d like you follow us on my isa guide i'm gonna shill that guy relentlessly because i like his guides you don't see the output either until you type journal ctl right and then you get the logs this is similar here just in instead of journalctl you type fdlog so if you want to be closer to the to the metal you would type docker compose logs

right so it's it's very similar in that way and how you interact with it you can also interact with it if you just want to see it run there's a run command so you can just see it run and output to the screen right away of course in that moment the moment you stop the run it's stopped again right the same way as if you did a lighthouse on the cli directly instead of running it as a service in systemd and because we like things to be up for months without worrying about them of course we have them as a service right so you can think of this as very similar to the systemd stuff just more automated i would maintain easier to update uh

you know easier to not worry about what my build environment looks like like oh you lighthouse didn't run yeah you needed the new version of rust the what in the what now right so i don't i don't have to worry about that anymore that's all that's all containerized for me packaged abstracted away packaged in my zip on steroids that's a container one of the one of the ways i want to help people conceptualize what docker is is you probably run a lot of your systems now as system services and people may be familiar with setting up system services that's how um submariners and coin cashews guide they show you how to set up system services when you're running under docker you're no longer using system services

docker has its own upstart and so when you're choosing how to set up your node you're really going to choose either a system service or docker you're not going to use both they while they don't do all of the same things when it comes to running a node you can essentially think of it as an either or because in that case they provide the same service correct okay so um i have a little bit of a documentation site i'd start sharing and maybe we just look at a picture first and then we can go into okay how do you spin it actually up and uh i have questions along the way how's that sound all right

i'm gonna start sharing the entire screen i will no doubt um you just see uh height floating meeting controls that sounds good that can go okay so we can see this okay so this is at fdaca.net which has all kinds of documentation it starts with this overview here right so there's your linux server the same thing that you would always use whatever that is that can be a physical machine in your home right that's what it should be or it could be a vps in the cloud then inside this is a docker compose stack and we'll show you how to do that and that runs a consensus client

like a lighthouse or a nimbus or whatever and an execution client like a geth or nerigon or a besu or a nethermind a validator client um in docker that is typically the same as the same team as the consensus client i haven't gone crazy here while you can theoretically mix and match these we don't a reporting package which is optional like a grafana prometheus then of course you need keys in production these keys would be generated outside in an air-gapped and then you would deposit against them on launchpad and then bring them in to your validator client by bringing them over to your linux machine and

importing them so this is this should all feel pretty familiar this is the same components that you have whenever you run an ethereum node right that's not what i wanted this talks a little bit about what you need to do in order to get s docker up and running we need the prerequisites we need clients and choose and do some initial linux security and then generate the deposit files import the keystore files and run the client there's some hardware uh stuff do you want to go over that it's really not a docker specific that's more i think yeah

general hardware requirements for staking i think people already they know that we'll get we'll get over that okay okay first things we need docker now on ubuntu there's a thing that uh trips people up when they install ubuntu they might actually come with a version of docker in something called snap and that causes no end of trouble so give me just one second we'll look for it make sure it's not here i think i am on a net cup right now testing now that's the route ubuntu

okay great um no snaps are installed that's exactly what i want to see or at the very least i don't want to see docker then we'll just go through this here update all packages if snap showed up with docker um what would you do pluto snap remove purge docker this is rather brutal it gets rid of everything so if you actually have it's right there if you actually had things already running in in snapdocker they would now be gone including their data so you may want to be careful about that and come to the estate discord to talk about what is going on but if you've never used docker this is safe to do because it's just on your system nothing's running in it you're fine right this this kind of gets to the idea

that that we really only recommend running one thing on this box and that one thing should be your validator if if you have a bunch of other docker images while you're aware that that's you can secure that uh we really don't recommend it yeah that's up to everybody themselves you know um then we're gonna install now now that this has just updated my system i'm gonna install docker compose and this will also bring in docker in this particular case it was already installed but that's what this would do and then i would make sure it's actually enabled with this line here sudo system control enable okay that's it i now have docker installed my

prerequisites are done under client setup uh usually your next linux stuff right i want a non-root user if your user here says anything but root you're good to go i might want my user as part of the docker user group this just means i don't have to type sudo all the time so i'm going to do that and say user mod ubuntu and then new group darker okay there we go so now if i do like a docker ps it will come back i actually do have things running here because that's my testing machine and i can see these things people are gonna feel like ah it's okay

i don't mind hitting hitting sudo now and again but what you end up discovering is that uh when you use sudo in that context you end up changing permissions occasionally and then you uh you end up in a rabbit hole so it really is better yeah just to add it's just easier to that group right and then that the rest here still is you know regular stuff that helps you with staking whether you do this with fdoc or otherwise you want a static ip address so you can actually forward some ports um and now we get to the meet to fit we're going to clone this project so if docker lives on github and we're just going to paste this and say go clone this for me it was successful when i end up in this s docker directory here and now we're going to use the quick

start shell so there is a whole manual setup here which i will not go into because why suffer there's a little program called fd if i run it without anything it just tells me what i can do and if i run it with dot forward slash sd config it will say okay let's go and configure this and get going so let's say we want to be on proper test net now we get to choose our deployment type the first one would be a normal ethereum node and then there's some other options like validator client only for integrating with rocketpool or a block's ssv node or an ethereum rpc node which just is for api calls so for

staking it'll just be an ethereum node right consensus execution val declined all three that doesn't say eth2 anywhere it just says oh it hasn't said eth2 for a year i i was i was just i don't know it's one of those things you know there's no ev2 there's no eth but eth and vitalik is its profit so um we need to cut that out right that was perfect uh just a little joke okay consensus client do we have preferences here of five are supported can we do load star sure load star here we go

um we want a graffiti let's say that is if a staker of course that's our graffiti okay um what is a graffiti is that like your name or whatever yeah what is a graffiti a graffiti is a is a very good question is a little string that your client publishes every time you get a blog proposal and it's just for fun it's visible on the chain um you can use that to totally doxx yourself essentially so like essentially you're saying whenever you are proposing on the beacon chain it'll say whatever you put as your graffiti that's like that that's your identifier okay that's cool so i i want

to say something hilarious here um our friend boodle actually proposed to his fiancee in a block proposal so a proposal to propose oh i love it and what did it say uh it basically danny will you marry me something like that um so pretty funny that is really nervous that's so sweet yeah that's really sweet that's a great idea [Laughter] hey why not daisy besu okay basil the java client for our execution side i have to ask my assumption is that the interoperabilities between all of

these are worked out like there's no the interoperability between all of these is worked out um 100 they all work with each other this is why we can do this one from column a one from column b thing right there are a couple things you want to keep in mind i'm going to just switch over here for a second and go to client resource usage not all clients use the same amount of ram basu for example in my testing was about eight to nine gig nether mind was 13.

um geth fluctuates depending on how much cash you give it so arigon is a gig so you may want to make sure it at least fits into the amount of ram you have together with the consensus client you're gonna run right so if you say do a teku at nine gig and a peso at nine gig you're gonna be hard-pressed in 16. maybe you want 24 before you try that you know i'd like to thank you you taught me that uh the more cash you give guess the smaller the database so i appreciate that yeah the smaller the database growth you still have to prune the thing yeah that's right okay so um we're gonna go back here what we were looking at uh client setup oh yeah we're

still in this uh um go through the quick flawed shell do i want to use a fallback execution client i'm actually going to say no here because that's not going to be a thing come merge anyway so i'm going to just pretend that we are with the new hotness and we don't have that do i want the lodestar rapid sync why yes i do so this would sync rod star in minutes when i say yes for that i need to be over here in in furore look how ready you were i love that this is a docker demo project i created and will delete after this so don't get

too excited that you see again an end point with my with my project secret oh my god so i created an s2 project um they still use that in infuria and say i want the prata endpoint i want it at https i'm going to just copy that i'm going to go over here and right click to paste and then tab over and hit enter for ok grafana dashboards sure why not those are fun maybe they'll even work out of the box we'll see and now it goes and it builds all this so you see it move grabbing all this stuff um from the docker hub and building all that locally so beautiful

this is this is a minimum of an hour doing it by hand it sure is so at this point we do not have any keys uh uh imported um i'm actually gonna go a little crazy if you guys are okay and i'm going to create a key maybe maybe you want to explain to people why this is a seriously bad idea in production to create the keys in here yeah so we want to do the absolute opposite of creating keys on youtube um you so creating keys is is literally the most valuable step or the most uh important step in creating your

validator um you're going to use a tool either the deposit tool or a graphical tool like wagyu um to create a 25 word seed phrase and a a validator key the most important thing is that you do not lose your 24 word seed phrase no matter what you do don't don't lose it and don't share it that key more than anything controls all of your funds and so there's a strong recommendation to do an offline key generation um and honestly i i don't know how many people actually generate offline but you do really want to do it on what you would consider a clean machine and then clean up your

tracks afterward don't leave a trace of your your seed phrase on the machine um your the keys that are generated are maybe less important because the worst that could happen with them is they can be used to slash you um but all of this data is sensitive and and think something you should keep very private yeah so we can while this is building here we can talk a little bit about um what we saw recently so somebody came into the earth staker reddit and said oh my keys got compromised or rather my mnemonic did so what they did was they had put them mnemonic into a

unencrypted text file on their nas their network attached storage in their home right and they were like well my nas is double password protected it's secure then just for the giggles they installed an ethereum miner on their main windows machine and run it there for an for about a week that particular ethereum miner was not friendly it trawled their file system including the nas to look for a mnemonic and found it that is scary yeah so if we actually have two uh separate occurrences of this and what we're really looking for is for someone um to

verify this in in like a home lab environment so that we can talk about it more publicly because what we don't want to do is uh sort of publicly slander the suspect before we have good information that that what we believe has happened has happened uh indeed but yeah the reality is what i'm saying is risky right i'm not blaming the person who did this it's normal to put things into text files i'm just saying it's risky so what i'm doing here is because we're doing a demo and it's testing it i'm actually going to show key generation and i am going to also um show them mnemonic and i will throw all this away after

what was the build that just took two minutes was that grafana building no that was the deposit cli oh okay okay this thing we're running right now that's what took uh two minutes this is the deposit cli which we you would run as a downloaded executable probably from the deposit the sdk deposit cli github on an air gap machine right okay so we're going to say we speak english and our mnemonic language is english great and we want one new validator i'm i'm gonna do a password for it and now it's gonna this is precisely

what you're not supposed to do show your mnemonic on youtube or just copy paste i was doing a kazuki test uh and i showed my mnemonic uh to set up my consume validator and someone someone in this room uh used my keys and slashed smash who we don't know right so yeah we'll never find out who it was ruby roy right which is great that's a fun way to play and test so i that was all in good fun so this now says your keys can be found at app validator keys that's actually this is a this is a docker thing right i'll i'll stick there for just a second this is not on your host

this is app validator keys inside the container it has its own view of the file system which is not your file system there's another advantage of of containerization at docker is that these things live in their own little world whatever you have on your linux file system they don't actually have access to unless you explicitly give them access so what i've done here is after it's done i'm copying this to this directory so let's just take a quick look we're going to go f value to keys and so we have here and there it is we got our deposit data file which we would put into launchpad and our keystore m so now i want to be clear an

intermediate user would go to cd slash app validator keys and find out that that doesn't exist and that's kind of what doors correct that's what i'm talking about this this existed only in the container and now that the container is done running it's gone it's no longer there right this never existed on your host system either this only existed inside the container view of a little overlay file system it has so that's why how long it took me to really understand that yeah it's it's in it's a directory in its own little bubble where only it can see things and they can't see your home directory that's actually good right we want that so um the generator files have been copied to here i'm gonna just do a quick sd and see how to import this because

i'm not sure i'd remember ah key import easy let's do that dot fd key import this is new so i hope this works enter the key sport there the key store password let's do that and validating password password is correct move those keys around to a new spot or something like they're generated right where they're needed i love that right so you would have to move them in if you did this the right way and you created them and you created them air gapped yes and this that's where we run into that that silly pro

that sneaky problem of even though we promote air gaps key generation we don't actually always do that we have a slightly lower standard of security in reality that's absolutely true yes i will still promote it right um this import was actually done by lodestar as docker just put a wrapper around it i should maybe explain that as well what's the philosophy here so f docker's philosophy is that it always relies on the client code as much as the client teams code as much as possible it does not publish docker images itself deliberately anything it wants to wrap around it it builds on your machine first

and it does small changes like uh an easier key import or it makes sure never to run anything as root lighthouse for example by default will run as root i don't like that so it runs as a non-root user if you use s docker right okay now we have one thing was that just go ahead uh let's assume you created the keys on a different machine like where do you put those keys in like that's an extra question right so let's let's say you have on a different machine and you created them and you put them on a usb drive and you put the usb drive in here and then maybe you just copy them over into your home directory what you can do is see where it says here sd key import dash dash path

so i could do ft key import path home directory my super secret keys if that were actually the directory where they are right it would then find all json files in my super secret keys and try and import them okay thank you just like that we said something interesting or you said something interesting about uh not relying on local sources but preferring the the actual client source i saw a question on reddit recently like if you stopped developing this i don't

want to be stuck with an old client and the benefit here is what happens if you stop developing it right okay very good question um this is one of the reasons why i designed it like this right so there are other projects out there that publish their own images i want to be sure i'm not in the middle of all of this so for example um i'm going to uh denver and then i'm going to go skiing at the end of denver this month and while i'm on the slopes i don't want to have to think about whether there is a new client release as long as the client didn't change its parameters you can just do this as the update

and it will go grab anything that's new nothing now of course because we just built this right actually prometheus for some bizarre reason it will grab anything that is new and build it and that's it um and you can run it now if i really stop developing this clearly this didn't build completely earlier interesting if i really stop developing this and the clients change how they run meaning they have a i'll show this in a second here they have a

parameter on their command line that's no longer the way it used to be right then you would have to make those changes um where somebody needs to take it over so let's take a look which you can do locally so i'm using here something called load star base so let's look at load star base before we get too far i just i wanted to promote the concept that you're not in control of i am not in control of updates but the only thing i'm in control is is how this is run so for example say i have here my consensus client and this is the entry point and all the things it needs

and um up to here network network right and now let's say it's it's uh merge time and i've fallen off the face of the earth and this needs a new dash dash merge in here you would just add a new line with dash dash merge and then run it so that it's all relatively readable the new client version will always be there if it needs a different way of running then that's a configuration file change so at this point let's say fd up and it will start everything and now you asked well that's great how

do i know it's running right let's look at logs so we have uh typically we have three containers here we really care about consensus execution and validator and the rest this is all graffana prometheus stuff right so let's take a look at consensus so this would be the lodestar consensus client i see here it fetched its weak subject of tyrity state from and here you can see the secret again etc prata so it is getting ready here it is uh initializing that looks good that's it's rapid sync let's take a look at the execution and that is currently syncing as we see

received one confirmation for pivot block headers so that is starting i always like to go to uh and i don't know how much it will dock to you um to go back to infura and check the uh requests at the at the docker demo here yeah sure let's take a look what we got there and we can see a couple requests coming in here because i know the first time that i tried uh checkpoint sync i used the wrong endpoint i was just learning it one one request came in which is all we need

yeah that's it it connected right yeah it did so um here now you can see we're getting a whole bunch of errors that throws this is a lot star ism this is actually relatively normal for it when it has started a checkpoint sync this is i should talk about that for a second as well this is not before you control go ahead you you did a control c and a lot of people will think control c exited the run time but control c only exited the log right because that's what i'm exits what i'm running and what i'm running is logs right so i'm very narrowly just getting

the logs that's a very good point i can control see this at any time to actually stop the thing i'd have to sd down or to use docker i can also go directly into docker do a docker ps and oh my god i see all this stuff running right so what i was going to say is when you see the client itself doing things in the logs that you don't quite understand that's a question for the client team at docker is really a very lightweight lightweight wrapper around the whole thing it does not change the client code at all and then the last thing maybe i look at is the validator i don't think the consensus client is fully up yet so let's see what we see here node is syncing that's what we expect and maybe

if we go a little bit further decrypted one validator key stores so i can see it got the key that's great and now it's waiting for the consensus client to be done syncing right last thing i'm going to show is i'm also going to say this is a terrible idea because right now i think i have this completely unencrypted now show grafana um i do have a video that explains how to actually secure that with ssh tunnels etc yada yada if it's not in your own but for this we're just gonna do grafana on port 3000 and see what happens maybe nothing we'll say yeah but one complexity that

docker adds is uh port management is a little more dubious at least in my experience it can be um it might also be i uh i have a firewall m in place not entirely sure how i left this here well i give it a minute but if we can't figure it out we can't figure it out i don't want it i thought you're doing status number i just do down i'm just kidding the easy way okay okay i got it yeah yeah funny i was actually gonna take a look and see we can turn it off you know if that's what it is but um i'm actually not forbidding no i am i am

forbidding 3000 see i'm doing this the proper way okay that's great let's show it the proper way then let's show it the proper way gentlemen so what i've done here is actually at some point i must have used this for a demo and 3000 is the grafana port and i allowed it from localhost but disallowed it from anywhere else which is how it's supposed to be so what we're going to do here now right quick we're going to reconnect to this but this time we're going to use ssh to say port 3000 on my pc should go to 0.0.1 should go to 127001 which is localhost

on the remote side so it will take all traffic to port 3000 shove it into an encrypted ssh tunnel push it through there and then pop it back out at the other end going to i want to point out this location we're doing fancy tricks that other people will not need to do um you won't need to tunnel your ss no you you don't have to do that but that's a a good best security practice and independent of eth darker i should say that as well this is a good best security practice for unencrypted things like grafana if these unencrypted things are um on the internet somewhere i i always worry yeah so on your local network there's there's no concern for this on

your local network you don't have to do this and uh you probably wouldn't have these these ufw things in place and so just going there would have worked right i worry about people who who can barely grasp the concept of running validator clients and then we're throwing no no i get it and if you want to and if you want to cut that out by all means right so now we're going to say we're going to go in as admin admin and it wants a new password okay here we are now grafana and if docker comes pre-loaded with some dashboards that the community gave us um i am not very good at which dashboards are

awesome so if there are ones that you like better than others um please share them for example we don't seem to have a loadstar dashboard at all so if somebody has a great loadstar dashboard please share it we'll add it to this project so i can go here to baysu for example and i will see the official baysu dashboard that i think was it do we have further questions this is really the the bulk of it at this point i could now take my deposit um file and deposit for this on on the launchpad and i'll be up and running and then whenever you know i'm here and i'm like okay it's been two weeks how do i

update that cdf docker as the update and this time and this should go quick this time and then fd restart update just pulls the new things it does not actually restart anything that's deliberate and then if you want to restart it ft restart can you show [Music] you may have mentioned this before but where the deposit data is sure so the deposit data would be on your airgap machine totally right yup yup of course yes yes yes yes well i i don't i don't want to do wink wink to anybody i do acknowledge that air gapping is best practice

i just also acknowledge that people are real and um yeah whatever yeah exactly yup there it is so deposit data.json everything in there is public there's nothing scary in deposit data it can't be used to slash you it can only be used to deposit on behalf of this validator what happens if um i need to restart my like does it all restart by itself or like how does it plus indeed yes everything will restart when you restart the machine unless you stopped it so if i do an ft stop here it will not come up right the

reason for this is that we have a restart variable somewhere in here unless restart equals unless stopped this can also be set to restart always then it would always restart even if it has been stopped that can be interesting some people are like maybe i stopped it and then at least when i reboot the machine it comes back right but the default is unless stopped meaning it will always get restarted unless you as the user deliberately stop the thing what i like to do uh especially when it comes to something like a validator or a validator or a test net is after i stop it i like to reboot the machine and then do a docker ps to see if it came up because

you you don't want those sneaky processes running in the background and you've forgotten about them because a docker image or can run in the background for months and years and you may not even be aware of it correct so i think i heard reboot this machine and then talk some more and see what happens mr mojo what are you taking away from sure so basically what i'm taking away is that thankfully someone is putting a lot of work for me so when i decide i want to set up anything in this space oh man thankfully i don't have to spend three hours combing through everything i need this i need that nope

it's all here you know i don't have to worry about it it seems uh here on the right side of the screen share how you already have the setup it seems like anybody can go in as long as they know they have to go to uh you know the eth dash docker dot net and look at the setup guide they can go through and do it hey easy peasy right could you i probably could do this i probably could yeah so i had somebody who was by myself and i've never set up a validator yet so i bet you i i could go through and do it yeah so we had somebody recently who said they came to this new they had never set up a validator that never used docker it took them two hours

so my theory of two hours is too long was maybe a little shall we say optimistic right it took them two hours probably because they went through all the security setup in linux setting up key stores for ssh etc and that which i recommended my guides which was new to them so they needed to do all that and then it just takes time to wrap your head around it right um as you can see once you're familiar with it because of this sd config it can actually be done in 10 minutes but the first time yeah i probably set two hours aside just to get familiar if you haven't you know created a user on linux before if you haven't dealt with ssh before and

so on yeah because i know desktop users of course don't need ssh that's another thing so there's one less sorry go ahead no you're fine i know for myself i would be a new linux user as well i've used windows my whole life even though super fizz tried to turn me on to linux uh a while ago you were in sixth grade i know i i know that's why i say it was a while ago but you know i'm i'm definitely far older than 12 now unfortunately here's the moment of truth um superfiz you wanted to know that this is gone gone right so i expect to still see the things that

were running previously two containers that were not in ith docker and there they are i have a sepolia ethoca test is actually one as is george was trying teku and then this over here is a geth that's running on sepula those two were there before but the s docker stuff itself is gone it is not running at this point if i want to run it again just go in here and say sd up and i can see that it is bringing all that back up and now my docker ps is a lot busier so i'm confused i thought it would restart it does not because we stopped it oh fd stop and then we reboot it right so now

we can do this again with not as running reboot and maybe talk some more and see that it cut that it is back up if i'm not manually stopping it so superfizz's point was if i recall correctly superfiz if i stop this because i meant to stop it i don't want it to come back up when i'm rebooting that's scary is that right was that what he was right that was your point right and now we're doing the opposite we're saying if i have it running and i have an automated reboot power outage or just an automated reboot because i'm doing unattended upgrades and i don't want to worry about linux upgrades and i let it do that

right all that stuff um i do not want to worry in that case about it not coming back up so we'll see that here basically the way eth docker behaves out of the box is it goes with your choice if you have it running it keeps running after reboot if you stopped it it stays stopped after reboot awesome i i love the whole product like i have i've spent a lot of time like just focusing on bare metal installs because i want to be close to the clients but when it comes to just getting it up as quickly as possible this is extremely handy so if if my box goes down tonight and i need to rebuild in

the morning i'm going to go to eat docker because it's going to get it going to get me online as quickly as i can rather than building from scratch yeah there's a there's a point to building from scratch right and there are there are components in each docker that go this will take a minute to reboot i'm being too impatient um there are components in each docker that go deeper than what we've shown here and that we will probably not get into such as it can actually build the clients from source if that is so desired that's by design so it's good for testing if you need to build a client from source you have something you want to try in their current development branch if docker supports that

there's a little file called source there's two variables one a source target and i think the other one is docker file so instead of dockerfile binary it would be dockerfilesource and then set the source target and do a docker compose build and it will compile from source right fully supported in this thing it can also be used to run rpc nodes um i'm actually doing that for my own business i'm using this thing to to run api rpc nodes that do not validate york if you were to switch to clients so how to do it is it like ift if the 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 um switch clients the reason it's a little bit more work 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 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 automated so what you would need to do here the method i am advocating here is to 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 gonna show a client switch we're gonna switch away from load star and do it safely so everything as you can see is up i'm gonna 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 bezu 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 uh 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 gonna switch to lighthouse we're still on prata test net it's gonna be an ethereum node we're gonna say lighthouse this is still gonna 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 um dashboard local demo

project settings and we're on parata 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 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 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 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 this is a very good this is great this is actually a great example so 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 sd key 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 reminds me that i really need to redo that part of the of the documentation now that we have rapid sync checkpoints and can all these clients 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 got to 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 it 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 we'll update that so that's that's awesome i i love docker um i i acknowledge that i haven't used it a lot before now because like i said i wanted to know the clients that personally or the software personally but this is so uh so handy for just easy operation yeah and actually for updates that's updates are intimidating to new people and here it is literally update and restart and you're done that's it if the update fd restart you're done right um one thing that can trip people up

this is slightly advanced but say um i went in here and i said uh i've had this with a couple users not a lot of people do this um they go into say the lighthouse definition file right and they say i really want doppelganger protection so they go in here and they say i'm adding doppelganger like that and i think that's all it is for um for lighthouse i might misremember the exact name of it but something like that right now when they do an sd update

what will happen is and i'll scroll already up to date unfortunately um it will scroll past rather fast if it really happens but what happens here is because this is a project on github you see here it says i have a modified file it will refuse to bring in new updates until this has been committed so in this case what i need to do is say git add git commit you know use um doppelganger even notes x yes and that's it now i am ahead of main buyer commit my local commit now if i do an sd update i'll

just bring things in and keep my changes i'd say most people would never even get to that most people never need that no i've had like two users yeah i love to focus on like the simplest operation and if this this can be very simple operation with extra bells and whistles if you want to use them yes i i know i keep going into the extra bells and whistles it can be as simple as just at the config and then at the up if the update after they restart that's all you need right uh the key import that's it those are the commands you need that's it so yeah uh york i i'm glad uh you developed this i'm glad

to have you on easttaker um oh you know this is oh check it out the people stop showing all the new the new east takers yeah so hey welcome everyone so uh thanks again for sharing so there will be a test right is there a poor app for people who do this successfully if you can figure out how to distribute a poep for doing this successfully then hell yes if there was some way to like to ping or to collect a credential for people who ping the uh the repository then i'd be all about it yeah uh what what's an east acre called

without a poep right right like yeah there's no proof anybody attended this i'm just saying if we tell people we're we're working on a consumption we should probably keep that a secret when is this going up all right in like a week yeah a few days yeah so and that's now i have to like get that snapshot done before this publishes because then people will be like ah i get off conserving but yeah anyway all right thank you