How To: Setup a Besu/Teku Validator on Kintsugi Testnet
EthStaker Workshops and Technical Guides · January 2021 · 41:49
This EthStaker workshop walks through setting up a validator on the Kintsugi merge testnet using the Besu execution client paired with the Teku consensus client. The session situates the client setup within the broader network upgrades and staking and validators work ahead of Ethereum's transition to proof-of-stake.
Topics
From EthStaker Workshops and Technical Guides, hosted by Eth Staker.
Transcript
hey everyone superfiz from the east acre community and we are here with our friend luis today hi luis and um so i'm a little bit out of the loop but what i i think we're going to do today is demo a uh konsuki merged test net installation is that correct and so yes um i'm going to remain mostly silent but i think that remy and luis are gonna lead the show is that right yeah maybe i could share my own um computer here yeah i'm sorry my first job is to make everyone co-host and then shut up there you go so let me try to share this
screen hey louise can you tell us a little bit how um how you ended up with us today yeah um it was super random i was just lurking on twitter and i saw that uh remy posted a tweet asking for people to um [Music] do a write-up on how to run a node on konsugi um ideally with a minority client uh and this is something that is an interest area of mine i've been running test net nodes for a while with rocketpool and just like random nodes and trying out different clients because i think it's fun and i'm i've just finished a solidity bootcamp course uh
uh and i've been wanting to try some try my hand at learning in public and contributing back in the form of technical writing and also this is something i i learned by writing and teaching um so it was a good opportunity for me to kind of shore up and solidify some of my my knowledge um and contribute back in a way that i can it's something i feel like i'm good at so that that's why i decided to to help out and respond to remy with this post so awesome um amazing i want to make sure that that you and everyone else knows staker is planning a uh what are we calling it a collaboration with clr fund and it's probably going to go live at the end of february and we're
going to have a lot of grants matching available um and so this is really the kind of one of the kind of projects that i imagine coming out of that and so for the people watching that's really who i want to talk to like if you can write something like this if you can present information in a consumable way you do not have to be anyone um like you have to be developer if you can just share information with people then you're the kind of person we're looking for in this grant uh so keep your eyes open i think right now we're looking at maybe the the last week of february but you'll learn more and uh that's it for me for a while all right why don't we go ahead and start on your guide um
can you tell us like how did you come up with the guide like what was your process to get there what did you try before um what was your idea behind it yeah so um my first foray into running nodes on ethereum was by following the summer sat guides um so i was inspired by his style of writing of um making it i feel like he strikes a good balance between being technical and not like hiding things from you abstracting things away but also making it accessible and readable even for people who don't necessarily have a tech background um so i kind of tried to walk that balance of not always doing the easy thing but also
trying to explain things in line a little bit and i also wanted to spend a little bit of time before jumping into all the nitty gritty technical details about like why would you even do this in the first place like what does this help why does this help anyone what's the value to you what's the value to the community um so the first like two sections are about just like setting the stage of why you would even bother to do this like what's the value um so yeah that's a that's my intro and can you just do a summary of why we should bother with this the merge is happening soon the konsugi testnet is uh available for anyone to participate in
um all the major clients have branches or main branch distributions of their client that work with that test net um there's a really great website for testing the merger i don't have the link on hand but it's linked to in this blog post that has a good outline of all the major client configurations and so forth now is the time to proactively find issues so the test net is a really great opportunity for us all to try this all out beforehand before the real merge happens so any ish kind of issue that we can find ahead of time will be super valuable because it'll prevent a thing a bad thing from happening
um on mainnet and also it's a good opportunity to learn so if you want to just see what it's like running a node just you want to just further solidify your understanding of how ethereum works this is a really great opportunity as well to get familiar with things like execution clients and consensus clients i know it's really helped me with my own understanding um just seeing it and like playing with it and being able to query against the endpoint urls and stuff such so it's an opportunity for you to learn and it's also an opportunity for you to contribute to the community by testing giving feedback on the experience on any issues you find i know i i ended up filing two bugs um when i was writing up this guide so and i
wasn't expecting to find any issues or anything they're not major issues but um yeah it just goes to show that anyone can help anyone can help contribute um so yeah that's the goal of this article that's awesome like yeah i remember seeing you and a bunch of chatters about those bugs and i was like that's that's so great that's so great you can find even like anyone can find a bug and like report them and and help the testing the merge actually um all right so let's say let's say we want to get started here let me get to the the good stuff here um acquiring acquiring hardware um installing and configuring and configuring the prerequisite software i believe most of
this will go through uh i already have this machine here that we can use so we'll start with this this is like a clean install of ubuntu and we can um simply go ahead maybe with installing the software you talk about i hope open ports which are very good and very nice and like if you have actually a real machine that you expect to run in the long term that's a good idea i don't believe this machine will have open ports but it should work even without it let's get started i believe with creating the linux user you guys can see my screen right yep
all right so we'll go and create some of these um users uh as usual if you if you're calling this pseudo command you'll have to enter your password if you're on ubuntu so that's what i'm doing here so here you you're talking about like creating those data directories right and then you specify that you mounted a special folders with your ssd right yeah so for my machine i was testing on an azure vm so i created a disk and mounted it at slash data drive but if you're following along at home that path
may be different so anywhere that you see slash data drive just update it to whatever path you decided to use yeah so i'm not mounting any special drive on my machine here but i'll still create the same directory using this command here which should be fine and maybe it'll make it easier for me to just use the same directory right and we'll do the proper permissions for those directories and those new users now we'll install java um why do you have to to install java here
yeah it's a great question um so the way i set up this article was so that you actually clone the source code and build it locally the reason i wanted to promote the bezu and teku combination of clients is because i personally feel like they're underrated i was initially scared of them because they're they're marketed as like for institutional clients but that doesn't mean they're not exclusively for that scenario um and i think there's a lot of opportunities to use them um because they're built by the same team and they're built with the same software so they're both built with java so i think it's cool that you can install one language and compile them both from source in the
same way kind of like how you can do that with keith and geth and prism um they're both with go so these are both the java you can think whatever you want about java but it's used and relied upon by businesses all over the world it's institutional grades commercial grades anyone grade so yeah that's why i went this route with my path of having people actually install java clone the source and build it locally that's some very good points there um and maybe you could tell a little more about bezu and teku both of those clients are like actually minority clients right now right
and there's a good reason why you might want to use a minority client it actually promotes the health of the network and it prevents a bunch of cases where there might be like bugs in the clients and a large part of the network being moved away because of a majority of clients have uh are running major clients right so um so yeah maybe fizz you could talk about that a little more dude you said client diversity yeah uh i i love that we the e-sticker is doing this and that luis is helping us
with it i i have generally tended toward uh guests and we really need to be willing to shift that focus a little bit to other clients like basically another mind but this that this client diversity improves the robustness of the network it means that any fault in one of one of multiple clients will not bring the entire network down one of my favorite things to talk about for this and i'm just going to be two seconds people say well uh i don't want to say bitcoin it's too late i said it now bitcoin only has one client why does ethereum need multiple clients and the reason is more about like the protocol style development that ethereum
goes through bitcoin has one core client and it only has to answer to itself ethereum is developed more as a protocol a set of rules for communicating between clients it means that it's much more interoperable and much better documented because of that design approach uh multiple clients need to be able to speak together to make sure that they all follow the spec and that the spec is actually developed correctly so we really think of this as a strength even though at this exact moment we feel like client diversity is stressing us out in the big picture it's really a very valuable strength of
i ethereum i did that to colfax the other day too sorry i was gonna warn two seconds for superfiz is like 10 minutes but he always says good things though wait i was i was quick right i mean we're still that was quick no that was that was quick concise i love it and very valuable you're so right i have to acknowledge i i have really only stolen the stage one time and it was your call well you and remy so i it's not i don't always do it right you've got you've gotten much better no i appreciate it and the reason yeah you're just very passionate about things and want to share good information so i thought that was like a very good overview thanks for sharing hey um you know i i have sort of been doing this some of my by myself but i also want to involve
east acre in this february seventh thing um where some folks ox invis and uh michael sproul have combined two really important data sets to help us realize that three centralized exchanges are primarily responsible for this client diversity issue and february 7th they're going to publish their site well and again i have to be honest i said february 7th they didn't that's sort of my date but i think it's going to work out um then we'd like to really draw attention to it and sort of engage uh the machine that is the ethereum community and
really uh encourage these exchanges to get on the right track that's gonna be exciting see remy that's what you get for saying did you have something super please i love it because we're still compiling and it um it explains uh much better than what i could do it myself um this guide we're doing right now is for kinsuki right and louis are you aware of the lifespan of uh kinsuki only a little bit i have second hand information so i've i followed the e2.news blog by ben edgington and that's kind of my primary source of
information for e2 news i know that in his most recent post he mentioned that kansugi is supposed to be a short-lived test net and so i think last i heard it's supposed to be living for like a couple more weeks maybe and then there will be one more two weeks certainly he's saying two two weeks so yeah good to know so yeah two weeks but i think there's supposed to be another one after that after this one and that one is supposed to be the final test net before the merge so yeah they're all the final test well eventually one will be right yeah yeah yeah i think that one i haven't done this yet but um if you follow this guide when the
new network comes out the the new test net um you should be able to tweak some parameters um turn down the turn off the clients and then restart them after reconfiguring them and they maybe you'll have to nuke or delete the data directory and resync the chain but a lot of this should be reusable and i'm planning to update this article or make a second article that has updated information when that happens that's awesome that's what i was getting at here um like the last news that we got about kinsuki was that it might get dropped down in next week or two and then the next um major merge test that which is supposed to be called uh kiln
i believe it might start after that so keep an eyes up keep an eye open for updates to those guys um from louis and uh all of those guys being thrown around um if you can update yours i'll try to update mine too and hopefully people will be able to get up to speed on the next merge test you're about to create a service uh but um oh yes the service copy paste worked it well worked well that's really impressive um i i want to uh this is important um ben eddington and i recorded a walk-through of his january 28th what's new in eth2 today and it's on youtube on the e-sticker channel we're going to try and do that
at least until the merge so um they might be worth checking out awesome so here i just pasted this uh service definition file there's two things that you'll have to replace at least two things here uh the first one is the data path um i've i've been using the same one as luis in his um guide here which is this one here's uh slash datadrive bezu so that's what i've read in here and my home directory i believe is home remy so that should be fine here so let me just press ctrl x to save and then enter to confirm the file
name and i believe that should be it let me just confirm here the directory for my home you clone site interrupter i mean you you cloned the testnet repository in that directory right uh did i believe i did let me only just confirm here yeah yeah there's just chestnuts so now we'll uh do as usual when we create new systemd services which is um to call this uh daemon reload command and then the start command for the service and then we'll make sure that the service is actually running which seems to be fine right you you can see here the active
which stays in green which should confirm it uh let's enable service to make sure it starts on reboot and then let's check out the log uh the live log messages to see if there's any main issue like right now we don't see any like all most of those messages are info messages nothing major it seems so we will assume that the service is running properly right so now let's go and install uh teku um like besu will have to clone the repository and then compile it um which brings me to
maybe uh talking with the torsten um about his f docker project i know f docker has recently added support for kinsugi and i don't know if you have support for installing bezu in fact i do so the way that docker works it's a one from column a one from column b kind of a tool so it currently supports all consensus and execution client that support consumi which is all of them with the exception of aragon so any of those combinations can be installed some of those combinations don't work but that's not because it's docker that's because they don't work yeah
that's a known issue awesome and maybe that could be another um tech video that we could do there with um f docker seeing um if we could install some minority clients and see if they work in any of those combos there yeah maybe that's a consuming v2 or kiln discussion very eager to see some east docker demos here me too super excited did we have any um demo of eve docker previously on if uh sticker we have not done that however the um bazel team has uh decided to actually use the ethoca tool for their demo nice
yeah thirsty and i have talked about it and i kept leading him on we just never got to it and then we started the the monday series and we're like we're gonna do eat soccer but then something keeps coming up so maybe next week yeah if nothing comes up the peso guys were really really really great gracious and uh generous and uh took some time to make s docker work on mac os that's 100 percent of the bazel team i don't have a mac but they do and so now it works there which is awesome i'm really happy about that i saw that recently i'm glad they did it's a great improvement for the tooling environment yeah i didn't actually take that much you know mac os is a bsd under the hood or a bsd-like
kind of like bsd not enough like bsd scrapie it's crazy but uh that aside yeah i mean it's it's basically a unix alike so it's not surprising that it can be made to work relatively easily next week is that in scope sounds good to me if i would wait long enough someone would say sure awesome did you come up with um any issue while you wrote this guy the louis yeah i did um
so i was let's say i i also want to shout out the bezu team um for being super helpful uh i i did run into an issue with bezu uh so the command if you scroll up real quick while we're compiling if you go back to the bezier section um you go to the get checkout command you'll see there's a dash b merge so that means that we're checking out um their source code with their merge branch and then automatically pulling the latest commit from that branch and i found that when following the instructions the bezier was just crashing on launch and so i filed an issue and they were very quick to help me figure it out and come up with a workaround um and then there was a second issue with the um the consensus sorry the the
uh embezzy was trying to sync to the tip of the chain uh my my instance was thinking it was done sinking but it was very far behind what the block explorer was saying for the block height um so i popped into discord and mentioned that i was having an issue and suburban dad hopped on and helped me figure it out um it was actually an issue with the we think it was an issue that they are they are already tracking are aware of um but they help me come up with a workaround which is basically um delete the data directory uh and start over and i they gave me their list of boot nodes which i updated in this drive and this this went right up um so hopefully when you all run this you
won't run into this issue that i did that's that's very great and maybe that's something that's like people are not aware of or like people are not expecting like if you have any issues you can actually talk to the people who are developing those softwares and they they can help you out right i'm i've been having many different conversations on lighthouse discord for instance or on get discords people are very friendly and if you ask them they will gladly help you just found out today that suburban dad was working with basic now that that's a super catch he's a really really helpful and knowledgeable guy so i'm very happy
about that this uh for anyone who doesn't know um way back in the day guess actually had a fault um and and a minority client um then parody kept the network running while geth repaired itself and that's kind of an illustration of what we can do here not enough people run minority execution layer clients but if you choose to run baysu you may have the opportunity to support the network if something goes wrong with geth so it really is a wise choice and i just finished installing or configuring the peku service here and as
you can see it's staying active and it's running properly so let's um enable it and check out the lug for any like major issue just like what we did with uh besu here all right so i'm looking at the logs um i don't see anything special maybe it's not like fully started yet yeah there you see it's it's in sync mode right now like what should we look for next like i believe we're mostly done right yeah pretty much um the last step is just to wait and see how the block sync goes um wait till
it's done and make sure there's no issues um i do have some instructions here in the guide for what you can do like how do you know i think it's pretty easy to get lost as a first timer doing this i don't know like how do i know when it's done syncing it's not like it's gonna like text me when it's done so i have some instructions here on how you can run that curl command and what that'll do is that'll ask bez you hey what's the what's the current block height you're aware of and it should be pretty low um and then we should be able to check that against the block explorer and see our progress that way so let's try it i don't have uh curls let me install that quickly
and while that's installing i can talk about how what this is doing under the hood so um go ahead you don't have to go back to the the config but if you remember the bezu service config the system and d file there's a flag in there uh rpc http api and our pc http enabled that just tells bezu like hey we want to use the rpc http api so that rpc stands for remote procedural command or something like that um it's a web service so the bazoo client is now able to accept requests from us so our curl command is us asking bezu to do something and tell us some information um so yeah so you can see that it's running
uh it looks like it's giving us 0x0 and that result value is a hexadecimal value so for those who aren't aware it's just a different way of representing numbers um it's base 16 instead of base 10 uh so if you have a calculator app you can i i mean you don't need to compute 0x0 because we know that's zero but yeah when it does start syncing you'll get things like b1 or like a6 16f or whatever um so what i use is a calculator app on i use a mac but i know windows also has a programmer mode where you can just paste in the hexadecimal value and it'll give you the base 10 value yeah it looks like ubuntu has that too so that's cool
but yeah so when it's done syncing the the value that you see should match the value that you see in the block explorer which there's a link to in the section below i'm not familiar with this uh programming mode calculator here but if you want to try it and see for yourself um that's that's a pretty good way to to find out the actual block number where your um your client is actually at for besu here all right so that's that's a good way to check out if you're in sync and for um the teku uh client you got under you got another curl commander here right oh actually this one's still
bezu so there's i i noticed there was a second rpc http api that they support um you can see that the method is heath sinking yeah and this one's a more straightforward like yes or no is it done sinking or not um so that's just another command you can run still for all right and yeah this is the this is the one for thaku where you you're telling the users to check out the logs yep exactly so let's let's have a look at those locks quickly here seems like we're having a bunch of errors not sure what they are related to
i think it might be related to bezu so if you go back to the other terminal i was seeing an issue like maybe this is the same issue i ran into um or maybe it's something else i don't know this is why we're testing the merge yeah um bezu client looks like it was on block zero and not progressing from there so i wonder if there's some issue in the logs so this is the the bezel log here so maybe there's an issue with my version of the bezu client or the teku client but in any case here i'm seeing a bunch of um info message i'm not familiar with yeah i think that this is
this these engine fork choice updated logs i think this from my from my suburban dad was telling me i think this is um so what's happening under the hood we have two clients running in two different system md processes uh and teku is asking pezu so our our consensus layer is asking our execution layer for stuff um and i think this is what what these consensus fork choice messages are showing us um it's doing it repeatedly so there's there it seems like there might be something wrong here um possibly with bezu um could you check what the latest block number is if you run that so let me let me check with that curl command here again i'm slot zero yeah so that seems like there's something wrong with
beijing there and i'm and it kind of makes sense that tekku is also having an issue um yeah so i don't know how you guys want to do this i'm not familiar how to live debug um beijing or teku um yeah i don't think we will do any live debugging here but that that was a good uh run of um installing base winteku um either way yeah you probably don't want to do any live debugging um so a couple things about this one i'm not sure which um which build you're using here there was a recent bazoo build that changed how they run on test net on kinsubi and then secondly um bonsai trees are currently not um supported on kinsugi i'm not sure
whether you're using them i'm assuming no and then thirdly these two uh clients here teco and bezu they kind of rely on each other for the sync so it's to some degree normal that you get some interesting messages while they're both syncing until they're both in sync with each other so where in the current network your execution client can sync completely independently of your consensus client that is not the case once were merged the two need to work together to both get to full sync that's a very good point and i've seen a recent update in the the spec as well so maybe like bezu has updated uh with the new spec or tech
teku has updated with their new spec and maybe there's some discrepancy there um between those two clients so who knows hey um actually i had an idea can you go to the bezu directory and just do um yeah cd bezou and then git log i'm just curious to see if we're on totally different commits um i was on a commit when i tested from january 21st yeah so i'm going to commit from january 30th yeah let me just post the commit hash so that i'm i'm on uh maybe we can just give it a try real quick to see if that works
okay i just messaged you you uh the commit hash on discord so just do git check out and then that commit hash first stop vezu and then we'll delete that data dir and then try again and we'll have to recompile right right
right yeah that's a good point yeah some would say fizz should talk for 10 minutes so we can there's a couple things we can talk about um one thing we might talk about is block production um anybody know the uh the the diversity kind of that we have now in ethereum which clients actually produce blocks on ethereum mainnet i believe it's the most uh 100 gif right it is 100 percent guest that's right besu and never mind 100 so okay so besso and nethermind do not have a portion of the block
production mainnet and both teams are quite keen to get a slice of that with merge so they now have a really good opportunity to get in there and not let that be uh kind of ossified at 100 geth again which was interesting yeah i have not i haven't made it my obviously my mission is client diversity when i say that i'm generally referring to consensus layer clients but i didn't really i wasn't really aware that a hundred percent of proposals are uh guest so that makes that makes me feel convicted i i wanted to like focus my scope on like i can handle
consensus layer um but that's that's a real tragedy yeah the good news though is that um so when you think about uh the the staking outfits right now the big guys right every change of course is a big deal for them everything has to be q8 run through full testing first like in terms of infrastructure right infrastructure yes now when you're talking though about the uh execution client because it does so little as far as the chain is concerned the the beacon chain is concerned right now it's critical but it doesn't get used for like a year for a single validator right once you
have thousands it gets used all the time and it can be load balanced and it doesn't actually have validator keys that means you can take your guess you could put enough bezel in there and you put a nether mind in there and then load balance across them and it will work fine and converge you'll have to rejigger your entire infrastructure anyway right and no client no client keys need to be moved et cetera it's a lot less scary than changing the execution client um sorry the consensus client and if you're also changing the validator client now a lot of these guys actually use remote signers for that so for them if they can find a consensus client that supports that remote signer they don't even need to move the keys right so that makes it even easier
all i'm saying is it's not a it's every infrastructure change is a big lift for those guys but it doesn't uh cause a slashing if you if you change like get too busy or never mind i'll bring that in that's some good point yeah like um before the merge it's pretty easy for those big services to add additional execution clients and like well balance across all of them right um past merch is a little different there are some efforts on the way to have a way to uh submit blocks for execution to multiple
execution clients but right now like in this testnet it's meant to be a one-to-one um interaction which also means that say you you you uh sync this basically here and then you're like ah tech was great but let's try baso lighthouse you may have to re-sync both in testing it's not always successful because they sync with each other it's not always successful to just replace one and replace it with another i expect that'll get better as we get into further test nets but that's where we are right now good stuff
um i uh recompile besu with um commit you provided me uh louis um it's it seems to be waiting to find peers so maybe once it finds peers it'll go ago well um but i think that's pretty much it i don't know if there's anything else you want to tell us about uh maybe maybe you could tell us a little more about you like where can you find uh what you're working on um maybe on twitter or something yeah um so i i don't work in web 3. i just it's a passion of mine it's a hobby interest at the moment um i like to do technical
writing i'm pretty new to publishing technical writing uh um this is actually my second article um but i'm planning to continue to do so and i'm gonna post them here on hash node uh just because i needed a blogging site and i picked that one and i'll be posting them on twitter as well so the the next thing i'm working on is a guide for people who are building smart contracts how to integrate ens um i think that's an interesting problem i thought it was i was curious how that worked so i did some research and i'm writing up a guide um for how to how to how to resolve ens names in your smart contract um so more of a technical audience uh for solidity devs um how to do things
store an ens name and also an ethereum address in a single data structure because otherwise it's kind of awkward having to maintain two separate data structures um but yeah this is all stuff i do in my free time just for fun and yeah if you want to follow me on twitter i will keep posting educational content for for those of the technical background but also trying to make it accessible um to people who are just interested in learning more awesome we'll make sure to post the link to this um guide and a link to your twitter account as well awesome thanks um so just a quick note on the the sync here yeah i see that it's stuck on xero peers so for anyone following along at um i wonder
if it has to do with us not opening ports um it might right because there might not be enough like good peers on the network right now for us to be able to find those peers yeah that's a really good point as well yes yeah because when i tested it i was on just like an azure vm and the very first thing i did was open all the ports um and i i was able to sync with the the boot nodes that are in this guide in like 10 15 minutes um so if anyone's at home trying this maybe try opening the ports first and then then try running it um good point all right um fizz do you have anything else you want to ask lewis about or to say i i
i love that uh someone who's so engaged in the community is just you know made themselves available i'm glad that you came here to share with us um we're trying to do these videos every monday and while we do have a lot of ideas if anyone else wants to reach out and say hey this is a great idea i feel like we would jump on it immediately um after we finished the east docker one luis i'm really appreciative of you um and uh i'm just i'm glad that that you're working in the right direction awesome well thanks to you guys i appreciate it i actually you know my interest in staking was from uh following mapping out e2.0 the coindesk podcast uh i remember watching you
on that listening to you in the car um on that podcast and that's kind of where i ended up on eat staker and i kind of just been lurking there for a long time so there are other people like me i mean i'm totally just like a random person who responded to remy's post and decided to write up an article um so yeah hopefully other people are interested in taking that leap as well when we started fizz asked me like how do you know this guy and i said he just replied to me on twitter so so that how it's worked that's how all of this does really like that's that's how we build webs and networks um i i had seen your name a few times but i didn't have a connection so i'm just i'm happy this worked out i i learned a lot
today if nothing else um i learned about your professional ability which is exciting to me so thanks thanks to all of you and once again it was really nice to meet you all thanks for having me thank you this was awesome bye-bye