Skip to content

dompute/lambda-zkevm-poc

Repository files navigation

lambda-zkevm

lambda-zkevm is a zkevm that supports only part of the instruction set. It will be used for off-chain delegate calculations and proof batch.

Lambda ZkEVM

Prepare

Download parms using:

sh download_setup.sh <degree>

The recommended degree is 20, 24, and 26, could only download params of degree 26, but it may affect performance (when dowsizing params)..

Prove & Verify

Run prove with default prove and verify:

cargo run --release -- run --trace-path <your/trace/path>

Run prove with default mock prove and verify:

cargo run --release -- run --mock --trace-path traces/groth16_verification.json

if not set --trace-path will use traces/calculation.json as default.

Or look at the help:

cargo run --release -- run --help

Dry run

Sepcify a file like the following:

cargo run --release -- dry-run --file data/basic-token.code

Or specify calldata and bytecode like:

cargo run --release -- dry-run --calldata 771602f700000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003 --bytecode 608060405234801561001057600080fd5b506004361061004c5760003560e01c806318160ddd1461005157806370a0823114610068578063771602f714610091578063a9059cbb146100a4575b600080fd5b6000545b6040519081526020015b60405180910390f35b610055610076366004610198565b6001600160a01b031660009081526001602052604090205490565b61005561009f3660046101b3565b6100c7565b6100b76100b23660046101d5565b6100dc565b604051901515815260200161005f565b60006100d38284610215565b90505b92915050565b60006001600160a01b0383166100f157600080fd5b3360009081526001602052604090205482111561010d57600080fd5b33600090815260016020526040902054610128908390610228565b33600090815260016020526040808220929092556001600160a01b03851681522054610155908390610215565b6001600160a01b038416600090815260016020819052604090912091909155905092915050565b80356001600160a01b038116811461019357600080fd5b919050565b6000602082840312156101aa57600080fd5b6100d38261017c565b600080604083850312156101c657600080fd5b50508035926020909101359150565b600080604083850312156101e857600080fd5b6101f18361017c565b946020939093013593505050565b634e487b7160e01b600052601160045260246000fd5b808201808211156100d6576100d66101ff565b818103818111156100d6576100d66101ff56fea26469706673582212203c8cf1d0b0ffb741e4b0758b951e25d3fde6108d8823a4ae95a0c0fe926284bf64736f6c63430008150033

Open source credit

https://github.com/scroll-tech/scroll-prover
https://github.com/scroll-tech/zkevm-circuits
https://github.com/foundry-rs/foundry
https://github.com/bluealloy/revm

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •