Implementing EIP-8025 Optional Execution Proofs in Grandine
Devcon·Fri, Nov 6, 2026, 12:00 AM
Speakers
Transcript
Yours, please. Go ahead. Yeah.
Well, thanks, Mario.
Thank you.
So, I'm Charles, and this is Keshav. Uh and we're going to be talking about how we added optional execution proofs to Grandine uh consensus client written in Rust. So, today uh nodes repeat the same execution to validate a payload. And as the gas limit rises, that work gets more expensive. Execution proofs offer uh another way to check payload validity.
Instead of repeating the execution, node verifies a proof. And that verification cost stays nearly flat as the gas limit rises. Uh EIP 8025 lets us test that alongside re-execution. It doesn't change consensus or remove the execution client. Uh it lets us build confidence in the proving stack before considering such a move.
Uh for Grandine, the question is simple. Does the proof that you have actually match the payload you accepted? So, the public input is the claim we're checking. And uh a peer sends proof bytes and identifies a beacon block. Grandine uses that block's accepted payload context to build the expected public input itself.
The proof then has to match that input. Uh when we tried to make this uh work with real proofs, uh we ran into a compatibility issue because the consensus spec and the proving stack hash the payload request differently. Uh the same bytes gave different roots. Um so, we kept the canonical calculation and added a compatibility layer for uh the proving stack uh checked against independent reference. Here's how a proof moves through Grandine.
Uh networking brings in the envelope. The controller coordinates the work. Uh the store provides the payload and state, tracks proof attempts, and stores verified proofs. Proof engine verifies the proof and checks that its committed public values match the expected input, and then the controller returns the gossip outcome. I'll start with networking and verification, the two edges.
So we added the execution proof topic to to libp2p, which is a library that Grandine uses for for p2p. Peers opt in through networking setting, which is off by default. And in Grandine, the flag I'll show you later turns it on. Our transport test checks proof gossip between two peers. When both opt in, the receiver gets the same typed message, and when the receiver opts out, it doesn't see it because it's not subscribed to the topic.
The proof engine decodes the proof, verifies it against a trusted verifying key, and then compares its committed public values with our expected input. The key identifies the guest program, which is the program whose execution is being proved. We tested this with a genuine S Etherax SP1 proof from ZK Boost. With the correct key and the matching input, the engine returns valid. Different guest key fails verification.
And if we change the expected payload route, the proof still passes cryptographic verification, but its public values don't match the input. Both of those failures result in invalid. And if a node has no backend for a given proof type, it just returns undetermined. So Keshav will now show how Grandine handles incoming proofs and decides which ones to store and forward.
So I will show you how the processing part works. Everything starts from the payload being accepted. So after that, everything works. But before that, we have to wait for the proof context to be captured. And that happens with the payload check being passed, and you submit the payload with the notify execution payload.
And once you captured the proof it's asynchronous. So the execution layer validates it and Grandine accepts it as it does today. So there is no change as per consensus. Meanwhile Grandine captures the proof context. The proof context comes asynchronously like I said with you.
If the proof works later proofs of this payload are checked against the saved context. If it fails those proofs are ignored. The payload is accepted either way. So now I will show you the how the same proof being declined works. So currently there's a possibility that two proofs can be declined if they come at the same time because technically during the Grandine has a multi workers and single producer.
So there is a possibility that the two workers can see the same proof and so what we do is we have a single admission gate just before the producer and that checks that the duplicate the proofs are indeed duplicate. So it checks via the same proof. If there's the same proof for the same block it is going to be rejected, ignored and the same prover sending another proof for the same block and the same proof type it is also going to be ignored. So now I'll show you how the verification part works. So the verification part happens once we get the response from the proof engine.
So the proof engine either is going to return the three options that is valid, invalid or undetermined and likewise the gossip is going to reply for the accept, reject, and ignore respectively. And the the proof, the only requirement for the exception accept part is that the proof context during the whole duration of the proof verification via the proof engine as it is an external thing to the consensus client. Once you get the response of it, the proof context all throughout should remain the same or else the it is going to get ignored again. The store keep two keeps two things like the proof context and the first valid proof. All the others are ignored and storing leaves the payload untouched like because optional execution proofs being optional to the whole consensus validation part.
They don't even touch the consensus validation like validity, the head, and the fork choice like I said. So now Charles will show you how to turn the functionality of execution proofs in Grandy.
So one flag turns verification on. You repeat the same flag once for each proof type you want to configure. For our Devnet, we used a proof type of one for mock proofs and a proof type of two for Ethrex SP one. So to use the SP one back end, you also have to build with Granding with that that back end enabled. Without the flag, subscription and verification just stay off.
So it works as if, you know, it's not part of the client. The execution client still receives and validates payloads either way. We ran an end-to-end test on a private Cartosis Devnet. Publisher sends signed proofs to Granding and observer checks and the what Granding forwards. The matching mock proof was accepted, stored, and forwarded.
Second proof of the same block and proof type was ignored as already verified. Then we reused the genuine SP one proof from ZK boost, and it was made for a different payload. So cryptographic verification passed, but but the proof didn't match the devnet payload, so grandine rejected it because the public input didn't match. And when we flipped one bit in the proof, verification itself failed. So that demonstrated that genuine SP1 verification end-to-end in a running grandine node.
I'm handing back to Keshav.
So last week Francesco shared that on X that he has started running a Sepolia prover to prove Sepolia blocks. So our ultimate goal is to have running a verifier in via grandine so that we can accept incoming proofs on Sepolia and verify them. Together three things must match. The first is the ZK ZKVM. The currently the prover is uses the open VM and we are currently verifying SP1, so we have to change that.
Second is the guest the for the Sepolia prover, it uses two guests. So we have support for Eth racks and so we have to have support for both proof types as well as the guest pair so that they have unique public input and we can verify them. So we need to have them in the grandine config. Apart from that, there another thing which we need is the public input must match with like I said in order to have a valid verification. And after we have set up the whole Sepolia, we will try to give a final push to complete our prototype with having a having a stabilized Cartosis devnet test runner so we can just end-to-end test it.
We will also try to add prune support for pruning proofs once the finalization reaches, so that the storage doesn't explode after like exponentially. And the third thing will we try to is do is we will try to add support for k of n. So, currently, sepul approver has two guest programs, so there's a possibility of one of two or any of thing like that, so we will try to have k valid proofs out of n proof types; so it's going to be one of two. And finally, we'll rate limit the proof verification to keep the node responsive so that in case of ddos we'll try to test the ddos as well; so if it passes, it will be a great test to have. Thank you so much.
Thank you to Mario, thank you to the ETH ACT team, Applied Cryptography team, and thank you to all the fellows who have been so generous. Look, you can... yeah, thank you so much.
thank you
awesome thank you so much guys incredible work thank you folks do we have any questions any thoughts great project yes all use have a mic for him there this guy right here yeah awesome
so thanks for working on that and seems you are focusing on mainly on sepul a now right
yeah
yeah
Yeah, but I think there are some provers doing proofs for the main net right now. I just don't see why you shouldn't focus on the main net because, you know it's it's, you can simply try to verify those proofs and do this and "out of k" thing is. there any you don't do that?
The only reason is we have we wanted to be part of the devnet. So currently there is going to be the first devnet test going to happen for the so lighthouse has implemented it and prism has implemented this thing. So they are test going to test it with the Sepolia provers. So that's the only reason we wanted to be compatible with what they were working in. So because we were following the whole their whole L1 Z K V M thread Discord thread.
So that's the only reason we were England. Before that we were committed to work on the E proofs all the all the provers that are for the main net in the E proofs. So we first we were first focused for the on that and that's what Francesco also said that that you can also give that a try but only reason to go for Sepolia is to have another client Grandine to have support.
Yeah. I think maybe you can just because I believe that I'm not fully sure but I believe that the majority of the provers are there and they have a stable provers working and the proofs are there and so on. And the test nets usually are a bit let's say secondary focus for a lot of projects you know. So so you you can always later switch to test net and now mainly focus on the main net to to to make your code to make your Grandine patch working correctly and then whenever you need you know to collaborate with the teams or whatever on the Sepolia you just quickly change configs and and it should work. So my my suggestion would be to focus on the main net try all these options and features like an out of K proofs or whatever.
Yeah. And the great work. Thanks.
Yeah, thank you so much.
Thank you.
Thank you indeed. Incredible work. Can we get another round of applause for the guy?
Automatic transcript — names and jargon may be misspelled.