How To Setup a Prysm Validator Node

EthStaker Workshops and Technical Guides · January 2021 · 30:43

This EthStaker workshop covers setting up a validator on Prysm, the Go-based Ethereum consensus client originally built by Prysmatic Labs. It walks through installation, key generation, and connecting to the beacon chain for solo staking. The session targets home stakers running their own validator hardware rather than using pooled or custodial staking providers.

Topics

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

Transcript

hello my fellow easttakers i am enveticadon eath and this is the validator workshop series follow along as i set up and configure an ethereum validator from scratch now for non-technical users this can be an incredibly intimidating experience since running a validator requires a deposit of 32 eth which the current market value of that is roughly 54 000 dollars as of today and also requires the use of the command line now for these reasons we'll be using sumer eset's guides to set up and configure our validator by utilizing the guides developed by samir we'll be provided in-depth explanations of what we're building along with the commands to easily copy and paste to the command line

additionally samira's guides are well maintained and updated to include steps to maintain your validator over time also these guides have been funded by the ethereum foundation and are considered an industry standard for this recording we'll be deploying an ethereum validator on the puremont test net if this is your first time running a validator it's good practice to start on a test net for a few weeks to ensure you understand what it is you're doing and verify that the setup is working properly before deploying onto mainnet now we are assuming that you have the necessary prerequisites for running your validator specifically having already requested at least 33 gourley eth opened up a metamask account and have a dedicated machine for staking with a

fresh installation of ubuntu desktop if you don't the video tutorial for those steps are linked in the description of this video for this video tutorial we'll be focusing specifically on configuring and running an ethereum geth node generating and funding the validator keys importing those keys to the eth2 client and finally installing and configuring the eth2 client itself so without further ado let's get into it the first thing we're going to do is create a bit of a workstation here for setting up our validator so i'm going to open up a browser session pull it over to the side here and then pull up submariset's guide now this is specifically for the

lighthouse client now that we have that i'm going to go over here and then i'm just going to type the word term and that will bring up the terminal click on that and then i'm going to open up the show applications icon in the bottom left hand corner and then type text to bring up a text editor these will be the three things that we'll use the most all right and one thing to note before we get too ahead of ourselves all of the links and resources mentioned in this tutorial are all in the so if you're following along in step with this guide and you're not

sure where we're getting the information from just look at the description of this video and everything should be there all right so diving right into it we're going to skip through some of the information in samara's guide here as it goes outside of the scope of this video series and that is so let's just keep scrolling here step 0 wants us to connect to the server we're just going to skip over that since we're not remoting in one thing we are going to do is update our server to make sure that we have all the necessary patches so let's go ahead and run these two commands now if you're new to the command line there are all these copy and paste commands throughout the guide we are disregarding the dollar sign

that's just an indicator that it's another command we're not copying pasting that entire thing you simply copy and paste everything to the right of the dollar sign let's go ahead and copy and paste this first update command in our command line all right so that's complete let's go ahead and run this second command and a lot of this is just going to be copy and pasting but what we'll do is walk through exactly what it is we're running while copying pasting so our system is updated let's go ahead and type the word clear and then hit enter

and let's continue on with the guide now step two is also outside of the scope of this video series and that's securing your server mainly configuring the firewall adding ssh etc these are great features to add but there are levels of variation when doing this so we're just going to skip past that however one thing we do want to do is open up the appropriate ports for both our eth1 and eth2 node so let's go ahead and copy this first command to open up port 30303 and we can see that has confirmed and then let's also open up these two ports that allow prism to talk so that's port thirteen

thousand and twelve thousand okay so we've got our rules added there's also steps here for adding um graffana and prometheus which are monitoring and dashboard tools again outside of the scope of this video however feel free to follow these steps and set up your own dashboard next what we're going to do is actually install and configure the geth node so the first thing to do is download the actual file so let's go ahead and copy and paste that all right that's completed let's go

ahead and update the package and then install it so let's just run this command okay so now geth is installed which is our eth1 node now what we're going to do is create a background service and you can kind of tell by the name basically what we're going to do is create a file or program that runs in the background specifically our eth1 node and our eth2 node this is great too so if for example our machine reboots so too will our services and then run in

the background and continue to process so for example once we set up our eth1 node it's going to take quite some time to sync up with the rest of the blockchain well instead of sitting there waiting for it to run we can basically have it run in the background while we process the rest of the validator setup so let's go ahead and begin that process first thing we need to do is create the account that the service is going to run under so we're going to run this command again we're just copying pasting next we're going to create the data directory for the eth1 node to use we're just going to copy and paste that and then we're just going to set the appropriate permissions for that directory to run in

and copy and paste that let's go ahead and clear our screen by typing clear and then hitting enter now this deck next command is actually going to set up the systemd service to run in the background so let's copy and paste this command and you'll notice that it opens up a text editor what we're going to do is copy and paste this entire config file and put it into our text editor and we're just going to slightly format it here and this tells our eth1 node gives it all the parameters in order to run so to save this file what we're going to do is hit control x it's going to ask us to save we're going to hit y for yes and then enter to close

all right so now our background service has been created so let's go ahead and reload the system daemon to apply the changes that we just created so we're going to copy and paste and now what we can do is start our guest service so let's run the start command now let's run the status command to confirm that the service actually is up and running and there we go we can i see that it's active and running so what we're going to do now is hit ctrl c to exit this screen let's go ahead and clear our screen again scrolling on through the guide we're going to run this command this allows the restart of the program if your physical machine is

rebooted so if your machine's rebooted and you don't run this command you'll have to manually start any and all services on your machine this command automatically starts them upon reboot now what we want to do is check to make sure that the youth node is on its way to syncing we can do that by checking the logs here so let's go ahead and run this command just to see what it looks like and what we're doing here now is the eth1 node is looking for peers once it reaches a minimum threshold of peers it will begin syncing with the eth1 chain this can take quite some time so what we're going to do is hit ctrl c

and we'll just let that run in the background now it is worth noting that the eth1 node does have to sync entirely before your beacon chain node is allowed to sync but we'll get to that point in this section but it's just something worth noting now what we're going to do is start installing our eth2 client so let's go ahead and install the prerequisites let's go ahead and run this command to install curl ahead and run these following commands these are all software packages needed and then one more here

okay now what we're going to do is update everything so let's go ahead and clear our screen first and then run these three commands so let's just copy and paste this one all right that's completed let's copy the next one over and finally the last one okay that's completed let's go ahead and continue on here and install the last couple programs that's completed let's do the second one and the last one here let's go and copy

and paste that on over okay great now what we can do is actually install and build the prism client all right so the latest release is actually 1.3.4 so what we're going to do first is copy and paste this command into our text editor and we're going to change this from version 1.0.0 to 1.3.4 and then we're going to copy and paste this command into our terminal it looks like git is not installed so

let's go ahead and just run the install for git real quick okay that's installed let's go ahead and hit the up arrow uh one more time and then that retrieves our previous command and we can issue that again all right that's completed so let's go ahead and change into the prism directory by using the following command now we're going to compile the beacon chain and validator binaries this can take quite some time

so let's go ahead and clear our screen and then let's run this first command and what we're doing here is compiling everything that we've just downloaded in relation to the beacon chain and validator so let's just run this first command a full disclosure this can take quite some time depending on the hardware specs of your machine all right looks like our machine has finished compiling let's go ahead and copy and paste the command for the validator all right that was much quicker so let's go ahead and keep scrolling and now what

we're going to do is configure our beacon chain so let's go ahead and set up the accounts and directories uh first let's clear our screen and then run the following command next we're going to create the data directory let's go ahead and copy and paste that command and then set the appropriate permissions for the directory we just created all right now what we're going to do is copy the beacon chain binaries so let's first change the directory to make sure that we are in the home directory with the cd tilde command

let's go ahead and copy and paste this next what we're going to do is create and configure the background service this is exactly what we did with the eth1 node command it's going to open up our text editor and we're simply going to copy and paste the configuration block and put that into our text editor and just briefly format it based on the example in the guide okay we're all set now to save we're going to do control x we're going to hit y for yes and then enter to exit next we're going to run the system

daemon reload this will apply the changes that we had just made and now we can do the same thing just like we did with the eth1 node let's go ahead and start our beacon and then let's run the status command to make sure that is in fact running and there we go we are active and running let's go ahead and hit ctrl c to exit this screen let's go ahead and clear our screen by typing clear and then enter and let's continue on with the guide now what we want to do is issue this command this is the enable command which will allow the beacon chain to restart if and when your server or computer is restarted

and then same as before if we want to check the logs for the beacon chain we can run this journal command let's just go ahead and see if things are processing and it is in fact all right now the time has come to generate our validator keys so let's go ahead and follow those instructions all right so the first thing we're going to do is change our directory and make sure that we're in the home directory now we're going to do is download the deposit cli program which is a command line based wizard which will walk us through and help us generate our seed phrase key stores and deposit data let's go ahead and copy and paste that it looks like that's completed downloading let's go ahead and

unpack it and then change directories into the folder we just and since we don't need the downloaded tar file anymore just a quick house cleaning tip let's go ahead and run this command which will remove the which will remove the tar file okay so let's go ahead and run the deposit cli program now before we enter this into the command line let's copy and paste it into our text document there's a variable that we need to change and that is to specify the number of validators that we're going to be running

now in this case we'll be running one so we're just going to change it to the number one furthermore i want to point out the chain flag here clearly we're using the pyrmont test nut if you were to use this on mainnet you would simply change pyramint to mainnet so let's go ahead and copy and paste this command and there we go so now the deposit cli program program is running let's go ahead and generate a password for our key stores and now the password has been accepted and the program has generated our seed phrase into our text document

now just a quick word about your seed phrase you would never give this out to anyone for any reason effectively whoever has access to your seed phrase has access to your validator and thus has control over your ether so make sure that you one keep it safe from others and two keep it safe from damage and that you know where it is let's go ahead and continue on the deposit cli is going to verify that we have in fact copied our mnemonic phrase because it is important it is effectively the keys to your validator so let's go ahead and verify that we have it written down correctly we have in fact and now the program is going to generate our key

stores and our deposit file looks like that is completed and then has put those files in this physical location let's go ahead and copy and paste that directory location because we will be referring to that later we're just going to hit the enter key and then let's clear our screen moving on to the rest of the guide now what we're going to do is fund the validator keys let's go ahead and click over to the piermont launchpad we're going to click on become a validator now we're going to run through these screens fairly quickly however i'd submit to you that you read through these very carefully so that you fully understand the risks and responsibilities involved

so we're just going to accept all of these and keep these the defaults okay now we've got our summary page here we're going to confirm that we just want the single validator the rest of the default selection on here is just fine we're going to go ahead and click that we acknowledge that we have our mnemonic phrase in a safe place and now what we want to do is upload our deposit data

so we're going to very easily do that by opening up a file manager here you'll see it on the ubuntu taskbar and we're going to go into the file location provided by the deposit cli so we're already in home let's click on the eth2 deposit cli folder click into validator keys and here we see our deposit data file and our keystore file so let's go ahead and upload the deposit data file into the launchpad and there we go we've successfully have that uploaded we can now continue on with the wizard validator keys and make the initial

deposit into the blockchain so let's go ahead and connect our wallet it's going to ask us to confirm the connection we're going to go ahead and do that the launchpad has synced with our wallet we'll go ahead and click continue this is just the summary now so yes we do want to launch one validator we are acknowledging all the risks and responsibilities of being a node operator and then we're hitting continue now this is the important part this is where we're actually depositing the funds into our onto the chain again this is just test test ether or gourley eath

uh you would never deposit real ether into this network as you can't retrieve it and you've effectively burned those assets so let's go ahead and confirm the deposit it's going to ask us do we in fact want to deposit the 32 girly eth it is on the girly test net so let's go ahead and hit confirm the transaction has started and we can track it that on the ether scan here and there we go we just got a browser notification that it went through let's just refresh the page here and the transaction went through

successfully we're going to keep this screen up here and refer to it later but let's go ahead and hit continue now we're all set so let's go back to the guide we're just going to scroll past these steps as we just completed them now what we need to do is create the wallet for the validator rewards to be deposited into so let's go ahead and first create the validator directory before we do that let's go ahead and make sure that we're in our home directory by just typing cd tilde enter all right let's go ahead and copy and paste this first command and what we're going to do is copy and

paste this next command in our text editor as there is one variable that we need to supply for ourselves and that is the username for our machine now this is going to be different depending on how you've set up your machine in our case it's right here admin at prism validator this is the name of our server the admin part is our username so we're just going to change that here so admin admin and then we're going to copy and paste this command into our command line there we go next what we're going to do is change into the prism directory and then we're going to run this command to

import our validator keys let's go ahead and copy and paste this command first into our text document because there's another variable and that is the path to the validator keys now if you remember we copied the path when we ran our deposit cli program we're simply going to copy and paste that location in the key directory section now that we have that updated let's go ahead and take the command and copy and paste into the command line okay so that command has completed now it's prompting us to enter a wallet directory now we want to specifically put it in

this location which is var lib prism validator so let's go ahead and copy and paste that into our command line here and then hit enter now we want to create a password for the wallet let's go ahead and do that all right there we go we can see that we've successfully imported our keys that's fantastic now what we're going to do is confirm the validator accounts have been created and then run this command and that worked successfully so let's go

ahead and put our validator password in there we go everything looks great next what we're going to do is store our password in a text file for the validator to use so let's go ahead and run this command and then run the following command which will open up a text editor now what we're going to do here is simply put in the password that we generated in the deposit cli once we have the password in that's all you have to do hit control x then y to save and enter to exit now we want to make sure that we have

the correct permissions so that the system reads that file correctly so let's go ahead and run this and that's it so now what we're going to do is configure our validator so let's go ahead and run through those steps the first thing we're going to do this is just like the beacon node and the we're going to first create the user next we're going to run this command which is the setting the permissions for the and now what we want to do is run these commands make sure they're in our home directory and then copy over some files using this

all right so now let's go ahead and create the background service for our we're going to run the pseudo nano command which will open up the text and all we have to do is copy and paste this configuration file provided in the guide and then we'll just make some slight modifications for formatting sake there we go and one line i want to point out here is the graffiti tag now what this does it's an arbitrary string of text that you can put in whatever you'd like there we go and what this does is it posts that

text string if and when your validator has proposed a block it's just sort of a way to saying that yes you did this and here's our tag on it so to save this file let's go control x y to save and hit enter to finish the save let's go ahead and run the system daemon reload to apply the changes we had just made let's go ahead and clear our screen and now let's start our validator let's first run the start command and we'll verify once again with the status and there we go we're active and running so let's go ahead and exit out of this

screen by hitting ctrl c and then let's go ahead and type clear and clear screen next what we're going to do is run the enable command so that if your system's ever rebooted the validator reboots as well and let's verify the logs are running properly too in our validator and there we go so it's waiting to sync with the chain head so basically everything is waiting for the eth1 and eth2 nodes to finish syncing with the chain let's go ahead and exit from the screen with ctrl c and let's clear our screen and that's it you are now running your very own ethereum validator node now a couple items to note here again the eth1 node needs to properly sync and

then at which time your beacon node will start syncing and then your validator will start picking up something also to note if we go back to our browser here let's uh maximize our browser window and go back to the deposit transaction now one thing i want to point out here is the beacon chain deposit section where you have your validator public key this is literally your validator number so if we click into that we're going to see a couple things first we'll see the status of the deposit that we just made and right now we're seeing that there's a a bit of a wait so in about 15 to 16 hours we'll formally see that deposit

process on the test net and the other thing we can do here is if we copy this address next what we're going to do is go to the piermont.beaconchain address and then let's just copy and paste our validator address in there and now we can see the full status of where our validator is in relation to the test network so we can see that our deposit has gone through and now it's going to take looks like around 15 hours for our validator to be processed into the network and be contributing attestations and proposing blocks now we did cover a lot of information in

this tutorial however the steps accomplished today only represent a minimally functioning i would highly recommend following all of the security steps in samir's guide additionally if you do want to develop a dashboard to monitor your validator please feel free to follow the instructions provided by samir which are also in the guides as always if you run into any issues at all the e-staker community is here to help our goal is to be welcoming first and knowledgeable second there are no silly questions and no question too small simply ask and we'll do our best to help for more in-depth and advanced features make sure to check out our monthly e-staker validated workshops details on when those are

will be hosted on our website at estaker.cc alright that's it for me i'm envetica.eth and we'll see you around