Superphiz talks with Jim McDonald from Attestant about Slashing on the Ethereum Beacon Chain Network

EthStaker Special Events · November 2020 · 1:01:53

EthStaker community host Superphiz talks with Jim McDonald of staking infrastructure provider Attestant about slashing on the Ethereum beacon chain network. The conversation covers how validator slashing penalties work, the conditions that trigger them, and how operators can configure their staking setups to avoid double-signing and other slashable offenses. McDonald draws on his work building validator tooling like ethdo to explain safeguards for solo and institutional stakers alike.

Speakers

Topics

From EthStaker Special Events, hosted by Eth Staker.

Transcript

uh hey jim uh superfist here recording with uh jim mcdonald uh i had some questions about slashing um i i tried to keep up with in the beginning i got behind and i see a lot of questions in the community now about how slashing works and so my goal is to distill information so that it can be consumed in bite-sized chunks and i hope that you would help me work through it and maybe just a little bit longer form and then either we'll have a bite-sized product or i might condense it into a bite-size product later um to make it more consumable um is that does that sound fair to you

that sounds great so tell me about flashing okay so probably the first thing to know about slashing is that it is not losing money through not voting so a lot of people think that any time that you lose money you are being slashed that is not correct you can lose money by not attesting not proposing if your computer is offline if you have a network issue all of those things however that's just a penalty so that is just when you you don't do what you're meant to do you get a little bit dinged as a result but everyone moves on everyone's happy slashing is a very specific thing slashing

is when you cheat as far as a network is concerned so as far as the network is concerned it will say okay you've done something that could potentially damage the ethereum two beacon chain and if you do that because of the potential impact of that there is a much higher penalty and that is slashing okay um and so that that is in contrast to leakage now this might be a silly question i've i have seen leakage referred to as both leakage and quadratic leakage but all leakage is quadratic leakage it's just that it doesn't really scale to those quadratic proportions

until a lot of validators are offline is that is that accurate so so the rewards and penalty system is probably the single most confusing and complex part of the of the entire system which is saying something when you consider that we're meant to be building a consensus engine and this is kind of the piece that goes there so if you do not a test for a given slot so you're meant to attest to a block you don't do so at that point in time you will be given a penalty that is roughly equivalent to what you would have got if you had a tested perfectly so that is something where because of the nature of that loss over time it

will decrease because your balance goes down so the the money you would have have gained goes down as a result that your penalty goes down so that is not actually quadratic that is actually called sublinear so it if you start up a validator and never attest to it you will start off losing a certain amount of uh of ether every six minutes a week later you'll still be losing ether but at a lower rate so you're not going to actually have you know an increasing or quadratic penalty the quadratic penalty is something that's specific to what's called the inactivity leak so the inactivity leak actually occurs when fewer than two-thirds of the

validators attest to a uh fewer than two-thirds of the attest to a particular epoch so an epoch six and a half minutes and that epoch in which inside one e-book every single active validator will or is meant to a test so if you're in that space and you don't test then you'll have a if more than a third of the validators don't detest though we're in a different situation and in that situation what happens is we're now in a world where give me just just one second is so important and i love the guy i just say one sec

all right and we're back on so there's a difference between a normal leak for someone who doesn't do what they should do which is known as a penalty and the quadratic leak which is something that occurs when a large percentage of validators don't do what they should so if we have a quick look at a normal validator a validator by itself is due to a test once every what's called an epoch six and a half minutes roughly if it doesn't do what it's meant to do if it doesn't a testament it's meant to it will be penalized it would be penalized approximately the same amount that it would have been rewarded if it had done the work due to the nature of rewards and penalties in ethereum two though

the amount of reward or penalties related to the balance of the of the validator so if you started a new validator up and you never bothered a testing with it then as soon as it starts it's meant to attest it doesn't as a result of that you will have a penalty applied a week later you're meant to be a testing you're not you will have another penalty applied but that second penalty then will be smaller because your balance is less so over time the amount that you are penalized for not validating if it's over a long period of time actually decreases this though is purely for an individual validator there's a situation called the inactivity leak or the quadratic leak and this is a different beast so if more

than one third of all of the active validators do not attest we're in a different situation the chain actually cannot finalize so we need enough votes on the chain to come to agreement if we don't get that and we don't get that continually the chain itself is in trouble so we're we're not finalizing nothing written to the chain can actually be guaranteed to be final until we come back to this point where two-thirds of the validators are voting there's nothing the chain itself can do to convince people to vote it can't send them emails or put out posts and say hey come and vote for me what it can do is it can penalize the the

validators that are not voting to the point where they leave or they start again they leave generally by having their balance reduced down to 16 ether at which case they are rejected and obviously they can start to uh to come back and start a testing because losing 16 ether in the current climate is what you know six thousand seven thousand dollars or what else it might be as a result of that of course we would fully expect people to want to come back on board so the chain does what it can the penalty for not attesting when the chain is not finalizing is the piece that is a quadratic leak so you don't uh a test for the first epoch where you're meant to and the

chain's in leak you'll get a penalty you do it again you get two times a penalty you do it again you get three times the original penalty etc etc so the actual increase is um on the individual penalties is actually uh linear again slightly sublinear but the overall impact if you take it over a period of time is quadratic so you know if you're if you're off for one week uh and you get a penalty of one each one for two weeks maybe two three weeks it'll be four it'll be eight it'll be sixteen so the overall penalty does increase over always worth remembering that what the chain is trying to do is protect itself so it's ensuring that people are doing what they should be doing and it's ensuring that it can finalize

in whichever way it can make sure it can awesome okay so just to be trying to wrap my mind around this uh you described a sublinear penalty and a quadratic leak are are these so these if uh leakage is the class and these are two types of leakage does that mean that they are codified in different algorithms or is it a different expression of the same algorithm they are actually two separate things so the inactivity leak at current is a completely separate beast to having a single penalty for for not a testing and we see this and one of the concerns that people have about ethereum two in inactivity leaks so with madasha we've

had a couple of instances where we've we've been in the state where the chain is not finalized and people are or believe they are attesting perfectly and they're still losing funds and it's relatively minimal we tracked this over the last period of inactivity and during the time that uh an inactive validator lost 45 50 off of its balance the active validator lost about one and a half percent so it's not a huge amount but it's still there and obviously it's considered unfair um again we come back to the problem that the chain can't differentiate so when at least one third of validators are offline

theoretically at least one third of blocks aren't being produced either as a result of that and because of the state of randomness you can have periods where two three four slots in a row don't have blocks they need to have so if i attested and then there are four blocks that didn't turn up my attestation has to go and fit into this fifth block that has got all the information from the past four slots to try and get in commonly that means it either won't fit and even if it does fit i'm late i should have done it four blocks ago the fact that block wasn't present is neither here nor there and again the chain can't tell the difference it can't tell if someone was sneakily not creating a block when they when they were meant to they can't tell if i created my

attestation when i said i did or just held it back a bit to try and try and confuse the chain as a result of that i have to be penalized for the good of the network so even though i'm trying to attest perfectly because the network cannot work out our intentions you'll be penalized a little bit uh during during that quadratic league period i i love that this is finally sinking in for me like it's you you did a test but your inclusion distance is so far behind that the reward or the yes i think i understand okay we're doing great um so i i have this this outline i i think that we

we covered a lot of it in the first one and i understand now the big picture so much better than i did so there are three types of slashings that are possible they're listed as double proposal surround vote and double vote um and i think those are is pretty easy to understand is that is my basic understanding correct that a double proposal is simply when you propose twice in when you are well you're assigned to a proposal slot um randomly and if you propose twice during that assigned slot that would be a double vote absolutely and the reason behind that is is is pretty simple

so if it's my turn to propose a block and i say to the world okay here's a block and in this block and there's a transaction that says i sense who prefers tenether you can see that people will vote on that it will try to become part of the chain if i sneakily create a second block at the same time that doesn't include that transaction i could potentially get you to do something because i've given you tennessee you know you you send me a monitor or whatever and then i put the new block in place instead that doesn't have that transaction in i am trying to not only cheat you but i'm trying to fool the network so when you do that there is a danger that not only for anyone who is

nefarious out there i might have a bunch of guys who are willing to to sign up to my second block and not my first one but also just for the people out there who are trying to do the right thing in the chain to see two blocks suddenly means i don't know which one they should attest to only one of them will ever make it into the chain if if either of them do but they are rewarded on a testing to the correct block when there's only one block that should be simple when there's more than one block there's not so again any attempt to create more than one block in the same slot has to be looked at by the network as a potential attack and because of that it's treated as a slashing event okay and so a double proposal seems like the most

serious um of flashable event is is it penalized more severely because of the type of because it's a double proposal or is it no so every every slashing is um is treated the same way and i mean they're actually pretty much as serious as each other so if we move on to for example one of one of the attestation slashings which is it's called a double vote and again the idea is you change your vote so you know if we move away from from blockchain for a minute and have a little think about what's going on here let's say we have six people in a room they get to choose they'll vote either right or they'll vote blue and we just

need a majority to carry on okay so everyone signs a bit of paper saying if they vote red or blue we have a look at the bits of paper we had four votes for red and two votes for blue we move on if then after that someone says hey hang on a minute look i've got these votes here and i've now found five votes for blue and there's still only four votes for red then two things one we've suddenly changed the vote that we had we thought we were voting red we now suddenly voted blue but the second thing and the really critical thing is the only way that can happen because we now have nine total votes the only way we can do that is if at least

three people voted for both red and blue voting for red and blue voting for two different blocks or similar that is that that's our double vote when we when we say we're doing different things we are voting twice we are trying to confuse the network again we could be doing it accidentally or similarly but the network has to treat it as a malicious attack as a result of that we're like okay we can see there are two separate votes from the same person for two different things that is a slashing event so again it is equally punished by the network in the same way okay and so if we look at so slashing should never be an

accidental kind of offense like an honest person running their validator should never be slashed but and that is fair i know that but with that said there's the caveat um of and i discovered this early on playing on topaz i think where um i left the machine on running validator keys i thought it was off i i moved to a new machine and for quite some time i was running the same validator keys on two machines what happened to them absolutely so because of the nature of the blockchains that we have and especially ethereum two

because these are peer-to-peer systems there is no guarantee that any two systems will have the same completely up-to-date view of the network at any one time one of the whole reasons we go through this whole loop of trying to build consensus trying to gain finality is that we can move away from the the kind of bubbling miasma of these all the things that could be to actually this is now set in stone this is absolutely the history of the chain and we're happy and we move on because we can have each node having a very different view of what the blockchain looks like then as you mentioned when when it comes time for you to let's say a test to uh to the existing state of the chain

you can easily create two different attestations because you know over on one side you might have you might have received the latest block on the other side you haven't yet because that computer is running a little bit slowly or it has fewer connections or it's just rebooted and is catching up so there's all sorts of reasons why in a completely normal operation we would not expect any two nodes certainly over time to have the same view of the of the beacon chain and if at that point in time when you are asked to create an attestation create a proposal if you have different views from your your counterpart that has the same keys then you will create this situation where you appear to be voting for two different things

proposing two different blocks and of course as we said the network still cannot differentiate between an honest mistake and an attack and has to treat it as an attack and you are slashed accordingly okay so and just to be clear that is that is the only case that i'm aware of where for example a home user could potentially accidentally be slash and that is running the validator keys in two places is there another or anything else that are there is there any potential oops uh without modifying software that could lead an otherwise honest person who's trying to you know have redundancy to make a slash to create a slashable event

so as you say you know it's it's normally around this having redundancy idea i need a hot backup i need to ensure that if my primary computer explodes i can i can recover myself in in 30 seconds or whatever it might be um and there are variations of that so you might have a computer a home and one away in you know an offsite data center you you might have um a system that's designed to quickly restart an event of a failure to move to a different beacon chain and all these kind of things so it is still possible to slash yourself even if you only have one computer so we'll give you give you a simple example let's say that you have a system that will validate against prism if there's a problem with prism for some

reason you will quickly shut down prism you'll move all your keys over to teku and then you'll start teku and you'll and you'll come back up again well in those type of situations potentially again if you do that quickly enough if you're so good that you can get the whole thing done within a few seconds potentially you can actually cause a slashing event because you know i can vote for a particular slot on prism then prism stops then i move over i start up on teku and i can actually vote for the same slot on teku again potentially with a different kind of kind of situation in terms of what my view of the beacon chain is and as a result cause a slashing event um as you as you mentioned you know it's not just backup either you know the idea of moving from one computer to another

computer you know how i'm gonna upgrade from my my old laptop to my nice new shiny desktop that i bought i'm gonna move the validated keys over and again you can you can potentially have problems there there is a well there are now a few bits and pieces around that one is that if you're going to shut down a computer do it properly and the best way of doing that is to remove the validator keys or move the key the passphrase the validator store somewhere else okay you know just just just do something so that if this thing does start up again then it it'll just fail again immediately because like i said it either can't find the the validated key stores or it can't decrypt them and

carry on that way so there's certainly that to do the other thing to do is to give it a little bit of time now this is anathema to a lot of ops guys you know everyone's focused on five nines uptime and i wanted to fail over within 30 seconds and all of this kind of stuff absolutely you don't need to do that as we mentioned the in ethereum 2 your penalty will only be about the same as your reward and epoch is about six and a half minutes so if you want to be completely completely safe then one of the things you can do is you can shut one computer down you can wait for two full epochs because you could potentially be on the very edge of one where you were just about to attest and and the other one so if you wait for two

full epochs and you start up on the other side you are very very safe the other thing that the ethereum community has been working on the development teams have been working quite hard on this is something they call the slashing protection interchange format which is a little bit of a mouthful but fundamentally when a validator signs a block for example it makes a note of it it remembers that it signed that block now that's good because say there was a problem with your local time your clock or something you might think you've gone back in time in five minutes and want to create this block again because that's the time you're meant to do it at you won't have that problem because the database has a note to say hey i've

already done something for this slot i'm not going to do it again if you can move that information along with the key stores as you move it around then again that provides a lot of a lot of protection now it's relatively early days eip is still in draft and it has gone through a fair few revisions but it's out there and it is working and we expect the current version which is version five to be available in all of the uh clients that are out there all the validator clients that are going to be running i would say something that that is really important though with all of these things is you know what take your time there's you can

miss a point zero zero zero zero four ether and you know you can miss that reward you can miss half a day if you so desire you know what you're rushing around it's late at night you're tired you think you fixed it all my personal opinion would be you know what go to bed don't start this up yet wake up the next morning check it out it's going to cost you in reality 10 bucks 15 bucks something like that and that's okay because slashing as we said is an attack on the network and is punished an awful lot more severely you get a a triple whammy if you if you will when you when you have a um an attack when you have a slashing event and

they're just not worth it so certainly the the single best protection against slashing is care awesome okay and so i do not know if we mentioned that slashing also results in ejection from the network and and that will force you to miss that on future penalties even if you were able to recover the loss through validating you will miss out on future penalties at least during phase zero um yeah so this is this idea of the triple whammy so we if you are slashed then you will have an immediate loss of ether uh it's not a huge one it's about i think it's about one percent now they've they changed it so at the moment it's about one percent of

of your balance a little while later there will be a second penalty and that is totally not up to you that depends on however how many other people were slashed in and around you so when you are slashed there is a window of 36 days and for the 18 days before that and the 18 days after that for any other validator that has been slashed at the same time you will lose additional funds so if one percent of the entire network was slashed over that 36 day period you'd lose an extra one percent if 20 of the um the network was slashed you'd lose an extra 20 of your funds so you will lose a bunch of funds there's actually also a

separate bleed going on over that entire 36 day period where as you mentioned you're basically you're meant to be a testing but not so you're going to get punished by not um well you may attest to the network now ignores you so you will be punished for not testing even if you try to and then as you mentioned at the end of that period when you finally are kicked out your funds are sitting there stagnant locked until they can be withdrawn and made useful so yeah you kind of have three different penalties if you will by by having this did this uh slashing event occur it's so great i remember listening to that on a research call and i i just at that time it was so ambiguous and in the sky and i had

trouble understanding it and now seeing it in reality in the network it makes so much more sense um and just to be clear about the force exit it is a big deal during phase zero but it will be a slashing will always be a big deal it will always be a rare event but it will be less of an event in phase two because you will get your remaining funds back in a in a reasonable time and not the two-year window sure at some stage we will have withdrawals available and or transfers available and at that point in time yes once a validator has finished going through its exit

procedure and moved from x dude to withdrawable at that stage yes you will be able to to move your funds as to if there will be costs involved with that we don't know yet because obviously the withdrawals mechanism has not been fully fully fleshed out uh so yeah you know we we certainly believe at this stage at the moment once you're once you've gone through that pain that's the end of it uh but you know you never know what surprises the des may have up their sleeves for us uh afterwards so certainly not being slashed is the is the best option sure okay great and so um the two other things i want to talk about and i think i uh maybe there are a few more okay so um let's talk about how much you get

um and and you alluded to some of this um i i'm aware of some kind of 130 second of uh of your hold or is that as a now one percent of your hold or yeah so it was 130 seconds it's gone down to a third of that um so when mainnet launches with the specs that are in the version 1.0 specifications a number of the penalties have been reduced so although and they have been reduced with a caveat that they will be increased again a few months down the line i think they said five months six months something like that they will they will return so in the long term for slashing if you are slashed you will lose uh

three percent of your funds you will also have penalties on going for your 36 days will come back to them and then your percentage loss of your uh validator due to other validators also being slashed goes from nothing if no one else has been slashed up to a hundred percent if a third of other validators have been slashed the reason for that's pretty simple you need a third of the validators to actually create an effective attack so if a third of validators have been found to have cheated they could have influenced the network they could have switched finality as a result of that they get the ultimate punishment their entire ether is wiped out as we said you know if it it it's it's

linear on that so if say you know 10 of all active got slashed in your time period then you're looking at a 30 fee uh 30 penalty so that's that's roughly how that looks now as we said for the beginning of phase zero all of those values have been reduced by a factor of three so you won't lose three percent you'll lose one percent if thirty percent of validators have been uh slashed around you then you will only lose thirty percent of your your validators balance et cetera et cetera um the the thirty six days on the loss obviously penalties being equivalent to rewards we are aware that rewards are dependent on the total number of active validators

um but again we that number at the top end would be what basically are about one and a half percent of your your validator so it could be up to one and a half percent uh realistically it's likely to be a fair bit lower than that so yeah we're looking obviously if if it's a simple mistake by you and the rest of the networks taking along happily you're looking at a loss of maybe two and a half percent if you're unfortunate or you try and do an attack on the network obviously that can then increase significantly that's that's great so what i'm getting from that is home users who make a mistake don't need to panic and worry about

losing everything in many cases even in phase zero and i think i saw a tweet by vitalik allude to this if you are a testing fine and six months down the line you let's say you reboot your computer too quickly and do a double proposal are slashed you might lose one or two percent and be ejected from the network but even in that case it's possible that you would have a net gain for the experience um sure absolutely i mean the longer you can stay online the better uh you know there's certainly nothing that would ever gain say that and obviously the more that you can attest the the better again so yeah yeah obviously the more the more you can

but as we've said don't you know rush a fix a change an upgrade a tweak in the hope of you know catching that one or two epochs worth of additional attestations because they they aren't worth anything in the long run compared to what you would a lose by being slashed and be not gain by being slashed if i can visit that one more time so an epoch is 6.4 minutes and you suggested waiting at least two epochs before like if if you're going to shut down your machine and reboot it so we're looking at 13 minutes there yep let's 30 minutes outside okay so if i'm a high strung user and i i want to keep up time but i also don't want to worry about slashing if i

set a timer on my server you know my clock and am down for 13 minutes is that is that window the right time or should it be should it be flexed either way there's 13 minutes the magic it's not magic it's safe i mean it it's ultimately safe the the problem is is is that within any single epoch a six and a half minute window roughly you don't know when you are a testing so for example if you were test at the very beginning of one epoch and the very end of the next there's actually 13 minutes between your two attestations if you attest at the very end of one epoch and the very beginning of the next

there's 12 seconds between your attestations so that 13 minutes is kind of the ultimate gap in which you can ensure you will miss one but you can guarantee that you won't uh make it make a mistake and accidentally sort of do another one do an attestation twice so it is yeah it's safe obviously the one caveat of that is your computer's clocks will need to be vaguely synced so that we we don't end up in a situation where um you know 13 minutes is not 13 minutes for all of the computers well i know for a lot of us um who are just learning like those the rules of thumb really help uh the you know the simple wait 13 minutes

don't run your keys in two places in some ways that could summarize everything that a beginning staker might want to understand whereas you know someone who's more interested is going to want all of the nuggets um i really look for pulling out those rules of thumb and that and there are definitely things that you can do to reduce that time to pretty much zero if you so desire but they come with risks they come with requirements of technical understanding so you know what like we said you're right you know start with the rule of thumb make it easy on yourself and then if you desperate to make sure you don't miss that attestation when you reboot or move servers or whatever it might be

great well get involved dig into the technical details and understand the systems that are in place to protect you from doing that but please do that before you try diving in and and just catching that one at a station you know what things like you know the beacon explorers they're utterly fantastic they're brilliant but unfortunately when someone sees a single missed attestation in a sea of good they focus on the missed ones which is it's human nature but it's a shame because you know what like we say you know 90 is great 95 is brilliant 80 is fine you know you're doing okay and we would in reality expect most people to attest pretty well all of the time these are normally

only in situations where things are going wrong like we said you know your server's blown up or you've had a hard drive failure or whatever it might be you know my my rule of thumb for that is you know accept that sometimes these bad things happen and don't be desperate to catch the next attestation give yourself time make sure your systems are working make sure the old systems are down ensure that you cannot get yourself slashed because that is that is what matters and like we said you know a day later you'll have forgotten the missed attestations you slash yourself you'll be thinking about it for a year and a half yeah and i i i know that you're you're a really humble person aren't did you not you your contribution is very much responsible for that uh

validator effectiveness and the inclusion distance stuff on he can change that right yeah yeah and so i love it i in fact i i scroll down and i look for all the zeros and you're right it's human nature if i if i see a one i'm like something's not working right absolutely and and but the equally as we know the nature of the chain is going to be that like we said we're a peer-to-peer system it may well be that we just can't get our attestation off the aggregators we need to get them to in time because blah you know pick your favorite reason the super bowls come on and suddenly all the networks are jammed uh you know there's been a network outage at google and dns has gone mad whatever it might be you know there's so

many things that are outside of your control that can cause this that unless you see something that's systemic you know if you've got 50 attestations that are all got a distance of six sure take a look but don't worry about it you know in the same way as when netflix freezes you generally hit back and start it again you don't wonder what's up with your network you did you you have the same same kind of thing with this you know this this is very much an ongoing process rather than a set of individual events and we you know we that that kind of thought process is not only going to be a lot more relaxing for people but it also means that we say they're less likely to rush and make mistakes good yeah and i i would say uh the the

overall goal of a validator is to be good not perfect um seeking that perfection is a just an impossible goal um so great again the the the network recognizes that up to a third of validators can be offline for real reasons and it can still finalize as a result of that you know you don't have to think i need to be up with you know five names availability or whatever that might be and one of the things i will say is as mainnet comes online as we start to do a beacon chain with real ether behind it we'll start to gather more of those metrics and that will allow us to do comparatives because you know what if you're on 90 of the time and the average is 65 then you're doing fine

you know and and this is a thing we can stop looking at the absolute numbers and start looking at the relatives and that will help people i think a lot but obviously as we said you know when when we're just looking on test nets unfortunately we don't have the data to be able to do that but it is one of those things that we will as the beacon chain goes live with real ether and we can start to gather those those numbers that's that's going to be some really exciting data that that will give us that quick ability to say hey you might want to look at your validator rather than you know not really having that that idea that's so i'm very excited about and like we said we can we can start putting dollar numbers next to these things you know you missed an asset

station that's three cents sorry you know it's a one once you get that kind of thing it'll make you feel a little bit better about it you'll understand the context and the impact of these things and potentially not you know go and buy yourself two thousand dollars worth of new computers so you don't miss that again right that kind of thing that will start to bring through and the fact is it's our game it's it's not about the three cents it's about winning that that point and you know that's is that's how we all think so yeah which is true but then then again you know you say we're we're playing with a lot of money to play that game right you know it's fifteen thousand dollars to enter and you're you're playing with it every time you want to gamble so

yeah but yeah there's cheaper things to do that's what makes it fun that's what makes it stressful but okay so um i feel like we have done an awesome job and thank you that this is this is like far exceeded my my hope for how we could convey this stuff um i i'm always in awe of your ability to convey these messages simply um so we have covered i i was going to say we've covered the bad guy aspect and i don't want to call slashing a bad guy because it's we we've covered the slashing aspect let's flip to the other side and look at the policemen of the network and these

are the people who will run slashers and these really are the good guy policemen protecting the network from fault um so can you tell me uh how can i be a person who looks at the network and monitors for slashable events sure so there is uh there is definitely one slasher out there at the moment which is written by prism the lighthouse team are working on one i know they've had it running internally i'm not sure if they've released it i'm not up to date on that one but there will be a number of of processes out there that people can run so what a slasher basically does is it

monitors the network so every uh beacon block proposal that goes past every attestation that goes past the slasher will grab them it will make a note of them it will store them because it's looking for two different blocks proposed by the same person in the same slot it's looking for two attestations proposed by the same validator that actually are slashable so it it looks for all of these different things and it's a relatively intensive process um this is this is worth saying so is or running a slasher excuse me is realistically falling into the category of a common

good what i mean by that is that if you are running a slasher and other people are running slashes too then the chances are that you will get nothing from it if you're the only person in the entire network running a slasher yep you'll you'll probably get the occasional thing out of it if there's more than one of you then the chances are that that's just not gonna because reason behind that is because when you find a slashing event so hey i found two different blocks that were proposed by the same person at the same slot i can prove it so you have the headers of the blocks and the signatures to say look i've got these two bits of data that prove that this person generated two different blocks you have a choice you can either hold on

to it yourself or you can broadcast it out to the network you get nothing for finding a slashing you get a reward if you put it in a block you propose but the reality is again is even on the lowest level you know if you're running 16 000 validators and you have 1 5 10 even 100 it's going to be a while until it's your turn to propose in the meantime the chances are that either someone else has already found the same event and they have put in their block or they've just broadcast it to the network so when a slasher broadcast a slashable event to the network

all of the beacon nodes pick it up and so the chances are whoever is next whoever's 12 seconds down the line in terms of generating their next block chances are they can put that slashing event into the block they will gain a relatively small but okay reward for it but you won't so you get nothing for finding these things you get nothing for broadcasting these things you the only way you you're ever known about is is because um it's in the block that you proposed so like we said hold on to it you might get lucky but realistically not or broadcast it yes you've done it but it's completely anonymous no one knows about it and some random person somewhere else will likely get

your reward okay so that kind of informs a home user home staker um you know i modest hardware i have 16 gigs of ram on a you know fairly recent processor it's really not in that person's best interest to consider running a slasher because the system requirements are so extensive especially in memory and the benefit or potential benefit is so wildly low that there's just no real point in it is that fair yeah i mean as always with common goods you know the

the point is you can't get to the stage but no one runs one because if no one runs one then we can have people running slashing events all over the place attacking the network and they'll never be punished for it so we need slashers out there absolutely but no you're right you know if if you're running on a single box and you've got you know 16 gig even 32 gig of memory you know a half decent cpu decent hard drive that's brilliant to run your beacon chain because it's perfect for that but if you had a slasher on top of that the other problem then is your slashing activities you're checks where whenever you get a new block in seeing if it if it conflicts with the previous one that costs you cpu cycles it costs you storage so you know you're

basically taking a little bit away from your beacon node and your validator client so no i mean if if you want to run a slasher i would certainly recommend it on a dedicated box that that way you are not in danger of impacting your your beacon node or your validator client as they're doing doing their normal work and so that's certainly something i think what we will end up seeing is probably a number of larger organizations or groups saying hey we're running a slasher so some people are building staking pools maybe they're going to run a slasher there and again it makes sense if you've got a thousand validators under management

and you can grab yourself a slashing event well yeah you actually now with a fair chance that you can put it into one of your blocks before anyone else broadcasts it so that makes sense um i i expect i i don't know but i expect that the ethereum foundation will run one or maybe two slashes in different points around the globe because that sends the message that if you try and attack this you will lose your funds yeah and that's obviously an important message then to send um running it at home [Music] you know sure if you've got a computer that you haven't got anything else to do with but to all intents and purposes it will lose you money because you're burning electricity it will not make you

money because as we said the chance of you having a slashable event that you found that you can put into a block that you propose within the reasonable time frame is is minuscule one last thing just saw just worth mentioning is that we talked about other people running slashers you do not need to run a slasher to receive a slashable event from the network so slashable events in the network are passed around the same way as voluntary exits and everything else in terms of between beacon nodes on the peer-to-peer so as long as someone out there is running a slasher and they're broadcasting if you're running just a beacon node and you're lucky that your block next then you can propose the block with the slashing event in and gain the

so again you know you you can still get most of the benefit uh by you know just being a member of the of the network without having to run your own slasher now equally you know like i said if you want to run your own slasher go for it um you know the more the better absolutely there's always a chance that because of the way again with a peer-to-peer network it's possible that um a the data that is that is sent in different places will be blocked by beacon nodes a big cannot will see a proposal it's already seen another one and it might just drop the second block so that second block never propagates through the network and because of that it's never treated as a slashable event because the world has only ever seen one if there are more slashes around locally

then the chance of that slash is seeing both blocks is higher the same stations and similar so there is a benefit for the network as a whole to run more slashers but you know again again the reality is is that i suspect that for most home users other people will be doing it and they will be sufficient so that's that's really interesting i i've realized i had a machine that i was going to run a slasher and i've decided it's probably not the best idea after what you said um there's winter coming it keeps you warm it's fine you know that's okay i i was only aware previously of greedy slashing i wasn't aware of of the whole community aspect of broadcasting slashable offenses for the next proposer who will include it um

and so that's that's new to me that's that's very interesting and and it's obviously worth pointing out that regardless how many greedy slashes you have you only need to have one community-minded slasher to paint them all as we said you know less useful again unless unless they're sitting behind a large percentage of the validators that are currently active they're not going to be a huge amount of use in terms of making profit sure great um and so i think the last thing that i wanted to work out is and you've actually helped me understand this question so much that i'm not even sure it's it needs a deep answer um is a lot of people are interested in earning slashing rewards anna the first thing is

slashing will not be a common event um it's at least in a well-running network it won't be a common event um and so it's likely as the network matures it's even going to be less common and the overhead of running a slasher is substantial on its own but let's say that i did decide to run a slasher and i found a slashable event what is my potential reward from that uh okay so it's it's something that i don't even remember i i went through it all and had again we're looking at a i think it might be like half a percent or something like that of the

of the balance it's a it's it's not a terrible number um i think that if you in fact it's less i might be like a sixth of a percent i think it's something roughly like half an ether if you catch a full uh a full node of 32 ether and and you can take you know roughly half an ether off that so we're looking at you know again it's very reasonable certainly in in terms of of income um you just have to multiply that by the probability of you of you getting it um ultimately the the single best way to make money off slashing events is just to be lucky yeah yeah sorry that's that's good enough it honestly makes me think of solo mining

like we're not good at thinking of probabilities in our head but if i think about the probability of running one gpu against the ethereum network like the odds of me hitting a block are so wildly low that while it no one's going to stop me from running it it's probably not going to make sense in the long run so there is one situation where having more slashers and and all could could help as well which is in a real attack on the network so we spend a lot of time talking about the you know hey i rebooted my computer and moved my keychain on the computer and i slashed myself oops okay yeah they're gonna be relatively rare we've only got 16 000

validators to start the network even we had a hundred thousand validators in the you know maybe one percent of one percent in a given month might accidentally do something that would slash themselves so we're looking at small numbers if however there is actually an attempt to carry out an attack on the network then suddenly we could see 30 40 percent of validators put themselves in a situation where they could be slashable now you know in in that in that again in that kind of situation it's it's bonanza time there's there's slashing events everywhere etc etc so you know yep that's possible equally it's entirely possible that if you're running your slasher on a low-end machine that number of events could

break your slasher and it just falls over so you'd never get anything out of it right so it's it's as i said ultimately it's a common good you know don't run one to get rich but if you want to help the network then then please do and you know we said you know it will increase the security of the network maybe only a small amount maybe it's just um elton brace's approach in terms of we've got five different slashers running around the place and we only need one of them but you know that means four of them can die for some reason they can be attacked or ddosed or fall over or just shut down out of boredom and the you know and there's still enough left so certainly it does if it's something that and again it's it's interesting to do to start to look

at some of the information to understand what slashing is because a lot of people again they'll look at the network as a beast that gives them and the network is something that does what it needs to do to achieve finality and if it has to basically bribe you by giving you money as you go along it will do that but the only reason it does that is because it needs you to do these attestations right you know if if it just had a pure penalty system no one would do it and it needs to have penalties in place because otherwise it can't punish things when it goes wrong so to balance out the penalties it must have rewards but that's not its purpose you know this this is not a you know this is not a defy we will generate free money for you kind of

you're getting more than anything you they're called rewards probably you're better off call to get compensation yes because that that's closer to what's actually happening um but understanding the internals of the ethereum to network understanding why slashes are there how they work what information they're gathering how you can make them better you know obviously we're still very very early days in the in the network entirely you know yes we've had five years of research but in a lot of ways the clock starts when genesis occurs because then there's real money only on the line and that there'll be different classes of attack there'll be different protections against them all of these things will change so uh in terms of a learning experience so

it's certainly well worth doing if you want to find yourself you know a little bit more involved in in ethereum too yeah awesome uh so you know i i like to develop these rules of thumb and i have this idea of um if you're a home user and you want to run a slasher do it if you can run it on an external machine is that would you say that's a fair rule of thumb for us to share for most home users absolutely uh you know obviously if your home machine is 128 gig epic box then fair enough right you've got space but for most for most people who'll build a home box sure you know it the the danger and concern of it impacting a validated client or beacon node is probably high enough that

you just you just don't want to be doing that yeah the challenge i run into with these rules of thumb is obviously they don't apply to everyone that's not ever my intention my intention is to produce these simple nuggets of here's the basic rule and if you want to explore like you said earlier if you want to dig into it more that's great but if you just need the big picture then if you're going to run a slasher run it on a machine other than your validator i think that works that seems reasonable i have been i can i tell you something go this is my favorite call ever like i'm not kidding i have learned i so i you know i don't i sometimes i zone out uh and i don't always catch what i'm what we're talking about not you and i but

in calls but i've been so like enthralled um this i had a basic understanding of slashing but um you're so much of your information is just brand new to me that um i really appreciate it like i i'm going to go and tell everyone this is my favorite it is like just a really um really jam-packed with valuable information it's you know it's a it's an interesting area because like we said it cuts to the heart of of what we're trying to do and as we said you know so many people think about slashing in terms of punishment and it's not it's a protection yeah but yeah we have to if we look at the world not from our point of view but

from the network's point of view then then it all makes a lot more sense like we said you know the fact that it can't understand between an accidental reboot of a machine and someone starting an attack it sort of flows into into why things are the way they are so certainly you know having a certain mindset around thinking about it from the network's point of view can certainly help to understand what's going on and again to ensure that you can protect yourself from from being slashed um i mean obviously the one thing we we didn't cover today was was the ability for someone else to slash you um which is probably worth doing very very briefly so the only way someone can create a slashing event on your

behalf is if they have your validator private key any other any other attempt will fail because it it won't be signed by you so if it's my turn to propose a block can you propose a block then you won't be slashed i won't be slashed but you'll you'll just be ignored because i'd be like well it's not your turn it's it's jim's turn so ignore you if however you can sign it on my behalf if you've got my public key excuse me my validator private key then the network again will look at it and go well this appears to be from jamie signed it and this one appears to be from jim he signed it okay we're in a slashing event so protection of validated keys is always something that that's very very important so you know

there's lots and lots of guides out there on the internet but especially if you're running a home server or you're running a cloud server secure as much as you can shut down new ports you're not using consider having very specific access criteria so potentially only via the console if you're in the cloud you can go over the console to access it if you want to use ssh fine but you know potentially set up a firewall so you can only access ssh from your home machine all of these type of things ultimately if someone else has access to your validated private key it is pretty much game over i mean you you're you're purely living on their good grace at that stage

if they want to slash you they can if they decide to they will you know if they try bribing you saying hey i've got your validated private key you know give me to ether or i'll shut it down you know you send an extra transaction and hope they're not paying attention because once they have your private key there is nothing you can do to stop them from creating a slashable event so like we said you know do everything you can to look after your validated private keys there's been a lot of work put into the launch pad to try and help you with that as well um you know there's a lot of work done around around client systems and similar so absolutely you know that that again if if you want to spend time and energy worrying about being slashed then your best thing to do is to spend time

and energy securing your server securing those validator private keys so that you have as as little chance of possible of them going astray awesome yeah that's that's something that i'd almost forgotten about um the potential for losing your keys and that resulting the slashing offense i guess as you said that if i look if i lost my keys today to the network somehow the first thing that i would do is as quickly as i could initiate a voluntary because that minimizes my exposure and takes away any power that um the attacker might have because once those keys are exited they can never be re-entered so unfortunately and again we're looking

at it from a network's point of view um there is a time a significant time delay between you saying you want to exit and not just having exited but being withdrawable and again it's it's to stop someone from i could sit here and go okay i'm gonna write a bunch of of potentially slashable of actions so i might create multiple blocks or i might you know i can build up a history of stuff that i want to push to the network then i can go okay now i'm going to exit and then after i've exited and i'm safe i'll push all these bad things to the so as a result of that there's a time period from when you say you want to exit there's an exit cue but but whilst you're in the exited state you can actually move from being exited to still being slashed so not until you

get out of the the exit area into like withdrawable are you truly done so yeah i mean obviously exit as soon as possible in that situation and i i'm afraid i would say the answer is you know hope hope that the attacker just isn't paying attention to the uh and and then once you're withdrawable you're safe but until then i'm afraid that you can you can still be pulled back for a slashing event so voluntary exit is not is not a solution for lost keys it's it's a it's a defense a long-term defense so it's not going to fix it it's just going to ameliorate it a little bit it's it's it's a hopeful defense uh hopeful defense that's great yeah you know

like we said you know you you just hope that whoever the attacker is isn't paying attention to the network and you can keep them talking for like four days or whatever it is until like you can get withdrawable right now absolutely absolutely and if you if you can string that out long enough then you're home and dry but absolutely no it's it as we said you know obviously the critical thing there is you know try not to have those keys exposed in the first place yeah uh one second my boss is going nuts over here um hey big brother so jim let's say that um people saw you for the first time today and they are wildly impressed with everything that you know where can where can they find you and find more

about what you know so i published a number of posts i'm the chief technology of a testant which is a staking service dedicated to ethereum too and we have a lot of articles up on our website so if you go to attestance.i and then there's a whole bunch of posts there that explain a lot about various aspects of the the ethereum to network it's something that obviously we want to expand as time goes on as more things happen as we move to phase one there's a whole bunch of stuff coming down the line uh but yeah that's certainly a good place to start in terms of finding out who we are and what we do great i i will tell everyone that attestant is i'm checking my it is most likely the

highest quality content in any blog um and i i love that you just as you develop that blog you focus on that that incredible uh just solid content and really new and fresh information that's that's kind of what you brought me today thank you um i'm deeply appreciative i remember the i still the first time we met i was like i don't trust this guy i saw your blog it was it was fresh and i was like i don't know who that guy is um but i'm so glad that we've had a chance to get to know each other and that i've had a chance that's great you know what it's a it's a brilliant community there are a huge number of people in all areas that are working away on ethereum too and as i said you know we're we're still

in t minus you know we're not actually launched yet although it feels like it's almost the finish line it's very much the start line it's going to be a very exciting journey yep all right thanks jim i'll talk to you excellent take care