Skip to content

0xPARC/pod2-onchain

Repository files navigation

pod2-onchain

Prove POD2s onchain in Ethereum.

Run tests

  • FFI test, run: cargo test test_groth_full_flow --release -- --nocapture
  • CLI test, run: bash test-cli.sh
    • alternatively:
      1. generate the pod proof: cargo test --release test_pod_flow -- --nocapture
      2. generate the groth16 trusted setup: go run main.go -t
      3. generate the groth16 proof: go run main.go -p
      • this will also generate the Solidity smart contract, located at outputs/Verifier.sol, ready to be deployed

Usage

For an example on how to use the rust lib, check the test test_groth_full_flow

Benchmarks

In an AMD Ryzen 9 5900XT 16cores linux server:

  • plonky2 encapsulation proof: 3.08s
  • groth16 proof: 5.2M r1cs constraints, 10s

Wrapper circuit proving times for different pod circuit sizes:

pod circuit size pod proving time wrapper circuit size wrapper proving time
2^16 15.8s 4784 3.09s
2^17 33.3s 5175 3.09s
2^18 73.5s 5411 3.09s
2^19 153.8s 5646 3.09s

Acknowledgements

This repo relies on the following projects:

About

prove pod2 onchain in ethereum

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •