Skip to content

Latest commit

 

History

History
117 lines (81 loc) · 2.48 KB

README.md

File metadata and controls

117 lines (81 loc) · 2.48 KB

ZK privacy pools using Noir.

Disclaimer: This project is intended for educational purposes only. The creators assume no responsibility for any illegal activities carried out with it, and the code is made public for viewing purposes only.

.
├── README.md
├── circuits - "Noir circuits"
│   ├── Nargo.toml
│   ├── Prover.toml - "Circuit proof inputs"
│   ├── Verifier.toml - "Circuit verification inputs"
│   ├── contract
│   │   └── ZeroLink
│   │       └── plonk_vk.sol - "UltraPlonk Solidity verifier"
│   ├── proofs
│   │   └── ZeroLink.proof - "Generated proof data"
│   ├── src
│   │   └── main.nr - "Main Noir circuit"
│   └── target
│       └── ZeroLink.json
├── foundry.toml
├── src
│   └── ZeroLink.sol - "Main Solidity contract"
└── test
    └── ZeroLink.t.sol - "Solidity tests"

Installation

Foundry

Install foundry.

curl -L https://foundry.paradigm.xyz | bash
foundryup

Install dependencies.

forge install

Noir

Install nargo.

curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bash
noirup -n

Circuit Compilation

Navigate to the circuits directory.

cd circuits

Test

Run the tests in main.nr.

nargo test

Compile

Compile the main circuit in main.nr.

nargo compile

Prove

Create a proof with public & private data from Prover.toml.

nargo prove

This creates the proof file ZeroLink.proof.

Verify

Successful verification of the proof ZeroLink.proof and the public input from Verifier.toml can be tested.

nargo verify

Solidity Ultra Plonk Verifier

A proof for the circuit can be verified in Solidity.

nargo codegen-verifier

This creates the solidity Ultra Plonk verifier plonk_vk.sol specific to the circuit.

Smart Contract Verification

Navigate to the project's root directory.

Test

Run the tests in ZeroLink.t.sol.

forge test