Skip to content

jonas089/casper-groth16-contract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example circom verifier

Warning

This is a research project and hasn't been audited. Use in production at your own risk.

Prerequisite: Review this PR

This contract constructs an example payload from a real circom proof upon initialization. The proof is then verified using the experimental host function.

Compile

rustup target add wasm32-unknown-unknown
cargo build --release --target wasm32-unknown-unknown

out: target/wasm32-unknown-unknown/release/circom-verifier-casper-example.wasm

Optimize

wasm-opt --strip-debug --signext-lowering circom-verifier-casper-example.wasm circom-verifier-example-optimized.wasm

The optimized binary can now be sent to a Casper 2.0 network.

About

Verify a Circom proof in a Casper Smart Contract

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages