project screenshot 1
project screenshot 2
project screenshot 3

zKpk

ZK friendly pre-compiles for op-stack chains by applying a minimal diff to op-geth

zKpk

Created At

Scaling Ethereum 2023

Project Description

We added Poseidon hash as a pre-compile to op-geth. This allows smart contract developers to call into this hash function from their solidity. Since Poseidon is a ZK friendly hash , a user can prove that they know the pre-image of a hash without revealing the said pre-image and an on-chain solidity verifier can verify the same. The idea is to add Zk friendly functions as pre-compiles / pre-deploys to this op-stack rollup , thus making it a zk -friendly rollup for develops to build on. We are running op-geth with op-node on goerli as our L1. This is made possible using OP-stack.

How it's Made

  1. We use op-stack for our rollup.
  2. We added pre-compiles to op-geth, this includes adding circom compatable Poseidon hashing to the execution client and testing it.
  3. Adding a gas profile to op-geth for this pre-compile
  4. Used foundry to call pre-compiles
  5. Generate solidity verifier for Poseidon hash using circom library
  6. Developers can now call this precompile for zk applications
background image mobile

Join the mailing list

Get the latest news and updates