Get the Monday email →
Loading player…

SSZ Execution Blocks (EIP-7807) for Geth

DevconThu, Nov 5, 2026, 12:00 AM

Speaker

Vivek Singh Solanki

Transcript

[music]

And for EIPs, I've been working on SSZ execution blocks, that is EIP 707 in geth. Alongside Alongside this, I've been also working on one project in Besu, that is about redesigning the plugin API. I'll talk about this in later slides. So, let's talk about the SSZ execution blocks first. So, what SSZ changes about a block?

Like, it's all about proofs, right? Right now, we take the header fields, we uh RLP encode them uh into one blob and cassette that. So, that particular hash proves that proves the whole block, but it does not prove anything inside it. So, let's say you have to prove a receipt, either you have to completely reuse the key you could get, or or you have to tell the RPC provider. So, what uh the EIP 707 changes is that it uh uh So, every field in SSZ content, now that every field becomes a leaf of a Merkle tree, so it's easy to prove any particular leaf position with just few few hundred bytes.

And since the types are progressive, so if let's say in a certain fog, the positions uh the uh new elements have been added, the position does not change, and the thing the the positions remain stable, so the proof does not break, right? So, when I started uh geth was geth has no SSZ of its own. They were uh hashing SSZ files like SSZ thing to four different methods, like they were using for header files they were using fast SSZ, for light client they were using zero and eighty, and hand written Merkle tree for two beacon types with hard coded leaf positions, and their own verifier. So, like I'll take you through the journey, like what I did first and what next. So, I divided the work into two parts.

First was the hand written SSZ engine, which is for which is for what geth, and oh and the second part was the main EIP work, that is about the block. So, yeah. So, first work was to get the serialization and merkelization thing, like basically the decoding and encoding part. Basically, the serializing is about like converting the get types uh get types to the SSZ bytes and getting them back. And the merkelization part, basically this is the way uh SSZ gives value uh the SSZ gives identity to its value, like you basically converts the bytes into two bytes into 32-byte chunks and hash them pairwise up as a binary tree.

The root becomes the history root. And then comes the progressive types uh that comes with the EIP-7916, uh which is our progressive list, and EIP-7495, that is our progressive containers. Like uh the issue with uh the fixed-size list is that let's say if uh if you add few elements, uh let's say in a new new fork you add new few elements, so the every position of the uh later elements changes and every existing proofs break. So, with uh with uh the progressive list, uh it grows in the form of a subtree and the size of 1, 4, 16, and 64, and so on. So, let's say if the element uh three is sitting at the second position, it will be in the three for the lifetime, like the existing proofs will not break, right?

Then after this, I went on building the general indices and single leaf proofs. Like I'll take example, let's say you have to prove a leaf 11. Uh I'll ask a uh full node for the leaf 11, so it will hand me over just the this is just its siblings. So, let's say I already have the root uh of the position one, so I can just hash that 11 and 10, I'll get the root five, I'll hash five and four, I'll get the root two, I'll hash two and three, I'll get the root of the uh uh tree root, and if that it matches with the root that I already trust, that means the receipt is inside the block. So, it's easy to prove, right?

Uh then comes the block part, which is the main EIP for this uh this are all the LT fields uh fields shown in the order. Out of this, the three are progressive list. And like right now the block is a header and a in body, right? And SSG we put that both into a one SSG container and every field is a leaf of a Merkle tree and every list is also a separate Merkle tree. So, every position in leaf as well as a path to the root of the block hash of the to the root of to the block hash up the way, right?

So, about testing, it was done in three parts. Three parts. First comes the official spec vectors that covers that has around 4,600 cases which is about classic and progressive types. And it covers prototype bit list, all this stuff. And I've picked up few roots from Aragon work from Jack.

And someone some roots from breadth as well. And then then the at the bottom at the bottom with the glad or glad on blocks like I've created some blocks from get on block on block producers and then I've used a Python spec reference reference script to generate few roots and I've compared them uh to to see the things are working right. So, like the current status, I opened the issue then I got the review late from the get team. So, initially Marius was interested but then the EIP was DFI'd. So, it was not included.

So, uh I've re- I've So, the the maintainers like Gary and let told me they'll not merge it and I asked them for the reviews, right? So, what I've did here I moved all the stuff into one upstream PR that has all the work that I've done and the many PRs are in my fork right now. So, let's talk the let's talk about the other project. Like this was the interesting one. I was focusing more on this.

This was in Besu, right? So, Besu has a plugin API. So, the Besu thing is that you can extend it without forking it. So, uh the thing is the plugin API is not something a side feature. The whole Linear is using the plugin API for its work.

And it has it has a lot a lot of plugins that are completely built on the plugin API. And a lot of production plugins depend on API being good. But over time the API has grown into a one single jar like started in 2019 and it's it is going into a one single jar that has around 112 types. And it has no like documentation was not not proper. So, we have decided to like after exploring a lot of open source project, like we went through a lot of open source open source project that has that that has been maintaining their own leader plugins and their own plugin API and then we decided to break down this particular jar into four feature four feature modules.

Like if we talk about the issues, I've uh broken down down them into three parts. First comes that Every other plugin whether it is small or something like let's say I want to publish a metric, it has to depend on the EVM because there was a leak or we have a just one particular jar. So, EVM as you know there's a high churn part of the code base like changes with every fork. So, let's we cannot cannot like promise stability even to a small plugin. Then second problem was that the life cycle was not designed in a way that you can know key at what particular phase what particular service is available.

Let's say you ask a service at the registration phase but it is not completely completely initialized. Uh the base will hand over the service to you but when you try to access the fields in it, you'll get an null pointer. So, like the plugins has to do a lot of uh checks and a lot of work around to go to solve all these problems. And the other issue issue was about versioning. Uh the plugin API version is tightly coupled with BungeeCord.

Let's say you have some changes in BungeeCord. And there are no changes in the plugin API and still there is a new release for the BungeeCord. You have to bump the one up for the plugin API as well. But the jar is completely byte-to-byte identical. So it says nothing to the plugin authors whether the changes are breaking or the minor deal or it's just a patch.

So we have done the work in the three phases. Basically, the first one was breaking the the whole big plugin API jar into perfect modules leaving the other implementations. So as I took the example of the like see metric plugin so let's say key if I was to publish a metric you just have to depend on the core and the RPC module and you'll not be depending on the EVM stuff and the other jars. So it just this promises the stability and don't you don't have to bump the versions with every new update in any other particular plugin API plugin API feature module API. So the issue was key this approach looks good on paper.

But what if it doesn't work out the way we are thinking in base so so we have to introduce we have to do all this work without breaking anything for the plugin authors. So we decided that from the centralized plugin API we'll move the types into smaller modules. But we'll not change the package names so the imports are import statements are exactly same and we'll keep exporting all the smaller smaller modules for the plugin API. So the things are byte identical for the plugin authors. Like and so making to ensure that we does not slip we do not we do not slip breaking changes to like to the human reviews so we have placed the J API CMP our tool in place.

It basically compares the jar before and after your changes. If the things are byte and source are identical the CI passes. If it's not you'll get a error and you have to fix it. So yeah for the life cycle the idea there was key uh if a poor comply is the service is available at a particular if a service comply it should be available at a particular phase. So to make sure this we have done around 75 minutes.

So out of this the four four or five refinements are already merged. We are working on the two refinements. If I talk about this particular this is the biggest one like it's about key let's say if you're in a registration phase and you're trying to access a service if it's not available at the particular phase it will not compile. But before it it used to be like you'll get the service but it's an empty empty object of no use and you'll get null pointer acceptance. Well like with the current state we have around 30 merge request the merge pull request around this project in the they're already merged on the main like 23 are merged on the main and seven on the plugin API defector branch that we've been working on and I've opened a lot of issues because it has a lot of deferred work to be done after the whole series ends.

Like what we have decided that we'll introduce all the breaking changes at once during GSoC 10. So all those work is saved as deferred issue in base repo to be done after GSoC 10. And after this the next goals is to finish the life cycle series and the all the refinements and then we have to decide that we'll what versioning we'll use for the plugin API or whether it will be CalVer or we have to change to SemVer versioning. CalVer is more like calendar versioning. You version based on the year and the month you have been changing the plugin API and SemVer is more like it show it tells you okay whether there's a major change or some minor change or there's a patch work.

Well like Thank you like thank you Ethan for the SSG SSG project and special thanks to Fabio for the base repo project he's been a great mentor so far. Yeah, thank you.

[applause]

Okay, thank you so much awesome. Any questions any thoughts any comments we have time we are actually ahead of time this time I can believe that that's the first time it happened at EPF that is really awesome really thanks for adhering to the time schedule folks any thoughts any question Ethan go ahead. Yeah.

That's a question for the 7807 SSC block headers. Last year Tamagna tried this in Nimbus and the spec has evolved since like for example we got these progressive data types.

Like but it still points to Electra. We have three listed a progressive list.

Okay, so so you did this like based on the stuff.

When I compared to the python different script I have to switch to Electra.

Okay, okay. Yeah, that makes sense.

Thank you.

Thanks.

[music]

Automatic transcript — names and jargon may be misspelled.