Designing the distributed validator protocol by Oisín Kyne (Obol Network)
Nethermind Summit Istanbul 2023 · 7 Dec 2023 · 18:13
Oisín Kyne, CTO of Obol, explains the design constraints of a distributed validator protocol for Ethereum. He introduces distributed validators as a way to scale consensus participation, then covers distributed key generation, direct peer connections instead of gossip, the cost and subjectivity of proving who was at fault, consensus choices, and the coordination needed for interoperable middleware clients and sustainable client funding.
Speakers
Topics
From Nethermind Summit Istanbul 2023, hosted by Nethermind.
Transcript
[Applause] okay thank you very much guys I've been introduced so I'll get right to it today we're going to talk about some of the design constraints of building a distributed validator protocol so firstly for those unfamiliar I'm going to briefly introduce distributed validators then I'm going to talk about some of the different pieces of the puzzles I'm going to talk about the engineering challenges and some of the design decisions we've made there then I'm going to talk about some of the data aspects and how they can be both subjective and also costly to get kind of on chain and to do in a kind of a low trust um but cheap manner I'm going to then talk about some of the more research focuses particularly with consensus and some of the other like challenges in ethereum like me and then
lastly I'm going to talk about the kind of coordination problems of getting everybody to share validators in the similar manner so firstly I wanted to talk about what are the different pieces of blockchain that you need to scale and I generally break it down into three different kind of core resources you have your your execution which can be scaled with layer twos like optimistic rollups and ZK rollups most people are familiar with scaling the execution layer you can then also look at the data layer data layer is you know preventing every single node keeping every single piece of state and every piece of history for all eternity things like 4844 and data availability sampling are ways to scale the data side of blockchains and lastly on the consensus
side of things consensus is how many nodes can take part in coming to agreement on the state of the system that you can scale with distributed validator technology so what is a distributed validator a distributed validator is an ethereum validator that runs on more than one machine and it has fall tolerance you can think of it like a multi for a validator um one of the most important things about a distributed validator is the fact that not one entity needs to run all of the pieces you can actually have different groups running the running the validator this is a step up in Trust minimization particularly in a world where a lot of people are delegating to others to run their noes and there's lots of different advantages to distributed validators and
they are kind of different advantages depending on what type of User Group you are so for the very first part having fall tolerance allows you to have high availability this means even if one machine dies your validator stays online this is useful for more or less all validator types for the liquid staking protocols these liquid scking protocols currently are delegating to trusted node operators to run validators for them this is a bit of a risk because you're giving them private keys that they can get compromised they can lose we still don't have forced withdrawals so there's quite a lot of trust in giving somebody a valid like keys to run on your behalf so distributed validators helps to reduce
that trust you pick a group of them and so long as you know more than threshold or the number of faulty nodes don't mess up your validator safe for the at home and solo Saker end of the spectrum distributed validators allows you to do Squad saking this is where you can team up together and even if you run on you know retail internet or Hardware that you can't struggle to keep online all the time maybe you don't have the full 32e all of these things can beated with 30 with Squad sing and just generally for interior more broadly you can have these validators that run with the mix of clients you can have them that run in a mix of GEOS you can have ones that run with mix of operators and the odds of major catastrophes for the ethereum set go down if everyone is
running these like nice Blended distributed validators that don't have you know too much of an exposure to any one point of failure where are we at with distributed validators in their adoption today we just this weekend or before the weekend announced our permissionless beta up until now we've had about 40 entities run as part of our Alpha and we've had 40 solo stakers run on Main net with ether up operation solo sticker we're currently going live on Hol ski for Lido's simple DVT module this will be the last kind of dress rehearsal before we put it in main net hopefully early in the New Year we have um been doing scaling tests with Enterprises and mega labs to test how high we can scale distributed validators on same fixed
amount of hardware and we've also done two audits we've started our second audit of car on and we've audited our solidity contracts which I'll talk about maybe at the end so that's a distributed validator but I also briefly want to touch on what's a distributed validator protocol you might be able to guess but a protocol is simply a standard spec and set of rules that many different implementations all speak and that allows you to have interoperability between these clients one of the things that's important about our design is we've because BLS signatures are aggregatable we have built Caron and the protocol as a middleware this is good for optionality if a better middleware client comes along you can swap one out swap in the the other and generally if there ever was to be compromised it
doesn't have runtime access to the Keys it shows something slash to your Downstream validator and it says nope I've already signed something for that block so you have this kind of two sets of fallbacks or two sets of security so you know you've more risk reduced okay so that was a really quick kind of run through on what a distributed validator is what it's useful for now the purpose of this is to talk about some of the research challenges so on the engineering front um the first one I want to talk about is this idea of private keys and private key test if you have a distributed validator that has access to these private Keys especially if you've just one implementation if anything goes wrong they can exfiltrate all your keys and particularly if they're kind of
encrypted or put on chain or anything of the sort this is something that you know nobody really wants and is a real kind of point of failure so with um the distributed validator protocol we do distributed key Generations meaning no one entity has the full private key at any point and the nether mind research team as of yesterday published a report with the work of like M and Ahmed over there on how to do um publicly verifiable distributed key Generations which will be a big piece of the protocol where you can verify that this dkg was done fairly on chain with kind of eventually one ZK proof or one grth ZK proof at the end so private Keys super important the other piece of the
protocol design that I want to like raise to you particularly on the engineering front is networking so in a lot of blockchain use cases we heavily favor these kind of Gossip networks these one to man type me mechanisms these make sense for kind of lots of things but in a distributed validator you only have known counterparties with the other piece of your keys it really isn't necessarily all that important for the whole world to see your partial signature and having one shared gossip Network can be a bit of a point of centralization or kind of of a correlation risk at the very minimum where you have to kind of serialize your messages onto this gossip bus and if anything were ever to happen to it all of the dist distributor validators go offline so instead with the distributor
validator protocol we've favored direct connections between your like nodes um this is done with TCP dire TCP connections using the like lip P2P protocol and this minimizes the amount of hops you need to get your paral signature to your other counterparties you're not kind of wandering around a network trying to find one another this is important for latency latency as you might guess is super important to running a profitable validator and it's also better for making them harder to kill because you can have end to-end encrypted coms it can't be easily introspected there's not some open network you can abuse you can't kind of connect to nodes that aren't your counterparty they will only establish
connections with people they expect to and even if you're running in the Enterprise you can run stuff all in like private networks and vlans you don't actually have to go across public networks at all so we think networking is an important part of this and one of the other aspects of that is version upgrades you can upgrade one cluster to a new version you can wait you can upgrade a few more you can have different clusters running different variants we're looking at like bringing in quick instead of TCP and you don't need to have all of these all running the same thing and versions don't all need to work in lock step so if there ever is an issue in future it can be contained it's not like an All or Nothing so there's some of the engineering sides now I wanted to talk a bit about the
data sides of this problem because one of the things we did within obal is we divided out the distributive validator effort to kind of two phases it would be great to have a Distributive validator protocol that is purely trustless purely cryptoeconomic and you run this with a counterparty that you don't know can't find but if they're offline you need to kind of penalize them and trying to figure out how to do that objective ly with kind of an algorithm that doesn't have unintended consequences is very difficult to be perfectly honest so back in 2019 the ethereum consensus spec went from ed25519 to BLS signature schemes and this brought in homomorphic
additivity which is one of the key pieces of distributive validators particularly as a middleware and not having access to the private keys and these two gentlemen Carol and donrad who many of you here probably know gave a talk at Devcon five about what we now know as distributive validators I refuse to call them trustless and most of that talk was focused on how to punish the lazy validator and the short answer is it's very difficult frankly one of the main reasons is it's subjective different nodes see different things you can rely on consensus to come to like some sort of truth about who's doing what but the moment you lose consensus is the moment where it's most important
to figure out who to punish and you you have two different maybe nodes and two different groups pointing fingers at one another and if you can't come to consensus he can't punish people so it's kind of a tricky problem so we're doing a lot of work on that some of that will be published hopefully in the near term again through the nethermind research effort and a lot of it involves um using actually 4844 and data availability to post proofs and posting hashes of these proofs on L2 which allow you to kind of continue on in the happy path and then some whistleblower can report you um this actual cost side of things is also very important so the subjectivity is one side but trying to do this in a lowcost manner is also very important you don't
want distributed validators to be prohibitively expensive or you know way more expensive than a normal validator so you can't probably publish data to L1 all that often um 4844 helps a lot you also you know don't necessarily want to do everything on L2 or you have a bridge you have these kind of withdrawal delays potentially these can be kind of difficult State channels are something we've also been looked at as part of this research but it's difficult to prove to someone outside of the state Channel anything about what's going on in the state Channel um though alic has some cool posts out just kind of yesterday about ZK State channels or ZK plasma and generally zero knowledge proofs and BLS signatures are both very
expensive to do on chain so it's still not the easiest thing to do but um we've had quite a lot of cool work on that regard in terms of lowering the cost so it's down to a world that I think will be you know acceptable we'll see when we kind of build so there's some of the data sides including kind of the subjectivity of the data and just the outright cost of verifying the data somewhere the next piece I wanted to talk about is some of the research challenges because there's quite a number of them that need solving so so far in our version one we decided to kind of play it a little safer on the consensus side and we went with qbf it's kind of a well-known well understood protocol but one of the downsides of it is when a operator is offline you have
to wait for them to time out or when they're like slow you have to wait for them to time out some of the more modern asynchronous or partially synchronous consensus mechanisms can move faster and can kind of skip offline nodes this is important because it doesn't give you a penalty for having a far away node right now if if you have to wait for the far away node to kind of time out that is kind of suboptimal in a better world you have these kind of leader election mechanisms that take into account who was online the like previous round and that can allow you to kind of lose less money when you have someone like really far away you don't really want a situation where it's like everybody's in the same country and we don't want to bring somebody from far away because it will have too much of a negative
impact um one of the other pieces of the puzzle that would be very important to have is figuring out attributability within consensus being able to blame certain nodes for forking is important if you want to kind of punish them for being malicious some of the igen lair team had put out good research on kind of the limits of this can you find every malicious operator or like when there is a fork not necessarily there's um hopefully some more research to come on that that's a a very large I think 26 page report put together by maal and some of the others and one of the other pieces of the puzzle is meev is a bit of an external influence on this and you're like rationality versus
honesty assumptions honesty is you know one thing you hope people to run the protocol but if it's rational that they can make a bit more money with you know slight misbehavior that can impact the stability of the consensus they can all start to kind of defect and say no I don't agree with your block I'm going to propose a block because I'm going to like sweep a bit of me that you know may end up in a world where you just kind of go around in circles and never progress because they're all trying to kind of defect and steal money so things like ins shine PBS is one of the big like unlocks there some other things that are kind of in the pipeline that we kind of worry about is how to distributive validators deal with data availability in the first form of like Proto sharding it's kind of
a best effort thing it's not like a strong guarantee but as we move to full Dan sharding um we need to figure out does every node within the cluster All sample the exact same pieces do they all sample different pieces is a way we can kind of get caught or get in trouble that way where we of trust that somebody sampled something they didn't do we have to kind of be overly cautious there's probably better ways for us to sample valid data availability within a distributed validator the next one is can we verify PV dkg on L1 I think the answer to that is not necessarily but we can verify that a vsss was evaluated correctly with the ZK proof I would direct you to The Forum to give a read of that it's um
pretty sweet um does this pattern make sense for distributed sequences at too something we look at and another thing is can we do key refresh refresh schemes can we do them kind of on a recurring basis can we use something like single shot signatures that are kind of single use Keys um these are all stuff in the research pipeline that hopefully will be kind of rolling out in the next few weeks onto our forum for people to go read and lastly I wanted to talk about some of the kind of coordination challenges here as I alluded to it's very difficult to do something really permissionless so far it makes more sense to kind of coordinate with other counterparties to run distributed validators but you know the dream is to kind of get everybody using like one
shared spec and stuff um most of you have probably seen this XKCD meme but um with the middleware distributive validator it doesn't have access to the private Keys it's helping you spread your risk across multiple machines and it can really take away a lot of the safety risks in a distribut in a like a validator setup but if there's still just one single implementation you're still stuck with the liveness risk the dream is instead of to have you know many different independent distributed validator implementations you have interoperable ones so that's kind of what we're doing with the distributed validator protocol with ourselves and the nether mine research team is to come up with the credibly credibly neutral protocol for DV middleware clients that
allows them to all interoperate and one of the kind of key goals is to have attributability so you can kind of see who's online who's offline in a manner that's doesn't involve oracles or some sort of kind of God mode and you can actually use this to reward and punish people at the alul or you know within cryptoeconomics side of things and one of the last pieces of it is IC distributed validators is very synonomous with mining pools back in the early days of proof of work mining anybody could produce a block and then very quickly it became prohibitive and they were like let's all you know team up and like share like proof of work um I see validators going more L the same same direction it's already $50,000 and
up to run one single validator which most of you know gets like a block once kind of a year and we already have this kind of pooling happening but without distributive validators and I think distributed validators will be like a big piece of the puzzle mining pool software has extracted a bit of rewards for more than a decade now so we think that distributed validators can and should take a bit of rewards as well and pump that straight back into client development effectively our hope is to um have everyone that implements distribut a validator protocol take a percentage of rewards and distribut that rewards to you know self sustain the ecosystem for more client development and keep things going yeah that's more or less most of my talk if you are interested in what
I've had to talk about so far you can join our Discord you can now run a validator on mayet well December 1st is what we're kind of communicating but generally speaking it's you know ready to go we've captured up one validator for S reasons um we're also hiring roles on engineering res search on the marketing side so please chat if you want to and yeah feel free to ask me questions about the ne man research [Applause] team
Related talks
- The Impact of Distributed Validators on Staking
- Oisin Kyne - The Impact of Distributed Validators on Solo Staking
- What’s Going Into the Pectra Upgrade? by Christine Kim | Devcon SEA
- EIP-7251 - Maximum effective balance overview by Paul Harris | Devcon SEA
- Why Should You Run Distributed Validators
- Social Slashing by Eric Wall | Devcon Bogotá
- ETH is Permissionless Money
- 'Intro to Eth2 & Staking for Beginners' - Superphiz
- Superphiz shows off his new Proteus staking machine
