Uses zkevm circuits used by zkRollups (developed by PSE, Scroll and other contributors) along with Foundry's Anvil mainnet fork to prove a private block.
Potential usecases:
- Decentralized CTFs.
- WhiteHat hacker can prove team that they know exploit in onchain protocol.
TODO add more info
Entire project is written in Rust.
I have used:
- zkevm-circuits https://github.com/privacy-scaling-explorations/zkevm-circuits
- foundry's Anvil for mainnet fork
- ethers-rs
Challenges I faced:
- zkevm circuits aim to prove that the new state root is correct, and I was planning to use merkle patricia trie proof further. But I discovered that anvil does not calculate state root for mainnet fork. So I had to write all the code to calculate state root on mainnet fork in Rust.
- Then later I got to know that zkevm circuits currently the MPT circuit is work in progress and cannot complete before hackathon, so I forked the zkevm circuits repo and added a constraint to expose a particular storage slot in public inputs.
- I also tried to integrate scroll chain but there was a different state trie structure and I did not have enough time in the hackathon to fix the issues I was facing, so currenty this is only working for normal etheruem state trie chains like L1, and testnets.