Cross-Referencing Clients with LLMs: How We Shipped QUIC in Teku
Devcon·Sun, Nov 8, 2026, 12:00 AM
Transcript
[music] [music]
Okay. Good morning, everyone. Thank you for being here. Uh so yeah, so my name is Lucas Adaniya. Thank you for the introduction, uh Bianca.
I am a protocol engineer at ConsenSys. Been there for almost 9 years now, so it's been a while since we've been doing all this work with protocols, always on the core development teams. Um so yeah, so the talk today is a little bit less the feature itself and more about the process that we use, so keep that in mind when we are listening to it. Um as we all know, client diversity, um you know, spec-driven development has been a big part of Ethereum since the early days. The problem that we have um is that sometimes, you know, the specs gets outdated, we have details that get lost, buried in some Discord conversation that happened 2 years ago.
And then if you're not on that conversation, you kind of missed it, and then when you're trying to implement something, you don't really know, you know, what what what what what you're supposed to do. So, today um we're going to be talking about, yep, how we implemented quick uh in Teku, but more important than the feature, the process that we used, how we used LLMs to help us, uh how we, you know, were able to cross-reference the the the implementation that we had that wasn't really working, the networking uh protocol, all the other implementations of libp2p that had the the protocol working. And then that helped us find what we need to implement, um what we need to improve, and even some of the things that probably should be part of the spec that we were missing there. So, that's kind of what we are going to be talking today. Um so yeah, I have a quick uh brief um uh agenda there.
The most important thing, the process that we used. Uh we really believe that this process can potentially be applied to different uh areas of the protocol as well, and even automated to some extent, so that's something that we have been experimenting with. Uh before moving on, just want to say thanks for the Teku team. I got your pictures over there. We have some of them here, some of them watching from home, I believe.
Some of them I think are actually flying back home today, so they might not they might need to catch the recording later. Okay. Um, quick pause. I just want to take one slide to talk about my feelings with AI before we move on. I promise I won't take too long.
So, just to get to know how people have been using a little bit. So, I would love to see hands up if you have been using AI on your daily job, even if you're not a developer, like, you know, daily. Yeah, I was expecting to see many hands there. For the developers in the room, how many of you barely open your traditional IDE, maybe like on the last week? So, haven't haven't opened it.
The last month? Anyone hasn't Of course, you have your hands. Last year?
[laughter]
Okay, cool. Um, and from everyone here, anyone who wishes that we had never created AI? Look at that. Yeah. Okay, so maybe I'm not alone on this.
Cool. I promise I wasn't going to rant too much about it. So, Okay, so well, I wasn't even sure if I was going to present this slide, but I think it helps us to kind of understand a little bit of the mindset when we approach how we incorporate AI into the engineering processes that we do in Techoo and some of the reasoning around, can we do it in a way that, you know, it still kind of keeps us relevant to to an extent? So, to start with the obvious, you know, writing code is awesome. I love writing code.
Um, I always enjoy learning new things. I like the creative process of writing code. So, it's almost like a craft for me. It's not just, you know, a means to an end. I love I just love it all.
[snorts]
So, you can imagine that when AI comes and kind of, well, takes away a lot of the things that I enjoy in that process, I don't really get really happy about it. You know, it's writing the code for me. Um, you know, we are working on things that sometimes I don't even understand exactly what's going on there. So, it's just doing things. And I feel like I'm just managing all these agents and writing all this code.
And then at the end, oh yeah, things are working but like uh, So, it's being kind of a bumpy ride for me to accept AI. But then I realized that well it wasn't necessarily the tool that was the problem. Maybe it was just the way that I was using it, you know, like I just need to learn ways of incorporating it and finding that balance. Um because it's it's really good too. Like it's really amazing.
We've seen amazing things and it can really augment the work that I do. Um so yeah, I think the point I'm trying to make is it has always been about finding this balance for us and that's what kind of what we're going to see on this process hopefully. Okay, next slide. I did promise I wasn't going to take too long on this. Quick.
Let's just 30 seconds to understand the problem so we can talk about how we did it. Don't worry, you don't need to understand anything about quick. You don't need to understand about anything about networking protocols. So, I think the two things that you need to know, quick, yeah, this networking protocol that we wanted to use in the CL clients on the libp2p layer. And the second, probably most important thing, it was set to be the new default for the clients.
And unfortunately, I think Techo was maybe the only client that didn't have proper support yet. I think we are we are definitely lagging behind. Um many reasons for that. We had that, you know, the non-working prototype that wasn't yeah, it just wouldn't work. We never really had like a dedicated networking person in the team just working on networking.
So, that kind of didn't really help. And well, with all the, you know, scheduled forks, the ones coming, all the changes, we were just busy doing a lot of things. So, we were not really focusing on quick even though everyone else was really pushing to move towards it. So, we would started thinking like, okay, is there anything that we can do you know, using LMs and what kind of help can we get to put this thing together? And that's kind of the thesis of this talk and how we started with this process like There's always when when you when you come to protocol development, there is this kind of price of being behind, right?
So, if you are not there in the room, if you're not part of the conversation, you sometimes will fall behind. If you're lucky, the spec has the details that you need. Sometimes, it's just yeah, again, on the Discord thread somewhere or hiding somewhere in the code of another implementation. So, we really wanted to understand, okay, what are the gaps that we have in our implementation when you look at the spec? And also, okay, the things that we have implemented on the spec, are they even implemented correctly?
What are some of those hidden details just, you know, on the different clients and everything? And, you know, using LLMs, can we just throw everything into like a ball and come up with like a working implementation? That was the theory behind it. So, now, again, back to the most important part of the talk. What is the process that we used?
And then, well, we started where pretty much where everyone starts. We asked Claude to implement it and make no mistakes when it did. It didn't really work. That's not
[laughter]
That's didn't didn't really work the way that we wanted it. And we had to think of something a bit smarter. And that's the process that we are using. I'm going to go do a quick overview. So, we have this three-step process, what we call the visible gap, the hidden gap, and closing the loop.
So, when it comes to the visible gap, it's all about look at the specs as this set of requirements, right? Like, okay, we have a list of requirements. You look at our implementation, which ones do we check that it's implemented, and which ones are not even implemented? But, also, for the ones that are implemented, there is a question about did we implement them correctly, which is also important, especially when it comes to networking with all the interrupt things that we need to do. Um and then, we move to the next step, which is the hidden gap, which is all about what are the details that are hidden in the client code, some, I don't know, buffer sizes or whatever.
I have some examples in the in another slide that we can talk about. And then, at after the second step with that plan, you can come back into what we're calling closing the loop, so you do this cycle with running the code, testing, uh validating everything. Sometimes, you go back with your findings, revise the plan, and do all of that. I'll try to now break it into more details, and I just realized Okay. First one, visible gap.
At this point, we're not even doing coding. We're just trying to understand, you know, what the gap is. We have this list. Parts of the spec that we have implemented. What is missing?
Well, you know, it's a huge list of a lot of things. We did have to go and do some reading and understand. I know there were some false positives in the middle. We actually need to Again, as humans working with Claude to actually understand and make sure that that list may make even make sense. And then the output of this process is this list of requirements, which it looks kind of like this.
I have like a little example here. Not the wording is not necessarily like this. I just want to give a an idea of these two groups of things. Things that we have implemented, things that we are missing. And then we use that as an input on the second step, which is the hidden gap.
So, for that, we are using specialized agents that know exactly, you know, the code base for each one of the other lib to be implementations. They take this list. They take our implementation and start to do this what we're calling the cross-referencing thing. And basically, they want to check for correctness. Like, what we have implemented, you know, is it implemented correctly?
Some of the design rationale around, well, the things that are not implemented. We do They're probably some hints around what we should do, the way to architect those changes. And the interesting thing is also that by doing this comparison across different implementations, we end up with where what other things that we are missing on the spec itself. Because, you know, so critical work, we have this thing of oh, how much goes into the spec? How much is implementation details?
But sometimes it gets to a point that if there's an implementation detail that is 100% required for every single implementation to do it that way to be able to even work, maybe that's not an implementation detail. Maybe it should be on the spec. So, this kind of balance and finding those things were was really interesting for us. And that was part of this this approach that we did. At the end, we have this really nice implementation plan with a bunch of tasks.
And that's where, you know, the LLM magic also it's really good because they have very direct tasks. You parallelize them, do a bunch of stuff, and then um doing your things. Uh oh yeah, I forgot about this slide. This one it's just like a little bit of some examples of magical numbers that are on different implementations that we got completely wrong on our original implementation. And even though I say that they're magical, they're probably not magical.
Like I'm sure that there were a lot of discussions about them, some people talking about why they are the way that they were, but they are not really detailed on the on the spec. We need to go into dive into the code bases. I'm not a Go developer. I'm not a Rust developer. It's hard enough for me to read Java.
So, um LLMs are really good into finding those things for us. Um and we also lose a lot of the reasoning behind them. And then uncovering this is it's kind of part of the process in a way. Okay, last uh is the closing loop. So, whenever you're doing this agentic development thing, every time that you can give the agent a way of testing the work, you're in a good position because it's going to they're going to make the results a lot better.
So, we had to work with, you know, some extra instrumentation in the code. We had to work with some scripted testing. I'm going to show a little bit more uh some of the tools that we use. Basically, to enable this really fast feedback loop of you implement one of the features, you test, you make sure that everything is working. You test it with the other implementations.
If it's good, awesome. If it's not, you can even send it back to the design some of the prior phases to make sure that well, maybe you need to revise your implementation plan. And by doing that, you you kind of enable this self-enforcing uh loop or whatever. And you end up with a very robust implementation kind of out of the box. Um uh yeah, so this is one example of um I think most people here that have used Kurtosis, they probably know how awesome is that our lives as protocol developers with Kurtosis has been uh made a lot uh easier.
Uh it's a very easy way of running different simulations. We can instrument the the clients. We can do things. And then everything runs locally on Docker. So you can you know you can change your code, recompile it, build a new Docker image, throw it in the network simulation.
And then you find a lot of those things. You start to kind of bridge some of those unknowns that you have. The only problem with Kurtosis is when we are working with networking is that sometimes the way that it works is we have we have the libp2p libraries and we have the client implementations that use the library. And Kurtosis is approaching it from the client side of things. And sometimes we might need to kind of take a look deeper into the actual you know what's happening underneath.
And that's where how we came up with what I don't know I call it gossip sub smoke testing. Um So the idea was can we put those libp2p implementations talking to each other with a very thin layer but a instrumented layer that have give us a lot of more control of messages that are going to be in send, what we are sending and receiving. We can play a a lot a lot more levers that we can pull to play and make things well break and then we can fix them. Um I think at the moment I mean we are running them with the JVM implementation with the Java implementation, Go libp2p and Rust libp2p. It would be really nice to add some more libraries there.
Um and this fine fine control gives us a lot of information from how the protocol is working and sometimes we even find things that maybe we are actually doing the right thing and we should you know tell all the clients to change things which is also really really interesting. Um so yeah, extra test coverage and it helps find those differences between the implementations. Okay, I'm heading towards my conclusion. I think I still have time. So I think the takeaways from here is um we as I started saying with AI and everything we we try to we are trying to incorporate it into AI into our engineering process in a way that um it adds a lot of value but it we also we also be still part of that loop.
We are still kind of involved and then we know what's happening. I know that yeah depending on who you talk to maybe we're just slowing down the process, but that's how we have been doing things. Um, I think this process of, you know, identify what we call finding the gap, um, you know, we're basically building this list of requirements, eventually comparing that with the different implementations for the same protocol. I think that's one of the magic thing that we have with Ethereum. We have, you know, most library, most most clients are all open source.
They have very friendly licenses, so you can, you know, read them as much as you want. No one's going to complain about it. It's a really powerful thing to do, combining those things and finding that information, and eventually feeding that back into this spec process. What is something that we need to do more, uh, add more information. Um, the number three, closing the loop.
I think that's one of the most important things. Any from a small feature to a big feature, always think of what are the ways that we can validate the work that has been done. The more automated it is, the less you need to stop to wait for you to verify, and you know, you can automate that. So, that's really important. So, sometimes we might even need to add and create new tools to enable that kind of testing.
And number four, well, that's kind of like my personal take, you know, stay in the loop. I am always vouching for people, you know, still kind of participating, engaging to the process, understanding what is being done. You know, we have these conversations when we are working on the specs, when we're working with the clients and everything. So, and then we really be I really believe that this process that we are doing, we have, you know, all of those steps where there's an opportunity for for, you know, humans to stay in the loop, understand what's going on, and still provide value to the to the process. Okay, last slide.
Where are we going from here? Well, all of these findings of things that we believe should be on the spec, we're going to eventually, you know, put them back into the libp2p spec, and hopefully make someone in the future who's implementing this thing life a bit easier. Uh, for gossip sub we smoke test, we, um, really want to add more implementations to the mix. We really want to, um, even add more scenarios. They have this idea of like covering every single aspect of a gossip gossip sub that we use on uh, on Ethereum to be covered by some of those tests and make it part of like, you know, the CI pipeline.
At the moment, you know, if I change something on on on on the library, I need to, you know, push it to you know, like I need a a development version of Tequ and then I can run some tests. So, the faster we we do this interrupt cycle, the better. And I think the last question is also like do we have this process of cross-referencing and everything? What else can we do? Like can we do like for fork choice?
Can we do it for storage? For beacon? I don't know. I think there are many places that we can try to add this and yeah, hopefully find more value. Ha, that was my last slide.
So, yeah, thank you. I think we have time for the questions now.
I definitely learned a lot about clients in this session. Thank you so much, Lucas. Let's see what questions we have over here. Okay. What does this look like in 1 to 2 years?
Uh the human loop still What do you think? The human loop still adds value and how do we assess that?
Okay, good question. Um I So, I I mean, I spent my first slide talking about this thing. I have this feeling that I see you see us adding a lot of value to the process. I think that maybe in 1 or 2 years that's not going to be the case anymore. Um how do we assess that?
Um I don't know. Maybe how I don't know the the the more I don't want to write code anymore, that's probably how much we're not doing this. Like I think it it all it gets to a point where it's almost like personal, right? I I wouldn't want to be on this world where I'm not adding any value at all to the development process, engineering process. Maybe some people are happy with that.
That's fine. So, I do think that the models are getting better and better, but yeah, I still have to be convinced that they are better than smart people working together with them. So, maybe a few Yeah, this I think that's my my answer.
Do we still care about client diversity in the LLM paradigm?
Well, yes. I think um there are a couple of things there. I remember what I think was when we had one of the interrupts, I remember Fudo saying that the next the next big bug in the protocol will probably be because Claude did something that everyone else did the same in the same way. So, I think and that's again going back to the previous question, it's I think as long as we're not like blindly just asking LLM to implement everything, just blindly getting the LLMs to write the spec, and we still have smart people in this loop and thinking, the diversity is going to be there because, you know, our minds in this process. If it's an important thing, I mean, if we let put everything in like Claude's hand or something, then they pretty much own the protocol and I don't think so.
I think yeah, there is value about diversity. Even diversity in the models that you're using potentially bring some value to the process.
[snorts]
I think this is a good segue to the next question. How do you verify that the fixes suggested by the LLMs were actually correct and they don't introduce new bugs? I guess that's where the people are coming to the equation.
Yeah, like well, they did introduce new bugs. I'm not promising that the the process is perfect. But, I think having a really strong testing framework gives you this opportunity. To be honest, there were bugs that we only found after we had already like cut a version, deployed, and then eventually you realize there was like a memory fix, and Rico probably remembers that. You like we spent days fixing that thing.
So, um I think the the good thing with the automated, especially the gossip sub smoke testing, is that by the time that you describe one of the scenarios and you lock it the that scenario in a working test, if you break it again, you're going to see, you know, it it it's breaking. So, yeah, um if you might introduce new bugs, sure you fix them but you keep doing that until you are happy that you don't have too many bugs or you haven't found them potentially.
Not yet.
Not yet yeah.
If different Ethereum clients implement the same quick protocol differently, how do you decide which implementation is correct?
How do we I mean I would argue that that's where the like the specification would be kind of the rule of thumb for those things. In the in the good old days when we were like had we didn't even have CL or anything. We used to say that whatever geth was doing was this back and that we were pretty much doing that. I think it right now we have invested so much time on the specifications and the more comprehensive they are the more information that they can provide the better and I if a client has a strong reason to do something differently because it it's better for the protocol overall or not just like a real implementation detail might as well use that knowledge and bring it back to the spec or even if it's a semi implement implementation note or something so others can benefit from that so I still think that the specification will be the place to have those you know tips for implementation if that's the the case. Yeah.
Last quick question, does reading sibling implementations weaken client diversity?
Well, if you are blindly reading them and just doing exactly the same thing maybe um when when it comes specifically to networking a lot of times they do need to behave in a similar way otherwise they won't even be able to talk to each other. Um but yeah, I don't know. I think that's where I would I would I would just take the easy route and say that that's where humans can put their intelligence at work and make sure that they're not doing anything stupid.
[music]
Automatic transcript — names and jargon may be misspelled.