Skip to content

Lagrange-Labs/lagrange-lpn-contracts

Repository files navigation

Lagrange ZK Prover Network Contracts

This repository contains smart contracts for the Lagrange ZK Prover Network. These contracts are designed to manage queries, responses, and client interactions within the LPN ecosystem.

You can find the user documentation here

Guide for Maintainers

Environment Setup

Pre-requisites

Optional

List Commands

just --list

Install Dependencies

just install

Build & Test

just build
just test

Static Analysis

This requires docker, aderyn, glow

just slither
just aderyn

Lint

This requires bun & lintspec

just lint
just lintspec

Deploy

  • Private key and Etherscan API key must be supplied as environment variables.
  • Set the appropriate ENV var: prod, test, or dev-X
  • Only 9/10 contracts will verify because the Deployer contract self-destructs.
  • Ensure the RPC is configured for the chain you want to deploy to in foundry.toml
  • Note that md5 is a required system dependency, make sure you have it installed
export PRIVATE_KEY=<...>
export ETHERSCAN_API_KEY=<...>
export ENV=<dev-x/test/prod>
just deploy-v2 [chain]

Update

To update the verifier contract on a dev environment, the command is:

export PRIVATE_KEY=<...>
export ETHERSCAN_API_KEY=<...>
export ENV=<dev-x/test/prod>
just update-v2-executors

Design

See the following design docs:

Credit - Gnark

We would like to thank and recognize Consensys and the gnark team for their work, which we use to generate a Solidity verifier for onchain verification of our proofs.

About

Solidity contracts for the Lagrange Proving Network

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6

Languages