https://github.com/iotexproject/halo2-evm-verifier
https://github.com/iotexproject/halo2-evm-verifier
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/iotexproject/halo2-evm-verifier
- Owner: iotexproject
- Created: 2023-09-05T09:01:11.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-30T08:32:46.000Z (over 2 years ago)
- Last Synced: 2025-01-19T00:47:58.670Z (over 1 year ago)
- Language: Rust
- Size: 67.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Halo2 EVM Verifier
==================
## Halo2
### Columns
### How to write a circuit in halo2
1. Define a Config struct that holds the columns used in the circuit
2. Define a Chip struct that configures the constraints in the circuit and provides assignment functions
3. Define a circuit struct that implements the Circuit trait and
4. Instantiate a circuit instance and feed it into the prover
## Steps
### 1. Write circuits
### 2. Generate Onchain verifier
> Requirement: install `solc`
### 3. WASM prover (WIP)
### 4. Aggregator proof (TODO)
## Solidity verifier
```solidity
pragma solidity ^0.8.19;
contract Verifier {
function verify(address yulVerifier, bytes calldata input) external view returns (bool) {
(bool success, ) = yulVerifier.staticcall(input);
return success;
}
}
```
## Usage
### Build
```
cargo build --release
```
### Run
```
// help message
target/release/halo2-evm-verifier -h
// generate params binary
target/release/halo2-evm-verifier params
// generate solidity file or bytecode
target/release/halo2-evm-verifier solidity
// generate proof and calldata
target/release/halo2-evm-verifier proof
```
### IoTeX testnet deployment
The universal solidity contract address: `0xF6577c31eaE769aE303e6D38070fE88A3e8830c9`