[转载]快速搭建 Lido CSM 成为 Ethereum Validator
[转载]快速搭建 Lido CSM 成为 Ethereum Validator · 23:50
Samuel Chong, a solo staker and Lido Community Lifeguard, demonstrates how to run an Ethereum validator on the Lido CSM testnet using Google Cloud and ETH Docker. The walkthrough covers machine setup, testnet funds, validator keys, deposit data and basic monitoring, finishing with further information about ETH Docker.
Speakers
Topics
From [转载]快速搭建 Lido CSM 成为 Ethereum Validator.
Transcript
All right, solo staker fam. Another day, another speed run. And today we are going to be using ETH Docker to spin up an Ethereum validator node once again for free on a virtual machine using cloud credits. And in doing so, we will be participating in the Lido CSM test net so that we can enjoy benefits on the mainet when it goes live later this year. So, similar to my previous video, the first thing you got to do is to sign up for a new Google Cloud account. So, just open up a browser and search for Google Cloud credits and you will see that you are able to try with $300 of free credits. So you will have to enter your credit card
details but you just have to cancel your virtual machine and all services before your credit runs out to avoid your card getting charged. So in my case I have already set up my Google cloud account. So I can directly go to my console. Click into it and in the top right corner you will see the console. Click into it and you will select create a VM here.
All right. So now we will have to input the parameters of our virtual machine starting from the name. We can call it whatever we want. Once again I'll call it CSM test net if docker. So all of the name characters needs to be in small case in lower case um and without any spaces. You can use the the dash in place of the ca of the spaces. machine configuration, keep it to E2, the cheapest type if I'm not wrong. And for the machine type, we will need at least 8 GB of memory. So, the smallest machine we can select is this E2-standard-2
machine with two virtual CPUs and 8 GB gigabytes of memory. All right, the next thing you got to change is the boot disk. So, we click on this change button. Change the uh operating system to Ubuntu. Ubuntu, not Ubuntu. Choose the latest version 24.04 x86 version. Uh or you can look for AMD 64 instead of ARM 64. So take note of this.
Keep the boot disc type to balance persistent disc and the size of the disc set it to 350GB. Once you're done, hit select and you will see that the monthly estimation to run this virtual machine is around $84. So with free credits of $300, you will be able to acrue 3.5 months more or less of practice time. Under identity and API access, select no service account. Be sure to select no service account.
Otherwise, I don't think you'll be able to spin up this uh machine on a on a free uh credits under firewall. Check the first two boxes and then you can go ahead and create the virtual machine. All right. So while it's being spun up, what you have to do is open a new browser tab and um just search for lido finance uh / do e-doccker.
Um yeah, just just click into the to the GitHub link and then just go back to the parent folder of Lido Finance. Yeah, just make sure you're here. Um you know what the next step should be? Yeah, you're searching for Lido Finance GitHub. That'll be quicker. Click into the GitHub account, right? Scroll all the way down under the repository section. Search for ETH-doer and click into this Eve Docker repository. So here we are using the lidos fork of E docker to spin up our CSM validator because a lot of the uh
steps are are more streamlined in this fork rather than the normal E doer repository. So scroll all the way down to the installation instructions under getting started. So first we have to copy this first uh line of command which will do everything for us in terms of downloading E doer. And now head back to your Google cloud console. Then you will see that your CSM test net- docker virtual machine is ready. And the way to access this virtual machine is to click on the SSH button all the way to the right.
Right. Let's wait for it to load. All right. So what you have to do once you're in is to paste the command that you copied from the Eve Docker repository into the terminal and hit enter. Right? So now it's downloaded. The next command you have to run is this slashed install.
Let it do its thing. When prompted, just select yes and enter. And we'll just wait for it to install everything in the background, all the dependencies, all the requirements so that we don't have to do this manually ourselves. All right. Do you want to be able to call if D command from anywhere? Type yes and enter. All right. So now we have to exit our virtual machine. So just go ahead and type exit and enter.
All right. And then go back to our console and relo using the SSH. So this restart of your VM is required in order to register your host user into the Docker user group. So it's just a heristic. Take it as a heristic for now. Um where will we? Yes. And then once you've installed dependencies, then you'll have to configure the if docker um service. So instead of this /d config, oops, you can now run the ifd config without the dot / prefix.
Run it. You'll be guided into a terminal UI once again. And then so you'll select holiski test net the first one. Select the third option next for a lido compatible node either community staking or simple DVT. And today we'll be covering community staking. Select the first option for community staking. And then now you are free to select whichever uh client combinations you like. But because of our machine restrictions, we need to be very lightweight. And for that, I highly recommend going with Nimbus.
And for the execution client, let's use RET. Why not? This is the newest execution client. And since we're on test net, let's give it a go. All right. So, what is the URL for your consensus layer checkpoint sync provider? Uh, this is already prefilled for you. So you can use tab the tab key tab to navigate to the uh okay button and hit enter. Do you want to use mv boost? Yes. This is required uh as a CSM operator. Uh you you'll be required to choose relays. Select make sure all four are selected and then use tap button once again to navigate to the okay button.
Hit enter. Do you want to use graphana dashboards? Grafana is a tool for monitoring the performance of your validator node and the uh various um software and clients running uh within your validator node. So um select yes graffiti you can enter anything you want you know let's call it CSM dash validator 001 use the tap button once again to navigate to okay do you want to generate validator keys yes enter number of validators to generate we'll select one use a tap key to navigate to okay enter enter validator key store password so um once again this is the password to
encrypt your encrypt and decrypt your validator key source. So for simplicity state sake uh let's go with a simple password of password and once you hit enter the if docker tool will install everything on the background uh for you and we just got to wait for a while here. In the meantime, I'll show you how to get your Hleski ETH. So, open up a new tab. So, you need um a test net ETH, right? So, search for automata faucet.
All right. So, this faucet is by far the easiest foret to use in my opinion. It doesn't require any accounts, no signups, no social verification, no task list, no nonsense. It just gives you the test net ETH as long as you can uh prove that you are not a bot. That's all. So, copy your wallet address. All right. So you have to enter the password or the pin uh for your machine for your laptop for your CPU for your desktop whatever. So once the pass key is uh saved now you can click on attach
and get my tokens and just wait for it to do its thing. Testation succeeded. Please check here. Okay. Now let's um for each uh drip automata will give you one hlesslesi ETH. So we need two Hleski ETH in order to um provide as a bond for us our first TSM validated. So let's click on this button again. Let's try it and see if we can get another uh one Hleski E. So just hit just enter the uh the pin for your machine.
Okay. And now you can attest and get tokens. All right. All right. So, one Hleski ETH is already in my wallet. We'll just wait for the the other one to arrive. So, in order to get more than two test net ETH from Hleski faucets, you will need to use a wallet address with at least 0.001 001 ETH on the mainet and once you have that you will be able to use the Google cloud foret and the quicknote foret so that you can get some gas amount so Google's is the easiest just enter your
just enter your address here paste it in to receive hleski e and it will be sent to you and yep You will receive one test net ETH into your your wallet. This is mainet. Let's go to Hleski now. So now you have three ETH which is enough for two ETH bond plus gas for transaction fees when uploading your keys onto the Lido CSM widget.
But if you still find this too troublesome, you can drop your testnet Ethereum address into the comment section of this video and I will send you some testnet Eve to cover your gas fees. And for security reasons, make sure you don't use your main wallet address if you do comment. And in the meantime, let's go and check out our virtual machine. So the pneumonic or the seed phrase is now being generated. um you'll be prompted to uh write it down and store it safely um on the mainet. Do not store this digitally. Write this down on a piece of paper. But for the purposes of our test net demo today, we can go ahead and copy it and you know just save
it on a notepad just so that we are able to regenerate our keys if needed. So I'll call it CSM test net if docker and save it. All right. So next we will have to re-enter the pneumonic or seed phrase to make sure that we have recorded it accurately and then the if docker tool will generate our keys for us. All right. So final steps. Final steps, we need to run our node with ifd d start and wait until our node is fully synchronized and then
submit our keys on the the lido csm test net and then finally import our keys using ed keys import. All right. So select okay. Boom boom boom boom. All these are docker containers that are being pulled and installed and make sure everything is ready to be run. All right. So everything is done. Now we can dod start to start all of our docker containers that runs the software and clients required for our validator node. Now what we got to do is to import our validator keys. But before we do that, we need to change the permissions of the folder containing our validator keys.
And um this will be the one of the only commands that you have to type out. And this will be included in the goot link in the video description. So type in sudo chn for change owner- capital r and then your username here. Just copy it. So ch- capital r your username. This two dots thing is your username again. and e-doccker slash doeth slash validator keys and enter. All right, once that's done, type ed keys
import and there will be a warning to inform you that imported keys are immediately live. So do not have the same key running on two different instances or two different machines otherwise you will be slashed. So type yes and enter to acknowledge this uh warning. Enter the password to decrypt your validator keys. Re-enter it and your key will be imported.
All right. So now let's make sure that your um all of your clients are running without errors. So run if dd space logs o wrong wrong command ifd space logs d-tail 20. All right let's see. So far so good. Everything is up and running without any errors.
Is this an error? Nope. All right. All right. All right. Now, the last step we have to do is to upload our deposit data onto the Lido CSM widget. And to do that, we need to print out the contents of the deposit data.json file. And here's what you do. run cat space cat is a command to print out the contents of a file e-doccker or you can use the tab button to autofill uh slash validator use the tab button to autofill once again deposit and autofill to print this out. So this the contents
of this file um are not private. They don't have to be uh kept very secure unlike your validator signing key stores. This can be transferred around freely and all it exposes is the amount of E that you intended to deposit your public key and your withdrawal credentials. In this case, the withdrawal credentials is set to the Lido withdrawal vault. So there's no risk of doxing yourself here. All right. So once that's done, open up a new browser tab. Go to csm.testnet.fi.
All right. Um if you're a new node operator, select become a node operator. Select metam mask. Okay. connect to the wallet address that you would like to register on the CSM and then create node operator here. Paste your deposit data contents from uh your terminal into this box. And once you have enough ETH to provide as a bond and to pay for gas, you will be able to create a node operator on the Lido CSM widget.
So click on confirm the transaction and wait for your keys to be uploaded. All right. So, your keys are uploaded. Now you can click on the view keys tab and you will see that the status is depositable. It means that you have provided the bond. The key is valid and it's only a matter of time before Lido CSM makes the 32 E deposit into your validator key on your behalf.
Um, next, click on this link to open up the Hleski beacon chain website on a new tab. And you'll see that your validator is not found. And it is because Lido has not deposited the 32 E required to activate your validator key. Uh, and what you will be able to do uh once the key goes live is that you can sign up for an account on Beacon Chain. Um, and then you can log in and one and once you're logged in, what you can do is click on notifications and you it'll bring you to this page here uh where you can add your validator into your watch list. So the way you search for this is by entering the the public key of your
validator and then select all events other than withdrawal processed and then hit add validator. But I can't do it now because my key is not activated yet. So once it's activated and it's live on the beacon chain, you can then add this to your watch list. And if there are any um missed attestations validator goes offline miss proposals validator proposals a block you got slash you have a upcoming sync community duty scheduled you will receive an email notification from this beacon chain website. So it's a very handy tool for monitoring. um very easy to set it up and the all solo stakers should at least use this to monitor the performance of their validators. All right, so now let's make
sure that all of our services are running properly. So just go back to your terminal and rund space logs. If the space locks d-tail uh 20-fr C to exit the monitoring view and we are done. So, as you can see, this is super easy to get started on with minimal command line knowledge required and all you got to do is familiarize yourself
with the process. Uh, and over time understand what you're trying to do. Full disclaimer, um, at this stage, you guys will not be mainet ready. And in order for that to happen, you will need to understand at least what causes slashing events, how to prevent slashing events, how to mitigate slashing risks, um understand what you're doing at least on a basic level um at every step of the way. But this does give you an easy way to participate in the Lido CSM test net so that you can enjoy benefits on the mainet. And for those who are interested to know more about ETH docker, it is a very powerful abstraction tool for node operators. Whether you are a beginner or
an advanced user or even a professional note operator, there is something for everyone. for beginners. It is it provides an easy to use user interface so that you don't have to be a wizard at the command line in order to get started and dip your toes into the realm of solo staking. for advanced or professional note operators. It is fully configurable and the creator of E Doer is one of the core members of the global EF staker community and he also uses Eve Docker for his own professional node operator company which runs around 9,000 Ethereum validator keys on the main net as one of Lido's
curated node operators. So, I highly recommend investing time into learning if Docker if you want to take your web 3 skills to the next level and open up new opportunities to monetize in this space. Thank you for watching and see you guys next time.