# EPF - Week 17
This week I spent time looking at how existing clients allow / generate zk proofs. In addition, I tried to optimize our proving block time which then uncovered some issues that are still being debugged.
## Benchmarking
I realized all nodes that I could find do stateless execution and run proofs on that. They ([Reth](https://reth.rs/docs/src/reth_rpc_api/debug.rs.html#137), [Nethermind](https://github.com/NethermindEth/nethermind/blob/0b9ade150012371f5a1de076af359c4448c9ef05/src/Nethermind/Nethermind.JsonRpc/Modules/DebugModule/DebugRpcModule.cs#L553), [EthRex](https://github.com/lambdaclass/ethrex/blob/28799259c11dfe4339df4482580eb5d689b9f278/crates/networking/rpc/rpc.rs#L441) and others) implement `debug_executionWitness`. They then feed into SP1 or RISC-Zero. [Example here](https://github.com/lambdaclass/ethrex/blob/28799259c11dfe4339df4482580eb5d689b9f278/crates/l2/prover/src/guest_program/src/execution.rs#L254-L393) from EthRex which has a small guest program that runs through it.
This is very different from what we are doing. Although it has the benefit that they are going through a RPC method which means that at a higher level I might not need to setup a full node etc and just need to build the guest program and pass it the output from `debug_executionWitness` which I can get from a public node.
Likely we transpile less intensive code, but at the same time, the cryptography/proofs might be more sound with the execution witness approach. Something to discuss part of the benchmarking.
**NOTE:** There does not seem to be a formal spec (EIP or similar) for `debug_executionWitness`, best I could find is the PR description of the [PR that adds it to Reth](https://github.com/paradigmxyz/reth/pull/9249).
## Block proving
I looked at improving the block time proving. Turns out doing the transpilation for the entire block 22940999 created a 50MB assembly file.
This block took a very long time to generate proof for. I started to prove only parts of the block and saw the following
| Transactions | Instructions | Proving Time |
|--------------|--------------|--------------|
| 1 | 8,102 | 1m 22.8s |
| 6 | 57,641 | 1m 59.6s |
| 11 | 96,237 | 2m 12.7s |
| 12 | 158,425 | Never stops (?) |
It's unclear if this is because of bugs on the transpiler causing something like an infinite loop since transpiling the one 12th transaction isolated also does not seem to stop. There might also be some issue with the prover itself, although that seems less likely atm.
Currently I'm writing a simple debug tool which will run binary search on the transpiled opcodes to see if there is a specific instruction which breaks things.
## Next week
For next week I should have done at least one initial benchmark. Which contains runtime on a specific block between our implementation and EthRex (or one of the other nodes). That contains the following
- Compilation time (`debug_executionWitness` + build time versus our build time)
- Proof time
- Binary size difference
This means we also need to figure out what the problem is with our current block proving setup.